From 92e4a1fe421cc9195c3cc85bd848a7ef2445b3c5 Mon Sep 17 00:00:00 2001 From: kemargrant Date: Sun, 11 Jun 2017 10:37:04 -0400 Subject: [PATCH 1/2] Initial Commit --- README.md | 13 +- app.css | 60 +++ app.js | 7 + arbiter.html | 57 +++ contact.json | 3 + escrow.html | 44 ++ eth.js | 1183 +++++++++++++++++++++++++++++++++++++++++++++ ethscrow.js | 326 +++++++++++++ index.html | 80 +++ new_contract.html | 80 +++ profile.html | 56 +++ transactions.html | 16 + 12 files changed, 1921 insertions(+), 4 deletions(-) create mode 100644 app.css create mode 100644 app.js create mode 100644 arbiter.html create mode 100644 contact.json create mode 100644 escrow.html create mode 100644 eth.js create mode 100644 ethscrow.js create mode 100644 index.html create mode 100644 new_contract.html create mode 100644 profile.html create mode 100644 transactions.html diff --git a/README.md b/README.md index b538c804..37258f1d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,13 @@ -# Status $25,000 Global Hackathon +# DApp for Status.im -Extend Status with commands, create decentralized chatbots or mobile-ready your web DApp to win prizes. +Hackathon GitHub Issue: https://github.com/status-im/hackathon/issues/193 -http://hackathon.status.im +``` +{"whisper-identity": "193-ethcro", + "name": "#193 Ethcro", + "dapp-url": "https://d1p4nhcaryds24.cloudfront.net"} -http://docs.status.im +``` + +[*Note:* Put your full project description in your GitHub Issue RSVP. You may copy it below here, but we will review it on the GitHub Issue. ⚠️] diff --git a/app.css b/app.css new file mode 100644 index 00000000..827c57ab --- /dev/null +++ b/app.css @@ -0,0 +1,60 @@ +.list-block{} +.navbar-fixed .page>.searchbar, .navbar-fixed>.searchbar, .navbar-through .page>.searchbar, .navbar-through>.searchbar{top:0px} +body > div > div > div > div > div.page-content > div{margin-top:0px;} + +#arbitrate{display:none} +.avatar{float:left} +.card-header{word-break:break-word;} +#contract_info + { + background-image:url('https://superdevresources.com/wp-content/uploads/2014/08/12-paper-textures.jpg'); + background-size: cover; + background-position: center; + word-wrap:break-word; + } +#contract_header{background:lightblue} +.dispute + { + display:none; + background-image:url('http://fc02.deviantart.net/fs71/f/2013/198/b/1/__f_o_g_____custom_box_background___by_cre8art4life-d6dv82f.png'); + } +.complete + { + background-image:url('https://superdevresources.com/wp-content/uploads/2014/08/12-paper-textures.jpg'); + } +#winner_text{ +font-family: fantasy; + font-style: italic; + font-variant: small-caps; + font-weight: 300; + } +.gold_star{ + color:gold; + -webkit-transition:color 2s linear !important; + transition:color 2s linear !important; + } + +.material-icons{font-size:2em;} +.pic_ruling{display:block;margin:auto;} +.ruling + { + white-space:pre-line; + width:100%; + } +.selected + { + border: .5vw solid #468ddf; + border-radius: 100%; + } +.unselected + { + border:.5vw solid red; + border-radius: 100%; + } +.green{color:green} +.red{color:red} +.grey{color:lightgrey} +a.red{color:red !important} +a.blue{color:blue !important} +a.green{color:green !important} + diff --git a/app.js b/app.js new file mode 100644 index 00000000..c42bc50d --- /dev/null +++ b/app.js @@ -0,0 +1,7 @@ +function onContentLoaded() { + var accountSpan = document.getElementById("account"); + accountSpan.innerHTML = + + (typeof web3 === "undefined" ? "undefined" : web3.eth.accounts[0]); +} +document.addEventListener("DOMContentLoaded", onContentLoaded); \ No newline at end of file diff --git a/arbiter.html b/arbiter.html new file mode 100644 index 00000000..a3647322 --- /dev/null +++ b/arbiter.html @@ -0,0 +1,57 @@ +
+ + +
+ +
+
diff --git a/contact.json b/contact.json new file mode 100644 index 00000000..2df53091 --- /dev/null +++ b/contact.json @@ -0,0 +1,3 @@ +{"whisper-identity": "193-ethcro", + "name": "#193 Ethcro", + "dapp-url": "https://d1p4nhcaryds24.cloudfront.net"} diff --git a/escrow.html b/escrow.html new file mode 100644 index 00000000..88566995 --- /dev/null +++ b/escrow.html @@ -0,0 +1,44 @@ + + + + + + + + + page1 + Description: +
Use Arbiter? +
Arbiter Address: +
Reciever: + + + page2 + View Contract + + pag3 + Sign Contract + + page 4 Complete Contract + + page5 + View Disputes + + page6 Add arbiter + + page7 Dispute + + page8 View Disputes + + page 9 Check Contracts Owned + + page 10 Withdraw Contract Money + + page 11 withdraw karma + + page 12 Check Arbiter + + + + + diff --git a/eth.js b/eth.js new file mode 100644 index 00000000..981da472 --- /dev/null +++ b/eth.js @@ -0,0 +1,1183 @@ +var MyContract; +var contractInstance; +//var contracts_event = contractInstance.List_Contracts({},{fromBlock:1756410}) +var abi = [{"constant":true,"inputs":[{"name":"id","type":"address"}],"name":"get_person","outputs":[{"name":"rating_count","type":"uint256"},{"name":"rating","type":"uint256"},{"name":"avatar","type":"string"},{"name":"profile","type":"string"},{"name":"exp","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"check_contract_2","outputs":[{"name":"creator_signed","type":"bool"},{"name":"signer_signed","type":"bool"},{"name":"is_arbiter","type":"bool"},{"name":"arbitration_ended","type":"bool"},{"name":"creator_rating","type":"uint256"},{"name":"signer_rating","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"ind","type":"string"},{"name":"img","type":"string"},{"name":"info","type":"string"}],"name":"add_arbiter","outputs":[{"name":"result","type":"int256"}],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"get_all_people","outputs":[{"name":"people","type":"address[]"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"sign","outputs":[{"name":"result","type":"int256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdraw_karma","outputs":[{"name":"result","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"check_contract_3","outputs":[{"name":"creator_completed","type":"bool"},{"name":"signer_completed","type":"bool"},{"name":"is_dispute","type":"bool"},{"name":"dispersed","type":"bool"},{"name":"dispute_legnth","type":"uint256"},{"name":"creator_pow_time","type":"uint256"},{"name":"signer_pow_time","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"info","type":"string"},{"name":"signer","type":"address"},{"name":"arbiter_choice","type":"int256"},{"name":"optional_arbiter","type":"address"}],"name":"create_contract","outputs":[{"name":"result","type":"int256"}],"payable":true,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"address"}],"name":"check_arbiter_1_2","outputs":[{"name":"exp","type":"uint256"},{"name":"karma","type":"uint256"},{"name":"avatar","type":"string"},{"name":"profile","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"disp","type":"string"}],"name":"dispute","outputs":[{"name":"result","type":"int256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"user","type":"address"},{"name":"star","type":"uint256"}],"name":"rating","outputs":[{"name":"result","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"check_contract_4","outputs":[{"name":"winner","type":"address"},{"name":"loser","type":"address"},{"name":"reason","type":"string"},{"name":"winning_percent","type":"uint256"},{"name":"losing_percent","type":"uint256"},{"name":"time","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"img","type":"string"},{"name":"info","type":"string"}],"name":"add_person","outputs":[{"name":"result","type":"int256"}],"payable":true,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"retract","outputs":[{"name":"result","type":"int256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"proof","type":"string"},{"name":"ftype","type":"string"}],"name":"complete_contract","outputs":[{"name":"result","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"},{"name":"idt","type":"uint256"}],"name":"view_dispute_text","outputs":[{"name":"time","type":"uint256"},{"name":"author","type":"address"},{"name":"text","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"check_contracts_owned","outputs":[{"name":"written","type":"uint256[]"},{"name":"read","type":"uint256[]"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"address"}],"name":"check_arbiter_2_2","outputs":[{"name":"addr","type":"address"},{"name":"speciality","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"get_all_arbiters","outputs":[{"name":"arbiters","type":"address[]"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"withdraw_from_contract","outputs":[{"name":"result","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"check_contract_1","outputs":[{"name":"description","type":"string"},{"name":"creator_pow","type":"string"},{"name":"signer_pow","type":"string"},{"name":"value","type":"uint256"},{"name":"arbiter","type":"address"},{"name":"creator","type":"address"},{"name":"signer","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"winner","type":"address"},{"name":"loser","type":"address"},{"name":"winning_percent","type":"uint256"},{"name":"losing_percent","type":"uint256"},{"name":"reason","type":"string"}],"name":"resolve","outputs":[{"name":"result","type":"int256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"get_arbiter","outputs":[{"name":"addr","type":"address"},{"name":"avatar","type":"string"},{"name":"profile","type":"string"},{"name":"specialty","type":"string"},{"name":"exp","type":"uint256"},{"name":"karma","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"kill_contract","outputs":[{"name":"result","type":"int256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"new_fee","type":"uint256"}],"name":"update_fee","outputs":[{"name":"result","type":"int256"}],"payable":true,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"payable":false,"type":"fallback"}]; +var show_dispute_event; +var contracts = new Array(); +var contract_dic ={} +var supreme = {}; +var current_contract ={}; +var accounts; +var written_myList; +var myself; +var transactions; +try + { + transactions = JSON.parse(localStorage.getItem("transactions")); + if(transactions.length){} + } + catch(e) + { + transactions= []; + } +console.log("trans:",transactions) + +//~ fetch("http://faucet.ropsten.be:3001/donate/0x0096a22e2B86cdaD52571F4B7c0B34Bb2dbB1A15") +//~ .then((raw)=>{return raw.json()}) +//~ .then(response=> console.log(response)) +//~ setTimeout(()=> +//~ {fetch("http://faucet.ropsten.be:3001/donate/0x004e2603Ee1B5d5209f675eF18744ae8234F7319") +//~ .then((raw)=>{return raw.json()}) +//~ .then(response=> console.log(response)) +//~ },10000) +//~ setTimeout(()=> +//~ { +//~ fetch("http://faucet.ropsten.be:3001/donate/0x00aB8C790Ae82a7F5B52E2185bB08CBF93309Ba2") +//~ .then((raw)=>{return raw.json()}) +//~ .then(response=> console.log(response)) +//~ },23000) +try + { + + //old way good for running locally when web3 is provided by parity or metamask + web3 = new Web3(web3.currentProvider); + //console.log(web3,web3.currentProvider) + MyContract = web3.eth.contract(abi) + contractInstance = MyContract.at("0x17cc965aC5b3CcAFe5cEE39Ec7bbf98240A12e83"); + try{show_dispute_event = contractInstance.Show_Dispute({from:"latest"})}catch(e){console.log(e)} + accounts = web3.eth.accounts[0]; + } +catch(e){console.log("Error:",e);} + +function add_arbiter(industry,image,profile) + { + return new Promise(function(resolve, reject) + { + contractInstance.add_arbiter(industry,image,profile,{from:web3.eth.accounts[0],value: 1000},(err,succ)=> + { + + if(!err) + { + return resolve(succ); + } + else{return reject(err)} + }); + }) + } +function best_arbiter() + { + return new Promise(function(resolve, reject) + { + contractInstance.get_arbiter({},(err,succ)=> + { + if(!err) + { + succ[2] = succ[2].toString(10) + succ[3] = succ[3].toString(10) + console.log(succ); + return resolve(succ); + } + else{reject(err)} + }); + }) + } +function check_arbiter(address) + { + return new Promise(function(resolve, reject) + { + contractInstance.check_arbiter_1_2(address,(err,succ)=> + { + var arbiter = {} + if(!err) + { + console.log(succ) + arbiter.exp = succ[0] > 0 ? succ[0].toString(10): 0; + arbiter.karma = succ[1] ? succ[1].toString(10): 0; + arbiter.avatar = succ[2]; + arbiter.profile = succ[3]; + arbiter.rating = succ[4] ? succ[4].toString(10): 0; + contractInstance.check_arbiter_2_2(address,(err,succ)=> + { + console.log(succ) + if(err){return reject(err)} + arbiter.address = succ[0]; + arbiter.speciality = succ[1]; + return resolve(arbiter); + }) + } + else{return reject(err)} + }); + }) + } +function check_person(address) + { + return new Promise(function(resolve, reject) + { + contractInstance.get_person(address,(err,succ)=> + { + if(!err) + { + var person = {}; + person.rating_count = succ[0] ? succ[0].toString(10): 0; + person.rating = succ[1] ? succ[1].toString(10): 0; + person.avatar = succ[2]; + person.profile = succ[3]; + person.exp = succ[4] ? succ[4].toString(10): 0; + return resolve(person); + } + else{return reject(err)} + }); + }) + } +function check_contract(id) + { + return new Promise(function(resolve, reject) + { + var temp_contract ={} + contractInstance.check_contract_1(id,(err,succ)=> + { + if(!err) + { + //console.log("1/4:",succ) + temp_contract.id = id.toString(10); + temp_contract.description = succ[0]; + temp_contract.creator_pow = {value:succ[1]}; + temp_contract.signer_pow = {value:succ[2]}; + temp_contract.value = web3.fromWei(succ[3].toString(10),"ether"); + temp_contract.arbiter = succ[4]; + temp_contract.creator = succ[5]; + temp_contract.signer = succ[6]; + contractInstance.check_contract_2(id,(err,succ)=> + { + if(!err) + { + //console.log("2/4:",succ) + temp_contract.creator_signed = succ[0] == true ? "checked" :null; + temp_contract.signer_signed = succ[1] == true ? "checked" :null; + temp_contract.is_arbiter = succ[2] == true ? "checked" :null; + temp_contract.arbitration_ended = succ[3] == true ? "checked" :null; + temp_contract.creator_rating = succ[4].toString(10); + temp_contract.signer_rating = succ[5].toString(10); + contractInstance.check_contract_3(id,(err,succ)=> + { + if(!err) + { + //console.log("3/4:",succ) + temp_contract.creator_completed = succ[0] == true ? "checked" :null; + temp_contract.signer_completed = succ[1] == true ? "checked" :null; + temp_contract.is_dispute = succ[2] == true ? "checked" :null; + temp_contract.dispersed = succ[3] == true ? "checked" :null; + temp_contract.status = succ[2] == true ? "red" : "green"; + temp_contract.status = succ[3] == true ? "grey" : temp_contract.status; + temp_contract.dispute = {text:"",length:Number(succ[4].toString(10))}; + temp_contract.creator_pow.time = succ[5] > 0 ? new Date(web3.eth.getBlock(succ[5]).timestamp*1000) : "Pending"; + temp_contract.signer_pow.time = succ[6] > 0 ? new Date(web3.eth.getBlock(succ[6]).timestamp*1000) : "Pending"; + contractInstance.check_contract_4(id,(err,succ)=> + { + //console.log("4/4:",id,succ) + if(err){return reject(err)} + temp_contract.dispute_winner = succ[0]; + temp_contract.dispute_loser = succ[1]; + temp_contract.resolution_reason = succ[2]; + temp_contract.winning_percent = succ[3].toString(10); + temp_contract.losing_percent = succ[4].toString(10); + temp_contract.ruling_time = succ[5] > 0 ? new Date(web3.eth.getBlock(succ[5]).timestamp*1000) : 0; + if(succ[5] > 0){temp_contract.ruling = true}else{temp_contract.ruling = false;} + //format status + var sign_status = "green"; + if(temp_contract.creator_signed && temp_contract.creator == accounts) + {sign_status = "red"} + if(temp_contract.signer_signed && temp_contract.signer == accounts) + {sign_status = "red"} + var kill_status = "red"; + if(temp_contract.creator == accounts && !temp_contract.signer_signed){kill_status = "green"} + var arbiter_status = "blue"; + if(temp_contract.arbiter == accounts && temp_contract.is_dispute && !temp_contract.dispersed){arbiter_status = "green"} + if(temp_contract.arbiter == accounts && temp_contract.is_dispute && temp_contract.dispersed){arbiter_status = "red"} + if(temp_contract.arbiter != accounts){arbiter_status="red"} + var disperse_status = "red"; + if(temp_contract.signer == accounts && temp_contract.creator_signed == "checked" && temp_contract.signer_signed == "checked" && temp_contract.creator_completed == "checked" && temp_contract.signer_completed == "checked" && !temp_contract.dispersed){disperse_status = "green"} + if(temp_contract.signer == accounts && temp_contract.creator_signed == "checked" && temp_contract.signer_signed == "checked" && temp_contract.creator_completed == "checked" && temp_contract.signer_completed == "checked" && temp_contract.dispersed == "checked" ){disperse_status = "blue"} + + if(temp_contract.creator == accounts && temp_contract.is_dispute && temp_contract.arbitration_ended == "checked" && !temp_contract.dispersed){kill_status="red";disperse_status = "green";temp_contract.status = "red"} + if(temp_contract.creator == accounts && temp_contract.is_dispute && temp_contract.arbitration_ended == "checked" && temp_contract.dispersed){kill_status="red";disperse_status = "blue";} + + if(temp_contract.signer == accounts && temp_contract.is_dispute && temp_contract.arbitration_ended == "checked"){disperse_status = "green";temp_contract.status = "red"} + if(temp_contract.signer == accounts && temp_contract.is_dispute && temp_contract.arbitration_ended && temp_contract.dispersed){disperse_status = "blue";} + temp_contract.sign_status = sign_status; + temp_contract.kill_status = kill_status; + temp_contract.arbiter_status = arbiter_status; + temp_contract.disperse_status = disperse_status; + //end format status + contract_dic[temp_contract.id] = temp_contract; + if(contract_dic[temp_contract.id].is_dispute) + { + view_dispute(temp_contract.id,contract_dic[temp_contract.id].dispute.length) + .then(()=>resolve(true)) + .catch((e)=>{console.log("error:",e);resolve(true);}) + } + else{resolve(true)} + contracts.push(temp_contract); + add_contract_vlist(temp_contract); + + }) + } + else{console.log(err);reject(err)} + }); + } + else{console.log(err);reject(err)} + }); + } + else{console.error(err);reject(err)} + }); + }) + } +function complete_contract(id,reason) + { + return new Promise(function(resolve, reject) + { + contractInstance.complete_contract(id,reason,"text",(err,succ)=> + { + if(err){return reject(err)} + console.log("Error:",err,"Succ:",succ) + return resolve(succ); + + }); + }) + } +function create(desc,signer,choice,arbiter,amount) + { + return new Promise(function(resolve, reject) + { + //choice = web3.toBigNumber(choice); + contractInstance.create_contract(desc,signer,choice,arbiter, {from:web3.eth.accounts[0],value: web3.toWei(Number(amount),"ether")},(err,succ)=> + { + console.log("Error:",err,"Succ:",succ) + if(err){return reject(err)} + else{return resolve(succ)} + }); + }) + } +function dispute(id,message) + { + return new Promise(function(resolve, reject) + { + contractInstance.dispute(id,message,(err,succ)=> + { + if(!err) + { + console.log("dispute sent:",succ); + //view_dispute(id) + return resolve(succ); + } + else{return reject(err)} + }) + }) + } + +function kill_contract(id) + { + return new Promise(function(resolve, reject) + { + contractInstance.kill_contract(id,(err,succ)=> + { + if(!err) + { + console.log("killed:",succ); + return resolve(succ); + } + else{return reject(err)} + }) + }) + } +//~ function list_contracts() + //~ { + //~ contractInstance.check_contracts_owned((err,succ)=> + //~ { + //~ if(!err) + //~ { + //~ // watch for changes + //~ list_contracts_event.watch((error, result)=>{ + //~ if (error){return} + //~ { + //~ console.log(result) + //~ for(var i =0;i + { + if(!err) + { + + if(!succ || !succ.length){return notify("Status","","No Cotracts Found")}; + for(var i=0;i + { + if(!err) + { + console.log("rating sent:",succ); + return resolve(succ); + } + else{return reject(err)} + }) + }) + } +function sign(id) + { + return new Promise(function(resolve, reject) + { + contractInstance.sign(id,(err,succ)=> + { + if(!err) + { + console.log("contract signed:",succ); + return resolve(succ) + } + else{return reject(err)} + }) + }) + } +function rule_arbiter(id,winner,percent,reason) + { + return new Promise(function(resolve, reject) + { + var losing_percent = Math.floor((100-percent)*.8); + percent = Math.floor(percent * 0.8); + var loser; + if(contract_dic[id].creator == winner){loser = contract_dic[id].signer} + else{loser = contract_dic[id].creator} + contractInstance.resolve(id,winner,loser,percent,losing_percent,reason,(err,succ)=> + { + if(!err) + { + console.log("contract signed:",succ); + return resolve(succ) + } + else{return reject(err)} + }) + }) + } +function update_profile(img,profile) + { + return new Promise(function(resolve, reject) + { + contractInstance.add_person(img,profile,{value:1000},(err,succ)=> + { + if(!err) + { + console.log("profile update:",succ); + return resolve(succ) + } + else{return reject(err)} + }) + }) + } +function view_dispute(id,count) + { + return new Promise(function(resolve, reject) + { + for(var i = 0;i + { + if(!err) + { + var sent = accounts == succ[1]? "sent":"received"; + contract_dic[id].dispute.text = contract_dic[id].dispute.text + "
" + + "
"+new Date(web3.eth.getBlock(succ[0]).timestamp*1000)+"
"+ + "
"+succ[2]+"
"+ + "
"+ + "
"; + } + else{return reject(err)} + }) + } + if(contract_dic[id].ruling) + { + var winner_text = contract_dic[id].dispute_winner == accounts ? "Congratulations you have won your case!" : "Sorry case has been decided againgst you."; + contract_dic[id].dispute.text = contract_dic[id].dispute.text + "
" + + "
"+contract_dic[id].ruling_time+"
"+ + "
"+ + "Arbitration has ended:\n"+ + winner_text+ + "\n Reason:"+contract_dic[id].resolution_reason+ + "\n Contract Split:"+contract_dic[id].winning_percent+"/"+contract_dic[id].losing_percent+ + "
"+ + "
"+ + "
"; + } + resolve(true); + }); + } +function withdraw_karma(amount) + { + return new Promise(function(resolve, reject) + { + //amount in wei + contractInstance.withdraw_karma(amount,(err,succ)=> + { + if(!err) + { + return resolve(succ) + } + else{ return reject(err)} + }) + }) + } +function withdraw_from_contract(id) + { + return new Promise(function(resolve, reject) + { + contractInstance.withdraw_from_contract(id,(err,succ)=> + { + if(!err) + { + console.log("dispersed contract",err,succ); + return resolve(succ); + } + else{return reject(err)} + }) + }) + } + + +//check_arbiter(accounts) +//console.log(web3.eth.getBalance(accounts).toString(10)) +//withdraw_from_contract(1766436) +//withdraw_karma(10) +//sign("1766436"); +//complete_contract("1766436","I did it","text") +//add_arbiter("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAADAFBMVEVMaXEsquItpOgqrOAtrOQtq+ItquIfn98sqeEtquItquIsquAtq+IAkP8trOQppt8squEtp98tquEsquEtq+YsqeEsquEsquEsqeErqd8qquItqeAqquItquEtqeEsquMtq+Isq+EwntosquAtrOQsqOItrOMsquAzsuUtquErq+Espt4tqd8trOQsquItqd8qpuEsqeArp98tqOEuq+MzmcwrreMtrOMtquAtq+Iko9otrOQsqeAtq+QtqeAtq+MtrOQsqeAtrOQsquAtqN8ureUAf38tquAtquEtrOMsp98sq+Mopd8treUsqt8tq+IsqeAsq+ItrOMtqeEqqt8qqeAsquEsq+MsquEnsNctrOQsqOAtq+IoodYrp98rrOEtquErp9ssquEtquD///8tquEuruYsquEvseolp+Atq+Imp+AureUvsOkoqOAqqeEtq+MrqeEurOQtquIpqOAurucur+gnqOAvsesusOgwq+L1+/4kp+Anp+AtrOQurOQusOkvsOgvq+E2ruL+/v86r+NCs+QkpuApqeD7/v40reJXu+cyrOI8sOMxrOIsqeFIteW85PVNuObq9/z+//9rw+rI6Pfl9Pv4/P5Suufz+v3m9fv9/v/d8fqy4PREs+TF6Pfu+P3a8PotrONyxusvsOrn9fzZ8Pq/5fZ6yuxnwukureYur+d1x+vw+f04ruOr3fOa1vGIz+5AsuSv3/TN6/hKtuWW1fB4yexZvOfR7PkuquFPuOY/seS14fSu3vPT7flfvuhdvuhnwen0+/0treXQ7Pip3POQ0u9FtOUlpuBBsuSi2fKDze295Pbj9Pthv+hQuOaL0O7U7vn5/P6d2PHO6/hdvehVu+eT1PDy+v12yOzs9/ze8vq44/Ufpd/W7vmw3/R0x+uk2vLA5fbg8/vg8vtkwenX7/nB5va74/VbvejK6vduxOpzxuvt+Pxwxevb8PrM6vjD5/aGzu6O0e9qw+r6/f6Ay+0mqOD2+/7W7/ml2/J8yuwjpuCX1fAiuX3sAAAAZHRSTlMACQs19v1mCPJlk1DXAe8xzmB23hA35JqVehL+av7dH/i4CthELOf8CrVON07LeHEqwi5EUgovzoeHDtXZrtGh/bDww2r+AmSi8HjBLPzza769y3FIR8G32A3m/LQTKWkzHe/c4DZcjQAACK5JREFUeNrNW2dYU1cYvipSQFxgRAUV90Itrlbt0tZZW2e1rXbn5OZykxvyEAgoMSWUIXsLFgEBd93WPXDUrbj3ah111FbpoLvNQhJy7zl3JFzfP/A8yXPeN/d89zvfOB+G8ULDjo2CAvym+3rMnOnhO90vIKhRx4ZYPaGdxL3N5A4e/jJluCI0BICQUEW4Uubv0WFyG3dJOxeTD5b4zGrtv1geYaa2hVFGhHyxf+tZPpLOrmLv2dXLu708Sl+H2k6GPkru7+3V1RUahgz1nitXQMifilDI53oPHeJc9ucGdXKLVADWUES6dRr0nNPoh3m+IIsKAZwQEiV7wXOYU+gbeA5XygAPyJTDPQcL528yJYYXvVlCTN8mAum7vfxNOBCA8G9e7ibE9vo1k4cBQQhb3Kwfb2ts/qZ8LhCMufI3m/Pj/6iZEjgFymYBfFz+qxF64CToI17lfEh0myJ09+0sQT6Foy1Oe18JnArl+9O48Ld0kwEnQ+bWkj1//9f0wOnQvzaVLX/blWXABShb2ZYdfz9ZKHAJQmWsFPR3Fb9JQX8W9veWy/iNCt5CWuI7bnrgQujd3oHzP99dBlwKWfcJMP5WLT4HLsbnLVox8zcdGwlcjsixTRkFvBER5noBYRFvMPEPGKkH9QD9yAEM8c/rSlAvUL5OHyONl4N6gnw87Rs4rqy+BJSN+9CRf/QIJag3KEeMdhDQe1SI0GXVGh1JahNxFnnTqN4O+U+LrwSyE9SaUydX7Nu7KYXU2WvAHSV91aJBHQFjlALpU5c/qKyWGjFn4dp9swkbTi1IclSgHFOn5NKF/gxIV7HiJ2MPzZfaoOJHtcb663Xa5F1ZjqvI3n3PToAn/QPAYw9TaHqcOLlUWgcnDpPGDzTRhj3Xq0vofoXS084HvUKfARLLFx5FKsB1x/OlDqi8cIMwnDpdkSMt3KOlyxpfsfVGTeg3AN9+QFoVq0E9/9M5UhqsPv33zbOmf3Zr6Q9mm8S5aaco2u9QyYVS6f0kuALiSqEUhmup9HYU1an2VBwQSO8Dog+ZVlgWC9sFKms1lH9RMgkorYHGFwTWnkkvMoQB1AnzGnmpJOQFvA3lv7r3RgJ+8b8MmqcQ+eLT+ttL9PUnPM1q3PeyjjDx6/blQOgLq3Yk7b309bzNdGageKmnVcBAhjBAHbfEulB2LqGm/45mGez3/1T0c7bxz3U1rXvWD7QK8GI4h9Wp2TUrzdts0NHyZ8yRIvF1LL0Zyr2sx0AXBeoJGPFDQbSazlGg+W9uYDBiRRfLgSBpzHAO4rNLbdbZfymWcHiSxEEkf0W8lulMbNzHLMCHMRKi7De4dJWhrgRVHor/firzSyz3MQvoxXgQWvyADc4/Tjtiu5+44R6cvvpWGsSNxfQyJyOtGWNhaquDkztzfCdJPjUGPKUULuA609tjeQ1am5KUPo0ZkwF8+zbHNbN3r4gjCU265Qn8BRfwLQFNEcxG4A4JhokttMtWFi3PSqISCC1FlsAFFJHw8NjdKKANRAA+exvDyvnXMtdtObkjdTfiCSAEtDEKmBQB+Yb2YT5s/bOrEX7oIHQLQMQkYzDWgbkRkZ4IiPVSIViXAG9sfNYT6+jBWBFJj9tEkrp1QgSsj4ZnKJ9+gjXyZ8wHNFnZa0/G/rt+AX8B5fAtCGn/MRbEXBJRxV82WvyDSyU5fPkLtyIiSlkQNpE5IUhPuiYVhtXxiLBeORHzg3REtA8EClg6G5GnhfthwZBuHHFcoIBdJKq/Nx3zhZQFVRkLhAn4JQFVOPTF3oaVhbRFgvgLk1FZTdjbWA/Y51TBn0IE3E1Cpuo94AIAIcgNrSUAWgB0C4A6pUqAgN9QNmjaAl94bZoqXsibv3KNGqCNMBjRFNdm3OQr4Bh6BxTBUEdkUZC6ix9/9UV0bcHoiCYiazOJqitP+AgoYVFdMbriIGR9XkPcSPsxM7uQq4BcEi3AeBhBjmOrO7xQvjd56+ON+znyHzCg63Uh/hJYQGItgDySSnmcxzmP0CYIQj06QkMya/JxhpcFpLMoWCo6NEQEpWZvWM6D/+xDHYvynikohYbllkeg4hEW3GJhgdaw3B1ZpdccvcuV/04qqwqnOTGBpGY1+OPiVY4+aAWrB2BJzSDJae2bkFzJScA5VvzW5BSSntsoOHybA3+eQc1KgCU9hxQobO0A/MP6WLwTT7HirylQMJZo6lSkY7fcZ2UKptIkK9SUaBiLVA49Ac2GPauKvkDwL/j+CMsmQ02RirFMR+OTEq58ieDfnxvNunnmhShUOpzL0TsykbnQCtb8tYVKplJtneCMKD6HTBPmPyRY89eWahmL1bUWmEioTh37CWl/5zNI1vw2xWqGcr0aN0GtoggCZPxeko+2/4NJFHt+23I9bcPCsDNpOw7S1hRv3XLsAJtoZMkqrYo9v13DgrZls708r/RARWnlZXaxWOHGeAJwgW3Lhr5pRW3azT4OrPqeSuTEb9+0om/baciCjXPYxX/fGUjADfZtO6bGJaXLOofyPNL8ZbkGAufIX7dxydi61RBx32Uugpz8FZd2aEiu9I6tW0jzWk1QR8vXLqXZi+rKzPUFBkIDuMOxeQ1t36tIIm1T7q8b8558uWiBEYuWLKzatXlVwRoqmsJ50NO171EXGPBEMoFUpcRtiC8ujt8Ql6ImEwhKDXiC7gIDqyscRr9ohhoHQlA27vln8RKL+Nd4RL/IJP5VLvEvs4l+nU/8C43iX+kU/1Kr+Nd6MaytyBebxb/ajWFTRb7cLv71fgyb1j3Gufwx3TkNOGDYhL7OHfHoO0HkIZcPeMzZBIg75vMMDDo5Z9RLLmDUyxnDbgpBw27mxLmvqON+pklbkQceTSOf7vxGPt2dM/JpGXqdEcht6DVwhhOHXp+BsV8zOnf18vYXb/DZokHi0ws++t3LhaPfz8Lwu834v6R3gF+wr0ePHh6+wX4BvSV8x///B9AoH5gNZbE/AAAAAElFTkSuQmCC") +//create("Simple Contract "+new Date().getTime(),"0x001d4EFC69650729845cd42f671E32C62aea00A2",2,"0x00a0647d5664836aE3D772FbBD270630eB04139b",new Date().getTime()); +//best_arbiter() +//check_arbiter("0x00dbc13bd2a8a3a516d2f90498cca4e1fe51418c") +//check_contract("1758222") +//~ var balance = web3.eth.getBalance("0x00DBC13bD2A8A3A516D2f90498cca4E1FE51418c") +//~ balance.plus(21).toString(10) +//~ console.log(balance) +// Initialize app + +//framework 7 functions +console.log("Account Address:",accounts) +function add_contract_vlist(c_info) + { + for(var i = 0;i < written_myList.items.length;i++) + { + if(written_myList.items[i].id == c_info.id){return} + } + if(c_info.creator == accounts){return written_myList.appendItem(c_info)} + else{return read_myList.appendItem(c_info)} + } +function change_selection(val,src) + { + if(val == 1) + { + document.getElementById("arb_creator").setAttribute("class","selected"); + document.getElementById("arb_signer").setAttribute("class","unselected"); + document.getElementById("winner_img").value = 0; + } + else{ + document.getElementById("arb_signer").setAttribute("class","selected"); + document.getElementById("arb_creator").setAttribute("class","unselected"); + document.getElementById("winner_img").value = 1; + } + document.getElementById("winner_img").src = src; + + } +function close_pop() + { + myApp.closeModal('.popup-update'); + } +function comment(id) + { + var message = document.getElementById("comment").value; + if(!message){return notify("Error","Enter Dispute Text","")} + return dispute(id,message).then((val) => + { + transactions.push({value:val}); + localStorage.setItem("transactions",JSON.stringify(transactions)); + return notify("Status","Contract Disputed by",accounts); + }).catch((e)=> + { + console.log(e); + return notify("Status","Dispute Comment Not Added",""); + }) + } +function completed_contract(id) + { + var message = document.getElementById("complete").value; + if(!message){return notify("Error","Enter A Reason to close the contract","")} + return complete_contract(id,message).then((val) => + { + transactions.push({value:val}); + localStorage.setItem("transactions",transactions); + return notify("Status","Contract Completed by",accounts); + }).catch((e)=> + { + console.log(e); + return notify("Status","Contract Not Completed",""); + }) + } +function display_arbiter(addr) + { + return mainView.router.load({url:"/arbiter.html",query:addr}); + } +function display_me() + { + return mainView.router.load({url:"/profile.html",reload:true}); + } +function display_person(type,id) + { + var addr; + if(type == 0){addr = contract_dic[id].creator} + else{addr = addr = contract_dic[id].signer} + return mainView.router.load({url:"/profile.html",query:{user:addr}}); + } +function generate_arbiter_card(id,addr) + { + var search_addr; + if(addr){search_addr = addr} + else{search_addr = contract_dic[id].arbiter;} + if(!web3.isAddress(search_addr)){return console.log("Not a valid address")} + return check_arbiter(search_addr) + .then((arbiter)=> + { + try + {document.getElementsByClassName("card")[0].parentElement.removeChild(document.getElementsByClassName("card")[0])} + catch(e){console.log(e)} + var frag = document.createDocumentFragment(); + var card = document.createElement("div"); + card.setAttribute("class","card"); + var card_header = document.createElement("div"); + card_header.setAttribute("class","card-header"); + card_header.innerHTML = "Arbiter Address:"+arbiter.address; + var card_content = document.createElement("div"); + card_content.setAttribute("class","card-content"); + var card_content_inner = document.createElement("div"); + card_content_inner.setAttribute("class","card-content-inner"); + card_content_inner.innerHTML = "

Specialty:"+arbiter.speciality+"
" + "\n"+ arbiter.profile+"

"; + var card_footer = document.createElement("div"); + card_footer.setAttribute("class","card-footer"); + var karma = document.createElement("b"); + var exp = document.createElement("b"); + var button = document.createElement("a") + button.setAttribute("class","button button-fill"); + button.innerHTML = "Become Arbiter"; + button.addEventListener("click",pop, false); + if(accounts == search_addr) + { + button.innerHTML="Update Arbiter Profile"; + document.getElementById("url").value = arbiter.avatar; + document.getElementById("industry").value = arbiter.speciality; + document.getElementById("descr").value = arbiter.profile; + } + exp.innerHTML = "EXP:"+ arbiter.exp; + karma.innerHTML = "Karma:" + arbiter.karma; + card_footer.appendChild(karma); + card_footer.appendChild(exp); + card.appendChild(card_header); + card_content.appendChild(card_content_inner); + card.appendChild(card_content); + card.appendChild(card_footer); + card.appendChild(button); + frag.appendChild(card); + return document.getElementById("spage").appendChild(frag); + }) + } +function generate_contract_page(id) + { + return mainView.router.load({template:compiled_ct,animatePages:true,context:contract_dic[id]}); + } +function generate_base64(addr) + { + return blockies.create({ // All options are optional + seed: addr.toLowerCase(), // seed used to generate icon data, default: random + size: 10, // width/height of the icon in blocks, default: 8 + scale: 5, // width/height of each block in pixels, default: 4 + // default: random. Set to -1 to disable it. These "spots" create structures + // that look like eyes, mouths and noses. + }).toDataURL(); + } +function generate_icon(id,addr) + { + document.getElementById(id).src = generate_base64(addr); + } + +function kill(id) + { + return kill_contract(id).then((val) => + { + transactions.push({value:val}); + localStorage.setItem("transactions",transactions); + notify("Status","Contract Killed",""); + + }).catch((e)=> + { + console.log(e); + notify("Status","Unable to Kill Contract",""); + }) + } +function pop() + { + myApp.popup('.popup-update'); + } +function p_change(value) + { + return document.getElementById('percent').innerHTML = value; + } +function notify(title,sub,mess,time) + { + if(!time){time = 2000} + return myApp.addNotification({title: title,subtitle: sub,message: mess,hold:time}); + } +function save_arbiter() + { + var img = document.getElementById("url").value; + var profile = document.getElementById('descr').value; + var industry = document.getElementById('descr').value; + add_arbiter(industry,img,profile).then((val)=> + { + transactions.push({value:val}); + localStorage.setItem("transactions",transactions); + return close_pop(); + }).catch((e)=> + { + console.log(e); + notify("Status","Error Updating Updating",""); + }) + } +function save_profile() + { + var img = document.getElementById("url").value; + var profile = document.getElementById('descr').value; + update_profile(img,profile).then((val)=> + { + transactions.push({value:val}); + localStorage.setItem("transactions",transactions); + return close_pop(); + }).catch((e)=> + { + console.log(e); + notify("Status","Error Updating Profile",""); + }) + } +function search_arbiter(evt) + { + if(evt.keyCode != 13){return} + var search_addr = document.getElementById("search").value.trim(); + return generate_arbiter_card(0,search_addr) + } +function search_contract(evt) + { + if(evt.keyCode != 13){return} + try + { + var contract_id = document.getElementById("search").value.trim(); + return check_contract(contract_id).then(()=>{generate_contract_page(contract_id)}); + }catch(e){console.log(e)} + } +function rule(id) + { + var winner = document.getElementById("winner").value == 0 ? contract_dic[id].creator : contract_dic[id].signer + var percent = document.getElementById("distribution").value; + console.log("percent:",percent) + var reason = document.getElementById("reason").value; + return rule_arbiter(id,winner,percent,reason).then((val) => + { + transactions.push({value:val}); + localStorage.setItem("transactions",transactions); + close_pop(); + return notify("Status","Contract Ruled On",""); + }).catch((e)=> + { + close_pop(); + console.log(e); + return notify("Status","Unable to Rule Check your transactions",""); + }) + } +function sign_contract(id) + { + return sign(id).then((val) => + { + transactions.push({value:val}); + localStorage.setItem("transactions",transactions); + return notify("Status","Contract Signed",""); + }).catch(()=>{return notify("Status","Contract Not Signed","");}) + } + +function submit_contract() + { + try + { + var desc = document.getElementById("desc").value; + var amount = document.getElementById("amount").value; + var signer = document.getElementById("signer").value.trim(); + var choice = document.getElementById("choice").checked == true? 1:2; + var arbiter = document.getElementById("arbiter").value; + if(choice == 2) + { + console.log("arbitter will not be used:",arbiter) + } + console.log(desc,signer,choice,arbiter,amount) + } + catch(e){this.notif("Error","Please Fill Out The Required Information","");return console.log("Please fill out fields",e)} + if(!web3.isAddress(arbiter)){return console.log("Invalid arbiter address")} + if(!web3.isAddress(signer)){return console.log("Invalid receiver address")} + create(desc,signer,choice,arbiter,amount) + .then((succ)=> + { + transactions.push({value:succ}); + localStorage.setItem("transactions",transactions); + notify("New Contract","Success","New Contract Created:"+succ); + setTimeout(()=>{location.reload()},5000); + + }) + .catch((e)=>{console.log("Error:",e)}) + } +function withdraw_money(id) + { + return withdraw_from_contract(id).then((val) => + { + transactions.push({value:val}); + localStorage.setItem("transactions",transactions); + return notify("Status","Contract Money Withdrawn","Your new balance is:"+val); + }).catch(()=> + { + notify("Status","Error Withdrawing Money From Contract",id); + }) + } +var myApp = new Framework7(); +var page = '
' + + ''+ + '
'+ + '
'+ + '
' + + '
Contract: {{id}}
'+ + '
'+ + '
'+ + '
'+ + '

{{description}}


'+ + '
'+ + '
'+ + ''+ + '
'+ + '
{{value}} Ether
'+ + '
'+ + '

Creator: {{creator}}


'+ + '

Receiver: {{signer}}


'+ + '

Contract Arbiter: {{arbiter}}


'+ + '
    '+ + '
  • '+ + ''+ + '
  • '+ + '
  • '+ + ''+ + '
  • '+ + '
  • '+ + ''+ + '
  • '+ + '
  • '+ + ''+ + '
  • '+ + '
  • '+ + ''+ + '
  • '+ + '
  • '+ + ''+ + '
  • '+ + '
  • '+ + ''+ + '
  • '+ + '
  • '+ + ''+ + '
  • '+ + '
'+ + '

Contract Completion Information

'+ + '
'+ + '
'+ + '
{{creator_pow.time}}
'+ + 'Contract Creator Completion Statement:
{{creator_pow.value}}
'+ + '
'+ + '
'+ + '
'+ + '
{{signer_pow.time}}
'+ + 'Contract Recipient Completion Statement:
{{signer_pow.value}}
'+ + '
'+ + '
'+ + '
'+ + '
'+ + + '
'+ + '

Dispute Information:

'+ + '
{{dispute.text}}
'+ + '
'+ + + '
'+ + '
'+ + '
    '+ + '
  • '+ + '
    '+ + '
    '+ + '
    Dispute
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + 'Submit Dispute'+ + '
  • '+ + '
  • '+ + '
    '+ + '
    '+ + '
    Completion Statment
    '+ + '
    '+ + ''+ + '
    '+ + '
    '+ + '
    '+ + 'Complete Contract'+ + "
    "+ + '
  • '+ + '
'+ + '
'+ + "
"+ + ''+ + '
'+ + '
' + + ''+ +'
'+ + '
'; +var list_items = '
  • ' + + '
    assignment
    ' + + '
    ' + + '
    {{description}} Contract:{{id}}
    ' + + '
    {{value}} Ether
    '+ + '
    ' + + '
  • '; +var list_trans = '
  • ' + + '
    receipt
    ' + + '
    ' + + '' + + '
    ' + + '
  • '; +var compiled_ct = Template7.compile(page); +var list_template = Template7.compile(list_items); +var trans_template = Template7.compile(list_trans); +var $$ = Dom7; +written_myList = myApp.virtualList('.written.list-block.virtual-list', { + items: [], + template:list_template + }); +read_myList = myApp.virtualList('.read.list-block.virtual-list', { + items: [], + template:list_template + }); + myApp.onPageInit('index',(page)=> + { + // "page" variable contains all required information about loaded and initialized page + //console.log("index page loaded:",page,contracts,written_myList,read_myList,accounts); + written_myList = myApp.virtualList('.written.list-block.virtual-list', { + items: written_myList.items, + template:list_template }) + read_myList = myApp.virtualList('.read.list-block.virtual-list', { + items: read_myList.items, + template:list_template + }); +}) +myApp.onPageInit("new_contract",(page)=> + { + best_arbiter().then((val)=>{console.log("value",val);document.getElementById("arbiter").value = val[0];}) + }) +myApp.onPageInit("arbiter",(page)=> + { + if(page.query){return generate_arbiter_card(page.query)} + }) +myApp.onPageInit("dynamic_contracts",(page)=> + { + var rated; + function fill_star(count) + { + var x = document.getElementsByClassName("stars"); + for(var i =0;i<5;i++){x[i].setAttribute("style","color:black;transition: all 1.7s linear")} + for(var i =0;i< count + 1;i++){x[i].setAttribute("style","color:gold;transition: all 1.2s linear")} + rated = count + 1; + } + function submit_rating() + { + var person = page.context.creator == accounts? page.context.signer : page.context.creator; + console.log(person,rated); + set_rating(page.context.id,person,rated) + .then(()=>{this.notify("Status","Rating Submitted","") }) + .catch((e)=>{this.notify("Status","Error During Rating")}) + } + function create_stars() + { + var frag = document.createDocumentFragment(); + var div = document.createElement("div"); + var button = document.createElement("button"); + button.setAttribute("class","button active button-fill"); + button.innerHTML = "Rate User"; + button.addEventListener("click",()=>{submit_rating()}, false); + var icon; + for(var i=0 ;i < 5 ;i++) + { + icon = document.createElement("i"); + icon.innerHTML ="star"; + icon.count = i; + icon.addEventListener("click",()=>{fill_star(event.currentTarget.count)}, false); + icon.setAttribute("class","stars material-icons"); + div.append(icon) + } + frag.appendChild(div); + frag.append(button); + console.log(accounts,page.context.creator) + if(page.context.creator.toString().trim() == accounts.toString().trim()){document.getElementById("rate_s").appendChild(frag)} + else{document.getElementById("rate_c").appendChild(frag)} + if(page.context && Number(page.context.creator_rating) || Number(page.context.signer_rating) ) + { + var s_count = Number(page.context.creator_rating) > 0 ? Number(page.context.creator_rating) : Number(page.context.signer_rating) + fill_star(s_count - 1); + } + } + if(page.context && page.context.dispersed){create_stars();} + if(page.context && page.context.arbiter == accounts){document.getElementById("arbitrate").setAttribute("style","display:block")} + console.log("page:",page.context); + generate_icon("creator_icon",page.context.creator); + generate_icon("signer_icon",page.context.signer); + generate_icon("arbiter_icon",page.context.arbiter); + if(page.context.creator == accounts) + { + document.getElementById("disperse_button").setAttribute("style","display:none"); + } + else{document.getElementById("retract").setAttribute("style","display:none");} + if(page.context && page.context.is_dispute) + { + notify("Alert","Dispute","This Contract Has a Dispute!") + document.getElementsByClassName("dispute")[0].setAttribute("style","display:block"); + if(page.context.creator == accounts) + { + document.getElementById("disperse_button").setAttribute("style","display:block"); + } + else{} + generate_icon("arb_creator",page.context.creator); + generate_icon("arb_signer",page.context.signer); + } + + }) +myApp.onPageInit("profile",(page)=> + { + var y = accounts; + var x = accounts; + if(page.query.user){x = page.query.user} + console.log(page.query,x); + var balance = web3.eth.getBalance(x); + document.getElementById("balance").innerHTML = web3.fromWei(balance,"ether"); + document.getElementById("address").innerHTML = x; + if(x != y) + {document.getElementById("update").setAttribute("style","display:none")} + return check_person(x) + .then((info)=> + { + //console.log("page:",info,x.toString(10)); + if(info.avatar.length < 1 && Number(info.exp) == 0 && Number(info.rating_count) == 0) + { + + if(accounts == x) + { + this.notify("Tip","You can update your profile with an image url","",1000) + } + document.getElementById("exp").innerHTML = 0; + document.getElementById("rating").innerHTML = 0; + document.getElementById("profile").innerHTML = ""; + document.getElementById("image").src = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTbzrRbV1QoF260xai-2OpcBqVlsi_WjyjZQJFNfJqDNeuX2pOr"; + } + else + { + document.getElementById("exp").innerHTML = info.exp; + if(info.rating_count > 0){document.getElementById("rating").innerHTML = Number(info.rating)/Number(info.rating_count);} + else{document.getElementById("rating").innerHTML = "0"} + document.getElementById("profile").innerHTML = info.profile; + document.getElementById("image").src = info.avatar; + document.getElementById("url").value = info.avatar; + document.getElementById("descr").value = info.profile; + } + }) + }) + myApp.onPageInit('transactions',(page)=> + { + console.log("transactions:",transactions); + try + { + myApp.virtualList('.tx.list-block.virtual-list', { + items: transactions, + template:trans_template }) + } + catch(e){return this.notify("Status","No recent transactions found","")} +}) +// Add view +var mainView = myApp.addView('.view-main', { + // Because we want to use dynamic navbar, we need to enable it for this view: + dynamicNavbar: false +}); + +//create contracts list +list_contracts(); +check_person(accounts).then((info)=>{if(info.profile)myself = info}) + +//Nicieties...remove text after submitting dispute or completion +//Colored buttons when you can withdraw or you can kill the contract +//Profile: Address,exp +//Rating the arbiter on performance of the contract (only once after contract dispersed) +//viewing all avatars +//roundtable judgement??? diff --git a/ethscrow.js b/ethscrow.js new file mode 100644 index 00000000..e2697fab --- /dev/null +++ b/ethscrow.js @@ -0,0 +1,326 @@ +pragma solidity ^0.4.11; + +contract Ethcrow { + struct Arbiter{ + address arbiter; + string avatar; + string specialty; + string profile; + uint karma; + uint exp; + } + struct Contract { + string desc; + Proof creator_pow; + Proof signer_pow; + uint value; + address arbiter; + bool is_arbiter; + address creator; + address signer; + bool creator_signed; + bool signer_signed; + bool arbitration_ended; + bool creator_completed; + bool signer_completed; + bool dispersed; + bool is_dispute; + Conversation[] dispute; + Resolution resolution; + uint creator_rating; + uint signer_rating; + } + struct Conversation{ + string text; + address author; + uint time; + } + struct Person{ + address addr; + string avatar; + string profile; + uint exp ; + uint time; + uint rating; + uint rating_count; + } + struct Proof{ + string format; + string value; + uint time; + } + struct Resolution{ + address winner; + address loser; + string reason; + uint winning_percent; + uint losing_percent; + uint time; + } + address Owner; + address Supreme_Arbiter; + uint Contract_Id; + uint fee; + address[] Arbiter_Array; + address[] People_Array; + + mapping(address => Arbiter) Arbiters; + mapping(uint => Contract) Contracts; + mapping(address => Person) People; + mapping(address => uint[]) Read; + mapping(address => uint[]) Written; + function Ethcrow() + { + Owner = msg.sender; + Supreme_Arbiter = msg.sender; + fee = 999; + Arbiters[msg.sender] = Arbiter({karma:999,avatar:"http://goo.gl/WFHDTL",specialty:"Contract Management",profile:"Yo dawg, I heard you like Contracts",exp:999,arbiter:msg.sender}); + Arbiter_Array.push(msg.sender); + } + function (){throw;} + function add_arbiter(string ind,string img, string info) payable returns (int result) + { + if(msg.value < fee)throw; + if(Arbiters[msg.sender].arbiter != msg.sender) + { + Arbiter_Array.push(msg.sender); + } + Arbiters[msg.sender] = Arbiter({karma:Arbiters[msg.sender].karma,avatar:img,profile:info,specialty:ind,exp:Arbiters[msg.sender].exp,arbiter:msg.sender}); + Arbiter_Array.push(msg.sender); + return 0; + } + function add_person(string img, string info) payable returns (int result) + { + if(msg.value < fee)throw; + if(People[msg.sender].addr != msg.sender) + { + People_Array.push(msg.sender); + } + People[msg.sender] = Person({rating_count:People[msg.sender].rating_count,addr:msg.sender,rating:People[msg.sender].rating,avatar:img,profile:info,exp:People[msg.sender].exp,time:block.number}); + return 0; + } + function check_arbiter_1_2(address id) constant returns (uint exp,uint karma,string avatar,string profile) + { + return (Arbiters[id].exp,Arbiters[id].karma,Arbiters[id].avatar,Arbiters[id].profile); + } + function check_arbiter_2_2(address id) constant returns (address addr,string speciality) + { + return (Arbiters[id].arbiter,Arbiters[id].specialty); + } + function check_contracts_owned() constant returns(uint[] written,uint[] read) + { + return (Written[msg.sender],Read[msg.sender]); + } + function check_contract_1(uint id) constant returns (string description,string creator_pow,string signer_pow,uint value,address arbiter,address creator,address signer) + { + if(Contracts[id].arbiter != msg.sender && Contracts[id].signer != msg.sender && Contracts[id].creator != msg.sender) throw; + return (Contracts[id].desc,Contracts[id].creator_pow.value,Contracts[id].signer_pow.value,Contracts[id].value,Contracts[id].arbiter,Contracts[id].creator,Contracts[id].signer); + } + function check_contract_2(uint id) constant returns (bool creator_signed,bool signer_signed,bool is_arbiter,bool arbitration_ended,uint creator_rating,uint signer_rating) + { + if(Contracts[id].arbiter != msg.sender && Contracts[id].signer != msg.sender && Contracts[id].creator != msg.sender) throw; + return (Contracts[id].creator_signed,Contracts[id].signer_signed,Contracts[id].is_arbiter,Contracts[id].arbitration_ended,Contracts[id].creator_rating,Contracts[id].signer_rating); + } + function check_contract_3(uint id) constant returns (bool creator_completed,bool signer_completed,bool is_dispute,bool dispersed,uint dispute_legnth,uint creator_pow_time,uint signer_pow_time) + { + if(Contracts[id].arbiter != msg.sender && Contracts[id].signer != msg.sender && Contracts[id].creator != msg.sender) throw; + return (Contracts[id].creator_completed,Contracts[id].signer_completed,Contracts[id].is_dispute,Contracts[id].dispersed,Contracts[id].dispute.length,Contracts[id].creator_pow.time,Contracts[id].signer_pow.time); + } + function check_contract_4(uint id) constant returns (address winner, address loser, string reason, uint winning_percent,uint losing_percent,uint time) + { + if(Contracts[id].arbiter != msg.sender && Contracts[id].signer != msg.sender && Contracts[id].creator != msg.sender) throw; + return (Contracts[id].resolution.winner,Contracts[id].resolution.loser,Contracts[id].resolution.reason,Contracts[id].resolution.winning_percent,Contracts[id].resolution.losing_percent,Contracts[id].resolution.time); + } + function complete_contract(uint id,string proof,string ftype) returns (int result) + { + if(Contracts[id].dispersed == true || Contracts[id].signer != msg.sender && Contracts[id].creator != msg.sender) throw; + if(Contracts[id].creator == msg.sender) + { + Contracts[id].creator_completed = true; + Contracts[id].creator_pow = Proof({format:ftype,value:proof,time:block.number}); + } + if(Contracts[id].signer == msg.sender) + { + Contracts[id].signer_completed = true; + Contracts[id].signer_pow = Proof({format:ftype,value:proof,time:block.number}); + } + return 0; + } + function create_contract(string info,address signer,int arbiter_choice,address optional_arbiter) payable returns (int result) + { + if(msg.sender == optional_arbiter || msg.sender == signer) throw; + Contracts[block.number].desc = info; + Contracts[block.number].value = msg.value; + if(arbiter_choice == 0){Contracts[block.number].is_arbiter = true;Contracts[block.number].arbiter = Supreme_Arbiter;Read[Supreme_Arbiter].push(block.number);} + if(arbiter_choice == 1) + { + if(Arbiters[optional_arbiter].arbiter != optional_arbiter)throw; + Contracts[block.number].is_arbiter = true; + Read[optional_arbiter].push(block.number); + Contracts[block.number].arbiter = optional_arbiter; + } + Contracts[block.number].desc = info; + Contracts[block.number].creator = msg.sender; + Contracts[block.number].signer = signer; + Written[msg.sender].push(block.number); + Read[signer].push(block.number); + return 0; + } + function dispute(uint id,string disp) returns (int result) + { + if(Contracts[id].arbiter != msg.sender && Contracts[id].signer != msg.sender && Contracts[id].creator != msg.sender)throw; + if(Contracts[id].dispersed == true)throw; + if(Contracts[id].is_arbiter != true)throw; + if(!Contracts[id].is_dispute){Contracts[id].is_dispute = true;} + Contracts[id].dispute.push(Conversation({text:disp,author:msg.sender,time:block.number})); + return 0; + } + function get_arbiter() constant returns (address addr,string avatar, string profile,string specialty,uint exp,uint karma) + { + return (Arbiters[Supreme_Arbiter].arbiter,Arbiters[Supreme_Arbiter].avatar,Arbiters[Supreme_Arbiter].profile,Arbiters[Supreme_Arbiter].specialty,Arbiters[Supreme_Arbiter].exp,Arbiters[Supreme_Arbiter].karma); + } + function get_all_arbiters() constant returns (address[] arbiters) + { + return Arbiter_Array; + } + function get_all_people() constant returns(address[] people) + { + return People_Array; + } + function get_person(address id) constant returns (uint rating_count,uint rating, string avatar, string profile, uint exp) + { + return (People[id].rating_count,People[id].rating,People[id].avatar,People[id].profile,People[id].exp); + } + function kill_contract(uint id) returns (int result) + { + if(Contracts[id].creator != msg.sender || Contracts[id].signer_signed == true || Contracts[id].dispersed == true) throw; + Contracts[id].dispersed = true; + Contracts[id].creator_pow.value = "Contract KILLED!"; + msg.sender.transfer(Contracts[id].value); + return 0; + } + function rating(uint id,address user,uint star) returns (int result) + { + if(Contracts[id].signer != msg.sender && Contracts[id].creator != msg.sender)throw; + if(Contracts[id].signer != user && Contracts[id].creator != user)throw; + if(star < 1 || star > 5 || msg.sender == user || !Contracts[id].dispersed)throw; + if(msg.sender == Contracts[id].creator) + { + if(Contracts[id].signer_rating > 0)throw; + else + { + Contracts[id].signer_rating = star; + } + } + if(msg.sender == Contracts[id].signer) + { + if(Contracts[id].creator_rating > 0)throw; + else + { + Contracts[id].creator_rating = star; + } + } + People[user].rating_count++; + People[user].rating = People[user].rating + star; + People[user].exp++; + return 0; + } + function resolve(uint id,address winner,address loser,uint winning_percent,uint losing_percent,string reason) returns (int result) + { + if(Contracts[id].arbiter != msg.sender || Contracts[id].dispersed == true || Contracts[id].arbitration_ended == true) throw; + if((winning_percent + losing_percent) > 95)throw; + if(winning_percent < losing_percent)throw; + Contracts[id].arbitration_ended = true; + Contracts[id].resolution.winner = winner; + Contracts[id].resolution.loser = loser; + Contracts[id].resolution.winning_percent = winning_percent; + Contracts[id].resolution.losing_percent = losing_percent; + Contracts[id].resolution.time = block.number; + Contracts[id].resolution.reason = reason; + return 0; + } + function retract(uint id) returns (int result) + { + if(Contracts[id].creator != msg.sender || Contracts[id].signer_signed == true || Contracts[id].dispersed == true) throw; + Contracts[id].dispersed = true; + Contracts[id].creator.transfer(Contracts[id].value); + return 0; + } + function sign(uint id) returns (int result) + { + if(Contracts[id].signer != msg.sender && Contracts[id].creator != msg.sender && Contracts[id].arbiter != msg.sender)throw; + if(Contracts[id].dispersed == true)throw; + if(Contracts[id].creator == msg.sender){Contracts[id].creator_signed = true;} + if(Contracts[id].signer == msg.sender){Contracts[id].signer_signed = true;} + return 0; + } + function withdraw_karma(uint amount) returns (int result) + { + if(Arbiters[msg.sender].karma < amount) + throw; + Arbiters[msg.sender].karma = Arbiters[msg.sender].karma - amount; + Arbiters[msg.sender].arbiter.transfer(amount); + if(Supreme_Arbiter == msg.sender) + { + if(Arbiters[msg.sender].karma < Arbiters[Owner].karma) + { + Supreme_Arbiter = Owner; + } + } + return 0; + } + function withdraw_from_contract(uint id) returns (int result) + { + if(Contracts[id].dispersed == true) throw; + //disperse contract + if(!Contracts[id].is_arbiter) + { + if(Contracts[id].creator_signed && Contracts[id].signer_signed && Contracts[id].creator_completed && Contracts[id].signer_completed) + { + Contracts[id].dispersed = true; + Contracts[id].signer.transfer(Contracts[id].value * 999/1000); + } + return 0; + } + else + { + if(Contracts[id].is_dispute && !Contracts[id].arbitration_ended)throw; + if(!Contracts[id].is_dispute && Contracts[id].creator_signed && Contracts[id].signer_signed && Contracts[id].creator_completed && Contracts[id].signer_completed) + { + Contracts[id].dispersed = true; + Contracts[id].signer.transfer(Contracts[id].value * 99/100); + } + + if(Contracts[id].is_dispute && Contracts[id].arbitration_ended &&(Contracts[id].creator == Contracts[id].resolution.winner || Contracts[id].resolution.winner == Contracts[id].signer) ) + { + if((Contracts[id].resolution.winning_percent + Contracts[id].resolution.losing_percent) > 80)throw; + Arbiters[Contracts[id].arbiter].exp = Arbiters[Contracts[id].arbiter].exp +1; + var w_amount = (Contracts[id].value * Contracts[id].resolution.winning_percent)/100; + var l_amount = (Contracts[id].value * Contracts[id].resolution.losing_percent)/100; + Contracts[id].dispersed = true; + Contracts[id].resolution.winner.transfer(w_amount); + Contracts[id].resolution.loser.transfer(l_amount); + } + Arbiters[Contracts[id].arbiter].exp = Arbiters[Contracts[id].arbiter].exp + 1; + Arbiters[Contracts[id].arbiter].karma = Contracts[id].value/6; + if(Arbiters[Contracts[id].arbiter].karma > Arbiters[Supreme_Arbiter].karma) + { + if(Supreme_Arbiter != Arbiters[Contracts[id].arbiter].arbiter) + {Supreme_Arbiter = Arbiters[Contracts[id].arbiter].arbiter;} + } + return 0; + } + + } + function update_fee(uint new_fee) payable returns (int result) + { + if(msg.sender != Supreme_Arbiter)throw; + fee = new_fee; + return 0; + } + function view_dispute_text(uint id,uint idt) constant returns(uint time,address author,string text) + { + if(Contracts[id].arbiter != msg.sender && Contracts[id].signer != msg.sender && Contracts[id].creator != msg.sender) throw; + return (Contracts[id].dispute[idt].time,Contracts[id].dispute[idt].author,Contracts[id].dispute[idt].text); + } +} diff --git a/index.html b/index.html new file mode 100644 index 00000000..3cae86da --- /dev/null +++ b/index.html @@ -0,0 +1,80 @@ + + + + + + + + + + + ETHCROW + + + + + + + + + + +
    + +
    + + +
    +
    + + + + + + + + + diff --git a/new_contract.html b/new_contract.html new file mode 100644 index 00000000..6b8e39db --- /dev/null +++ b/new_contract.html @@ -0,0 +1,80 @@ +
    + + +
    +
    +
      +
    • +
      +
      +
      Description
      +
      + +
      +
      +
      +
    • +
    • +
    • +
      +
      +
      Value (Ether)
      +
      + +
      +
      +
      +
    • +
    • +
      +
      +
      Receiver Address
      +
      + +
      +
      +
      +
    • +
    • +
      +
      +
      Use Arbiter
      +
      + +
      +
      +
      +
    • +
    • +
      +
      +
      Arbiter Address
      +
      + +
      +
      +
      + +
    • +
    +
    + Submit +
    + +
    + diff --git a/profile.html b/profile.html new file mode 100644 index 00000000..82601fae --- /dev/null +++ b/profile.html @@ -0,0 +1,56 @@ +
    + +
    + +

    Address

    +

    Balance Ether

    +
    +
    + +

    +
    + +
    + Update Profile + +
    +
    + diff --git a/transactions.html b/transactions.html new file mode 100644 index 00000000..ea54ad90 --- /dev/null +++ b/transactions.html @@ -0,0 +1,16 @@ + + From 2070b8964614612e5aca349a2db8fe7d48d8b183 Mon Sep 17 00:00:00 2001 From: kemargrant Date: Sun, 11 Jun 2017 10:39:20 -0400 Subject: [PATCH 2/2] Add bower_components --- bower_components/bignumber.js/.bower.json | 44 + bower_components/bignumber.js/LICENCE | 23 + bower_components/bignumber.js/README.md | 401 + bower_components/bignumber.js/bignumber.js | 2734 +++ .../bignumber.js/bignumber.js.map | 1 + .../bignumber.js/bignumber.min.js | 3 + bower_components/bignumber.js/bower.json | 36 + bower_components/bignumber.js/doc/API.html | 2198 ++ bower_components/bignumber.js/perf/README.md | 48 + .../perf/bignumber-vs-bigdecimal.html | 701 + .../bignumber.js/perf/bigtime-OOM.js | 373 + bower_components/bignumber.js/perf/bigtime.js | 342 + .../perf/lib/bigdecimal_GWT/BigDecTest.class | Bin 0 -> 1275 bytes .../perf/lib/bigdecimal_GWT/BigDecTest.java | 60 + .../perf/lib/bigdecimal_GWT/LICENCE.txt | 205 + .../perf/lib/bigdecimal_GWT/bigdecimal.js | 592 + .../perf/lib/bigdecimal_GWT/bugs.js | 53 + .../bigdecimal_ICU4J/BigDecimal-all-last.js | 5724 +++++ .../BigDecimal-all-last.min.js | 61 + .../perf/lib/bigdecimal_ICU4J/LICENCE.txt | 30 + bower_components/blockies/.bower.json | 34 + bower_components/blockies/blockies.js | 108 + bower_components/blockies/blockies.min.js | 1 + bower_components/blockies/bower.json | 24 + bower_components/crypto-js/.bower.json | 44 + bower_components/crypto-js/CONTRIBUTING.md | 28 + bower_components/crypto-js/LICENSE | 24 + bower_components/crypto-js/README.md | 198 + bower_components/crypto-js/aes.js | 232 + bower_components/crypto-js/bower.json | 35 + bower_components/crypto-js/cipher-core.js | 880 + bower_components/crypto-js/core.js | 760 + bower_components/crypto-js/crypto-js.js | 5988 +++++ .../crypto-js/docs/QuickStartGuide.wiki | 470 + bower_components/crypto-js/enc-base64.js | 135 + bower_components/crypto-js/enc-hex.js | 18 + bower_components/crypto-js/enc-latin1.js | 18 + bower_components/crypto-js/enc-utf16.js | 149 + bower_components/crypto-js/enc-utf8.js | 18 + bower_components/crypto-js/evpkdf.js | 132 + bower_components/crypto-js/format-hex.js | 66 + bower_components/crypto-js/format-openssl.js | 18 + bower_components/crypto-js/hmac-md5.js | 18 + bower_components/crypto-js/hmac-ripemd160.js | 18 + bower_components/crypto-js/hmac-sha1.js | 18 + bower_components/crypto-js/hmac-sha224.js | 18 + bower_components/crypto-js/hmac-sha256.js | 18 + bower_components/crypto-js/hmac-sha3.js | 18 + bower_components/crypto-js/hmac-sha384.js | 18 + bower_components/crypto-js/hmac-sha512.js | 18 + bower_components/crypto-js/hmac.js | 143 + bower_components/crypto-js/index.js | 18 + bower_components/crypto-js/lib-typedarrays.js | 76 + bower_components/crypto-js/md5.js | 268 + bower_components/crypto-js/mode-cfb.js | 78 + .../crypto-js/mode-ctr-gladman.js | 116 + bower_components/crypto-js/mode-ctr.js | 58 + bower_components/crypto-js/mode-ecb.js | 40 + bower_components/crypto-js/mode-ofb.js | 54 + bower_components/crypto-js/package.json | 38 + bower_components/crypto-js/pad-ansix923.js | 49 + bower_components/crypto-js/pad-iso10126.js | 44 + bower_components/crypto-js/pad-iso97971.js | 40 + bower_components/crypto-js/pad-nopadding.js | 30 + bower_components/crypto-js/pad-pkcs7.js | 18 + bower_components/crypto-js/pad-zeropadding.js | 45 + bower_components/crypto-js/pbkdf2.js | 145 + bower_components/crypto-js/rabbit-legacy.js | 190 + bower_components/crypto-js/rabbit.js | 192 + bower_components/crypto-js/rc4.js | 139 + bower_components/crypto-js/ripemd160.js | 267 + bower_components/crypto-js/sha1.js | 150 + bower_components/crypto-js/sha224.js | 80 + bower_components/crypto-js/sha256.js | 199 + bower_components/crypto-js/sha3.js | 323 + bower_components/crypto-js/sha384.js | 83 + bower_components/crypto-js/sha512.js | 323 + bower_components/crypto-js/tripledes.js | 770 + bower_components/crypto-js/x64-core.js | 304 + bower_components/framework7/.bower.json | 62 + bower_components/framework7/CHANGELOG.md | 1292 ++ bower_components/framework7/LICENSE | 20 + bower_components/framework7/README.md | 121 + bower_components/framework7/backers.md | 71 + bower_components/framework7/bower.json | 30 + bower_components/framework7/composer.json | 40 + bower_components/framework7/dist/about.html | 28 + .../framework7/dist/css/framework7.css | 3326 +++ .../dist/css/framework7.ios.colors.css | 3232 +++ .../dist/css/framework7.ios.colors.min.css | 15 + .../framework7/dist/css/framework7.ios.css | 8348 +++++++ .../dist/css/framework7.ios.min.css | 15 + .../dist/css/framework7.ios.rtl.css | 718 + .../dist/css/framework7.ios.rtl.min.css | 15 + .../dist/css/framework7.material.colors.css | 8982 ++++++++ .../css/framework7.material.colors.min.css | 15 + .../dist/css/framework7.material.css | 8643 ++++++++ .../dist/css/framework7.material.min.css | 15 + .../dist/css/framework7.material.rtl.css | 678 + .../dist/css/framework7.material.rtl.min.css | 15 + .../framework7/dist/css/my-app.css | 0 bower_components/framework7/dist/form.html | 215 + .../framework7/dist/img/i-f7-ios.png | Bin 0 -> 7289 bytes .../framework7/dist/img/i-f7-material.png | Bin 0 -> 8995 bytes bower_components/framework7/dist/index.html | 103 + .../framework7/dist/js/framework7.js | 18381 ++++++++++++++++ .../framework7/dist/js/framework7.js.map | 1 + .../framework7/dist/js/framework7.min.js | 26 + .../framework7/dist/js/framework7.min.js.map | 1 + bower_components/framework7/dist/js/my-app.js | 48 + .../framework7/dist/services.html | 28 + .../examples/inline-pages/css/my-app.css | 34 + .../examples/inline-pages/index.html | 356 + .../examples/inline-pages/jade/index.jade | 280 + .../examples/inline-pages/js/my-app.js | 15 + .../examples/inline-pages/less/my-app.less | 35 + .../examples/split-view-panel/about.html | 20 + .../examples/split-view-panel/css/my-app.css | 17 + .../examples/split-view-panel/index.html | 134 + .../examples/split-view-panel/jade/about.jade | 18 + .../examples/split-view-panel/jade/index.jade | 105 + .../split-view-panel/jade/left-page-1.jade | 15 + .../split-view-panel/jade/left-page-2.jade | 15 + .../split-view-panel/jade/services.jade | 18 + .../examples/split-view-panel/js/my-app.js | 17 + .../split-view-panel/left-page-1.html | 19 + .../split-view-panel/left-page-2.html | 19 + .../split-view-panel/less/my-app.less | 19 + .../examples/split-view-panel/services.html | 20 + .../framework7/examples/split-view/about.html | 19 + .../examples/split-view/css/my-app.css | 23 + .../framework7/examples/split-view/index.html | 135 + .../examples/split-view/jade/about.jade | 15 + .../examples/split-view/jade/index.jade | 107 + .../examples/split-view/jade/left-page-1.jade | 15 + .../examples/split-view/jade/left-page-2.jade | 15 + .../examples/split-view/jade/services.jade | 15 + .../examples/split-view/js/my-app.js | 15 + .../examples/split-view/left-page-1.html | 19 + .../examples/split-view/left-page-2.html | 19 + .../examples/split-view/less/my-app.less | 23 + .../examples/split-view/services.html | 19 + .../framework7/examples/tab-bar/about.html | 19 + .../examples/tab-bar/css/my-app.css | 34 + .../framework7/examples/tab-bar/index.html | 238 + .../examples/tab-bar/jade/about.jade | 15 + .../examples/tab-bar/jade/index.jade | 189 + .../examples/tab-bar/jade/services.jade | 15 + .../framework7/examples/tab-bar/js/my-app.js | 15 + .../examples/tab-bar/less/my-app.less | 35 + .../framework7/examples/tab-bar/services.html | 19 + .../examples/template7-pages/car.html | 26 + .../examples/template7-pages/cars.html | 26 + .../examples/template7-pages/contacts.html | 20 + .../examples/template7-pages/css/my-app.css | 34 + .../examples/template7-pages/index.html | 116 + .../examples/template7-pages/jade/car.jade | 23 + .../examples/template7-pages/jade/cars.jade | 24 + .../template7-pages/jade/contacts.jade | 18 + .../examples/template7-pages/jade/index.jade | 104 + .../template7-pages/jade/projects.jade | 23 + .../examples/template7-pages/js/my-app.js | 101 + .../examples/template7-pages/less/my-app.less | 35 + .../examples/template7-pages/projects.html | 27 + bower_components/framework7/index.html | 140 + .../framework7/manifest-icons-ios.json | 779 + .../framework7/manifest-icons-material.json | 937 + bower_components/framework7/modules.json | 256 + .../framework7/src/img/i-f7-ios.png | Bin 0 -> 7289 bytes .../framework7/src/img/i-f7-material.png | Bin 0 -> 8995 bytes .../framework7/src/js/framework7/accordion.js | 60 + .../src/js/framework7/autocomplete.js | 666 + .../framework7/src/js/framework7/calendar.js | 998 + .../framework7/src/js/framework7/clicks.js | 342 + .../src/js/framework7/data-table.js | 80 + .../framework7/src/js/framework7/f7-intro.js | 184 + .../framework7/src/js/framework7/f7-outro.js | 6 + .../src/js/framework7/fast-clicks.js | 538 + .../src/js/framework7/forms-ajax.js | 36 + .../src/js/framework7/forms-storage.js | 166 + .../src/js/framework7/forms-textarea.js | 54 + .../src/js/framework7/infinite-scroll.js | 54 + .../framework7/src/js/framework7/init.js | 64 + .../framework7/src/js/framework7/lazy-load.js | 171 + .../src/js/framework7/material-inputs.js | 68 + .../src/js/framework7/material-preloader.js | 10 + .../src/js/framework7/material-tabbar.js | 48 + .../src/js/framework7/messagebar.js | 140 + .../framework7/src/js/framework7/messages.js | 233 + .../framework7/src/js/framework7/modals.js | 756 + .../framework7/src/js/framework7/navbars.js | 237 + .../src/js/framework7/notifications.js | 163 + .../framework7/src/js/framework7/pages.js | 350 + .../framework7/src/js/framework7/panels.js | 476 + .../src/js/framework7/photo-browser.js | 429 + .../framework7/src/js/framework7/picker.js | 621 + .../framework7/src/js/framework7/plugins.js | 40 + .../src/js/framework7/progressbar.js | 78 + .../src/js/framework7/proto-device.js | 112 + .../src/js/framework7/proto-plugins.js | 4 + .../src/js/framework7/proto-support.js | 23 + .../src/js/framework7/pull-to-refresh.js | 225 + .../src/js/framework7/push-state.js | 112 + .../framework7/src/js/framework7/resize.js | 49 + .../framework7/src/js/framework7/router.js | 1296 ++ .../src/js/framework7/scroll-toolbars.js | 117 + .../framework7/src/js/framework7/searchbar.js | 346 + .../src/js/framework7/smart-select.js | 541 + .../framework7/src/js/framework7/sortable.js | 130 + .../framework7/src/js/framework7/swipeout.js | 404 + .../src/js/framework7/swiper-init.js | 53 + .../framework7/src/js/framework7/tabs.js | 104 + .../src/js/framework7/template7-templates.js | 21 + .../framework7/src/js/framework7/views.js | 682 + .../src/js/framework7/virtual-list.js | 513 + .../framework7/src/js/framework7/xhr.js | 65 + .../framework7/src/js/swiper/swiper.js | 4050 ++++ .../framework7/src/js/wrap-end.js | 1 + .../framework7/src/js/wrap-start.js | 1 + .../framework7/src/less/ios/_colors-vars.less | 12 + .../framework7/src/less/ios/_mixins.less | 302 + .../framework7/src/less/ios/accordion.less | 72 + .../framework7/src/less/ios/autocomplete.less | 80 + .../framework7/src/less/ios/badges.less | 28 + .../framework7/src/less/ios/calendar.less | 188 + .../framework7/src/less/ios/cards.less | 102 + .../framework7/src/less/ios/chips.less | 74 + .../framework7/src/less/ios/contacts.less | 24 + .../src/less/ios/content-block.less | 59 + .../framework7/src/less/ios/data-table.less | 290 + .../framework7/src/less/ios/disabled.less | 8 + .../src/less/ios/floating-button.less | 172 + .../framework7/src/less/ios/forms.less | 474 + .../src/less/ios/framework7.ios.colors.less | 742 + .../src/less/ios/framework7.ios.less | 40 + .../src/less/ios/framework7.ios.rtl.less | 473 + .../framework7/src/less/ios/grid.less | 87 + .../framework7/src/less/ios/icons.less | 76 + .../src/less/ios/infinite-scroll.less | 5 + .../framework7/src/less/ios/intro.less | 49 + .../framework7/src/less/ios/lazy-load.less | 20 + .../framework7/src/less/ios/lists.less | 426 + .../framework7/src/less/ios/login-screen.less | 20 + .../framework7/src/less/ios/messagebar.less | 53 + .../framework7/src/less/ios/messages.less | 255 + .../framework7/src/less/ios/modals.less | 613 + .../src/less/ios/notifications.less | 159 + .../framework7/src/less/ios/pages.less | 266 + .../framework7/src/less/ios/panels.less | 122 + .../src/less/ios/photo-browser.less | 247 + .../framework7/src/less/ios/picker.less | 114 + .../framework7/src/less/ios/preloader.less | 22 + .../framework7/src/less/ios/progressbar.less | 158 + .../src/less/ios/pull-to-refresh.less | 71 + .../framework7/src/less/ios/searchbar.less | 124 + .../framework7/src/less/ios/statusbar.less | 22 + .../framework7/src/less/ios/swiper.less | 466 + .../framework7/src/less/ios/tabs.less | 34 + .../framework7/src/less/ios/timeline.less | 294 + .../src/less/ios/toolbars-pages.less | 91 + .../framework7/src/less/ios/toolbars.less | 385 + .../framework7/src/less/ios/views.less | 14 + .../src/less/material/_colors-vars.less | 24 + .../src/less/material/_dark-colors-vars.less | 22 + .../framework7/src/less/material/_mixins.less | 352 + .../src/less/material/accordion.less | 70 + .../src/less/material/autocomplete.less | 70 + .../framework7/src/less/material/badges.less | 20 + .../src/less/material/calendar.less | 197 + .../framework7/src/less/material/cards.less | 94 + .../framework7/src/less/material/chips.less | 71 + .../src/less/material/contacts.less | 30 + .../src/less/material/content-block.less | 63 + .../src/less/material/data-table.less | 301 + .../src/less/material/disabled.less | 8 + .../src/less/material/floating-button.less | 153 + .../framework7/src/less/material/forms.less | 517 + .../material/framework7.material.colors.less | 640 + .../less/material/framework7.material.less | 42 + .../material/framework7.material.rtl.less | 339 + .../framework7/src/less/material/grid.less | 87 + .../framework7/src/less/material/icons.less | 59 + .../src/less/material/infinite-scroll.less | 5 + .../framework7/src/less/material/intro.less | 37 + .../src/less/material/lazy-load.less | 20 + .../framework7/src/less/material/lists.less | 415 + .../src/less/material/login-screen.less | 23 + .../src/less/material/messagebar.less | 56 + .../src/less/material/messages.less | 206 + .../framework7/src/less/material/modals.less | 581 + .../src/less/material/notifications.less | 75 + .../framework7/src/less/material/pages.less | 137 + .../framework7/src/less/material/panels.less | 130 + .../src/less/material/photo-browser.less | 258 + .../framework7/src/less/material/picker.less | 117 + .../src/less/material/preloader.less | 346 + .../src/less/material/progressbar.less | 296 + .../src/less/material/pull-to-refresh.less | 69 + .../framework7/src/less/material/ripple.less | 53 + .../src/less/material/searchbar.less | 125 + .../src/less/material/statusbar.less | 31 + .../framework7/src/less/material/swiper.less | 466 + .../framework7/src/less/material/tabs.less | 34 + .../src/less/material/timeline.less | 273 + .../src/less/material/toolbars-pages.less | 212 + .../src/less/material/toolbars.less | 296 + .../framework7/src/less/material/views.less | 14 + .../framework7/src/my-app/my-app.css | 0 .../framework7/src/my-app/my-app.js | 48 + .../framework7/src/templates/about.jade | 28 + .../framework7/src/templates/form.jade | 139 + .../framework7/src/templates/index.jade | 88 + .../framework7/src/templates/services.jade | 28 + bower_components/web3/.bower.json | 72 + bower_components/web3/LICENSE | 14 + bower_components/web3/README.md | 119 + bower_components/web3/bower.json | 62 + bower_components/web3/circle.yml | 3 + bower_components/web3/dist/web3-light.js | 13557 ++++++++++++ bower_components/web3/dist/web3-light.min.js | 4 + bower_components/web3/dist/web3.js | 16285 ++++++++++++++ bower_components/web3/dist/web3.js.map | 187 + bower_components/web3/dist/web3.min.js | 5 + bower_components/web3/package-init.js | 17 + bower_components/web3/styleguide.md | 1741 ++ bower_components/web3/test/async.js | 78 + bower_components/web3/test/batch.js | 202 + .../web3/test/bloom.testAddress.js | 18 + bower_components/web3/test/bloom.testTopic.js | 20 + .../web3/test/coder.decodeParam.js | 377 + .../web3/test/coder.encodeParam.js | 352 + bower_components/web3/test/contract.js | 614 + bower_components/web3/test/errors.js | 17 + bower_components/web3/test/event.decode.js | 183 + bower_components/web3/test/event.encode.js | 237 + .../test/formatters.inputAddressFormatter.js | 42 + .../formatters.inputDefaultBlockFormatter.js | 24 + .../test/formatters.inputPostFormatter.js | 30 + .../formatters.inputTransactionFormatter.js | 97 + .../test/formatters.outputBlockFormatter.js | 81 + .../test/formatters.outputLogFormatter.js | 47 + .../test/formatters.outputPostFormatter.js | 26 + .../formatters.outputTransactionFormatter.js | 61 + .../web3/test/helpers/FakeHttpProvider.js | 107 + .../web3/test/helpers/FakeHttpProvider2.js | 37 + .../web3/test/helpers/FakeIpcRequest.js | 40 + .../web3/test/helpers/FakeQtNavigator.js | 11 + .../web3/test/helpers/FakeXHR2.js | 37 + .../web3/test/helpers/FakeXMLHttpRequest.js | 38 + .../web3/test/helpers/test.method.js | 80 + .../web3/test/helpers/test.utils.js | 26 + bower_components/web3/test/httpprovider.js | 42 + .../web3/test/iban.createIndirect.js | 21 + .../web3/test/iban.fromAddress.js | 22 + bower_components/web3/test/iban.isValid.js | 35 + bower_components/web3/test/iban.toAddress.js | 19 + bower_components/web3/test/ipcprovider.js | 59 + bower_components/web3/test/jsonrpc.id.js | 21 + .../web3/test/jsonrpc.isValidResponse.js | 143 + .../web3/test/jsonrpc.toBatchPayload.js | 47 + .../web3/test/jsonrpc.toPayload.js | 41 + .../web3/test/method.extractCallback.js | 52 + .../web3/test/method.formatInput.js | 41 + .../web3/test/method.formatOutput.js | 43 + bower_components/web3/test/method.getCall.js | 46 + .../web3/test/method.validateArgs.js | 46 + bower_components/web3/test/mocha.opts | 1 + bower_components/web3/test/node/app.js | 5 + bower_components/web3/test/polling.js | 125 + bower_components/web3/test/requestmanager.js | 42 + bower_components/web3/test/sha3.js | 19 + .../test/soldity.formatters.formatInputInt.js | 21 + .../web3/test/utils.extractDisplayName.js | 42 + .../web3/test/utils.extractTypeName.js | 55 + bower_components/web3/test/utils.fromAscii.js | 21 + .../web3/test/utils.fromDecimal.js | 43 + bower_components/web3/test/utils.fromUtf8.js | 20 + bower_components/web3/test/utils.fromWei.js | 22 + bower_components/web3/test/utils.isAddress.js | 23 + .../web3/test/utils.isBigNumber.js | 26 + .../web3/test/utils.isChecksumAddress.js | 27 + .../web3/test/utils.isFunction.js | 21 + bower_components/web3/test/utils.isJson.js | 26 + .../web3/test/utils.isStrictAddress.js | 23 + bower_components/web3/test/utils.isString.js | 22 + bower_components/web3/test/utils.toAscii.js | 21 + .../web3/test/utils.toBigNumber.js | 45 + bower_components/web3/test/utils.toDecimal.js | 14 + bower_components/web3/test/utils.toHex.js | 46 + bower_components/web3/test/utils.toUtf8.js | 20 + bower_components/web3/test/utils.toWei.js | 37 + bower_components/web3/test/web3.db.getHex.js | 14 + .../web3/test/web3.db.getString.js | 15 + bower_components/web3/test/web3.db.methods.js | 15 + bower_components/web3/test/web3.db.putHex.js | 16 + .../web3/test/web3.db.putString.js | 16 + .../web3/test/web3.eth.accounts.js | 39 + .../web3/test/web3.eth.blockNumber.js | 59 + bower_components/web3/test/web3.eth.call.js | 40 + .../web3/test/web3.eth.coinbase.js | 39 + .../web3/test/web3.eth.contract.js | 250 + .../web3/test/web3.eth.defaultBlock.js | 13 + .../web3/test/web3.eth.estimateGas.js | 25 + bower_components/web3/test/web3.eth.filter.js | 119 + .../web3/test/web3.eth.gasPrice.js | 40 + .../web3/test/web3.eth.getBalance.js | 71 + .../web3/test/web3.eth.getBlock.js | 136 + .../test/web3.eth.getBlockTransactionCount.js | 29 + .../web3/test/web3.eth.getBlockUncleCount.js | 27 + .../web3/test/web3.eth.getCode.js | 24 + .../web3/test/web3.eth.getCompilers.js | 23 + .../web3/test/web3.eth.getStorageAt.js | 36 + .../web3/test/web3.eth.getTransaction.js | 44 + .../test/web3.eth.getTransactionFromBlock.js | 52 + .../test/web3.eth.getTransactionReceipt.js | 70 + .../web3/test/web3.eth.getUncle.js | 136 + .../web3/test/web3.eth.getWork.js | 16 + .../web3/test/web3.eth.hashRate.js | 43 + .../web3/test/web3.eth.isSyncing.js | 77 + .../web3/test/web3.eth.methods.js | 36 + bower_components/web3/test/web3.eth.mining.js | 39 + .../web3/test/web3.eth.protocolVersion.js | 37 + .../web3/test/web3.eth.sendIBANTransaction.js | 49 + .../web3/test/web3.eth.submitWork.js | 17 + bower_components/web3/test/web3.extend.js | 77 + bower_components/web3/test/web3.fromICAP.js | 19 + bower_components/web3/test/web3.methods.js | 25 + .../web3/test/web3.net.listening.js | 39 + .../web3/test/web3.net.methods.js | 12 + .../web3/test/web3.net.peerCount.js | 39 + .../web3/test/web3.personal.listAccounts.js | 38 + .../web3/test/web3.personal.methods.js | 13 + .../web3/test/web3.personal.newAccount.js | 15 + .../web3/test/web3.personal.unlockAccount.js | 21 + bower_components/web3/test/web3.sha3.js | 20 + bower_components/web3/test/web3.shh.filter.js | 85 + .../web3/test/web3.shh.hasIdentity.js | 16 + .../web3/test/web3.shh.methods.js | 17 + bower_components/web3/test/web3.shh.post.js | 50 + 439 files changed, 156336 insertions(+) create mode 100644 bower_components/bignumber.js/.bower.json create mode 100644 bower_components/bignumber.js/LICENCE create mode 100644 bower_components/bignumber.js/README.md create mode 100644 bower_components/bignumber.js/bignumber.js create mode 100644 bower_components/bignumber.js/bignumber.js.map create mode 100644 bower_components/bignumber.js/bignumber.min.js create mode 100644 bower_components/bignumber.js/bower.json create mode 100644 bower_components/bignumber.js/doc/API.html create mode 100644 bower_components/bignumber.js/perf/README.md create mode 100644 bower_components/bignumber.js/perf/bignumber-vs-bigdecimal.html create mode 100644 bower_components/bignumber.js/perf/bigtime-OOM.js create mode 100644 bower_components/bignumber.js/perf/bigtime.js create mode 100644 bower_components/bignumber.js/perf/lib/bigdecimal_GWT/BigDecTest.class create mode 100644 bower_components/bignumber.js/perf/lib/bigdecimal_GWT/BigDecTest.java create mode 100644 bower_components/bignumber.js/perf/lib/bigdecimal_GWT/LICENCE.txt create mode 100644 bower_components/bignumber.js/perf/lib/bigdecimal_GWT/bigdecimal.js create mode 100644 bower_components/bignumber.js/perf/lib/bigdecimal_GWT/bugs.js create mode 100644 bower_components/bignumber.js/perf/lib/bigdecimal_ICU4J/BigDecimal-all-last.js create mode 100644 bower_components/bignumber.js/perf/lib/bigdecimal_ICU4J/BigDecimal-all-last.min.js create mode 100644 bower_components/bignumber.js/perf/lib/bigdecimal_ICU4J/LICENCE.txt create mode 100644 bower_components/blockies/.bower.json create mode 100644 bower_components/blockies/blockies.js create mode 100644 bower_components/blockies/blockies.min.js create mode 100644 bower_components/blockies/bower.json create mode 100644 bower_components/crypto-js/.bower.json create mode 100644 bower_components/crypto-js/CONTRIBUTING.md create mode 100644 bower_components/crypto-js/LICENSE create mode 100644 bower_components/crypto-js/README.md create mode 100644 bower_components/crypto-js/aes.js create mode 100644 bower_components/crypto-js/bower.json create mode 100644 bower_components/crypto-js/cipher-core.js create mode 100644 bower_components/crypto-js/core.js create mode 100644 bower_components/crypto-js/crypto-js.js create mode 100644 bower_components/crypto-js/docs/QuickStartGuide.wiki create mode 100644 bower_components/crypto-js/enc-base64.js create mode 100644 bower_components/crypto-js/enc-hex.js create mode 100644 bower_components/crypto-js/enc-latin1.js create mode 100644 bower_components/crypto-js/enc-utf16.js create mode 100644 bower_components/crypto-js/enc-utf8.js create mode 100644 bower_components/crypto-js/evpkdf.js create mode 100644 bower_components/crypto-js/format-hex.js create mode 100644 bower_components/crypto-js/format-openssl.js create mode 100644 bower_components/crypto-js/hmac-md5.js create mode 100644 bower_components/crypto-js/hmac-ripemd160.js create mode 100644 bower_components/crypto-js/hmac-sha1.js create mode 100644 bower_components/crypto-js/hmac-sha224.js create mode 100644 bower_components/crypto-js/hmac-sha256.js create mode 100644 bower_components/crypto-js/hmac-sha3.js create mode 100644 bower_components/crypto-js/hmac-sha384.js create mode 100644 bower_components/crypto-js/hmac-sha512.js create mode 100644 bower_components/crypto-js/hmac.js create mode 100644 bower_components/crypto-js/index.js create mode 100644 bower_components/crypto-js/lib-typedarrays.js create mode 100644 bower_components/crypto-js/md5.js create mode 100644 bower_components/crypto-js/mode-cfb.js create mode 100644 bower_components/crypto-js/mode-ctr-gladman.js create mode 100644 bower_components/crypto-js/mode-ctr.js create mode 100644 bower_components/crypto-js/mode-ecb.js create mode 100644 bower_components/crypto-js/mode-ofb.js create mode 100644 bower_components/crypto-js/package.json create mode 100644 bower_components/crypto-js/pad-ansix923.js create mode 100644 bower_components/crypto-js/pad-iso10126.js create mode 100644 bower_components/crypto-js/pad-iso97971.js create mode 100644 bower_components/crypto-js/pad-nopadding.js create mode 100644 bower_components/crypto-js/pad-pkcs7.js create mode 100644 bower_components/crypto-js/pad-zeropadding.js create mode 100644 bower_components/crypto-js/pbkdf2.js create mode 100644 bower_components/crypto-js/rabbit-legacy.js create mode 100644 bower_components/crypto-js/rabbit.js create mode 100644 bower_components/crypto-js/rc4.js create mode 100644 bower_components/crypto-js/ripemd160.js create mode 100644 bower_components/crypto-js/sha1.js create mode 100644 bower_components/crypto-js/sha224.js create mode 100644 bower_components/crypto-js/sha256.js create mode 100644 bower_components/crypto-js/sha3.js create mode 100644 bower_components/crypto-js/sha384.js create mode 100644 bower_components/crypto-js/sha512.js create mode 100644 bower_components/crypto-js/tripledes.js create mode 100644 bower_components/crypto-js/x64-core.js create mode 100644 bower_components/framework7/.bower.json create mode 100644 bower_components/framework7/CHANGELOG.md create mode 100644 bower_components/framework7/LICENSE create mode 100644 bower_components/framework7/README.md create mode 100644 bower_components/framework7/backers.md create mode 100644 bower_components/framework7/bower.json create mode 100644 bower_components/framework7/composer.json create mode 100644 bower_components/framework7/dist/about.html create mode 100644 bower_components/framework7/dist/css/framework7.css create mode 100644 bower_components/framework7/dist/css/framework7.ios.colors.css create mode 100644 bower_components/framework7/dist/css/framework7.ios.colors.min.css create mode 100644 bower_components/framework7/dist/css/framework7.ios.css create mode 100644 bower_components/framework7/dist/css/framework7.ios.min.css create mode 100644 bower_components/framework7/dist/css/framework7.ios.rtl.css create mode 100644 bower_components/framework7/dist/css/framework7.ios.rtl.min.css create mode 100644 bower_components/framework7/dist/css/framework7.material.colors.css create mode 100644 bower_components/framework7/dist/css/framework7.material.colors.min.css create mode 100644 bower_components/framework7/dist/css/framework7.material.css create mode 100644 bower_components/framework7/dist/css/framework7.material.min.css create mode 100644 bower_components/framework7/dist/css/framework7.material.rtl.css create mode 100644 bower_components/framework7/dist/css/framework7.material.rtl.min.css rename examples/comebacklater => bower_components/framework7/dist/css/my-app.css (100%) create mode 100644 bower_components/framework7/dist/form.html create mode 100644 bower_components/framework7/dist/img/i-f7-ios.png create mode 100644 bower_components/framework7/dist/img/i-f7-material.png create mode 100644 bower_components/framework7/dist/index.html create mode 100644 bower_components/framework7/dist/js/framework7.js create mode 100644 bower_components/framework7/dist/js/framework7.js.map create mode 100644 bower_components/framework7/dist/js/framework7.min.js create mode 100644 bower_components/framework7/dist/js/framework7.min.js.map create mode 100644 bower_components/framework7/dist/js/my-app.js create mode 100644 bower_components/framework7/dist/services.html create mode 100644 bower_components/framework7/examples/inline-pages/css/my-app.css create mode 100644 bower_components/framework7/examples/inline-pages/index.html create mode 100644 bower_components/framework7/examples/inline-pages/jade/index.jade create mode 100644 bower_components/framework7/examples/inline-pages/js/my-app.js create mode 100644 bower_components/framework7/examples/inline-pages/less/my-app.less create mode 100644 bower_components/framework7/examples/split-view-panel/about.html create mode 100644 bower_components/framework7/examples/split-view-panel/css/my-app.css create mode 100644 bower_components/framework7/examples/split-view-panel/index.html create mode 100644 bower_components/framework7/examples/split-view-panel/jade/about.jade create mode 100644 bower_components/framework7/examples/split-view-panel/jade/index.jade create mode 100644 bower_components/framework7/examples/split-view-panel/jade/left-page-1.jade create mode 100644 bower_components/framework7/examples/split-view-panel/jade/left-page-2.jade create mode 100644 bower_components/framework7/examples/split-view-panel/jade/services.jade create mode 100644 bower_components/framework7/examples/split-view-panel/js/my-app.js create mode 100644 bower_components/framework7/examples/split-view-panel/left-page-1.html create mode 100644 bower_components/framework7/examples/split-view-panel/left-page-2.html create mode 100644 bower_components/framework7/examples/split-view-panel/less/my-app.less create mode 100644 bower_components/framework7/examples/split-view-panel/services.html create mode 100644 bower_components/framework7/examples/split-view/about.html create mode 100644 bower_components/framework7/examples/split-view/css/my-app.css create mode 100644 bower_components/framework7/examples/split-view/index.html create mode 100644 bower_components/framework7/examples/split-view/jade/about.jade create mode 100644 bower_components/framework7/examples/split-view/jade/index.jade create mode 100644 bower_components/framework7/examples/split-view/jade/left-page-1.jade create mode 100644 bower_components/framework7/examples/split-view/jade/left-page-2.jade create mode 100644 bower_components/framework7/examples/split-view/jade/services.jade create mode 100644 bower_components/framework7/examples/split-view/js/my-app.js create mode 100644 bower_components/framework7/examples/split-view/left-page-1.html create mode 100644 bower_components/framework7/examples/split-view/left-page-2.html create mode 100644 bower_components/framework7/examples/split-view/less/my-app.less create mode 100644 bower_components/framework7/examples/split-view/services.html create mode 100644 bower_components/framework7/examples/tab-bar/about.html create mode 100644 bower_components/framework7/examples/tab-bar/css/my-app.css create mode 100644 bower_components/framework7/examples/tab-bar/index.html create mode 100644 bower_components/framework7/examples/tab-bar/jade/about.jade create mode 100644 bower_components/framework7/examples/tab-bar/jade/index.jade create mode 100644 bower_components/framework7/examples/tab-bar/jade/services.jade create mode 100644 bower_components/framework7/examples/tab-bar/js/my-app.js create mode 100644 bower_components/framework7/examples/tab-bar/less/my-app.less create mode 100644 bower_components/framework7/examples/tab-bar/services.html create mode 100644 bower_components/framework7/examples/template7-pages/car.html create mode 100644 bower_components/framework7/examples/template7-pages/cars.html create mode 100644 bower_components/framework7/examples/template7-pages/contacts.html create mode 100644 bower_components/framework7/examples/template7-pages/css/my-app.css create mode 100644 bower_components/framework7/examples/template7-pages/index.html create mode 100644 bower_components/framework7/examples/template7-pages/jade/car.jade create mode 100644 bower_components/framework7/examples/template7-pages/jade/cars.jade create mode 100644 bower_components/framework7/examples/template7-pages/jade/contacts.jade create mode 100644 bower_components/framework7/examples/template7-pages/jade/index.jade create mode 100644 bower_components/framework7/examples/template7-pages/jade/projects.jade create mode 100644 bower_components/framework7/examples/template7-pages/js/my-app.js create mode 100644 bower_components/framework7/examples/template7-pages/less/my-app.less create mode 100644 bower_components/framework7/examples/template7-pages/projects.html create mode 100644 bower_components/framework7/index.html create mode 100644 bower_components/framework7/manifest-icons-ios.json create mode 100644 bower_components/framework7/manifest-icons-material.json create mode 100644 bower_components/framework7/modules.json create mode 100644 bower_components/framework7/src/img/i-f7-ios.png create mode 100644 bower_components/framework7/src/img/i-f7-material.png create mode 100644 bower_components/framework7/src/js/framework7/accordion.js create mode 100644 bower_components/framework7/src/js/framework7/autocomplete.js create mode 100644 bower_components/framework7/src/js/framework7/calendar.js create mode 100644 bower_components/framework7/src/js/framework7/clicks.js create mode 100644 bower_components/framework7/src/js/framework7/data-table.js create mode 100644 bower_components/framework7/src/js/framework7/f7-intro.js create mode 100644 bower_components/framework7/src/js/framework7/f7-outro.js create mode 100644 bower_components/framework7/src/js/framework7/fast-clicks.js create mode 100644 bower_components/framework7/src/js/framework7/forms-ajax.js create mode 100644 bower_components/framework7/src/js/framework7/forms-storage.js create mode 100644 bower_components/framework7/src/js/framework7/forms-textarea.js create mode 100644 bower_components/framework7/src/js/framework7/infinite-scroll.js create mode 100644 bower_components/framework7/src/js/framework7/init.js create mode 100644 bower_components/framework7/src/js/framework7/lazy-load.js create mode 100644 bower_components/framework7/src/js/framework7/material-inputs.js create mode 100644 bower_components/framework7/src/js/framework7/material-preloader.js create mode 100644 bower_components/framework7/src/js/framework7/material-tabbar.js create mode 100644 bower_components/framework7/src/js/framework7/messagebar.js create mode 100644 bower_components/framework7/src/js/framework7/messages.js create mode 100644 bower_components/framework7/src/js/framework7/modals.js create mode 100644 bower_components/framework7/src/js/framework7/navbars.js create mode 100644 bower_components/framework7/src/js/framework7/notifications.js create mode 100644 bower_components/framework7/src/js/framework7/pages.js create mode 100644 bower_components/framework7/src/js/framework7/panels.js create mode 100644 bower_components/framework7/src/js/framework7/photo-browser.js create mode 100644 bower_components/framework7/src/js/framework7/picker.js create mode 100644 bower_components/framework7/src/js/framework7/plugins.js create mode 100644 bower_components/framework7/src/js/framework7/progressbar.js create mode 100644 bower_components/framework7/src/js/framework7/proto-device.js create mode 100644 bower_components/framework7/src/js/framework7/proto-plugins.js create mode 100644 bower_components/framework7/src/js/framework7/proto-support.js create mode 100644 bower_components/framework7/src/js/framework7/pull-to-refresh.js create mode 100644 bower_components/framework7/src/js/framework7/push-state.js create mode 100644 bower_components/framework7/src/js/framework7/resize.js create mode 100644 bower_components/framework7/src/js/framework7/router.js create mode 100644 bower_components/framework7/src/js/framework7/scroll-toolbars.js create mode 100644 bower_components/framework7/src/js/framework7/searchbar.js create mode 100644 bower_components/framework7/src/js/framework7/smart-select.js create mode 100644 bower_components/framework7/src/js/framework7/sortable.js create mode 100644 bower_components/framework7/src/js/framework7/swipeout.js create mode 100644 bower_components/framework7/src/js/framework7/swiper-init.js create mode 100644 bower_components/framework7/src/js/framework7/tabs.js create mode 100644 bower_components/framework7/src/js/framework7/template7-templates.js create mode 100644 bower_components/framework7/src/js/framework7/views.js create mode 100644 bower_components/framework7/src/js/framework7/virtual-list.js create mode 100644 bower_components/framework7/src/js/framework7/xhr.js create mode 100644 bower_components/framework7/src/js/swiper/swiper.js create mode 100644 bower_components/framework7/src/js/wrap-end.js create mode 100644 bower_components/framework7/src/js/wrap-start.js create mode 100644 bower_components/framework7/src/less/ios/_colors-vars.less create mode 100644 bower_components/framework7/src/less/ios/_mixins.less create mode 100644 bower_components/framework7/src/less/ios/accordion.less create mode 100644 bower_components/framework7/src/less/ios/autocomplete.less create mode 100644 bower_components/framework7/src/less/ios/badges.less create mode 100644 bower_components/framework7/src/less/ios/calendar.less create mode 100644 bower_components/framework7/src/less/ios/cards.less create mode 100644 bower_components/framework7/src/less/ios/chips.less create mode 100644 bower_components/framework7/src/less/ios/contacts.less create mode 100644 bower_components/framework7/src/less/ios/content-block.less create mode 100644 bower_components/framework7/src/less/ios/data-table.less create mode 100644 bower_components/framework7/src/less/ios/disabled.less create mode 100644 bower_components/framework7/src/less/ios/floating-button.less create mode 100644 bower_components/framework7/src/less/ios/forms.less create mode 100644 bower_components/framework7/src/less/ios/framework7.ios.colors.less create mode 100644 bower_components/framework7/src/less/ios/framework7.ios.less create mode 100644 bower_components/framework7/src/less/ios/framework7.ios.rtl.less create mode 100644 bower_components/framework7/src/less/ios/grid.less create mode 100644 bower_components/framework7/src/less/ios/icons.less create mode 100644 bower_components/framework7/src/less/ios/infinite-scroll.less create mode 100644 bower_components/framework7/src/less/ios/intro.less create mode 100644 bower_components/framework7/src/less/ios/lazy-load.less create mode 100644 bower_components/framework7/src/less/ios/lists.less create mode 100644 bower_components/framework7/src/less/ios/login-screen.less create mode 100644 bower_components/framework7/src/less/ios/messagebar.less create mode 100644 bower_components/framework7/src/less/ios/messages.less create mode 100644 bower_components/framework7/src/less/ios/modals.less create mode 100644 bower_components/framework7/src/less/ios/notifications.less create mode 100644 bower_components/framework7/src/less/ios/pages.less create mode 100644 bower_components/framework7/src/less/ios/panels.less create mode 100644 bower_components/framework7/src/less/ios/photo-browser.less create mode 100644 bower_components/framework7/src/less/ios/picker.less create mode 100644 bower_components/framework7/src/less/ios/preloader.less create mode 100644 bower_components/framework7/src/less/ios/progressbar.less create mode 100644 bower_components/framework7/src/less/ios/pull-to-refresh.less create mode 100644 bower_components/framework7/src/less/ios/searchbar.less create mode 100644 bower_components/framework7/src/less/ios/statusbar.less create mode 100644 bower_components/framework7/src/less/ios/swiper.less create mode 100644 bower_components/framework7/src/less/ios/tabs.less create mode 100644 bower_components/framework7/src/less/ios/timeline.less create mode 100644 bower_components/framework7/src/less/ios/toolbars-pages.less create mode 100644 bower_components/framework7/src/less/ios/toolbars.less create mode 100644 bower_components/framework7/src/less/ios/views.less create mode 100644 bower_components/framework7/src/less/material/_colors-vars.less create mode 100644 bower_components/framework7/src/less/material/_dark-colors-vars.less create mode 100644 bower_components/framework7/src/less/material/_mixins.less create mode 100644 bower_components/framework7/src/less/material/accordion.less create mode 100644 bower_components/framework7/src/less/material/autocomplete.less create mode 100644 bower_components/framework7/src/less/material/badges.less create mode 100644 bower_components/framework7/src/less/material/calendar.less create mode 100644 bower_components/framework7/src/less/material/cards.less create mode 100644 bower_components/framework7/src/less/material/chips.less create mode 100644 bower_components/framework7/src/less/material/contacts.less create mode 100644 bower_components/framework7/src/less/material/content-block.less create mode 100644 bower_components/framework7/src/less/material/data-table.less create mode 100644 bower_components/framework7/src/less/material/disabled.less create mode 100644 bower_components/framework7/src/less/material/floating-button.less create mode 100644 bower_components/framework7/src/less/material/forms.less create mode 100644 bower_components/framework7/src/less/material/framework7.material.colors.less create mode 100644 bower_components/framework7/src/less/material/framework7.material.less create mode 100644 bower_components/framework7/src/less/material/framework7.material.rtl.less create mode 100644 bower_components/framework7/src/less/material/grid.less create mode 100644 bower_components/framework7/src/less/material/icons.less create mode 100644 bower_components/framework7/src/less/material/infinite-scroll.less create mode 100644 bower_components/framework7/src/less/material/intro.less create mode 100644 bower_components/framework7/src/less/material/lazy-load.less create mode 100644 bower_components/framework7/src/less/material/lists.less create mode 100644 bower_components/framework7/src/less/material/login-screen.less create mode 100644 bower_components/framework7/src/less/material/messagebar.less create mode 100644 bower_components/framework7/src/less/material/messages.less create mode 100644 bower_components/framework7/src/less/material/modals.less create mode 100644 bower_components/framework7/src/less/material/notifications.less create mode 100644 bower_components/framework7/src/less/material/pages.less create mode 100644 bower_components/framework7/src/less/material/panels.less create mode 100644 bower_components/framework7/src/less/material/photo-browser.less create mode 100644 bower_components/framework7/src/less/material/picker.less create mode 100644 bower_components/framework7/src/less/material/preloader.less create mode 100644 bower_components/framework7/src/less/material/progressbar.less create mode 100644 bower_components/framework7/src/less/material/pull-to-refresh.less create mode 100644 bower_components/framework7/src/less/material/ripple.less create mode 100644 bower_components/framework7/src/less/material/searchbar.less create mode 100644 bower_components/framework7/src/less/material/statusbar.less create mode 100644 bower_components/framework7/src/less/material/swiper.less create mode 100644 bower_components/framework7/src/less/material/tabs.less create mode 100644 bower_components/framework7/src/less/material/timeline.less create mode 100644 bower_components/framework7/src/less/material/toolbars-pages.less create mode 100644 bower_components/framework7/src/less/material/toolbars.less create mode 100644 bower_components/framework7/src/less/material/views.less rename submissions/createyourdirectoryhere => bower_components/framework7/src/my-app/my-app.css (100%) create mode 100644 bower_components/framework7/src/my-app/my-app.js create mode 100644 bower_components/framework7/src/templates/about.jade create mode 100644 bower_components/framework7/src/templates/form.jade create mode 100644 bower_components/framework7/src/templates/index.jade create mode 100644 bower_components/framework7/src/templates/services.jade create mode 100644 bower_components/web3/.bower.json create mode 100644 bower_components/web3/LICENSE create mode 100644 bower_components/web3/README.md create mode 100644 bower_components/web3/bower.json create mode 100644 bower_components/web3/circle.yml create mode 100644 bower_components/web3/dist/web3-light.js create mode 100644 bower_components/web3/dist/web3-light.min.js create mode 100644 bower_components/web3/dist/web3.js create mode 100644 bower_components/web3/dist/web3.js.map create mode 100644 bower_components/web3/dist/web3.min.js create mode 100644 bower_components/web3/package-init.js create mode 100644 bower_components/web3/styleguide.md create mode 100644 bower_components/web3/test/async.js create mode 100644 bower_components/web3/test/batch.js create mode 100644 bower_components/web3/test/bloom.testAddress.js create mode 100644 bower_components/web3/test/bloom.testTopic.js create mode 100644 bower_components/web3/test/coder.decodeParam.js create mode 100644 bower_components/web3/test/coder.encodeParam.js create mode 100644 bower_components/web3/test/contract.js create mode 100644 bower_components/web3/test/errors.js create mode 100644 bower_components/web3/test/event.decode.js create mode 100644 bower_components/web3/test/event.encode.js create mode 100644 bower_components/web3/test/formatters.inputAddressFormatter.js create mode 100644 bower_components/web3/test/formatters.inputDefaultBlockFormatter.js create mode 100644 bower_components/web3/test/formatters.inputPostFormatter.js create mode 100644 bower_components/web3/test/formatters.inputTransactionFormatter.js create mode 100644 bower_components/web3/test/formatters.outputBlockFormatter.js create mode 100644 bower_components/web3/test/formatters.outputLogFormatter.js create mode 100644 bower_components/web3/test/formatters.outputPostFormatter.js create mode 100644 bower_components/web3/test/formatters.outputTransactionFormatter.js create mode 100644 bower_components/web3/test/helpers/FakeHttpProvider.js create mode 100644 bower_components/web3/test/helpers/FakeHttpProvider2.js create mode 100644 bower_components/web3/test/helpers/FakeIpcRequest.js create mode 100644 bower_components/web3/test/helpers/FakeQtNavigator.js create mode 100644 bower_components/web3/test/helpers/FakeXHR2.js create mode 100644 bower_components/web3/test/helpers/FakeXMLHttpRequest.js create mode 100644 bower_components/web3/test/helpers/test.method.js create mode 100644 bower_components/web3/test/helpers/test.utils.js create mode 100644 bower_components/web3/test/httpprovider.js create mode 100644 bower_components/web3/test/iban.createIndirect.js create mode 100644 bower_components/web3/test/iban.fromAddress.js create mode 100644 bower_components/web3/test/iban.isValid.js create mode 100644 bower_components/web3/test/iban.toAddress.js create mode 100644 bower_components/web3/test/ipcprovider.js create mode 100644 bower_components/web3/test/jsonrpc.id.js create mode 100644 bower_components/web3/test/jsonrpc.isValidResponse.js create mode 100644 bower_components/web3/test/jsonrpc.toBatchPayload.js create mode 100644 bower_components/web3/test/jsonrpc.toPayload.js create mode 100644 bower_components/web3/test/method.extractCallback.js create mode 100644 bower_components/web3/test/method.formatInput.js create mode 100644 bower_components/web3/test/method.formatOutput.js create mode 100644 bower_components/web3/test/method.getCall.js create mode 100644 bower_components/web3/test/method.validateArgs.js create mode 100644 bower_components/web3/test/mocha.opts create mode 100644 bower_components/web3/test/node/app.js create mode 100644 bower_components/web3/test/polling.js create mode 100644 bower_components/web3/test/requestmanager.js create mode 100644 bower_components/web3/test/sha3.js create mode 100644 bower_components/web3/test/soldity.formatters.formatInputInt.js create mode 100644 bower_components/web3/test/utils.extractDisplayName.js create mode 100644 bower_components/web3/test/utils.extractTypeName.js create mode 100644 bower_components/web3/test/utils.fromAscii.js create mode 100644 bower_components/web3/test/utils.fromDecimal.js create mode 100644 bower_components/web3/test/utils.fromUtf8.js create mode 100644 bower_components/web3/test/utils.fromWei.js create mode 100644 bower_components/web3/test/utils.isAddress.js create mode 100644 bower_components/web3/test/utils.isBigNumber.js create mode 100644 bower_components/web3/test/utils.isChecksumAddress.js create mode 100644 bower_components/web3/test/utils.isFunction.js create mode 100644 bower_components/web3/test/utils.isJson.js create mode 100644 bower_components/web3/test/utils.isStrictAddress.js create mode 100644 bower_components/web3/test/utils.isString.js create mode 100644 bower_components/web3/test/utils.toAscii.js create mode 100644 bower_components/web3/test/utils.toBigNumber.js create mode 100644 bower_components/web3/test/utils.toDecimal.js create mode 100644 bower_components/web3/test/utils.toHex.js create mode 100644 bower_components/web3/test/utils.toUtf8.js create mode 100644 bower_components/web3/test/utils.toWei.js create mode 100644 bower_components/web3/test/web3.db.getHex.js create mode 100644 bower_components/web3/test/web3.db.getString.js create mode 100644 bower_components/web3/test/web3.db.methods.js create mode 100644 bower_components/web3/test/web3.db.putHex.js create mode 100644 bower_components/web3/test/web3.db.putString.js create mode 100644 bower_components/web3/test/web3.eth.accounts.js create mode 100644 bower_components/web3/test/web3.eth.blockNumber.js create mode 100644 bower_components/web3/test/web3.eth.call.js create mode 100644 bower_components/web3/test/web3.eth.coinbase.js create mode 100644 bower_components/web3/test/web3.eth.contract.js create mode 100644 bower_components/web3/test/web3.eth.defaultBlock.js create mode 100644 bower_components/web3/test/web3.eth.estimateGas.js create mode 100644 bower_components/web3/test/web3.eth.filter.js create mode 100644 bower_components/web3/test/web3.eth.gasPrice.js create mode 100644 bower_components/web3/test/web3.eth.getBalance.js create mode 100644 bower_components/web3/test/web3.eth.getBlock.js create mode 100644 bower_components/web3/test/web3.eth.getBlockTransactionCount.js create mode 100644 bower_components/web3/test/web3.eth.getBlockUncleCount.js create mode 100644 bower_components/web3/test/web3.eth.getCode.js create mode 100644 bower_components/web3/test/web3.eth.getCompilers.js create mode 100644 bower_components/web3/test/web3.eth.getStorageAt.js create mode 100644 bower_components/web3/test/web3.eth.getTransaction.js create mode 100644 bower_components/web3/test/web3.eth.getTransactionFromBlock.js create mode 100644 bower_components/web3/test/web3.eth.getTransactionReceipt.js create mode 100644 bower_components/web3/test/web3.eth.getUncle.js create mode 100644 bower_components/web3/test/web3.eth.getWork.js create mode 100644 bower_components/web3/test/web3.eth.hashRate.js create mode 100644 bower_components/web3/test/web3.eth.isSyncing.js create mode 100644 bower_components/web3/test/web3.eth.methods.js create mode 100644 bower_components/web3/test/web3.eth.mining.js create mode 100644 bower_components/web3/test/web3.eth.protocolVersion.js create mode 100644 bower_components/web3/test/web3.eth.sendIBANTransaction.js create mode 100644 bower_components/web3/test/web3.eth.submitWork.js create mode 100644 bower_components/web3/test/web3.extend.js create mode 100644 bower_components/web3/test/web3.fromICAP.js create mode 100644 bower_components/web3/test/web3.methods.js create mode 100644 bower_components/web3/test/web3.net.listening.js create mode 100644 bower_components/web3/test/web3.net.methods.js create mode 100644 bower_components/web3/test/web3.net.peerCount.js create mode 100644 bower_components/web3/test/web3.personal.listAccounts.js create mode 100644 bower_components/web3/test/web3.personal.methods.js create mode 100644 bower_components/web3/test/web3.personal.newAccount.js create mode 100644 bower_components/web3/test/web3.personal.unlockAccount.js create mode 100644 bower_components/web3/test/web3.sha3.js create mode 100644 bower_components/web3/test/web3.shh.filter.js create mode 100644 bower_components/web3/test/web3.shh.hasIdentity.js create mode 100644 bower_components/web3/test/web3.shh.methods.js create mode 100644 bower_components/web3/test/web3.shh.post.js diff --git a/bower_components/bignumber.js/.bower.json b/bower_components/bignumber.js/.bower.json new file mode 100644 index 00000000..d72264cd --- /dev/null +++ b/bower_components/bignumber.js/.bower.json @@ -0,0 +1,44 @@ +{ + "name": "bignumber.js", + "main": "bignumber.js", + "version": "4.0.2", + "homepage": "https://github.com/MikeMcl/bignumber.js", + "authors": [ + "Michael Mclaughlin " + ], + "description": "A library for arbitrary-precision decimal and non-decimal arithmetic", + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "arbitrary", + "precision", + "arithmetic", + "big", + "number", + "decimal", + "float", + "biginteger", + "bigdecimal", + "bignumber", + "bigint", + "bignum" + ], + "license": "MIT", + "ignore": [ + ".*", + "*.json", + "test" + ], + "_release": "4.0.2", + "_resolution": { + "type": "version", + "tag": "v4.0.2", + "commit": "b12705646d76f8867861affe0646faaadbd3a55e" + }, + "_source": "https://github.com/MikeMcl/bignumber.js.git", + "_target": ">=2.0.0", + "_originalSource": "bignumber.js" +} \ No newline at end of file diff --git a/bower_components/bignumber.js/LICENCE b/bower_components/bignumber.js/LICENCE new file mode 100644 index 00000000..270a4cab --- /dev/null +++ b/bower_components/bignumber.js/LICENCE @@ -0,0 +1,23 @@ +The MIT Licence. + +Copyright (c) 2012, 2013, 2014, 2015, 2016, 2017 Michael Mclaughlin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/bower_components/bignumber.js/README.md b/bower_components/bignumber.js/README.md new file mode 100644 index 00000000..404c7712 --- /dev/null +++ b/bower_components/bignumber.js/README.md @@ -0,0 +1,401 @@ +![bignumber.js](https://raw.githubusercontent.com/MikeMcl/bignumber.js/gh-pages/bignumberjs.png) + +A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic. + +[![Build Status](https://travis-ci.org/MikeMcl/bignumber.js.svg)](https://travis-ci.org/MikeMcl/bignumber.js) + +
    + +## Features + + - Faster, smaller, and perhaps easier to use than JavaScript versions of Java's BigDecimal + - 8 KB minified and gzipped + - Simple API but full-featured + - Works with numbers with or without fraction digits in bases from 2 to 64 inclusive + - Replicates the `toExponential`, `toFixed`, `toPrecision` and `toString` methods of JavaScript's Number type + - Includes a `toFraction` and a correctly-rounded `squareRoot` method + - Supports cryptographically-secure pseudo-random number generation + - No dependencies + - Wide platform compatibility: uses JavaScript 1.5 (ECMAScript 3) features only + - Comprehensive [documentation](http://mikemcl.github.io/bignumber.js/) and test set + +![API](https://raw.githubusercontent.com/MikeMcl/bignumber.js/gh-pages/API.png) + +If a smaller and simpler library is required see [big.js](https://github.com/MikeMcl/big.js/). +It's less than half the size but only works with decimal numbers and only has half the methods. +It also does not allow `NaN` or `Infinity`, or have the configuration options of this library. + +See also [decimal.js](https://github.com/MikeMcl/decimal.js/), which among other things adds support for non-integer powers, and performs all operations to a specified number of significant digits. + +## Load + +The library is the single JavaScript file *bignumber.js* (or minified, *bignumber.min.js*). + +```html + +``` + +For [Node.js](http://nodejs.org), the library is available from the [npm](https://npmjs.org/) registry + + $ npm install bignumber.js + +```javascript +var BigNumber = require('bignumber.js'); +``` + +To load with AMD loader libraries such as [requireJS](http://requirejs.org/): + +```javascript +require(['path/to/bignumber'], function(BigNumber) { + // Use BigNumber here in local scope. No global BigNumber. +}); +``` + +## Use + +*In all examples below, `var`, semicolons and `toString` calls are not shown. +If a commented-out value is in quotes it means `toString` has been called on the preceding expression.* + +The library exports a single function: `BigNumber`, the constructor of BigNumber instances. + +It accepts a value of type number *(up to 15 significant digits only)*, string or BigNumber object, + +```javascript +x = new BigNumber(123.4567) +y = new BigNumber('123456.7e-3') +z = new BigNumber(x) +x.equals(y) && y.equals(z) && x.equals(z) // true +``` + + +and a base from 2 to 64 inclusive can be specified. + +```javascript +x = new BigNumber(1011, 2) // "11" +y = new BigNumber('zz.9', 36) // "1295.25" +z = x.plus(y) // "1306.25" +``` + +A BigNumber is immutable in the sense that it is not changed by its methods. + +```javascript +0.3 - 0.1 // 0.19999999999999998 +x = new BigNumber(0.3) +x.minus(0.1) // "0.2" +x // "0.3" +``` + +The methods that return a BigNumber can be chained. + +```javascript +x.dividedBy(y).plus(z).times(9).floor() +x.times('1.23456780123456789e+9').plus(9876.5432321).dividedBy('4444562598.111772').ceil() +``` + +Many method names have a shorter alias. + +```javascript +x.squareRoot().dividedBy(y).toPower(3).equals(x.sqrt().div(y).pow(3)) // true +x.cmp(y.mod(z).neg()) == 1 && x.comparedTo(y.modulo(z).negated()) == 1 // true +``` + +Like JavaScript's number type, there are `toExponential`, `toFixed` and `toPrecision` methods + +```javascript +x = new BigNumber(255.5) +x.toExponential(5) // "2.55500e+2" +x.toFixed(5) // "255.50000" +x.toPrecision(5) // "255.50" +x.toNumber() // 255.5 +``` + + and a base can be specified for `toString`. + + ```javascript + x.toString(16) // "ff.8" + ``` + +There is also a `toFormat` method which may be useful for internationalisation + +```javascript +y = new BigNumber('1234567.898765') +y.toFormat(2) // "1,234,567.90" +``` + +The maximum number of decimal places of the result of an operation involving division (i.e. a division, square root, base conversion or negative power operation) is set using the `config` method of the `BigNumber` constructor. + +The other arithmetic operations always give the exact result. + +```javascript +BigNumber.config({ DECIMAL_PLACES: 10, ROUNDING_MODE: 4 }) + +x = new BigNumber(2); +y = new BigNumber(3); +z = x.div(y) // "0.6666666667" +z.sqrt() // "0.8164965809" +z.pow(-3) // "3.3749999995" +z.toString(2) // "0.1010101011" +z.times(z) // "0.44444444448888888889" +z.times(z).round(10) // "0.4444444445" +``` + +There is a `toFraction` method with an optional *maximum denominator* argument + +```javascript +y = new BigNumber(355) +pi = y.dividedBy(113) // "3.1415929204" +pi.toFraction() // [ "7853982301", "2500000000" ] +pi.toFraction(1000) // [ "355", "113" ] +``` + +and `isNaN` and `isFinite` methods, as `NaN` and `Infinity` are valid `BigNumber` values. + +```javascript +x = new BigNumber(NaN) // "NaN" +y = new BigNumber(Infinity) // "Infinity" +x.isNaN() && !y.isNaN() && !x.isFinite() && !y.isFinite() // true +``` + +The value of a BigNumber is stored in a decimal floating point format in terms of a coefficient, exponent and sign. + + +```javascript +x = new BigNumber(-123.456); +x.c // [ 123, 45600000000000 ] coefficient (i.e. significand) +x.e // 2 exponent +x.s // -1 sign +``` + + +Multiple BigNumber constructors can be created, each with their own independent configuration which applies to all BigNumber's created from it. + +```javascript +// Set DECIMAL_PLACES for the original BigNumber constructor +BigNumber.config({ DECIMAL_PLACES: 10 }) + +// Create another BigNumber constructor, optionally passing in a configuration object +BN = BigNumber.another({ DECIMAL_PLACES: 5 }) + +x = new BigNumber(1) +y = new BN(1) + +x.div(3) // '0.3333333333' +y.div(3) // '0.33333' +``` + +For futher information see the [API](http://mikemcl.github.io/bignumber.js/) reference in the *doc* directory. + +## Test + +The *test* directory contains the test scripts for each method. + +The tests can be run with Node or a browser. For Node use + + $ npm test + +or + + $ node test/every-test + +To test a single method, e.g. + + $ node test/toFraction + +For the browser, see *every-test.html* and *single-test.html* in the *test/browser* directory. + +*bignumber-vs-number.html* enables some of the methods of bignumber.js to be compared with those of JavaScript's number type. + +## Versions + +Version 1.x.x of this library is still supported on the 'original' branch. The advantages of later versions are that they are considerably faster for numbers with many digits and that there are some added methods (see Change Log below). The disadvantages are more lines of code and increased code complexity, and the loss of simplicity in no longer having the coefficient of a BigNumber stored in base 10. + +## Performance + +See the [README](https://github.com/MikeMcl/bignumber.js/tree/master/perf) in the *perf* directory. + +## Build + +For Node, if [uglify-js](https://github.com/mishoo/UglifyJS2) is installed + + npm install uglify-js -g + +then + + npm run build + +will create *bignumber.min.js*. + +A source map will also be created in the root directory. + +## Feedback + +Open an issue, or email + +Michael + +M8ch88l@gmail.com + +## Licence + +MIT. + +See [LICENCE](https://github.com/MikeMcl/bignumber.js/blob/master/LICENCE). + +## Change Log + +#### 4.0.2 +* 03/05/2017 +* #120 Workaround Safari/Webkit bug. + +#### 4.0.1 +* 05/04/2017 +* #121 BigNumber.default to BigNumber['default']. + +#### 4.0.0 +* 09/01/2017 +* Replace BigNumber.isBigNumber method with isBigNumber prototype property. + +#### 3.1.2 +* 08/01/2017 +* Minor documentation edit. + +#### 3.1.1 +* 08/01/2017 +* Uncomment `isBigNumber` tests. +* Ignore dot files. + +#### 3.1.0 +* 08/01/2017 +* Add `isBigNumber` method. + +#### 3.0.2 +* 08/01/2017 +* Bugfix: Possible incorrect value of `ERRORS` after a `BigNumber.another` call (due to `parseNumeric` declaration in outer scope). + +#### 3.0.1 +* 23/11/2016 +* Apply fix for old ipads with `%` issue, see #57 and #102. +* Correct error message. + +#### 3.0.0 +* 09/11/2016 +* Remove `require('crypto')` - leave it to the user. +* Add `BigNumber.set` as `BigNumber.config` alias. +* Default `POW_PRECISION` to `0`. + +#### 2.4.0 +* 14/07/2016 +* #97 Add exports to support ES6 imports. + +#### 2.3.0 +* 07/03/2016 +* #86 Add modulus parameter to `toPower`. + +#### 2.2.0 +* 03/03/2016 +* #91 Permit larger JS integers. + +#### 2.1.4 +* 15/12/2015 +* Correct UMD. + +#### 2.1.3 +* 13/12/2015 +* Refactor re global object and crypto availability when bundling. + +#### 2.1.2 +* 10/12/2015 +* Bugfix: `window.crypto` not assigned to `crypto`. + +#### 2.1.1 +* 09/12/2015 +* Prevent code bundler from adding `crypto` shim. + +#### 2.1.0 +* 26/10/2015 +* For `valueOf` and `toJSON`, include the minus sign with negative zero. + +#### 2.0.8 +* 2/10/2015 +* Internal round function bugfix. + +#### 2.0.6 +* 31/03/2015 +* Add bower.json. Tweak division after in-depth review. + +#### 2.0.5 +* 25/03/2015 +* Amend README. Remove bitcoin address. + +#### 2.0.4 +* 25/03/2015 +* Critical bugfix #58: division. + +#### 2.0.3 +* 18/02/2015 +* Amend README. Add source map. + +#### 2.0.2 +* 18/02/2015 +* Correct links. + +#### 2.0.1 +* 18/02/2015 +* Add `max`, `min`, `precision`, `random`, `shift`, `toDigits` and `truncated` methods. +* Add the short-forms: `add`, `mul`, `sd`, `sub` and `trunc`. +* Add an `another` method to enable multiple independent constructors to be created. +* Add support for the base 2, 8 and 16 prefixes `0b`, `0o` and `0x`. +* Enable a rounding mode to be specified as a second parameter to `toExponential`, `toFixed`, `toFormat` and `toPrecision`. +* Add a `CRYPTO` configuration property so cryptographically-secure pseudo-random number generation can be specified. +* Add a `MODULO_MODE` configuration property to enable the rounding mode used by the `modulo` operation to be specified. +* Add a `POW_PRECISION` configuration property to enable the number of significant digits calculated by the power operation to be limited. +* Improve code quality. +* Improve documentation. + +#### 2.0.0 +* 29/12/2014 +* Add `dividedToIntegerBy`, `isInteger` and `toFormat` methods. +* Remove the following short-forms: `isF`, `isZ`, `toE`, `toF`, `toFr`, `toN`, `toP`, `toS`. +* Store a BigNumber's coefficient in base 1e14, rather than base 10. +* Add fast path for integers to BigNumber constructor. +* Incorporate the library into the online documentation. + +#### 1.5.0 +* 13/11/2014 +* Add `toJSON` and `decimalPlaces` methods. + +#### 1.4.1 +* 08/06/2014 +* Amend README. + +#### 1.4.0 +* 08/05/2014 +* Add `toNumber`. + +#### 1.3.0 +* 08/11/2013 +* Ensure correct rounding of `sqrt` in all, rather than almost all, cases. +* Maximum radix to 64. + +#### 1.2.1 +* 17/10/2013 +* Sign of zero when x < 0 and x + (-x) = 0. + +#### 1.2.0 +* 19/9/2013 +* Throw Error objects for stack. + +#### 1.1.1 +* 22/8/2013 +* Show original value in constructor error message. + +#### 1.1.0 +* 1/8/2013 +* Allow numbers with trailing radix point. + +#### 1.0.1 +* Bugfix: error messages with incorrect method name + +#### 1.0.0 +* 8/11/2012 +* Initial release diff --git a/bower_components/bignumber.js/bignumber.js b/bower_components/bignumber.js/bignumber.js new file mode 100644 index 00000000..1fb75cb4 --- /dev/null +++ b/bower_components/bignumber.js/bignumber.js @@ -0,0 +1,2734 @@ +/*! bignumber.js v4.0.2 https://github.com/MikeMcl/bignumber.js/LICENCE */ + +;(function (globalObj) { + 'use strict'; + + /* + bignumber.js v4.0.2 + A JavaScript library for arbitrary-precision arithmetic. + https://github.com/MikeMcl/bignumber.js + Copyright (c) 2017 Michael Mclaughlin + MIT Expat Licence + */ + + + var BigNumber, + isNumeric = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, + mathceil = Math.ceil, + mathfloor = Math.floor, + notBool = ' not a boolean or binary digit', + roundingMode = 'rounding mode', + tooManyDigits = 'number type has more than 15 significant digits', + ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_', + BASE = 1e14, + LOG_BASE = 14, + MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1 + // MAX_INT32 = 0x7fffffff, // 2^31 - 1 + POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], + SQRT_BASE = 1e7, + + /* + * The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and + * the arguments to toExponential, toFixed, toFormat, and toPrecision, beyond which an + * exception is thrown (if ERRORS is true). + */ + MAX = 1E9; // 0 to MAX_INT32 + + + /* + * Create and return a BigNumber constructor. + */ + function constructorFactory(config) { + var div, parseNumeric, + + // id tracks the caller function, so its name can be included in error messages. + id = 0, + P = BigNumber.prototype, + ONE = new BigNumber(1), + + + /********************************* EDITABLE DEFAULTS **********************************/ + + + /* + * The default values below must be integers within the inclusive ranges stated. + * The values can also be changed at run-time using BigNumber.config. + */ + + // The maximum number of decimal places for operations involving division. + DECIMAL_PLACES = 20, // 0 to MAX + + /* + * The rounding mode used when rounding to the above decimal places, and when using + * toExponential, toFixed, toFormat and toPrecision, and round (default value). + * UP 0 Away from zero. + * DOWN 1 Towards zero. + * CEIL 2 Towards +Infinity. + * FLOOR 3 Towards -Infinity. + * HALF_UP 4 Towards nearest neighbour. If equidistant, up. + * HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. + * HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. + * HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. + * HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. + */ + ROUNDING_MODE = 4, // 0 to 8 + + // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS] + + // The exponent value at and beneath which toString returns exponential notation. + // Number type: -7 + TO_EXP_NEG = -7, // 0 to -MAX + + // The exponent value at and above which toString returns exponential notation. + // Number type: 21 + TO_EXP_POS = 21, // 0 to MAX + + // RANGE : [MIN_EXP, MAX_EXP] + + // The minimum exponent value, beneath which underflow to zero occurs. + // Number type: -324 (5e-324) + MIN_EXP = -1e7, // -1 to -MAX + + // The maximum exponent value, above which overflow to Infinity occurs. + // Number type: 308 (1.7976931348623157e+308) + // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow. + MAX_EXP = 1e7, // 1 to MAX + + // Whether BigNumber Errors are ever thrown. + ERRORS = true, // true or false + + // Change to intValidatorNoErrors if ERRORS is false. + isValidInt = intValidatorWithErrors, // intValidatorWithErrors/intValidatorNoErrors + + // Whether to use cryptographically-secure random number generation, if available. + CRYPTO = false, // true or false + + /* + * The modulo mode used when calculating the modulus: a mod n. + * The quotient (q = a / n) is calculated according to the corresponding rounding mode. + * The remainder (r) is calculated as: r = a - n * q. + * + * UP 0 The remainder is positive if the dividend is negative, else is negative. + * DOWN 1 The remainder has the same sign as the dividend. + * This modulo mode is commonly known as 'truncated division' and is + * equivalent to (a % n) in JavaScript. + * FLOOR 3 The remainder has the same sign as the divisor (Python %). + * HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function. + * EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). + * The remainder is always positive. + * + * The truncated division, floored division, Euclidian division and IEEE 754 remainder + * modes are commonly used for the modulus operation. + * Although the other rounding modes can also be used, they may not give useful results. + */ + MODULO_MODE = 1, // 0 to 9 + + // The maximum number of significant digits of the result of the toPower operation. + // If POW_PRECISION is 0, there will be unlimited significant digits. + POW_PRECISION = 0, // 0 to MAX + + // The format specification used by the BigNumber.prototype.toFormat method. + FORMAT = { + decimalSeparator: '.', + groupSeparator: ',', + groupSize: 3, + secondaryGroupSize: 0, + fractionGroupSeparator: '\xA0', // non-breaking space + fractionGroupSize: 0 + }; + + + /******************************************************************************************/ + + + // CONSTRUCTOR + + + /* + * The BigNumber constructor and exported function. + * Create and return a new instance of a BigNumber object. + * + * n {number|string|BigNumber} A numeric value. + * [b] {number} The base of n. Integer, 2 to 64 inclusive. + */ + function BigNumber( n, b ) { + var c, e, i, num, len, str, + x = this; + + // Enable constructor usage without new. + if ( !( x instanceof BigNumber ) ) { + + // 'BigNumber() constructor call without new: {n}' + if (ERRORS) raise( 26, 'constructor call without new', n ); + return new BigNumber( n, b ); + } + + // 'new BigNumber() base not an integer: {b}' + // 'new BigNumber() base out of range: {b}' + if ( b == null || !isValidInt( b, 2, 64, id, 'base' ) ) { + + // Duplicate. + if ( n instanceof BigNumber ) { + x.s = n.s; + x.e = n.e; + x.c = ( n = n.c ) ? n.slice() : n; + id = 0; + return; + } + + if ( ( num = typeof n == 'number' ) && n * 0 == 0 ) { + x.s = 1 / n < 0 ? ( n = -n, -1 ) : 1; + + // Fast path for integers. + if ( n === ~~n ) { + for ( e = 0, i = n; i >= 10; i /= 10, e++ ); + x.e = e; + x.c = [n]; + id = 0; + return; + } + + str = n + ''; + } else { + if ( !isNumeric.test( str = n + '' ) ) return parseNumeric( x, str, num ); + x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1; + } + } else { + b = b | 0; + str = n + ''; + + // Ensure return value is rounded to DECIMAL_PLACES as with other bases. + // Allow exponential notation to be used with base 10 argument. + if ( b == 10 ) { + x = new BigNumber( n instanceof BigNumber ? n : str ); + return round( x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE ); + } + + // Avoid potential interpretation of Infinity and NaN as base 44+ values. + // Any number in exponential form will fail due to the [Ee][+-]. + if ( ( num = typeof n == 'number' ) && n * 0 != 0 || + !( new RegExp( '^-?' + ( c = '[' + ALPHABET.slice( 0, b ) + ']+' ) + + '(?:\\.' + c + ')?$',b < 37 ? 'i' : '' ) ).test(str) ) { + return parseNumeric( x, str, num, b ); + } + + if (num) { + x.s = 1 / n < 0 ? ( str = str.slice(1), -1 ) : 1; + + if ( ERRORS && str.replace( /^0\.0*|\./, '' ).length > 15 ) { + + // 'new BigNumber() number type has more than 15 significant digits: {n}' + raise( id, tooManyDigits, n ); + } + + // Prevent later check for length on converted number. + num = false; + } else { + x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1; + } + + str = convertBase( str, 10, b, x.s ); + } + + // Decimal point? + if ( ( e = str.indexOf('.') ) > -1 ) str = str.replace( '.', '' ); + + // Exponential form? + if ( ( i = str.search( /e/i ) ) > 0 ) { + + // Determine exponent. + if ( e < 0 ) e = i; + e += +str.slice( i + 1 ); + str = str.substring( 0, i ); + } else if ( e < 0 ) { + + // Integer. + e = str.length; + } + + // Determine leading zeros. + for ( i = 0; str.charCodeAt(i) === 48; i++ ); + + // Determine trailing zeros. + for ( len = str.length; str.charCodeAt(--len) === 48; ); + str = str.slice( i, len + 1 ); + + if (str) { + len = str.length; + + // Disallow numbers with over 15 significant digits if number type. + // 'new BigNumber() number type has more than 15 significant digits: {n}' + if ( num && ERRORS && len > 15 && ( n > MAX_SAFE_INTEGER || n !== mathfloor(n) ) ) { + raise( id, tooManyDigits, x.s * n ); + } + + e = e - i - 1; + + // Overflow? + if ( e > MAX_EXP ) { + + // Infinity. + x.c = x.e = null; + + // Underflow? + } else if ( e < MIN_EXP ) { + + // Zero. + x.c = [ x.e = 0 ]; + } else { + x.e = e; + x.c = []; + + // Transform base + + // e is the base 10 exponent. + // i is where to slice str to get the first element of the coefficient array. + i = ( e + 1 ) % LOG_BASE; + if ( e < 0 ) i += LOG_BASE; + + if ( i < len ) { + if (i) x.c.push( +str.slice( 0, i ) ); + + for ( len -= LOG_BASE; i < len; ) { + x.c.push( +str.slice( i, i += LOG_BASE ) ); + } + + str = str.slice(i); + i = LOG_BASE - str.length; + } else { + i -= len; + } + + for ( ; i--; str += '0' ); + x.c.push( +str ); + } + } else { + + // Zero. + x.c = [ x.e = 0 ]; + } + + id = 0; + } + + + // CONSTRUCTOR PROPERTIES + + + BigNumber.another = constructorFactory; + + BigNumber.ROUND_UP = 0; + BigNumber.ROUND_DOWN = 1; + BigNumber.ROUND_CEIL = 2; + BigNumber.ROUND_FLOOR = 3; + BigNumber.ROUND_HALF_UP = 4; + BigNumber.ROUND_HALF_DOWN = 5; + BigNumber.ROUND_HALF_EVEN = 6; + BigNumber.ROUND_HALF_CEIL = 7; + BigNumber.ROUND_HALF_FLOOR = 8; + BigNumber.EUCLID = 9; + + + /* + * Configure infrequently-changing library-wide settings. + * + * Accept an object or an argument list, with one or many of the following properties or + * parameters respectively: + * + * DECIMAL_PLACES {number} Integer, 0 to MAX inclusive + * ROUNDING_MODE {number} Integer, 0 to 8 inclusive + * EXPONENTIAL_AT {number|number[]} Integer, -MAX to MAX inclusive or + * [integer -MAX to 0 incl., 0 to MAX incl.] + * RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or + * [integer -MAX to -1 incl., integer 1 to MAX incl.] + * ERRORS {boolean|number} true, false, 1 or 0 + * CRYPTO {boolean|number} true, false, 1 or 0 + * MODULO_MODE {number} 0 to 9 inclusive + * POW_PRECISION {number} 0 to MAX inclusive + * FORMAT {object} See BigNumber.prototype.toFormat + * decimalSeparator {string} + * groupSeparator {string} + * groupSize {number} + * secondaryGroupSize {number} + * fractionGroupSeparator {string} + * fractionGroupSize {number} + * + * (The values assigned to the above FORMAT object properties are not checked for validity.) + * + * E.g. + * BigNumber.config(20, 4) is equivalent to + * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) + * + * Ignore properties/parameters set to null or undefined. + * Return an object with the properties current values. + */ + BigNumber.config = BigNumber.set = function () { + var v, p, + i = 0, + r = {}, + a = arguments, + o = a[0], + has = o && typeof o == 'object' + ? function () { if ( o.hasOwnProperty(p) ) return ( v = o[p] ) != null; } + : function () { if ( a.length > i ) return ( v = a[i++] ) != null; }; + + // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive. + // 'config() DECIMAL_PLACES not an integer: {v}' + // 'config() DECIMAL_PLACES out of range: {v}' + if ( has( p = 'DECIMAL_PLACES' ) && isValidInt( v, 0, MAX, 2, p ) ) { + DECIMAL_PLACES = v | 0; + } + r[p] = DECIMAL_PLACES; + + // ROUNDING_MODE {number} Integer, 0 to 8 inclusive. + // 'config() ROUNDING_MODE not an integer: {v}' + // 'config() ROUNDING_MODE out of range: {v}' + if ( has( p = 'ROUNDING_MODE' ) && isValidInt( v, 0, 8, 2, p ) ) { + ROUNDING_MODE = v | 0; + } + r[p] = ROUNDING_MODE; + + // EXPONENTIAL_AT {number|number[]} + // Integer, -MAX to MAX inclusive or [integer -MAX to 0 inclusive, 0 to MAX inclusive]. + // 'config() EXPONENTIAL_AT not an integer: {v}' + // 'config() EXPONENTIAL_AT out of range: {v}' + if ( has( p = 'EXPONENTIAL_AT' ) ) { + + if ( isArray(v) ) { + if ( isValidInt( v[0], -MAX, 0, 2, p ) && isValidInt( v[1], 0, MAX, 2, p ) ) { + TO_EXP_NEG = v[0] | 0; + TO_EXP_POS = v[1] | 0; + } + } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) { + TO_EXP_NEG = -( TO_EXP_POS = ( v < 0 ? -v : v ) | 0 ); + } + } + r[p] = [ TO_EXP_NEG, TO_EXP_POS ]; + + // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or + // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive]. + // 'config() RANGE not an integer: {v}' + // 'config() RANGE cannot be zero: {v}' + // 'config() RANGE out of range: {v}' + if ( has( p = 'RANGE' ) ) { + + if ( isArray(v) ) { + if ( isValidInt( v[0], -MAX, -1, 2, p ) && isValidInt( v[1], 1, MAX, 2, p ) ) { + MIN_EXP = v[0] | 0; + MAX_EXP = v[1] | 0; + } + } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) { + if ( v | 0 ) MIN_EXP = -( MAX_EXP = ( v < 0 ? -v : v ) | 0 ); + else if (ERRORS) raise( 2, p + ' cannot be zero', v ); + } + } + r[p] = [ MIN_EXP, MAX_EXP ]; + + // ERRORS {boolean|number} true, false, 1 or 0. + // 'config() ERRORS not a boolean or binary digit: {v}' + if ( has( p = 'ERRORS' ) ) { + + if ( v === !!v || v === 1 || v === 0 ) { + id = 0; + isValidInt = ( ERRORS = !!v ) ? intValidatorWithErrors : intValidatorNoErrors; + } else if (ERRORS) { + raise( 2, p + notBool, v ); + } + } + r[p] = ERRORS; + + // CRYPTO {boolean|number} true, false, 1 or 0. + // 'config() CRYPTO not a boolean or binary digit: {v}' + // 'config() crypto unavailable: {crypto}' + if ( has( p = 'CRYPTO' ) ) { + + if ( v === true || v === false || v === 1 || v === 0 ) { + if (v) { + v = typeof crypto == 'undefined'; + if ( !v && crypto && (crypto.getRandomValues || crypto.randomBytes)) { + CRYPTO = true; + } else if (ERRORS) { + raise( 2, 'crypto unavailable', v ? void 0 : crypto ); + } else { + CRYPTO = false; + } + } else { + CRYPTO = false; + } + } else if (ERRORS) { + raise( 2, p + notBool, v ); + } + } + r[p] = CRYPTO; + + // MODULO_MODE {number} Integer, 0 to 9 inclusive. + // 'config() MODULO_MODE not an integer: {v}' + // 'config() MODULO_MODE out of range: {v}' + if ( has( p = 'MODULO_MODE' ) && isValidInt( v, 0, 9, 2, p ) ) { + MODULO_MODE = v | 0; + } + r[p] = MODULO_MODE; + + // POW_PRECISION {number} Integer, 0 to MAX inclusive. + // 'config() POW_PRECISION not an integer: {v}' + // 'config() POW_PRECISION out of range: {v}' + if ( has( p = 'POW_PRECISION' ) && isValidInt( v, 0, MAX, 2, p ) ) { + POW_PRECISION = v | 0; + } + r[p] = POW_PRECISION; + + // FORMAT {object} + // 'config() FORMAT not an object: {v}' + if ( has( p = 'FORMAT' ) ) { + + if ( typeof v == 'object' ) { + FORMAT = v; + } else if (ERRORS) { + raise( 2, p + ' not an object', v ); + } + } + r[p] = FORMAT; + + return r; + }; + + + /* + * Return a new BigNumber whose value is the maximum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.max = function () { return maxOrMin( arguments, P.lt ); }; + + + /* + * Return a new BigNumber whose value is the minimum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.min = function () { return maxOrMin( arguments, P.gt ); }; + + + /* + * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, + * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing + * zeros are produced). + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * + * 'random() decimal places not an integer: {dp}' + * 'random() decimal places out of range: {dp}' + * 'random() crypto unavailable: {crypto}' + */ + BigNumber.random = (function () { + var pow2_53 = 0x20000000000000; + + // Return a 53 bit integer n, where 0 <= n < 9007199254740992. + // Check if Math.random() produces more than 32 bits of randomness. + // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits. + // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1. + var random53bitInt = (Math.random() * pow2_53) & 0x1fffff + ? function () { return mathfloor( Math.random() * pow2_53 ); } + : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) + + (Math.random() * 0x800000 | 0); }; + + return function (dp) { + var a, b, e, k, v, + i = 0, + c = [], + rand = new BigNumber(ONE); + + dp = dp == null || !isValidInt( dp, 0, MAX, 14 ) ? DECIMAL_PLACES : dp | 0; + k = mathceil( dp / LOG_BASE ); + + if (CRYPTO) { + + // Browsers supporting crypto.getRandomValues. + if (crypto.getRandomValues) { + + a = crypto.getRandomValues( new Uint32Array( k *= 2 ) ); + + for ( ; i < k; ) { + + // 53 bits: + // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2) + // 11111 11111111 11111111 11111111 11100000 00000000 00000000 + // ((Math.pow(2, 32) - 1) >>> 11).toString(2) + // 11111 11111111 11111111 + // 0x20000 is 2^21. + v = a[i] * 0x20000 + (a[i + 1] >>> 11); + + // Rejection sampling: + // 0 <= v < 9007199254740992 + // Probability that v >= 9e15, is + // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251 + if ( v >= 9e15 ) { + b = crypto.getRandomValues( new Uint32Array(2) ); + a[i] = b[0]; + a[i + 1] = b[1]; + } else { + + // 0 <= v <= 8999999999999999 + // 0 <= (v % 1e14) <= 99999999999999 + c.push( v % 1e14 ); + i += 2; + } + } + i = k / 2; + + // Node.js supporting crypto.randomBytes. + } else if (crypto.randomBytes) { + + // buffer + a = crypto.randomBytes( k *= 7 ); + + for ( ; i < k; ) { + + // 0x1000000000000 is 2^48, 0x10000000000 is 2^40 + // 0x100000000 is 2^32, 0x1000000 is 2^24 + // 11111 11111111 11111111 11111111 11111111 11111111 11111111 + // 0 <= v < 9007199254740992 + v = ( ( a[i] & 31 ) * 0x1000000000000 ) + ( a[i + 1] * 0x10000000000 ) + + ( a[i + 2] * 0x100000000 ) + ( a[i + 3] * 0x1000000 ) + + ( a[i + 4] << 16 ) + ( a[i + 5] << 8 ) + a[i + 6]; + + if ( v >= 9e15 ) { + crypto.randomBytes(7).copy( a, i ); + } else { + + // 0 <= (v % 1e14) <= 99999999999999 + c.push( v % 1e14 ); + i += 7; + } + } + i = k / 7; + } else { + CRYPTO = false; + if (ERRORS) raise( 14, 'crypto unavailable', crypto ); + } + } + + // Use Math.random. + if (!CRYPTO) { + + for ( ; i < k; ) { + v = random53bitInt(); + if ( v < 9e15 ) c[i++] = v % 1e14; + } + } + + k = c[--i]; + dp %= LOG_BASE; + + // Convert trailing digits to zeros according to dp. + if ( k && dp ) { + v = POWS_TEN[LOG_BASE - dp]; + c[i] = mathfloor( k / v ) * v; + } + + // Remove trailing elements which are zero. + for ( ; c[i] === 0; c.pop(), i-- ); + + // Zero? + if ( i < 0 ) { + c = [ e = 0 ]; + } else { + + // Remove leading elements which are zero and adjust exponent accordingly. + for ( e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE); + + // Count the digits of the first element of c to determine leading zeros, and... + for ( i = 1, v = c[0]; v >= 10; v /= 10, i++); + + // adjust the exponent accordingly. + if ( i < LOG_BASE ) e -= LOG_BASE - i; + } + + rand.e = e; + rand.c = c; + return rand; + }; + })(); + + + // PRIVATE FUNCTIONS + + + // Convert a numeric string of baseIn to a numeric string of baseOut. + function convertBase( str, baseOut, baseIn, sign ) { + var d, e, k, r, x, xc, y, + i = str.indexOf( '.' ), + dp = DECIMAL_PLACES, + rm = ROUNDING_MODE; + + if ( baseIn < 37 ) str = str.toLowerCase(); + + // Non-integer. + if ( i >= 0 ) { + k = POW_PRECISION; + + // Unlimited precision. + POW_PRECISION = 0; + str = str.replace( '.', '' ); + y = new BigNumber(baseIn); + x = y.pow( str.length - i ); + POW_PRECISION = k; + + // Convert str as if an integer, then restore the fraction part by dividing the + // result by its base raised to a power. + y.c = toBaseOut( toFixedPoint( coeffToString( x.c ), x.e ), 10, baseOut ); + y.e = y.c.length; + } + + // Convert the number as integer. + xc = toBaseOut( str, baseIn, baseOut ); + e = k = xc.length; + + // Remove trailing zeros. + for ( ; xc[--k] == 0; xc.pop() ); + if ( !xc[0] ) return '0'; + + if ( i < 0 ) { + --e; + } else { + x.c = xc; + x.e = e; + + // sign is needed for correct rounding. + x.s = sign; + x = div( x, y, dp, rm, baseOut ); + xc = x.c; + r = x.r; + e = x.e; + } + + d = e + dp + 1; + + // The rounding digit, i.e. the digit to the right of the digit that may be rounded up. + i = xc[d]; + k = baseOut / 2; + r = r || d < 0 || xc[d + 1] != null; + + r = rm < 4 ? ( i != null || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) ) + : i > k || i == k &&( rm == 4 || r || rm == 6 && xc[d - 1] & 1 || + rm == ( x.s < 0 ? 8 : 7 ) ); + + if ( d < 1 || !xc[0] ) { + + // 1^-dp or 0. + str = r ? toFixedPoint( '1', -dp ) : '0'; + } else { + xc.length = d; + + if (r) { + + // Rounding up may mean the previous digit has to be rounded up and so on. + for ( --baseOut; ++xc[--d] > baseOut; ) { + xc[d] = 0; + + if ( !d ) { + ++e; + xc = [1].concat(xc); + } + } + } + + // Determine trailing zeros. + for ( k = xc.length; !xc[--k]; ); + + // E.g. [4, 11, 15] becomes 4bf. + for ( i = 0, str = ''; i <= k; str += ALPHABET.charAt( xc[i++] ) ); + str = toFixedPoint( str, e ); + } + + // The caller will add the sign. + return str; + } + + + // Perform division in the specified base. Called by div and convertBase. + div = (function () { + + // Assume non-zero x and k. + function multiply( x, k, base ) { + var m, temp, xlo, xhi, + carry = 0, + i = x.length, + klo = k % SQRT_BASE, + khi = k / SQRT_BASE | 0; + + for ( x = x.slice(); i--; ) { + xlo = x[i] % SQRT_BASE; + xhi = x[i] / SQRT_BASE | 0; + m = khi * xlo + xhi * klo; + temp = klo * xlo + ( ( m % SQRT_BASE ) * SQRT_BASE ) + carry; + carry = ( temp / base | 0 ) + ( m / SQRT_BASE | 0 ) + khi * xhi; + x[i] = temp % base; + } + + if (carry) x = [carry].concat(x); + + return x; + } + + function compare( a, b, aL, bL ) { + var i, cmp; + + if ( aL != bL ) { + cmp = aL > bL ? 1 : -1; + } else { + + for ( i = cmp = 0; i < aL; i++ ) { + + if ( a[i] != b[i] ) { + cmp = a[i] > b[i] ? 1 : -1; + break; + } + } + } + return cmp; + } + + function subtract( a, b, aL, base ) { + var i = 0; + + // Subtract b from a. + for ( ; aL--; ) { + a[aL] -= i; + i = a[aL] < b[aL] ? 1 : 0; + a[aL] = i * base + a[aL] - b[aL]; + } + + // Remove leading zeros. + for ( ; !a[0] && a.length > 1; a.splice(0, 1) ); + } + + // x: dividend, y: divisor. + return function ( x, y, dp, rm, base ) { + var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, + yL, yz, + s = x.s == y.s ? 1 : -1, + xc = x.c, + yc = y.c; + + // Either NaN, Infinity or 0? + if ( !xc || !xc[0] || !yc || !yc[0] ) { + + return new BigNumber( + + // Return NaN if either NaN, or both Infinity or 0. + !x.s || !y.s || ( xc ? yc && xc[0] == yc[0] : !yc ) ? NaN : + + // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0. + xc && xc[0] == 0 || !yc ? s * 0 : s / 0 + ); + } + + q = new BigNumber(s); + qc = q.c = []; + e = x.e - y.e; + s = dp + e + 1; + + if ( !base ) { + base = BASE; + e = bitFloor( x.e / LOG_BASE ) - bitFloor( y.e / LOG_BASE ); + s = s / LOG_BASE | 0; + } + + // Result exponent may be one less then the current value of e. + // The coefficients of the BigNumbers from convertBase may have trailing zeros. + for ( i = 0; yc[i] == ( xc[i] || 0 ); i++ ); + if ( yc[i] > ( xc[i] || 0 ) ) e--; + + if ( s < 0 ) { + qc.push(1); + more = true; + } else { + xL = xc.length; + yL = yc.length; + i = 0; + s += 2; + + // Normalise xc and yc so highest order digit of yc is >= base / 2. + + n = mathfloor( base / ( yc[0] + 1 ) ); + + // Not necessary, but to handle odd bases where yc[0] == ( base / 2 ) - 1. + // if ( n > 1 || n++ == 1 && yc[0] < base / 2 ) { + if ( n > 1 ) { + yc = multiply( yc, n, base ); + xc = multiply( xc, n, base ); + yL = yc.length; + xL = xc.length; + } + + xi = yL; + rem = xc.slice( 0, yL ); + remL = rem.length; + + // Add zeros to make remainder as long as divisor. + for ( ; remL < yL; rem[remL++] = 0 ); + yz = yc.slice(); + yz = [0].concat(yz); + yc0 = yc[0]; + if ( yc[1] >= base / 2 ) yc0++; + // Not necessary, but to prevent trial digit n > base, when using base 3. + // else if ( base == 3 && yc0 == 1 ) yc0 = 1 + 1e-15; + + do { + n = 0; + + // Compare divisor and remainder. + cmp = compare( yc, rem, yL, remL ); + + // If divisor < remainder. + if ( cmp < 0 ) { + + // Calculate trial digit, n. + + rem0 = rem[0]; + if ( yL != remL ) rem0 = rem0 * base + ( rem[1] || 0 ); + + // n is how many times the divisor goes into the current remainder. + n = mathfloor( rem0 / yc0 ); + + // Algorithm: + // 1. product = divisor * trial digit (n) + // 2. if product > remainder: product -= divisor, n-- + // 3. remainder -= product + // 4. if product was < remainder at 2: + // 5. compare new remainder and divisor + // 6. If remainder > divisor: remainder -= divisor, n++ + + if ( n > 1 ) { + + // n may be > base only when base is 3. + if (n >= base) n = base - 1; + + // product = divisor * trial digit. + prod = multiply( yc, n, base ); + prodL = prod.length; + remL = rem.length; + + // Compare product and remainder. + // If product > remainder. + // Trial digit n too high. + // n is 1 too high about 5% of the time, and is not known to have + // ever been more than 1 too high. + while ( compare( prod, rem, prodL, remL ) == 1 ) { + n--; + + // Subtract divisor from product. + subtract( prod, yL < prodL ? yz : yc, prodL, base ); + prodL = prod.length; + cmp = 1; + } + } else { + + // n is 0 or 1, cmp is -1. + // If n is 0, there is no need to compare yc and rem again below, + // so change cmp to 1 to avoid it. + // If n is 1, leave cmp as -1, so yc and rem are compared again. + if ( n == 0 ) { + + // divisor < remainder, so n must be at least 1. + cmp = n = 1; + } + + // product = divisor + prod = yc.slice(); + prodL = prod.length; + } + + if ( prodL < remL ) prod = [0].concat(prod); + + // Subtract product from remainder. + subtract( rem, prod, remL, base ); + remL = rem.length; + + // If product was < remainder. + if ( cmp == -1 ) { + + // Compare divisor and new remainder. + // If divisor < new remainder, subtract divisor from remainder. + // Trial digit n too low. + // n is 1 too low about 5% of the time, and very rarely 2 too low. + while ( compare( yc, rem, yL, remL ) < 1 ) { + n++; + + // Subtract divisor from remainder. + subtract( rem, yL < remL ? yz : yc, remL, base ); + remL = rem.length; + } + } + } else if ( cmp === 0 ) { + n++; + rem = [0]; + } // else cmp === 1 and n will be 0 + + // Add the next digit, n, to the result array. + qc[i++] = n; + + // Update the remainder. + if ( rem[0] ) { + rem[remL++] = xc[xi] || 0; + } else { + rem = [ xc[xi] ]; + remL = 1; + } + } while ( ( xi++ < xL || rem[0] != null ) && s-- ); + + more = rem[0] != null; + + // Leading zero? + if ( !qc[0] ) qc.splice(0, 1); + } + + if ( base == BASE ) { + + // To calculate q.e, first get the number of digits of qc[0]. + for ( i = 1, s = qc[0]; s >= 10; s /= 10, i++ ); + round( q, dp + ( q.e = i + e * LOG_BASE - 1 ) + 1, rm, more ); + + // Caller is convertBase. + } else { + q.e = e; + q.r = +more; + } + + return q; + }; + })(); + + + /* + * Return a string representing the value of BigNumber n in fixed-point or exponential + * notation rounded to the specified decimal places or significant digits. + * + * n is a BigNumber. + * i is the index of the last digit required (i.e. the digit that may be rounded up). + * rm is the rounding mode. + * caller is caller id: toExponential 19, toFixed 20, toFormat 21, toPrecision 24. + */ + function format( n, i, rm, caller ) { + var c0, e, ne, len, str; + + rm = rm != null && isValidInt( rm, 0, 8, caller, roundingMode ) + ? rm | 0 : ROUNDING_MODE; + + if ( !n.c ) return n.toString(); + c0 = n.c[0]; + ne = n.e; + + if ( i == null ) { + str = coeffToString( n.c ); + str = caller == 19 || caller == 24 && ne <= TO_EXP_NEG + ? toExponential( str, ne ) + : toFixedPoint( str, ne ); + } else { + n = round( new BigNumber(n), i, rm ); + + // n.e may have changed if the value was rounded up. + e = n.e; + + str = coeffToString( n.c ); + len = str.length; + + // toPrecision returns exponential notation if the number of significant digits + // specified is less than the number of digits necessary to represent the integer + // part of the value in fixed-point notation. + + // Exponential notation. + if ( caller == 19 || caller == 24 && ( i <= e || e <= TO_EXP_NEG ) ) { + + // Append zeros? + for ( ; len < i; str += '0', len++ ); + str = toExponential( str, e ); + + // Fixed-point notation. + } else { + i -= ne; + str = toFixedPoint( str, e ); + + // Append zeros? + if ( e + 1 > len ) { + if ( --i > 0 ) for ( str += '.'; i--; str += '0' ); + } else { + i += e - len; + if ( i > 0 ) { + if ( e + 1 == len ) str += '.'; + for ( ; i--; str += '0' ); + } + } + } + } + + return n.s < 0 && c0 ? '-' + str : str; + } + + + // Handle BigNumber.max and BigNumber.min. + function maxOrMin( args, method ) { + var m, n, + i = 0; + + if ( isArray( args[0] ) ) args = args[0]; + m = new BigNumber( args[0] ); + + for ( ; ++i < args.length; ) { + n = new BigNumber( args[i] ); + + // If any number is NaN, return NaN. + if ( !n.s ) { + m = n; + break; + } else if ( method.call( m, n ) ) { + m = n; + } + } + + return m; + } + + + /* + * Return true if n is an integer in range, otherwise throw. + * Use for argument validation when ERRORS is true. + */ + function intValidatorWithErrors( n, min, max, caller, name ) { + if ( n < min || n > max || n != truncate(n) ) { + raise( caller, ( name || 'decimal places' ) + + ( n < min || n > max ? ' out of range' : ' not an integer' ), n ); + } + + return true; + } + + + /* + * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. + * Called by minus, plus and times. + */ + function normalise( n, c, e ) { + var i = 1, + j = c.length; + + // Remove trailing zeros. + for ( ; !c[--j]; c.pop() ); + + // Calculate the base 10 exponent. First get the number of digits of c[0]. + for ( j = c[0]; j >= 10; j /= 10, i++ ); + + // Overflow? + if ( ( e = i + e * LOG_BASE - 1 ) > MAX_EXP ) { + + // Infinity. + n.c = n.e = null; + + // Underflow? + } else if ( e < MIN_EXP ) { + + // Zero. + n.c = [ n.e = 0 ]; + } else { + n.e = e; + n.c = c; + } + + return n; + } + + + // Handle values that fail the validity test in BigNumber. + parseNumeric = (function () { + var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, + dotAfter = /^([^.]+)\.$/, + dotBefore = /^\.([^.]+)$/, + isInfinityOrNaN = /^-?(Infinity|NaN)$/, + whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g; + + return function ( x, str, num, b ) { + var base, + s = num ? str : str.replace( whitespaceOrPlus, '' ); + + // No exception on ±Infinity or NaN. + if ( isInfinityOrNaN.test(s) ) { + x.s = isNaN(s) ? null : s < 0 ? -1 : 1; + } else { + if ( !num ) { + + // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i + s = s.replace( basePrefix, function ( m, p1, p2 ) { + base = ( p2 = p2.toLowerCase() ) == 'x' ? 16 : p2 == 'b' ? 2 : 8; + return !b || b == base ? p1 : m; + }); + + if (b) { + base = b; + + // E.g. '1.' to '1', '.1' to '0.1' + s = s.replace( dotAfter, '$1' ).replace( dotBefore, '0.$1' ); + } + + if ( str != s ) return new BigNumber( s, base ); + } + + // 'new BigNumber() not a number: {n}' + // 'new BigNumber() not a base {b} number: {n}' + if (ERRORS) raise( id, 'not a' + ( b ? ' base ' + b : '' ) + ' number', str ); + x.s = null; + } + + x.c = x.e = null; + id = 0; + } + })(); + + + // Throw a BigNumber Error. + function raise( caller, msg, val ) { + var error = new Error( [ + 'new BigNumber', // 0 + 'cmp', // 1 + 'config', // 2 + 'div', // 3 + 'divToInt', // 4 + 'eq', // 5 + 'gt', // 6 + 'gte', // 7 + 'lt', // 8 + 'lte', // 9 + 'minus', // 10 + 'mod', // 11 + 'plus', // 12 + 'precision', // 13 + 'random', // 14 + 'round', // 15 + 'shift', // 16 + 'times', // 17 + 'toDigits', // 18 + 'toExponential', // 19 + 'toFixed', // 20 + 'toFormat', // 21 + 'toFraction', // 22 + 'pow', // 23 + 'toPrecision', // 24 + 'toString', // 25 + 'BigNumber' // 26 + ][caller] + '() ' + msg + ': ' + val ); + + error.name = 'BigNumber Error'; + id = 0; + throw error; + } + + + /* + * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. + * If r is truthy, it is known that there are more digits after the rounding digit. + */ + function round( x, sd, rm, r ) { + var d, i, j, k, n, ni, rd, + xc = x.c, + pows10 = POWS_TEN; + + // if x is not Infinity or NaN... + if (xc) { + + // rd is the rounding digit, i.e. the digit after the digit that may be rounded up. + // n is a base 1e14 number, the value of the element of array x.c containing rd. + // ni is the index of n within x.c. + // d is the number of digits of n. + // i is the index of rd within n including leading zeros. + // j is the actual index of rd within n (if < 0, rd is a leading zero). + out: { + + // Get the number of digits of the first element of xc. + for ( d = 1, k = xc[0]; k >= 10; k /= 10, d++ ); + i = sd - d; + + // If the rounding digit is in the first element of xc... + if ( i < 0 ) { + i += LOG_BASE; + j = sd; + n = xc[ ni = 0 ]; + + // Get the rounding digit at index j of n. + rd = n / pows10[ d - j - 1 ] % 10 | 0; + } else { + ni = mathceil( ( i + 1 ) / LOG_BASE ); + + if ( ni >= xc.length ) { + + if (r) { + + // Needed by sqrt. + for ( ; xc.length <= ni; xc.push(0) ); + n = rd = 0; + d = 1; + i %= LOG_BASE; + j = i - LOG_BASE + 1; + } else { + break out; + } + } else { + n = k = xc[ni]; + + // Get the number of digits of n. + for ( d = 1; k >= 10; k /= 10, d++ ); + + // Get the index of rd within n. + i %= LOG_BASE; + + // Get the index of rd within n, adjusted for leading zeros. + // The number of leading zeros of n is given by LOG_BASE - d. + j = i - LOG_BASE + d; + + // Get the rounding digit at index j of n. + rd = j < 0 ? 0 : n / pows10[ d - j - 1 ] % 10 | 0; + } + } + + r = r || sd < 0 || + + // Are there any non-zero digits after the rounding digit? + // The expression n % pows10[ d - j - 1 ] returns all digits of n to the right + // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714. + xc[ni + 1] != null || ( j < 0 ? n : n % pows10[ d - j - 1 ] ); + + r = rm < 4 + ? ( rd || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) ) + : rd > 5 || rd == 5 && ( rm == 4 || r || rm == 6 && + + // Check whether the digit to the left of the rounding digit is odd. + ( ( i > 0 ? j > 0 ? n / pows10[ d - j ] : 0 : xc[ni - 1] ) % 10 ) & 1 || + rm == ( x.s < 0 ? 8 : 7 ) ); + + if ( sd < 1 || !xc[0] ) { + xc.length = 0; + + if (r) { + + // Convert sd to decimal places. + sd -= x.e + 1; + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + xc[0] = pows10[ ( LOG_BASE - sd % LOG_BASE ) % LOG_BASE ]; + x.e = -sd || 0; + } else { + + // Zero. + xc[0] = x.e = 0; + } + + return x; + } + + // Remove excess digits. + if ( i == 0 ) { + xc.length = ni; + k = 1; + ni--; + } else { + xc.length = ni + 1; + k = pows10[ LOG_BASE - i ]; + + // E.g. 56700 becomes 56000 if 7 is the rounding digit. + // j > 0 means i > number of leading zeros of n. + xc[ni] = j > 0 ? mathfloor( n / pows10[ d - j ] % pows10[j] ) * k : 0; + } + + // Round up? + if (r) { + + for ( ; ; ) { + + // If the digit to be rounded up is in the first element of xc... + if ( ni == 0 ) { + + // i will be the length of xc[0] before k is added. + for ( i = 1, j = xc[0]; j >= 10; j /= 10, i++ ); + j = xc[0] += k; + for ( k = 1; j >= 10; j /= 10, k++ ); + + // if i != k the length has increased. + if ( i != k ) { + x.e++; + if ( xc[0] == BASE ) xc[0] = 1; + } + + break; + } else { + xc[ni] += k; + if ( xc[ni] != BASE ) break; + xc[ni--] = 0; + k = 1; + } + } + } + + // Remove trailing zeros. + for ( i = xc.length; xc[--i] === 0; xc.pop() ); + } + + // Overflow? Infinity. + if ( x.e > MAX_EXP ) { + x.c = x.e = null; + + // Underflow? Zero. + } else if ( x.e < MIN_EXP ) { + x.c = [ x.e = 0 ]; + } + } + + return x; + } + + + // PROTOTYPE/INSTANCE METHODS + + + /* + * Return a new BigNumber whose value is the absolute value of this BigNumber. + */ + P.absoluteValue = P.abs = function () { + var x = new BigNumber(this); + if ( x.s < 0 ) x.s = 1; + return x; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole + * number in the direction of Infinity. + */ + P.ceil = function () { + return round( new BigNumber(this), this.e + 1, 2 ); + }; + + + /* + * Return + * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), + * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), + * 0 if they have the same value, + * or null if the value of either is NaN. + */ + P.comparedTo = P.cmp = function ( y, b ) { + id = 1; + return compare( this, new BigNumber( y, b ) ); + }; + + + /* + * Return the number of decimal places of the value of this BigNumber, or null if the value + * of this BigNumber is ±Infinity or NaN. + */ + P.decimalPlaces = P.dp = function () { + var n, v, + c = this.c; + + if ( !c ) return null; + n = ( ( v = c.length - 1 ) - bitFloor( this.e / LOG_BASE ) ) * LOG_BASE; + + // Subtract the number of trailing zeros of the last number. + if ( v = c[v] ) for ( ; v % 10 == 0; v /= 10, n-- ); + if ( n < 0 ) n = 0; + + return n; + }; + + + /* + * n / 0 = I + * n / N = N + * n / I = 0 + * 0 / n = 0 + * 0 / 0 = N + * 0 / N = N + * 0 / I = 0 + * N / n = N + * N / 0 = N + * N / N = N + * N / I = N + * I / n = I + * I / 0 = I + * I / N = N + * I / I = N + * + * Return a new BigNumber whose value is the value of this BigNumber divided by the value of + * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. + */ + P.dividedBy = P.div = function ( y, b ) { + id = 3; + return div( this, new BigNumber( y, b ), DECIMAL_PLACES, ROUNDING_MODE ); + }; + + + /* + * Return a new BigNumber whose value is the integer part of dividing the value of this + * BigNumber by the value of BigNumber(y, b). + */ + P.dividedToIntegerBy = P.divToInt = function ( y, b ) { + id = 4; + return div( this, new BigNumber( y, b ), 0, 1 ); + }; + + + /* + * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), + * otherwise returns false. + */ + P.equals = P.eq = function ( y, b ) { + id = 5; + return compare( this, new BigNumber( y, b ) ) === 0; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole + * number in the direction of -Infinity. + */ + P.floor = function () { + return round( new BigNumber(this), this.e + 1, 3 ); + }; + + + /* + * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), + * otherwise returns false. + */ + P.greaterThan = P.gt = function ( y, b ) { + id = 6; + return compare( this, new BigNumber( y, b ) ) > 0; + }; + + + /* + * Return true if the value of this BigNumber is greater than or equal to the value of + * BigNumber(y, b), otherwise returns false. + */ + P.greaterThanOrEqualTo = P.gte = function ( y, b ) { + id = 7; + return ( b = compare( this, new BigNumber( y, b ) ) ) === 1 || b === 0; + + }; + + + /* + * Return true if the value of this BigNumber is a finite number, otherwise returns false. + */ + P.isFinite = function () { + return !!this.c; + }; + + + /* + * Return true if the value of this BigNumber is an integer, otherwise return false. + */ + P.isInteger = P.isInt = function () { + return !!this.c && bitFloor( this.e / LOG_BASE ) > this.c.length - 2; + }; + + + /* + * Return true if the value of this BigNumber is NaN, otherwise returns false. + */ + P.isNaN = function () { + return !this.s; + }; + + + /* + * Return true if the value of this BigNumber is negative, otherwise returns false. + */ + P.isNegative = P.isNeg = function () { + return this.s < 0; + }; + + + /* + * Return true if the value of this BigNumber is 0 or -0, otherwise returns false. + */ + P.isZero = function () { + return !!this.c && this.c[0] == 0; + }; + + + /* + * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), + * otherwise returns false. + */ + P.lessThan = P.lt = function ( y, b ) { + id = 8; + return compare( this, new BigNumber( y, b ) ) < 0; + }; + + + /* + * Return true if the value of this BigNumber is less than or equal to the value of + * BigNumber(y, b), otherwise returns false. + */ + P.lessThanOrEqualTo = P.lte = function ( y, b ) { + id = 9; + return ( b = compare( this, new BigNumber( y, b ) ) ) === -1 || b === 0; + }; + + + /* + * n - 0 = n + * n - N = N + * n - I = -I + * 0 - n = -n + * 0 - 0 = 0 + * 0 - N = N + * 0 - I = -I + * N - n = N + * N - 0 = N + * N - N = N + * N - I = N + * I - n = I + * I - 0 = I + * I - N = N + * I - I = N + * + * Return a new BigNumber whose value is the value of this BigNumber minus the value of + * BigNumber(y, b). + */ + P.minus = P.sub = function ( y, b ) { + var i, j, t, xLTy, + x = this, + a = x.s; + + id = 10; + y = new BigNumber( y, b ); + b = y.s; + + // Either NaN? + if ( !a || !b ) return new BigNumber(NaN); + + // Signs differ? + if ( a != b ) { + y.s = -b; + return x.plus(y); + } + + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; + + if ( !xe || !ye ) { + + // Either Infinity? + if ( !xc || !yc ) return xc ? ( y.s = -b, y ) : new BigNumber( yc ? x : NaN ); + + // Either zero? + if ( !xc[0] || !yc[0] ) { + + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + return yc[0] ? ( y.s = -b, y ) : new BigNumber( xc[0] ? x : + + // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity + ROUNDING_MODE == 3 ? -0 : 0 ); + } + } + + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); + + // Determine which is the bigger number. + if ( a = xe - ye ) { + + if ( xLTy = a < 0 ) { + a = -a; + t = xc; + } else { + ye = xe; + t = yc; + } + + t.reverse(); + + // Prepend zeros to equalise exponents. + for ( b = a; b--; t.push(0) ); + t.reverse(); + } else { + + // Exponents equal. Check digit by digit. + j = ( xLTy = ( a = xc.length ) < ( b = yc.length ) ) ? a : b; + + for ( a = b = 0; b < j; b++ ) { + + if ( xc[b] != yc[b] ) { + xLTy = xc[b] < yc[b]; + break; + } + } + } + + // x < y? Point xc to the array of the bigger number. + if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s; + + b = ( j = yc.length ) - ( i = xc.length ); + + // Append zeros to xc if shorter. + // No need to add zeros to yc if shorter as subtract only needs to start at yc.length. + if ( b > 0 ) for ( ; b--; xc[i++] = 0 ); + b = BASE - 1; + + // Subtract yc from xc. + for ( ; j > a; ) { + + if ( xc[--j] < yc[j] ) { + for ( i = j; i && !xc[--i]; xc[i] = b ); + --xc[i]; + xc[j] += BASE; + } + + xc[j] -= yc[j]; + } + + // Remove leading zeros and adjust exponent accordingly. + for ( ; xc[0] == 0; xc.splice(0, 1), --ye ); + + // Zero? + if ( !xc[0] ) { + + // Following IEEE 754 (2008) 6.3, + // n - n = +0 but n - n = -0 when rounding towards -Infinity. + y.s = ROUNDING_MODE == 3 ? -1 : 1; + y.c = [ y.e = 0 ]; + return y; + } + + // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity + // for finite x and y. + return normalise( y, xc, ye ); + }; + + + /* + * n % 0 = N + * n % N = N + * n % I = n + * 0 % n = 0 + * -0 % n = -0 + * 0 % 0 = N + * 0 % N = N + * 0 % I = 0 + * N % n = N + * N % 0 = N + * N % N = N + * N % I = N + * I % n = N + * I % 0 = N + * I % N = N + * I % I = N + * + * Return a new BigNumber whose value is the value of this BigNumber modulo the value of + * BigNumber(y, b). The result depends on the value of MODULO_MODE. + */ + P.modulo = P.mod = function ( y, b ) { + var q, s, + x = this; + + id = 11; + y = new BigNumber( y, b ); + + // Return NaN if x is Infinity or NaN, or y is NaN or zero. + if ( !x.c || !y.s || y.c && !y.c[0] ) { + return new BigNumber(NaN); + + // Return x if y is Infinity or x is zero. + } else if ( !y.c || x.c && !x.c[0] ) { + return new BigNumber(x); + } + + if ( MODULO_MODE == 9 ) { + + // Euclidian division: q = sign(y) * floor(x / abs(y)) + // r = x - qy where 0 <= r < abs(y) + s = y.s; + y.s = 1; + q = div( x, y, 0, 3 ); + y.s = s; + q.s *= s; + } else { + q = div( x, y, 0, MODULO_MODE ); + } + + return x.minus( q.times(y) ); + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber negated, + * i.e. multiplied by -1. + */ + P.negated = P.neg = function () { + var x = new BigNumber(this); + x.s = -x.s || null; + return x; + }; + + + /* + * n + 0 = n + * n + N = N + * n + I = I + * 0 + n = n + * 0 + 0 = 0 + * 0 + N = N + * 0 + I = I + * N + n = N + * N + 0 = N + * N + N = N + * N + I = N + * I + n = I + * I + 0 = I + * I + N = N + * I + I = I + * + * Return a new BigNumber whose value is the value of this BigNumber plus the value of + * BigNumber(y, b). + */ + P.plus = P.add = function ( y, b ) { + var t, + x = this, + a = x.s; + + id = 12; + y = new BigNumber( y, b ); + b = y.s; + + // Either NaN? + if ( !a || !b ) return new BigNumber(NaN); + + // Signs differ? + if ( a != b ) { + y.s = -b; + return x.minus(y); + } + + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; + + if ( !xe || !ye ) { + + // Return ±Infinity if either ±Infinity. + if ( !xc || !yc ) return new BigNumber( a / 0 ); + + // Either zero? + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + if ( !xc[0] || !yc[0] ) return yc[0] ? y : new BigNumber( xc[0] ? x : a * 0 ); + } + + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); + + // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts. + if ( a = xe - ye ) { + if ( a > 0 ) { + ye = xe; + t = yc; + } else { + a = -a; + t = xc; + } + + t.reverse(); + for ( ; a--; t.push(0) ); + t.reverse(); + } + + a = xc.length; + b = yc.length; + + // Point xc to the longer array, and b to the shorter length. + if ( a - b < 0 ) t = yc, yc = xc, xc = t, b = a; + + // Only start adding at yc.length - 1 as the further digits of xc can be ignored. + for ( a = 0; b; ) { + a = ( xc[--b] = xc[b] + yc[b] + a ) / BASE | 0; + xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE; + } + + if (a) { + xc = [a].concat(xc); + ++ye; + } + + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + // ye = MAX_EXP + 1 possible + return normalise( y, xc, ye ); + }; + + + /* + * Return the number of significant digits of the value of this BigNumber. + * + * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0. + */ + P.precision = P.sd = function (z) { + var n, v, + x = this, + c = x.c; + + // 'precision() argument not a boolean or binary digit: {z}' + if ( z != null && z !== !!z && z !== 1 && z !== 0 ) { + if (ERRORS) raise( 13, 'argument' + notBool, z ); + if ( z != !!z ) z = null; + } + + if ( !c ) return null; + v = c.length - 1; + n = v * LOG_BASE + 1; + + if ( v = c[v] ) { + + // Subtract the number of trailing zeros of the last element. + for ( ; v % 10 == 0; v /= 10, n-- ); + + // Add the number of digits of the first element. + for ( v = c[0]; v >= 10; v /= 10, n++ ); + } + + if ( z && x.e + 1 > n ) n = x.e + 1; + + return n; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of + * dp decimal places using rounding mode rm, or to 0 and ROUNDING_MODE respectively if + * omitted. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'round() decimal places out of range: {dp}' + * 'round() decimal places not an integer: {dp}' + * 'round() rounding mode not an integer: {rm}' + * 'round() rounding mode out of range: {rm}' + */ + P.round = function ( dp, rm ) { + var n = new BigNumber(this); + + if ( dp == null || isValidInt( dp, 0, MAX, 15 ) ) { + round( n, ~~dp + this.e + 1, rm == null || + !isValidInt( rm, 0, 8, 15, roundingMode ) ? ROUNDING_MODE : rm | 0 ); + } + + return n; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber shifted by k places + * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. + * + * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * + * If k is out of range and ERRORS is false, the result will be ±0 if k < 0, or ±Infinity + * otherwise. + * + * 'shift() argument not an integer: {k}' + * 'shift() argument out of range: {k}' + */ + P.shift = function (k) { + var n = this; + return isValidInt( k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 16, 'argument' ) + + // k < 1e+21, or truncate(k) will produce exponential notation. + ? n.times( '1e' + truncate(k) ) + : new BigNumber( n.c && n.c[0] && ( k < -MAX_SAFE_INTEGER || k > MAX_SAFE_INTEGER ) + ? n.s * ( k < 0 ? 0 : 1 / 0 ) + : n ); + }; + + + /* + * sqrt(-n) = N + * sqrt( N) = N + * sqrt(-I) = N + * sqrt( I) = I + * sqrt( 0) = 0 + * sqrt(-0) = -0 + * + * Return a new BigNumber whose value is the square root of the value of this BigNumber, + * rounded according to DECIMAL_PLACES and ROUNDING_MODE. + */ + P.squareRoot = P.sqrt = function () { + var m, n, r, rep, t, + x = this, + c = x.c, + s = x.s, + e = x.e, + dp = DECIMAL_PLACES + 4, + half = new BigNumber('0.5'); + + // Negative/NaN/Infinity/zero? + if ( s !== 1 || !c || !c[0] ) { + return new BigNumber( !s || s < 0 && ( !c || c[0] ) ? NaN : c ? x : 1 / 0 ); + } + + // Initial estimate. + s = Math.sqrt( +x ); + + // Math.sqrt underflow/overflow? + // Pass x to Math.sqrt as integer, then adjust the exponent of the result. + if ( s == 0 || s == 1 / 0 ) { + n = coeffToString(c); + if ( ( n.length + e ) % 2 == 0 ) n += '0'; + s = Math.sqrt(n); + e = bitFloor( ( e + 1 ) / 2 ) - ( e < 0 || e % 2 ); + + if ( s == 1 / 0 ) { + n = '1e' + e; + } else { + n = s.toExponential(); + n = n.slice( 0, n.indexOf('e') + 1 ) + e; + } + + r = new BigNumber(n); + } else { + r = new BigNumber( s + '' ); + } + + // Check for zero. + // r could be zero if MIN_EXP is changed after the this value was created. + // This would cause a division by zero (x/t) and hence Infinity below, which would cause + // coeffToString to throw. + if ( r.c[0] ) { + e = r.e; + s = e + dp; + if ( s < 3 ) s = 0; + + // Newton-Raphson iteration. + for ( ; ; ) { + t = r; + r = half.times( t.plus( div( x, t, dp, 1 ) ) ); + + if ( coeffToString( t.c ).slice( 0, s ) === ( n = + coeffToString( r.c ) ).slice( 0, s ) ) { + + // The exponent of r may here be one less than the final result exponent, + // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits + // are indexed correctly. + if ( r.e < e ) --s; + n = n.slice( s - 3, s + 1 ); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits + // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the + // iteration. + if ( n == '9999' || !rep && n == '4999' ) { + + // On the first iteration only, check to see if rounding up gives the + // exact result as the nines may infinitely repeat. + if ( !rep ) { + round( t, t.e + DECIMAL_PLACES + 2, 0 ); + + if ( t.times(t).eq(x) ) { + r = t; + break; + } + } + + dp += 4; + s += 4; + rep = 1; + } else { + + // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact + // result. If not, then there are further digits and m will be truthy. + if ( !+n || !+n.slice(1) && n.charAt(0) == '5' ) { + + // Truncate to the first rounding digit. + round( r, r.e + DECIMAL_PLACES + 2, 1 ); + m = !r.times(r).eq(x); + } + + break; + } + } + } + } + + return round( r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m ); + }; + + + /* + * n * 0 = 0 + * n * N = N + * n * I = I + * 0 * n = 0 + * 0 * 0 = 0 + * 0 * N = N + * 0 * I = N + * N * n = N + * N * 0 = N + * N * N = N + * N * I = N + * I * n = I + * I * 0 = N + * I * N = N + * I * I = I + * + * Return a new BigNumber whose value is the value of this BigNumber times the value of + * BigNumber(y, b). + */ + P.times = P.mul = function ( y, b ) { + var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, + base, sqrtBase, + x = this, + xc = x.c, + yc = ( id = 17, y = new BigNumber( y, b ) ).c; + + // Either NaN, ±Infinity or ±0? + if ( !xc || !yc || !xc[0] || !yc[0] ) { + + // Return NaN if either is NaN, or one is 0 and the other is Infinity. + if ( !x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc ) { + y.c = y.e = y.s = null; + } else { + y.s *= x.s; + + // Return ±Infinity if either is ±Infinity. + if ( !xc || !yc ) { + y.c = y.e = null; + + // Return ±0 if either is ±0. + } else { + y.c = [0]; + y.e = 0; + } + } + + return y; + } + + e = bitFloor( x.e / LOG_BASE ) + bitFloor( y.e / LOG_BASE ); + y.s *= x.s; + xcL = xc.length; + ycL = yc.length; + + // Ensure xc points to longer array and xcL to its length. + if ( xcL < ycL ) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i; + + // Initialise the result array with zeros. + for ( i = xcL + ycL, zc = []; i--; zc.push(0) ); + + base = BASE; + sqrtBase = SQRT_BASE; + + for ( i = ycL; --i >= 0; ) { + c = 0; + ylo = yc[i] % sqrtBase; + yhi = yc[i] / sqrtBase | 0; + + for ( k = xcL, j = i + k; j > i; ) { + xlo = xc[--k] % sqrtBase; + xhi = xc[k] / sqrtBase | 0; + m = yhi * xlo + xhi * ylo; + xlo = ylo * xlo + ( ( m % sqrtBase ) * sqrtBase ) + zc[j] + c; + c = ( xlo / base | 0 ) + ( m / sqrtBase | 0 ) + yhi * xhi; + zc[j--] = xlo % base; + } + + zc[j] = c; + } + + if (c) { + ++e; + } else { + zc.splice(0, 1); + } + + return normalise( y, zc, e ); + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of + * sd significant digits using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toDigits() precision out of range: {sd}' + * 'toDigits() precision not an integer: {sd}' + * 'toDigits() rounding mode not an integer: {rm}' + * 'toDigits() rounding mode out of range: {rm}' + */ + P.toDigits = function ( sd, rm ) { + var n = new BigNumber(this); + sd = sd == null || !isValidInt( sd, 1, MAX, 18, 'precision' ) ? null : sd | 0; + rm = rm == null || !isValidInt( rm, 0, 8, 18, roundingMode ) ? ROUNDING_MODE : rm | 0; + return sd ? round( n, sd, rm ) : n; + }; + + + /* + * Return a string representing the value of this BigNumber in exponential notation and + * rounded using ROUNDING_MODE to dp fixed decimal places. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toExponential() decimal places not an integer: {dp}' + * 'toExponential() decimal places out of range: {dp}' + * 'toExponential() rounding mode not an integer: {rm}' + * 'toExponential() rounding mode out of range: {rm}' + */ + P.toExponential = function ( dp, rm ) { + return format( this, + dp != null && isValidInt( dp, 0, MAX, 19 ) ? ~~dp + 1 : null, rm, 19 ); + }; + + + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounding + * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', + * but e.g. (-0.00001).toFixed(0) is '-0'. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toFixed() decimal places not an integer: {dp}' + * 'toFixed() decimal places out of range: {dp}' + * 'toFixed() rounding mode not an integer: {rm}' + * 'toFixed() rounding mode out of range: {rm}' + */ + P.toFixed = function ( dp, rm ) { + return format( this, dp != null && isValidInt( dp, 0, MAX, 20 ) + ? ~~dp + this.e + 1 : null, rm, 20 ); + }; + + + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounded + * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties + * of the FORMAT object (see BigNumber.config). + * + * FORMAT = { + * decimalSeparator : '.', + * groupSeparator : ',', + * groupSize : 3, + * secondaryGroupSize : 0, + * fractionGroupSeparator : '\xA0', // non-breaking space + * fractionGroupSize : 0 + * }; + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toFormat() decimal places not an integer: {dp}' + * 'toFormat() decimal places out of range: {dp}' + * 'toFormat() rounding mode not an integer: {rm}' + * 'toFormat() rounding mode out of range: {rm}' + */ + P.toFormat = function ( dp, rm ) { + var str = format( this, dp != null && isValidInt( dp, 0, MAX, 21 ) + ? ~~dp + this.e + 1 : null, rm, 21 ); + + if ( this.c ) { + var i, + arr = str.split('.'), + g1 = +FORMAT.groupSize, + g2 = +FORMAT.secondaryGroupSize, + groupSeparator = FORMAT.groupSeparator, + intPart = arr[0], + fractionPart = arr[1], + isNeg = this.s < 0, + intDigits = isNeg ? intPart.slice(1) : intPart, + len = intDigits.length; + + if (g2) i = g1, g1 = g2, g2 = i, len -= i; + + if ( g1 > 0 && len > 0 ) { + i = len % g1 || g1; + intPart = intDigits.substr( 0, i ); + + for ( ; i < len; i += g1 ) { + intPart += groupSeparator + intDigits.substr( i, g1 ); + } + + if ( g2 > 0 ) intPart += groupSeparator + intDigits.slice(i); + if (isNeg) intPart = '-' + intPart; + } + + str = fractionPart + ? intPart + FORMAT.decimalSeparator + ( ( g2 = +FORMAT.fractionGroupSize ) + ? fractionPart.replace( new RegExp( '\\d{' + g2 + '}\\B', 'g' ), + '$&' + FORMAT.fractionGroupSeparator ) + : fractionPart ) + : intPart; + } + + return str; + }; + + + /* + * Return a string array representing the value of this BigNumber as a simple fraction with + * an integer numerator and an integer denominator. The denominator will be a positive + * non-zero value less than or equal to the specified maximum denominator. If a maximum + * denominator is not specified, the denominator will be the lowest value necessary to + * represent the number exactly. + * + * [md] {number|string|BigNumber} Integer >= 1 and < Infinity. The maximum denominator. + * + * 'toFraction() max denominator not an integer: {md}' + * 'toFraction() max denominator out of range: {md}' + */ + P.toFraction = function (md) { + var arr, d0, d2, e, exp, n, n0, q, s, + k = ERRORS, + x = this, + xc = x.c, + d = new BigNumber(ONE), + n1 = d0 = new BigNumber(ONE), + d1 = n0 = new BigNumber(ONE); + + if ( md != null ) { + ERRORS = false; + n = new BigNumber(md); + ERRORS = k; + + if ( !( k = n.isInt() ) || n.lt(ONE) ) { + + if (ERRORS) { + raise( 22, + 'max denominator ' + ( k ? 'out of range' : 'not an integer' ), md ); + } + + // ERRORS is false: + // If md is a finite non-integer >= 1, round it to an integer and use it. + md = !k && n.c && round( n, n.e + 1, 1 ).gte(ONE) ? n : null; + } + } + + if ( !xc ) return x.toString(); + s = coeffToString(xc); + + // Determine initial denominator. + // d is a power of 10 and the minimum max denominator that specifies the value exactly. + e = d.e = s.length - x.e - 1; + d.c[0] = POWS_TEN[ ( exp = e % LOG_BASE ) < 0 ? LOG_BASE + exp : exp ]; + md = !md || n.cmp(d) > 0 ? ( e > 0 ? d : n1 ) : n; + + exp = MAX_EXP; + MAX_EXP = 1 / 0; + n = new BigNumber(s); + + // n0 = d1 = 0 + n0.c[0] = 0; + + for ( ; ; ) { + q = div( n, d, 0, 1 ); + d2 = d0.plus( q.times(d1) ); + if ( d2.cmp(md) == 1 ) break; + d0 = d1; + d1 = d2; + n1 = n0.plus( q.times( d2 = n1 ) ); + n0 = d2; + d = n.minus( q.times( d2 = d ) ); + n = d2; + } + + d2 = div( md.minus(d0), d1, 0, 1 ); + n0 = n0.plus( d2.times(n1) ); + d0 = d0.plus( d2.times(d1) ); + n0.s = n1.s = x.s; + e *= 2; + + // Determine which fraction is closer to x, n0/d0 or n1/d1 + arr = div( n1, d1, e, ROUNDING_MODE ).minus(x).abs().cmp( + div( n0, d0, e, ROUNDING_MODE ).minus(x).abs() ) < 1 + ? [ n1.toString(), d1.toString() ] + : [ n0.toString(), d0.toString() ]; + + MAX_EXP = exp; + return arr; + }; + + + /* + * Return the value of this BigNumber converted to a number primitive. + */ + P.toNumber = function () { + return +this; + }; + + + /* + * Return a BigNumber whose value is the value of this BigNumber raised to the power n. + * If m is present, return the result modulo m. + * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. + * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using + * ROUNDING_MODE. + * + * The modular power operation works efficiently when x, n, and m are positive integers, + * otherwise it is equivalent to calculating x.toPower(n).modulo(m) (with POW_PRECISION 0). + * + * n {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * [m] {number|string|BigNumber} The modulus. + * + * 'pow() exponent not an integer: {n}' + * 'pow() exponent out of range: {n}' + * + * Performs 54 loop iterations for n of 9007199254740991. + */ + P.toPower = P.pow = function ( n, m ) { + var k, y, z, + i = mathfloor( n < 0 ? -n : +n ), + x = this; + + if ( m != null ) { + id = 23; + m = new BigNumber(m); + } + + // Pass ±Infinity to Math.pow if exponent is out of range. + if ( !isValidInt( n, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 23, 'exponent' ) && + ( !isFinite(n) || i > MAX_SAFE_INTEGER && ( n /= 0 ) || + parseFloat(n) != n && !( n = NaN ) ) || n == 0 ) { + k = Math.pow( +x, n ); + return new BigNumber( m ? k % m : k ); + } + + if (m) { + if ( n > 1 && x.gt(ONE) && x.isInt() && m.gt(ONE) && m.isInt() ) { + x = x.mod(m); + } else { + z = m; + + // Nullify m so only a single mod operation is performed at the end. + m = null; + } + } else if (POW_PRECISION) { + + // Truncating each coefficient array to a length of k after each multiplication + // equates to truncating significant digits to POW_PRECISION + [28, 41], + // i.e. there will be a minimum of 28 guard digits retained. + // (Using + 1.5 would give [9, 21] guard digits.) + k = mathceil( POW_PRECISION / LOG_BASE + 2 ); + } + + y = new BigNumber(ONE); + + for ( ; ; ) { + if ( i % 2 ) { + y = y.times(x); + if ( !y.c ) break; + if (k) { + if ( y.c.length > k ) y.c.length = k; + } else if (m) { + y = y.mod(m); + } + } + + i = mathfloor( i / 2 ); + if ( !i ) break; + x = x.times(x); + if (k) { + if ( x.c && x.c.length > k ) x.c.length = k; + } else if (m) { + x = x.mod(m); + } + } + + if (m) return y; + if ( n < 0 ) y = ONE.div(y); + + return z ? y.mod(z) : k ? round( y, POW_PRECISION, ROUNDING_MODE ) : y; + }; + + + /* + * Return a string representing the value of this BigNumber rounded to sd significant digits + * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits + * necessary to represent the integer part of the value in fixed-point notation, then use + * exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toPrecision() precision not an integer: {sd}' + * 'toPrecision() precision out of range: {sd}' + * 'toPrecision() rounding mode not an integer: {rm}' + * 'toPrecision() rounding mode out of range: {rm}' + */ + P.toPrecision = function ( sd, rm ) { + return format( this, sd != null && isValidInt( sd, 1, MAX, 24, 'precision' ) + ? sd | 0 : null, rm, 24 ); + }; + + + /* + * Return a string representing the value of this BigNumber in base b, or base 10 if b is + * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and + * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent + * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than + * TO_EXP_NEG, return exponential notation. + * + * [b] {number} Integer, 2 to 64 inclusive. + * + * 'toString() base not an integer: {b}' + * 'toString() base out of range: {b}' + */ + P.toString = function (b) { + var str, + n = this, + s = n.s, + e = n.e; + + // Infinity or NaN? + if ( e === null ) { + + if (s) { + str = 'Infinity'; + if ( s < 0 ) str = '-' + str; + } else { + str = 'NaN'; + } + } else { + str = coeffToString( n.c ); + + if ( b == null || !isValidInt( b, 2, 64, 25, 'base' ) ) { + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential( str, e ) + : toFixedPoint( str, e ); + } else { + str = convertBase( toFixedPoint( str, e ), b | 0, 10, s ); + } + + if ( s < 0 && n.c[0] ) str = '-' + str; + } + + return str; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber truncated to a whole + * number. + */ + P.truncated = P.trunc = function () { + return round( new BigNumber(this), this.e + 1, 1 ); + }; + + + /* + * Return as toString, but do not accept a base argument, and include the minus sign for + * negative zero. + */ + P.valueOf = P.toJSON = function () { + var str, + n = this, + e = n.e; + + if ( e === null ) return n.toString(); + + str = coeffToString( n.c ); + + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential( str, e ) + : toFixedPoint( str, e ); + + return n.s < 0 ? '-' + str : str; + }; + + + P.isBigNumber = true; + + if ( config != null ) BigNumber.config(config); + + return BigNumber; + } + + + // PRIVATE HELPER FUNCTIONS + + + function bitFloor(n) { + var i = n | 0; + return n > 0 || n === i ? i : i - 1; + } + + + // Return a coefficient array as a string of base 10 digits. + function coeffToString(a) { + var s, z, + i = 1, + j = a.length, + r = a[0] + ''; + + for ( ; i < j; ) { + s = a[i++] + ''; + z = LOG_BASE - s.length; + for ( ; z--; s = '0' + s ); + r += s; + } + + // Determine trailing zeros. + for ( j = r.length; r.charCodeAt(--j) === 48; ); + return r.slice( 0, j + 1 || 1 ); + } + + + // Compare the value of BigNumbers x and y. + function compare( x, y ) { + var a, b, + xc = x.c, + yc = y.c, + i = x.s, + j = y.s, + k = x.e, + l = y.e; + + // Either NaN? + if ( !i || !j ) return null; + + a = xc && !xc[0]; + b = yc && !yc[0]; + + // Either zero? + if ( a || b ) return a ? b ? 0 : -j : i; + + // Signs differ? + if ( i != j ) return i; + + a = i < 0; + b = k == l; + + // Either Infinity? + if ( !xc || !yc ) return b ? 0 : !xc ^ a ? 1 : -1; + + // Compare exponents. + if ( !b ) return k > l ^ a ? 1 : -1; + + j = ( k = xc.length ) < ( l = yc.length ) ? k : l; + + // Compare digit by digit. + for ( i = 0; i < j; i++ ) if ( xc[i] != yc[i] ) return xc[i] > yc[i] ^ a ? 1 : -1; + + // Compare lengths. + return k == l ? 0 : k > l ^ a ? 1 : -1; + } + + + /* + * Return true if n is a valid number in range, otherwise false. + * Use for argument validation when ERRORS is false. + * Note: parseInt('1e+1') == 1 but parseFloat('1e+1') == 10. + */ + function intValidatorNoErrors( n, min, max ) { + return ( n = truncate(n) ) >= min && n <= max; + } + + + function isArray(obj) { + return Object.prototype.toString.call(obj) == '[object Array]'; + } + + + /* + * Convert string of baseIn to an array of numbers of baseOut. + * Eg. convertBase('255', 10, 16) returns [15, 15]. + * Eg. convertBase('ff', 16, 10) returns [2, 5, 5]. + */ + function toBaseOut( str, baseIn, baseOut ) { + var j, + arr = [0], + arrL, + i = 0, + len = str.length; + + for ( ; i < len; ) { + for ( arrL = arr.length; arrL--; arr[arrL] *= baseIn ); + arr[ j = 0 ] += ALPHABET.indexOf( str.charAt( i++ ) ); + + for ( ; j < arr.length; j++ ) { + + if ( arr[j] > baseOut - 1 ) { + if ( arr[j + 1] == null ) arr[j + 1] = 0; + arr[j + 1] += arr[j] / baseOut | 0; + arr[j] %= baseOut; + } + } + } + + return arr.reverse(); + } + + + function toExponential( str, e ) { + return ( str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str ) + + ( e < 0 ? 'e' : 'e+' ) + e; + } + + + function toFixedPoint( str, e ) { + var len, z; + + // Negative exponent? + if ( e < 0 ) { + + // Prepend zeros. + for ( z = '0.'; ++e; z += '0' ); + str = z + str; + + // Positive exponent + } else { + len = str.length; + + // Append zeros. + if ( ++e > len ) { + for ( z = '0', e -= len; --e; z += '0' ); + str += z; + } else if ( e < len ) { + str = str.slice( 0, e ) + '.' + str.slice(e); + } + } + + return str; + } + + + function truncate(n) { + n = parseFloat(n); + return n < 0 ? mathceil(n) : mathfloor(n); + } + + + // EXPORT + + + BigNumber = constructorFactory(); + BigNumber['default'] = BigNumber.BigNumber = BigNumber; + + + // AMD. + if ( typeof define == 'function' && define.amd ) { + define( function () { return BigNumber; } ); + + // Node.js and other environments that support module.exports. + } else if ( typeof module != 'undefined' && module.exports ) { + module.exports = BigNumber; + + // Browser. + } else { + if ( !globalObj ) globalObj = typeof self != 'undefined' ? self : Function('return this')(); + globalObj.BigNumber = BigNumber; + } +})(this); diff --git a/bower_components/bignumber.js/bignumber.js.map b/bower_components/bignumber.js/bignumber.js.map new file mode 100644 index 00000000..c993524a --- /dev/null +++ b/bower_components/bignumber.js/bignumber.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bignumber.min.js","sources":["bignumber.js"],"names":["globalObj","constructorFactory","config","BigNumber","n","b","c","e","i","num","len","str","x","this","ERRORS","raise","isValidInt","id","round","DECIMAL_PLACES","ROUNDING_MODE","RegExp","ALPHABET","slice","test","parseNumeric","s","replace","length","tooManyDigits","charCodeAt","convertBase","isNumeric","indexOf","search","substring","MAX_SAFE_INTEGER","mathfloor","MAX_EXP","MIN_EXP","LOG_BASE","push","baseOut","baseIn","sign","d","k","r","xc","y","dp","rm","toLowerCase","POW_PRECISION","pow","toBaseOut","toFixedPoint","coeffToString","pop","div","concat","charAt","format","caller","c0","ne","roundingMode","toString","TO_EXP_NEG","toExponential","maxOrMin","args","method","m","isArray","call","intValidatorWithErrors","min","max","name","truncate","normalise","j","msg","val","error","Error","sd","ni","rd","pows10","POWS_TEN","out","mathceil","BASE","P","prototype","ONE","TO_EXP_POS","CRYPTO","MODULO_MODE","FORMAT","decimalSeparator","groupSeparator","groupSize","secondaryGroupSize","fractionGroupSeparator","fractionGroupSize","another","ROUND_UP","ROUND_DOWN","ROUND_CEIL","ROUND_FLOOR","ROUND_HALF_UP","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_CEIL","ROUND_HALF_FLOOR","EUCLID","set","v","p","a","arguments","o","has","hasOwnProperty","MAX","intValidatorNoErrors","notBool","crypto","getRandomValues","randomBytes","lt","gt","random","pow2_53","random53bitInt","Math","rand","Uint32Array","copy","splice","multiply","base","temp","xlo","xhi","carry","klo","SQRT_BASE","khi","compare","aL","bL","cmp","subtract","more","prod","prodL","q","qc","rem","remL","rem0","xi","xL","yc0","yL","yz","yc","NaN","bitFloor","basePrefix","dotAfter","dotBefore","isInfinityOrNaN","whitespaceOrPlus","isNaN","p1","p2","absoluteValue","abs","ceil","comparedTo","decimalPlaces","dividedBy","dividedToIntegerBy","divToInt","equals","eq","floor","greaterThan","greaterThanOrEqualTo","gte","isFinite","isInteger","isInt","isNegative","isNeg","isZero","lessThan","lessThanOrEqualTo","lte","minus","sub","t","xLTy","plus","xe","ye","reverse","modulo","mod","times","negated","neg","add","precision","z","shift","squareRoot","sqrt","rep","half","mul","xcL","ycL","ylo","yhi","zc","sqrtBase","toDigits","toFixed","toFormat","arr","split","g1","g2","intPart","fractionPart","intDigits","substr","toFraction","md","d0","d2","exp","n0","n1","d1","toNumber","toPower","parseFloat","toPrecision","truncated","trunc","valueOf","toJSON","isBigNumber","l","obj","Object","arrL","define","amd","module","exports","self","Function"],"mappings":";CAEC,SAAWA,GACR,YAqCA,SAASC,GAAmBC,GAiHxB,QAASC,GAAWC,EAAGC,GACnB,GAAIC,GAAGC,EAAGC,EAAGC,EAAKC,EAAKC,EACnBC,EAAIC,IAGR,MAAQD,YAAaT,IAIjB,MADIW,IAAQC,EAAO,GAAI,+BAAgCX,GAChD,GAAID,GAAWC,EAAGC,EAK7B,IAAU,MAALA,GAAcW,EAAYX,EAAG,EAAG,GAAIY,EAAI,QA4BtC,CAMH,GALAZ,EAAQ,EAAJA,EACJM,EAAMP,EAAI,GAIA,IAALC,EAED,MADAO,GAAI,GAAIT,GAAWC,YAAaD,GAAYC,EAAIO,GACzCO,EAAON,EAAGO,EAAiBP,EAAEL,EAAI,EAAGa,EAK/C,KAAOX,EAAkB,gBAALL,KAAuB,EAAJA,GAAS,IAC7C,GAAMiB,QAAQ,OAAUf,EAAI,IAAMgB,EAASC,MAAO,EAAGlB,GAAM,MAC1D,SAAWC,EAAI,MAAU,GAAJD,EAAS,IAAM,IAAOmB,KAAKb,GAChD,MAAOc,GAAcb,EAAGD,EAAKF,EAAKJ,EAGlCI,IACAG,EAAEc,EAAY,EAAR,EAAItB,GAAUO,EAAMA,EAAIY,MAAM,GAAI,IAAO,EAE1CT,GAAUH,EAAIgB,QAAS,YAAa,IAAKC,OAAS,IAGnDb,EAAOE,EAAIY,EAAezB,GAI9BK,GAAM,GAENG,EAAEc,EAA0B,KAAtBf,EAAImB,WAAW,IAAcnB,EAAMA,EAAIY,MAAM,GAAI,IAAO,EAGlEZ,EAAMoB,EAAapB,EAAK,GAAIN,EAAGO,EAAEc,OA9DmB,CAGpD,GAAKtB,YAAaD,GAKd,MAJAS,GAAEc,EAAItB,EAAEsB,EACRd,EAAEL,EAAIH,EAAEG,EACRK,EAAEN,GAAMF,EAAIA,EAAEE,GAAMF,EAAEmB,QAAUnB,OAChCa,EAAK,EAIT,KAAOR,EAAkB,gBAALL,KAAuB,EAAJA,GAAS,EAAI,CAIhD,GAHAQ,EAAEc,EAAY,EAAR,EAAItB,GAAUA,GAAKA,EAAG,IAAO,EAG9BA,MAAQA,EAAI,CACb,IAAMG,EAAI,EAAGC,EAAIJ,EAAGI,GAAK,GAAIA,GAAK,GAAID,KAItC,MAHAK,GAAEL,EAAIA,EACNK,EAAEN,GAAKF,QACPa,EAAK,GAITN,EAAMP,EAAI,OACP,CACH,IAAM4B,EAAUR,KAAMb,EAAMP,EAAI,IAAO,MAAOqB,GAAcb,EAAGD,EAAKF,EACpEG,GAAEc,EAA0B,KAAtBf,EAAImB,WAAW,IAAcnB,EAAMA,EAAIY,MAAM,GAAI,IAAO,GAwDtE,KAhBOhB,EAAII,EAAIsB,QAAQ,MAAS,KAAKtB,EAAMA,EAAIgB,QAAS,IAAK,MAGtDnB,EAAIG,EAAIuB,OAAQ,OAAW,GAGrB,EAAJ3B,IAAQA,EAAIC,GACjBD,IAAMI,EAAIY,MAAOf,EAAI,GACrBG,EAAMA,EAAIwB,UAAW,EAAG3B,IACZ,EAAJD,IAGRA,EAAII,EAAIiB,QAINpB,EAAI,EAAyB,KAAtBG,EAAImB,WAAWtB,GAAWA,KAGvC,IAAME,EAAMC,EAAIiB,OAAkC,KAA1BjB,EAAImB,aAAapB,KAGzC,GAFAC,EAAMA,EAAIY,MAAOf,EAAGE,EAAM,GActB,GAXAA,EAAMC,EAAIiB,OAILnB,GAAOK,GAAUJ,EAAM,KAAQN,EAAIgC,GAAoBhC,IAAMiC,EAAUjC,KACxEW,EAAOE,EAAIY,EAAejB,EAAEc,EAAItB,GAGpCG,EAAIA,EAAIC,EAAI,EAGPD,EAAI+B,EAGL1B,EAAEN,EAAIM,EAAEL,EAAI,SAGT,IAASgC,EAAJhC,EAGRK,EAAEN,GAAMM,EAAEL,EAAI,OACX,CAWH,GAVAK,EAAEL,EAAIA,EACNK,EAAEN,KAMFE,GAAMD,EAAI,GAAMiC,EACP,EAAJjC,IAAQC,GAAKgC,GAET9B,EAAJF,EAAU,CAGX,IAFIA,GAAGI,EAAEN,EAAEmC,MAAO9B,EAAIY,MAAO,EAAGf,IAE1BE,GAAO8B,EAAc9B,EAAJF,GACnBI,EAAEN,EAAEmC,MAAO9B,EAAIY,MAAOf,EAAGA,GAAKgC,GAGlC7B,GAAMA,EAAIY,MAAMf,GAChBA,EAAIgC,EAAW7B,EAAIiB,WAEnBpB,IAAKE,CAGT,MAAQF,IAAKG,GAAO,KACpBC,EAAEN,EAAEmC,MAAO9B,OAKfC,GAAEN,GAAMM,EAAEL,EAAI,EAGlBU,GAAK,EA2VT,QAASc,GAAapB,EAAK+B,EAASC,EAAQC,GACxC,GAAIC,GAAGtC,EAAGuC,EAAGC,EAAGnC,EAAGoC,EAAIC,EACnBzC,EAAIG,EAAIsB,QAAS,KACjBiB,EAAK/B,EACLgC,EAAK/B,CA0BT,KAxBc,GAATuB,IAAchC,EAAMA,EAAIyC,eAGxB5C,GAAK,IACNsC,EAAIO,EAGJA,EAAgB,EAChB1C,EAAMA,EAAIgB,QAAS,IAAK,IACxBsB,EAAI,GAAI9C,GAAUwC,GAClB/B,EAAIqC,EAAEK,IAAK3C,EAAIiB,OAASpB,GACxB6C,EAAgBP,EAIhBG,EAAE3C,EAAIiD,EAAWC,EAAcC,EAAe7C,EAAEN,GAAKM,EAAEL,GAAK,GAAImC,GAChEO,EAAE1C,EAAI0C,EAAE3C,EAAEsB,QAIdoB,EAAKO,EAAW5C,EAAKgC,EAAQD,GAC7BnC,EAAIuC,EAAIE,EAAGpB,OAGQ,GAAXoB,IAAKF,GAASE,EAAGU,OACzB,IAAMV,EAAG,GAAK,MAAO,GA2BrB,IAzBS,EAAJxC,IACCD,GAEFK,EAAEN,EAAI0C,EACNpC,EAAEL,EAAIA,EAGNK,EAAEc,EAAIkB,EACNhC,EAAI+C,EAAK/C,EAAGqC,EAAGC,EAAIC,EAAIT,GACvBM,EAAKpC,EAAEN,EACPyC,EAAInC,EAAEmC,EACNxC,EAAIK,EAAEL,GAGVsC,EAAItC,EAAI2C,EAAK,EAGb1C,EAAIwC,EAAGH,GACPC,EAAIJ,EAAU,EACdK,EAAIA,GAAS,EAAJF,GAAsB,MAAbG,EAAGH,EAAI,GAEzBE,EAAS,EAALI,GAAgB,MAAL3C,GAAauC,KAAe,GAANI,GAAWA,IAAQvC,EAAEc,EAAI,EAAI,EAAI,IACzDlB,EAAIsC,GAAKtC,GAAKsC,IAAY,GAANK,GAAWJ,GAAW,GAANI,GAAuB,EAAZH,EAAGH,EAAI,IACtDM,IAAQvC,EAAEc,EAAI,EAAI,EAAI,IAE1B,EAAJmB,IAAUG,EAAG,GAGdrC,EAAMoC,EAAIS,EAAc,KAAMN,GAAO,QAClC,CAGH,GAFAF,EAAGpB,OAASiB,EAERE,EAGA,MAAQL,IAAWM,IAAKH,GAAKH,GACzBM,EAAGH,GAAK,EAEFA,MACAtC,EACFyC,GAAM,GAAGY,OAAOZ,GAM5B,KAAMF,EAAIE,EAAGpB,QAASoB,IAAKF,KAG3B,IAAMtC,EAAI,EAAGG,EAAM,GAASmC,GAALtC,EAAQG,GAAOW,EAASuC,OAAQb,EAAGxC,OAC1DG,EAAM6C,EAAc7C,EAAKJ,GAI7B,MAAOI,GA4QX,QAASmD,GAAQ1D,EAAGI,EAAG2C,EAAIY,GACvB,GAAIC,GAAIzD,EAAG0D,EAAIvD,EAAKC,CAKpB,IAHAwC,EAAW,MAANA,GAAcnC,EAAYmC,EAAI,EAAG,EAAGY,EAAQG,GACxC,EAALf,EAAS/B,GAEPhB,EAAEE,EAAI,MAAOF,GAAE+D,UAIrB,IAHAH,EAAK5D,EAAEE,EAAE,GACT2D,EAAK7D,EAAEG,EAEG,MAALC,EACDG,EAAM8C,EAAerD,EAAEE,GACvBK,EAAgB,IAAVoD,GAA0B,IAAVA,GAAsBK,GAANH,EAClCI,EAAe1D,EAAKsD,GACpBT,EAAc7C,EAAKsD,OAevB,IAbA7D,EAAIc,EAAO,GAAIf,GAAUC,GAAII,EAAG2C,GAGhC5C,EAAIH,EAAEG,EAENI,EAAM8C,EAAerD,EAAEE,GACvBI,EAAMC,EAAIiB,OAOK,IAAVmC,GAA0B,IAAVA,IAAuBxD,GAALC,GAAe4D,GAAL7D,GAAoB,CAGjE,KAAcC,EAANE,EAASC,GAAO,IAAKD,KAC7BC,EAAM0D,EAAe1D,EAAKJ,OAQ1B,IAJAC,GAAKyD,EACLtD,EAAM6C,EAAc7C,EAAKJ,GAGpBA,EAAI,EAAIG,GACT,KAAOF,EAAI,EAAI,IAAMG,GAAO,IAAKH,IAAKG,GAAO,UAG7C,IADAH,GAAKD,EAAIG,EACJF,EAAI,EAEL,IADKD,EAAI,GAAKG,IAAMC,GAAO,KACnBH,IAAKG,GAAO,KAMpC,MAAOP,GAAEsB,EAAI,GAAKsC,EAAK,IAAMrD,EAAMA,EAKvC,QAAS2D,GAAUC,EAAMC,GACrB,GAAIC,GAAGrE,EACHI,EAAI,CAKR,KAHKkE,EAASH,EAAK,MAAOA,EAAOA,EAAK,IACtCE,EAAI,GAAItE,GAAWoE,EAAK,MAEd/D,EAAI+D,EAAK3C,QAAU,CAIzB,GAHAxB,EAAI,GAAID,GAAWoE,EAAK/D,KAGlBJ,EAAEsB,EAAI,CACR+C,EAAIrE,CACJ,OACQoE,EAAOG,KAAMF,EAAGrE,KACxBqE,EAAIrE,GAIZ,MAAOqE,GAQX,QAASG,GAAwBxE,EAAGyE,EAAKC,EAAKf,EAAQgB,GAMlD,OALSF,EAAJzE,GAAWA,EAAI0E,GAAO1E,GAAK4E,EAAS5E,KACrCW,EAAOgD,GAAUgB,GAAQ,mBACjBF,EAAJzE,GAAWA,EAAI0E,EAAM,gBAAkB,mBAAqB1E,IAG7D,EAQX,QAAS6E,GAAW7E,EAAGE,EAAGC,GAKtB,IAJA,GAAIC,GAAI,EACJ0E,EAAI5E,EAAEsB,QAGDtB,IAAI4E,GAAI5E,EAAEoD,OAGnB,IAAMwB,EAAI5E,EAAE,GAAI4E,GAAK,GAAIA,GAAK,GAAI1E,KAkBlC,OAfOD,EAAIC,EAAID,EAAIiC,EAAW,GAAMF,EAGhClC,EAAEE,EAAIF,EAAEG,EAAI,KAGAgC,EAAJhC,EAGRH,EAAEE,GAAMF,EAAEG,EAAI,IAEdH,EAAEG,EAAIA,EACNH,EAAEE,EAAIA,GAGHF,EAmDX,QAASW,GAAOgD,EAAQoB,EAAKC,GACzB,GAAIC,GAAQ,GAAIC,QACZ,gBACA,MACA,SACA,MACA,WACA,KACA,KACA,MACA,KACA,MACA,QACA,MACA,OACA,YACA,SACA,QACA,QACA,QACA,WACA,gBACA,UACA,WACA,aACA,MACA,cACA,WACA,aACFvB,GAAU,MAAQoB,EAAM,KAAOC,EAIjC,MAFAC,GAAMN,KAAO,kBACb9D,EAAK,EACCoE,EAQV,QAASnE,GAAON,EAAG2E,EAAIpC,EAAIJ,GACvB,GAAIF,GAAGrC,EAAG0E,EAAGpC,EAAG1C,EAAGoF,EAAIC,EACnBzC,EAAKpC,EAAEN,EACPoF,EAASC,CAGb,IAAI3C,EAAI,CAQJ4C,EAAK,CAGD,IAAM/C,EAAI,EAAGC,EAAIE,EAAG,GAAIF,GAAK,GAAIA,GAAK,GAAID,KAI1C,GAHArC,EAAI+E,EAAK1C,EAGA,EAAJrC,EACDA,GAAKgC,EACL0C,EAAIK,EACJnF,EAAI4C,EAAIwC,EAAK,GAGbC,EAAKrF,EAAIsF,EAAQ7C,EAAIqC,EAAI,GAAM,GAAK,MAIpC,IAFAM,EAAKK,GAAYrF,EAAI,GAAMgC,GAEtBgD,GAAMxC,EAAGpB,OAAS,CAEnB,IAAImB,EASA,KAAM6C,EANN,MAAQ5C,EAAGpB,QAAU4D,EAAIxC,EAAGP,KAAK,IACjCrC,EAAIqF,EAAK,EACT5C,EAAI,EACJrC,GAAKgC,EACL0C,EAAI1E,EAAIgC,EAAW,MAIpB,CAIH,IAHApC,EAAI0C,EAAIE,EAAGwC,GAGL3C,EAAI,EAAGC,GAAK,GAAIA,GAAK,GAAID,KAG/BrC,GAAKgC,EAIL0C,EAAI1E,EAAIgC,EAAWK,EAGnB4C,EAAS,EAAJP,EAAQ,EAAI9E,EAAIsF,EAAQ7C,EAAIqC,EAAI,GAAM,GAAK,EAmBxD,GAfAnC,EAAIA,GAAU,EAALwC,GAKO,MAAdvC,EAAGwC,EAAK,KAAoB,EAAJN,EAAQ9E,EAAIA,EAAIsF,EAAQ7C,EAAIqC,EAAI,IAE1DnC,EAAS,EAALI,GACEsC,GAAM1C,KAAe,GAANI,GAAWA,IAAQvC,EAAEc,EAAI,EAAI,EAAI,IAClD+D,EAAK,GAAW,GAANA,IAAmB,GAANtC,GAAWJ,GAAW,GAANI,IAGnC3C,EAAI,EAAI0E,EAAI,EAAI9E,EAAIsF,EAAQ7C,EAAIqC,GAAM,EAAIlC,EAAGwC,EAAK,IAAO,GAAO,GAClErC,IAAQvC,EAAEc,EAAI,EAAI,EAAI,IAElB,EAAL6D,IAAWvC,EAAG,GAiBf,MAhBAA,GAAGpB,OAAS,EAERmB,GAGAwC,GAAM3E,EAAEL,EAAI,EAGZyC,EAAG,GAAK0C,GAAUlD,EAAW+C,EAAK/C,GAAaA,GAC/C5B,EAAEL,GAAKgF,GAAM,GAIbvC,EAAG,GAAKpC,EAAEL,EAAI,EAGXK,CAkBX,IAdU,GAALJ,GACDwC,EAAGpB,OAAS4D,EACZ1C,EAAI,EACJ0C,MAEAxC,EAAGpB,OAAS4D,EAAK,EACjB1C,EAAI4C,EAAQlD,EAAWhC,GAIvBwC,EAAGwC,GAAMN,EAAI,EAAI7C,EAAWjC,EAAIsF,EAAQ7C,EAAIqC,GAAMQ,EAAOR,IAAOpC,EAAI,GAIpEC,EAEA,OAAY,CAGR,GAAW,GAANyC,EAAU,CAGX,IAAMhF,EAAI,EAAG0E,EAAIlC,EAAG,GAAIkC,GAAK,GAAIA,GAAK,GAAI1E,KAE1C,IADA0E,EAAIlC,EAAG,IAAMF,EACPA,EAAI,EAAGoC,GAAK,GAAIA,GAAK,GAAIpC,KAG1BtC,GAAKsC,IACNlC,EAAEL,IACGyC,EAAG,IAAM8C,IAAO9C,EAAG,GAAK,GAGjC,OAGA,GADAA,EAAGwC,IAAO1C,EACLE,EAAGwC,IAAOM,EAAO,KACtB9C,GAAGwC,KAAQ,EACX1C,EAAI,EAMhB,IAAMtC,EAAIwC,EAAGpB,OAAoB,IAAZoB,IAAKxC,GAAUwC,EAAGU,QAItC9C,EAAEL,EAAI+B,EACP1B,EAAEN,EAAIM,EAAEL,EAAI,KAGJK,EAAEL,EAAIgC,IACd3B,EAAEN,GAAMM,EAAEL,EAAI,IAItB,MAAOK,GA9zCX,GAAI+C,GAAKlC,EAGLR,EAAK,EACL8E,EAAI5F,EAAU6F,UACdC,EAAM,GAAI9F,GAAU,GAYpBgB,EAAiB,GAejBC,EAAgB,EAMhBgD,EAAa,GAIb8B,EAAa,GAMb3D,EAAU,KAKVD,EAAU,IAGVxB,GAAS,EAGTE,EAAa4D,EAGbuB,GAAS,EAoBTC,EAAc,EAId/C,EAAgB,EAGhBgD,GACIC,iBAAkB,IAClBC,eAAgB,IAChBC,UAAW,EACXC,mBAAoB,EACpBC,uBAAwB,IACxBC,kBAAmB,EAm3E3B,OA9rEAxG,GAAUyG,QAAU3G,EAEpBE,EAAU0G,SAAW,EACrB1G,EAAU2G,WAAa,EACvB3G,EAAU4G,WAAa,EACvB5G,EAAU6G,YAAc,EACxB7G,EAAU8G,cAAgB,EAC1B9G,EAAU+G,gBAAkB,EAC5B/G,EAAUgH,gBAAkB,EAC5BhH,EAAUiH,gBAAkB,EAC5BjH,EAAUkH,iBAAmB,EAC7BlH,EAAUmH,OAAS,EAoCnBnH,EAAUD,OAASC,EAAUoH,IAAM,WAC/B,GAAIC,GAAGC,EACHjH,EAAI,EACJuC,KACA2E,EAAIC,UACJC,EAAIF,EAAE,GACNG,EAAMD,GAAiB,gBAALA,GACd,WAAc,MAAKA,GAAEE,eAAeL,GAA4B,OAAdD,EAAII,EAAEH,IAA1C,QACd,WAAc,MAAKC,GAAE9F,OAASpB,EAA6B,OAAhBgH,EAAIE,EAAElH,MAAnC,OAuHtB,OAlHKqH,GAAKJ,EAAI,mBAAsBzG,EAAYwG,EAAG,EAAGO,EAAK,EAAGN,KAC1DtG,EAAqB,EAAJqG,GAErBzE,EAAE0E,GAAKtG,EAKF0G,EAAKJ,EAAI,kBAAqBzG,EAAYwG,EAAG,EAAG,EAAG,EAAGC,KACvDrG,EAAoB,EAAJoG,GAEpBzE,EAAE0E,GAAKrG,EAMFyG,EAAKJ,EAAI,oBAEL/C,EAAQ8C,GACJxG,EAAYwG,EAAE,IAAKO,EAAK,EAAG,EAAGN,IAAOzG,EAAYwG,EAAE,GAAI,EAAGO,EAAK,EAAGN,KACnErD,EAAoB,EAAPoD,EAAE,GACftB,EAAoB,EAAPsB,EAAE,IAEXxG,EAAYwG,GAAIO,EAAKA,EAAK,EAAGN,KACrCrD,IAAgB8B,EAAkC,GAAf,EAAJsB,GAASA,EAAIA,MAGpDzE,EAAE0E,IAAOrD,EAAY8B,GAOhB2B,EAAKJ,EAAI,WAEL/C,EAAQ8C,GACJxG,EAAYwG,EAAE,IAAKO,EAAK,GAAI,EAAGN,IAAOzG,EAAYwG,EAAE,GAAI,EAAGO,EAAK,EAAGN,KACpElF,EAAiB,EAAPiF,EAAE,GACZlF,EAAiB,EAAPkF,EAAE,IAERxG,EAAYwG,GAAIO,EAAKA,EAAK,EAAGN,KAC5B,EAAJD,EAAQjF,IAAaD,EAA+B,GAAf,EAAJkF,GAASA,EAAIA,IAC1C1G,GAAQC,EAAO,EAAG0G,EAAI,kBAAmBD,KAG1DzE,EAAE0E,IAAOlF,EAASD,GAIbuF,EAAKJ,EAAI,YAELD,MAAQA,GAAW,IAANA,GAAiB,IAANA,GACzBvG,EAAK,EACLD,GAAeF,IAAW0G,GAAM5C,EAAyBoD,GAClDlH,GACPC,EAAO,EAAG0G,EAAIQ,EAAST,IAG/BzE,EAAE0E,GAAK3G,EAKF+G,EAAKJ,EAAI,YAELD,KAAM,GAAQA,KAAM,GAAe,IAANA,GAAiB,IAANA,EACrCA,GACAA,EAAqB,mBAAVU,SACLV,GAAKU,SAAWA,OAAOC,iBAAmBD,OAAOE,aACnDjC,GAAS,EACFrF,EACPC,EAAO,EAAG,qBAAsByG,EAAI,OAASU,QAE7C/B,GAAS,GAGbA,GAAS,EAENrF,GACPC,EAAO,EAAG0G,EAAIQ,EAAST,IAG/BzE,EAAE0E,GAAKtB,EAKF0B,EAAKJ,EAAI,gBAAmBzG,EAAYwG,EAAG,EAAG,EAAG,EAAGC,KACrDrB,EAAkB,EAAJoB,GAElBzE,EAAE0E,GAAKrB,EAKFyB,EAAKJ,EAAI,kBAAqBzG,EAAYwG,EAAG,EAAGO,EAAK,EAAGN,KACzDpE,EAAoB,EAAJmE,GAEpBzE,EAAE0E,GAAKpE,EAIFwE,EAAKJ,EAAI,YAEO,gBAALD,GACRnB,EAASmB,EACF1G,GACPC,EAAO,EAAG0G,EAAI,iBAAkBD,IAGxCzE,EAAE0E,GAAKpB,EAEAtD,GASX5C,EAAU2E,IAAM,WAAc,MAAOR,GAAUqD,UAAW5B,EAAEsC,KAQ5DlI,EAAU0E,IAAM,WAAc,MAAOP,GAAUqD,UAAW5B,EAAEuC,KAc5DnI,EAAUoI,OAAS,WACf,GAAIC,GAAU,iBAMVC,EAAkBC,KAAKH,SAAWC,EAAW,QAC7C,WAAc,MAAOnG,GAAWqG,KAAKH,SAAWC,IAChD,WAAc,MAA2C,UAAlB,WAAhBE,KAAKH,SAAwB,IACjC,QAAhBG,KAAKH,SAAsB,GAElC,OAAO,UAAUrF,GACb,GAAIwE,GAAGrH,EAAGE,EAAGuC,EAAG0E,EACZhH,EAAI,EACJF,KACAqI,EAAO,GAAIxI,GAAU8F,EAKzB,IAHA/C,EAAW,MAANA,GAAelC,EAAYkC,EAAI,EAAG6E,EAAK,IAA6B,EAAL7E,EAAjB/B,EACnD2B,EAAI+C,EAAU3C,EAAKV,GAEf2D,EAGA,GAAI+B,OAAOC,gBAAiB,CAIxB,IAFAT,EAAIQ,OAAOC,gBAAiB,GAAIS,aAAa9F,GAAK,IAEtCA,EAAJtC,GAQJgH,EAAW,OAAPE,EAAElH,IAAgBkH,EAAElH,EAAI,KAAO,IAM9BgH,GAAK,MACNnH,EAAI6H,OAAOC,gBAAiB,GAAIS,aAAY,IAC5ClB,EAAElH,GAAKH,EAAE,GACTqH,EAAElH,EAAI,GAAKH,EAAE,KAKbC,EAAEmC,KAAM+E,EAAI,MACZhH,GAAK,EAGbA,GAAIsC,EAAI,MAGL,IAAIoF,OAAOE,YAAa,CAK3B,IAFAV,EAAIQ,OAAOE,YAAatF,GAAK,GAEjBA,EAAJtC,GAMJgH,EAAsB,iBAAP,GAAPE,EAAElH,IAA6C,cAAXkH,EAAElH,EAAI,GAC/B,WAAXkH,EAAElH,EAAI,GAAkC,SAAXkH,EAAElH,EAAI,IACnCkH,EAAElH,EAAI,IAAM,KAASkH,EAAElH,EAAI,IAAM,GAAMkH,EAAElH,EAAI,GAEhDgH,GAAK,KACNU,OAAOE,YAAY,GAAGS,KAAMnB,EAAGlH,IAI/BF,EAAEmC,KAAM+E,EAAI,MACZhH,GAAK,EAGbA,GAAIsC,EAAI,MAERqD,IAAS,EACLrF,GAAQC,EAAO,GAAI,qBAAsBmH,OAKrD,KAAK/B,EAED,KAAYrD,EAAJtC,GACJgH,EAAIiB,IACK,KAAJjB,IAAWlH,EAAEE,KAAOgH,EAAI,KAcrC,KAVA1E,EAAIxC,IAAIE,GACR0C,GAAMV,EAGDM,GAAKI,IACNsE,EAAI7B,EAASnD,EAAWU,GACxB5C,EAAEE,GAAK6B,EAAWS,EAAI0E,GAAMA,GAIf,IAATlH,EAAEE,GAAUF,EAAEoD,MAAOlD,KAG7B,GAAS,EAAJA,EACDF,GAAMC,EAAI,OACP,CAGH,IAAMA,EAAI,GAAc,IAATD,EAAE,GAAUA,EAAEwI,OAAO,EAAG,GAAIvI,GAAKiC,GAGhD,IAAMhC,EAAI,EAAGgH,EAAIlH,EAAE,GAAIkH,GAAK,GAAIA,GAAK,GAAIhH,KAGhCgC,EAAJhC,IAAeD,GAAKiC,EAAWhC,GAKxC,MAFAmI,GAAKpI,EAAIA,EACToI,EAAKrI,EAAIA,EACFqI,MAqGfhF,EAAM,WAGF,QAASoF,GAAUnI,EAAGkC,EAAGkG,GACrB,GAAIvE,GAAGwE,EAAMC,EAAKC,EACdC,EAAQ,EACR5I,EAAII,EAAEgB,OACNyH,EAAMvG,EAAIwG,EACVC,EAAMzG,EAAIwG,EAAY,CAE1B,KAAM1I,EAAIA,EAAEW,QAASf,KACjB0I,EAAMtI,EAAEJ,GAAK8I,EACbH,EAAMvI,EAAEJ,GAAK8I,EAAY,EACzB7E,EAAI8E,EAAML,EAAMC,EAAME,EACtBJ,EAAOI,EAAMH,EAAUzE,EAAI6E,EAAcA,EAAcF,EACvDA,GAAUH,EAAOD,EAAO,IAAQvE,EAAI6E,EAAY,GAAMC,EAAMJ,EAC5DvI,EAAEJ,GAAKyI,EAAOD,CAKlB,OAFII,KAAOxI,GAAKwI,GAAOxF,OAAOhD,IAEvBA,EAGX,QAAS4I,GAAS9B,EAAGrH,EAAGoJ,EAAIC,GACxB,GAAIlJ,GAAGmJ,CAEP,IAAKF,GAAMC,EACPC,EAAMF,EAAKC,EAAK,EAAI,OAGpB,KAAMlJ,EAAImJ,EAAM,EAAOF,EAAJjJ,EAAQA,IAEvB,GAAKkH,EAAElH,IAAMH,EAAEG,GAAK,CAChBmJ,EAAMjC,EAAElH,GAAKH,EAAEG,GAAK,EAAI,EACxB,OAIZ,MAAOmJ,GAGX,QAASC,GAAUlC,EAAGrH,EAAGoJ,EAAIT,GAIzB,IAHA,GAAIxI,GAAI,EAGAiJ,KACJ/B,EAAE+B,IAAOjJ,EACTA,EAAIkH,EAAE+B,GAAMpJ,EAAEoJ,GAAM,EAAI,EACxB/B,EAAE+B,GAAMjJ,EAAIwI,EAAOtB,EAAE+B,GAAMpJ,EAAEoJ,EAIjC,OAAS/B,EAAE,IAAMA,EAAE9F,OAAS,EAAG8F,EAAEoB,OAAO,EAAG,KAI/C,MAAO,UAAWlI,EAAGqC,EAAGC,EAAIC,EAAI6F,GAC5B,GAAIW,GAAKpJ,EAAGC,EAAGqJ,EAAMzJ,EAAG0J,EAAMC,EAAOC,EAAGC,EAAIC,EAAKC,EAAMC,EAAMC,EAAIC,EAAIC,EACjEC,EAAIC,EACJ/I,EAAId,EAAEc,GAAKuB,EAAEvB,EAAI,EAAI,GACrBsB,EAAKpC,EAAEN,EACPoK,EAAKzH,EAAE3C,CAGX,MAAM0C,GAAOA,EAAG,IAAO0H,GAAOA,EAAG,IAE7B,MAAO,IAAIvK,GAGRS,EAAEc,GAAMuB,EAAEvB,IAAOsB,GAAK0H,GAAM1H,EAAG,IAAM0H,EAAG,GAAMA,GAG7C1H,GAAe,GAATA,EAAG,KAAY0H,EAAS,EAAJhJ,EAAQA,EAAI,EAHciJ,IAoB5D,KAbAX,EAAI,GAAI7J,GAAUuB,GAClBuI,EAAKD,EAAE1J,KACPC,EAAIK,EAAEL,EAAI0C,EAAE1C,EACZmB,EAAIwB,EAAK3C,EAAI,EAEPyI,IACFA,EAAOlD,EACPvF,EAAIqK,EAAUhK,EAAEL,EAAIiC,GAAaoI,EAAU3H,EAAE1C,EAAIiC,GACjDd,EAAIA,EAAIc,EAAW,GAKjBhC,EAAI,EAAGkK,EAAGlK,KAAQwC,EAAGxC,IAAM,GAAKA,KAGtC,GAFKkK,EAAGlK,IAAOwC,EAAGxC,IAAM,IAAMD,IAErB,EAAJmB,EACDuI,EAAGxH,KAAK,GACRoH,GAAO,MACJ,CAwBH,IAvBAS,EAAKtH,EAAGpB,OACR4I,EAAKE,EAAG9I,OACRpB,EAAI,EACJkB,GAAK,EAILtB,EAAIiC,EAAW2G,GAAS0B,EAAG,GAAK,IAI3BtK,EAAI,IACLsK,EAAK3B,EAAU2B,EAAItK,EAAG4I,GACtBhG,EAAK+F,EAAU/F,EAAI5C,EAAG4I,GACtBwB,EAAKE,EAAG9I,OACR0I,EAAKtH,EAAGpB,QAGZyI,EAAKG,EACLN,EAAMlH,EAAGzB,MAAO,EAAGiJ,GACnBL,EAAOD,EAAItI,OAGI4I,EAAPL,EAAWD,EAAIC,KAAU,GACjCM,EAAKC,EAAGnJ,QACRkJ,GAAM,GAAG7G,OAAO6G,GAChBF,EAAMG,EAAG,GACJA,EAAG,IAAM1B,EAAO,GAAIuB,GAIzB,GAAG,CAOC,GANAnK,EAAI,EAGJuJ,EAAMH,EAASkB,EAAIR,EAAKM,EAAIL,GAGjB,EAANR,EAAU,CAkBX,GAdAS,EAAOF,EAAI,GACNM,GAAML,IAAOC,EAAOA,EAAOpB,GAASkB,EAAI,IAAM,IAGnD9J,EAAIiC,EAAW+H,EAAOG,GAUjBnK,EAAI,EAeL,IAZIA,GAAK4I,IAAM5I,EAAI4I,EAAO,GAG1Bc,EAAOf,EAAU2B,EAAItK,EAAG4I,GACxBe,EAAQD,EAAKlI,OACbuI,EAAOD,EAAItI,OAOkC,GAArC4H,EAASM,EAAMI,EAAKH,EAAOI,IAC/B/J,IAGAwJ,EAAUE,EAAWC,EAALS,EAAaC,EAAKC,EAAIX,EAAOf,GAC7Ce,EAAQD,EAAKlI,OACb+H,EAAM,MAQA,IAALvJ,IAGDuJ,EAAMvJ,EAAI,GAId0J,EAAOY,EAAGnJ,QACVwI,EAAQD,EAAKlI,MAUjB,IAPauI,EAARJ,IAAeD,GAAQ,GAAGlG,OAAOkG,IAGtCF,EAAUM,EAAKJ,EAAMK,EAAMnB,GAC3BmB,EAAOD,EAAItI,OAGC,IAAP+H,EAMD,KAAQH,EAASkB,EAAIR,EAAKM,EAAIL,GAAS,GACnC/J,IAGAwJ,EAAUM,EAAUC,EAALK,EAAYC,EAAKC,EAAIP,EAAMnB,GAC1CmB,EAAOD,EAAItI,WAGH,KAAR+H,IACRvJ,IACA8J,GAAO,GAIXD,GAAGzJ,KAAOJ,EAGL8J,EAAI,GACLA,EAAIC,KAAUnH,EAAGqH,IAAO,GAExBH,GAAQlH,EAAGqH,IACXF,EAAO,UAEHE,IAAOC,GAAgB,MAAVJ,EAAI,KAAgBxI,IAE7CmI,GAAiB,MAAVK,EAAI,GAGLD,EAAG,IAAKA,EAAGnB,OAAO,EAAG,GAG/B,GAAKE,GAAQlD,EAAO,CAGhB,IAAMtF,EAAI,EAAGkB,EAAIuI,EAAG,GAAIvI,GAAK,GAAIA,GAAK,GAAIlB,KAC1CU,EAAO8I,EAAG9G,GAAO8G,EAAEzJ,EAAIC,EAAID,EAAIiC,EAAW,GAAM,EAAGW,EAAI0G,OAIvDG,GAAEzJ,EAAIA,EACNyJ,EAAEjH,GAAK8G,CAGX,OAAOG,OAgJfvI,EAAe,WACX,GAAIoJ,GAAa,8BACbC,EAAW,cACXC,EAAY,cACZC,EAAkB,qBAClBC,EAAmB,4BAEvB,OAAO,UAAWrK,EAAGD,EAAKF,EAAKJ,GAC3B,GAAI2I,GACAtH,EAAIjB,EAAME,EAAMA,EAAIgB,QAASsJ,EAAkB,GAGnD,IAAKD,EAAgBxJ,KAAKE,GACtBd,EAAEc,EAAIwJ,MAAMxJ,GAAK,KAAW,EAAJA,EAAQ,GAAK,MAClC,CACH,IAAMjB,IAGFiB,EAAIA,EAAEC,QAASkJ,EAAY,SAAWpG,EAAG0G,EAAIC,GAEzC,MADApC,GAAoC,MAA3BoC,EAAKA,EAAGhI,eAAyB,GAAW,KAANgI,EAAY,EAAI,EACvD/K,GAAKA,GAAK2I,EAAYvE,EAAL0G,IAGzB9K,IACA2I,EAAO3I,EAGPqB,EAAIA,EAAEC,QAASmJ,EAAU,MAAOnJ,QAASoJ,EAAW,SAGnDpK,GAAOe,GAAI,MAAO,IAAIvB,GAAWuB,EAAGsH,EAKzClI,IAAQC,EAAOE,EAAI,SAAYZ,EAAI,SAAWA,EAAI,IAAO,UAAWM,GACxEC,EAAEc,EAAI,KAGVd,EAAEN,EAAIM,EAAEL,EAAI,KACZU,EAAK,MAmNb8E,EAAEsF,cAAgBtF,EAAEuF,IAAM,WACtB,GAAI1K,GAAI,GAAIT,GAAUU,KAEtB,OADKD,GAAEc,EAAI,IAAId,EAAEc,EAAI,GACdd,GAQXmF,EAAEwF,KAAO,WACL,MAAOrK,GAAO,GAAIf,GAAUU,MAAOA,KAAKN,EAAI,EAAG,IAWnDwF,EAAEyF,WAAazF,EAAE4D,IAAM,SAAW1G,EAAG5C,GAEjC,MADAY,GAAK,EACEuI,EAAS3I,KAAM,GAAIV,GAAW8C,EAAG5C,KAQ5C0F,EAAE0F,cAAgB1F,EAAE7C,GAAK,WACrB,GAAI9C,GAAGoH,EACHlH,EAAIO,KAAKP,CAEb,KAAMA,EAAI,MAAO,KAIjB,IAHAF,IAAQoH,EAAIlH,EAAEsB,OAAS,GAAMgJ,EAAU/J,KAAKN,EAAIiC,IAAeA,EAG1DgF,EAAIlH,EAAEkH,GAAK,KAAQA,EAAI,IAAM,EAAGA,GAAK,GAAIpH,KAG9C,MAFS,GAAJA,IAAQA,EAAI,GAEVA,GAwBX2F,EAAE2F,UAAY3F,EAAEpC,IAAM,SAAWV,EAAG5C,GAEhC,MADAY,GAAK,EACE0C,EAAK9C,KAAM,GAAIV,GAAW8C,EAAG5C,GAAKc,EAAgBC,IAQ7D2E,EAAE4F,mBAAqB5F,EAAE6F,SAAW,SAAW3I,EAAG5C,GAE9C,MADAY,GAAK,EACE0C,EAAK9C,KAAM,GAAIV,GAAW8C,EAAG5C,GAAK,EAAG,IAQhD0F,EAAE8F,OAAS9F,EAAE+F,GAAK,SAAW7I,EAAG5C,GAE5B,MADAY,GAAK,EAC6C,IAA3CuI,EAAS3I,KAAM,GAAIV,GAAW8C,EAAG5C,KAQ5C0F,EAAEgG,MAAQ,WACN,MAAO7K,GAAO,GAAIf,GAAUU,MAAOA,KAAKN,EAAI,EAAG,IAQnDwF,EAAEiG,YAAcjG,EAAEuC,GAAK,SAAWrF,EAAG5C,GAEjC,MADAY,GAAK,EACEuI,EAAS3I,KAAM,GAAIV,GAAW8C,EAAG5C,IAAQ,GAQpD0F,EAAEkG,qBAAuBlG,EAAEmG,IAAM,SAAWjJ,EAAG5C,GAE3C,MADAY,GAAK,EACqD,KAAjDZ,EAAImJ,EAAS3I,KAAM,GAAIV,GAAW8C,EAAG5C,MAAuB,IAANA,GAQnE0F,EAAEoG,SAAW,WACT,QAAStL,KAAKP,GAOlByF,EAAEqG,UAAYrG,EAAEsG,MAAQ,WACpB,QAASxL,KAAKP,GAAKsK,EAAU/J,KAAKN,EAAIiC,GAAa3B,KAAKP,EAAEsB,OAAS,GAOvEmE,EAAEmF,MAAQ,WACN,OAAQrK,KAAKa,GAOjBqE,EAAEuG,WAAavG,EAAEwG,MAAQ,WACrB,MAAO1L,MAAKa,EAAI,GAOpBqE,EAAEyG,OAAS,WACP,QAAS3L,KAAKP,GAAkB,GAAbO,KAAKP,EAAE,IAQ9ByF,EAAE0G,SAAW1G,EAAEsC,GAAK,SAAWpF,EAAG5C,GAE9B,MADAY,GAAK,EACEuI,EAAS3I,KAAM,GAAIV,GAAW8C,EAAG5C,IAAQ,GAQpD0F,EAAE2G,kBAAoB3G,EAAE4G,IAAM,SAAW1J,EAAG5C,GAExC,MADAY,GAAK,EACqD,MAAjDZ,EAAImJ,EAAS3I,KAAM,GAAIV,GAAW8C,EAAG5C,MAAwB,IAANA,GAwBpE0F,EAAE6G,MAAQ7G,EAAE8G,IAAM,SAAW5J,EAAG5C,GAC5B,GAAIG,GAAG0E,EAAG4H,EAAGC,EACTnM,EAAIC,KACJ6G,EAAI9G,EAAEc,CAOV,IALAT,EAAK,GACLgC,EAAI,GAAI9C,GAAW8C,EAAG5C,GACtBA,EAAI4C,EAAEvB,GAGAgG,IAAMrH,EAAI,MAAO,IAAIF,GAAUwK,IAGrC,IAAKjD,GAAKrH,EAEN,MADA4C,GAAEvB,GAAKrB,EACAO,EAAEoM,KAAK/J,EAGlB,IAAIgK,GAAKrM,EAAEL,EAAIiC,EACX0K,EAAKjK,EAAE1C,EAAIiC,EACXQ,EAAKpC,EAAEN,EACPoK,EAAKzH,EAAE3C,CAEX,KAAM2M,IAAOC,EAAK,CAGd,IAAMlK,IAAO0H,EAAK,MAAO1H,IAAOC,EAAEvB,GAAKrB,EAAG4C,GAAM,GAAI9C,GAAWuK,EAAK9J,EAAI+J,IAGxE,KAAM3H,EAAG,KAAO0H,EAAG,GAGf,MAAOA,GAAG,IAAOzH,EAAEvB,GAAKrB,EAAG4C,GAAM,GAAI9C,GAAW6C,EAAG,GAAKpC,EAGrC,GAAjBQ,GAAsB,EAAI,GASpC,GALA6L,EAAKrC,EAASqC,GACdC,EAAKtC,EAASsC,GACdlK,EAAKA,EAAGzB,QAGHmG,EAAIuF,EAAKC,EAAK,CAaf,KAXKH,EAAW,EAAJrF,IACRA,GAAKA,EACLoF,EAAI9J,IAEJkK,EAAKD,EACLH,EAAIpC,GAGRoC,EAAEK,UAGI9M,EAAIqH,EAAGrH,IAAKyM,EAAErK,KAAK,IACzBqK,EAAEK,cAMF,KAFAjI,GAAM6H,GAASrF,EAAI1E,EAAGpB,SAAavB,EAAIqK,EAAG9I,SAAa8F,EAAIrH,EAErDqH,EAAIrH,EAAI,EAAO6E,EAAJ7E,EAAOA,IAEpB,GAAK2C,EAAG3C,IAAMqK,EAAGrK,GAAK,CAClB0M,EAAO/J,EAAG3C,GAAKqK,EAAGrK,EAClB,OAYZ,GANI0M,IAAMD,EAAI9J,EAAIA,EAAK0H,EAAIA,EAAKoC,EAAG7J,EAAEvB,GAAKuB,EAAEvB,GAE5CrB,GAAM6E,EAAIwF,EAAG9I,SAAapB,EAAIwC,EAAGpB,QAI5BvB,EAAI,EAAI,KAAQA,IAAK2C,EAAGxC,KAAO,GAIpC,IAHAH,EAAIyF,EAAO,EAGHZ,EAAIwC,GAAK,CAEb,GAAK1E,IAAKkC,GAAKwF,EAAGxF,GAAK,CACnB,IAAM1E,EAAI0E,EAAG1E,IAAMwC,IAAKxC,GAAIwC,EAAGxC,GAAKH,KAClC2C,EAAGxC,GACLwC,EAAGkC,IAAMY,EAGb9C,EAAGkC,IAAMwF,EAAGxF,GAIhB,KAAiB,GAATlC,EAAG,GAASA,EAAG8F,OAAO,EAAG,KAAMoE,GAGvC,MAAMlK,GAAG,GAWFiC,EAAWhC,EAAGD,EAAIkK,IAPrBjK,EAAEvB,EAAqB,GAAjBN,EAAqB,GAAK,EAChC6B,EAAE3C,GAAM2C,EAAE1C,EAAI,GACP0C,IA8Bf8C,EAAEqH,OAASrH,EAAEsH,IAAM,SAAWpK,EAAG5C,GAC7B,GAAI2J,GAAGtI,EACHd,EAAIC,IAMR,OAJAI,GAAK,GACLgC,EAAI,GAAI9C,GAAW8C,EAAG5C,IAGhBO,EAAEN,IAAM2C,EAAEvB,GAAKuB,EAAE3C,IAAM2C,EAAE3C,EAAE,GACtB,GAAIH,GAAUwK,MAGZ1H,EAAE3C,GAAKM,EAAEN,IAAMM,EAAEN,EAAE,GACrB,GAAIH,GAAUS,IAGL,GAAfwF,GAID1E,EAAIuB,EAAEvB,EACNuB,EAAEvB,EAAI,EACNsI,EAAIrG,EAAK/C,EAAGqC,EAAG,EAAG,GAClBA,EAAEvB,EAAIA,EACNsI,EAAEtI,GAAKA,GAEPsI,EAAIrG,EAAK/C,EAAGqC,EAAG,EAAGmD,GAGfxF,EAAEgM,MAAO5C,EAAEsD,MAAMrK,MAQ5B8C,EAAEwH,QAAUxH,EAAEyH,IAAM,WAChB,GAAI5M,GAAI,GAAIT,GAAUU,KAEtB,OADAD,GAAEc,GAAKd,EAAEc,GAAK,KACPd,GAwBXmF,EAAEiH,KAAOjH,EAAE0H,IAAM,SAAWxK,EAAG5C,GAC3B,GAAIyM,GACAlM,EAAIC,KACJ6G,EAAI9G,EAAEc,CAOV,IALAT,EAAK,GACLgC,EAAI,GAAI9C,GAAW8C,EAAG5C,GACtBA,EAAI4C,EAAEvB,GAGAgG,IAAMrH,EAAI,MAAO,IAAIF,GAAUwK,IAGpC,IAAKjD,GAAKrH,EAEP,MADA4C,GAAEvB,GAAKrB,EACAO,EAAEgM,MAAM3J,EAGnB,IAAIgK,GAAKrM,EAAEL,EAAIiC,EACX0K,EAAKjK,EAAE1C,EAAIiC,EACXQ,EAAKpC,EAAEN,EACPoK,EAAKzH,EAAE3C,CAEX,KAAM2M,IAAOC,EAAK,CAGd,IAAMlK,IAAO0H,EAAK,MAAO,IAAIvK,GAAWuH,EAAI,EAI5C,KAAM1E,EAAG,KAAO0H,EAAG,GAAK,MAAOA,GAAG,GAAKzH,EAAI,GAAI9C,GAAW6C,EAAG,GAAKpC,EAAQ,EAAJ8G,GAQ1E,GALAuF,EAAKrC,EAASqC,GACdC,EAAKtC,EAASsC,GACdlK,EAAKA,EAAGzB,QAGHmG,EAAIuF,EAAKC,EAAK,CAUf,IATKxF,EAAI,GACLwF,EAAKD,EACLH,EAAIpC,IAEJhD,GAAKA,EACLoF,EAAI9J,GAGR8J,EAAEK,UACMzF,IAAKoF,EAAErK,KAAK,IACpBqK,EAAEK,UAUN,IAPAzF,EAAI1E,EAAGpB,OACPvB,EAAIqK,EAAG9I,OAGM,EAAR8F,EAAIrH,IAAQyM,EAAIpC,EAAIA,EAAK1H,EAAIA,EAAK8J,EAAGzM,EAAIqH,GAGxCA,EAAI,EAAGrH,GACTqH,GAAM1E,IAAK3C,GAAK2C,EAAG3C,GAAKqK,EAAGrK,GAAKqH,GAAM5B,EAAO,EAC7C9C,EAAG3C,GAAKyF,IAAS9C,EAAG3C,GAAK,EAAI2C,EAAG3C,GAAKyF,CAUzC,OAPI4B,KACA1E,GAAM0E,GAAG9D,OAAOZ,KACdkK,GAKCjI,EAAWhC,EAAGD,EAAIkK,IAS7BnH,EAAE2H,UAAY3H,EAAER,GAAK,SAAUoI,GAC3B,GAAIvN,GAAGoH,EACH5G,EAAIC,KACJP,EAAIM,EAAEN,CAQV,IALU,MAALqN,GAAaA,MAAQA,GAAW,IAANA,GAAiB,IAANA,IAClC7M,GAAQC,EAAO,GAAI,WAAakH,EAAS0F,GACxCA,KAAOA,IAAIA,EAAI,QAGlBrN,EAAI,MAAO,KAIjB,IAHAkH,EAAIlH,EAAEsB,OAAS,EACfxB,EAAIoH,EAAIhF,EAAW,EAEdgF,EAAIlH,EAAEkH,GAAK,CAGZ,KAAQA,EAAI,IAAM,EAAGA,GAAK,GAAIpH,KAG9B,IAAMoH,EAAIlH,EAAE,GAAIkH,GAAK,GAAIA,GAAK,GAAIpH,MAKtC,MAFKuN,IAAK/M,EAAEL,EAAI,EAAIH,IAAIA,EAAIQ,EAAEL,EAAI,GAE3BH,GAiBX2F,EAAE7E,MAAQ,SAAWgC,EAAIC,GACrB,GAAI/C,GAAI,GAAID,GAAUU,KAOtB,QALW,MAANqC,GAAclC,EAAYkC,EAAI,EAAG6E,EAAK,MACvC7G,EAAOd,IAAK8C,EAAKrC,KAAKN,EAAI,EAAS,MAAN4C,GAC1BnC,EAAYmC,EAAI,EAAG,EAAG,GAAIe,GAAsC,EAALf,EAAhB/B,GAG3ChB,GAgBX2F,EAAE6H,MAAQ,SAAU9K,GAChB,GAAI1C,GAAIS,IACR,OAAOG,GAAY8B,GAAIV,EAAkBA,EAAkB,GAAI,YAG3DhC,EAAEkN,MAAO,KAAOtI,EAASlC,IACzB,GAAI3C,GAAWC,EAAEE,GAAKF,EAAEE,EAAE,MAAa8B,EAALU,GAAyBA,EAAIV,GAC7DhC,EAAEsB,GAAU,EAAJoB,EAAQ,EAAI,EAAI,GACxB1C,IAeV2F,EAAE8H,WAAa9H,EAAE+H,KAAO,WACpB,GAAIrJ,GAAGrE,EAAG2C,EAAGgL,EAAKjB,EACdlM,EAAIC,KACJP,EAAIM,EAAEN,EACNoB,EAAId,EAAEc,EACNnB,EAAIK,EAAEL,EACN2C,EAAK/B,EAAiB,EACtB6M,EAAO,GAAI7N,GAAU,MAGzB,IAAW,IAANuB,IAAYpB,IAAMA,EAAE,GACrB,MAAO,IAAIH,IAAYuB,GAAS,EAAJA,KAAYpB,GAAKA,EAAE,IAAOqK,IAAMrK,EAAIM,EAAI,EAAI,EA8B5E,IA1BAc,EAAIgH,KAAKoF,MAAOlN,GAIN,GAALc,GAAUA,GAAK,EAAI,GACpBtB,EAAIqD,EAAcnD,IACXF,EAAEwB,OAASrB,GAAM,GAAK,IAAIH,GAAK,KACtCsB,EAAIgH,KAAKoF,KAAK1N,GACdG,EAAIqK,GAAYrK,EAAI,GAAM,IAAY,EAAJA,GAASA,EAAI,GAE1CmB,GAAK,EAAI,EACVtB,EAAI,KAAOG,GAEXH,EAAIsB,EAAE2C,gBACNjE,EAAIA,EAAEmB,MAAO,EAAGnB,EAAE6B,QAAQ,KAAO,GAAM1B,GAG3CwC,EAAI,GAAI5C,GAAUC,IAElB2C,EAAI,GAAI5C,GAAWuB,EAAI,IAOtBqB,EAAEzC,EAAE,GAML,IALAC,EAAIwC,EAAExC,EACNmB,EAAInB,EAAI2C,EACC,EAAJxB,IAAQA,EAAI,KAOb,GAHAoL,EAAI/J,EACJA,EAAIiL,EAAKV,MAAOR,EAAEE,KAAMrJ,EAAK/C,EAAGkM,EAAG5J,EAAI,KAElCO,EAAeqJ,EAAExM,GAAMiB,MAAO,EAAGG,MAAUtB,EAC3CqD,EAAeV,EAAEzC,IAAMiB,MAAO,EAAGG,GAAM,CAWxC,GANKqB,EAAExC,EAAIA,KAAMmB,EACjBtB,EAAIA,EAAEmB,MAAOG,EAAI,EAAGA,EAAI,GAKd,QAALtB,IAAgB2N,GAAY,QAAL3N,GAgBrB,IAIIA,KAAOA,EAAEmB,MAAM,IAAqB,KAAfnB,EAAEyD,OAAO,MAGjC3C,EAAO6B,EAAGA,EAAExC,EAAIY,EAAiB,EAAG,GACpCsD,GAAK1B,EAAEuK,MAAMvK,GAAG+I,GAAGlL,GAGvB,OAvBA,IAAMmN,IACF7M,EAAO4L,EAAGA,EAAEvM,EAAIY,EAAiB,EAAG,GAE/B2L,EAAEQ,MAAMR,GAAGhB,GAAGlL,IAAK,CACpBmC,EAAI+J,CACJ,OAIR5J,GAAM,EACNxB,GAAK,EACLqM,EAAM,EAkBtB,MAAO7M,GAAO6B,EAAGA,EAAExC,EAAIY,EAAiB,EAAGC,EAAeqD,IAwB9DsB,EAAEuH,MAAQvH,EAAEkI,IAAM,SAAWhL,EAAG5C,GAC5B,GAAIC,GAAGC,EAAGC,EAAG0E,EAAGpC,EAAG2B,EAAGyJ,EAAKhF,EAAKC,EAAKgF,EAAKC,EAAKC,EAAKC,EAChDtF,EAAMuF,EACN3N,EAAIC,KACJmC,EAAKpC,EAAEN,EACPoK,GAAOzJ,EAAK,GAAIgC,EAAI,GAAI9C,GAAW8C,EAAG5C,IAAMC,CAGhD,MAAM0C,GAAO0H,GAAO1H,EAAG,IAAO0H,EAAG,IAmB7B,OAhBM9J,EAAEc,IAAMuB,EAAEvB,GAAKsB,IAAOA,EAAG,KAAO0H,GAAMA,IAAOA,EAAG,KAAO1H,EACzDC,EAAE3C,EAAI2C,EAAE1C,EAAI0C,EAAEvB,EAAI,MAElBuB,EAAEvB,GAAKd,EAAEc,EAGHsB,GAAO0H,GAKTzH,EAAE3C,GAAK,GACP2C,EAAE1C,EAAI,GALN0C,EAAE3C,EAAI2C,EAAE1C,EAAI,MASb0C,CAYX,KATA1C,EAAIqK,EAAUhK,EAAEL,EAAIiC,GAAaoI,EAAU3H,EAAE1C,EAAIiC,GACjDS,EAAEvB,GAAKd,EAAEc,EACTwM,EAAMlL,EAAGpB,OACTuM,EAAMzD,EAAG9I,OAGEuM,EAAND,IAAYI,EAAKtL,EAAIA,EAAK0H,EAAIA,EAAK4D,EAAI9N,EAAI0N,EAAKA,EAAMC,EAAKA,EAAM3N,GAGhEA,EAAI0N,EAAMC,EAAKG,KAAS9N,IAAK8N,EAAG7L,KAAK,IAK3C,IAHAuG,EAAOlD,EACPyI,EAAWjF,EAEL9I,EAAI2N,IAAO3N,GAAK,GAAK,CAKvB,IAJAF,EAAI,EACJ8N,EAAM1D,EAAGlK,GAAK+N,EACdF,EAAM3D,EAAGlK,GAAK+N,EAAW,EAEnBzL,EAAIoL,EAAKhJ,EAAI1E,EAAIsC,EAAGoC,EAAI1E,GAC1B0I,EAAMlG,IAAKF,GAAKyL,EAChBpF,EAAMnG,EAAGF,GAAKyL,EAAW,EACzB9J,EAAI4J,EAAMnF,EAAMC,EAAMiF,EACtBlF,EAAMkF,EAAMlF,EAAUzE,EAAI8J,EAAaA,EAAaD,EAAGpJ,GAAK5E,EAC5DA,GAAM4I,EAAMF,EAAO,IAAQvE,EAAI8J,EAAW,GAAMF,EAAMlF,EACtDmF,EAAGpJ,KAAOgE,EAAMF,CAGpBsF,GAAGpJ,GAAK5E,EASZ,MANIA,KACEC,EAEF+N,EAAGxF,OAAO,EAAG,GAGV7D,EAAWhC,EAAGqL,EAAI/N,IAgB7BwF,EAAEyI,SAAW,SAAWjJ,EAAIpC,GACxB,GAAI/C,GAAI,GAAID,GAAUU,KAGtB,OAFA0E,GAAW,MAANA,GAAevE,EAAYuE,EAAI,EAAGwC,EAAK,GAAI,aAA4B,EAALxC,EAAP,KAChEpC,EAAW,MAANA,GAAenC,EAAYmC,EAAI,EAAG,EAAG,GAAIe,GAAsC,EAALf,EAAhB/B,EACxDmE,EAAKrE,EAAOd,EAAGmF,EAAIpC,GAAO/C,GAgBrC2F,EAAE1B,cAAgB,SAAWnB,EAAIC,GAC7B,MAAOW,GAAQjD,KACP,MAANqC,GAAclC,EAAYkC,EAAI,EAAG6E,EAAK,MAAS7E,EAAK,EAAI,KAAMC,EAAI,KAmBxE4C,EAAE0I,QAAU,SAAWvL,EAAIC,GACvB,MAAOW,GAAQjD,KAAY,MAANqC,GAAclC,EAAYkC,EAAI,EAAG6E,EAAK,MACrD7E,EAAKrC,KAAKN,EAAI,EAAI,KAAM4C,EAAI,KA0BtC4C,EAAE2I,SAAW,SAAWxL,EAAIC,GACxB,GAAIxC,GAAMmD,EAAQjD,KAAY,MAANqC,GAAclC,EAAYkC,EAAI,EAAG6E,EAAK,MACxD7E,EAAKrC,KAAKN,EAAI,EAAI,KAAM4C,EAAI,GAElC,IAAKtC,KAAKP,EAAI,CACV,GAAIE,GACAmO,EAAMhO,EAAIiO,MAAM,KAChBC,GAAMxI,EAAOG,UACbsI,GAAMzI,EAAOI,mBACbF,EAAiBF,EAAOE,eACxBwI,EAAUJ,EAAI,GACdK,EAAeL,EAAI,GACnBpC,EAAQ1L,KAAKa,EAAI,EACjBuN,EAAY1C,EAAQwC,EAAQxN,MAAM,GAAKwN,EACvCrO,EAAMuO,EAAUrN,MAIpB,IAFIkN,IAAItO,EAAIqO,EAAIA,EAAKC,EAAIA,EAAKtO,EAAGE,GAAOF,GAEnCqO,EAAK,GAAKnO,EAAM,EAAI,CAIrB,IAHAF,EAAIE,EAAMmO,GAAMA,EAChBE,EAAUE,EAAUC,OAAQ,EAAG1O,GAEnBE,EAAJF,EAASA,GAAKqO,EAClBE,GAAWxI,EAAiB0I,EAAUC,OAAQ1O,EAAGqO,EAGhDC,GAAK,IAAIC,GAAWxI,EAAiB0I,EAAU1N,MAAMf,IACtD+L,IAAOwC,EAAU,IAAMA,GAG/BpO,EAAMqO,EACFD,EAAU1I,EAAOC,mBAAuBwI,GAAMzI,EAAOM,mBACnDqI,EAAarN,QAAS,GAAIN,QAAQ,OAASyN,EAAK,OAAQ,KACxD,KAAOzI,EAAOK,wBACdsI,GACFD,EAGR,MAAOpO,IAgBXoF,EAAEoJ,WAAa,SAAUC,GACrB,GAAIT,GAAKU,EAAIC,EAAI/O,EAAGgP,EAAKnP,EAAGoP,EAAIxF,EAAGtI,EAC/BoB,EAAIhC,EACJF,EAAIC,KACJmC,EAAKpC,EAAEN,EACPuC,EAAI,GAAI1C,GAAU8F,GAClBwJ,EAAKJ,EAAK,GAAIlP,GAAU8F,GACxByJ,EAAKF,EAAK,GAAIrP,GAAU8F,EAoB5B,IAlBW,MAANmJ,IACDtO,GAAS,EACTV,EAAI,GAAID,GAAUiP,GAClBtO,EAASgC,KAEDA,EAAI1C,EAAEiM,UAAajM,EAAEiI,GAAGpC,MAExBnF,GACAC,EAAO,GACL,oBAAuB+B,EAAI,eAAiB,kBAAoBsM,GAKtEA,GAAMtM,GAAK1C,EAAEE,GAAKY,EAAOd,EAAGA,EAAEG,EAAI,EAAG,GAAI2L,IAAIjG,GAAO7F,EAAI,QAI1D4C,EAAK,MAAOpC,GAAEuD,UAgBpB,KAfAzC,EAAI+B,EAAcT,GAIlBzC,EAAIsC,EAAEtC,EAAImB,EAAEE,OAAShB,EAAEL,EAAI,EAC3BsC,EAAEvC,EAAE,GAAKqF,GAAY4J,EAAMhP,EAAIiC,GAAa,EAAIA,EAAW+M,EAAMA,GACjEH,GAAMA,GAAMhP,EAAEuJ,IAAI9G,GAAK,EAAMtC,EAAI,EAAIsC,EAAI4M,EAAOrP,EAEhDmP,EAAMjN,EACNA,EAAU,EAAI,EACdlC,EAAI,GAAID,GAAUuB,GAGlB8N,EAAGlP,EAAE,GAAK,EAGN0J,EAAIrG,EAAKvD,EAAGyC,EAAG,EAAG,GAClByM,EAAKD,EAAGrC,KAAMhD,EAAEsD,MAAMoC,IACH,GAAdJ,EAAG3F,IAAIyF,IACZC,EAAKK,EACLA,EAAKJ,EACLG,EAAKD,EAAGxC,KAAMhD,EAAEsD,MAAOgC,EAAKG,IAC5BD,EAAKF,EACLzM,EAAIzC,EAAEwM,MAAO5C,EAAEsD,MAAOgC,EAAKzM,IAC3BzC,EAAIkP,CAgBR,OAbAA,GAAK3L,EAAKyL,EAAGxC,MAAMyC,GAAKK,EAAI,EAAG,GAC/BF,EAAKA,EAAGxC,KAAMsC,EAAGhC,MAAMmC,IACvBJ,EAAKA,EAAGrC,KAAMsC,EAAGhC,MAAMoC,IACvBF,EAAG9N,EAAI+N,EAAG/N,EAAId,EAAEc,EAChBnB,GAAK,EAGLoO,EAAMhL,EAAK8L,EAAIC,EAAInP,EAAGa,GAAgBwL,MAAMhM,GAAG0K,MAAM3B,IAC/ChG,EAAK6L,EAAIH,EAAI9O,EAAGa,GAAgBwL,MAAMhM,GAAG0K,OAAU,GAC7CmE,EAAGtL,WAAYuL,EAAGvL,aAClBqL,EAAGrL,WAAYkL,EAAGlL,YAE9B7B,EAAUiN,EACHZ,GAOX5I,EAAE4J,SAAW,WACT,OAAQ9O,MAsBZkF,EAAE6J,QAAU7J,EAAEzC,IAAM,SAAWlD,EAAGqE,GAC9B,GAAI3B,GAAGG,EAAG0K,EACNnN,EAAI6B,EAAe,EAAJjC,GAASA,GAAKA,GAC7BQ,EAAIC,IAQR,IANU,MAAL4D,IACDxD,EAAK,GACLwD,EAAI,GAAItE,GAAUsE,KAIhBzD,EAAYZ,GAAIgC,EAAkBA,EAAkB,GAAI,eACzD+J,SAAS/L,IAAMI,EAAI4B,IAAsBhC,GAAK,IAC/CyP,WAAWzP,IAAMA,KAAQA,EAAIuK,OAAgB,GAALvK,EAExC,MADA0C,GAAI4F,KAAKpF,KAAM1C,EAAGR,GACX,GAAID,GAAWsE,EAAI3B,EAAI2B,EAAI3B,EAuBtC,KApBI2B,EACKrE,EAAI,GAAKQ,EAAE0H,GAAGrC,IAAQrF,EAAEyL,SAAW5H,EAAE6D,GAAGrC,IAAQxB,EAAE4H,QACnDzL,EAAIA,EAAEyM,IAAI5I,IAEVkJ,EAAIlJ,EAGJA,EAAI,MAEDpB,IAMPP,EAAI+C,EAAUxC,EAAgBb,EAAW,IAG7CS,EAAI,GAAI9C,GAAU8F,KAEN,CACR,GAAKzF,EAAI,EAAI,CAET,GADAyC,EAAIA,EAAEqK,MAAM1M,IACNqC,EAAE3C,EAAI,KACRwC,GACKG,EAAE3C,EAAEsB,OAASkB,IAAIG,EAAE3C,EAAEsB,OAASkB,GAC5B2B,IACPxB,EAAIA,EAAEoK,IAAI5I,IAKlB,GADAjE,EAAI6B,EAAW7B,EAAI,IACbA,EAAI,KACVI,GAAIA,EAAE0M,MAAM1M,GACRkC,EACKlC,EAAEN,GAAKM,EAAEN,EAAEsB,OAASkB,IAAIlC,EAAEN,EAAEsB,OAASkB,GACnC2B,IACP7D,EAAIA,EAAEyM,IAAI5I,IAIlB,MAAIA,GAAUxB,GACL,EAAJ7C,IAAQ6C,EAAIgD,EAAItC,IAAIV,IAElB0K,EAAI1K,EAAEoK,IAAIM,GAAK7K,EAAI5B,EAAO+B,EAAGI,EAAejC,GAAkB6B,IAkBzE8C,EAAE+J,YAAc,SAAWvK,EAAIpC,GAC3B,MAAOW,GAAQjD,KAAY,MAAN0E,GAAcvE,EAAYuE,EAAI,EAAGwC,EAAK,GAAI,aACtD,EAALxC,EAAS,KAAMpC,EAAI,KAgB3B4C,EAAE5B,SAAW,SAAU9D,GACnB,GAAIM,GACAP,EAAIS,KACJa,EAAItB,EAAEsB,EACNnB,EAAIH,EAAEG,CAyBV,OAtBW,QAANA,EAEGmB,GACAf,EAAM,WACG,EAAJe,IAAQf,EAAM,IAAMA,IAEzBA,EAAM,OAGVA,EAAM8C,EAAerD,EAAEE,GAOnBK,EALM,MAALN,GAAcW,EAAYX,EAAG,EAAG,GAAI,GAAI,QAKnC0B,EAAayB,EAAc7C,EAAKJ,GAAS,EAAJF,EAAO,GAAIqB,GAJ3C0C,GAAL7D,GAAmBA,GAAK2F,EAC1B7B,EAAe1D,EAAKJ,GACpBiD,EAAc7C,EAAKJ,GAKlB,EAAJmB,GAAStB,EAAEE,EAAE,KAAKK,EAAM,IAAMA,IAGhCA,GAQXoF,EAAEgK,UAAYhK,EAAEiK,MAAQ,WACpB,MAAO9O,GAAO,GAAIf,GAAUU,MAAOA,KAAKN,EAAI,EAAG,IAQnDwF,EAAEkK,QAAUlK,EAAEmK,OAAS,WACnB,GAAIvP,GACAP,EAAIS,KACJN,EAAIH,EAAEG,CAEV,OAAW,QAANA,EAAoBH,EAAE+D,YAE3BxD,EAAM8C,EAAerD,EAAEE,GAEvBK,EAAWyD,GAAL7D,GAAmBA,GAAK2F,EACxB7B,EAAe1D,EAAKJ,GACpBiD,EAAc7C,EAAKJ,GAElBH,EAAEsB,EAAI,EAAI,IAAMf,EAAMA,IAIjCoF,EAAEoK,aAAc,EAED,MAAVjQ,GAAiBC,EAAUD,OAAOA,GAEhCC,EAOX,QAASyK,GAASxK,GACd,GAAII,GAAQ,EAAJJ,CACR,OAAOA,GAAI,GAAKA,IAAMI,EAAIA,EAAIA,EAAI,EAKtC,QAASiD,GAAciE,GAMnB,IALA,GAAIhG,GAAGiM,EACHnN,EAAI,EACJ0E,EAAIwC,EAAE9F,OACNmB,EAAI2E,EAAE,GAAK,GAEHxC,EAAJ1E,GAAS,CAGb,IAFAkB,EAAIgG,EAAElH,KAAO,GACbmN,EAAInL,EAAWd,EAAEE,OACT+L,IAAKjM,EAAI,IAAMA,GACvBqB,GAAKrB,EAIT,IAAMwD,EAAInC,EAAEnB,OAA8B,KAAtBmB,EAAEjB,aAAaoD,KACnC,MAAOnC,GAAExB,MAAO,EAAG2D,EAAI,GAAK,GAKhC,QAASsE,GAAS5I,EAAGqC,GACjB,GAAIyE,GAAGrH,EACH2C,EAAKpC,EAAEN,EACPoK,EAAKzH,EAAE3C,EACPE,EAAII,EAAEc,EACNwD,EAAIjC,EAAEvB,EACNoB,EAAIlC,EAAEL,EACN6P,EAAInN,EAAE1C,CAGV,KAAMC,IAAM0E,EAAI,MAAO,KAMvB,IAJAwC,EAAI1E,IAAOA,EAAG,GACd3C,EAAIqK,IAAOA,EAAG,GAGThD,GAAKrH,EAAI,MAAOqH,GAAIrH,EAAI,GAAK6E,EAAI1E,CAGtC,IAAKA,GAAK0E,EAAI,MAAO1E,EAMrB,IAJAkH,EAAQ,EAAJlH,EACJH,EAAIyC,GAAKsN,GAGHpN,IAAO0H,EAAK,MAAOrK,GAAI,GAAK2C,EAAK0E,EAAI,EAAI,EAG/C,KAAMrH,EAAI,MAAOyC,GAAIsN,EAAI1I,EAAI,EAAI,EAKjC,KAHAxC,GAAMpC,EAAIE,EAAGpB,SAAawO,EAAI1F,EAAG9I,QAAWkB,EAAIsN,EAG1C5P,EAAI,EAAO0E,EAAJ1E,EAAOA,IAAM,GAAKwC,EAAGxC,IAAMkK,EAAGlK,GAAK,MAAOwC,GAAGxC,GAAKkK,EAAGlK,GAAKkH,EAAI,EAAI,EAG/E,OAAO5E,IAAKsN,EAAI,EAAItN,EAAIsN,EAAI1I,EAAI,EAAI,GASxC,QAASM,GAAsB5H,EAAGyE,EAAKC,GACnC,OAAS1E,EAAI4E,EAAS5E,KAAQyE,GAAYC,GAAL1E,EAIzC,QAASsE,GAAQ2L,GACb,MAA8C,kBAAvCC,OAAOtK,UAAU7B,SAASQ,KAAK0L,GAS1C,QAAS9M,GAAW5C,EAAKgC,EAAQD,GAO7B,IANA,GAAIwC,GAEAqL,EADA5B,GAAO,GAEPnO,EAAI,EACJE,EAAMC,EAAIiB,OAEFlB,EAAJF,GAAW,CACf,IAAM+P,EAAO5B,EAAI/M,OAAQ2O,IAAQ5B,EAAI4B,IAAS5N,GAG9C,IAFAgM,EAAKzJ,EAAI,IAAO5D,EAASW,QAAStB,EAAIkD,OAAQrD,MAEtC0E,EAAIyJ,EAAI/M,OAAQsD,IAEfyJ,EAAIzJ,GAAKxC,EAAU,IACD,MAAdiM,EAAIzJ,EAAI,KAAayJ,EAAIzJ,EAAI,GAAK,GACvCyJ,EAAIzJ,EAAI,IAAMyJ,EAAIzJ,GAAKxC,EAAU,EACjCiM,EAAIzJ,IAAMxC,GAKtB,MAAOiM,GAAIxB,UAIf,QAAS9I,GAAe1D,EAAKJ,GACzB,OAASI,EAAIiB,OAAS,EAAIjB,EAAIkD,OAAO,GAAK,IAAMlD,EAAIY,MAAM,GAAKZ,IACvD,EAAJJ,EAAQ,IAAM,MAASA,EAI/B,QAASiD,GAAc7C,EAAKJ,GACxB,GAAIG,GAAKiN,CAGT,IAAS,EAAJpN,EAAQ,CAGT,IAAMoN,EAAI,OAAQpN,EAAGoN,GAAK,KAC1BhN,EAAMgN,EAAIhN,MAOV,IAHAD,EAAMC,EAAIiB,SAGHrB,EAAIG,EAAM,CACb,IAAMiN,EAAI,IAAKpN,GAAKG,IAAOH,EAAGoN,GAAK,KACnChN,GAAOgN,MACKjN,GAAJH,IACRI,EAAMA,EAAIY,MAAO,EAAGhB,GAAM,IAAMI,EAAIY,MAAMhB,GAIlD,OAAOI,GAIX,QAASqE,GAAS5E,GAEd,MADAA,GAAIyP,WAAWzP,GACJ,EAAJA,EAAQyF,EAASzF,GAAKiC,EAAUjC,GAvoF3C,GAAID,GACA6B,EAAY,uCACZ6D,EAAW6C,KAAK6C,KAChBlJ,EAAYqG,KAAKqD,MACjB9D,EAAU,iCACV/D,EAAe,gBACfrC,EAAgB,kDAChBP,EAAW,mEACXwE,EAAO,KACPtD,EAAW,GACXJ,EAAmB,iBAEnBuD,GAAY,EAAG,GAAI,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,KAAM,MAC7E2D,EAAY,IAOZvB,EAAM,GA0nFV5H,GAAYF,IACZE,EAAU,WAAaA,EAAUA,UAAYA,EAIvB,kBAAVqQ,SAAwBA,OAAOC,IACvCD,OAAQ,WAAc,MAAOrQ,KAGJ,mBAAVuQ,SAAyBA,OAAOC,QAC/CD,OAAOC,QAAUxQ,GAIXH,IAAYA,EAA2B,mBAAR4Q,MAAsBA,KAAOC,SAAS,kBAC3E7Q,EAAUG,UAAYA,IAE3BU"} \ No newline at end of file diff --git a/bower_components/bignumber.js/bignumber.min.js b/bower_components/bignumber.js/bignumber.min.js new file mode 100644 index 00000000..46dadf57 --- /dev/null +++ b/bower_components/bignumber.js/bignumber.min.js @@ -0,0 +1,3 @@ +/* bignumber.js v4.0.2 https://github.com/MikeMcl/bignumber.js/LICENCE */ +!function(e){"use strict";function n(e){function a(e,n){var t,r,i,o,u,s,l=this;if(!(l instanceof a))return z&&x(26,"constructor call without new",e),new a(e,n);if(null!=n&&V(n,2,64,C,"base")){if(n=0|n,s=e+"",10==n)return l=new a(e instanceof a?e:s),I(l,B+l.e+1,P);if((o="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(t="["+v.slice(0,n)+"]+")+"(?:\\."+t+")?$",37>n?"i":"").test(s))return U(l,s,o,n);o?(l.s=0>1/e?(s=s.slice(1),-1):1,z&&s.replace(/^0\.0*|\./,"").length>15&&x(C,w,e),o=!1):l.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1,s=A(s,10,n,l.s)}else{if(e instanceof a)return l.s=e.s,l.e=e.e,l.c=(e=e.c)?e.slice():e,void(C=0);if((o="number"==typeof e)&&0*e==0){if(l.s=0>1/e?(e=-e,-1):1,e===~~e){for(r=0,i=e;i>=10;i/=10,r++);return l.e=r,l.c=[e],void(C=0)}s=e+""}else{if(!h.test(s=e+""))return U(l,s,o);l.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1}}for((r=s.indexOf("."))>-1&&(s=s.replace(".","")),(i=s.search(/e/i))>0?(0>r&&(r=i),r+=+s.slice(i+1),s=s.substring(0,i)):0>r&&(r=s.length),i=0;48===s.charCodeAt(i);i++);for(u=s.length;48===s.charCodeAt(--u););if(s=s.slice(i,u+1))if(u=s.length,o&&z&&u>15&&(e>y||e!==p(e))&&x(C,w,l.s*e),r=r-i-1,r>G)l.c=l.e=null;else if($>r)l.c=[l.e=0];else{if(l.e=r,l.c=[],i=(r+1)%b,0>r&&(i+=b),u>i){for(i&&l.c.push(+s.slice(0,i)),u-=b;u>i;)l.c.push(+s.slice(i,i+=b));s=s.slice(i),i=b-s.length}else i-=u;for(;i--;s+="0");l.c.push(+s)}else l.c=[l.e=0];C=0}function A(e,n,t,i){var o,u,l,f,h,g,p,d=e.indexOf("."),m=B,w=P;for(37>t&&(e=e.toLowerCase()),d>=0&&(l=W,W=0,e=e.replace(".",""),p=new a(t),h=p.pow(e.length-d),W=l,p.c=s(c(r(h.c),h.e),10,n),p.e=p.c.length),g=s(e,t,n),u=l=g.length;0==g[--l];g.pop());if(!g[0])return"0";if(0>d?--u:(h.c=g,h.e=u,h.s=i,h=L(h,p,m,w,n),g=h.c,f=h.r,u=h.e),o=u+m+1,d=g[o],l=n/2,f=f||0>o||null!=g[o+1],f=4>w?(null!=d||f)&&(0==w||w==(h.s<0?3:2)):d>l||d==l&&(4==w||f||6==w&&1&g[o-1]||w==(h.s<0?8:7)),1>o||!g[0])e=f?c("1",-m):"0";else{if(g.length=o,f)for(--n;++g[--o]>n;)g[o]=0,o||(++u,g=[1].concat(g));for(l=g.length;!g[--l];);for(d=0,e="";l>=d;e+=v.charAt(g[d++]));e=c(e,u)}return e}function E(e,n,t,i){var o,u,s,f,h;if(t=null!=t&&V(t,0,8,i,m)?0|t:P,!e.c)return e.toString();if(o=e.c[0],s=e.e,null==n)h=r(e.c),h=19==i||24==i&&q>=s?l(h,s):c(h,s);else if(e=I(new a(e),n,t),u=e.e,h=r(e.c),f=h.length,19==i||24==i&&(u>=n||q>=u)){for(;n>f;h+="0",f++);h=l(h,u)}else if(n-=s,h=c(h,u),u+1>f){if(--n>0)for(h+=".";n--;h+="0");}else if(n+=u-f,n>0)for(u+1==f&&(h+=".");n--;h+="0");return e.s<0&&o?"-"+h:h}function D(e,n){var t,r,i=0;for(u(e[0])&&(e=e[0]),t=new a(e[0]);++ie||e>t||e!=f(e))&&x(r,(i||"decimal places")+(n>e||e>t?" out of range":" not an integer"),e),!0}function _(e,n,t){for(var r=1,i=n.length;!n[--i];n.pop());for(i=n[0];i>=10;i/=10,r++);return(t=r+t*b-1)>G?e.c=e.e=null:$>t?e.c=[e.e=0]:(e.e=t,e.c=n),e}function x(e,n,t){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+n+": "+t);throw r.name="BigNumber Error",C=0,r}function I(e,n,t,r){var i,o,u,s,l,c,f,a=e.c,h=O;if(a){e:{for(i=1,s=a[0];s>=10;s/=10,i++);if(o=n-i,0>o)o+=b,u=n,l=a[c=0],f=l/h[i-u-1]%10|0;else if(c=g((o+1)/b),c>=a.length){if(!r)break e;for(;a.length<=c;a.push(0));l=f=0,i=1,o%=b,u=o-b+1}else{for(l=s=a[c],i=1;s>=10;s/=10,i++);o%=b,u=o-b+i,f=0>u?0:l/h[i-u-1]%10|0}if(r=r||0>n||null!=a[c+1]||(0>u?l:l%h[i-u-1]),r=4>t?(f||r)&&(0==t||t==(e.s<0?3:2)):f>5||5==f&&(4==t||r||6==t&&(o>0?u>0?l/h[i-u]:0:a[c-1])%10&1||t==(e.s<0?8:7)),1>n||!a[0])return a.length=0,r?(n-=e.e+1,a[0]=h[(b-n%b)%b],e.e=-n||0):a[0]=e.e=0,e;if(0==o?(a.length=c,s=1,c--):(a.length=c+1,s=h[b-o],a[c]=u>0?p(l/h[i-u]%h[u])*s:0),r)for(;;){if(0==c){for(o=1,u=a[0];u>=10;u/=10,o++);for(u=a[0]+=s,s=1;u>=10;u/=10,s++);o!=s&&(e.e++,a[0]==N&&(a[0]=1));break}if(a[c]+=s,a[c]!=N)break;a[c--]=0,s=1}for(o=a.length;0===a[--o];a.pop());}e.e>G?e.c=e.e=null:e.e<$&&(e.c=[e.e=0])}return e}var L,U,C=0,M=a.prototype,T=new a(1),B=20,P=4,q=-7,k=21,$=-1e7,G=1e7,z=!0,V=F,j=!1,H=1,W=0,J={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};return a.another=n,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=function(){var e,n,t=0,r={},i=arguments,s=i[0],l=s&&"object"==typeof s?function(){return s.hasOwnProperty(n)?null!=(e=s[n]):void 0}:function(){return i.length>t?null!=(e=i[t++]):void 0};return l(n="DECIMAL_PLACES")&&V(e,0,S,2,n)&&(B=0|e),r[n]=B,l(n="ROUNDING_MODE")&&V(e,0,8,2,n)&&(P=0|e),r[n]=P,l(n="EXPONENTIAL_AT")&&(u(e)?V(e[0],-S,0,2,n)&&V(e[1],0,S,2,n)&&(q=0|e[0],k=0|e[1]):V(e,-S,S,2,n)&&(q=-(k=0|(0>e?-e:e)))),r[n]=[q,k],l(n="RANGE")&&(u(e)?V(e[0],-S,-1,2,n)&&V(e[1],1,S,2,n)&&($=0|e[0],G=0|e[1]):V(e,-S,S,2,n)&&(0|e?$=-(G=0|(0>e?-e:e)):z&&x(2,n+" cannot be zero",e))),r[n]=[$,G],l(n="ERRORS")&&(e===!!e||1===e||0===e?(C=0,V=(z=!!e)?F:o):z&&x(2,n+d,e)),r[n]=z,l(n="CRYPTO")&&(e===!0||e===!1||1===e||0===e?e?(e="undefined"==typeof crypto,!e&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?j=!0:z?x(2,"crypto unavailable",e?void 0:crypto):j=!1):j=!1:z&&x(2,n+d,e)),r[n]=j,l(n="MODULO_MODE")&&V(e,0,9,2,n)&&(H=0|e),r[n]=H,l(n="POW_PRECISION")&&V(e,0,S,2,n)&&(W=0|e),r[n]=W,l(n="FORMAT")&&("object"==typeof e?J=e:z&&x(2,n+" not an object",e)),r[n]=J,r},a.max=function(){return D(arguments,M.lt)},a.min=function(){return D(arguments,M.gt)},a.random=function(){var e=9007199254740992,n=Math.random()*e&2097151?function(){return p(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var t,r,i,o,u,s=0,l=[],c=new a(T);if(e=null!=e&&V(e,0,S,14)?0|e:B,o=g(e/b),j)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));o>s;)u=131072*t[s]+(t[s+1]>>>11),u>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(l.push(u%1e14),s+=2);s=o/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(o*=7);o>s;)u=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6],u>=9e15?crypto.randomBytes(7).copy(t,s):(l.push(u%1e14),s+=7);s=o/7}else j=!1,z&&x(14,"crypto unavailable",crypto);if(!j)for(;o>s;)u=n(),9e15>u&&(l[s++]=u%1e14);for(o=l[--s],e%=b,o&&e&&(u=O[b-e],l[s]=p(o/u)*u);0===l[s];l.pop(),s--);if(0>s)l=[i=0];else{for(i=-1;0===l[0];l.splice(0,1),i-=b);for(s=1,u=l[0];u>=10;u/=10,s++);b>s&&(i-=b-s)}return c.e=i,c.c=l,c}}(),L=function(){function e(e,n,t){var r,i,o,u,s=0,l=e.length,c=n%R,f=n/R|0;for(e=e.slice();l--;)o=e[l]%R,u=e[l]/R|0,r=f*o+u*c,i=c*o+r%R*R+s,s=(i/t|0)+(r/R|0)+f*u,e[l]=i%t;return s&&(e=[s].concat(e)),e}function n(e,n,t,r){var i,o;if(t!=r)o=t>r?1:-1;else for(i=o=0;t>i;i++)if(e[i]!=n[i]){o=e[i]>n[i]?1:-1;break}return o}function r(e,n,t,r){for(var i=0;t--;)e[t]-=i,i=e[t]1;e.splice(0,1));}return function(i,o,u,s,l){var c,f,h,g,d,m,w,v,y,O,R,S,A,E,D,F,_,x=i.s==o.s?1:-1,L=i.c,U=o.c;if(!(L&&L[0]&&U&&U[0]))return new a(i.s&&o.s&&(L?!U||L[0]!=U[0]:U)?L&&0==L[0]||!U?0*x:x/0:NaN);for(v=new a(x),y=v.c=[],f=i.e-o.e,x=u+f+1,l||(l=N,f=t(i.e/b)-t(o.e/b),x=x/b|0),h=0;U[h]==(L[h]||0);h++);if(U[h]>(L[h]||0)&&f--,0>x)y.push(1),g=!0;else{for(E=L.length,F=U.length,h=0,x+=2,d=p(l/(U[0]+1)),d>1&&(U=e(U,d,l),L=e(L,d,l),F=U.length,E=L.length),A=F,O=L.slice(0,F),R=O.length;F>R;O[R++]=0);_=U.slice(),_=[0].concat(_),D=U[0],U[1]>=l/2&&D++;do{if(d=0,c=n(U,O,F,R),0>c){if(S=O[0],F!=R&&(S=S*l+(O[1]||0)),d=p(S/D),d>1)for(d>=l&&(d=l-1),m=e(U,d,l),w=m.length,R=O.length;1==n(m,O,w,R);)d--,r(m,w>F?_:U,w,l),w=m.length,c=1;else 0==d&&(c=d=1),m=U.slice(),w=m.length;if(R>w&&(m=[0].concat(m)),r(O,m,R,l),R=O.length,-1==c)for(;n(U,O,F,R)<1;)d++,r(O,R>F?_:U,R,l),R=O.length}else 0===c&&(d++,O=[0]);y[h++]=d,O[0]?O[R++]=L[A]||0:(O=[L[A]],R=1)}while((A++=10;x/=10,h++);I(v,u+(v.e=h+f*b-1)+1,s,g)}else v.e=f,v.r=+g;return v}}(),U=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,n=/^([^.]+)\.$/,t=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,u,s,l){var c,f=s?u:u.replace(i,"");if(r.test(f))o.s=isNaN(f)?null:0>f?-1:1;else{if(!s&&(f=f.replace(e,function(e,n,t){return c="x"==(t=t.toLowerCase())?16:"b"==t?2:8,l&&l!=c?e:n}),l&&(c=l,f=f.replace(n,"$1").replace(t,"0.$1")),u!=f))return new a(f,c);z&&x(C,"not a"+(l?" base "+l:"")+" number",u),o.s=null}o.c=o.e=null,C=0}}(),M.absoluteValue=M.abs=function(){var e=new a(this);return e.s<0&&(e.s=1),e},M.ceil=function(){return I(new a(this),this.e+1,2)},M.comparedTo=M.cmp=function(e,n){return C=1,i(this,new a(e,n))},M.decimalPlaces=M.dp=function(){var e,n,r=this.c;if(!r)return null;if(e=((n=r.length-1)-t(this.e/b))*b,n=r[n])for(;n%10==0;n/=10,e--);return 0>e&&(e=0),e},M.dividedBy=M.div=function(e,n){return C=3,L(this,new a(e,n),B,P)},M.dividedToIntegerBy=M.divToInt=function(e,n){return C=4,L(this,new a(e,n),0,1)},M.equals=M.eq=function(e,n){return C=5,0===i(this,new a(e,n))},M.floor=function(){return I(new a(this),this.e+1,3)},M.greaterThan=M.gt=function(e,n){return C=6,i(this,new a(e,n))>0},M.greaterThanOrEqualTo=M.gte=function(e,n){return C=7,1===(n=i(this,new a(e,n)))||0===n},M.isFinite=function(){return!!this.c},M.isInteger=M.isInt=function(){return!!this.c&&t(this.e/b)>this.c.length-2},M.isNaN=function(){return!this.s},M.isNegative=M.isNeg=function(){return this.s<0},M.isZero=function(){return!!this.c&&0==this.c[0]},M.lessThan=M.lt=function(e,n){return C=8,i(this,new a(e,n))<0},M.lessThanOrEqualTo=M.lte=function(e,n){return C=9,-1===(n=i(this,new a(e,n)))||0===n},M.minus=M.sub=function(e,n){var r,i,o,u,s=this,l=s.s;if(C=10,e=new a(e,n),n=e.s,!l||!n)return new a(NaN);if(l!=n)return e.s=-n,s.plus(e);var c=s.e/b,f=e.e/b,h=s.c,g=e.c;if(!c||!f){if(!h||!g)return h?(e.s=-n,e):new a(g?s:NaN);if(!h[0]||!g[0])return g[0]?(e.s=-n,e):new a(h[0]?s:3==P?-0:0)}if(c=t(c),f=t(f),h=h.slice(),l=c-f){for((u=0>l)?(l=-l,o=h):(f=c,o=g),o.reverse(),n=l;n--;o.push(0));o.reverse()}else for(i=(u=(l=h.length)<(n=g.length))?l:n,l=n=0;i>n;n++)if(h[n]!=g[n]){u=h[n]0)for(;n--;h[r++]=0);for(n=N-1;i>l;){if(h[--i]0?(s=u,r=c):(o=-o,r=l),r.reverse();o--;r.push(0));r.reverse()}for(o=l.length,n=c.length,0>o-n&&(r=c,c=l,l=r,n=o),o=0;n;)o=(l[--n]=l[n]+c[n]+o)/N|0,l[n]=N===l[n]?0:l[n]%N;return o&&(l=[o].concat(l),++s),_(e,l,s)},M.precision=M.sd=function(e){var n,t,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(z&&x(13,"argument"+d,e),e!=!!e&&(e=null)),!i)return null;if(t=i.length-1,n=t*b+1,t=i[t]){for(;t%10==0;t/=10,n--);for(t=i[0];t>=10;t/=10,n++);}return e&&r.e+1>n&&(n=r.e+1),n},M.round=function(e,n){var t=new a(this);return(null==e||V(e,0,S,15))&&I(t,~~e+this.e+1,null!=n&&V(n,0,8,15,m)?0|n:P),t},M.shift=function(e){var n=this;return V(e,-y,y,16,"argument")?n.times("1e"+f(e)):new a(n.c&&n.c[0]&&(-y>e||e>y)?n.s*(0>e?0:1/0):n)},M.squareRoot=M.sqrt=function(){var e,n,i,o,u,s=this,l=s.c,c=s.s,f=s.e,h=B+4,g=new a("0.5");if(1!==c||!l||!l[0])return new a(!c||0>c&&(!l||l[0])?NaN:l?s:1/0);if(c=Math.sqrt(+s),0==c||c==1/0?(n=r(l),(n.length+f)%2==0&&(n+="0"),c=Math.sqrt(n),f=t((f+1)/2)-(0>f||f%2),c==1/0?n="1e"+f:(n=c.toExponential(),n=n.slice(0,n.indexOf("e")+1)+f),i=new a(n)):i=new a(c+""),i.c[0])for(f=i.e,c=f+h,3>c&&(c=0);;)if(u=i,i=g.times(u.plus(L(s,u,h,1))),r(u.c).slice(0,c)===(n=r(i.c)).slice(0,c)){if(i.ec&&(m=O,O=S,S=m,o=c,c=g,g=o),o=c+g,m=[];o--;m.push(0));for(w=N,v=R,o=g;--o>=0;){for(r=0,p=S[o]%v,d=S[o]/v|0,s=c,u=o+s;u>o;)f=O[--s]%v,h=O[s]/v|0,l=d*f+h*p,f=p*f+l%v*v+m[u]+r,r=(f/w|0)+(l/v|0)+d*h,m[u--]=f%w;m[u]=r}return r?++i:m.splice(0,1),_(e,m,i)},M.toDigits=function(e,n){var t=new a(this);return e=null!=e&&V(e,1,S,18,"precision")?0|e:null,n=null!=n&&V(n,0,8,18,m)?0|n:P,e?I(t,e,n):t},M.toExponential=function(e,n){return E(this,null!=e&&V(e,0,S,19)?~~e+1:null,n,19)},M.toFixed=function(e,n){return E(this,null!=e&&V(e,0,S,20)?~~e+this.e+1:null,n,20)},M.toFormat=function(e,n){var t=E(this,null!=e&&V(e,0,S,21)?~~e+this.e+1:null,n,21);if(this.c){var r,i=t.split("."),o=+J.groupSize,u=+J.secondaryGroupSize,s=J.groupSeparator,l=i[0],c=i[1],f=this.s<0,a=f?l.slice(1):l,h=a.length;if(u&&(r=o,o=u,u=r,h-=r),o>0&&h>0){for(r=h%o||o,l=a.substr(0,r);h>r;r+=o)l+=s+a.substr(r,o);u>0&&(l+=s+a.slice(r)),f&&(l="-"+l)}t=c?l+J.decimalSeparator+((u=+J.fractionGroupSize)?c.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+J.fractionGroupSeparator):c):l}return t},M.toFraction=function(e){var n,t,i,o,u,s,l,c,f,h=z,g=this,p=g.c,d=new a(T),m=t=new a(T),w=l=new a(T);if(null!=e&&(z=!1,s=new a(e),z=h,(!(h=s.isInt())||s.lt(T))&&(z&&x(22,"max denominator "+(h?"out of range":"not an integer"),e),e=!h&&s.c&&I(s,s.e+1,1).gte(T)?s:null)),!p)return g.toString();for(f=r(p),o=d.e=f.length-g.e-1,d.c[0]=O[(u=o%b)<0?b+u:u],e=!e||s.cmp(d)>0?o>0?d:m:s,u=G,G=1/0,s=new a(f),l.c[0]=0;c=L(s,d,0,1),i=t.plus(c.times(w)),1!=i.cmp(e);)t=w,w=i,m=l.plus(c.times(i=m)),l=i,d=s.minus(c.times(i=d)),s=i;return i=L(e.minus(t),w,0,1),l=l.plus(i.times(m)),t=t.plus(i.times(w)),l.s=m.s=g.s,o*=2,n=L(m,w,o,P).minus(g).abs().cmp(L(l,t,o,P).minus(g).abs())<1?[m.toString(),w.toString()]:[l.toString(),t.toString()],G=u,n},M.toNumber=function(){return+this},M.toPower=M.pow=function(e,n){var t,r,i,o=p(0>e?-e:+e),u=this;if(null!=n&&(C=23,n=new a(n)),!V(e,-y,y,23,"exponent")&&(!isFinite(e)||o>y&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return t=Math.pow(+u,e),new a(n?t%n:t);for(n?e>1&&u.gt(T)&&u.isInt()&&n.gt(T)&&n.isInt()?u=u.mod(n):(i=n,n=null):W&&(t=g(W/b+2)),r=new a(T);;){if(o%2){if(r=r.times(u),!r.c)break;t?r.c.length>t&&(r.c.length=t):n&&(r=r.mod(n))}if(o=p(o/2),!o)break;u=u.times(u),t?u.c&&u.c.length>t&&(u.c.length=t):n&&(u=u.mod(n))}return n?r:(0>e&&(r=T.div(r)),i?r.mod(i):t?I(r,W,P):r)},M.toPrecision=function(e,n){return E(this,null!=e&&V(e,1,S,24,"precision")?0|e:null,n,24)},M.toString=function(e){var n,t=this,i=t.s,o=t.e;return null===o?i?(n="Infinity",0>i&&(n="-"+n)):n="NaN":(n=r(t.c),n=null!=e&&V(e,2,64,25,"base")?A(c(n,o),0|e,10,i):q>=o||o>=k?l(n,o):c(n,o),0>i&&t.c[0]&&(n="-"+n)),n},M.truncated=M.trunc=function(){return I(new a(this),this.e+1,1)},M.valueOf=M.toJSON=function(){var e,n=this,t=n.e;return null===t?n.toString():(e=r(n.c),e=q>=t||t>=k?l(e,t):c(e,t),n.s<0?"-"+e:e)},M.isBigNumber=!0,null!=e&&a.config(e),a}function t(e){var n=0|e;return e>0||e===n?n:n-1}function r(e){for(var n,t,r=1,i=e.length,o=e[0]+"";i>r;){for(n=e[r++]+"",t=b-n.length;t--;n="0"+n);o+=n}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function i(e,n){var t,r,i=e.c,o=n.c,u=e.s,s=n.s,l=e.e,c=n.e;if(!u||!s)return null;if(t=i&&!i[0],r=o&&!o[0],t||r)return t?r?0:-s:u;if(u!=s)return u;if(t=0>u,r=l==c,!i||!o)return r?0:!i^t?1:-1;if(!r)return l>c^t?1:-1;for(s=(l=i.length)<(c=o.length)?l:c,u=0;s>u;u++)if(i[u]!=o[u])return i[u]>o[u]^t?1:-1;return l==c?0:l>c^t?1:-1}function o(e,n,t){return(e=f(e))>=n&&t>=e}function u(e){return"[object Array]"==Object.prototype.toString.call(e)}function s(e,n,t){for(var r,i,o=[0],u=0,s=e.length;s>u;){for(i=o.length;i--;o[i]*=n);for(o[r=0]+=v.indexOf(e.charAt(u++));rt-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/t|0,o[r]%=t)}return o.reverse()}function l(e,n){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(0>n?"e":"e+")+n}function c(e,n){var t,r;if(0>n){for(r="0.";++n;r+="0");e=r+e}else if(t=e.length,++n>t){for(r="0",n-=t;--n;r+="0");e+=r}else t>n&&(e=e.slice(0,n)+"."+e.slice(n));return e}function f(e){return e=parseFloat(e),0>e?g(e):p(e)}var a,h=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,g=Math.ceil,p=Math.floor,d=" not a boolean or binary digit",m="rounding mode",w="number type has more than 15 significant digits",v="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",N=1e14,b=14,y=9007199254740991,O=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],R=1e7,S=1e9;a=n(),a["default"]=a.BigNumber=a,"function"==typeof define&&define.amd?define(function(){return a}):"undefined"!=typeof module&&module.exports?module.exports=a:(e||(e="undefined"!=typeof self?self:Function("return this")()),e.BigNumber=a)}(this); +//# sourceMappingURL=bignumber.js.map \ No newline at end of file diff --git a/bower_components/bignumber.js/bower.json b/bower_components/bignumber.js/bower.json new file mode 100644 index 00000000..fa598b01 --- /dev/null +++ b/bower_components/bignumber.js/bower.json @@ -0,0 +1,36 @@ +{ + "name": "bignumber.js", + "main": "bignumber.js", + "version": "4.0.2", + "homepage": "https://github.com/MikeMcl/bignumber.js", + "authors": [ + "Michael Mclaughlin " + ], + "description": "A library for arbitrary-precision decimal and non-decimal arithmetic", + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "arbitrary", + "precision", + "arithmetic", + "big", + "number", + "decimal", + "float", + "biginteger", + "bigdecimal", + "bignumber", + "bigint", + "bignum" + ], + "license": "MIT", + "ignore": [ + ".*", + "*.json", + "test" + ] +} + diff --git a/bower_components/bignumber.js/doc/API.html b/bower_components/bignumber.js/doc/API.html new file mode 100644 index 00000000..d675b960 --- /dev/null +++ b/bower_components/bignumber.js/doc/API.html @@ -0,0 +1,2198 @@ + + + + + + +bignumber.js API + + + + + + +
    + +

    bignumber.js

    + +

    A JavaScript library for arbitrary-precision arithmetic.

    +

    Hosted on GitHub.

    + +

    API

    + +

    + See the README on GitHub for a + quick-start introduction. +

    +

    + In all examples below, var and semicolons are not shown, and if a commented-out + value is in quotes it means toString has been called on the preceding expression. +

    + + +

    CONSTRUCTOR

    + +
    + BigNumberBigNumber(value [, base]) ⇒ BigNumber +
    +
    +
    value
    +
    + number|string|BigNumber: see RANGE for + range. +
    +
    + A numeric value. +
    +
    + Legitimate values include ±0, ±Infinity and + NaN. +
    +
    + Values of type number with more than 15 significant digits are + considered invalid (if ERRORS is true) as calling + toString or valueOf on + such numbers may not result in the intended value. +
    console.log( 823456789123456.3 );    // 823456789123456.2
    +
    +
    + There is no limit to the number of digits of a value of type string (other than + that of JavaScript's maximum array size). +
    +
    + Decimal string values may be in exponential, as well as normal (fixed-point) notation. + Non-decimal values must be in normal notation. +
    +
    + String values in hexadecimal literal form, e.g. '0xff', are valid, as are + string values with the octal and binary prefixs '0o' and '0b'. + String values in octal literal form without the prefix will be interpreted as + decimals, e.g. '011' is interpreted as 11, not 9. +
    +
    Values in any base may have fraction digits.
    +
    + For bases from 10 to 36, lower and/or upper case letters can be + used to represent values from 10 to 35. +
    +
    + For bases above 36, a-z represents values from 10 to + 35, A-Z from 36 to 61, and + $ and _ represent 62 and 63 respectively + (this can be changed by editing the ALPHABET variable near the top of the + source file). +
    +
    +
    +
    base
    +
    + number: integer, 2 to 64 inclusive +
    +
    The base of value.
    +
    + If base is omitted, or is null or undefined, base + 10 is assumed. +
    +
    +
    +

    Returns a new instance of a BigNumber object.

    +

    + If a base is specified, the value is rounded according to + the current DECIMAL_PLACES and + ROUNDING_MODE configuration. +

    +

    + See Errors for the treatment of an invalid value or + base. +

    +
    +x = new BigNumber(9)                       // '9'
    +y = new BigNumber(x)                       // '9'
    +
    +// 'new' is optional if ERRORS is false
    +BigNumber(435.345)                         // '435.345'
    +
    +new BigNumber('5032485723458348569331745.33434346346912144534543')
    +new BigNumber('4.321e+4')                  // '43210'
    +new BigNumber('-735.0918e-430')            // '-7.350918e-428'
    +new BigNumber(Infinity)                    // 'Infinity'
    +new BigNumber(NaN)                         // 'NaN'
    +new BigNumber('.5')                        // '0.5'
    +new BigNumber('+2')                        // '2'
    +new BigNumber(-10110100.1, 2)              // '-180.5'
    +new BigNumber(-0b10110100.1)               // '-180.5'
    +new BigNumber('123412421.234324', 5)       // '607236.557696'
    +new BigNumber('ff.8', 16)                  // '255.5'
    +new BigNumber('0xff.8')                    // '255.5'
    +

    + The following throws 'not a base 2 number' if + ERRORS is true, otherwise it returns a BigNumber with value + NaN. +

    +
    new BigNumber(9, 2)
    +

    + The following throws 'number type has more than 15 significant digits' if + ERRORS is true, otherwise it returns a BigNumber with value + 96517860459076820. +

    +
    new BigNumber(96517860459076817.4395)
    +

    + The following throws 'not a number' if ERRORS + is true, otherwise it returns a BigNumber with value NaN. +

    +
    new BigNumber('blurgh')
    +

    + A value is only rounded by the constructor if a base is specified. +

    +
    BigNumber.config({ DECIMAL_PLACES: 5 })
    +new BigNumber(1.23456789)                  // '1.23456789'
    +new BigNumber(1.23456789, 10)              // '1.23457'
    + + + +

    Methods

    +

    The static methods of a BigNumber constructor.

    + + + + +
    + another.another([obj]) ⇒ BigNumber constructor +
    +

    obj: object

    +

    + Returns a new independent BigNumber constructor with configuration as described by + obj (see config), or with the default + configuration if obj is null or undefined. +

    +
    BigNumber.config({ DECIMAL_PLACES: 5 })
    +BN = BigNumber.another({ DECIMAL_PLACES: 9 })
    +
    +x = new BigNumber(1)
    +y = new BN(1)
    +
    +x.div(3)                        // 0.33333
    +y.div(3)                        // 0.333333333
    +
    +// BN = BigNumber.another({ DECIMAL_PLACES: 9 }) is equivalent to:
    +BN = BigNumber.another()
    +BN.config({ DECIMAL_PLACES: 9 })
    + + + +
    configset([obj]) ⇒ object
    +

    + obj: object: an object that contains some or all of the following + properties. +

    +

    Configures the settings for this particular BigNumber constructor.

    +

    Note: the configuration can also be supplied as an argument list, see below.

    +
    +
    DECIMAL_PLACES
    +
    + number: integer, 0 to 1e+9 inclusive
    + Default value: 20 +
    +
    + The maximum number of decimal places of the results of operations involving + division, i.e. division, square root and base conversion operations, and power + operations with negative exponents.
    +
    +
    +
    BigNumber.config({ DECIMAL_PLACES: 5 })
    +BigNumber.set({ DECIMAL_PLACES: 5 })    // equivalent
    +BigNumber.config(5)    // equivalent
    +
    + + + +
    ROUNDING_MODE
    +
    + number: integer, 0 to 8 inclusive
    + Default value: 4 (ROUND_HALF_UP) +
    +
    + The rounding mode used in the above operations and the default rounding mode of + round, + toExponential, + toFixed, + toFormat and + toPrecision. +
    +
    The modes are available as enumerated properties of the BigNumber constructor.
    +
    +
    BigNumber.config({ ROUNDING_MODE: 0 })
    +BigNumber.config(null, BigNumber.ROUND_UP)    // equivalent
    +
    + + + +
    EXPONENTIAL_AT
    +
    + number: integer, magnitude 0 to 1e+9 inclusive, or +
    + number[]: [ integer -1e+9 to 0 inclusive, integer + 0 to 1e+9 inclusive ]
    + Default value: [-7, 20] +
    +
    + The exponent value(s) at which toString returns exponential notation. +
    +
    + If a single number is assigned, the value is the exponent magnitude.
    + If an array of two numbers is assigned then the first number is the negative exponent + value at and beneath which exponential notation is used, and the second number is the + positive exponent value at and above which the same. +
    +
    + For example, to emulate JavaScript numbers in terms of the exponent values at which they + begin to use exponential notation, use [-7, 20]. +
    +
    +
    BigNumber.config({ EXPONENTIAL_AT: 2 })
    +new BigNumber(12.3)         // '12.3'        e is only 1
    +new BigNumber(123)          // '1.23e+2'
    +new BigNumber(0.123)        // '0.123'       e is only -1
    +new BigNumber(0.0123)       // '1.23e-2'
    +
    +BigNumber.config({ EXPONENTIAL_AT: [-7, 20] })
    +new BigNumber(123456789)    // '123456789'   e is only 8
    +new BigNumber(0.000000123)  // '1.23e-7'
    +
    +// Almost never return exponential notation:
    +BigNumber.config({ EXPONENTIAL_AT: 1e+9 })
    +
    +// Always return exponential notation:
    +BigNumber.config({ EXPONENTIAL_AT: 0 })
    +
    +
    + Regardless of the value of EXPONENTIAL_AT, the toFixed method + will always return a value in normal notation and the toExponential method + will always return a value in exponential form. +
    +
    + Calling toString with a base argument, e.g. toString(10), will + also always return normal notation. +
    + + + +
    RANGE
    +
    + number: integer, magnitude 1 to 1e+9 inclusive, or +
    + number[]: [ integer -1e+9 to -1 inclusive, integer + 1 to 1e+9 inclusive ]
    + Default value: [-1e+9, 1e+9] +
    +
    + The exponent value(s) beyond which overflow to Infinity and underflow to + zero occurs. +
    +
    + If a single number is assigned, it is the maximum exponent magnitude: values wth a + positive exponent of greater magnitude become Infinity and those with a + negative exponent of greater magnitude become zero. +
    + If an array of two numbers is assigned then the first number is the negative exponent + limit and the second number is the positive exponent limit. +
    +
    + For example, to emulate JavaScript numbers in terms of the exponent values at which they + become zero and Infinity, use [-324, 308]. +
    +
    +
    BigNumber.config({ RANGE: 500 })
    +BigNumber.config().RANGE     // [ -500, 500 ]
    +new BigNumber('9.999e499')   // '9.999e+499'
    +new BigNumber('1e500')       // 'Infinity'
    +new BigNumber('1e-499')      // '1e-499'
    +new BigNumber('1e-500')      // '0'
    +
    +BigNumber.config({ RANGE: [-3, 4] })
    +new BigNumber(99999)         // '99999'      e is only 4
    +new BigNumber(100000)        // 'Infinity'   e is 5
    +new BigNumber(0.001)         // '0.01'       e is only -3
    +new BigNumber(0.0001)        // '0'          e is -4
    +
    +
    + The largest possible magnitude of a finite BigNumber is + 9.999...e+1000000000.
    + The smallest possible magnitude of a non-zero BigNumber is 1e-1000000000. +
    + + + +
    ERRORS
    +
    + boolean|number: true, false, 0 or + 1.
    + Default value: true +
    +
    + The value that determines whether BigNumber Errors are thrown.
    + If ERRORS is false, no errors will be thrown. +
    +
    See Errors.
    +
    BigNumber.config({ ERRORS: false })
    + + + +
    CRYPTO
    +
    + boolean|number: true, false, 0 or + 1.
    + Default value: false +
    +
    + The value that determines whether cryptographically-secure pseudo-random number + generation is used. +
    +
    + If CRYPTO is set to true then the + random method will generate random digits using + crypto.getRandomValues in browsers that support it, or + crypto.randomBytes if using a version of Node.js that supports it. +
    +
    + If neither function is supported by the host environment then attempting to set + CRYPTO to true will fail, and if ERRORS + is true an exception will be thrown. +
    +
    + If CRYPTO is false then the source of randomness used will be + Math.random (which is assumed to generate at least 30 bits of + randomness). +
    +
    See random.
    +
    +
    BigNumber.config({ CRYPTO: true })
    +BigNumber.config().CRYPTO       // true
    +BigNumber.random()              // 0.54340758610486147524
    +
    + + + +
    MODULO_MODE
    +
    + number: integer, 0 to 9 inclusive
    + Default value: 1 (ROUND_DOWN) +
    +
    The modulo mode used when calculating the modulus: a mod n.
    +
    + The quotient, q = a / n, is calculated according to the + ROUNDING_MODE that corresponds to the chosen + MODULO_MODE. +
    +
    The remainder, r, is calculated as: r = a - n * q.
    +
    + The modes that are most commonly used for the modulus/remainder operation are shown in + the following table. Although the other rounding modes can be used, they may not give + useful results. +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    PropertyValueDescription
    ROUND_UP0 + The remainder is positive if the dividend is negative, otherwise it is negative. +
    ROUND_DOWN1 + The remainder has the same sign as the dividend.
    + This uses 'truncating division' and matches the behaviour of JavaScript's + remainder operator %. +
    ROUND_FLOOR3 + The remainder has the same sign as the divisor.
    + This matches Python's % operator. +
    ROUND_HALF_EVEN6The IEEE 754 remainder function.
    EUCLID9 + The remainder is always positive. Euclidian division:
    + q = sign(n) * floor(a / abs(n)) +
    +
    +
    + The rounding/modulo modes are available as enumerated properties of the BigNumber + constructor. +
    +
    See modulo.
    +
    +
    BigNumber.config({ MODULO_MODE: BigNumber.EUCLID })
    +BigNumber.config({ MODULO_MODE: 9 })          // equivalent
    +
    + + + +
    POW_PRECISION
    +
    + number: integer, 0 to 1e+9 inclusive.
    + Default value: 0 +
    +
    + The maximum number of significant digits of the result of the power operation + (unless a modulus is specified). +
    +
    If set to 0, the number of signifcant digits will not be limited.
    +
    See toPower.
    +
    BigNumber.config({ POW_PRECISION: 100 })
    + + + +
    FORMAT
    +
    object
    +
    + The FORMAT object configures the format of the string returned by the + toFormat method. +
    +
    + The example below shows the properties of the FORMAT object that are + recognised, and their default values. +
    +
    + Unlike the other configuration properties, the values of the properties of the + FORMAT object will not be checked for validity. The existing + FORMAT object will simply be replaced by the object that is passed in. + Note that all the properties shown below do not have to be included. +
    +
    See toFormat for examples of usage.
    +
    +
    +BigNumber.config({
    +    FORMAT: {
    +        // the decimal separator
    +        decimalSeparator: '.',
    +        // the grouping separator of the integer part
    +        groupSeparator: ',',
    +        // the primary grouping size of the integer part
    +        groupSize: 3,
    +        // the secondary grouping size of the integer part
    +        secondaryGroupSize: 0,
    +        // the grouping separator of the fraction part
    +        fractionGroupSeparator: ' ',
    +        // the grouping size of the fraction part
    +        fractionGroupSize: 0
    +    }
    +});
    +
    +
    +
    +

    Returns an object with the above properties and their current values.

    +

    + If the value to be assigned to any of the above properties is null or + undefined it is ignored. +

    +

    See Errors for the treatment of invalid values.

    +
    +BigNumber.config({
    +    DECIMAL_PLACES: 40,
    +    ROUNDING_MODE: BigNumber.ROUND_HALF_CEIL,
    +    EXPONENTIAL_AT: [-10, 20],
    +    RANGE: [-500, 500],
    +    ERRORS: true,
    +    CRYPTO: true,
    +    MODULO_MODE: BigNumber.ROUND_FLOOR,
    +    POW_PRECISION: 80,
    +    FORMAT: {
    +        groupSize: 3,
    +        groupSeparator: ' ',
    +        decimalSeparator: ','
    +    }
    +});
    +
    +// Alternatively but equivalently (excluding FORMAT):
    +BigNumber.config( 40, 7, [-10, 20], 500, 1, 1, 3, 80 )
    +
    +obj = BigNumber.config();
    +obj.ERRORS       // true
    +obj.RANGE        // [-500, 500]
    + + + +
    + max.max([arg1 [, arg2, ...]]) ⇒ BigNumber +
    +

    + arg1, arg2, ...: number|string|BigNumber
    + See BigNumber for further parameter details. +

    +

    + Returns a BigNumber whose value is the maximum of arg1, + arg2,... . +

    +

    The argument to this method can also be an array of values.

    +

    The return value is always exact and unrounded.

    +
    x = new BigNumber('3257869345.0378653')
    +BigNumber.max(4e9, x, '123456789.9')          // '4000000000'
    +
    +arr = [12, '13', new BigNumber(14)]
    +BigNumber.max(arr)                            // '14'
    + + + +
    + min.min([arg1 [, arg2, ...]]) ⇒ BigNumber +
    +

    + arg1, arg2, ...: number|string|BigNumber
    + See BigNumber for further parameter details. +

    +

    + Returns a BigNumber whose value is the minimum of arg1, + arg2,... . +

    +

    The argument to this method can also be an array of values.

    +

    The return value is always exact and unrounded.

    +
    x = new BigNumber('3257869345.0378653')
    +BigNumber.min(4e9, x, '123456789.9')          // '123456789.9'
    +
    +arr = [2, new BigNumber(-14), '-15.9999', -12]
    +BigNumber.min(arr)                            // '-15.9999'
    + + + +
    + random.random([dp]) ⇒ BigNumber +
    +

    dp: number: integer, 0 to 1e+9 inclusive

    +

    + Returns a new BigNumber with a pseudo-random value equal to or greater than 0 and + less than 1. +

    +

    + The return value will have dp decimal places (or less if trailing zeros are + produced).
    + If dp is omitted then the number of decimal places will default to the current + DECIMAL_PLACES setting. +

    +

    + Depending on the value of this BigNumber constructor's + CRYPTO setting and the support for the + crypto object in the host environment, the random digits of the return value are + generated by either Math.random (fastest), crypto.getRandomValues + (Web Cryptography API in recent browsers) or crypto.randomBytes (Node.js). +

    +

    + If CRYPTO is true, i.e. one of the + crypto methods is to be used, the value of a returned BigNumber should be + cryptographically-secure and statistically indistinguishable from a random value. +

    +
    BigNumber.config({ DECIMAL_PLACES: 10 })
    +BigNumber.random()              // '0.4117936847'
    +BigNumber.random(20)            // '0.78193327636914089009'
    + + + +

    Properties

    +

    + The library's enumerated rounding modes are stored as properties of the constructor.
    + (They are not referenced internally by the library itself.) +

    +

    + Rounding modes 0 to 6 (inclusive) are the same as those of Java's + BigDecimal class. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    PropertyValueDescription
    ROUND_UP0Rounds away from zero
    ROUND_DOWN1Rounds towards zero
    ROUND_CEIL2Rounds towards Infinity
    ROUND_FLOOR3Rounds towards -Infinity
    ROUND_HALF_UP4 + Rounds towards nearest neighbour.
    + If equidistant, rounds away from zero +
    ROUND_HALF_DOWN5 + Rounds towards nearest neighbour.
    + If equidistant, rounds towards zero +
    ROUND_HALF_EVEN6 + Rounds towards nearest neighbour.
    + If equidistant, rounds towards even neighbour +
    ROUND_HALF_CEIL7 + Rounds towards nearest neighbour.
    + If equidistant, rounds towards Infinity +
    ROUND_HALF_FLOOR8 + Rounds towards nearest neighbour.
    + If equidistant, rounds towards -Infinity +
    +
    +BigNumber.config({ ROUNDING_MODE: BigNumber.ROUND_CEIL })
    +BigNumber.config({ ROUNDING_MODE: 2 })     // equivalent
    + + +

    INSTANCE

    + +

    Methods

    +

    The methods inherited by a BigNumber instance from its constructor's prototype object.

    +

    A BigNumber is immutable in the sense that it is not changed by its methods.

    +

    + The treatment of ±0, ±Infinity and NaN is + consistent with how JavaScript treats these values. +

    +

    + Many method names have a shorter alias.
    + (Internally, the library always uses the shorter method names.) +

    + + + +
    absoluteValue.abs() ⇒ BigNumber
    +

    + Returns a BigNumber whose value is the absolute value, i.e. the magnitude, of the value of + this BigNumber. +

    +

    The return value is always exact and unrounded.

    +
    +x = new BigNumber(-0.8)
    +y = x.absoluteValue()           // '0.8'
    +z = y.abs()                     // '0.8'
    + + + +
    ceil.ceil() ⇒ BigNumber
    +

    + Returns a BigNumber whose value is the value of this BigNumber rounded to + a whole number in the direction of positive Infinity. +

    +
    +x = new BigNumber(1.3)
    +x.ceil()                        // '2'
    +y = new BigNumber(-1.8)
    +y.ceil()                        // '-1'
    + + + +
    comparedTo.cmp(n [, base]) ⇒ number
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    + + + + + + + + + + + + + + + + + + +
    Returns 
    1If the value of this BigNumber is greater than the value of n
    -1If the value of this BigNumber is less than the value of n
    0If this BigNumber and n have the same value
    nullIf the value of either this BigNumber or n is NaN
    +
    +x = new BigNumber(Infinity)
    +y = new BigNumber(5)
    +x.comparedTo(y)                 // 1
    +x.comparedTo(x.minus(1))        // 0
    +y.cmp(NaN)                      // null
    +y.cmp('110', 2)                 // -1
    + + + +
    decimalPlaces.dp() ⇒ number
    +

    + Return the number of decimal places of the value of this BigNumber, or null if + the value of this BigNumber is ±Infinity or NaN. +

    +
    +x = new BigNumber(123.45)
    +x.decimalPlaces()               // 2
    +y = new BigNumber('9.9e-101')
    +y.dp()                          // 102
    + + + +
    dividedBy.div(n [, base]) ⇒ BigNumber +
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    +

    + Returns a BigNumber whose value is the value of this BigNumber divided by + n, rounded according to the current + DECIMAL_PLACES and + ROUNDING_MODE configuration. +

    +
    +x = new BigNumber(355)
    +y = new BigNumber(113)
    +x.dividedBy(y)                  // '3.14159292035398230088'
    +x.div(5)                        // '71'
    +x.div(47, 16)                   // '5'
    + + + +
    + dividedToIntegerBy.divToInt(n [, base]) ⇒ + BigNumber +
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    +

    + Return a BigNumber whose value is the integer part of dividing the value of this BigNumber by + n. +

    +
    +x = new BigNumber(5)
    +y = new BigNumber(3)
    +x.dividedToIntegerBy(y)         // '1'
    +x.divToInt(0.7)                 // '7'
    +x.divToInt('0.f', 16)           // '5'
    + + + +
    equals.eq(n [, base]) ⇒ boolean
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    +

    + Returns true if the value of this BigNumber equals the value of n, + otherwise returns false.
    + As with JavaScript, NaN does not equal NaN. +

    +

    Note: This method uses the comparedTo method internally.

    +
    +0 === 1e-324                    // true
    +x = new BigNumber(0)
    +x.equals('1e-324')              // false
    +BigNumber(-0).eq(x)             // true  ( -0 === 0 )
    +BigNumber(255).eq('ff', 16)     // true
    +
    +y = new BigNumber(NaN)
    +y.equals(NaN)                   // false
    + + + +
    floor.floor() ⇒ BigNumber
    +

    + Returns a BigNumber whose value is the value of this BigNumber rounded to a whole number in + the direction of negative Infinity. +

    +
    +x = new BigNumber(1.8)
    +x.floor()                       // '1'
    +y = new BigNumber(-1.3)
    +y.floor()                       // '-2'
    + + + +
    greaterThan.gt(n [, base]) ⇒ boolean
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    +

    + Returns true if the value of this BigNumber is greater than the value of + n, otherwise returns false. +

    +

    Note: This method uses the comparedTo method internally.

    +
    +0.1 > (0.3 - 0.2)                           // true
    +x = new BigNumber(0.1)
    +x.greaterThan(BigNumber(0.3).minus(0.2))    // false
    +BigNumber(0).gt(x)                          // false
    +BigNumber(11, 3).gt(11.1, 2)                // true
    + + + +
    + greaterThanOrEqualTo.gte(n [, base]) ⇒ boolean +
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    +

    + Returns true if the value of this BigNumber is greater than or equal to the value + of n, otherwise returns false. +

    +

    Note: This method uses the comparedTo method internally.

    +
    +(0.3 - 0.2) >= 0.1                   // false
    +x = new BigNumber(0.3).minus(0.2)
    +x.greaterThanOrEqualTo(0.1)          // true
    +BigNumber(1).gte(x)                  // true
    +BigNumber(10, 18).gte('i', 36)       // true
    + + + +
    isFinite.isFinite() ⇒ boolean
    +

    + Returns true if the value of this BigNumber is a finite number, otherwise + returns false. +

    +

    + The only possible non-finite values of a BigNumber are NaN, Infinity + and -Infinity. +

    +
    +x = new BigNumber(1)
    +x.isFinite()                    // true
    +y = new BigNumber(Infinity)
    +y.isFinite()                    // false
    +

    + Note: The native method isFinite() can be used if + n <= Number.MAX_VALUE. +

    + + + +
    isInteger.isInt() ⇒ boolean
    +

    + Returns true if the value of this BigNumber is a whole number, otherwise returns + false. +

    +
    +x = new BigNumber(1)
    +x.isInteger()                   // true
    +y = new BigNumber(123.456)
    +y.isInt()                       // false
    + + + +
    isNaN.isNaN() ⇒ boolean
    +

    + Returns true if the value of this BigNumber is NaN, otherwise + returns false. +

    +
    +x = new BigNumber(NaN)
    +x.isNaN()                       // true
    +y = new BigNumber('Infinity')
    +y.isNaN()                       // false
    +

    Note: The native method isNaN() can also be used.

    + + + +
    isNegative.isNeg() ⇒ boolean
    +

    + Returns true if the value of this BigNumber is negative, otherwise returns + false. +

    +
    +x = new BigNumber(-0)
    +x.isNegative()                  // true
    +y = new BigNumber(2)
    +y.isNeg()                       // false
    +

    Note: n < 0 can be used if n <= -Number.MIN_VALUE.

    + + + +
    isZero.isZero() ⇒ boolean
    +

    + Returns true if the value of this BigNumber is zero or minus zero, otherwise + returns false. +

    +
    +x = new BigNumber(-0)
    +x.isZero() && x.isNeg()         // true
    +y = new BigNumber(Infinity)
    +y.isZero()                      // false
    +

    Note: n == 0 can be used if n >= Number.MIN_VALUE.

    + + + +
    lessThan.lt(n [, base]) ⇒ boolean
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    +

    + Returns true if the value of this BigNumber is less than the value of + n, otherwise returns false. +

    +

    Note: This method uses the comparedTo method internally.

    +
    +(0.3 - 0.2) < 0.1                     // true
    +x = new BigNumber(0.3).minus(0.2)
    +x.lessThan(0.1)                       // false
    +BigNumber(0).lt(x)                    // true
    +BigNumber(11.1, 2).lt(11, 3)          // true
    + + + +
    + lessThanOrEqualTo.lte(n [, base]) ⇒ boolean +
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    +

    + Returns true if the value of this BigNumber is less than or equal to the value of + n, otherwise returns false. +

    +

    Note: This method uses the comparedTo method internally.

    +
    +0.1 <= (0.3 - 0.2)                                // false
    +x = new BigNumber(0.1)
    +x.lessThanOrEqualTo(BigNumber(0.3).minus(0.2))    // true
    +BigNumber(-1).lte(x)                              // true
    +BigNumber(10, 18).lte('i', 36)                    // true
    + + + +
    + minus.minus(n [, base]) ⇒ BigNumber +
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    +

    Returns a BigNumber whose value is the value of this BigNumber minus n.

    +

    The return value is always exact and unrounded.

    +
    +0.3 - 0.1                       // 0.19999999999999998
    +x = new BigNumber(0.3)
    +x.minus(0.1)                    // '0.2'
    +x.minus(0.6, 20)                // '0'
    + + + +
    modulo.mod(n [, base]) ⇒ BigNumber
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    +

    + Returns a BigNumber whose value is the value of this BigNumber modulo n, i.e. + the integer remainder of dividing this BigNumber by n. +

    +

    + The value returned, and in particular its sign, is dependent on the value of the + MODULO_MODE setting of this BigNumber constructor. + If it is 1 (default value), the result will have the same sign as this BigNumber, + and it will match that of Javascript's % operator (within the limits of double + precision) and BigDecimal's remainder method. +

    +

    The return value is always exact and unrounded.

    +

    + See MODULO_MODE for a description of the other + modulo modes. +

    +
    +1 % 0.9                         // 0.09999999999999998
    +x = new BigNumber(1)
    +x.modulo(0.9)                   // '0.1'
    +y = new BigNumber(33)
    +y.mod('a', 33)                  // '3'
    + + + +
    negated.neg() ⇒ BigNumber
    +

    + Returns a BigNumber whose value is the value of this BigNumber negated, i.e. multiplied by + -1. +

    +
    +x = new BigNumber(1.8)
    +x.negated()                     // '-1.8'
    +y = new BigNumber(-1.3)
    +y.neg()                         // '1.3'
    + + + +
    plus.plus(n [, base]) ⇒ BigNumber
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    +

    Returns a BigNumber whose value is the value of this BigNumber plus n.

    +

    The return value is always exact and unrounded.

    +
    +0.1 + 0.2                       // 0.30000000000000004
    +x = new BigNumber(0.1)
    +y = x.plus(0.2)                 // '0.3'
    +BigNumber(0.7).plus(x).plus(y)  // '1'
    +x.plus('0.1', 8)                // '0.225'
    + + + +
    precision.sd([z]) ⇒ number
    +

    + z: boolean|number: true, false, 0 + or 1 +

    +

    Returns the number of significant digits of the value of this BigNumber.

    +

    + If z is true or 1 then any trailing zeros of the + integer part of a number are counted as significant digits, otherwise they are not. +

    +
    +x = new BigNumber(1.234)
    +x.precision()                   // 4
    +y = new BigNumber(987000)
    +y.sd()                          // 3
    +y.sd(true)                      // 6
    + + + +
    round.round([dp [, rm]]) ⇒ BigNumber
    +

    + dp: number: integer, 0 to 1e+9 inclusive
    + rm: number: integer, 0 to 8 inclusive +

    +

    + Returns a BigNumber whose value is the value of this BigNumber rounded by rounding mode + rm to a maximum of dp decimal places. +

    +

    + if dp is omitted, or is null or undefined, the + return value is n rounded to a whole number.
    + if rm is omitted, or is null or undefined, + ROUNDING_MODE is used. +

    +

    + See Errors for the treatment of other non-integer or out of range + dp or rm values. +

    +
    +x = 1234.56
    +Math.round(x)                             // 1235
    +
    +y = new BigNumber(x)
    +y.round()                                 // '1235'
    +y.round(1)                                // '1234.6'
    +y.round(2)                                // '1234.56'
    +y.round(10)                               // '1234.56'
    +y.round(0, 1)                             // '1234'
    +y.round(0, 6)                             // '1235'
    +y.round(1, 1)                             // '1234.5'
    +y.round(1, BigNumber.ROUND_HALF_EVEN)     // '1234.6'
    +y                                         // '1234.56'
    + + + +
    shift.shift(n) ⇒ BigNumber
    +

    + n: number: integer, + -9007199254740991 to 9007199254740991 inclusive +

    +

    + Returns a BigNumber whose value is the value of this BigNumber shifted n places. +

    + The shift is of the decimal point, i.e. of powers of ten, and is to the left if n + is negative or to the right if n is positive. +

    +

    The return value is always exact and unrounded.

    +
    +x = new BigNumber(1.23)
    +x.shift(3)                      // '1230'
    +x.shift(-3)                     // '0.00123'
    + + + +
    squareRoot.sqrt() ⇒ BigNumber
    +

    + Returns a BigNumber whose value is the square root of the value of this BigNumber, + rounded according to the current + DECIMAL_PLACES and + ROUNDING_MODE configuration. +

    +

    + The return value will be correctly rounded, i.e. rounded as if the result was first calculated + to an infinite number of correct digits before rounding. +

    +
    +x = new BigNumber(16)
    +x.squareRoot()                  // '4'
    +y = new BigNumber(3)
    +y.sqrt()                        // '1.73205080756887729353'
    + + + +
    times.times(n [, base]) ⇒ BigNumber
    +

    + n: number|string|BigNumber
    + base: number
    + See BigNumber for further parameter details. +

    +

    Returns a BigNumber whose value is the value of this BigNumber times n.

    +

    The return value is always exact and unrounded.

    +
    +0.6 * 3                         // 1.7999999999999998
    +x = new BigNumber(0.6)
    +y = x.times(3)                  // '1.8'
    +BigNumber('7e+500').times(y)    // '1.26e+501'
    +x.times('-a', 16)               // '-6'
    + + + +
    + toDigits.toDigits([sd [, rm]]) ⇒ BigNumber +
    +

    + sd: number: integer, 1 to 1e+9 inclusive.
    + rm: number: integer, 0 to 8 inclusive. +

    +

    + Returns a BigNumber whose value is the value of this BigNumber rounded to sd + significant digits using rounding mode rm. +

    +

    + If sd is omitted or is null or undefined, the return + value will not be rounded.
    + If rm is omitted or is null or undefined, + ROUNDING_MODE will be used. +

    +

    + See Errors for the treatment of other non-integer or out of range + sd or rm values. +

    +
    +BigNumber.config({ precision: 5, rounding: 4 })
    +x = new BigNumber(9876.54321)
    +
    +x.toDigits()                          // '9876.5'
    +x.toDigits(6)                         // '9876.54'
    +x.toDigits(6, BigNumber.ROUND_UP)     // '9876.55'
    +x.toDigits(2)                         // '9900'
    +x.toDigits(2, 1)                      // '9800'
    +x                                     // '9876.54321'
    + + + +
    + toExponential.toExponential([dp [, rm]]) ⇒ string +
    +

    + dp: number: integer, 0 to 1e+9 inclusive
    + rm: number: integer, 0 to 8 inclusive +

    +

    + Returns a string representing the value of this BigNumber in exponential notation rounded + using rounding mode rm to dp decimal places, i.e with one digit + before the decimal point and dp digits after it. +

    +

    + If the value of this BigNumber in exponential notation has fewer than dp fraction + digits, the return value will be appended with zeros accordingly. +

    +

    + If dp is omitted, or is null or undefined, the number + of digits after the decimal point defaults to the minimum number of digits necessary to + represent the value exactly.
    + If rm is omitted or is null or undefined, + ROUNDING_MODE is used. +

    +

    + See Errors for the treatment of other non-integer or out of range + dp or rm values. +

    +
    +x = 45.6
    +y = new BigNumber(x)
    +x.toExponential()               // '4.56e+1'
    +y.toExponential()               // '4.56e+1'
    +x.toExponential(0)              // '5e+1'
    +y.toExponential(0)              // '5e+1'
    +x.toExponential(1)              // '4.6e+1'
    +y.toExponential(1)              // '4.6e+1'
    +y.toExponential(1, 1)           // '4.5e+1'  (ROUND_DOWN)
    +x.toExponential(3)              // '4.560e+1'
    +y.toExponential(3)              // '4.560e+1'
    + + + +
    + toFixed.toFixed([dp [, rm]]) ⇒ string +
    +

    + dp: number: integer, 0 to 1e+9 inclusive
    + rm: number: integer, 0 to 8 inclusive +

    +

    + Returns a string representing the value of this BigNumber in normal (fixed-point) notation + rounded to dp decimal places using rounding mode rm. +

    +

    + If the value of this BigNumber in normal notation has fewer than dp fraction + digits, the return value will be appended with zeros accordingly. +

    +

    + Unlike Number.prototype.toFixed, which returns exponential notation if a number + is greater or equal to 1021, this method will always return normal + notation. +

    +

    + If dp is omitted or is null or undefined, the return + value will be unrounded and in normal notation. This is also unlike + Number.prototype.toFixed, which returns the value to zero decimal places.
    + It is useful when fixed-point notation is required and the current + EXPONENTIAL_AT setting causes + toString to return exponential notation.
    + If rm is omitted or is null or undefined, + ROUNDING_MODE is used. +

    +

    + See Errors for the treatment of other non-integer or out of range + dp or rm values. +

    +
    +x = 3.456
    +y = new BigNumber(x)
    +x.toFixed()                     // '3'
    +y.toFixed()                     // '3.456'
    +y.toFixed(0)                    // '3'
    +x.toFixed(2)                    // '3.46'
    +y.toFixed(2)                    // '3.46'
    +y.toFixed(2, 1)                 // '3.45'  (ROUND_DOWN)
    +x.toFixed(5)                    // '3.45600'
    +y.toFixed(5)                    // '3.45600'
    + + + +
    + toFormat.toFormat([dp [, rm]]) ⇒ string +
    +

    + dp: number: integer, 0 to 1e+9 inclusive
    + rm: number: integer, 0 to 8 inclusive +

    +

    +

    + Returns a string representing the value of this BigNumber in normal (fixed-point) notation + rounded to dp decimal places using rounding mode rm, and formatted + according to the properties of the FORMAT object. +

    +

    + See the examples below for the properties of the + FORMAT object, their types and their usage. +

    +

    + If dp is omitted or is null or undefined, then the + return value is not rounded to a fixed number of decimal places.
    + If rm is omitted or is null or undefined, + ROUNDING_MODE is used. +

    +

    + See Errors for the treatment of other non-integer or out of range + dp or rm values. +

    +
    +format = {
    +    decimalSeparator: '.',
    +    groupSeparator: ',',
    +    groupSize: 3,
    +    secondaryGroupSize: 0,
    +    fractionGroupSeparator: ' ',
    +    fractionGroupSize: 0
    +}
    +BigNumber.config({ FORMAT: format })
    +
    +x = new BigNumber('123456789.123456789')
    +x.toFormat()                    // '123,456,789.123456789'
    +x.toFormat(1)                   // '123,456,789.1'
    +
    +// If a reference to the object assigned to FORMAT has been retained,
    +// the format properties can be changed directly
    +format.groupSeparator = ' '
    +format.fractionGroupSize = 5
    +x.toFormat()                    // '123 456 789.12345 6789'
    +
    +BigNumber.config({
    +    FORMAT: {
    +        decimalSeparator: ',',
    +        groupSeparator: '.',
    +        groupSize: 3,
    +        secondaryGroupSize: 2
    +    }
    +})
    +
    +x.toFormat(6)                   // '12.34.56.789,123'
    + + + +
    + toFraction.toFraction([max]) ⇒ [string, string] +
    +

    + max: number|string|BigNumber: integer >= 1 and < + Infinity +

    +

    + Returns a string array representing the value of this BigNumber as a simple fraction with an + integer numerator and an integer denominator. The denominator will be a positive non-zero + value less than or equal to max. +

    +

    + If a maximum denominator, max, is not specified, or is null or + undefined, the denominator will be the lowest value necessary to represent the + number exactly. +

    +

    + See Errors for the treatment of other non-integer or out of range + max values. +

    +
    +x = new BigNumber(1.75)
    +x.toFraction()                  // '7, 4'
    +
    +pi = new BigNumber('3.14159265358')
    +pi.toFraction()                 // '157079632679,50000000000'
    +pi.toFraction(100000)           // '312689, 99532'
    +pi.toFraction(10000)            // '355, 113'
    +pi.toFraction(100)              // '311, 99'
    +pi.toFraction(10)               // '22, 7'
    +pi.toFraction(1)                // '3, 1'
    + + + +
    toJSON.toJSON() ⇒ string
    +

    As valueOf.

    +
    +x = new BigNumber('177.7e+457')
    +y = new BigNumber(235.4325)
    +z = new BigNumber('0.0098074')
    +
    +// Serialize an array of three BigNumbers
    +str = JSON.stringify( [x, y, z] )
    +// "["1.777e+459","235.4325","0.0098074"]"
    +
    +// Return an array of three BigNumbers
    +JSON.parse(str, function (key, val) {
    +    return key === '' ? val : new BigNumber(val)
    +})
    + + + +
    toNumber.toNumber() ⇒ number
    +

    Returns the value of this BigNumber as a JavaScript number primitive.

    +

    + Type coercion with, for example, the unary plus operator will also work, except that a + BigNumber with the value minus zero will be converted to positive zero. +

    +
    +x = new BigNumber(456.789)
    +x.toNumber()                    // 456.789
    ++x                              // 456.789
    +
    +y = new BigNumber('45987349857634085409857349856430985')
    +y.toNumber()                    // 4.598734985763409e+34
    +
    +z = new BigNumber(-0)
    +1 / +z                          // Infinity
    +1 / z.toNumber()                // -Infinity
    + + + +
    toPower.pow(n [, m]) ⇒ BigNumber
    +

    + n: number: integer, + -9007199254740991 to 9007199254740991 inclusive
    + m: number|string|BigNumber +

    +

    + Returns a BigNumber whose value is the value of this BigNumber raised to the power + n, and optionally modulo a modulus m. +

    +

    + If n is negative the result is rounded according to the current + DECIMAL_PLACES and + ROUNDING_MODE configuration. +

    +

    + If n is not an integer or is out of range: +

    +

    + If ERRORS is true a BigNumber Error is thrown,
    + else if n is greater than 9007199254740991, it is interpreted as + Infinity;
    + else if n is less than -9007199254740991, it is interpreted as + -Infinity;
    + else if n is otherwise a number, it is truncated to an integer;
    + else it is interpreted as NaN. +

    +

    + As the number of digits of the result of the power operation can grow so large so quickly, + e.g. 123.45610000 has over 50000 digits, the number of significant + digits calculated is limited to the value of the + POW_PRECISION setting (unless a modulus + m is specified). +

    +

    + By default POW_PRECISION is set to 0. + This means that an unlimited number of significant digits will be calculated, and that the + method's performance will decrease dramatically for larger exponents. +

    +

    + Negative exponents will be calculated to the number of decimal places specified by + DECIMAL_PLACES (but not to more than + POW_PRECISION significant digits). +

    +

    + If m is specified and the value of m, n and this + BigNumber are positive integers, then a fast modular exponentiation algorithm is used, + otherwise if any of the values is not a positive integer the operation will simply be + performed as x.toPower(n).modulo(m) with a + POW_PRECISION of 0. +

    +
    +Math.pow(0.7, 2)                // 0.48999999999999994
    +x = new BigNumber(0.7)
    +x.toPower(2)                    // '0.49'
    +BigNumber(3).pow(-2)            // '0.11111111111111111111'
    + + + +
    + toPrecision.toPrecision([sd [, rm]]) ⇒ string +
    +

    + sd: number: integer, 1 to 1e+9 inclusive
    + rm: number: integer, 0 to 8 inclusive +

    +

    + Returns a string representing the value of this BigNumber rounded to sd + significant digits using rounding mode rm. +

    +

    + If sd is less than the number of digits necessary to represent the integer part + of the value in normal (fixed-point) notation, then exponential notation is used. +

    +

    + If sd is omitted, or is null or undefined, then the + return value is the same as n.toString().
    + If rm is omitted or is null or undefined, + ROUNDING_MODE is used. +

    +

    + See Errors for the treatment of other non-integer or out of range + sd or rm values. +

    +
    +x = 45.6
    +y = new BigNumber(x)
    +x.toPrecision()                 // '45.6'
    +y.toPrecision()                 // '45.6'
    +x.toPrecision(1)                // '5e+1'
    +y.toPrecision(1)                // '5e+1'
    +y.toPrecision(2, 0)             // '4.6e+1'  (ROUND_UP)
    +y.toPrecision(2, 1)             // '4.5e+1'  (ROUND_DOWN)
    +x.toPrecision(5)                // '45.600'
    +y.toPrecision(5)                // '45.600'
    + + + +
    toString.toString([base]) ⇒ string
    +

    base: number: integer, 2 to 64 inclusive

    +

    + Returns a string representing the value of this BigNumber in the specified base, or base + 10 if base is omitted or is null or + undefined. +

    +

    + For bases above 10, values from 10 to 35 are + represented by a-z (as with Number.prototype.toString), + 36 to 61 by A-Z, and 62 and + 63 by $ and _ respectively. +

    +

    + If a base is specified the value is rounded according to the current + DECIMAL_PLACES + and ROUNDING_MODE configuration. +

    +

    + If a base is not specified, and this BigNumber has a positive + exponent that is equal to or greater than the positive component of the + current EXPONENTIAL_AT setting, + or a negative exponent equal to or less than the negative component of the + setting, then exponential notation is returned. +

    +

    If base is null or undefined it is ignored.

    +

    + See Errors for the treatment of other non-integer or out of range + base values. +

    +
    +x = new BigNumber(750000)
    +x.toString()                    // '750000'
    +BigNumber.config({ EXPONENTIAL_AT: 5 })
    +x.toString()                    // '7.5e+5'
    +
    +y = new BigNumber(362.875)
    +y.toString(2)                   // '101101010.111'
    +y.toString(9)                   // '442.77777777777777777778'
    +y.toString(32)                  // 'ba.s'
    +
    +BigNumber.config({ DECIMAL_PLACES: 4 });
    +z = new BigNumber('1.23456789')
    +z.toString()                    // '1.23456789'
    +z.toString(10)                  // '1.2346'
    + + + +
    truncated.trunc() ⇒ BigNumber
    +

    + Returns a BigNumber whose value is the value of this BigNumber truncated to a whole number. +

    +
    +x = new BigNumber(123.456)
    +x.truncated()                   // '123'
    +y = new BigNumber(-12.3)
    +y.trunc()                       // '-12'
    + + + +
    valueOf.valueOf() ⇒ string
    +

    + As toString, but does not accept a base argument and includes the minus sign + for negative zero. +

    +
    +x = new BigNumber('-0')
    +x.toString()                    // '0'
    +x.valueOf()                     // '-0'
    +y = new BigNumber('1.777e+457')
    +y.valueOf()                     // '1.777e+457'
    + + + +

    Properties

    +

    The properties of a BigNumber instance:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    PropertyDescriptionTypeValue
    ccoefficient*number[] Array of base 1e14 numbers
    eexponentnumberInteger, -1000000000 to 1000000000 inclusive
    ssignnumber-1 or 1
    isBigNumbertype identifierbooleantrue
    +

    *significand

    +

    + The value of any of the c, e and s properties may also + be null. +

    +

    + From v2.0.0 of this library, the value of the coefficient of a BigNumber is stored in a + normalised base 100000000000000 floating point format, as opposed to the base + 10 format used in v1.x.x +

    +

    + This change means the properties of a BigNumber are now best considered to be read-only. + Previously it was acceptable to change the exponent of a BigNumber by writing to its exponent + property directly, but this is no longer recommended as the number of digits in the first + element of the coefficient array is dependent on the exponent, so the coefficient would also + need to be altered. +

    +

    + Note that, as with JavaScript numbers, the original exponent and fractional trailing zeros are + not necessarily preserved. +

    +
    x = new BigNumber(0.123)              // '0.123'
    +x.toExponential()                     // '1.23e-1'
    +x.c                                   // '1,2,3'
    +x.e                                   // -1
    +x.s                                   // 1
    +
    +y = new Number(-123.4567000e+2)       // '-12345.67'
    +y.toExponential()                     // '-1.234567e+4'
    +z = new BigNumber('-123.4567000e+2')  // '-12345.67'
    +z.toExponential()                     // '-1.234567e+4'
    +z.c                                   // '1,2,3,4,5,6,7'
    +z.e                                   // 4
    +z.s                                   // -1
    +

    Checking if a value is a BigNumber instance:

    +
    +x = new BigNumber(3)
    +x instanceof BigNumber     // true
    +x.isBigNumber              // true
    +
    +BN = BigNumber.another();
    +
    +y = new BN(3)
    +y instanceof BigNumber     // false
    +y.isBigNumber              // true
    + + + + +

    Zero, NaN and Infinity

    +

    + The table below shows how ±0, NaN and + ±Infinity are stored. +

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    ces
    ±0[0]0±1
    NaNnullnullnull
    ±Infinitynullnull±1
    +
    +x = new Number(-0)              // 0
    +1 / x == -Infinity              // true
    +
    +y = new BigNumber(-0)           // '0'
    +y.c                             // '0' ( [0].toString() )
    +y.e                             // 0
    +y.s                             // -1
    + + + +

    Errors

    +

    + The errors that are thrown are generic Error objects with name + BigNumber Error. +

    +

    + The table below shows the errors that may be thrown if ERRORS is + true, and the action taken if ERRORS is false. +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Method(s)ERRORS: true
    Throw BigNumber Error
    ERRORS: false
    Action on invalid argument
    + + BigNumber
    + comparedTo
    + dividedBy
    + dividedToIntegerBy
    + equals
    + greaterThan
    + greaterThanOrEqualTo
    + lessThan
    + lessThanOrEqualTo
    + minus
    + modulo
    + plus
    + times +
    number type has more than
    15 significant digits
    Accept.
    not a base... numberSubstitute NaN.
    base not an integerTruncate to integer.
    Ignore if not a number.
    base out of rangeIgnore.
    not a number*Substitute NaN.
    anothernot an objectIgnore.
    configDECIMAL_PLACES not an integerTruncate to integer.
    Ignore if not a number.
    DECIMAL_PLACES out of rangeIgnore.
    ROUNDING_MODE not an integerTruncate to integer.
    Ignore if not a number.
    ROUNDING_MODE out of rangeIgnore.
    EXPONENTIAL_AT not an integer
    or not [integer, integer]
    Truncate to integer(s).
    Ignore if not number(s).
    EXPONENTIAL_AT out of range
    or not [negative, positive]
    Ignore.
    RANGE not an integer
    or not [integer, integer]
    Truncate to integer(s).
    Ignore if not number(s).
    RANGE cannot be zeroIgnore.
    RANGE out of range
    or not [negative, positive]
    Ignore.
    ERRORS not a boolean
    or binary digit
    Ignore.
    CRYPTO not a boolean
    or binary digit
    Ignore.
    CRYPTO crypto unavailableIgnore.
    MODULO_MODE not an integerTruncate to integer.
    Ignore if not a number.
    MODULO_MODE out of rangeIgnore.
    POW_PRECISION not an integerTruncate to integer.
    Ignore if not a number.
    POW_PRECISION out of rangeIgnore.
    FORMAT not an objectIgnore.
    precisionargument not a boolean
    or binary digit
    Ignore.
    rounddecimal places not an integerTruncate to integer.
    Ignore if not a number.
    decimal places out of rangeIgnore.
    rounding mode not an integerTruncate to integer.
    Ignore if not a number.
    rounding mode out of rangeIgnore.
    shiftargument not an integerTruncate to integer.
    Ignore if not a number.
    argument out of rangeSubstitute ±Infinity. +
    + toExponential
    + toFixed
    + toFormat +
    decimal places not an integerTruncate to integer.
    Ignore if not a number.
    decimal places out of rangeIgnore.
    rounding mode not an integerTruncate to integer.
    Ignore if not a number.
    rounding mode out of rangeIgnore.
    toFractionmax denominator not an integerTruncate to integer.
    Ignore if not a number.
    max denominator out of rangeIgnore.
    + toDigits
    + toPrecision +
    precision not an integerTruncate to integer.
    Ignore if not a number.
    precision out of rangeIgnore.
    rounding mode not an integerTruncate to integer.
    Ignore if not a number.
    rounding mode out of rangeIgnore.
    toPowerexponent not an integerTruncate to integer.
    Substitute NaN if not a number.
    exponent out of rangeSubstitute ±Infinity. +
    toStringbase not an integerTruncate to integer.
    Ignore if not a number.
    base out of rangeIgnore.
    +

    *No error is thrown if the value is NaN or 'NaN'.

    +

    + The message of a BigNumber Error will also contain the name of the method from which + the error originated. +

    +

    To determine if an exception is a BigNumber Error:

    +
    +try {
    +    // ...
    +} catch (e) {
    +    if ( e instanceof Error && e.name == 'BigNumber Error' ) {
    +        // ...
    +    }
    +}
    + + + +

    FAQ

    + +
    Why are trailing fractional zeros removed from BigNumbers?
    +

    + Some arbitrary-precision libraries retain trailing fractional zeros as they can indicate the + precision of a value. This can be useful but the results of arithmetic operations can be + misleading. +

    +
    +x = new BigDecimal("1.0")
    +y = new BigDecimal("1.1000")
    +z = x.add(y)                      // 2.1000
    +
    +x = new BigDecimal("1.20")
    +y = new BigDecimal("3.45000")
    +z = x.multiply(y)                 // 4.1400000
    +

    + To specify the precision of a value is to specify that the value lies + within a certain range. +

    +

    + In the first example, x has a value of 1.0. The trailing zero shows + the precision of the value, implying that it is in the range 0.95 to + 1.05. Similarly, the precision indicated by the trailing zeros of y + indicates that the value is in the range 1.09995 to 1.10005. +

    +

    + If we add the two lowest values in the ranges we have, 0.95 + 1.09995 = 2.04995, + and if we add the two highest values we have, 1.05 + 1.10005 = 2.15005, so the + range of the result of the addition implied by the precision of its operands is + 2.04995 to 2.15005. +

    +

    + The result given by BigDecimal of 2.1000 however, indicates that the value is in + the range 2.09995 to 2.10005 and therefore the precision implied by + its trailing zeros may be misleading. +

    +

    + In the second example, the true range is 4.122744 to 4.157256 yet + the BigDecimal answer of 4.1400000 indicates a range of 4.13999995 + to 4.14000005. Again, the precision implied by the trailing zeros may be + misleading. +

    +

    + This library, like binary floating point and most calculators, does not retain trailing + fractional zeros. Instead, the toExponential, toFixed and + toPrecision methods enable trailing zeros to be added if and when required.
    +

    +
    + + + diff --git a/bower_components/bignumber.js/perf/README.md b/bower_components/bignumber.js/perf/README.md new file mode 100644 index 00000000..0df7d35e --- /dev/null +++ b/bower_components/bignumber.js/perf/README.md @@ -0,0 +1,48 @@ +This directory contains two command-line applications *bigtime.js* and *bigtime-OOM.js*, and for the browser *bignumber-vs-bigdecimal.html*, which enable some of the methods of bignumber.js to be tested against the JavaScript translations of the two versions of BigDecimal in the *lib* directory. + +* GWT: java.math.BigDecimal + +* ICU4J: com.ibm.icu.math.BigDecimal + + +The BigDecimal in Node's npm registry is the GWT version. It has some bugs: see the Node script *perf/lib/bigdecimal_GWT/bugs.js* for examples of flaws in its *remainder*, *divide* and *compareTo* methods. + +An example of using *bigtime.js* to compare the time taken by the bignumber.js `plus` method and the GWT BigDecimal `add` method: + + $ node bigtime plus 10000 40 + +This will time 10000 calls to each, using operands of up to 40 random digits and will check that the results match. + +For help: + + $ node bigtime -h + +*bigtime-OOM.js* works in the same way, but includes separate timings for object creation and method calls. + +In general, *bigtime.js* is recommended over *bigtime-OOM.js*, which may run out of memory. + +The usage of *bignumber-vs-bigdecimal.html* should be more or less self-explanatory. + +--- + +###### Further notes: + +###### bigtime.js + + * Creates random numbers and BigNumber and BigDecimal objects in batches. + * Unlikely to run out of memory. + * Doesn't show separate times for object creation and method calls. + * Tests methods with one or two operands (i.e. includes abs and negate). + * Doesn't indicate random number creation completion. + * Doesn't calculate average number of digits of operands. + * Creates random numbers in exponential notation. + +###### bigtime-OOM.js + + * Creates random numbers and BigNumber and BigDecimal objects all in one go. + * May run out of memory, e.g. if iterations > 500000 and random digits > 40. + * Shows separate times for object creation and method calls. + * Only tests methods with two operands (i.e. no abs or negate). + * Indicates random number creation completion. + * Calculates average number of digits of operands. + * Creates random numbers in normal notation. diff --git a/bower_components/bignumber.js/perf/bignumber-vs-bigdecimal.html b/bower_components/bignumber.js/perf/bignumber-vs-bigdecimal.html new file mode 100644 index 00000000..a181467f --- /dev/null +++ b/bower_components/bignumber.js/perf/bignumber-vs-bigdecimal.html @@ -0,0 +1,701 @@ + + + + + + Testing BigNumber + + + + + +

    Testing BigNumber against BigDecimal

    + +
    + +
    + + + +
    + + + +
    + + + +
    + +
    + BigDecimal: + + + BigInteger + add +
    + +
    + Random number digits: + + + +
    + +
    + Decimal places: + Rounding: +
    + +
    + Iterations: + +
    + +
    + + Click a method to stop + Press space bar to pause/unpause +
    + +
    + +
    0
    +
    +
    + + + + + + + + diff --git a/bower_components/bignumber.js/perf/bigtime-OOM.js b/bower_components/bignumber.js/perf/bigtime-OOM.js new file mode 100644 index 00000000..1ea971c6 --- /dev/null +++ b/bower_components/bignumber.js/perf/bigtime-OOM.js @@ -0,0 +1,373 @@ + +var arg, i, max, method, methodIndex, decimalPlaces, + reps, rounding, start, timesEqual, Xs, Ys, + bdM, bdMT, bdOT, bdRs, bdXs, bdYs, + bnM, bnMT, bnOT, bnRs, bnXs, bnYs, + memoryUsage, showMemory, bnR, bdR, + prevRss, prevHeapUsed, prevHeapTotal, + args = process.argv.splice(2), + BigDecimal = require('./lib/bigdecimal_GWT/bigdecimal').BigDecimal, + BigNumber = require('../bignumber'), + bdMs = ['add', 'subtract', 'multiply', 'divide', 'remainder', 'compareTo', 'pow'], + bnMs1 = ['plus', 'minus', 'times', 'dividedBy', 'modulo', 'comparedTo', 'toPower'], + bnMs2 = ['', '', '', 'div', 'mod', 'cmp', ''], + Ms = [bdMs, bnMs1, bnMs2], + allMs = [].concat.apply([], Ms), + expTotal = 0, + total = 0, + + ALWAYS_SHOW_MEMORY = false, + DEFAULT_MAX_DIGITS = 20, + DEFAULT_POW_MAX_DIGITS = 20, + DEFAULT_REPS = 1e4, + DEFAULT_POW_REPS = 1e2, + DEFAULT_PLACES = 20, + MAX_POWER = 50, + + getRandom = function (maxDigits) { + var i = 0, z, + // number of digits - 1 + n = Math.random() * ( maxDigits || 1 ) | 0, + r = ( Math.random() * 10 | 0 ) + ''; + + if ( n ) { + if ( z = r === '0' ) { + r += '.'; + } + + for ( ; i++ < n; r += Math.random() * 10 | 0 ){} + + // 20% chance of integer + if ( !z && Math.random() > 0.2 ) + r = r.slice( 0, i = ( Math.random() * n | 0 ) + 1 ) + '.' + r.slice(i); + } + + // Avoid 'division by zero' error with division and modulo. + if ((bdM == 'divide' || bdM == 'remainder') && parseFloat(r) === 0) + r = ( ( Math.random() * 9 | 0 ) + 1 ) + ''; + + total += n + 1; + + // 50% chance of negative + return Math.random() > 0.5 ? r : '-' + r; + }, + + pad = function (str) { + str += '... '; + while (str.length < 26) str += ' '; + return str; + }, + + getFastest = function (bn, bd) { + var r; + if (Math.abs(bn - bd) > 2) { + r = 'Big' + ((bn < bd) + ? 'Number ' + (bn ? parseFloat((bd / bn).toFixed(1)) : bd) + : 'Decimal ' + (bd ? parseFloat((bn / bd).toFixed(1)) : bn)) + + ' times faster'; + } else { + timesEqual = 1; + r = 'Times approximately equal'; + } + return r; + }, + + showMemoryChange = function () { + if (showMemory) { + memoryUsage = process.memoryUsage(); + + var rss = memoryUsage.rss, + heapUsed = memoryUsage.heapUsed, + heapTotal = memoryUsage.heapTotal; + + console.log(' Change in memory usage: ' + + ' rss: ' + toKB(rss - prevRss) + + ', hU: ' + toKB(heapUsed - prevHeapUsed) + + ', hT: ' + toKB(heapTotal - prevHeapTotal)); + prevRss = rss; prevHeapUsed = heapUsed; prevHeapTotal = heapTotal; + } + }, + + toKB = function (m) { + return parseFloat((m / 1024).toFixed(1)) + ' KB'; + }; + + +// PARSE COMMAND LINE AND SHOW HELP + +if (arg = args[0], typeof arg != 'undefined' && !isFinite(arg) && + allMs.indexOf(arg) == -1 && !/^-*m$/i.test(arg)) { + console.log( + '\n node bigtime-OOM [METHOD] [METHOD CALLS [MAX DIGITS [DECIMAL PLACES]]]\n' + + '\n METHOD: The method to be timed and compared with the automatically' + + '\n chosen corresponding method from BigDecimal or BigNumber\n' + + '\n BigDecimal: add subtract multiply divide remainder compareTo pow' + + '\n BigNumber: plus minus times dividedBy modulo comparedTo toPower' + + '\n (div mod cmp pow)' + + '\n\n METHOD CALLS: The number of method calls to be timed' + + '\n\n MAX DIGITS: The maximum number of digits of the random ' + + '\n numbers used in the method calls' + + '\n\n DECIMAL PLACES: The number of decimal places used in division' + + '\n (The rounding mode is randomly chosen)' + + '\n\n Default values: METHOD: randomly chosen' + + '\n METHOD CALLS: ' + DEFAULT_REPS + + ' (pow: ' + DEFAULT_POW_REPS + ')' + + '\n MAX DIGITS: ' + DEFAULT_MAX_DIGITS + + ' (pow: ' + DEFAULT_POW_MAX_DIGITS + ')' + + '\n DECIMAL PLACES: ' + DEFAULT_PLACES + '\n' + + '\n E.g.s node bigtime-OOM\n node bigtime-OOM minus' + + '\n node bigtime-OOM add 100000' + + '\n node bigtime-OOM times 20000 100' + + '\n node bigtime-OOM div 100000 50 20' + + '\n node bigtime-OOM 9000' + + '\n node bigtime-OOM 1000000 20\n' + + '\n To show memory usage include an argument m or -m' + + '\n E.g. node bigtime-OOM m add'); +} else { + BigNumber.config({ + EXPONENTIAL_AT: 1E9, + RANGE: 1E9, + ERRORS: false, + MODULO_MODE: 1, + POW_PRECISION: 10000 + }); + + Number.prototype.toPlainString = Number.prototype.toString; + + for (i = 0; i < args.length; i++) { + arg = args[i]; + + if (isFinite(arg)) { + arg = Math.abs(parseInt(arg)); + if (reps == null) { + reps = arg <= 1e10 ? arg : 0; + } else if (max == null) { + max = arg <= 1e6 ? arg : 0; + } else if (decimalPlaces == null) { + decimalPlaces = arg <= 1e6 ? arg : DEFAULT_PLACES; + } + } else if (/^-*m$/i.test(arg)) { + showMemory = true; + } else if (method == null) { + method = arg; + } + } + + for (i = 0; + i < Ms.length && (methodIndex = Ms[i].indexOf(method)) == -1; + i++) {} + + bnM = methodIndex == -1 + ? bnMs1[methodIndex = Math.floor(Math.random() * bdMs.length)] + : (Ms[i][0] == 'add' ? bnMs1 : Ms[i])[methodIndex]; + + bdM = bdMs[methodIndex]; + + if (!reps) + reps = bdM == 'pow' ? DEFAULT_POW_REPS : DEFAULT_REPS; + if (!max) + max = bdM == 'pow' ? DEFAULT_POW_MAX_DIGITS : DEFAULT_MAX_DIGITS; + if (decimalPlaces == null) + decimalPlaces = DEFAULT_PLACES; + + Xs = [reps], Ys = [reps]; + bdXs = [reps], bdYs = [reps], bdRs = [reps]; + bnXs = [reps], bnYs = [reps], bnRs = [reps]; + showMemory = showMemory || ALWAYS_SHOW_MEMORY; + + console.log('\n BigNumber %s vs BigDecimal %s', bnM, bdM); + console.log('\n Method calls: %d', reps); + + if (bdM == 'divide') { + rounding = Math.floor(Math.random() * 7); + console.log('\n Decimal places: %d\n Rounding mode: %d', decimalPlaces, rounding); + BigNumber.config(decimalPlaces, rounding); + } + + if (showMemory) { + memoryUsage = process.memoryUsage(); + console.log(' Memory usage: rss: ' + + toKB(prevRss = memoryUsage.rss) + ', hU: ' + + toKB(prevHeapUsed = memoryUsage.heapUsed) + ', hT: ' + + toKB(prevHeapTotal = memoryUsage.heapTotal)); + } + + + // CREATE RANDOM NUMBERS + + // POW: BigDecimal requires JS Number type for exponent argument + if (bdM == 'pow') { + + process.stdout.write('\n Creating ' + reps + + ' random numbers (max. digits: ' + max + ')... '); + + for (i = 0; i < reps; i++) { + Xs[i] = getRandom(max); + } + console.log('done\n Average number of digits: %d', + ((total / reps) | 0)); + + process.stdout.write(' Creating ' + reps + + ' random integer exponents (max. value: ' + MAX_POWER + ')... '); + + for (i = 0; i < reps; i++) { + bdYs[i] = bnYs[i] = Math.floor(Math.random() * (MAX_POWER + 1)); + expTotal += bdYs[i]; + } + console.log('done\n Average value: %d', ((expTotal / reps) | 0)); + + showMemoryChange(); + + + // POW: TIME CREATION OF BIGDECIMALS + + process.stdout.write('\n Creating BigDecimals... '); + + start = +new Date(); + for (i = 0; i < reps; i++) { + bdXs[i] = new BigDecimal(Xs[i]); + } + bdOT = +new Date() - start; + + console.log('done. Time taken: %s ms', bdOT || '<1'); + + showMemoryChange(); + + + // POW: TIME CREATION OF BIGNUMBERS + + process.stdout.write(' Creating BigNumbers... '); + + start = +new Date(); + for (i = 0; i < reps; i++) { + bnXs[i] = new BigNumber(Xs[i]); + } + bnOT = +new Date() - start; + + console.log('done. Time taken: %s ms', bnOT || '<1'); + + + // NOT POW + } else { + + process.stdout.write('\n Creating ' + (reps * 2) + + ' random numbers (max. digits: ' + max + ')... '); + + + for (i = 0; i < reps; i++) { + Xs[i] = getRandom(max); + Ys[i] = getRandom(max); + } + console.log('done\n Average number of digits: %d', + ( total / (reps * 2) ) | 0); + + showMemoryChange(); + + + // TIME CREATION OF BIGDECIMALS + + process.stdout.write('\n Creating BigDecimals... '); + + start = +new Date(); + for (i = 0; i < reps; i++) { + bdXs[i] = new BigDecimal(Xs[i]); + bdYs[i] = new BigDecimal(Ys[i]); + } + bdOT = +new Date() - start; + + console.log('done. Time taken: %s ms', bdOT || '<1'); + + showMemoryChange(); + + + // TIME CREATION OF BIGNUMBERS + + process.stdout.write(' Creating BigNumbers... '); + + start = +new Date(); + for (i = 0; i < reps; i++) { + bnXs[i] = new BigNumber(Xs[i]); + bnYs[i] = new BigNumber(Ys[i]); + } + bnOT = +new Date() - start; + + console.log('done. Time taken: %s ms', bnOT || '<1'); + } + + showMemoryChange(); + + console.log('\n Object creation: %s\n', getFastest(bnOT, bdOT)); + + + // TIME BIGDECIMAL METHOD CALLS + + process.stdout.write(pad(' BigDecimal ' + bdM)); + + if (bdM == 'divide') { + start = +new Date(); + while (i--) bdRs[i] = bdXs[i][bdM](bdYs[i], decimalPlaces, rounding); + bdMT = +new Date() - start; + } else { + start = +new Date(); + while (i--) bdRs[i] = bdXs[i][bdM](bdYs[i]); + bdMT = +new Date() - start; + } + + console.log('done. Time taken: %s ms', bdMT || '<1'); + + + // TIME BIGNUMBER METHOD CALLS + + i = reps; + process.stdout.write(pad(' BigNumber ' + bnM)); + + start = +new Date(); + while (i--) bnRs[i] = bnXs[i][bnM](bnYs[i]); + bnMT = +new Date() - start; + + console.log('done. Time taken: %s ms', bnMT || '<1'); + + + // TIMINGS SUMMARY + + console.log('\n Method calls: %s', getFastest(bnMT, bdMT)); + + if (!timesEqual) { + console.log('\n Overall: ' + + getFastest((bnOT || 1) + (bnMT || 1), (bdOT || 1) + (bdMT || 1))); + } + + + + // CHECK FOR MISMATCHES + + process.stdout.write('\n Checking for mismatches... '); + + for (i = 0; i < reps; i++) { + + bnR = bnRs[i].toString(); + bdR = bdRs[i].toPlainString(); + + // Strip any trailing zeros from non-integer BigDecimals + if (bdR.indexOf('.') != -1) { + bdR = bdR.replace(/\.?0+$/, ''); + } + + if (bdR !== bnR) { + console.log('breaking on first mismatch (result number %d):' + + '\n\n BigDecimal: %s\n BigNumber: %s', i, bdR, bnR); + console.log('\n x: %s\n y: %s', Xs[i], Ys[i]); + + if (bdM == 'divide') { + console.log('\n dp: %d\n r: %d',decimalPlaces, rounding); + } + break; + } + } + if (i == reps) { + console.log('done. None found.\n'); + } +} + + + diff --git a/bower_components/bignumber.js/perf/bigtime.js b/bower_components/bignumber.js/perf/bigtime.js new file mode 100644 index 00000000..30928f27 --- /dev/null +++ b/bower_components/bignumber.js/perf/bigtime.js @@ -0,0 +1,342 @@ + +var arg, i, j, max, method, methodIndex, decimalPlaces, rounding, reps, start, + timesEqual, xs, ys, prevRss, prevHeapUsed, prevHeapTotal, showMemory, + bdM, bdT, bdR, bdRs, + bnM, bnT, bnR, bnRs, + args = process.argv.splice(2), + BigDecimal = require('./lib/bigdecimal_GWT/bigdecimal').BigDecimal, + BigNumber = require('../bignumber'), + bdMs = ['add', 'subtract', 'multiply', 'divide', 'remainder', + 'compareTo', 'pow', 'negate', 'abs'], + bnMs1 = ['plus', 'minus', 'times', 'dividedBy', 'modulo', + 'comparedTo', 'toPower', 'negated', 'abs'], + bnMs2 = ['', '', '', 'div', 'mod', 'cmp', '', 'neg', ''], + Ms = [bdMs, bnMs1, bnMs2], + allMs = [].concat.apply([], Ms), + bdTotal = 0, + bnTotal = 0, + BD = {}, + BN = {}, + + ALWAYS_SHOW_MEMORY = false, + DEFAULT_MAX_DIGITS = 20, + DEFAULT_POW_MAX_DIGITS = 20, + DEFAULT_REPS = 1e4, + DEFAULT_POW_REPS = 1e2, + DEFAULT_PLACES = 20, + MAX_POWER = 50, + MAX_RANDOM_EXPONENT = 100, + + getRandom = function (maxDigits) { + var i = 0, z, + // number of digits - 1 + n = Math.random() * ( maxDigits || 1 ) | 0, + r = ( Math.random() * 10 | 0 ) + ''; + + if ( n ) { + if ( z = r === '0' ) { + r += '.'; + } + + for ( ; i++ < n; r += Math.random() * 10 | 0 ){} + + // 20% chance of integer + if ( !z && Math.random() > 0.2 ) + r = r.slice( 0, i = ( Math.random() * n | 0 ) + 1 ) + '.' + r.slice(i); + } + + // Avoid 'division by zero' error with division and modulo. + if ((bdM == 'divide' || bdM == 'remainder') && parseFloat(r) === 0) + r = ( ( Math.random() * 9 | 0 ) + 1 ) + ''; + + // 50% chance of negative + return Math.random() > 0.5 ? r : '-' + r; + }, + + // Returns exponential notation. + //getRandom = function (maxDigits) { + // var i = 0, + // // n is the number of significant digits - 1 + // n = Math.random() * (maxDigits || 1) | 0, + // r = ( ( Math.random() * 9 | 0 ) + 1 ) + ( n ? '.' : '' ); + // + // for (; i++ < n; r += Math.random() * 10 | 0 ){} + // + // // Add exponent. + // r += 'e' + ( Math.random() > 0.5 ? '+' : '-' ) + + // ( Math.random() * MAX_RANDOM_EXPONENT | 0 ); + // + // // 50% chance of being negative. + // return Math.random() > 0.5 ? r : '-' + r + //}, + + getFastest = function (bn, bd) { + var r; + if (Math.abs(bn - bd) > 2) { + r = 'Big' + ((bn < bd) + ? 'Number was ' + (bn ? parseFloat((bd / bn).toFixed(1)) : bd) + : 'Decimal was ' + (bd ? parseFloat((bn / bd).toFixed(1)) : bn)) + + ' times faster'; + } else { + timesEqual = 1; + r = 'Times approximately equal'; + } + return r; + }, + + getMemory = function (obj) { + if (showMemory) { + var mem = process.memoryUsage(), + rss = mem.rss, + heapUsed = mem.heapUsed, + heapTotal = mem.heapTotal; + + if (obj) { + obj.rss += (rss - prevRss); + obj.hU += (heapUsed - prevHeapUsed); + obj.hT += (heapTotal - prevHeapTotal); + } + prevRss = rss; + prevHeapUsed = heapUsed; + prevHeapTotal = heapTotal; + } + }, + + getMemoryTotals = function (obj) { + function toKB(m) {return parseFloat((m / 1024).toFixed(1))} + return '\trss: ' + toKB(obj.rss) + + '\thU: ' + toKB(obj.hU) + + '\thT: ' + toKB(obj.hT); + }; + + +if (arg = args[0], typeof arg != 'undefined' && !isFinite(arg) && + allMs.indexOf(arg) == -1 && !/^-*m$/i.test(arg)) { + console.log( + '\n node bigtime [METHOD] [METHOD CALLS [MAX DIGITS [DECIMAL PLACES]]]\n' + + '\n METHOD: The method to be timed and compared with the' + + '\n \t corresponding method from BigDecimal or BigNumber\n' + + '\n BigDecimal: add subtract multiply divide remainder' + + ' compareTo pow\n\t\tnegate abs\n\n BigNumber: plus minus times' + + ' dividedBy modulo comparedTo toPower\n\t\tnegated abs' + + ' (div mod cmp pow neg)' + + '\n\n METHOD CALLS: The number of method calls to be timed' + + '\n\n MAX DIGITS: The maximum number of digits of the random ' + + '\n\t\tnumbers used in the method calls\n\n ' + + 'DECIMAL PLACES: The number of decimal places used in division' + + '\n\t\t(The rounding mode is randomly chosen)' + + '\n\n Default values: METHOD: randomly chosen' + + '\n\t\t METHOD CALLS: ' + DEFAULT_REPS + + ' (pow: ' + DEFAULT_POW_REPS + ')' + + '\n\t\t MAX DIGITS: ' + DEFAULT_MAX_DIGITS + + ' (pow: ' + DEFAULT_POW_MAX_DIGITS + ')' + + '\n\t\t DECIMAL PLACES: ' + DEFAULT_PLACES + '\n' + + '\n E.g. node bigtime\n\tnode bigtime minus\n\tnode bigtime add 100000' + + '\n\tnode bigtime times 20000 100\n\tnode bigtime div 100000 50 20' + + '\n\tnode bigtime 9000\n\tnode bigtime 1000000 20\n' + + '\n To show memory usage, include an argument m or -m' + + '\n E.g. node bigtime m add'); +} else { + + BigNumber.config({ + EXPONENTIAL_AT: 1E9, + RANGE: 1E9, + ERRORS: false, + MODULO_MODE: 1, + POW_PRECISION: 10000 + }); + + Number.prototype.toPlainString = Number.prototype.toString; + + for (i = 0; i < args.length; i++) { + arg = args[i]; + if (isFinite(arg)) { + arg = Math.abs(parseInt(arg)); + if (reps == null) + reps = arg <= 1e10 ? arg : 0; + else if (max == null) + max = arg <= 1e6 ? arg : 0; + else if (decimalPlaces == null) + decimalPlaces = arg <= 1e6 ? arg : DEFAULT_PLACES; + } else if (/^-*m$/i.test(arg)) + showMemory = true; + else if (method == null) + method = arg; + } + + for (i = 0; + i < Ms.length && (methodIndex = Ms[i].indexOf(method)) == -1; + i++) {} + + bnM = methodIndex == -1 + ? bnMs1[methodIndex = Math.floor(Math.random() * bdMs.length)] + : (Ms[i][0] == 'add' ? bnMs1 : Ms[i])[methodIndex]; + + bdM = bdMs[methodIndex]; + + if (!reps) + reps = bdM == 'pow' ? DEFAULT_POW_REPS : DEFAULT_REPS; + if (!max) + max = bdM == 'pow' ? DEFAULT_POW_MAX_DIGITS : DEFAULT_MAX_DIGITS; + if (decimalPlaces == null) + decimalPlaces = DEFAULT_PLACES; + + xs = [reps], ys = [reps], bdRs = [reps], bnRs = [reps]; + BD.rss = BD.hU = BD.hT = BN.rss = BN.hU = BN.hT = 0; + showMemory = showMemory || ALWAYS_SHOW_MEMORY; + + console.log('\n BigNumber %s vs BigDecimal %s\n' + + '\n Method calls: %d\n\n Random operands: %d', bnM, bdM, reps, + bdM == 'abs' || bdM == 'negate' || bdM == 'abs' ? reps : reps * 2); + + console.log(' Max. digits of operands: %d', max); + + if (bdM == 'divide') { + rounding = Math.floor(Math.random() * 7); + console.log('\n Decimal places: %d\n Rounding mode: %d', decimalPlaces, rounding); + BigNumber.config(decimalPlaces, rounding); + } + + process.stdout.write('\n Testing started'); + + outer: + for (; reps > 0; reps -= 1e4) { + + j = Math.min(reps, 1e4); + + + // GENERATE RANDOM OPERANDS + + for (i = 0; i < j; i++) { + xs[i] = getRandom(max); + } + + if (bdM == 'pow') { + for (i = 0; i < j; i++) { + ys[i] = Math.floor(Math.random() * (MAX_POWER + 1)); + } + } else if (bdM != 'abs' && bdM != 'negate') { + for (i = 0; i < j; i++) { + ys[i] = getRandom(max); + } + } + + getMemory(); + + + // BIGDECIMAL + + if (bdM == 'divide') { + + start = +new Date(); + for (i = 0; i < j; i++) { + bdRs[i] = new BigDecimal(xs[i])[bdM](new BigDecimal(ys[i]), + decimalPlaces, rounding); + } + bdT = +new Date() - start; + + } else if (bdM == 'pow') { + + start = +new Date(); + for (i = 0; i < j; i++) { + bdRs[i] = new BigDecimal(xs[i])[bdM](ys[i]); + } + bdT = +new Date() - start; + + } else if (bdM == 'abs' || bdM == 'negate') { + + start = +new Date(); + for (i = 0; i < j; i++) { + bdRs[i] = new BigDecimal(xs[i])[bdM](); + } + bdT = +new Date() - start; + + } else { + + start = +new Date(); + for (i = 0; i < j; i++) { + bdRs[i] = new BigDecimal(xs[i])[bdM](new BigDecimal(ys[i])); + } + bdT = +new Date() - start; + + } + + getMemory(BD); + + + // BIGNUMBER + + if (bdM == 'pow') { + + start = +new Date(); + for (i = 0; i < j; i++) { + bnRs[i] = new BigNumber(xs[i])[bnM](ys[i]); + } + bnT = +new Date() - start; + + } else if (bdM == 'abs' || bdM == 'negate') { + + start = +new Date(); + for (i = 0; i < j; i++) { + bnRs[i] = new BigNumber(xs[i])[bnM](); + } + bnT = +new Date() - start; + + } else { + + start = +new Date(); + for (i = 0; i < j; i++) { + bnRs[i] = new BigNumber(xs[i])[bnM](new BigNumber(ys[i])); + } + bnT = +new Date() - start; + + } + + getMemory(BN); + + + // CHECK FOR MISMATCHES + + for (i = 0; i < j; i++) { + bnR = bnRs[i].toString(); + bdR = bdRs[i].toPlainString(); + + // Strip any trailing zeros from non-integer BigDecimals + if (bdR.indexOf('.') != -1) { + bdR = bdR.replace(/\.?0+$/, ''); + } + + if (bdR !== bnR) { + console.log('\n breaking on first mismatch (result number %d):' + + '\n\n BigDecimal: %s\n BigNumber: %s', i, bdR, bnR); + console.log('\n x: %s\n y: %s', xs[i], ys[i]); + + if (bdM == 'divide') + console.log('\n dp: %d\n r: %d',decimalPlaces, rounding); + break outer; + } + } + + bdTotal += bdT; + bnTotal += bnT; + + process.stdout.write(' .'); + } + + + // TIMINGS SUMMARY + + + if (i == j) { + console.log(' done\n\n No mismatches.'); + if (showMemory) { + console.log('\n Change in memory usage (KB):' + + '\n\tBigDecimal' + getMemoryTotals(BD) + + '\n\tBigNumber ' + getMemoryTotals(BN)); + } + console.log('\n Time taken:' + + '\n\tBigDecimal ' + (bdTotal || '<1') + ' ms' + + '\n\tBigNumber ' + (bnTotal || '<1') + ' ms\n\n ' + + getFastest(bnTotal, bdTotal) + '\n'); + } +} \ No newline at end of file diff --git a/bower_components/bignumber.js/perf/lib/bigdecimal_GWT/BigDecTest.class b/bower_components/bignumber.js/perf/lib/bigdecimal_GWT/BigDecTest.class new file mode 100644 index 0000000000000000000000000000000000000000..455ed364b2fff589b676467bdebad676d1003505 GIT binary patch literal 1275 zcmai!%TE(g6vn>`eN0QS(|hi@zjN-H@0|AQ?}N_(6f8v1kD)Mz1>A_D1vdqZ z@O3nTBvRZOi{ci>1*8Rte4h~@36Qy&6`%-E1!w|v?l3rO3a|uBgfSV$6hmmrt+?JD zhSp?il_4-&-EbJ<1-IfX?v~e`+KRniB2S=fyA_7sxn2M^IrflTWrb5RiWm8E7 zNt9@5qs6ckx>Bc@hj_#*DKHEhqG=kcrP2H7mTB;ZOm1nWu3EXYEKzz@%xbD8ky|2{ zPU0QwMb#ba`*?lJDS8Y&$$yI;sX4qY8%~WuJY-JEJDF;Po_3$OXZhuh=agv%s=NHQ zMuc0b?a:b} +function xe(a,b){return !we(a,b)} +function ye(a,b){return !ve(a,b)} +function ir(a,b){return new b(a)} +function Oj(a){this.b=new Yn(a)} +function Nj(){this.b=(Un(),Rn)} +function ak(){this.b=(Qo(),Fo)} +function Wo(){Qo();return zo} +function mr(a,b){lr();_q(kr,a,b)} +function br(a,b){a[b]||(a[b]={})} +function kq(a){return a.b=b)&&hq(a,b)} +function xc(a,b){return a!=null&&tc(a,b)} +function db(a){return yc(a)?Db(wc(a)):Lr} +function Z(a){return yc(a)?$(wc(a)):a+Lr} +function Fl(a){return lc(Vd,{6:1},1,a,0)} +function vq(){this.b=lc(Td,{6:1},0,0,0)} +function Pl(){Pl=rr;Ml={};Ol={}} +function Yo(){Yo=rr;Xo=Jk((Qo(),zo))} +function ik(){if(!hk){hk=true;jk()}} +function Gj(){if(!Fj){Fj=true;Hj()}} +function Wj(){if(!Vj){Vj=true;new kk;Xj()}} +function gr(){this.b=new Fq;new Fq;new Fq} +function X(a){Cb();this.c=a;Bb(new Tb,this)} +function Pi(a){Oh();oi.call(this,Hm(a,0))} +function gg(a){hg.call(this,a,0,a.length)} +function fg(a,b){cg.call(this,a);If(this,b)} +function ze(a,b){ee(a,b,true);return ae} +function tq(a,b){dq(b,a.c);return a.b[b]} +function rq(a,b){nc(a.b,a.c++,b);return true} +function _l(a,b,c){dc(a.b,Ll(b,0,c));return a} +function kb(a,b,c){return a.apply(b,c);var d} +function em(a,b,c){return ec(a.b,b,b,c),a} +function Af(a,b,c){return yf(a,b,Bc(a.f),c)} +function xf(a,b,c){return yf(a,b,Bc(a.f),Uo(c))} +function Bl(c,a,b){return c.substr(a,b-a)} +function Al(b,a){return b.substr(a,b.length-a)} +function fl(a){return Math.log(a)*Math.LOG10E} +function cb(a){return a==null?null:a.name} +function $(a){return a==null?null:a.message} +function yc(a){return a!=null&&a.tM!=rr&&!tc(a,1)} +function ec(a,b,c,d){a.b=Bl(a.b,0,b)+d+Al(a.b,c)} +function eg(a,b,c){dg.call(this,a,b);If(this,c)} +function pg(a,b){this.g=a;this.f=b;this.b=sg(a)} +function si(a,b,c){Oh();this.f=a;this.e=b;this.b=c} +function sl(a){this.b='Unknown';this.d=a;this.c=-1} +function yk(a,b){var c;c=new wk;c.d=a+b;return c} +function dr(a,b){var c;c=mp(a.b,b);return wc(c)} +function fb(a){var b;return b=a,zc(b)?b.hC():ob(b)} +function To(a){Qo();return Ok((Yo(),Xo),a)} +function qe(a,b){return de(a.l&b.l,a.m&b.m,a.h&b.h)} +function De(a,b){return de(a.l|b.l,a.m|b.m,a.h|b.h)} +function Le(a,b){return de(a.l^b.l,a.m^b.m,a.h^b.h)} +function Bm(a,b){return (a.b[~~b>>5]&1<<(b&31))!=0} +function Cq(a,b){var c;for(c=0;c=b&&a.splice(0,b);return a} +function wb(a,b){!a&&(a=[]);a[a.length]=b;return a} +function Ph(a,b){if(mi(a,b)){return tm(a,b)}return a} +function ii(a,b){if(!mi(a,b)){return tm(a,b)}return a} +function _d(a){if(xc(a,15)){return a}return new X(a)} +function Eb(){try{null.a()}catch(a){return a}} +function Ak(a){var b;b=new wk;b.d=Lr+a;b.c=1;return b} +function eb(a,b){var c;return c=a,zc(c)?c.eQ(b):c===b} +function se(a,b){return a.l==b.l&&a.m==b.m&&a.h==b.h} +function Ce(a,b){return a.l!=b.l||a.m!=b.m||a.h!=b.h} +function de(a,b,c){return _=new Se,_.l=a,_.m=b,_.h=c,_} +function rp(a,b,c){return !b?tp(a,c):sp(a,b,c,~~ob(b))} +function Eq(a,b){return Ac(a)===Ac(b)||a!=null&&eb(a,b)} +function Xq(a,b){return Ac(a)===Ac(b)||a!=null&&eb(a,b)} +function hq(a,b){throw new Wk('Index: '+a+', Size: '+b)} +function Xh(a,b){if(b<0){throw new nk(ts)}return tm(a,b)} +function dg(a,b){if(!a){throw new jl}this.f=b;Tf(this,a)} +function og(a,b){if(!a){throw new jl}this.f=b;Tf(this,a)} +function ig(a,b,c,d){hg.call(this,a,b,c);If(this,d)} +function jg(a,b){hg.call(this,a,0,a.length);If(this,b)} +function ng(a,b){hg.call(this,Cl(a),0,a.length);If(this,b)} +function lm(a){V.call(this,'String index out of range: '+a)} +function Zl(a,b){dc(a.b,String.fromCharCode(b));return a} +function pn(a,b){tn(a.b,a.b,a.e,b.b,b.e);Sh(a);a.c=-2} +function Tf(a,b){a.d=b;a.b=b.ab();a.b<54&&(a.g=Ie(ai(b)))} +function qc(){qc=rr;oc=[];pc=[];rc(new ic,oc,pc)} +function Ch(){if(!Bh){Bh=true;new Yj;new Ij;Dh()}} +function Sl(){if(Nl==256){Ml=Ol;Ol={};Nl=0}++Nl} +function cr(a){var b;b=a[Ls];if(!b){b=[];a[Ls]=b}return b} +function zk(a,b,c){var d;d=new wk;d.d=a+b;d.c=c?8:0;return d} +function xk(a,b,c){var d;d=new wk;d.d=a+b;d.c=4;d.b=c;return d} +function lc(a,b,c,d,e){var f;f=jc(e,d);mc(a,b,c,f);return f} +function Ll(a,b,c){var d;d=b+c;El(a.length,b,d);return Gl(a,b,d)} +function mo(a,b){go();return b=a.c.c){throw new Oq}return tq(a.c,a.b++)} +function wl(a,b){if(!xc(b,1)){return false}return String(a)==b} +function lb(){if(ib++==0){sb((rb(),qb));return true}return false} +function fi(a){if(a.f<0){throw new nk('start < 0: '+a)}return xo(a)} +function pm(){V.call(this,'Add not supported on this collection')} +function Fq(){this.b=[];this.f={};this.d=false;this.c=null;this.e=0} +function qi(a,b){Oh();this.f=a;this.e=1;this.b=mc(Od,{6:1},-1,[b])} +function sc(a,b,c){qc();for(var d=0,e=b.length;d=0&&a.b[c]==b[c];--c){}return c<0} +function tp(a,b){var c;c=a.c;a.c=b;if(!a.d){a.d=true;++a.e}return c} +function $l(a,b){dc(a.b,String.fromCharCode.apply(null,b));return a} +function am(a,b,c,d){b==null&&(b=Mr);bc(a.b,b.substr(c,d-c));return a} +function sn(a,b,c,d){var e;e=lc(Od,{6:1},-1,b,1);tn(e,a,b,c,d);return e} +function mc(a,b,c,d){qc();sc(d,oc,pc);d.aC=a;d.cM=b;d.qI=c;return d} +function uq(a,b,c){for(;ca.c)&&hq(b,a.c);Aq(a.b,b,0,c);++a.c} +function nn(a,b){var c;c=on(a.b,a.e,b);if(c==1){a.b[a.e]=1;++a.e}a.c=-2} +function Sh(a){while(a.e>0&&a.b[--a.e]==0){}a.b[a.e++]==0&&(a.f=0)} +function Gg(a){if(we(a,ur)&&xe(a,xr)){return df[Je(a)]}return new qg(a,0)} +function ji(a,b){if(b==0||a.f==0){return a}return b>0?wm(a,b):zm(a,-b)} +function li(a,b){if(b==0||a.f==0){return a}return b>0?zm(a,b):wm(a,-b)} +function $h(a){var b;if(a.f==0){return -1}b=Zh(a);return (b<<5)+_k(a.b[b])} +function bl(a){var b;b=Je(a);return b!=0?_k(b):_k(Je(Fe(a,32)))+32} +function Sb(a,b){var c;c=Mb(a,b);return c.length==0?(new Fb).o(b):zb(c,1)} +function Gl(a,b,c){a=a.slice(b,c);return String.fromCharCode.apply(null,a)} +function rc(a,b,c){var d=0,e;for(var f in a){if(e=a[f]){b[d]=f;c[d]=e;++d}}} +function up(e,a,b){var c,d=e.f;a=Qr+a;a in d?(c=d[a]):++e.e;d[a]=b;return c} +function gn(a,b,c,d){var e;e=lc(Od,{6:1},-1,b+1,1);hn(e,a,b,c,d);return e} +function Cl(a){var b,c;c=a.length;b=lc(Md,{6:1},-1,c,1);xl(a,c,b,0);return b} +function _e(a){var b;b=bf(a);if(isNaN(b)){throw new pl(Zr+a+$r)}return b} +function Fg(a){if(!isFinite(a)||isNaN(a)){throw new pl(hs)}return new mg(Lr+a)} +function wc(a){if(a!=null&&(a.tM==rr||tc(a,1))){throw new Ek}return a} +function Qf(a,b){var c;c=new og((!a.d&&(a.d=Li(a.g)),a.d),a.f);If(c,b);return c} +function bg(a,b){var c;c=new Pi(Zf(a));if(sm(c)0?1:0}return (!a.d&&(a.d=Li(a.g)),a.d).r()} +function Mf(a){if(a.b<54){return new pg(-a.g,a.f)}return new og((!a.d&&(a.d=Li(a.g)),a.d).cb(),a.f)} +function El(a,b,c){if(b<0){throw new lm(b)}if(ca){throw new lm(c)}} +function lg(a,b){if(!isFinite(a)||isNaN(a)){throw new pl(hs)}Hf(this,a.toPrecision(20));If(this,b)} +function Gk(a,b){if(isNaN(a)){return isNaN(b)?0:1}else if(isNaN(b)){return -1}return ab?1:0} +function uk(a,b){if(b<2||b>36){return 0}if(a<0||a>=b){return 0}return a<10?48+a&65535:97+a-10&65535} +function er(a,b){var c;if(!b){return null}c=b[Ls];if(c){return c}c=ir(b,dr(a,b.gC()));b[Ls]=c;return c} +function ke(a){var b,c;c=$k(a.h);if(c==32){b=$k(a.m);return b==32?$k(a.l)+32:b+20-10}else{return c-12}} +function be(a){var b,c,d;b=a&4194303;c=~~a>>22&4194303;d=a<0?1048575:0;return de(b,c,d)} +function Qe(){Qe=rr;Me=de(4194303,4194303,524287);Ne=de(0,0,524288);Oe=ue(1);ue(2);Pe=ue(0)} +function mn(a,b){hn(a.b,a.b,a.e,b.b,b.e);a.e=hl(gl(a.e,b.e)+1,a.b.length);Sh(a);a.c=-2} +function um(a,b){var c;c=~~b>>5;a.e+=c+($k(a.b[a.e-1])-(b&31)>=0?0:1);xm(a.b,a.b,c,b&31);Sh(a);a.c=-2} +function Tm(a,b){var c,d;c=~~b>>5;if(a.e>>d:0;Sh(a)} +function ai(a){var b;b=a.e>1?De(Ee(ue(a.b[1]),32),qe(ue(a.b[0]),yr)):qe(ue(a.b[0]),yr);return Ae(ue(a.f),b)} +function jn(a,b,c){var d;for(d=c-1;d>=0&&a[d]==b[d];--d){}return d<0?0:xe(qe(ue(a[d]),yr),qe(ue(b[d]),yr))?-1:1} +function ym(a,b,c){var d,e,f;d=0;for(e=0;e>>31}d!=0&&(a[c]=d)} +function ge(a,b,c,d,e){var f;f=Fe(a,b);c&&je(f);if(e){a=ie(a,b);d?(ae=Be(a)):(ae=de(a.l,a.m,a.h))}return f} +function gwtOnLoad(b,c,d,e){$moduleName=c;$moduleBase=d;if(b)try{Jr($d)()}catch(a){b(c)}else{Jr($d)()}} +function fr(a,b){var c,d,e;if(b==null){return null}d=cr(b);e=d;for(c=0;c>5==a.e-1&&a.b[a.e-1]==1<<(b&31);if(d){for(c=0;d&&c=0&&b=0){return new qg(ur,2147483647)}return new qg(ur,-2147483648)} +function Li(a){Oh();if(a<0){if(a!=-1){return new ui(-1,-a)}return Ih}else return a<=10?Kh[Bc(a)]:new ui(1,a)} +function zg(a){var b=qf;!b&&(b=qf=/^[+-]?\d*$/i);if(b.test(a)){return parseInt(a,10)}else{return Number.NaN}} +function kp(e,a){var b=e.f;for(var c in b){if(c.charCodeAt(0)==58){var d=new Yp(e,c.substring(1));a.Kb(d)}}} +function Rl(a){Pl();var b=Qr+a;var c=Ol[b];if(c!=null){return c}c=Ml[b];c==null&&(c=Ql(a));Sl();return Ol[b]=c} +function Be(a){var b,c,d;b=~a.l+1&4194303;c=~a.m+(b==0?1:0)&4194303;d=~a.h+(b==0&&c==0?1:0)&1048575;return de(b,c,d)} +function je(a){var b,c,d;b=~a.l+1&4194303;c=~a.m+(b==0?1:0)&4194303;d=~a.h+(b==0&&c==0?1:0)&1048575;a.l=b;a.m=c;a.h=d} +function Q(a){var b,c,d;c=lc(Ud,{6:1},13,a.length,0);for(d=0,b=a.length;d>=1){}return b}} +function sm(a){var b,c,d;if(a.f==0){return 0}b=a.e<<5;c=a.b[a.e-1];if(a.f<0){d=Zh(a);d==a.e-1&&(c=~~(c-1))}b-=$k(c);return b} +function io(a,b,c,d,e){go();if(b==0||d==0){return}b==1?(e[d]=ko(e,c,d,a[0])):d==1?(e[b]=ko(e,a,b,c[0])):jo(a,c,e,b,d)} +function en(a,b,c,d,e){var f,g;g=a;for(f=c.ab()-1;f>=0;--f){g=Ym(g,g,d,e);(c.b[~~f>>5]&1<<(f&31))!=0&&(g=Ym(g,b,d,e))}return g} +function on(a,b,c){var d,e;d=qe(ue(c),yr);for(e=0;Ce(d,ur)&&e2147483647){throw new nk('Underflow')}else{return Bc(a)}} +function Xn(a,b){Un();if(a<0){throw new Sk('Digits < 0')}if(!b){throw new kl('null RoundingMode')}this.b=a;this.c=b} +function Ki(a){Oh();if(xe(a,ur)){if(Ce(a,wr)){return new ti(-1,Be(a))}return Ih}else return ye(a,tr)?Kh[Je(a)]:new ti(1,a)} +function tg(a){var b;xe(a,ur)&&(a=de(~a.l&4194303,~a.m&4194303,~a.h&1048575));return 64-(b=Je(Fe(a,32)),b!=0?$k(b):$k(Je(a))+32)} +function pe(a,b){var c,d,e;c=a.l+b.l;d=a.m+b.m+(~~c>>22);e=a.h+b.h+(~~d>>22);return de(c&4194303,d&4194303,e&1048575)} +function He(a,b){var c,d,e;c=a.l-b.l;d=a.m-b.m+(~~c>>22);e=a.h-b.h+(~~d>>22);return de(c&4194303,d&4194303,e&1048575)} +function Sm(a,b){var c;c=b-1;if(a.f>0){while(!a.gb(c)){--c}return b-1-c}else{while(a.gb(c)){--c}return b-1-gl(c,a.bb())}} +function fe(a,b){if(a.h==524288&&a.m==0&&a.l==0){b&&(ae=de(0,0,0));return ce((Qe(),Oe))}b&&(ae=de(a.l,a.m,a.h));return de(0,0,0)} +function Ff(a,b){var c;if(a===b){return true}if(xc(b,16)){c=vc(b,16);return c.f==a.f&&(a.b<54?c.g==a.g:a.d.eQ(c.d))}return false} +function cn(a,b,c){var d,e,f,g;f=ur;for(d=b-1;d>=0;--d){g=pe(Ee(f,32),qe(ue(a[d]),yr));e=Nm(g,c);f=ue(Je(Fe(e,32)))}return Je(f)} +function wm(a,b){var c,d,e,f;c=~~b>>5;b&=31;e=a.e+c+(b==0?0:1);d=lc(Od,{6:1},-1,e,1);xm(d,a.b,c,b);f=new si(a.f,e,d);Sh(f);return f} +function ue(a){var b,c;if(a>-129&&a<128){b=a+128;oe==null&&(oe=lc(Pd,{6:1},2,256,0));c=oe[b];!c&&(c=oe[b]=be(a));return c}return be(a)} +function Ai(a){Oh();var b,c,d;if(a>5;b=a&31;d=lc(Od,{6:1},-1,c+1,1);d[c]=1<ys&&c[c.length-1]>ys){return c}var a=c.replace(/^(\s*)/,Lr);var b=a.replace(/\s*$/,Lr);return b} +function Yk(a){a-=~~a>>1&1431655765;a=(~~a>>2&858993459)+(a&858993459);a=(~~a>>4)+a&252645135;a+=~~a>>8;a+=~~a>>16;return a&63} +function nc(a,b,c){if(c!=null){if(a.qI>0&&!uc(c,a.qI)){throw new qk}if(a.qI<0&&(c.tM==rr||tc(c,1))){throw new qk}}return a[b]=c} +function Qh(a,b){if(a.f>b.f){return 1}if(a.fb.e){return a.f}if(a.e>1);f=a[e];if(fb){c=e-1}else{return e}}return -d-1} +function Pk(a){var b;b=_e(a);if(b>3.4028234663852886E38){return Infinity}else if(b<-3.4028234663852886E38){return -Infinity}return b} +function Ie(a){if(se(a,(Qe(),Ne))){return -9223372036854775808}if(!we(a,Pe)){return -me(Be(a))}return a.l+a.m*4194304+a.h*17592186044416} +function Bb(a,b){var c,d,e,f;e=Sb(a,yc(b.c)?wc(b.c):null);f=lc(Ud,{6:1},13,e.length,0);for(c=0,d=f.length;c0?d:Pr} +function ie(a,b){var c,d,e;if(b<=22){c=a.l&(1<>5]|=1<<(c&31))}return d} +function Jm(a){var b,c,d;b=qe(ue(a.b[0]),yr);c=sr;d=vr;do{Ce(qe(Ae(b,c),d),ur)&&(c=De(c,d));d=Ee(d,1)}while(xe(d,Fr));c=Be(c);return Je(qe(c,yr))} +function Gm(a){var b,c,d;if(we(a,ur)){c=re(a,Ar);d=ze(a,Ar)}else{b=Ge(a,1);c=re(b,Br);d=ze(b,Br);d=pe(Ee(d,1),qe(a,sr))}return De(Ee(d,32),qe(c,yr))} +function ko(a,b,c,d){go();var e,f;e=ur;for(f=0;f36){throw new pl('Radix out of range')}if(a.length==0){throw new pl('Zero length BigInteger')}Ei(this,a,b)} +function Vq(){Uq();var a,b,c;c=Tq+++(new Date).getTime();a=Bc(Math.floor(c*5.9604644775390625E-8))&16777215;b=Bc(c-a*16777216);this.b=a^1502;this.c=b^15525485} +function un(a,b,c,d){var e;if(c>d){return 1}else if(c=0&&a[e]==b[e];--e){}return e<0?0:xe(qe(ue(a[e]),yr),qe(ue(b[e]),yr))?-1:1}} +function In(a,b){var c,d,e,f;e=a.e;d=lc(Od,{6:1},-1,e,1);hl(Zh(a),Zh(b));for(c=0;c=e){return Oh(),Nh}d=lc(Od,{6:1},-1,e,1);for(;c999999999){throw new nk(bs)}c=a.f*b;return a.b==0&&a.g!=-1?Ig(c):new dg((!a.d&&(a.d=Li(a.g)),a.d).db(b),Dg(c))} +function tk(a,b){if(b<2||b>36){return -1}if(a>=48&&a<48+(b<10?b:10)){return a-48}if(a>=97&&a=65&&a=0;--a){Sq[a]=c;c*=0.5}b=1;for(a=24;a>=0;--a){Rq[a]=b;b*=0.5}} +function oo(a,b){go();var c,d;d=(Oh(),Jh);c=a;for(;b>1;b>>=1){(b&1)!=0&&(d=ei(d,c));c.e==1?(c=ei(c,c)):(c=new ri(qo(c.b,c.e,lc(Od,{6:1},-1,c.e<<1,1))))}d=ei(d,c);return d} +function nl(){nl=rr;ml=mc(Md,{6:1},-1,[48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122])} +function rm(a){var b,c;b=0;if(a.f==0){return 0}c=Zh(a);if(a.f>0){for(;c>22);e+=~~d>>22;if(e<0){return false}a.l=c&4194303;a.m=d&4194303;a.h=e&1048575;return true} +function al(a){var b,c,d;b=lc(Md,{6:1},-1,8,1);c=(nl(),ml);d=7;if(a>=0){while(a>15){b[d--]=c[a&15];a>>=4}}else{while(d>0){b[d--]=c[a&15];a>>=4}}b[d]=c[a&15];return Gl(b,d,8)} +function vn(a,b){if(b.f==0||a.f==0){return Oh(),Nh}if(Vh(b,(Oh(),Ih))){return a}if(Vh(a,Ih)){return b}return a.f>0?b.f>0?Dn(a,b):wn(a,b):b.f>0?wn(b,a):a.e>b.e?xn(a,b):xn(b,a)} +function yn(a,b){if(b.f==0){return a}if(a.f==0){return Oh(),Nh}if(Vh(a,(Oh(),Ih))){return new Pi(En(b))}if(Vh(b,Ih)){return Nh}return a.f>0?b.f>0?Bn(a,b):Cn(a,b):b.f>0?An(a,b):zn(a,b)} +function Gf(a){var b;if(a.c!=0){return a.c}if(a.b<54){b=te(a.g);a.c=Je(qe(b,wr));a.c=33*a.c+Je(qe(Fe(b,32),wr));a.c=17*a.c+Bc(a.f);return a.c}a.c=17*a.d.hC()+Bc(a.f);return a.c} +function vg(a,b,c,d){var e,f,g,i,j;f=(j=a/b,j>0?Math.floor(j):Math.ceil(j));g=a%b;i=Gk(a*b,0);if(g!=0){e=Gk((g<=0?0-g:g)*2,b<=0?0-b:b);f+=Bg(Bc(f)&1,i*(5+e),d)}return new pg(f,c)} +function jc(a,b){var c=new Array(b);if(a==3){for(var d=0;d0){var e=[null,0,false][a];for(var d=0;dc;--e){a[e]|=~~b[e-c-1]>>>f;a[e-1]=b[e-c-1]<>5;a.e-=d;if(!Am(a.b,a.e,a.b,d,b&31)&&e<0){for(c=0;c>19;d=~~b.h>>19;return c==0?d!=0||a.h>b.h||a.h==b.h&&a.m>b.m||a.h==b.h&&a.m==b.m&&a.l>b.l:!(d==0||a.h>19;d=~~b.h>>19;return c==0?d!=0||a.h>b.h||a.h==b.h&&a.m>b.m||a.h==b.h&&a.m==b.m&&a.l>=b.l:!(d==0||a.h0?b.f>0?a.e>b.e?In(a,b):In(b,a):Gn(a,b):b.f>0?Gn(b,a):Zh(b)>Zh(a)?Hn(b,a):Hn(a,b)} +function sg(a){var b,c;if(a>-140737488355328&&a<140737488355328){if(a==0){return 0}b=a<0;b&&(a=-a);c=Bc(el(Math.log(a)/0.6931471805599453));(!b||a!=Math.pow(2,c))&&++c;return c}return tg(te(a))} +function Yh(a,b){var c,d;c=a._();d=b._();if(c.r()==0){return d}else if(d.r()==0){return c}if((c.e==1||c.e==2&&c.b[1]>0)&&(d.e==1||d.e==2&&d.b[1]>0)){return Ki(Rm(ai(c),ai(d)))}return Qm(Rh(c),Rh(d))} +function ci(a,b){var c;if(b.f<=0){throw new nk(us)}if(!(a.gb(0)||b.gb(0))){throw new nk(vs)}if(b.e==1&&b.b[0]==1){return Nh}c=Wm(bi(a._(),b),b);if(c.f==0){throw new nk(vs)}c=a.f<0?rn(b,c):c;return c} +function Am(a,b,c,d,e){var f,g,i;f=true;for(g=0;g>>e|c[g+d+1]<>>e;++g}return f} +function Ql(a){var b,c,d,e;b=0;d=a.length;e=d-4;c=0;while(c=0;--d){if(a[d]!=e[d]){c=a[d]!=0&&ve(qe(ue(a[d]),yr),qe(ue(e[d]),yr));break}}}g=new si(1,f+1,a);c&&pn(g,b);Sh(g);return g} +function Kf(a,b){var c;c=a.f+b.f;if(a.b==0&&a.g!=-1||b.b==0&&b.g!=-1){return Ig(c)}if(a.b+b.b<54){return new pg(a.g*b.g,Dg(c))}return new dg(ei((!a.d&&(a.d=Li(a.g)),a.d),(!b.d&&(b.d=Li(b.g)),b.d)),Dg(c))} +function sp(k,a,b,c){var d=k.b[c];if(d){for(var e=0,f=d.length;e=0;--f){i=Rh(g);Tm(i,c);g=ei(g,i);if((e.b[~~f>>5]&1<<(f&31))!=0){g=ei(g,d);Tm(g,c)}}Tm(g,c);return g} +function ar(a,b){var c,d,e,f,g,i,j;j=zl(a,Ks,0);i=$wnd;for(g=0;g>22-b;e=a.h<>22-b}else if(b<44){c=0;d=a.l<>44-b}else{c=0;d=0;e=a.l<>>b;e=~~a.m>>b|c<<22-b;d=~~a.l>>b|a.m<<22-b}else if(b<44){f=0;e=~~c>>>b-22;d=~~a.m>>b-22|a.h<<44-b}else{f=0;e=0;d=~~c>>>b-44}return de(d&4194303,e&4194303,f&1048575)} +function Uo(a){Qo();switch(a){case 2:return Ao;case 1:return Bo;case 3:return Co;case 5:return Do;case 6:return Eo;case 4:return Fo;case 7:return Go;case 0:return Ho;default:throw new Sk('Invalid rounding mode');}} +function mi(a,b){var c,d,e;if(b==0){return (a.b[0]&1)!=0}if(b<0){throw new nk(ts)}e=~~b>>5;if(e>=a.e){return a.f<0}c=a.b[e];b=1<<(b&31);if(a.f<0){d=Zh(a);if(e0){return a.e}b=1;c=1;if(a.b<54){a.b>=1&&(c=a.g);b+=Math.log(c<=0?0-c:c)*Math.LOG10E}else{b+=(a.b-1)*0.3010299956639812;Th((!a.d&&(a.d=Li(a.g)),a.d),po(b)).r()!=0&&++b}a.e=Bc(b);return a.e} +function zh(a){rf();var b,c;c=Lj(a);if(c==ks)b=Fg(a[0]);else if(c==ks)b=Gg(ue(a[0]));else if(c==ns)b=Hg(ue(a[0]),a[1]);else throw new V('Unknown call signature for bd = java.math.BigDecimal.valueOf: '+c);return new Kg(b)} +function Qi(a){Oh();var b,c;c=Lj(a);if(c==ms)b=new oi(a[0].toString());else if(c=='string number')b=new pi(a[0].toString(),a[1]);else throw new V('Unknown call signature for obj = new java.math.BigInteger: '+c);return new Pi(b)} +function Un(){Un=rr;On=new Xn(34,(Qo(),Eo));Pn=new Xn(7,Eo);Qn=new Xn(16,Eo);Rn=new Xn(0,Fo);Sn=mc(Md,{6:1},-1,[112,114,101,99,105,115,105,111,110,61]);Tn=mc(Md,{6:1},-1,[114,111,117,110,100,105,110,103,77,111,100,101,61])} +function Jn(a,b){if(b.f==0){return a}if(a.f==0){return b}if(Vh(b,(Oh(),Ih))){return new Pi(En(a))}if(Vh(a,Ih)){return new Pi(En(b))}return a.f>0?b.f>0?a.e>b.e?Mn(a,b):Mn(b,a):Kn(a,b):b.f>0?Kn(b,a):Zh(b)>Zh(a)?Ln(b,a):Ln(a,b)} +function Cn(a,b){var c,d,e,f,g,i;d=Zh(b);e=Zh(a);if(d>=a.e){return a}g=hl(a.e,b.e);f=lc(Od,{6:1},-1,g,1);c=e;for(;cc?1:-1:jn(a.b,b.b,g))==-1){return a}e=lc(Od,{6:1},-1,c,1);if(c==1){e[0]=cn(a.b,g,b.b[0])}else{d=g-c+1;e=Km(null,d,a.b,g,b.b,c)}f=new si(a.f,c,e);Sh(f);return f} +function $k(a){var b,c,d;if(a<0){return 0}else if(a==0){return 32}else{d=-(~~a>>16);b=~~d>>16&16;c=16-b;a=~~a>>b;d=a-256;b=~~d>>16&8;c+=b;a<<=b;d=a-4096;b=~~d>>16&4;c+=b;a<<=b;d=a-16384;b=~~d>>16&2;c+=b;a<<=b;d=~~a>>14;b=d&~(~~d>>1);return c+2-b}} +function kn(a,b){var c;if(a.f==0){nm(b.b,0,a.b,0,b.e)}else if(b.f==0){return}else if(a.f==b.f){hn(a.b,a.b,a.e,b.b,b.e)}else{c=un(a.b,b.b,a.e,b.e);if(c>0){tn(a.b,a.b,a.e,b.b,b.e)}else{qn(a.b,a.b,a.e,b.b,b.e);a.f=-a.f}}a.e=gl(a.e,b.e)+1;Sh(a);a.c=-2} +function ln(a,b){var c,d;c=Qh(a,b);if(a.f==0){nm(b.b,0,a.b,0,b.e);a.f=-b.f}else if(a.f!=b.f){hn(a.b,a.b,a.e,b.b,b.e);a.f=c}else{d=un(a.b,b.b,a.e,b.e);if(d>0){tn(a.b,a.b,a.e,b.b,b.e)}else{qn(a.b,a.b,a.e,b.b,b.e);a.f=-a.f}}a.e=gl(a.e,b.e)+1;Sh(a);a.c=-2} +function di(a,b,c){var d,e;if(c.f<=0){throw new nk(us)}d=a;if((c.e==1&&c.b[0]==1)|b.f>0&d.f==0){return Nh}if(d.f==0&&b.f==0){return Jh}if(b.f<0){d=ci(a,c);b=b.cb()}e=c.gb(0)?_m(d._(),b,c):Om(d._(),b,c);d.f<0&&b.gb(0)&&(e=bi(ei(rn(c,Jh),e),c));return e} +function $m(a,b,c,d,e){var f,g,i;f=ur;g=ur;for(i=0;ia.e){i=a;a=b;b=i}if(b.e<63){return no(a,b)}g=(a.e&-2)<<4;k=a.fb(g);n=b.fb(g);d=rn(a,k.eb(g));e=rn(b,n.eb(g));j=ho(k,n);c=ho(d,e);f=ho(rn(k,d),rn(e,n));f=fn(fn(f,j),c);f=f.eb(g);j=j.eb(g<<1);return fn(fn(j,f),c)} +function le(a){var b,c,d;c=a.l;if((c&c-1)!=0){return -1}d=a.m;if((d&d-1)!=0){return -1}b=a.h;if((b&b-1)!=0){return -1}if(b==0&&d==0&&c==0){return -1}if(b==0&&d==0&&c!=0){return _k(c)}if(b==0&&d!=0&&c==0){return _k(d)+22}if(b!=0&&d==0&&c==0){return _k(b)+44}return -1} +function wn(a,b){var c,d,e,f,g,i,j;e=Zh(a);d=Zh(b);if(d>=a.e){return Oh(),Nh}i=a.e;g=lc(Od,{6:1},-1,i,1);c=e>d?e:d;if(c==d){g[c]=-b.b[c]&a.b[c];++c}f=hl(b.e,a.e);for(;c=b.e){for(;c0?b:0)}if(b>=0){if(a.b<54){return new pg(a.g,Dg(b))}return new dg((!a.d&&(a.d=Li(a.g)),a.d),Dg(b))}if(-b>b;f=~~a.m>>b|c<<22-b;e=~~a.l>>b|a.m<<22-b}else if(b<44){g=d?1048575:0;f=~~c>>b-22;e=~~a.m>>b-22|c<<44-b}else{g=d?1048575:0;f=d?4194303:0;e=~~c>>b-44}return de(e&4194303,f&4194303,g&1048575)} +function Oh(){Oh=rr;var a;Jh=new qi(1,1);Lh=new qi(1,10);Nh=new qi(0,0);Ih=new qi(-1,1);Kh=mc(Xd,{6:1},17,[Nh,Jh,new qi(1,2),new qi(1,3),new qi(1,4),new qi(1,5),new qi(1,6),new qi(1,7),new qi(1,8),new qi(1,9),Lh]);Mh=lc(Xd,{6:1},17,32,0);for(a=0;a=b.e){return b}else if(d>=a.e){return a}g=hl(a.e,b.e);f=lc(Od,{6:1},-1,g,1);if(d==e){f[e]=-(-a.b[e]|-b.b[e]);c=e}else{for(c=d;c>5;b&=31;if(d>=a.e){return a.f<0?(Oh(),Ih):(Oh(),Nh)}f=a.e-d;e=lc(Od,{6:1},-1,f+1,1);Am(e,f,a.b,d,b);if(a.f<0){for(c=0;c0&&a.b[c]<<32-b!=0){for(c=0;c=0}for(d=1;d>1)?d:1+(~~(b-1)>>1);return wo(a,b)} +function Qm(a,b){var c,d,e,f;c=a.bb();d=b.bb();e=c0){b=Ki(Rm(ai(a),ai(b)));break}if(b.e>a.e*1.2){b=hi(b,a);b.r()!=0&&vm(b,b.bb())}else{do{pn(b,a);vm(b,b.bb())}while(Qh(b,a)>=0)}f=b;b=a;a=f}while(f.f!=0);return b.eb(e)} +function Sf(a,b,c){var d;if(!c){throw new jl}d=b-a.f;if(d==0){return a}if(d>0){if(d36){return Lr+Ke(a)}c=lc(Md,{6:1},-1,65,1);d=(nl(),ml);e=64;f=ue(b);if(we(a,ur)){while(we(a,f)){c[e--]=d[Je(ze(a,f))];a=ee(a,f,false)}c[e]=d[Je(a)]}else{while(ye(a,Be(f))){c[e--]=d[Je(Be(ze(a,f)))];a=ee(a,f,false)}c[e--]=d[Je(Be(a))];c[e]=45}return Gl(c,e,65)} +function Of(a,b,c){var d,e,f,g,i,j;f=b<0?-b:b;g=c.b;e=Bc(fl(f))+1;i=c;if(b==0||a.b==0&&a.g!=-1&&b>0){return Nf(a,b)}if(f>999999999||g==0&&b<0||g>0&&e>g){throw new nk(bs)}g>0&&(i=new Xn(g+e+1,c.c));d=Qf(a,i);j=~~Zk(f)>>1;while(j>0){d=Lf(d,d,i);(f&j)==j&&(d=Lf(d,a,i));j>>=1}b<0&&(d=zf(lf,d,i));If(d,c);return d} +function tf(a,b){var c;c=a.f-b.f;if(a.b==0&&a.g!=-1){if(c<=0){return b}if(b.b==0&&b.g!=-1){return a}}else if(b.b==0&&b.g!=-1){if(c>=0){return a}}if(c==0){if(gl(a.b,b.b)+1<54){return new pg(a.g+b.g,a.f)}return new og(fn((!a.d&&(a.d=Li(a.g)),a.d),(!b.d&&(b.d=Li(b.g)),b.d)),a.f)}else return c>0?rg(a,b,c):rg(b,a,-c)} +function Nm(a,b){var c,d,e,f,g;d=qe(ue(b),yr);if(we(a,ur)){f=ee(a,d,false);g=ze(a,d)}else{c=Ge(a,1);e=ue(~~b>>>1);f=ee(c,e,false);g=ze(c,e);g=pe(Ee(g,1),qe(a,sr));if((b&1)!=0){if(!ve(f,g)){g=He(g,f)}else{if(ye(He(f,g),d)){g=pe(g,He(d,f));f=He(f,sr)}else{g=pe(g,He(Ee(d,1),f));f=He(f,vr)}}}}return De(Ee(g,32),qe(f,yr))} +function Ei(a,b,c){var d,e,f,g,i,j,k,n,o,q,r,s,t,u;r=b.length;k=r;if(b.charCodeAt(0)==45){o=-1;q=1;--r}else{o=1;q=0}g=(Em(),Dm)[c];f=~~(r/g);u=r%g;u!=0&&++f;j=lc(Od,{6:1},-1,f,1);d=Cm[c-2];i=0;s=q+(u==0?g:u);for(t=q;t=9223372036854775807){return Qe(),Me}e=false;if(a<0){e=true;a=-a}d=0;if(a>=17592186044416){d=Bc(a/17592186044416);a-=d*17592186044416}c=0;if(a>=4194304){c=Bc(a/4194304);a-=c*4194304}b=Bc(a);f=de(b,c,d);e&&je(f);return f} +function Ke(a){var b,c,d,e,f;if(a.l==0&&a.m==0&&a.h==0){return Tr}if(a.h==524288&&a.m==0&&a.l==0){return '-9223372036854775808'}if(~~a.h>>19!=0){return Ur+Ke(Be(a))}c=a;d=Lr;while(!(c.l==0&&c.m==0&&c.h==0)){e=ue(1000000000);c=ee(c,e,true);b=Lr+Je(ae);if(!(c.l==0&&c.m==0&&c.h==0)){f=9-b.length;for(;f>0;--f){b=Tr+b}}d=b+d}return d} +function Uh(a,b){var c,d,e,f,g,i,j,k,n,o,q,r,s;f=b.f;if(f==0){throw new nk(ss)}e=b.e;d=b.b;if(e==1){return Lm(a,d[0],f)}q=a.b;r=a.e;c=r!=e?r>e?1:-1:jn(q,d,r);if(c<0){return mc(Xd,{6:1},17,[Nh,a])}s=a.f;i=r-e+1;j=s==f?1:-1;g=lc(Od,{6:1},-1,i,1);k=Km(g,i,q,r,d,e);n=new si(j,i,g);o=new si(s,e,k);Sh(n);Sh(o);return mc(Xd,{6:1},17,[n,o])} +function Zf(a){var b;if(a.f==0||a.b==0&&a.g!=-1){return !a.d&&(a.d=Li(a.g)),a.d}else if(a.f<0){return ei((!a.d&&(a.d=Li(a.g)),a.d),po(-a.f))}else{if(a.f>(a.e>0?a.e:el((a.b-1)*0.3010299956639812)+1)||a.f>(!a.d&&(a.d=Li(a.g)),a.d).bb()){throw new nk(cs)}b=Uh((!a.d&&(a.d=Li(a.g)),a.d),po(a.f));if(b[1].r()!=0){throw new nk(cs)}return b[0]}} +function qn(a,b,c,d,e){var f,g;f=ur;if(c36){throw new pl('radix '+b+' out of range')}d=a.length;e=d>0&&a.charCodeAt(0)==45?1:0;for(c=e;c2147483647){throw new pl(Zr+a+$r)}return f} +function En(a){var b,c;if(a.f==0){return Oh(),Ih}if(Vh(a,(Oh(),Ih))){return Nh}c=lc(Od,{6:1},-1,a.e+1,1);if(a.f>0){if(a.b[a.e-1]!=-1){for(b=0;a.b[b]==-1;++b){}}else{for(b=0;b0?b==0?0:b<0?-1:1:0;break;case 3:d=(b==0?0:b<0?-1:1)<0?b==0?0:b<0?-1:1:0;break;case 4:(b<0?-b:b)>=5&&(d=b==0?0:b<0?-1:1);break;case 5:(b<0?-b:b)>5&&(d=b==0?0:b<0?-1:1);break;case 6:(b<0?-b:b)+a>5&&(d=b==0?0:b<0?-1:1);}return d} +function Vf(a,b,c){var d,e,f,g,i,j;i=te(hf[c]);g=He(te(a.f),ue(c));j=te(a.g);f=ee(j,i,false);e=ze(j,i);if(Ce(e,ur)){d=se(He(Ee(xe(e,ur)?Be(e):e,1),i),ur)?0:xe(He(Ee(xe(e,ur)?Be(e):e,1),i),ur)?-1:1;f=pe(f,ue(Bg(Je(f)&1,(se(e,ur)?0:xe(e,ur)?-1:1)*(5+d),b.c)));if(fl(Ie(xe(f,ur)?Be(f):f))>=b.b){f=re(f,tr);g=He(g,sr)}}a.f=Dg(Ie(g));a.e=b.b;a.g=Ie(f);a.b=tg(f);a.d=null} +function tm(a,b){var c,d,e,f,g,i,j,k,n;k=a.f==0?1:a.f;g=~~b>>5;c=b&31;j=gl(g+1,a.e)+1;i=lc(Od,{6:1},-1,j,1);d=1<=a.e){i[g]=d}else{e=Zh(a);if(g>e){i[g]^=d}else if(g=0||k.f==0||k.e==1&&k.b[0]==1)}n=di(k,i,a);if(n.e==1&&n.b[0]==1||n.eQ(g)){continue}for(e=1;e=0;--i){n=De(Ee(k,32),qe(ue(b[i]),yr));if(we(n,ur)){j=ee(n,f,false);k=ze(n,f)}else{e=Ge(n,1);g=ue(~~d>>>1);j=ee(e,g,false);k=ze(e,g);k=pe(Ee(k,1),qe(n,sr));if((d&1)!=0){if(!ve(j,k)){k=He(k,j)}else{if(ye(He(j,k),f)){k=pe(k,He(f,j));j=He(j,sr)}else{k=pe(k,He(Ee(f,1),j));j=He(j,vr)}}}}a[i]=Je(qe(j,yr))}return Je(k)} +function he(a,b,c,d,e,f){var g,i,j,k,n,o,q;k=ke(b)-ke(a);g=Ee(b,k);j=de(0,0,0);while(k>=0){i=ne(a,g);if(i){k<22?(j.l|=1<>>1;g.m=~~o>>>1|(q&1)<<21;g.l=~~n>>>1|(o&1)<<21;--k}c&&je(j);if(f){if(d){ae=Be(a);e&&(ae=He(ae,(Qe(),Oe)))}else{ae=de(a.l,a.m,a.h)}}return j} +function dn(a,b,c,d,e){var f,g,i,j,k,n,o;k=lc(Xd,{6:1},17,8,0);n=a;nc(k,0,b);o=Ym(b,b,d,e);for(g=1;g<=7;++g){nc(k,g,Ym(k[g-1],o,d,e))}for(g=c.ab()-1;g>=0;--g){if((c.b[~~g>>5]&1<<(g&31))!=0){j=1;f=g;for(i=g-3>0?g-3:0;i<=g-1;++i){if((c.b[~~i>>5]&1<<(i&31))!=0){if(i>1],n,d,e);g=f}else{n=Ym(n,n,d,e)}}return n} +function Ln(a,b){var c,d,e,f,g,i,j;i=gl(a.e,b.e);g=lc(Od,{6:1},-1,i,1);e=Zh(a);d=Zh(b);c=d;if(e==d){g[d]=-a.b[d]^-b.b[d]}else{g[d]=-b.b[d];f=hl(b.e,e);for(++c;cb.g?1:0}d=a.f-b.f;c=(a.e>0?a.e:el((a.b-1)*0.3010299956639812)+1)-(b.e>0?b.e:el((b.b-1)*0.3010299956639812)+1);if(c>d+1){return e}else if(c0&&(g=ei(g,po(d)));return Qh(f,g)}}else return e0?a.e:el((a.b-1)*0.3010299956639812)+1)-f<0||f==0){return}d=a.q()-f;if(d<=0){return}if(a.b<54){Vf(a,b,d);return}i=po(d);e=Uh((!a.d&&(a.d=Li(a.g)),a.d),i);g=a.f-d;if(e[1].r()!=0){c=Qh(ki(e[1]._()),i);c=Bg(e[0].gb(0)?1:0,e[1].r()*(5+c),b.c);c!=0&&nc(e,0,fn(e[0],Ki(ue(c))));j=new cg(e[0]);if(j.q()>f){nc(e,0,Th(e[0],(Oh(),Lh)));--g}}a.f=Dg(g);a.e=f;Tf(a,e[0])} +function Yf(a,b,c){var d,e,f,g;d=b.f-a.f;if(b.b==0&&b.g!=-1||a.b==0&&a.g!=-1||c.b==0){return Qf(Xf(a,b),c)}if((b.e>0?b.e:el((b.b-1)*0.3010299956639812)+1)0?a.e:el((a.b-1)*0.3010299956639812)+1)){g=Uf(a);if(g!=b.r()){f=fn(lo((!a.d&&(a.d=Li(a.g)),a.d),10),Ki(ue(g)))}else{f=rn((!a.d&&(a.d=Li(a.g)),a.d),Ki(ue(g)));f=fn(lo(f,10),Ki(ue(g*9)))}e=new og(f,a.f+1);return Qf(e,c)}}return Qf(Xf(a,b),c)} +function rn(a,b){var c,d,e,f,g,i,j,k,n,o;g=a.f;j=b.f;if(j==0){return a}if(g==0){return b.cb()}f=a.e;i=b.e;if(f+i==2){c=qe(ue(a.b[0]),yr);d=qe(ue(b.b[0]),yr);g<0&&(c=Be(c));j<0&&(d=Be(d));return Ki(He(c,d))}e=f!=i?f>i?1:-1:jn(a.b,b.b,f);if(e==-1){o=-j;n=g==j?sn(b.b,i,a.b,f):gn(b.b,i,a.b,f)}else{o=g;if(g==j){if(e==0){return Oh(),Nh}n=sn(a.b,f,b.b,i)}else{n=gn(a.b,f,b.b,i)}}k=new si(o,n.length,n);Sh(k);return k} +function zn(a,b){var c,d,e,f,g,i,j;e=Zh(a);d=Zh(b);if(e>=b.e){return Oh(),Nh}i=b.e;g=lc(Od,{6:1},-1,i,1);c=e;if(e0?a:a.cb()}n=a.f;k=a.e;d=b.e;if(k+d==2){o=re(qe(ue(a.b[0]),yr),qe(ue(b.b[0]),yr));n!=e&&(o=Be(o));return Ki(o)}c=k!=d?k>d?1:-1:jn(a.b,b.b,k);if(c==0){return n==e?Jh:Ih}if(c==-1){return Nh}g=k-d+1;f=lc(Od,{6:1},-1,g,1);i=n==e?1:-1;d==1?Mm(f,a.b,k,b.b[0]):Km(f,g,a.b,k,b.b,d);j=new si(i,g,f);Sh(j);return j} +function hn(a,b,c,d,e){var f,g;f=pe(qe(ue(b[0]),yr),qe(ue(d[0]),yr));a[0]=Je(f);f=Fe(f,32);if(c>=e){for(g=1;g0){if(e0?(g=mo(g,Bc(e))):e<0&&(f=mo(f,Bc(-e)));return ug(f,g,c,d)} +function Gn(a,b){var c,d,e,f,g,i,j;d=Zh(b);e=Zh(a);if(e>=b.e){return b}i=b.e;g=lc(Od,{6:1},-1,i,1);if(d0){c-=d.length-b;if(c>=0){e.b.b+=es;for(;c>ef.length;c-=ef.length){$l(e,ef)}_l(e,ef,Bc(c));dm(e,Al(d,b))}else{c=b-c;dm(e,Bl(d,b,Bc(c)));e.b.b+=ds;dm(e,Al(d,Bc(c)))}}else{dm(e,Al(d,b));for(;c<-ef.length;c+=ef.length){$l(e,ef)}_l(e,ef,Bc(-c))}return e.b.b} +function ug(a,b,c,d){var e,f,g,i,j,k,n;g=Uh(a,b);i=g[0];k=g[1];if(k.r()==0){return new dg(i,c)}n=a.r()*b.r();if(b.ab()<54){j=ai(k);f=ai(b);e=se(He(Ee(xe(j,ur)?Be(j):j,1),xe(f,ur)?Be(f):f),ur)?0:xe(He(Ee(xe(j,ur)?Be(j):j,1),xe(f,ur)?Be(f):f),ur)?-1:1;e=Bg(i.gb(0)?1:0,n*(5+e),d)}else{e=Qh(ki(k._()),b._());e=Bg(i.gb(0)?1:0,n*(5+e),d)}if(e!=0){if(i.ab()<54){return Hg(pe(ai(i),ue(e)),c)}i=fn(i,Ki(ue(e)));return new dg(i,c)}return new dg(i,c)} +function ag(a){var b,c,d,e,f;if(a.i!=null){return a.i}if(a.b<32){a.i=Im(te(a.g),Bc(a.f));return a.i}e=Hm((!a.d&&(a.d=Li(a.g)),a.d),0);if(a.f==0){return e}b=(!a.d&&(a.d=Li(a.g)),a.d).r()<0?2:1;c=e.length;d=-a.f+c-b;f=new fm;cc(f.b,e);if(a.f>0&&d>=-6){if(d>=0){em(f,c-Bc(a.f),ds)}else{ec(f.b,b-1,b-1,es);em(f,b+1,Ll(ef,0,-Bc(d)-1))}}else{if(c-b>=1){ec(f.b,b,b,ds);++c}ec(f.b,c,c,fs);d>0&&em(f,++c,gs);em(f,++c,Lr+Ke(te(d)))}a.i=f.b.b;return a.i} +function xn(a,b){var c,d,e,f,g,i,j;e=Zh(a);f=Zh(b);if(e>=b.e){return a}d=f>e?f:e;f>e?(c=-b.b[d]&~a.b[d]):f0){d[e]=f;break}else{d[e]=f.substring(0,i.index);f=f.substring(i.index+i[0].length,f.length);c.lastIndex=0;if(g==f){d[e]=f.substring(0,1);f=f.substring(1)}g=f;e++}}if(b==0&&o.length>0){var j=d.length;while(j>0&&d[j-1]==Lr){--j}j1000000){throw new nk('power of ten too big')}if(a<=2147483647){return bo[1].db(b).eb(b)}d=bo[1].db(2147483647);e=d;c=te(a-2147483647);b=Bc(a%2147483647);while(ve(c,Ir)){e=ei(e,d);c=He(c,Ir)}e=ei(e,bo[1].db(b));e=e.eb(2147483647);c=te(a-2147483647);while(ve(c,Ir)){e=e.eb(2147483647);c=He(c,Ir)}e=e.eb(b);return e} +function $d(){var a;!!$stats&&Ue('com.iriscouch.gwtapp.client.BigDecimalApp');ik(new kk);Wj(new Yj);Gj(new Ij);Ch(new Eh);!!$stats&&Ue('com.google.gwt.user.client.UserAgentAsserter');a=We();wl(Sr,a)||($wnd.alert('ERROR: Possible problem with your *.gwt.xml module file.\nThe compile time user.agent value (safari) does not match the runtime user.agent value ('+a+'). Expect more errors.\n'),undefined);!!$stats&&Ue('com.google.gwt.user.client.DocumentModeAsserter');Ve()} +function Vo(a){Qo();var b,c,d,e,f;if(a==null){throw new jl}d=Cl(a);c=d.length;if(cOo.length){throw new Rk}f=null;e=null;if(d[0]==67){e=Ao;f=Io}else if(d[0]==68){e=Bo;f=Jo}else if(d[0]==70){e=Co;f=Ko}else if(d[0]==72){if(c>6){if(d[5]==68){e=Do;f=Lo}else if(d[5]==69){e=Eo;f=Mo}else if(d[5]==85){e=Fo;f=No}}}else if(d[0]==85){if(d[1]==80){e=Ho;f=Po}else if(d[1]==78){e=Go;f=Oo}}if(!!e&&c==f.length){for(b=1;b>5;this.b=lc(Od,{6:1},-1,this.e,1);for(c=0;c=2147483648&&(e-=4294967296),e))}this.b[this.e-1]>>>=-a&31;Sh(this)}} +function fn(a,b){var c,d,e,f,g,i,j,k,n,o,q,r;g=a.f;j=b.f;if(g==0){return b}if(j==0){return a}f=a.e;i=b.e;if(f+i==2){c=qe(ue(a.b[0]),yr);d=qe(ue(b.b[0]),yr);if(g==j){k=pe(c,d);r=Je(k);q=Je(Ge(k,32));return q==0?new qi(g,r):new si(g,2,mc(Od,{6:1},-1,[r,q]))}return Ki(g<0?He(d,c):He(c,d))}else if(g==j){o=g;n=f>=i?gn(a.b,f,b.b,i):gn(b.b,i,a.b,f)}else{e=f!=i?f>i?1:-1:jn(a.b,b.b,f);if(e==0){return Oh(),Nh}if(e==1){o=g;n=sn(a.b,f,b.b,i)}else{o=j;n=sn(b.b,i,a.b,f)}}k=new si(o,n.length,n);Sh(k);return k} +function Yn(a){Un();var b,c,d,e;if(a==null){throw new kl('null string')}b=Cl(a);if(b.length<27||b.length>45){throw new Sk(Hs)}for(d=0;d0?a.e:el((a.b-1)*0.3010299956639812)+1)0?b.e:el((b.b-1)*0.3010299956639812)+1)<-d-1){e=a;g=b}else{return Qf(tf(a,b),c)}if(c.b>=(e.e>0?e.e:el((e.b-1)*0.3010299956639812)+1)){return Qf(tf(a,b),c)}f=e.r();if(f==g.r()){i=fn(lo((!e.d&&(e.d=Li(e.g)),e.d),10),Ki(ue(f)))}else{i=rn((!e.d&&(e.d=Li(e.g)),e.d),Ki(ue(f)));i=fn(lo(i,10),Ki(ue(f*9)))}e=new og(i,e.f+1);return Qf(e,c)} +function $f(a){var b,c,d,e,f,g,i,j;g=Hm((!a.d&&(a.d=Li(a.g)),a.d),0);if(a.f==0){return g}b=(!a.d&&(a.d=Li(a.g)),a.d).r()<0?2:1;d=g.length;e=-a.f+d-b;j=new hm(g);if(a.f>0&&e>=-6){if(e>=0){em(j,d-Bc(a.f),ds)}else{ec(j.b,b-1,b-1,es);em(j,b+1,Ll(ef,0,-Bc(e)-1))}}else{c=d-b;i=Bc(e%3);if(i!=0){if((!a.d&&(a.d=Li(a.g)),a.d).r()==0){i=i<0?-i:3-i;e+=i}else{i=i<0?i+3:i;e-=i;b+=i}if(c<3){for(f=i-c;f>0;--f){em(j,d++,Tr)}}}if(d-b>=1){ec(j.b,b,b,ds);++d}if(e!=0){ec(j.b,d,d,fs);e>0&&em(j,++d,gs);em(j,++d,Lr+Ke(te(e)))}}return j.b.b} +function nm(a,b,c,d,e){var f,g,i,j,k,n,o,q,r;if(a==null||c==null){throw new jl}q=a.gC();j=c.gC();if((q.c&4)==0||(j.c&4)==0){throw new rk('Must be array types')}o=q.b;g=j.b;if(!((o.c&1)!=0?o==g:(g.c&1)==0)){throw new rk('Array types must match')}r=a.length;k=c.length;if(b<0||d<0||e<0||b+e>r||d+e>k){throw new Vk}if(((o.c&1)==0||(o.c&4)!=0)&&q!=j){n=vc(a,11);f=vc(c,11);if(Ac(a)===Ac(c)&&bd;){nc(f,i,n[--b])}}else{for(i=d+e;d=0&&a.b[0]=to[c];++c){}return so[c]}i=new si(1,a.e,lc(Od,{6:1},-1,a.e+1,1));nm(a.b,0,i.b,0,a.e);mi(a,0)?nn(i,2):(i.b[0]|=1);e=i.ab();for(b=2;eg?f:g));e=f-g;k=e>0?(go(),e>19!=0){b=Be(b);j=true}g=le(b);f=false;e=false;d=false;if(a.h==524288&&a.m==0&&a.l==0){e=true;f=true;if(g==-1){a=ce((Qe(),Me));d=true;j=!j}else{i=Fe(a,g);j&&je(i);c&&(ae=de(0,0,0));return i}}else if(~~a.h>>19!=0){f=true;a=Be(a);d=true;j=!j}if(g!=-1){return ge(a,g,j,f,c)}if(!we(a,b)){c&&(f?(ae=Be(a)):(ae=de(a.l,a.m,a.h)));return de(0,0,0)}return he(d?a:de(a.l,a.m,a.h),b,j,f,e,c)} +function An(a,b){var c,d,e,f,g,i,j,k;e=Zh(a);f=Zh(b);if(e>=b.e){return a}j=gl(a.e,b.e);d=e;if(f>e){i=lc(Od,{6:1},-1,j,1);g=hl(a.e,f);for(;d>13|(a.m&15)<<9;e=~~a.m>>4&8191;f=~~a.m>>17|(a.h&255)<<5;g=~~(a.h&1048320)>>8;i=b.l&8191;j=~~b.l>>13|(b.m&15)<<9;k=~~b.m>>4&8191;n=~~b.m>>17|(b.h&255)<<5;o=~~(b.h&1048320)>>8;C=c*i;D=d*i;E=e*i;F=f*i;G=g*i;if(j!=0){D+=c*j;E+=d*j;F+=e*j;G+=f*j}if(k!=0){E+=c*k;F+=d*k;G+=e*k}if(n!=0){F+=c*n;G+=d*n}o!=0&&(G+=c*o);r=C&4194303;s=(D&511)<<13;q=r+s;u=~~C>>22;v=~~D>>9;w=(E&262143)<<4;x=(F&31)<<17;t=u+v+w+x;z=~~E>>18;A=~~F>>5;B=(G&4095)<<8;y=z+A+B;t+=~~q>>22;q&=4194303;y+=~~t>>22;t&=4194303;y&=1048575;return de(q,t,y)} +function zf(a,b,c){var d,e,f,g,i,j,k,n;n=Ie(pe(ue(c.b),vr))+(b.e>0?b.e:el((b.b-1)*0.3010299956639812)+1)-(a.e>0?a.e:el((a.b-1)*0.3010299956639812)+1);e=a.f-b.f;j=e;f=1;i=nf.length-1;k=mc(Xd,{6:1},17,[(!a.d&&(a.d=Li(a.g)),a.d)]);if(c.b==0||a.b==0&&a.g!=-1||b.b==0&&b.g!=-1){return wf(a,b)}if(n>0){nc(k,0,ei((!a.d&&(a.d=Li(a.g)),a.d),po(n)));j+=n}k=Uh(k[0],(!b.d&&(b.d=Li(b.g)),b.d));g=k[0];if(k[1].r()!=0){d=Qh(ki(k[1]),(!b.d&&(b.d=Li(b.g)),b.d));g=fn(ei(g,(Oh(),Lh)),Ki(ue(k[0].r()*(5+d))));++j}else{while(!g.gb(0)){k=Uh(g,nf[f]);if(k[1].r()==0&&j-f>=e){j-=f;fe){vm(o,d);vm(q,e);um(j,e);c+=d-e}else{vm(o,d);vm(q,e);um(k,d);c+=e-d}j.f=1;while(q.r()>0){while(Qh(o,q)>0){pn(o,q);n=o.bb();vm(o,n);mn(j,k);um(k,n);c+=n}while(Qh(o,q)<=0){pn(q,o);if(q.r()==0){break}n=q.bb();vm(q,n);mn(k,j);um(j,n);c+=n}}if(!(o.e==1&&o.b[0]==1)){throw new nk(vs)}Qh(j,b)>=0&&pn(j,b);j=rn(b,j);i=Jm(b);if(c>f){j=Ym(j,(Oh(),Jh),b,i);c=c-f}j=Ym(j,Ai(f-c),b,i);return j} +function Xf(a,b){var c;c=a.f-b.f;if(a.b==0&&a.g!=-1){if(c<=0){return Mf(b)}if(b.b==0&&b.g!=-1){return a}}else if(b.b==0&&b.g!=-1){if(c>=0){return a}}if(c==0){if(gl(a.b,b.b)+1<54){return new pg(a.g-b.g,a.f)}return new og(rn((!a.d&&(a.d=Li(a.g)),a.d),(!b.d&&(b.d=Li(b.g)),b.d)),a.f)}else if(c>0){if(c0?b.e:el((b.b-1)*0.3010299956639812)+1)+f>(a.e>0?a.e:el((a.b-1)*0.3010299956639812)+1)+1||a.b==0&&a.g!=-1){d=(Oh(),Nh)}else if(f==0){d=Th((!a.d&&(a.d=Li(a.g)),a.d),(!b.d&&(b.d=Li(b.g)),b.d))}else if(f>0){g=po(f);d=Th((!a.d&&(a.d=Li(a.g)),a.d),ei((!b.d&&(b.d=Li(b.g)),b.d),g));d=ei(d,g)}else{g=po(-f);d=Th(ei((!a.d&&(a.d=Li(a.g)),a.d),g),(!b.d&&(b.d=Li(b.g)),b.d));while(!d.gb(0)){i=Uh(d,nf[c]);if(i[1].r()==0&&j-c>=f){j-=c;c36){return Hm(a,0)}d=Math.log(b)/Math.log(2);s=Bc(sm(new Pi(a.f<0?new si(1,a.e,a.b):a))/d+(u<0?1:0))+1;t=lc(Md,{6:1},-1,s,1);f=s;if(b!=16){v=lc(Od,{6:1},-1,o,1);nm(i,0,v,0,o);w=o;e=Dm[b];c=Cm[b-2];while(true){r=Mm(v,v,w,c);q=f;do{t[--f]=uk(r%b,b)}while((r=~~(r/b))!=0&&f!=0);g=e-q+f;for(k=0;k0;++k){t[--f]=48}for(k=w-1;k>0&&v[k]==0;--k){}w=k+1;if(w==1&&v[0]==0){break}}}else{for(k=0;k0;++n){r=~~i[k]>>(n<<2)&15;t[--f]=uk(r,16)}}}while(t[f]==48){++f}u==-1&&(t[--f]=45);return Ll(t,f,s-f)} +function Km(a,b,c,d,e,f){var g,i,j,k,n,o,q,r,s,t,u,v,w,x,y,z,A;u=lc(Od,{6:1},-1,d+1,1);v=lc(Od,{6:1},-1,f+1,1);j=$k(e[f-1]);if(j!=0){xm(v,e,0,j);xm(u,c,0,j)}else{nm(c,0,u,0,d);nm(e,0,v,0,f)}k=v[f-1];o=b-1;q=d;while(o>=0){if(u[q]==k){n=-1}else{w=pe(Ee(qe(ue(u[q]),yr),32),qe(ue(u[q-1]),yr));z=Nm(w,k);n=Je(z);y=Je(Fe(z,32));if(n!=0){x=false;++n;do{--n;if(x){break}s=Ae(qe(ue(n),yr),qe(ue(v[f-2]),yr));A=pe(Ee(ue(y),32),qe(ue(u[q-2]),yr));t=pe(qe(ue(y),yr),qe(ue(k),yr));$k(Je(Ge(t,32)))<32?(x=true):(y=Je(t))}while(ve(Le(s,Gr),Le(A,Gr)))}}if(n!=0){g=$m(u,q-f,v,f,n);if(g!=0){--n;i=ur;for(r=0;r=d){um(i,e)}else{vm(j,d-c0&&um(i,e-d+c)}c+=e}e=Sm(o,g);if(e!=0){um(o,e);if(d>=c){um(j,e)}else{vm(i,c-d0&&um(j,e-c+d)}d+=e}if(k.r()==o.r()){if(c<=d){ln(k,o);ln(i,j)}else{ln(o,k);ln(j,i)}}else{if(c<=d){kn(k,o);kn(i,j)}else{kn(o,k);kn(j,i)}}if(o.r()==0||k.r()==0){throw new nk(vs)}}if(Um(o,d)){i=j;o.r()!=k.r()&&(k=k.cb())}k.gb(g)&&(i.r()<0?(i=i.cb()):(i=rn(b,i)));i.r()<0&&(i=fn(i,b));return i} +function We(){var c=navigator.userAgent.toLowerCase();var d=function(a){return parseInt(a[1])*1000+parseInt(a[2])};if(function(){return c.indexOf(Wr)!=-1}())return Wr;if(function(){return c.indexOf('webkit')!=-1||function(){if(c.indexOf('chromeframe')!=-1){return true}if(typeof window['ActiveXObject']!=Xr){try{var b=new ActiveXObject('ChromeTab.ChromeFrame');if(b){b.registerBhoIfNeeded();return true}}catch(a){}}return false}()}())return Sr;if(function(){return c.indexOf(Yr)!=-1&&$doc.documentMode>=9}())return 'ie9';if(function(){return c.indexOf(Yr)!=-1&&$doc.documentMode>=8}())return 'ie8';if(function(){var a=/msie ([0-9]+)\.([0-9]+)/.exec(c);if(a&&a.length==3)return d(a)>=6000}())return 'ie6';if(function(){return c.indexOf('gecko')!=-1}())return 'gecko1_8';return 'unknown'} +function Kn(a,b){var c,d,e,f,g,i,j,k;j=gl(b.e,a.e);e=Zh(b);f=Zh(a);if(e0&&we(d,Er)){if(we(d,ur)){e=c+Je(d);for(f=17;f>=e;--f){j[f+1]=j[f]}j[++e]=46;g&&(j[--c]=45);return Ll(j,c,18-c+1)}for(f=2;xe(ue(f),pe(Be(d),sr));++f){j[--c]=48}j[--c]=46;j[--c]=48;g&&(j[--c]=45);return Ll(j,c,18-c)}n=c+1;k=new gm;g&&(k.b.b+=Ur,k);if(18-n>=1){Zl(k,j[c]);k.b.b+=ds;dc(k.b,Ll(j,c+1,18-c-1))}else{dc(k.b,Ll(j,c,18-c))}k.b.b+=fs;ve(d,ur)&&(k.b.b+=gs,k);cc(k.b,Lr+Ke(d));return k.b.b} +function Ef(a,b,c){var d,e,f,g,i,j,k,n,o,q,r,s,t;n=c.b;e=Pf(a)-b.q();k=nf.length-1;f=a.f-b.f;o=f;r=e-f+1;q=lc(Xd,{6:1},17,2,0);if(n==0||a.b==0&&a.g!=-1||b.b==0&&b.g!=-1){return Df(a,b)}if(r<=0){nc(q,0,(Oh(),Nh))}else if(f==0){nc(q,0,Th((!a.d&&(a.d=Li(a.g)),a.d),(!b.d&&(b.d=Li(b.g)),b.d)))}else if(f>0){nc(q,0,Th((!a.d&&(a.d=Li(a.g)),a.d),ei((!b.d&&(b.d=Li(b.g)),b.d),po(f))));o=f<(n-r+1>0?n-r+1:0)?f:n-r+1>0?n-r+1:0;nc(q,0,ei(q[0],po(o)))}else{g=-f<(n-e>0?n-e:0)?-f:n-e>0?n-e:0;q=Uh(ei((!a.d&&(a.d=Li(a.g)),a.d),po(g)),(!b.d&&(b.d=Li(b.g)),b.d));o+=g;g=-o;if(q[1].r()!=0&&g>0){d=(new cg(q[1])).q()+g-b.q();if(d==0){nc(q,1,Th(ei(q[1],po(g)),(!b.d&&(b.d=Li(b.g)),b.d)));d=dl(q[1].r())}if(d>0){throw new nk(as)}}}if(q[0].r()==0){return Ig(f)}t=q[0];j=new cg(q[0]);s=j.q();i=1;while(!t.gb(0)){q=Uh(t,nf[i]);if(q[1].r()==0&&(s-i>=n||o-i>=f)){s-=i;o-=i;in){throw new nk(as)}j.f=Dg(o);Tf(j,t);return j} +function Ve(){var a,b,c;b=$doc.compatMode;a=mc(Vd,{6:1},1,[Vr]);for(c=0;cMake sure your application's host HTML page has a Standards Mode (document.compatMode=' CSS1Compat') doctype,
    e.g. by using <!doctype html> at the start of your application's HTML page.

    To continue using this unsupported rendering mode and risk layout problems, suppress this message by adding
    the following line to your*.gwt.xml module file:
      <extend-configuration-property name=\"document.compatMode\" value=\""+b+'"/>':"Your *.gwt.xml module configuration prohibits the use of the current doucment rendering mode (document.compatMode=' "+b+"').
    Modify your application's host HTML page doctype, or update your custom 'document.compatMode' configuration property settings."} +function Lg(a){rf();var b,c;c=Lj(a);if(c==is)b=new cg(new oi(a[0].toString()));else if(c=='BigInteger number')b=new dg(new oi(a[0].toString()),a[1]);else if(c=='BigInteger number MathContext')b=new eg(new oi(a[0].toString()),a[1],new Yn(a[2].toString()));else if(c=='BigInteger MathContext')b=new fg(new oi(a[0].toString()),new Yn(a[1].toString()));else if(c==js)b=new gg(Cl(a[0].toString()));else if(c=='array number number')b=new hg(Cl(a[0].toString()),a[1],a[2]);else if(c=='array number number MathContext')b=new ig(Cl(a[0].toString()),a[1],a[2],new Yn(a[3].toString()));else if(c=='array MathContext')b=new jg(Cl(a[0].toString()),new Yn(a[1].toString()));else if(c==ks)b=new kg(a[0]);else if(c==ls)b=new lg(a[0],new Yn(a[1].toString()));else if(c==ms)b=new mg(a[0].toString());else if(c=='string MathContext')b=new ng(a[0].toString(),new Yn(a[1].toString()));else throw new V('Unknown call signature for obj = new java.math.BigDecimal: '+c);return new Kg(b)} +function uo(){uo=rr;var a;ro=mc(Od,{6:1},-1,[0,0,1854,1233,927,747,627,543,480,431,393,361,335,314,295,279,265,253,242,232,223,216,181,169,158,150,145,140,136,132,127,123,119,114,110,105,101,96,92,87,83,78,73,69,64,59,54,49,44,38,32,26,1]);to=mc(Od,{6:1},-1,[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021]);so=lc(Xd,{6:1},17,to.length,0);for(a=0;a=0;--j){C=pe(Ee(y,32),qe(ue(B[j]),yr));t=Gm(C);B[j]=Je(t);y=ue(Je(Fe(t,32)))}u=Je(y);s=c;do{w[--c]=48+u%10&65535}while((u=~~(u/10))!=0&&c!=0);d=9-s+c;for(i=0;i0;++i){w[--c]=48}n=D-1;for(;B[n]==0;--n){if(n==0){break F}}D=n+1}while(w[c]==48){++c}}o=z<0;f=v-c-b-1;if(b==0){o&&(w[--c]=45);return Ll(w,c,v-c)}if(b>0&&f>=-6){if(f>=0){k=c+f;for(n=v-1;n>=k;--n){w[n+1]=w[n]}w[++k]=46;o&&(w[--c]=45);return Ll(w,c,v-c+1)}for(n=2;n<-f+1;++n){w[--c]=48}w[--c]=46;w[--c]=48;o&&(w[--c]=45);return Ll(w,c,v-c)}A=c+1;x=new gm;o&&(x.b.b+=Ur,x);if(v-A>=1){Zl(x,w[c]);x.b.b+=ds;dc(x.b,Ll(w,c+1,v-c-1))}else{dc(x.b,Ll(w,c,v-c))}x.b.b+=fs;f>0&&(x.b.b+=gs,x);cc(x.b,Lr+f);return x.b.b} +function jk(){nr(rs,Lr);if($wnd.bigdecimal.RoundingMode){var c=$wnd.bigdecimal.RoundingMode}$wnd.bigdecimal.RoundingMode=Jr(function(){if(arguments.length==1&&arguments[0]!=null&&arguments[0].gC()==Wc){this.__gwt_instance=arguments[0]}else if(arguments.length==0){this.__gwt_instance=new ak;or(this.__gwt_instance,this)}});var d=$wnd.bigdecimal.RoundingMode.prototype=new Object;if(c){for(p in c){$wnd.bigdecimal.RoundingMode[p]=c[p]}}$wnd.bigdecimal.RoundingMode.valueOf=Jr(function(a){var b=new bk((Qo(),Ok((Yo(),Xo),a)));return pr(b)});$wnd.bigdecimal.RoundingMode.values=Jr(function(){var a=fk();return qr(a)});d.name=Jr(function(){var a=this.__gwt_instance.Jb();return a});d.toString=Jr(function(){var a=this.__gwt_instance.tS();return a});$wnd.bigdecimal.RoundingMode.CEILING=Jr(function(){var a=new bk((Qo(),Ao));return pr(a)});$wnd.bigdecimal.RoundingMode.DOWN=Jr(function(){var a=new bk((Qo(),Bo));return pr(a)});$wnd.bigdecimal.RoundingMode.FLOOR=Jr(function(){var a=new bk((Qo(),Co));return pr(a)});$wnd.bigdecimal.RoundingMode.HALF_DOWN=Jr(function(){var a=new bk((Qo(),Do));return pr(a)});$wnd.bigdecimal.RoundingMode.HALF_EVEN=Jr(function(){var a=new bk((Qo(),Eo));return pr(a)});$wnd.bigdecimal.RoundingMode.HALF_UP=Jr(function(){var a=new bk((Qo(),Fo));return pr(a)});$wnd.bigdecimal.RoundingMode.UNNECESSARY=Jr(function(){var a=new bk((Qo(),Go));return pr(a)});$wnd.bigdecimal.RoundingMode.UP=Jr(function(){var a=new bk((Qo(),Ho));return pr(a)});mr(Wc,$wnd.bigdecimal.RoundingMode)} +function Hj(){nr(rs,Lr);if($wnd.bigdecimal.BigInteger){var d=$wnd.bigdecimal.BigInteger}$wnd.bigdecimal.BigInteger=Jr(function(){if(arguments.length==1&&arguments[0]!=null&&arguments[0].gC()==Sc){this.__gwt_instance=arguments[0]}else if(arguments.length==0){this.__gwt_instance=new Ni;or(this.__gwt_instance,this)}else if(arguments.length==1){this.__gwt_instance=Jj(arguments[0]);or(this.__gwt_instance,this)}});var e=$wnd.bigdecimal.BigInteger.prototype=new Object;if(d){for(p in d){$wnd.bigdecimal.BigInteger[p]=d[p]}}$wnd.bigdecimal.BigInteger.__init__=Jr(function(a){var b=Qi(a);return pr(b)});e.abs=Jr(function(){var a=this.__gwt_instance._();return pr(a)});e.add=Jr(function(a){var b=this.__gwt_instance.hb(a.__gwt_instance);return pr(b)});e.and=Jr(function(a){var b=this.__gwt_instance.ib(a.__gwt_instance);return pr(b)});e.andNot=Jr(function(a){var b=this.__gwt_instance.jb(a.__gwt_instance);return pr(b)});e.bitCount=jr(Number,Jr(function(){var a=this.__gwt_instance.kb();return a}));e.bitLength=jr(Number,Jr(function(){var a=this.__gwt_instance.ab();return a}));e.clearBit=Jr(function(a){var b=this.__gwt_instance.lb(a);return pr(b)});e.compareTo=jr(Number,Jr(function(a){var b=this.__gwt_instance.mb(a.__gwt_instance);return b}));e.divide=Jr(function(a){var b=this.__gwt_instance.nb(a.__gwt_instance);return pr(b)});e.doubleValue=jr(Number,Jr(function(){var a=this.__gwt_instance.z();return a}));e.equals=jr(Number,Jr(function(a){var b=this.__gwt_instance.eQ(a);return b}));e.flipBit=Jr(function(a){var b=this.__gwt_instance.pb(a);return pr(b)});e.floatValue=jr(Number,Jr(function(){var a=this.__gwt_instance.A();return a}));e.gcd=Jr(function(a){var b=this.__gwt_instance.qb(a.__gwt_instance);return pr(b)});e.getLowestSetBit=jr(Number,Jr(function(){var a=this.__gwt_instance.bb();return a}));e.hashCode=jr(Number,Jr(function(){var a=this.__gwt_instance.hC();return a}));e.intValue=jr(Number,Jr(function(){var a=this.__gwt_instance.B();return a}));e.isProbablePrime=jr(Number,Jr(function(a){var b=this.__gwt_instance.rb(a);return b}));e.max=Jr(function(a){var b=this.__gwt_instance.tb(a.__gwt_instance);return pr(b)});e.min=Jr(function(a){var b=this.__gwt_instance.ub(a.__gwt_instance);return pr(b)});e.mod=Jr(function(a){var b=this.__gwt_instance.vb(a.__gwt_instance);return pr(b)});e.modInverse=Jr(function(a){var b=this.__gwt_instance.wb(a.__gwt_instance);return pr(b)});e.modPow=Jr(function(a,b){var c=this.__gwt_instance.xb(a.__gwt_instance,b.__gwt_instance);return pr(c)});e.multiply=Jr(function(a){var b=this.__gwt_instance.yb(a.__gwt_instance);return pr(b)});e.negate=Jr(function(){var a=this.__gwt_instance.cb();return pr(a)});e.nextProbablePrime=Jr(function(){var a=this.__gwt_instance.zb();return pr(a)});e.not=Jr(function(){var a=this.__gwt_instance.Ab();return pr(a)});e.or=Jr(function(a){var b=this.__gwt_instance.Bb(a.__gwt_instance);return pr(b)});e.pow=Jr(function(a){var b=this.__gwt_instance.db(a);return pr(b)});e.remainder=Jr(function(a){var b=this.__gwt_instance.Cb(a.__gwt_instance);return pr(b)});e.setBit=Jr(function(a){var b=this.__gwt_instance.Db(a);return pr(b)});e.shiftLeft=Jr(function(a){var b=this.__gwt_instance.eb(a);return pr(b)});e.shiftRight=Jr(function(a){var b=this.__gwt_instance.fb(a);return pr(b)});e.signum=jr(Number,Jr(function(){var a=this.__gwt_instance.r();return a}));e.subtract=Jr(function(a){var b=this.__gwt_instance.Eb(a.__gwt_instance);return pr(b)});e.testBit=jr(Number,Jr(function(a){var b=this.__gwt_instance.gb(a);return b}));e.toString_va=Jr(function(a){var b=this.__gwt_instance.Fb(a);return b});e.xor=Jr(function(a){var b=this.__gwt_instance.Gb(a.__gwt_instance);return pr(b)});e.divideAndRemainder=Jr(function(a){var b=this.__gwt_instance.ob(a.__gwt_instance);return qr(b)});e.longValue=jr(Number,Jr(function(){var a=this.__gwt_instance.sb();return a}));$wnd.bigdecimal.BigInteger.valueOf=Jr(function(a){var b=(Oh(),new Pi(Ki(te(a))));return pr(b)});$wnd.bigdecimal.BigInteger.ONE=Jr(function(){var a=(Oh(),new Pi(Jh));return pr(a)});$wnd.bigdecimal.BigInteger.TEN=Jr(function(){var a=(Oh(),new Pi(Lh));return pr(a)});$wnd.bigdecimal.BigInteger.ZERO=Jr(function(){var a=(Oh(),new Pi(Nh));return pr(a)});mr(Sc,$wnd.bigdecimal.BigInteger)} +function Dh(){nr(rs,Lr);if($wnd.bigdecimal.BigDecimal){var c=$wnd.bigdecimal.BigDecimal}$wnd.bigdecimal.BigDecimal=Jr(function(){if(arguments.length==1&&arguments[0]!=null&&arguments[0].gC()==Qc){this.__gwt_instance=arguments[0]}else if(arguments.length==0){this.__gwt_instance=new Jg;or(this.__gwt_instance,this)}});var d=$wnd.bigdecimal.BigDecimal.prototype=new Object;if(c){for(p in c){$wnd.bigdecimal.BigDecimal[p]=c[p]}}$wnd.bigdecimal.BigDecimal.ROUND_CEILING=2;$wnd.bigdecimal.BigDecimal.ROUND_DOWN=1;$wnd.bigdecimal.BigDecimal.ROUND_FLOOR=3;$wnd.bigdecimal.BigDecimal.ROUND_HALF_DOWN=5;$wnd.bigdecimal.BigDecimal.ROUND_HALF_EVEN=6;$wnd.bigdecimal.BigDecimal.ROUND_HALF_UP=4;$wnd.bigdecimal.BigDecimal.ROUND_UNNECESSARY=7;$wnd.bigdecimal.BigDecimal.ROUND_UP=0;$wnd.bigdecimal.BigDecimal.__init__=Jr(function(a){var b=Lg(a);return pr(b)});d.abs_va=Jr(function(a){var b=this.__gwt_instance.s(a);return pr(b)});d.add_va=Jr(function(a){var b=this.__gwt_instance.t(a);return pr(b)});d.byteValueExact=jr(Number,Jr(function(){var a=this.__gwt_instance.u();return a}));d.compareTo=jr(Number,Jr(function(a){var b=this.__gwt_instance.v(a.__gwt_instance);return b}));d.divide_va=Jr(function(a){var b=this.__gwt_instance.y(a);return pr(b)});d.divideToIntegralValue_va=Jr(function(a){var b=this.__gwt_instance.x(a);return pr(b)});d.doubleValue=jr(Number,Jr(function(){var a=this.__gwt_instance.z();return a}));d.equals=jr(Number,Jr(function(a){var b=this.__gwt_instance.eQ(a);return b}));d.floatValue=jr(Number,Jr(function(){var a=this.__gwt_instance.A();return a}));d.hashCode=jr(Number,Jr(function(){var a=this.__gwt_instance.hC();return a}));d.intValue=jr(Number,Jr(function(){var a=this.__gwt_instance.B();return a}));d.intValueExact=jr(Number,Jr(function(){var a=this.__gwt_instance.C();return a}));d.max=Jr(function(a){var b=this.__gwt_instance.F(a.__gwt_instance);return pr(b)});d.min=Jr(function(a){var b=this.__gwt_instance.G(a.__gwt_instance);return pr(b)});d.movePointLeft=Jr(function(a){var b=this.__gwt_instance.H(a);return pr(b)});d.movePointRight=Jr(function(a){var b=this.__gwt_instance.I(a);return pr(b)});d.multiply_va=Jr(function(a){var b=this.__gwt_instance.J(a);return pr(b)});d.negate_va=Jr(function(a){var b=this.__gwt_instance.K(a);return pr(b)});d.plus_va=Jr(function(a){var b=this.__gwt_instance.L(a);return pr(b)});d.pow_va=Jr(function(a){var b=this.__gwt_instance.M(a);return pr(b)});d.precision=jr(Number,Jr(function(){var a=this.__gwt_instance.q();return a}));d.remainder_va=Jr(function(a){var b=this.__gwt_instance.N(a);return pr(b)});d.round=Jr(function(a){var b=this.__gwt_instance.O(a.__gwt_instance);return pr(b)});d.scale=jr(Number,Jr(function(){var a=this.__gwt_instance.P();return a}));d.scaleByPowerOfTen=Jr(function(a){var b=this.__gwt_instance.Q(a);return pr(b)});d.setScale_va=Jr(function(a){var b=this.__gwt_instance.R(a);return pr(b)});d.shortValueExact=jr(Number,Jr(function(){var a=this.__gwt_instance.S();return a}));d.signum=jr(Number,Jr(function(){var a=this.__gwt_instance.r();return a}));d.stripTrailingZeros=Jr(function(){var a=this.__gwt_instance.T();return pr(a)});d.subtract_va=Jr(function(a){var b=this.__gwt_instance.U(a);return pr(b)});d.toBigInteger=Jr(function(){var a=this.__gwt_instance.V();return pr(a)});d.toBigIntegerExact=Jr(function(){var a=this.__gwt_instance.W();return pr(a)});d.toEngineeringString=Jr(function(){var a=this.__gwt_instance.X();return a});d.toPlainString=Jr(function(){var a=this.__gwt_instance.Y();return a});d.toString=Jr(function(){var a=this.__gwt_instance.tS();return a});d.ulp=Jr(function(){var a=this.__gwt_instance.Z();return pr(a)});d.unscaledValue=Jr(function(){var a=this.__gwt_instance.$();return pr(a)});d.divideAndRemainder_va=Jr(function(a){var b=this.__gwt_instance.w(a);return qr(b)});d.longValue=jr(Number,Jr(function(){var a=this.__gwt_instance.E();return a}));d.longValueExact=jr(Number,Jr(function(){var a=this.__gwt_instance.D();return a}));$wnd.bigdecimal.BigDecimal.valueOf_va=Jr(function(a){var b=zh(a);return pr(b)});$wnd.bigdecimal.BigDecimal.log=jr(Number,Jr(function(a){rf();typeof console!==Xr&&console.log&&console.log(a)}));$wnd.bigdecimal.BigDecimal.logObj=jr(Number,Jr(function(a){rf();typeof console!==Xr&&console.log&&typeof JSON!==Xr&&JSON.stringify&&console.log('object: '+JSON.stringify(a))}));$wnd.bigdecimal.BigDecimal.ONE=Jr(function(){var a=(rf(),new Kg(lf));return pr(a)});$wnd.bigdecimal.BigDecimal.TEN=Jr(function(){var a=(rf(),new Kg(mf));return pr(a)});$wnd.bigdecimal.BigDecimal.ZERO=Jr(function(){var a=(rf(),new Kg(of));return pr(a)});mr(Qc,$wnd.bigdecimal.BigDecimal)} +var Lr='',ys=' ',$r='"',Or='(',gs='+',Is=', ',Ur='-',ds='.',Tr='0',es='0.',zs='0.0',As='0.00',Bs='0.000',Cs='0.0000',Ds='0.00000',Es='0.000000',Gs='0E',Fs='0E+',Qr=':',Kr=': ',Js='=',ps='BigDecimal',qs='BigDecimal MathContext',Ts='BigDecimal;',is='BigInteger',ss='BigInteger divide by zero',vs='BigInteger not invertible.',us='BigInteger: modulus not positive',Us='BigInteger;',Vr='CSS1Compat',_r='Division by zero',as='Division impossible',fs='E',Zr='For input string: "',hs='Infinite or NaN',bs='Invalid Operation',os='MathContext',ts='Negative bit address',cs='Rounding necessary',xs='RoundingMode',Vs='RoundingMode;',Nr='String',Rr='[',Ss='[Lcom.iriscouch.gwtapp.client.',Os='[Ljava.lang.',Ws='[Ljava.math.',Ks='\\.',Ls='__gwtex_wrap',Pr='anonymous',js='array',Hs='bad string format',rs='bigdecimal',Ns='com.google.gwt.core.client.',Ps='com.google.gwt.core.client.impl.',Rs='com.iriscouch.gwtapp.client.',Ms='java.lang.',Qs='java.math.',Xs='java.util.',Yr='msie',Mr='null',ks='number',ls='number MathContext',ns='number number',ws='object',Wr='opera',Ys='org.timepedia.exporter.client.',Sr='safari',ms='string',Xr='undefined';var _,Gr={l:0,m:0,h:524288},zr={l:0,m:4193280,h:1048575},Er={l:4194298,m:4194303,h:1048575},wr={l:4194303,m:4194303,h:1048575},ur={l:0,m:0,h:0},sr={l:1,m:0,h:0},vr={l:2,m:0,h:0},Hr={l:5,m:0,h:0},tr={l:10,m:0,h:0},xr={l:11,m:0,h:0},Dr={l:18,m:0,h:0},Cr={l:48,m:0,h:0},Br={l:877824,m:119,h:0},Ar={l:1755648,m:238,h:0},Ir={l:4194303,m:511,h:0},yr={l:4194303,m:1023,h:0},Fr={l:0,m:1024,h:0};_=H.prototype={};_.eQ=function I(a){return this===a};_.gC=function J(){return gd};_.hC=function K(){return ob(this)};_.tS=function L(){return this.gC().d+'@'+al(this.hC())};_.toString=function(){return this.tS()};_.tM=rr;_.cM={};_=P.prototype=new H;_.gC=function R(){return nd};_.j=function S(){return this.f};_.tS=function T(){var a,b;a=this.gC().d;b=this.j();return b!=null?a+Kr+b:a};_.cM={6:1,15:1};_.f=null;_=O.prototype=new P;_.gC=function U(){return ad};_.cM={6:1,15:1};_=V.prototype=N.prototype=new O;_.gC=function W(){return hd};_.cM={6:1,12:1,15:1};_=X.prototype=M.prototype=new N;_.gC=function Y(){return Fc};_.j=function ab(){this.d==null&&(this.e=bb(this.c),this.b=Z(this.c),this.d=Or+this.e+'): '+this.b+db(this.c),undefined);return this.d};_.cM={6:1,12:1,15:1};_.b=null;_.c=null;_.d=null;_.e=null;_=gb.prototype=new H;_.gC=function hb(){return Hc};var ib=0,jb=0;_=ub.prototype=pb.prototype=new gb;_.gC=function vb(){return Ic};_.b=null;_.c=null;var qb;_=Fb.prototype=Ab.prototype=new H;_.k=function Gb(){var a={};var b=[];var c=arguments.callee.caller.caller;while(c){var d=this.n(c.toString());b.push(d);var e=Qr+d;var f=a[e];if(f){var g,i;for(g=0,i=f.length;g0?c:Pr};_.gC=function Wb(){return Jc};_.o=function Xb(a){return Sb(this,a)};_.p=function Yb(){return 3};_=Zb.prototype=new H;_.gC=function $b(){return Nc};_=fc.prototype=_b.prototype=new Zb;_.gC=function gc(){return Mc};_.b=Lr;_=ic.prototype=hc.prototype=new H;_.gC=function kc(){return this.aC};_.aC=null;_.qI=0;var oc,pc;var ae=null;var oe=null;var Me,Ne,Oe,Pe;_=Se.prototype=Re.prototype=new H;_.gC=function Te(){return Oc};_.cM={2:1};_=Ze.prototype=new H;_.gC=function cf(){return fd};_.cM={6:1,10:1};var $e=null;_=qg.prototype=pg.prototype=og.prototype=ng.prototype=mg.prototype=lg.prototype=kg.prototype=jg.prototype=ig.prototype=hg.prototype=gg.prototype=fg.prototype=eg.prototype=dg.prototype=cg.prototype=Ye.prototype=new Ze;_.eQ=function wg(a){return Ff(this,a)};_.gC=function xg(){return pd};_.hC=function yg(){return Gf(this)};_.q=function Ag(){return Pf(this)};_.r=function Cg(){return Uf(this)};_.tS=function Eg(){return ag(this)};_.cM={6:1,8:1,10:1,16:1};_.b=0;_.c=0;_.d=null;_.e=0;_.f=0;_.g=0;_.i=null;var df,ef,ff,gf,hf,jf,kf=null,lf,mf,nf=null,of,pf,qf=null;_=Kg.prototype=Jg.prototype=Xe.prototype=new Ye;_.s=function Mg(a){var b,c,d;d=Lj(a);if(d==Lr)b=Uf(this)<0?Mf(this):this;else if(d==os)b=sf(Qf(this,new Yn(a[0].toString())));else throw new V('Unknown call signature for interim = super.abs: '+d);c=new Kg(b);return c};_.t=function Ng(a){var b,c,d;d=Lj(a);if(d==ps)b=tf(this,new mg(a[0].toString()));else if(d==qs)b=uf(this,new mg(a[0].toString()),new Yn(a[1].toString()));else throw new V('Unknown call signature for interim = super.add: '+d);c=new Kg(b);return c};_.u=function Og(){return ~~(Je(bg(this,8))<<24)>>24};_.v=function Pg(a){return vf(this,a)};_.w=function Qg(a){var b,c,d,e;e=Lj(a);if(e==ps)c=Bf(this,new mg(a[0].toString()));else if(e==qs)c=Cf(this,new mg(a[0].toString()),new Yn(a[1].toString()));else throw new V('Unknown call signature for interim = super.divideAndRemainder: '+e);d=lc(Qd,{6:1},3,c.length,0);for(b=0;b129?(a*=Infinity):(a=_e(ag(this))),a};_.gC=function Wg(){return Qc};_.hC=function Xg(){return Gf(this)};_.B=function Yg(){return this.f<=-32||this.f>(this.e>0?this.e:el((this.b-1)*0.3010299956639812)+1)?0:Mi(new Pi(this.f==0||this.b==0&&this.g!=-1?(!this.d&&(this.d=Li(this.g)),this.d):this.f<0?ei((!this.d&&(this.d=Li(this.g)),this.d),po(-this.f)):Th((!this.d&&(this.d=Li(this.g)),this.d),po(this.f))))};_.C=function Zg(){return Je(bg(this,32))};_.D=function $g(){return Je(bg(this,32))};_.E=function _g(){return _e(ag(this))};_.F=function ah(a){return new Kg(vf(this,a)>=0?this:a)};_.G=function bh(a){return new Kg(vf(this,a)<=0?this:a)};_.H=function ch(a){return new Kg(Jf(this,this.f+a))};_.I=function dh(a){return new Kg(Jf(this,this.f-a))};_.J=function eh(a){var b,c,d;d=Lj(a);if(d==ps)b=Kf(this,new mg(a[0].toString()));else if(d==qs)b=Lf(this,new mg(a[0].toString()),new Yn(a[1].toString()));else throw new V('Unknown call signature for interim = super.multiply: '+d);c=new Kg(b);return c};_.K=function fh(a){var b,c,d;d=Lj(a);if(d==Lr)b=Mf(this);else if(d==os)b=Mf(Qf(this,new Yn(a[0].toString())));else throw new V('Unknown call signature for interim = super.negate: '+d);c=new Kg(b);return c};_.L=function gh(a){var b,c,d;d=Lj(a);if(d==Lr)b=this;else if(d==os)b=Qf(this,new Yn(a[0].toString()));else throw new V('Unknown call signature for interim = super.plus: '+d);c=new Kg(b);return c};_.M=function hh(a){var b,c,d;d=Lj(a);if(d==ks)b=Nf(this,a[0]);else if(d==ls)b=Of(this,a[0],new Yn(a[1].toString()));else throw new V('Unknown call signature for interim = super.pow: '+d);c=new Kg(b);return c};_.q=function ih(){return Pf(this)};_.N=function jh(a){var b,c,d;d=Lj(a);if(d==ps)b=Bf(this,new mg(a[0].toString()))[1];else if(d==qs)b=Cf(this,new mg(a[0].toString()),new Yn(a[1].toString()))[1];else throw new V('Unknown call signature for interim = super.remainder: '+d);c=new Kg(b);return c};_.O=function kh(a){return new Kg(Qf(this,new Yn(Wn(a.b))))};_.P=function lh(){return Bc(this.f)};_.Q=function mh(a){return new Kg(Rf(this,a))};_.R=function nh(a){var b,c,d;d=Lj(a);if(d==ks)b=Sf(this,a[0],(Qo(),Go));else if(d==ns)b=Sf(this,a[0],Uo(a[1]));else if(d=='number RoundingMode')b=Sf(this,a[0],To(a[1].toString()));else throw new V('Unknown call signature for interim = super.setScale: '+d);c=new Kg(b);return c};_.S=function oh(){return ~~(Je(bg(this,16))<<16)>>16};_.r=function ph(){return Uf(this)};_.T=function qh(){return new Kg(Wf(this))};_.U=function rh(a){var b,c,d;d=Lj(a);if(d==ps)b=Xf(this,new mg(a[0].toString()));else if(d==qs)b=Yf(this,new mg(a[0].toString()),new Yn(a[1].toString()));else throw new V('Unknown call signature for interim = super.subtract: '+d);c=new Kg(b);return c};_.V=function sh(){return new Pi(this.f==0||this.b==0&&this.g!=-1?(!this.d&&(this.d=Li(this.g)),this.d):this.f<0?ei((!this.d&&(this.d=Li(this.g)),this.d),po(-this.f)):Th((!this.d&&(this.d=Li(this.g)),this.d),po(this.f)))};_.W=function th(){return new Pi(Zf(this))};_.X=function uh(){return $f(this)};_.Y=function vh(){return _f(this)};_.tS=function wh(){return ag(this)};_.Z=function xh(){return new Kg(new pg(1,this.f))};_.$=function yh(){return new Pi((!this.d&&(this.d=Li(this.g)),this.d))};_.cM={3:1,6:1,8:1,10:1,16:1,24:1};_=Eh.prototype=Ah.prototype=new H;_.gC=function Fh(){return Pc};var Bh=false;_=ui.prototype=ti.prototype=si.prototype=ri.prototype=qi.prototype=pi.prototype=oi.prototype=ni.prototype=Hh.prototype=new Ze;_._=function vi(){return this.f<0?new si(1,this.e,this.b):this};_.ab=function wi(){return sm(this)};_.eQ=function xi(a){return Vh(this,a)};_.gC=function yi(){return qd};_.bb=function zi(){return $h(this)};_.hC=function Bi(){return _h(this)};_.cb=function Ci(){return this.f==0?this:new si(-this.f,this.e,this.b)};_.db=function Di(a){return gi(this,a)};_.eb=function Fi(a){return ji(this,a)};_.fb=function Gi(a){return li(this,a)};_.r=function Hi(){return this.f};_.gb=function Ii(a){return mi(this,a)};_.tS=function Ji(){return Hm(this,0)};_.cM={6:1,8:1,10:1,17:1};_.b=null;_.c=-2;_.d=0;_.e=0;_.f=0;var Ih,Jh,Kh,Lh,Mh=null,Nh;_=Pi.prototype=Oi.prototype=Ni.prototype=Gh.prototype=new Hh;_._=function Ri(){return new Pi(this.f<0?new si(1,this.e,this.b):this)};_.hb=function Si(a){return new Pi(fn(this,a))};_.ib=function Ti(a){return new Pi(vn(this,a))};_.jb=function Ui(a){return new Pi(yn(this,a))};_.kb=function Vi(){return rm(this)};_.ab=function Wi(){return sm(this)};_.lb=function Xi(a){return new Pi(Ph(this,a))};_.mb=function Yi(a){return Qh(this,a)};_.nb=function Zi(a){return new Pi(Th(this,a))};_.ob=function $i(a){var b,c,d;c=Uh(this,a);d=lc(Rd,{6:1},4,c.length,0);for(b=0;b=0?Qr+this.c:Lr)+')'};_.cM={6:1,13:1};_.b=null;_.c=0;_.d=null;_=String.prototype;_.eQ=function Hl(a){return wl(this,a)};_.gC=function Il(){return md};_.hC=function Jl(){return Rl(this)};_.tS=function Kl(){return this};_.cM={1:1,6:1,7:1,8:1};var Ml,Nl=0,Ol;_=Ul.prototype=Tl.prototype=new H;_.gC=function Vl(){return jd};_.tS=function Wl(){return this.b.b};_.cM={7:1};_=hm.prototype=gm.prototype=fm.prototype=Xl.prototype=new H;_.gC=function im(){return kd};_.tS=function jm(){return this.b.b};_.cM={7:1};_=lm.prototype=km.prototype=new Uk;_.gC=function mm(){return ld};_.cM={6:1,12:1,14:1,15:1};_=pm.prototype=om.prototype=new N;_.gC=function qm(){return od};_.cM={6:1,12:1,15:1};var Cm,Dm;_=Yn.prototype=Xn.prototype=Nn.prototype=new H;_.eQ=function Zn(a){return xc(a,18)&&vc(a,18).b==this.b&&vc(a,18).c==this.c};_.gC=function $n(){return rd};_.hC=function _n(){return Vn(this)};_.tS=function ao(){return Wn(this)};_.cM={6:1,18:1};_.b=0;_.c=null;var On,Pn,Qn,Rn,Sn,Tn;var bo,co,eo,fo;var ro,so,to;_=Ro.prototype=yo.prototype=new Ik;_.gC=function So(){return sd};_.cM={6:1,8:1,9:1,19:1};var zo,Ao,Bo,Co,Do,Eo,Fo,Go,Ho,Io,Jo,Ko,Lo,Mo,No,Oo,Po;var Xo;_=Zo.prototype=new H;_.Kb=function _o(a){throw new pm};_.Lb=function ap(a){var b;b=$o(this.Mb(),a);return !!b};_.gC=function bp(){return td};_.tS=function cp(){var a,b,c,d;c=new Ul;a=null;c.b.b+=Rr;b=this.Mb();while(b.Pb()){a!=null?(cc(c.b,a),c):(a=Is);d=b.Qb();cc(c.b,d===this?'(this Collection)':Lr+d)}c.b.b+=']';return c.b.b};_=ep.prototype=new H;_.eQ=function fp(a){var b,c,d,e,f;if(a===this){return true}if(!xc(a,21)){return false}e=vc(a,21);if(this.e!=e.e){return false}for(c=new Ip((new Cp(e)).b);kq(c.b);){b=vc(lq(c.b),22);d=b.Rb();f=b.Sb();if(!(d==null?this.d:xc(d,1)?Qr+vc(d,1) in this.f:pp(this,d,~~fb(d)))){return false}if(!Xq(f,d==null?this.c:xc(d,1)?op(this,vc(d,1)):np(this,d,~~fb(d)))){return false}}return true};_.gC=function gp(){return Cd};_.hC=function hp(){var a,b,c;c=0;for(b=new Ip((new Cp(this)).b);kq(b.b);){a=vc(lq(b.b),22);c+=a.hC();c=~~c}return c};_.tS=function ip(){var a,b,c,d;d='{';a=false;for(c=new Ip((new Cp(this)).b);kq(c.b);){b=vc(lq(c.b),22);a?(d+=Is):(a=true);d+=Lr+b.Rb();d+=Js;d+=Lr+b.Sb()}return d+'}'};_.cM={21:1};_=dp.prototype=new ep;_.Ob=function vp(a,b){return Ac(a)===Ac(b)||a!=null&&eb(a,b)};_.gC=function wp(){return yd};_.cM={21:1};_.b=null;_.c=null;_.d=false;_.e=0;_.f=null;_=yp.prototype=new Zo;_.eQ=function zp(a){var b,c,d;if(a===this){return true}if(!xc(a,23)){return false}c=vc(a,23);if(c.b.e!=this.Nb()){return false}for(b=new Ip(c.b);kq(b.b);){d=vc(lq(b.b),22);if(!this.Lb(d)){return false}}return true};_.gC=function Ap(){return Dd};_.hC=function Bp(){var a,b,c;a=0;for(b=this.Mb();b.Pb();){c=b.Qb();if(c!=null){a+=fb(c);a=~~a}}return a};_.cM={23:1};_=Cp.prototype=xp.prototype=new yp;_.Lb=function Dp(a){var b,c,d;if(xc(a,22)){b=vc(a,22);c=b.Rb();if(lp(this.b,c)){d=mp(this.b,c);return Eq(b.Sb(),d)}}return false};_.gC=function Ep(){return vd};_.Mb=function Fp(){return new Ip(this.b)};_.Nb=function Gp(){return this.b.e};_.cM={23:1};_.b=null;_=Ip.prototype=Hp.prototype=new H;_.gC=function Jp(){return ud};_.Pb=function Kp(){return kq(this.b)};_.Qb=function Lp(){return vc(lq(this.b),22)};_.b=null;_=Np.prototype=new H;_.eQ=function Op(a){var b;if(xc(a,22)){b=vc(a,22);if(Xq(this.Rb(),b.Rb())&&Xq(this.Sb(),b.Sb())){return true}}return false};_.gC=function Pp(){return Bd};_.hC=function Qp(){var a,b;a=0;b=0;this.Rb()!=null&&(a=fb(this.Rb()));this.Sb()!=null&&(b=fb(this.Sb()));return a^b};_.tS=function Rp(){return this.Rb()+Js+this.Sb()};_.cM={22:1};_=Sp.prototype=Mp.prototype=new Np;_.gC=function Tp(){return wd};_.Rb=function Up(){return null};_.Sb=function Vp(){return this.b.c};_.Tb=function Wp(a){return tp(this.b,a)};_.cM={22:1};_.b=null;_=Yp.prototype=Xp.prototype=new Np;_.gC=function Zp(){return xd};_.Rb=function $p(){return this.b};_.Sb=function _p(){return op(this.c,this.b)};_.Tb=function aq(a){return up(this.c,this.b,a)};_.cM={22:1};_.b=null;_.c=null;_=bq.prototype=new Zo;_.Kb=function cq(a){sq(this,this.Nb(),a);return true};_.eQ=function eq(a){var b,c,d,e,f;if(a===this){return true}if(!xc(a,20)){return false}f=vc(a,20);if(this.Nb()!=f.c){return false}d=new mq(this);e=new mq(f);while(d.bMathContext immutable class encapsulates the + * settings understood by the operator methods of the {@link BigDecimal} + * class (and potentially other classes). Operator methods are those + * that effect an operation on a number or a pair of numbers. + *

    + * The settings, which are not base-dependent, comprise: + *

      + *
    1. digits: + * the number of digits (precision) to be used for an operation + *
    2. form: + * the form of any exponent that results from the operation + *
    3. lostDigits: + * whether checking for lost digits is enabled + *
    4. roundingMode: + * the algorithm to be used for rounding. + *
    + *

    + * When provided, a MathContext object supplies the + * settings for an operation directly. + *

    + * When MathContext.DEFAULT is provided for a + * MathContext parameter then the default settings are used + * (9, SCIENTIFIC, false, ROUND_HALF_UP). + *

    + * In the BigDecimal class, all methods which accept a + * MathContext object defaults) also have a version of the + * method which does not accept a MathContext parameter. These versions + * carry out unlimited precision fixed point arithmetic (as though the + * settings were (0, PLAIN, false, ROUND_HALF_UP). + *

    + * The instance variables are shared with default access (so they are + * directly accessible to the BigDecimal class), but must + * never be changed. + *

    + * The rounding mode constants have the same names and values as the + * constants of the same name in java.math.BigDecimal, to + * maintain compatibility with earlier versions of + * BigDecimal. + * + * @see BigDecimal + * @author Mike Cowlishaw + * @stable ICU 2.0 + */ + +//--public final class MathContext implements java.io.Serializable{ + //--private static final java.lang.String $0="MathContext.nrx"; + + //-- methods + MathContext.prototype.getDigits = getDigits; + MathContext.prototype.getForm = getForm; + MathContext.prototype.getLostDigits = getLostDigits; + MathContext.prototype.getRoundingMode = getRoundingMode; + MathContext.prototype.toString = toString; + MathContext.prototype.isValidRound = isValidRound; + + + /* ----- Properties ----- */ + /* properties public constant */ + /** + * Plain (fixed point) notation, without any exponent. + * Used as a setting to control the form of the result of a + * BigDecimal operation. + * A zero result in plain form may have a decimal part of one or + * more zeros. + * + * @see #ENGINEERING + * @see #SCIENTIFIC + * @stable ICU 2.0 + */ + //--public static final int PLAIN=0; // [no exponent] + MathContext.PLAIN = MathContext.prototype.PLAIN = 0; // [no exponent] + + /** + * Standard floating point notation (with scientific exponential + * format, where there is one digit before any decimal point). + * Used as a setting to control the form of the result of a + * BigDecimal operation. + * A zero result in plain form may have a decimal part of one or + * more zeros. + * + * @see #ENGINEERING + * @see #PLAIN + * @stable ICU 2.0 + */ + //--public static final int SCIENTIFIC=1; // 1 digit before . + MathContext.SCIENTIFIC = MathContext.prototype.SCIENTIFIC = 1; // 1 digit before . + + /** + * Standard floating point notation (with engineering exponential + * format, where the power of ten is a multiple of 3). + * Used as a setting to control the form of the result of a + * BigDecimal operation. + * A zero result in plain form may have a decimal part of one or + * more zeros. + * + * @see #PLAIN + * @see #SCIENTIFIC + * @stable ICU 2.0 + */ + //--public static final int ENGINEERING=2; // 1-3 digits before . + MathContext.ENGINEERING = MathContext.prototype.ENGINEERING = 2; // 1-3 digits before . + + // The rounding modes match the original BigDecimal class values + /** + * Rounding mode to round to a more positive number. + * Used as a setting to control the rounding mode used during a + * BigDecimal operation. + *

    + * If any of the discarded digits are non-zero then the result + * should be rounded towards the next more positive digit. + * @stable ICU 2.0 + */ + //--public static final int ROUND_CEILING=2; + MathContext.ROUND_CEILING = MathContext.prototype.ROUND_CEILING = 2; + + /** + * Rounding mode to round towards zero. + * Used as a setting to control the rounding mode used during a + * BigDecimal operation. + *

    + * All discarded digits are ignored (truncated). The result is + * neither incremented nor decremented. + * @stable ICU 2.0 + */ + //--public static final int ROUND_DOWN=1; + MathContext.ROUND_DOWN = MathContext.prototype.ROUND_DOWN = 1; + + /** + * Rounding mode to round to a more negative number. + * Used as a setting to control the rounding mode used during a + * BigDecimal operation. + *

    + * If any of the discarded digits are non-zero then the result + * should be rounded towards the next more negative digit. + * @stable ICU 2.0 + */ + //--public static final int ROUND_FLOOR=3; + MathContext.ROUND_FLOOR = MathContext.prototype.ROUND_FLOOR = 3; + + /** + * Rounding mode to round to nearest neighbor, where an equidistant + * value is rounded down. + * Used as a setting to control the rounding mode used during a + * BigDecimal operation. + *

    + * If the discarded digits represent greater than half (0.5 times) + * the value of a one in the next position then the result should be + * rounded up (away from zero). Otherwise the discarded digits are + * ignored. + * @stable ICU 2.0 + */ + //--public static final int ROUND_HALF_DOWN=5; + MathContext.ROUND_HALF_DOWN = MathContext.prototype.ROUND_HALF_DOWN = 5; + + /** + * Rounding mode to round to nearest neighbor, where an equidistant + * value is rounded to the nearest even neighbor. + * Used as a setting to control the rounding mode used during a + * BigDecimal operation. + *

    + * If the discarded digits represent greater than half (0.5 times) + * the value of a one in the next position then the result should be + * rounded up (away from zero). If they represent less than half, + * then the result should be rounded down. + *

    + * Otherwise (they represent exactly half) the result is rounded + * down if its rightmost digit is even, or rounded up if its + * rightmost digit is odd (to make an even digit). + * @stable ICU 2.0 + */ + //--public static final int ROUND_HALF_EVEN=6; + MathContext.ROUND_HALF_EVEN = MathContext.prototype.ROUND_HALF_EVEN = 6; + + /** + * Rounding mode to round to nearest neighbor, where an equidistant + * value is rounded up. + * Used as a setting to control the rounding mode used during a + * BigDecimal operation. + *

    + * If the discarded digits represent greater than or equal to half + * (0.5 times) the value of a one in the next position then the result + * should be rounded up (away from zero). Otherwise the discarded + * digits are ignored. + * @stable ICU 2.0 + */ + //--public static final int ROUND_HALF_UP=4; + MathContext.ROUND_HALF_UP = MathContext.prototype.ROUND_HALF_UP = 4; + + /** + * Rounding mode to assert that no rounding is necessary. + * Used as a setting to control the rounding mode used during a + * BigDecimal operation. + *

    + * Rounding (potential loss of information) is not permitted. + * If any of the discarded digits are non-zero then an + * ArithmeticException should be thrown. + * @stable ICU 2.0 + */ + //--public static final int ROUND_UNNECESSARY=7; + MathContext.ROUND_UNNECESSARY = MathContext.prototype.ROUND_UNNECESSARY = 7; + + /** + * Rounding mode to round away from zero. + * Used as a setting to control the rounding mode used during a + * BigDecimal operation. + *

    + * If any of the discarded digits are non-zero then the result will + * be rounded up (away from zero). + * @stable ICU 2.0 + */ + //--public static final int ROUND_UP=0; + MathContext.ROUND_UP = MathContext.prototype.ROUND_UP = 0; + + + /* properties shared */ + /** + * The number of digits (precision) to be used for an operation. + * A value of 0 indicates that unlimited precision (as many digits + * as are required) will be used. + *

    + * The {@link BigDecimal} operator methods use this value to + * determine the precision of results. + * Note that leading zeros (in the integer part of a number) are + * never significant. + *

    + * digits will always be non-negative. + * + * @serial + */ + //--int digits; + + /** + * The form of results from an operation. + *

    + * The {@link BigDecimal} operator methods use this value to + * determine the form of results, in particular whether and how + * exponential notation should be used. + * + * @see #ENGINEERING + * @see #PLAIN + * @see #SCIENTIFIC + * @serial + */ + //--int form; // values for this must fit in a byte + + /** + * Controls whether lost digits checking is enabled for an + * operation. + * Set to true to enable checking, or + * to false to disable checking. + *

    + * When enabled, the {@link BigDecimal} operator methods check + * the precision of their operand or operands, and throw an + * ArithmeticException if an operand is more precise + * than the digits setting (that is, digits would be lost). + * When disabled, operands are rounded to the specified digits. + * + * @serial + */ + //--boolean lostDigits; + + /** + * The rounding algorithm to be used for an operation. + *

    + * The {@link BigDecimal} operator methods use this value to + * determine the algorithm to be used when non-zero digits have to + * be discarded in order to reduce the precision of a result. + * The value must be one of the public constants whose name starts + * with ROUND_. + * + * @see #ROUND_CEILING + * @see #ROUND_DOWN + * @see #ROUND_FLOOR + * @see #ROUND_HALF_DOWN + * @see #ROUND_HALF_EVEN + * @see #ROUND_HALF_UP + * @see #ROUND_UNNECESSARY + * @see #ROUND_UP + * @serial + */ + //--int roundingMode; + + /* properties private constant */ + // default settings + //--private static final int DEFAULT_FORM=SCIENTIFIC; + //--private static final int DEFAULT_DIGITS=9; + //--private static final boolean DEFAULT_LOSTDIGITS=false; + //--private static final int DEFAULT_ROUNDINGMODE=ROUND_HALF_UP; + MathContext.prototype.DEFAULT_FORM=MathContext.prototype.SCIENTIFIC; + MathContext.prototype.DEFAULT_DIGITS=9; + MathContext.prototype.DEFAULT_LOSTDIGITS=false; + MathContext.prototype.DEFAULT_ROUNDINGMODE=MathContext.prototype.ROUND_HALF_UP; + + /* properties private constant */ + + //--private static final int MIN_DIGITS=0; // smallest value for DIGITS. + //--private static final int MAX_DIGITS=999999999; // largest value for DIGITS. If increased, + MathContext.prototype.MIN_DIGITS=0; // smallest value for DIGITS. + MathContext.prototype.MAX_DIGITS=999999999; // largest value for DIGITS. If increased, + // the BigDecimal class may need update. + // list of valid rounding mode values, most common two first + //--private static final int ROUNDS[]=new int[]{ROUND_HALF_UP,ROUND_UNNECESSARY,ROUND_CEILING,ROUND_DOWN,ROUND_FLOOR,ROUND_HALF_DOWN,ROUND_HALF_EVEN,ROUND_UP}; + MathContext.prototype.ROUNDS=new Array(MathContext.prototype.ROUND_HALF_UP,MathContext.prototype.ROUND_UNNECESSARY,MathContext.prototype.ROUND_CEILING,MathContext.prototype.ROUND_DOWN,MathContext.prototype.ROUND_FLOOR,MathContext.prototype.ROUND_HALF_DOWN,MathContext.prototype.ROUND_HALF_EVEN,MathContext.prototype.ROUND_UP); + + + //--private static final java.lang.String ROUNDWORDS[]=new java.lang.String[]{"ROUND_HALF_UP","ROUND_UNNECESSARY","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_UP"}; // matching names of the ROUNDS values + MathContext.prototype.ROUNDWORDS=new Array("ROUND_HALF_UP","ROUND_UNNECESSARY","ROUND_CEILING","ROUND_DOWN","ROUND_FLOOR","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_UP"); // matching names of the ROUNDS values + + + + + /* properties private constant unused */ + + // Serialization version + //--private static final long serialVersionUID=7163376998892515376L; + + /* properties public constant */ + /** + * A MathContext object initialized to the default + * settings for general-purpose arithmetic. That is, + * digits=9 form=SCIENTIFIC lostDigits=false + * roundingMode=ROUND_HALF_UP. + * + * @see #SCIENTIFIC + * @see #ROUND_HALF_UP + * @stable ICU 2.0 + */ + //--public static final com.ibm.icu.math.MathContext DEFAULT=new com.ibm.icu.math.MathContext(DEFAULT_DIGITS,DEFAULT_FORM,DEFAULT_LOSTDIGITS,DEFAULT_ROUNDINGMODE); + MathContext.prototype.DEFAULT=new MathContext(MathContext.prototype.DEFAULT_DIGITS,MathContext.prototype.DEFAULT_FORM,MathContext.prototype.DEFAULT_LOSTDIGITS,MathContext.prototype.DEFAULT_ROUNDINGMODE); + + + + + /* ----- Constructors ----- */ + + /** + * Constructs a new MathContext with a specified + * precision. + * The other settings are set to the default values + * (see {@link #DEFAULT}). + * + * An IllegalArgumentException is thrown if the + * setdigits parameter is out of range + * (<0 or >999999999). + * + * @param setdigits The int digits setting + * for this MathContext. + * @throws IllegalArgumentException parameter out of range. + * @stable ICU 2.0 + */ + + //--public MathContext(int setdigits){ + //-- this(setdigits,DEFAULT_FORM,DEFAULT_LOSTDIGITS,DEFAULT_ROUNDINGMODE); + //-- return;} + + + /** + * Constructs a new MathContext with a specified + * precision and form. + * The other settings are set to the default values + * (see {@link #DEFAULT}). + * + * An IllegalArgumentException is thrown if the + * setdigits parameter is out of range + * (<0 or >999999999), or if the value given for the + * setform parameter is not one of the appropriate + * constants. + * + * @param setdigits The int digits setting + * for this MathContext. + * @param setform The int form setting + * for this MathContext. + * @throws IllegalArgumentException parameter out of range. + * @stable ICU 2.0 + */ + + //--public MathContext(int setdigits,int setform){ + //-- this(setdigits,setform,DEFAULT_LOSTDIGITS,DEFAULT_ROUNDINGMODE); + //-- return;} + + /** + * Constructs a new MathContext with a specified + * precision, form, and lostDigits setting. + * The roundingMode setting is set to its default value + * (see {@link #DEFAULT}). + * + * An IllegalArgumentException is thrown if the + * setdigits parameter is out of range + * (<0 or >999999999), or if the value given for the + * setform parameter is not one of the appropriate + * constants. + * + * @param setdigits The int digits setting + * for this MathContext. + * @param setform The int form setting + * for this MathContext. + * @param setlostdigits The boolean lostDigits + * setting for this MathContext. + * @throws IllegalArgumentException parameter out of range. + * @stable ICU 2.0 + */ + + //--public MathContext(int setdigits,int setform,boolean setlostdigits){ + //-- this(setdigits,setform,setlostdigits,DEFAULT_ROUNDINGMODE); + //-- return;} + + /** + * Constructs a new MathContext with a specified + * precision, form, lostDigits, and roundingMode setting. + * + * An IllegalArgumentException is thrown if the + * setdigits parameter is out of range + * (<0 or >999999999), or if the value given for the + * setform or setroundingmode parameters is + * not one of the appropriate constants. + * + * @param setdigits The int digits setting + * for this MathContext. + * @param setform The int form setting + * for this MathContext. + * @param setlostdigits The boolean lostDigits + * setting for this MathContext. + * @param setroundingmode The int roundingMode setting + * for this MathContext. + * @throws IllegalArgumentException parameter out of range. + * @stable ICU 2.0 + */ + + //--public MathContext(int setdigits,int setform,boolean setlostdigits,int setroundingmode){super(); + function MathContext() { + //-- members + this.digits = 0; + this.form = 0; // values for this must fit in a byte + this.lostDigits = false; + this.roundingMode = 0; + + //-- overloaded ctor + var setform = this.DEFAULT_FORM; + var setlostdigits = this.DEFAULT_LOSTDIGITS; + var setroundingmode = this.DEFAULT_ROUNDINGMODE; + if (MathContext.arguments.length == 4) + { + setform = MathContext.arguments[1]; + setlostdigits = MathContext.arguments[2]; + setroundingmode = MathContext.arguments[3]; + } + else if (MathContext.arguments.length == 3) + { + setform = MathContext.arguments[1]; + setlostdigits = MathContext.arguments[2]; + } + else if (MathContext.arguments.length == 2) + { + setform = MathContext.arguments[1]; + } + else if (MathContext.arguments.length != 1) + { + throw "MathContext(): " + MathContext.arguments.length + " arguments given; expected 1 to 4"; + } + var setdigits = MathContext.arguments[0]; + + + // set values, after checking + if (setdigits!=this.DEFAULT_DIGITS) + { + if (setdigitsthis.MAX_DIGITS) + throw "MathContext(): Digits too large: "+setdigits; + } + {/*select*/ + if (setform==this.SCIENTIFIC) + {} // [most common] + else if (setform==this.ENGINEERING) + {} + else if (setform==this.PLAIN) + {} + else{ + throw "MathContext() Bad form value: "+setform; + } + } + if ((!(this.isValidRound(setroundingmode)))) + throw "MathContext(): Bad roundingMode value: "+setroundingmode; + this.digits=setdigits; + this.form=setform; + this.lostDigits=setlostdigits; // [no bad value possible] + this.roundingMode=setroundingmode; + return;} + + /** + * Returns the digits setting. + * This value is always non-negative. + * + * @return an int which is the value of the digits + * setting + * @stable ICU 2.0 + */ + + //--public int getDigits(){ + function getDigits() { + return this.digits; + } + + /** + * Returns the form setting. + * This will be one of + * {@link #ENGINEERING}, + * {@link #PLAIN}, or + * {@link #SCIENTIFIC}. + * + * @return an int which is the value of the form setting + * @stable ICU 2.0 + */ + + //--public int getForm(){ + function getForm() { + return this.form; + } + + /** + * Returns the lostDigits setting. + * This will be either true (enabled) or + * false (disabled). + * + * @return a boolean which is the value of the lostDigits + * setting + * @stable ICU 2.0 + */ + + //--public boolean getLostDigits(){ + function getLostDigits() { + return this.lostDigits; + } + + /** + * Returns the roundingMode setting. + * This will be one of + * {@link #ROUND_CEILING}, + * {@link #ROUND_DOWN}, + * {@link #ROUND_FLOOR}, + * {@link #ROUND_HALF_DOWN}, + * {@link #ROUND_HALF_EVEN}, + * {@link #ROUND_HALF_UP}, + * {@link #ROUND_UNNECESSARY}, or + * {@link #ROUND_UP}. + * + * @return an int which is the value of the roundingMode + * setting + * @stable ICU 2.0 + */ + + //--public int getRoundingMode(){ + function getRoundingMode() { + return this.roundingMode; + } + + /** Returns the MathContext as a readable string. + * The String returned represents the settings of the + * MathContext object as four blank-delimited words + * separated by a single blank and with no leading or trailing blanks, + * as follows: + *

      + *
    1. + * digits=, immediately followed by + * the value of the digits setting as a numeric word. + *
    2. + * form=, immediately followed by + * the value of the form setting as an uppercase word + * (one of SCIENTIFIC, PLAIN, or + * ENGINEERING). + *
    3. + * lostDigits=, immediately followed by + * the value of the lostDigits setting + * (1 if enabled, 0 if disabled). + *
    4. + * roundingMode=, immediately followed by + * the value of the roundingMode setting as a word. + * This word will be the same as the name of the corresponding public + * constant. + *
    + *

    + * For example: + *
    + * digits=9 form=SCIENTIFIC lostDigits=0 roundingMode=ROUND_HALF_UP + * + *

    + * Additional words may be appended to the result of + * toString in the future if more properties are added + * to the class. + * + * @return a String representing the context settings. + * @stable ICU 2.0 + */ + + //--public java.lang.String toString(){ + function toString() { + //--java.lang.String formstr=null; + var formstr=null; + //--int r=0; + var r=0; + //--java.lang.String roundword=null; + var roundword=null; + {/*select*/ + if (this.form==this.SCIENTIFIC) + formstr="SCIENTIFIC"; + else if (this.form==this.ENGINEERING) + formstr="ENGINEERING"; + else{ + formstr="PLAIN";/* form=PLAIN */ + } + } + {var $1=this.ROUNDS.length;r=0;r:for(;$1>0;$1--,r++){ + if (this.roundingMode==this.ROUNDS[r]) + { + roundword=this.ROUNDWORDS[r]; + break r; + } + } + }/*r*/ + return "digits="+this.digits+" "+"form="+formstr+" "+"lostDigits="+(this.lostDigits?"1":"0")+" "+"roundingMode="+roundword; + } + + + /* Test whether round is valid. */ + // This could be made shared for use by BigDecimal for setScale. + + //--private static boolean isValidRound(int testround){ + function isValidRound(testround) { + //--int r=0; + var r=0; + {var $2=this.ROUNDS.length;r=0;r:for(;$2>0;$2--,r++){ + if (testround==this.ROUNDS[r]) + return true; + } + }/*r*/ + return false; + } +return MathContext; +})(); + +var BigDecimal = (function (MathContext) { +/* Generated from 'BigDecimal.nrx' 8 Sep 2000 11:10:50 [v2.00] */ +/* Options: Binary Comments Crossref Format Java Logo Strictargs Strictcase Trace2 Verbose3 */ +//--package com.ibm.icu.math; +//--import java.math.BigInteger; +//--import com.ibm.icu.impl.Utility; + +/* ------------------------------------------------------------------ */ +/* BigDecimal -- Decimal arithmetic for Java */ +/* ------------------------------------------------------------------ */ +/* Copyright IBM Corporation, 1996, 2000. All Rights Reserved. */ +/* */ +/* The BigDecimal class provides immutable arbitrary-precision */ +/* floating point (including integer) decimal numbers. */ +/* */ +/* As the numbers are decimal, there is an exact correspondence */ +/* between an instance of a BigDecimal object and its String */ +/* representation; the BigDecimal class provides direct conversions */ +/* to and from String and character array objects, and well as */ +/* conversions to and from the Java primitive types (which may not */ +/* be exact). */ +/* ------------------------------------------------------------------ */ +/* Notes: */ +/* */ +/* 1. A BigDecimal object is never changed in value once constructed; */ +/* this avoids the need for locking. Note in particular that the */ +/* mantissa array may be shared between many BigDecimal objects, */ +/* so that once exposed it must not be altered. */ +/* */ +/* 2. This class looks at MathContext class fields directly (for */ +/* performance). It must not and does not change them. */ +/* */ +/* 3. Exponent checking is delayed until finish(), as we know */ +/* intermediate calculations cannot cause 31-bit overflow. */ +/* [This assertion depends on MAX_DIGITS in MathContext.] */ +/* */ +/* 4. Comments for the public API now follow the javadoc conventions. */ +/* The NetRexx -comments option is used to pass these comments */ +/* through to the generated Java code (with -format, if desired). */ +/* */ +/* 5. System.arraycopy is faster than explicit loop as follows */ +/* Mean length 4: equal */ +/* Mean length 8: x2 */ +/* Mean length 16: x3 */ +/* Mean length 24: x4 */ +/* From prior experience, we expect mean length a little below 8, */ +/* but arraycopy is still the one to use, in general, until later */ +/* measurements suggest otherwise. */ +/* */ +/* 6. 'DMSRCN' referred to below is the original (1981) IBM S/370 */ +/* assembler code implementation of the algorithms below; it is */ +/* now called IXXRCN and is available with the OS/390 and VM/ESA */ +/* operating systems. */ +/* ------------------------------------------------------------------ */ +/* Change History: */ +/* 1997.09.02 Initial version (derived from netrexx.lang classes) */ +/* 1997.09.12 Add lostDigits checking */ +/* 1997.10.06 Change mantissa to a byte array */ +/* 1997.11.22 Rework power [did not prepare arguments, etc.] */ +/* 1997.12.13 multiply did not prepare arguments */ +/* 1997.12.14 add did not prepare and align arguments correctly */ +/* 1998.05.02 0.07 packaging changes suggested by Sun and Oracle */ +/* 1998.05.21 adjust remainder operator finalization */ +/* 1998.06.04 rework to pass MathContext to finish() and round() */ +/* 1998.06.06 change format to use round(); support rounding modes */ +/* 1998.06.25 rename to BigDecimal and begin merge */ +/* zero can now have trailing zeros (i.e., exp\=0) */ +/* 1998.06.28 new methods: movePointXxxx, scale, toBigInteger */ +/* unscaledValue, valueof */ +/* 1998.07.01 improve byteaddsub to allow array reuse, etc. */ +/* 1998.07.01 make null testing explicit to avoid JIT bug [Win32] */ +/* 1998.07.07 scaled division [divide(BigDecimal, int, int)] */ +/* 1998.07.08 setScale, faster equals */ +/* 1998.07.11 allow 1E6 (no sign) ; new double/float conversion */ +/* 1998.10.12 change package to com.ibm.icu.math */ +/* 1998.12.14 power operator no longer rounds RHS [to match ANSI] */ +/* add toBigDecimal() and BigDecimal(java.math.BigDecimal) */ +/* 1998.12.29 improve byteaddsub by using table lookup */ +/* 1999.02.04 lostdigits=0 behaviour rounds instead of digits+1 guard */ +/* 1999.02.05 cleaner code for BigDecimal(char[]) */ +/* 1999.02.06 add javadoc comments */ +/* 1999.02.11 format() changed from 7 to 2 method form */ +/* 1999.03.05 null pointer checking is no longer explicit */ +/* 1999.03.05 simplify; changes from discussion with J. Bloch: */ +/* null no longer permitted for MathContext; drop boolean, */ +/* byte, char, float, short constructor, deprecate double */ +/* constructor, no blanks in string constructor, add */ +/* offset and length version of char[] constructor; */ +/* add valueOf(double); drop booleanValue, charValue; */ +/* add ...Exact versions of remaining convertors */ +/* 1999.03.13 add toBigIntegerExact */ +/* 1999.03.13 1.00 release to IBM Centre for Java Technology */ +/* 1999.05.27 1.01 correct 0-0.2 bug under scaled arithmetic */ +/* 1999.06.29 1.02 constructors should not allow exponent > 9 digits */ +/* 1999.07.03 1.03 lost digits should not be checked if digits=0 */ +/* 1999.07.06 lost digits Exception message changed */ +/* 1999.07.10 1.04 more work on 0-0.2 (scaled arithmetic) */ +/* 1999.07.17 improve messages from pow method */ +/* 1999.08.08 performance tweaks */ +/* 1999.08.15 fastpath in multiply */ +/* 1999.11.05 1.05 fix problem in intValueExact [e.g., 5555555555] */ +/* 1999.12.22 1.06 remove multiply fastpath, and improve performance */ +/* 2000.01.01 copyright update [Y2K has arrived] */ +/* 2000.06.18 1.08 no longer deprecate BigDecimal(double) */ +/* ------------------------------------------------------------------ */ + + +/* JavaScript conversion (c) 2003 STZ-IDA and PTV AG, Karlsruhe, Germany */ + + + +function div(a, b) { + return (a-(a%b))/b; +} + +BigDecimal.prototype.div = div; + +function arraycopy(src, srcindex, dest, destindex, length) { + var i; + if (destindex > srcindex) { + // in case src and dest are equals, but also doesn't hurt + // if they are different + for (i = length-1; i >= 0; --i) { + dest[i+destindex] = src[i+srcindex]; + } + } else { + for (i = 0; i < length; ++i) { + dest[i+destindex] = src[i+srcindex]; + } + } +} + +BigDecimal.prototype.arraycopy = arraycopy; + +function createArrayWithZeros(length) { + var retVal = new Array(length); + var i; + for (i = 0; i < length; ++i) { + retVal[i] = 0; + } + return retVal; +} + +BigDecimal.prototype.createArrayWithZeros = createArrayWithZeros; + + +/** + * The BigDecimal class implements immutable + * arbitrary-precision decimal numbers. The methods of the + * BigDecimal class provide operations for fixed and + * floating point arithmetic, comparison, format conversions, and + * hashing. + *

    + * As the numbers are decimal, there is an exact correspondence between + * an instance of a BigDecimal object and its + * String representation; the BigDecimal class + * provides direct conversions to and from String and + * character array (char[]) objects, as well as conversions + * to and from the Java primitive types (which may not be exact) and + * BigInteger. + *

    + * In the descriptions of constructors and methods in this documentation, + * the value of a BigDecimal number object is shown as the + * result of invoking the toString() method on the object. + * The internal representation of a decimal number is neither defined + * nor exposed, and is not permitted to affect the result of any + * operation. + *

    + * The floating point arithmetic provided by this class is defined by + * the ANSI X3.274-1996 standard, and is also documented at + * http://www2.hursley.ibm.com/decimal + *
    [This URL will change.] + * + *

    Operator methods

    + *

    + * Operations on BigDecimal numbers are controlled by a + * {@link MathContext} object, which provides the context (precision and + * other information) for the operation. Methods that can take a + * MathContext parameter implement the standard arithmetic + * operators for BigDecimal objects and are known as + * operator methods. The default settings provided by the + * constant {@link MathContext#DEFAULT} (digits=9, + * form=SCIENTIFIC, lostDigits=false, roundingMode=ROUND_HALF_UP) + * perform general-purpose floating point arithmetic to nine digits of + * precision. The MathContext parameter must not be + * null. + *

    + * Each operator method also has a version provided which does + * not take a MathContext parameter. For this version of + * each method, the context settings used are digits=0, + * form=PLAIN, lostDigits=false, roundingMode=ROUND_HALF_UP; + * these settings perform fixed point arithmetic with unlimited + * precision, as defined for the original BigDecimal class in Java 1.1 + * and Java 1.2. + *

    + * For monadic operators, only the optional MathContext + * parameter is present; the operation acts upon the current object. + *

    + * For dyadic operators, a BigDecimal parameter is always + * present; it must not be null. + * The operation acts with the current object being the left-hand operand + * and the BigDecimal parameter being the right-hand operand. + *

    + * For example, adding two BigDecimal objects referred to + * by the names award and extra could be + * written as any of: + *

    + * award.add(extra) + *
    award.add(extra, MathContext.DEFAULT) + *
    award.add(extra, acontext) + *
    + *

    + * (where acontext is a MathContext object), + * which would return a BigDecimal object whose value is + * the result of adding award and extra under + * the appropriate context settings. + *

    + * When a BigDecimal operator method is used, a set of + * rules define what the result will be (and, by implication, how the + * result would be represented as a character string). + * These rules are defined in the BigDecimal arithmetic documentation + * (see the URL above), but in summary: + *

      + *
    • Results are normally calculated with up to some maximum number of + * significant digits. + * For example, if the MathContext parameter for an operation + * were MathContext.DEFAULT then the result would be + * rounded to 9 digits; the division of 2 by 3 would then result in + * 0.666666667. + *
      + * You can change the default of 9 significant digits by providing the + * method with a suitable MathContext object. This lets you + * calculate using as many digits as you need -- thousands, if necessary. + * Fixed point (scaled) arithmetic is indicated by using a + * digits setting of 0 (or omitting the + * MathContext parameter). + *
      + * Similarly, you can change the algorithm used for rounding from the + * default "classic" algorithm. + *
    • + * In standard arithmetic (that is, when the form setting + * is not PLAIN), a zero result is always expressed as the + * single digit '0' (that is, with no sign, decimal point, + * or exponent part). + *
    • + * Except for the division and power operators in standard arithmetic, + * trailing zeros are preserved (this is in contrast to binary floating + * point operations and most electronic calculators, which lose the + * information about trailing zeros in the fractional part of results). + *
      + * So, for example: + *

      + * new BigDecimal("2.40").add( new BigDecimal("2")) => "4.40" + *
      new BigDecimal("2.40").subtract(new BigDecimal("2")) => "0.40" + *
      new BigDecimal("2.40").multiply(new BigDecimal("2")) => "4.80" + *
      new BigDecimal("2.40").divide( new BigDecimal("2"), def) => "1.2" + *
      + *

      where the value on the right of the => would be the + * result of the operation, expressed as a String, and + * def (in this and following examples) refers to + * MathContext.DEFAULT). + * This preservation of trailing zeros is desirable for most + * calculations (including financial calculations). + * If necessary, trailing zeros may be easily removed using division by 1. + *

    • + * In standard arithmetic, exponential form is used for a result + * depending on its value and the current setting of digits + * (the default is 9 digits). + * If the number of places needed before the decimal point exceeds the + * digits setting, or the absolute value of the number is + * less than 0.000001, then the number will be expressed in + * exponential notation; thus + *

      + * new BigDecimal("1e+6").multiply(new BigDecimal("1e+6"), def) + * + *

      results in 1E+12 instead of + * 1000000000000, and + *

      + * new BigDecimal("1").divide(new BigDecimal("3E+10"), def) + * + *

      results in 3.33333333E-11 instead of + * 0.0000000000333333333. + *

      + * The form of the exponential notation (scientific or engineering) is + * determined by the form setting. + * + *

      + * The names of methods in this class follow the conventions established + * by java.lang.Number, java.math.BigInteger, + * and java.math.BigDecimal in Java 1.1 and Java 1.2. + * + * @see MathContext + * @author Mike Cowlishaw + * @stable ICU 2.0 + */ + +//--public class BigDecimal extends java.lang.Number implements java.io.Serializable,java.lang.Comparable{ +//-- private static final java.lang.String $0="BigDecimal.nrx"; + + //-- methods + BigDecimal.prototype.abs = abs; + BigDecimal.prototype.add = add; + BigDecimal.prototype.compareTo = compareTo; + BigDecimal.prototype.divide = divide; + BigDecimal.prototype.divideInteger = divideInteger; + BigDecimal.prototype.max = max; + BigDecimal.prototype.min = min; + BigDecimal.prototype.multiply = multiply; + BigDecimal.prototype.negate = negate; + BigDecimal.prototype.plus = plus; + BigDecimal.prototype.pow = pow; + BigDecimal.prototype.remainder = remainder; + BigDecimal.prototype.subtract = subtract; + BigDecimal.prototype.equals = equals; + BigDecimal.prototype.format = format; + BigDecimal.prototype.intValueExact = intValueExact; + BigDecimal.prototype.movePointLeft = movePointLeft; + BigDecimal.prototype.movePointRight = movePointRight; + BigDecimal.prototype.scale = scale; + BigDecimal.prototype.setScale = setScale; + BigDecimal.prototype.signum = signum; + BigDecimal.prototype.toString = toString; + BigDecimal.prototype.layout = layout; + BigDecimal.prototype.intcheck = intcheck; + BigDecimal.prototype.dodivide = dodivide; + BigDecimal.prototype.bad = bad; + BigDecimal.prototype.badarg = badarg; + BigDecimal.prototype.extend = extend; + BigDecimal.prototype.byteaddsub = byteaddsub; + BigDecimal.prototype.diginit = diginit; + BigDecimal.prototype.clone = clone; + BigDecimal.prototype.checkdigits = checkdigits; + BigDecimal.prototype.round = round; + BigDecimal.prototype.allzero = allzero; + BigDecimal.prototype.finish = finish; + + // Convenience methods + BigDecimal.prototype.isGreaterThan = isGreaterThan; + BigDecimal.prototype.isLessThan = isLessThan; + BigDecimal.prototype.isGreaterThanOrEqualTo = isGreaterThanOrEqualTo; + BigDecimal.prototype.isLessThanOrEqualTo = isLessThanOrEqualTo; + BigDecimal.prototype.isPositive = isPositive; + BigDecimal.prototype.isNegative = isNegative; + BigDecimal.prototype.isZero = isZero; + + + /* ----- Constants ----- */ + /* properties constant public */ // useful to others + // the rounding modes (copied here for upwards compatibility) + /** + * Rounding mode to round to a more positive number. + * @see MathContext#ROUND_CEILING + * @stable ICU 2.0 + */ + //--public static final int ROUND_CEILING=com.ibm.icu.math.MathContext.ROUND_CEILING; + BigDecimal.ROUND_CEILING = BigDecimal.prototype.ROUND_CEILING = MathContext.prototype.ROUND_CEILING; + + /** + * Rounding mode to round towards zero. + * @see MathContext#ROUND_DOWN + * @stable ICU 2.0 + */ + //--public static final int ROUND_DOWN=com.ibm.icu.math.MathContext.ROUND_DOWN; + BigDecimal.ROUND_DOWN = BigDecimal.prototype.ROUND_DOWN = MathContext.prototype.ROUND_DOWN; + + /** + * Rounding mode to round to a more negative number. + * @see MathContext#ROUND_FLOOR + * @stable ICU 2.0 + */ + //--public static final int ROUND_FLOOR=com.ibm.icu.math.MathContext.ROUND_FLOOR; + BigDecimal.ROUND_FLOOR = BigDecimal.prototype.ROUND_FLOOR = MathContext.prototype.ROUND_FLOOR; + + /** + * Rounding mode to round to nearest neighbor, where an equidistant + * value is rounded down. + * @see MathContext#ROUND_HALF_DOWN + * @stable ICU 2.0 + */ + //--public static final int ROUND_HALF_DOWN=com.ibm.icu.math.MathContext.ROUND_HALF_DOWN; + BigDecimal.ROUND_HALF_DOWN = BigDecimal.prototype.ROUND_HALF_DOWN = MathContext.prototype.ROUND_HALF_DOWN; + + /** + * Rounding mode to round to nearest neighbor, where an equidistant + * value is rounded to the nearest even neighbor. + * @see MathContext#ROUND_HALF_EVEN + * @stable ICU 2.0 + */ + //--public static final int ROUND_HALF_EVEN=com.ibm.icu.math.MathContext.ROUND_HALF_EVEN; + BigDecimal.ROUND_HALF_EVEN = BigDecimal.prototype.ROUND_HALF_EVEN = MathContext.prototype.ROUND_HALF_EVEN; + + /** + * Rounding mode to round to nearest neighbor, where an equidistant + * value is rounded up. + * @see MathContext#ROUND_HALF_UP + * @stable ICU 2.0 + */ + //--public static final int ROUND_HALF_UP=com.ibm.icu.math.MathContext.ROUND_HALF_UP; + BigDecimal.ROUND_HALF_UP = BigDecimal.prototype.ROUND_HALF_UP = MathContext.prototype.ROUND_HALF_UP; + + /** + * Rounding mode to assert that no rounding is necessary. + * @see MathContext#ROUND_UNNECESSARY + * @stable ICU 2.0 + */ + //--public static final int ROUND_UNNECESSARY=com.ibm.icu.math.MathContext.ROUND_UNNECESSARY; + BigDecimal.ROUND_UNNECESSARY = BigDecimal.prototype.ROUND_UNNECESSARY = MathContext.prototype.ROUND_UNNECESSARY; + + /** + * Rounding mode to round away from zero. + * @see MathContext#ROUND_UP + * @stable ICU 2.0 + */ + //--public static final int ROUND_UP=com.ibm.icu.math.MathContext.ROUND_UP; + BigDecimal.ROUND_UP = BigDecimal.prototype.ROUND_UP = MathContext.prototype.ROUND_UP; + + /* properties constant private */ // locals + //--private static final byte ispos=1; // ind: indicates positive (must be 1) + //--private static final byte iszero=0; // ind: indicates zero (must be 0) + //--private static final byte isneg=-1; // ind: indicates negative (must be -1) + BigDecimal.prototype.ispos = 1; + BigDecimal.prototype.iszero = 0; + BigDecimal.prototype.isneg = -1; + // [later could add NaN, +/- infinity, here] + + //--private static final int MinExp=-999999999; // minimum exponent allowed + //--private static final int MaxExp=999999999; // maximum exponent allowed + //--private static final int MinArg=-999999999; // minimum argument integer + //--private static final int MaxArg=999999999; // maximum argument integer + BigDecimal.prototype.MinExp=-999999999; // minimum exponent allowed + BigDecimal.prototype.MaxExp=999999999; // maximum exponent allowed + BigDecimal.prototype.MinArg=-999999999; // minimum argument integer + BigDecimal.prototype.MaxArg=999999999; // maximum argument integer + + //--private static final com.ibm.icu.math.MathContext plainMC=new com.ibm.icu.math.MathContext(0,com.ibm.icu.math.MathContext.PLAIN); // context for plain unlimited math + BigDecimal.prototype.plainMC=new MathContext(0, MathContext.prototype.PLAIN); + + /* properties constant private unused */ // present but not referenced + + // Serialization version + //--private static final long serialVersionUID=8245355804974198832L; + + //--private static final java.lang.String copyright=" Copyright (c) IBM Corporation 1996, 2000. All rights reserved. "; + + /* properties static private */ + // Precalculated constant arrays (used by byteaddsub) + //--private static byte bytecar[]=new byte[(90+99)+1]; // carry/borrow array + //--private static byte bytedig[]=diginit(); // next digit array + BigDecimal.prototype.bytecar = new Array((90+99)+1); + BigDecimal.prototype.bytedig = diginit(); + + /** + * The BigDecimal constant "0". + * + * @see #ONE + * @see #TEN + * @stable ICU 2.0 + */ + //--public static final com.ibm.icu.math.BigDecimal ZERO=new com.ibm.icu.math.BigDecimal((long)0); // use long as we want the int constructor + // .. to be able to use this, for speed +BigDecimal.ZERO = BigDecimal.prototype.ZERO = new BigDecimal("0"); + + /** + * The BigDecimal constant "1". + * + * @see #TEN + * @see #ZERO + * @stable ICU 2.0 + */ + //--public static final com.ibm.icu.math.BigDecimal ONE=new com.ibm.icu.math.BigDecimal((long)1); // use long as we want the int constructor + // .. to be able to use this, for speed +BigDecimal.ONE = BigDecimal.prototype.ONE = new BigDecimal("1"); + + /** + * The BigDecimal constant "10". + * + * @see #ONE + * @see #ZERO + * @stable ICU 2.0 + */ + //--public static final com.ibm.icu.math.BigDecimal TEN=new com.ibm.icu.math.BigDecimal(10); + BigDecimal.TEN = BigDecimal.prototype.TEN = new BigDecimal("10"); + + /* ----- Instance properties [all private and immutable] ----- */ + /* properties private */ + + /** + * The indicator. This may take the values: + *

        + *
      • ispos -- the number is positive + *
      • iszero -- the number is zero + *
      • isneg -- the number is negative + *
      + * + * @serial + */ + //--private byte ind; // assumed undefined + // Note: some code below assumes IND = Sign [-1, 0, 1], at present. + // We only need two bits for this, but use a byte [also permits + // smooth future extension]. + + /** + * The formatting style. This may take the values: + *
        + *
      • MathContext.PLAIN -- no exponent needed + *
      • MathContext.SCIENTIFIC -- scientific notation required + *
      • MathContext.ENGINEERING -- engineering notation required + *
      + *

      + * This property is an optimization; it allows us to defer number + * layout until it is actually needed as a string, hence avoiding + * unnecessary formatting. + * + * @serial + */ + //--private byte form=(byte)com.ibm.icu.math.MathContext.PLAIN; // assumed PLAIN + // We only need two bits for this, at present, but use a byte + // [again, to allow for smooth future extension] + + /** + * The value of the mantissa. + *

      + * Once constructed, this may become shared between several BigDecimal + * objects, so must not be altered. + *

      + * For efficiency (speed), this is a byte array, with each byte + * taking a value of 0 -> 9. + *

      + * If the first byte is 0 then the value of the number is zero (and + * mant.length=1, except when constructed from a plain number, for + * example, 0.000). + * + * @serial + */ + //--private byte mant[]; // assumed null + + /** + * The exponent. + *

      + * For fixed point arithmetic, scale is -exp, and can + * apply to zero. + * + * Note that this property can have a value less than MinExp when + * the mantissa has more than one digit. + * + * @serial + */ + //--private int exp; + // assumed 0 + + /* ---------------------------------------------------------------- */ + /* Constructors */ + /* ---------------------------------------------------------------- */ + + /** + * Constructs a BigDecimal object from a + * java.math.BigDecimal. + *

      + * Constructs a BigDecimal as though the parameter had + * been represented as a String (using its + * toString method) and the + * {@link #BigDecimal(java.lang.String)} constructor had then been + * used. + * The parameter must not be null. + *

      + * (Note: this constructor is provided only in the + * com.ibm.icu.math version of the BigDecimal class. + * It would not be present in a java.math version.) + * + * @param bd The BigDecimal to be translated. + * @stable ICU 2.0 + */ + + //--public BigDecimal(java.math.BigDecimal bd){ + //-- this(bd.toString()); + //-- return;} + + /** + * Constructs a BigDecimal object from a + * BigInteger, with scale 0. + *

      + * Constructs a BigDecimal which is the exact decimal + * representation of the BigInteger, with a scale of + * zero. + * The value of the BigDecimal is identical to the value + * of the BigInteger. + * The parameter must not be null. + *

      + * The BigDecimal will contain only decimal digits, + * prefixed with a leading minus sign (hyphen) if the + * BigInteger is negative. A leading zero will be + * present only if the BigInteger is zero. + * + * @param bi The BigInteger to be converted. + * @stable ICU 2.0 + */ + + //--public BigDecimal(java.math.BigInteger bi){ + //-- this(bi.toString(10)); + //-- return;} + // exp remains 0 + + /** + * Constructs a BigDecimal object from a + * BigInteger and a scale. + *

      + * Constructs a BigDecimal which is the exact decimal + * representation of the BigInteger, scaled by the + * second parameter, which may not be negative. + * The value of the BigDecimal is the + * BigInteger divided by ten to the power of the scale. + * The BigInteger parameter must not be + * null. + *

      + * The BigDecimal will contain only decimal digits, (with + * an embedded decimal point followed by scale decimal + * digits if the scale is positive), prefixed with a leading minus + * sign (hyphen) if the BigInteger is negative. A + * leading zero will be present only if the BigInteger is + * zero. + * + * @param bi The BigInteger to be converted. + * @param scale The int specifying the scale. + * @throws NumberFormatException if the scale is negative. + * @stable ICU 2.0 + */ + + //--public BigDecimal(java.math.BigInteger bi,int scale){ + //-- this(bi.toString(10)); + //-- if (scale<0) + //-- throw new java.lang.NumberFormatException("Negative scale:"+" "+scale); + //-- exp=(int)-scale; // exponent is -scale + //-- return;} + + /** + * Constructs a BigDecimal object from an array of characters. + *

      + * Constructs a BigDecimal as though a + * String had been constructed from the character array + * and the {@link #BigDecimal(java.lang.String)} constructor had then + * been used. The parameter must not be null. + *

      + * Using this constructor is faster than using the + * BigDecimal(String) constructor if the string is + * already available in character array form. + * + * @param inchars The char[] array containing the number + * to be converted. + * @throws NumberFormatException if the parameter is not a valid + * number. + * @stable ICU 2.0 + */ + + //--public BigDecimal(char inchars[]){ + //-- this(inchars,0,inchars.length); + //-- return;} + + /** + * Constructs a BigDecimal object from an array of characters. + *

      + * Constructs a BigDecimal as though a + * String had been constructed from the character array + * (or a subarray of that array) and the + * {@link #BigDecimal(java.lang.String)} constructor had then been + * used. The first parameter must not be null, and the + * subarray must be wholly contained within it. + *

      + * Using this constructor is faster than using the + * BigDecimal(String) constructor if the string is + * already available within a character array. + * + * @param inchars The char[] array containing the number + * to be converted. + * @param offset The int offset into the array of the + * start of the number to be converted. + * @param length The int length of the number. + * @throws NumberFormatException if the parameter is not a valid + * number for any reason. + * @stable ICU 2.0 + */ + + //--public BigDecimal(char inchars[],int offset,int length){super(); + function BigDecimal() { + //-- members + this.ind = 0; + this.form = MathContext.prototype.PLAIN; + this.mant = null; + this.exp = 0; + + //-- overloaded ctor + if (BigDecimal.arguments.length == 0) + return; + var inchars; + var offset; + var length; + if (BigDecimal.arguments.length == 1) + { + inchars = BigDecimal.arguments[0]; + offset = 0; + length = inchars.length; + } + else + { + inchars = BigDecimal.arguments[0]; + offset = BigDecimal.arguments[1]; + length = BigDecimal.arguments[2]; + } + if (typeof inchars == "string") + { + inchars = inchars.split(""); + } + + //--boolean exotic; + var exotic; + //--boolean hadexp; + var hadexp; + //--int d; + var d; + //--int dotoff; + var dotoff; + //--int last; + var last; + //--int i=0; + var i=0; + //--char si=0; + var si=0; + //--boolean eneg=false; + var eneg=false; + //--int k=0; + var k=0; + //--int elen=0; + var elen=0; + //--int j=0; + var j=0; + //--char sj=0; + var sj=0; + //--int dvalue=0; + var dvalue=0; + //--int mag=0; + var mag=0; + // This is the primary constructor; all incoming strings end up + // here; it uses explicit (inline) parsing for speed and to avoid + // generating intermediate (temporary) objects of any kind. + // 1998.06.25: exponent form built only if E/e in string + // 1998.06.25: trailing zeros not removed for zero + // 1999.03.06: no embedded blanks; allow offset and length + if (length<=0) + this.bad("BigDecimal(): ", inchars); // bad conversion (empty string) + // [bad offset will raise array bounds exception] + + /* Handle and step past sign */ + this.ind=this.ispos; // assume positive + if (inchars[0]==('-')) + { + length--; + if (length==0) + this.bad("BigDecimal(): ", inchars); // nothing after sign + this.ind=this.isneg; + offset++; + } + else + if (inchars[0]==('+')) + { + length--; + if (length==0) + this.bad("BigDecimal(): ", inchars); // nothing after sign + offset++; + } + + /* We're at the start of the number */ + exotic=false; // have extra digits + hadexp=false; // had explicit exponent + d=0; // count of digits found + dotoff=-1; // offset where dot was found + last=-1; // last character of mantissa + {var $1=length;i=offset;i:for(;$1>0;$1--,i++){ + si=inchars[i]; + if (si>='0') // test for Arabic digit + if (si<='9') + { + last=i; + d++; // still in mantissa + continue i; + } + if (si=='.') + { // record and ignore + if (dotoff>=0) + this.bad("BigDecimal(): ", inchars); // two dots + dotoff=i-offset; // offset into mantissa + continue i; + } + if (si!='e') + if (si!='E') + { // expect an extra digit + if (si<'0' || si>'9') + this.bad("BigDecimal(): ", inchars); // not a number + // defer the base 10 check until later to avoid extra method call + exotic=true; // will need conversion later + last=i; + d++; // still in mantissa + continue i; + } + /* Found 'e' or 'E' -- now process explicit exponent */ + // 1998.07.11: sign no longer required + if ((i-offset)>(length-2)) + this.bad("BigDecimal(): ", inchars); // no room for even one digit + eneg=false; + if ((inchars[i+1])==('-')) + { + eneg=true; + k=i+2; + } + else + if ((inchars[i+1])==('+')) + k=i+2; + else + k=i+1; + // k is offset of first expected digit + elen=length-((k-offset)); // possible number of digits + if ((elen==0)||(elen>9)) + this.bad("BigDecimal(): ", inchars); // 0 or more than 9 digits + {var $2=elen;j=k;j:for(;$2>0;$2--,j++){ + sj=inchars[j]; + if (sj<'0') + this.bad("BigDecimal(): ", inchars); // always bad + if (sj>'9') + { // maybe an exotic digit + /*if (si<'0' || si>'9') + this.bad(inchars); // not a number + dvalue=java.lang.Character.digit(sj,10); // check base + if (dvalue<0) + bad(inchars); // not base 10*/ + this.bad("BigDecimal(): ", inchars); + } + else + dvalue=sj-'0'; + this.exp=(this.exp*10)+dvalue; + } + }/*j*/ + if (eneg) + this.exp=-this.exp; // was negative + hadexp=true; // remember we had one + break i; // we are done + } + }/*i*/ + + /* Here when all inspected */ + if (d==0) + this.bad("BigDecimal(): ", inchars); // no mantissa digits + if (dotoff>=0) + this.exp=(this.exp+dotoff)-d; // adjust exponent if had dot + + /* strip leading zeros/dot (leave final if all 0's) */ + {var $3=last-1;i=offset;i:for(;i<=$3;i++){ + si=inchars[i]; + if (si=='0') + { + offset++; + dotoff--; + d--; + } + else + if (si=='.') + { + offset++; // step past dot + dotoff--; + } + else + if (si<='9') + break i;/* non-0 */ + else + {/* exotic */ + //if ((java.lang.Character.digit(si,10))!=0) + break i; // non-0 or bad + // is 0 .. strip like '0' + //offset++; + //dotoff--; + //d--; + } + } + }/*i*/ + + /* Create the mantissa array */ + this.mant=new Array(d); // we know the length + j=offset; // input offset + if (exotic) + {exotica:do{ // slow: check for exotica + {var $4=d;i=0;i:for(;$4>0;$4--,i++){ + if (i==dotoff) + j++; // at dot + sj=inchars[j]; + if (sj<='9') + this.mant[i]=sj-'0';/* easy */ + else + { + //dvalue=java.lang.Character.digit(sj,10); + //if (dvalue<0) + this.bad("BigDecimal(): ", inchars); // not a number after all + //mant[i]=(byte)dvalue; + } + j++; + } + }/*i*/ + }while(false);}/*exotica*/ + else + {simple:do{ + {var $5=d;i=0;i:for(;$5>0;$5--,i++){ + if (i==dotoff) + j++; + this.mant[i]=inchars[j]-'0'; + j++; + } + }/*i*/ + }while(false);}/*simple*/ + + /* Looks good. Set the sign indicator and form, as needed. */ + // Trailing zeros are preserved + // The rule here for form is: + // If no E-notation, then request plain notation + // Otherwise act as though add(0,DEFAULT) and request scientific notation + // [form is already PLAIN] + if (this.mant[0]==0) + { + this.ind=this.iszero; // force to show zero + // negative exponent is significant (e.g., -3 for 0.000) if plain + if (this.exp>0) + this.exp=0; // positive exponent can be ignored + if (hadexp) + { // zero becomes single digit from add + this.mant=this.ZERO.mant; + this.exp=0; + } + } + else + { // non-zero + // [ind was set earlier] + // now determine form + if (hadexp) + { + this.form=MathContext.prototype.SCIENTIFIC; + // 1999.06.29 check for overflow + mag=(this.exp+this.mant.length)-1; // true exponent in scientific notation + if ((magthis.MaxExp)) + this.bad("BigDecimal(): ", inchars); + } + } + // say 'BD(c[]): mant[0] mantlen exp ind form:' mant[0] mant.length exp ind form + return; + } + + /** + * Constructs a BigDecimal object directly from a + * double. + *

      + * Constructs a BigDecimal which is the exact decimal + * representation of the 64-bit signed binary floating point + * parameter. + *

      + * Note that this constructor it an exact conversion; it does not give + * the same result as converting num to a + * String using the Double.toString() method + * and then using the {@link #BigDecimal(java.lang.String)} + * constructor. + * To get that result, use the static {@link #valueOf(double)} + * method to construct a BigDecimal from a + * double. + * + * @param num The double to be converted. + * @throws NumberFormatException if the parameter is infinite or + * not a number. + * @stable ICU 2.0 + */ + + //--public BigDecimal(double num){ + //-- // 1999.03.06: use exactly the old algorithm + //-- // 2000.01.01: note that this constructor does give an exact result, + //-- // so perhaps it should not be deprecated + //-- // 2000.06.18: no longer deprecated + //-- this((new java.math.BigDecimal(num)).toString()); + //-- return;} + + /** + * Constructs a BigDecimal object directly from a + * int. + *

      + * Constructs a BigDecimal which is the exact decimal + * representation of the 32-bit signed binary integer parameter. + * The BigDecimal will contain only decimal digits, + * prefixed with a leading minus sign (hyphen) if the parameter is + * negative. + * A leading zero will be present only if the parameter is zero. + * + * @param num The int to be converted. + * @stable ICU 2.0 + */ + + //--public BigDecimal(int num){super(); + //-- int mun; + //-- int i=0; + //-- // We fastpath commoners + //-- if (num<=9) + //-- if (num>=(-9)) + //-- {singledigit:do{ + //-- // very common single digit case + //-- {/*select*/ + //-- if (num==0) + //-- { + //-- mant=ZERO.mant; + //-- ind=iszero; + //-- } + //-- else if (num==1) + //-- { + //-- mant=ONE.mant; + //-- ind=ispos; + //-- } + //-- else if (num==(-1)) + //-- { + //-- mant=ONE.mant; + //-- ind=isneg; + //-- } + //-- else{ + //-- { + //-- mant=new byte[1]; + //-- if (num>0) + //-- { + //-- mant[0]=(byte)num; + //-- ind=ispos; + //-- } + //-- else + //-- { // num<-1 + //-- mant[0]=(byte)((int)-num); + //-- ind=isneg; + //-- } + //-- } + //-- } + //-- } + //-- return; + //-- }while(false);}/*singledigit*/ + //-- + //-- /* We work on negative numbers so we handle the most negative number */ + //-- if (num>0) + //-- { + //-- ind=ispos; + //-- num=(int)-num; + //-- } + //-- else + //-- ind=isneg;/* negative */ // [0 case already handled] + //-- // [it is quicker, here, to pre-calculate the length with + //-- // one loop, then allocate exactly the right length of byte array, + //-- // then re-fill it with another loop] + //-- mun=num; // working copy + //-- {i=9;i:for(;;i--){ + //-- mun=mun/10; + //-- if (mun==0) + //-- break i; + //-- } + //-- }/*i*/ + //-- // i is the position of the leftmost digit placed + //-- mant=new byte[10-i]; + //-- {i=(10-i)-1;i:for(;;i--){ + //-- mant[i]=(byte)-(((byte)(num%10))); + //-- num=num/10; + //-- if (num==0) + //-- break i; + //-- } + //-- }/*i*/ + //-- return; + //-- } + + /** + * Constructs a BigDecimal object directly from a + * long. + *

      + * Constructs a BigDecimal which is the exact decimal + * representation of the 64-bit signed binary integer parameter. + * The BigDecimal will contain only decimal digits, + * prefixed with a leading minus sign (hyphen) if the parameter is + * negative. + * A leading zero will be present only if the parameter is zero. + * + * @param num The long to be converted. + * @stable ICU 2.0 + */ + + //--public BigDecimal(long num){super(); + //-- long mun; + //-- int i=0; + //-- // Not really worth fastpathing commoners in this constructor [also, + //-- // we use this to construct the static constants]. + //-- // This is much faster than: this(String.valueOf(num).toCharArray()) + //-- /* We work on negative num so we handle the most negative number */ + //-- if (num>0) + //-- { + //-- ind=ispos; + //-- num=(long)-num; + //-- } + //-- else + //-- if (num==0) + //-- ind=iszero; + //-- else + //-- ind=isneg;/* negative */ + //-- mun=num; + //-- {i=18;i:for(;;i--){ + //-- mun=mun/10; + //-- if (mun==0) + //-- break i; + //-- } + //-- }/*i*/ + //-- // i is the position of the leftmost digit placed + //-- mant=new byte[19-i]; + //-- {i=(19-i)-1;i:for(;;i--){ + //-- mant[i]=(byte)-(((byte)(num%10))); + //-- num=num/10; + //-- if (num==0) + //-- break i; + //-- } + //-- }/*i*/ + //-- return; + //-- } + + /** + * Constructs a BigDecimal object from a String. + *

      + * Constructs a BigDecimal from the parameter, which must + * not be null and must represent a valid number, + * as described formally in the documentation referred to + * {@link BigDecimal above}. + *

      + * In summary, numbers in String form must have at least + * one digit, may have a leading sign, may have a decimal point, and + * exponential notation may be used. They follow conventional syntax, + * and may not contain blanks. + *

      + * Some valid strings from which a BigDecimal might + * be constructed are: + *

      +  *       "0"         -- Zero
      +  *      "12"         -- A whole number
      +  *     "-76"         -- A signed whole number
      +  *      "12.70"      -- Some decimal places
      +  *     "+0.003"      -- Plus sign is allowed
      +  *      "17."        -- The same as 17
      +  *        ".5"       -- The same as 0.5
      +  *      "4E+9"       -- Exponential notation
      +  *       "0.73e-7"   -- Exponential notation
      +  * 
      + *

      + * (Exponential notation means that the number includes an optional + * sign and a power of ten following an 'E' that + * indicates how the decimal point will be shifted. Thus the + * "4E+9" above is just a short way of writing + * 4000000000, and the "0.73e-7" is short + * for 0.000000073.) + *

      + * The BigDecimal constructed from the String is in a + * standard form, with no blanks, as though the + * {@link #add(BigDecimal)} method had been used to add zero to the + * number with unlimited precision. + * If the string uses exponential notation (that is, includes an + * e or an E), then the + * BigDecimal number will be expressed in scientific + * notation (where the power of ten is adjusted so there is a single + * non-zero digit to the left of the decimal point); in this case if + * the number is zero then it will be expressed as the single digit 0, + * and if non-zero it will have an exponent unless that exponent would + * be 0. The exponent must fit in nine digits both before and after it + * is expressed in scientific notation. + *

      + * Any digits in the parameter must be decimal; that is, + * Character.digit(c, 10) (where c is the + * character in question) would not return -1. + * + * @param string The String to be converted. + * @throws NumberFormatException if the parameter is not a valid + * number. + * @stable ICU 2.0 + */ + + //--public BigDecimal(java.lang.String string){ + //-- this(string.toCharArray(),0,string.length()); + //-- return;} + + /* Make a default BigDecimal object for local use. */ + + //--private BigDecimal(){super(); + //-- return; + //-- } + + /* ---------------------------------------------------------------- */ + /* Operator methods [methods which take a context parameter] */ + /* ---------------------------------------------------------------- */ + + /** + * Returns a plain BigDecimal whose value is the absolute + * value of this BigDecimal. + *

      + * The same as {@link #abs(MathContext)}, where the context is + * new MathContext(0, MathContext.PLAIN). + *

      + * The length of the decimal part (the scale) of the result will + * be this.scale() + * + * @return A BigDecimal whose value is the absolute + * value of this BigDecimal. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal abs(){ + //- return this.abs(plainMC); + //- } + + /** + * Returns a BigDecimal whose value is the absolute value + * of this BigDecimal. + *

      + * If the current object is zero or positive, then the same result as + * invoking the {@link #plus(MathContext)} method with the same + * parameter is returned. + * Otherwise, the same result as invoking the + * {@link #negate(MathContext)} method with the same parameter is + * returned. + * + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is the absolute + * value of this BigDecimal. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal abs(com.ibm.icu.math.MathContext set){ + function abs() { + var set; + if (abs.arguments.length == 1) + { + set = abs.arguments[0]; + } + else if (abs.arguments.length == 0) + { + set = this.plainMC; + } + else + { + throw "abs(): " + abs.arguments.length + " arguments given; expected 0 or 1"; + } + if (this.ind==this.isneg) + return this.negate(set); + return this.plus(set); + } + + /** + * Returns a plain BigDecimal whose value is + * this+rhs, using fixed point arithmetic. + *

      + * The same as {@link #add(BigDecimal, MathContext)}, + * where the BigDecimal is rhs, + * and the context is new MathContext(0, MathContext.PLAIN). + *

      + * The length of the decimal part (the scale) of the result will be + * the maximum of the scales of the two operands. + * + * @param rhs The BigDecimal for the right hand side of + * the addition. + * @return A BigDecimal whose value is + * this+rhs, using fixed point arithmetic. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal add(com.ibm.icu.math.BigDecimal rhs){ + //-- return this.add(rhs,plainMC); + //-- } + + /** + * Returns a BigDecimal whose value is this+rhs. + *

      + * Implements the addition (+) operator + * (as defined in the decimal documentation, see {@link BigDecimal + * class header}), + * and returns the result as a BigDecimal object. + * + * @param rhs The BigDecimal for the right hand side of + * the addition. + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is + * this+rhs. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal add(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){ + function add() { + var set; + if (add.arguments.length == 2) + { + set = add.arguments[1]; + } + else if (add.arguments.length == 1) + { + set = this.plainMC; + } + else + { + throw "add(): " + add.arguments.length + " arguments given; expected 1 or 2"; + } + var rhs = add.arguments[0]; + //--com.ibm.icu.math.BigDecimal lhs; + var lhs; + //--int reqdig; + var reqdig; + //--com.ibm.icu.math.BigDecimal res; + var res; + //--byte usel[]; + var usel; + //--int usellen; + var usellen; + //--byte user[]; + var user; + //--int userlen; + var userlen; + //--int newlen=0; + var newlen=0; + //--int tlen=0; + var tlen=0; + //--int mult=0; + var mult=0; + //--byte t[]=null; + var t=null; + //--int ia=0; + var ia=0; + //--int ib=0; + var ib=0; + //--int ea=0; + var ea=0; + //int eb=0; + var eb=0; + //byte ca=0; + var ca=0; + //--byte cb=0; + var cb=0; + /* determine requested digits and form */ + if (set.lostDigits) + this.checkdigits(rhs,set.digits); + lhs=this; // name for clarity and proxy + + /* Quick exit for add floating 0 */ + // plus() will optimize to return same object if possible + if (lhs.ind==0) + if (set.form!=MathContext.prototype.PLAIN) + return rhs.plus(set); + if (rhs.ind==0) + if (set.form!=MathContext.prototype.PLAIN) + return lhs.plus(set); + + /* Prepare numbers (round, unless unlimited precision) */ + reqdig=set.digits; // local copy (heavily used) + if (reqdig>0) + { + if (lhs.mant.length>reqdig) + lhs=this.clone(lhs).round(set); + if (rhs.mant.length>reqdig) + rhs=this.clone(rhs).round(set); + // [we could reuse the new LHS for result in this case] + } + + res=new BigDecimal(); // build result here + + /* Now see how much we have to pad or truncate lhs or rhs in order + to align the numbers. If one number is much larger than the + other, then the smaller cannot affect the answer [but we may + still need to pad with up to DIGITS trailing zeros]. */ + // Note sign may be 0 if digits (reqdig) is 0 + // usel and user will be the byte arrays passed to the adder; we'll + // use them on all paths except quick exits + usel=lhs.mant; + usellen=lhs.mant.length; + user=rhs.mant; + userlen=rhs.mant.length; + {padder:do{/*select*/ + if (lhs.exp==rhs.exp) + {/* no padding needed */ + // This is the most common, and fastest, path + res.exp=lhs.exp; + } + else if (lhs.exp>rhs.exp) + { // need to pad lhs and/or truncate rhs + newlen=(usellen+lhs.exp)-rhs.exp; + /* If, after pad, lhs would be longer than rhs by digits+1 or + more (and digits>0) then rhs cannot affect answer, so we only + need to pad up to a length of DIGITS+1. */ + if (newlen>=((userlen+reqdig)+1)) + if (reqdig>0) + { + // LHS is sufficient + res.mant=usel; + res.exp=lhs.exp; + res.ind=lhs.ind; + if (usellen(reqdig+1)) + if (reqdig>0) + { + // LHS will be max; RHS truncated + tlen=(newlen-reqdig)-1; // truncation length + userlen=userlen-tlen; + res.exp=res.exp+tlen; + newlen=reqdig+1; + } + if (newlen>usellen) + usellen=newlen; // need to pad LHS + } + else{ // need to pad rhs and/or truncate lhs + newlen=(userlen+rhs.exp)-lhs.exp; + if (newlen>=((usellen+reqdig)+1)) + if (reqdig>0) + { + // RHS is sufficient + res.mant=user; + res.exp=rhs.exp; + res.ind=rhs.ind; + if (userlen(reqdig+1)) + if (reqdig>0) + { + // RHS will be max; LHS truncated + tlen=(newlen-reqdig)-1; // truncation length + usellen=usellen-tlen; + res.exp=res.exp+tlen; + newlen=reqdig+1; + } + if (newlen>userlen) + userlen=newlen; // need to pad RHS + } + }while(false);}/*padder*/ + + /* OK, we have aligned mantissas. Now add or subtract. */ + // 1998.06.27 Sign may now be 0 [e.g., 0.000] .. treat as positive + // 1999.05.27 Allow for 00 on lhs [is not larger than 2 on rhs] + // 1999.07.10 Allow for 00 on rhs [is not larger than 2 on rhs] + if (lhs.ind==this.iszero) + res.ind=this.ispos; + else + res.ind=lhs.ind; // likely sign, all paths + if (((lhs.ind==this.isneg)?1:0)==((rhs.ind==this.isneg)?1:0)) // same sign, 0 non-negative + mult=1; + else + {signdiff:do{ // different signs, so subtraction is needed + mult=-1; // will cause subtract + /* Before we can subtract we must determine which is the larger, + as our add/subtract routine only handles non-negative results + so we may need to swap the operands. */ + {swaptest:do{/*select*/ + if (rhs.ind==this.iszero) + {} // original A bigger + else if ((usellenuserlen) + {} // original A bigger + else{ + {/* logical lengths the same */ // need compare + /* may still need to swap: compare the strings */ + ia=0; + ib=0; + ea=usel.length-1; + eb=user.length-1; + {compare:for(;;){ + if (ia<=ea) + ca=usel[ia]; + else + { + if (ib>eb) + {/* identical */ + if (set.form!=MathContext.prototype.PLAIN) + return this.ZERO; + // [if PLAIN we must do the subtract, in case of 0.000 results] + break compare; + } + ca=0; + } + if (ib<=eb) + cb=user[ib]; + else + cb=0; + if (ca!=cb) + { + if (ca B if subtracting */ + // add [A+B*1] or subtract [A+(B*-1)] + res.mant=this.byteaddsub(usel,usellen,user,userlen,mult,false); + // [reuse possible only after chop; accounting makes not worthwhile] + + // Finish() rounds before stripping leading 0's, then sets form, etc. + return res.finish(set,false); + } + + /** + * Compares this BigDecimal to another, using unlimited + * precision. + *

      + * The same as {@link #compareTo(BigDecimal, MathContext)}, + * where the BigDecimal is rhs, + * and the context is new MathContext(0, MathContext.PLAIN). + * + * @param rhs The BigDecimal for the right hand side of + * the comparison. + * @return An int whose value is -1, 0, or 1 as + * this is numerically less than, equal to, + * or greater than rhs. + * @see #compareTo(Object) + * @stable ICU 2.0 + */ + + //--public int compareTo(com.ibm.icu.math.BigDecimal rhs){ + //-- return this.compareTo(rhs,plainMC); + //-- } + + /** + * Compares this BigDecimal to another. + *

      + * Implements numeric comparison, + * (as defined in the decimal documentation, see {@link BigDecimal + * class header}), + * and returns a result of type int. + *

      + * The result will be: + * + * + * + * + * + * + * + * + * + *
      -1if the current object is less than the first parameter
      0if the current object is equal to the first parameter
      1if the current object is greater than the first parameter.
      + *

      + * A {@link #compareTo(Object)} method is also provided. + * + * @param rhs The BigDecimal for the right hand side of + * the comparison. + * @param set The MathContext arithmetic settings. + * @return An int whose value is -1, 0, or 1 as + * this is numerically less than, equal to, + * or greater than rhs. + * @see #compareTo(Object) + * @stable ICU 2.0 + */ + + //public int compareTo(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){ + function compareTo() { + var set; + if (compareTo.arguments.length == 2) + { + set = compareTo.arguments[1]; + } + else if (compareTo.arguments.length == 1) + { + set = this.plainMC; + } + else + { + throw "compareTo(): " + compareTo.arguments.length + " arguments given; expected 1 or 2"; + } + var rhs = compareTo.arguments[0]; + //--int thislength=0; + var thislength=0; + //--int i=0; + var i=0; + //--com.ibm.icu.math.BigDecimal newrhs; + var newrhs; + // rhs=null will raise NullPointerException, as per Comparable interface + if (set.lostDigits) + this.checkdigits(rhs,set.digits); + // [add will recheck in slowpath cases .. but would report -rhs] + if ((this.ind==rhs.ind)&&(this.exp==rhs.exp)) + { + /* sign & exponent the same [very common] */ + thislength=this.mant.length; + if (thislengthrhs.mant.length) + return this.ind; + /* lengths are the same; we can do a straight mantissa compare + unless maybe rounding [rounding is very unusual] */ + if ((thislength<=set.digits)||(set.digits==0)) + { + {var $6=thislength;i=0;i:for(;$6>0;$6--,i++){ + if (this.mant[i]rhs.mant[i]) + return this.ind; + } + }/*i*/ + return 0; // identical + } + /* drop through for full comparison */ + } + else + { + /* More fastpaths possible */ + if (this.indrhs.ind) + return 1; + } + /* carry out a subtract to make the comparison */ + newrhs=this.clone(rhs); // safe copy + newrhs.ind=-newrhs.ind; // prepare to subtract + return this.add(newrhs,set).ind; // add, and return sign of result + } + + /** + * Returns a plain BigDecimal whose value is + * this/rhs, using fixed point arithmetic. + *

      + * The same as {@link #divide(BigDecimal, int)}, + * where the BigDecimal is rhs, + * and the rounding mode is {@link MathContext#ROUND_HALF_UP}. + * + * The length of the decimal part (the scale) of the result will be + * the same as the scale of the current object, if the latter were + * formatted without exponential notation. + * + * @param rhs The BigDecimal for the right hand side of + * the division. + * @return A plain BigDecimal whose value is + * this/rhs, using fixed point arithmetic. + * @throws ArithmeticException if rhs is zero. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal divide(com.ibm.icu.math.BigDecimal rhs){ + //-- return this.dodivide('D',rhs,plainMC,-1); + //-- } + + /** + * Returns a plain BigDecimal whose value is + * this/rhs, using fixed point arithmetic and a + * rounding mode. + *

      + * The same as {@link #divide(BigDecimal, int, int)}, + * where the BigDecimal is rhs, + * and the second parameter is this.scale(), and + * the third is round. + *

      + * The length of the decimal part (the scale) of the result will + * therefore be the same as the scale of the current object, if the + * latter were formatted without exponential notation. + *

      + * @param rhs The BigDecimal for the right hand side of + * the division. + * @param round The int rounding mode to be used for + * the division (see the {@link MathContext} class). + * @return A plain BigDecimal whose value is + * this/rhs, using fixed point arithmetic + * and the specified rounding mode. + * @throws IllegalArgumentException if round is not a + * valid rounding mode. + * @throws ArithmeticException if rhs is zero. + * @throws ArithmeticException if round is {@link + * MathContext#ROUND_UNNECESSARY} and + * this.scale() is insufficient to + * represent the result exactly. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal divide(com.ibm.icu.math.BigDecimal rhs,int round){ + //-- com.ibm.icu.math.MathContext set; + //-- set=new com.ibm.icu.math.MathContext(0,com.ibm.icu.math.MathContext.PLAIN,false,round); // [checks round, too] + //-- return this.dodivide('D',rhs,set,-1); // take scale from LHS + //-- } + + /** + * Returns a plain BigDecimal whose value is + * this/rhs, using fixed point arithmetic and a + * given scale and rounding mode. + *

      + * The same as {@link #divide(BigDecimal, MathContext)}, + * where the BigDecimal is rhs, + * new MathContext(0, MathContext.PLAIN, false, round), + * except that the length of the decimal part (the scale) to be used + * for the result is explicit rather than being taken from + * this. + *

      + * The length of the decimal part (the scale) of the result will be + * the same as the scale of the current object, if the latter were + * formatted without exponential notation. + *

      + * @param rhs The BigDecimal for the right hand side of + * the division. + * @param scale The int scale to be used for the result. + * @param round The int rounding mode to be used for + * the division (see the {@link MathContext} class). + * @return A plain BigDecimal whose value is + * this/rhs, using fixed point arithmetic + * and the specified rounding mode. + * @throws IllegalArgumentException if round is not a + * valid rounding mode. + * @throws ArithmeticException if rhs is zero. + * @throws ArithmeticException if scale is negative. + * @throws ArithmeticException if round is {@link + * MathContext#ROUND_UNNECESSARY} and scale + * is insufficient to represent the result exactly. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal divide(com.ibm.icu.math.BigDecimal rhs,int scale,int round){ + //-- com.ibm.icu.math.MathContext set; + //-- if (scale<0) + //-- throw new java.lang.ArithmeticException("Negative scale:"+" "+scale); + //-- set=new com.ibm.icu.math.MathContext(0,com.ibm.icu.math.MathContext.PLAIN,false,round); // [checks round] + //-- return this.dodivide('D',rhs,set,scale); + //-- } + + /** + * Returns a BigDecimal whose value is this/rhs. + *

      + * Implements the division (/) operator + * (as defined in the decimal documentation, see {@link BigDecimal + * class header}), + * and returns the result as a BigDecimal object. + * + * @param rhs The BigDecimal for the right hand side of + * the division. + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is + * this/rhs. + * @throws ArithmeticException if rhs is zero. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal divide(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){ + function divide() { + var set; + var scale = -1; + if (divide.arguments.length == 2) + { + if (typeof divide.arguments[1] == 'number') + { + set=new MathContext(0,MathContext.prototype.PLAIN,false,divide.arguments[1]); // [checks round, too] + } + else + { + set = divide.arguments[1]; + } + } + else if (divide.arguments.length == 3) + { + scale = divide.arguments[1]; + if (scale<0) + throw "divide(): Negative scale: "+scale; + set=new MathContext(0,MathContext.prototype.PLAIN,false,divide.arguments[2]); // [checks round] + } + else if (divide.arguments.length == 1) + { + set = this.plainMC; + } + else + { + throw "divide(): " + divide.arguments.length + " arguments given; expected between 1 and 3"; + } + var rhs = divide.arguments[0]; + return this.dodivide('D',rhs,set,scale); + } + + /** + * Returns a plain BigDecimal whose value is the integer + * part of this/rhs. + *

      + * The same as {@link #divideInteger(BigDecimal, MathContext)}, + * where the BigDecimal is rhs, + * and the context is new MathContext(0, MathContext.PLAIN). + * + * @param rhs The BigDecimal for the right hand side of + * the integer division. + * @return A BigDecimal whose value is the integer + * part of this/rhs. + * @throws ArithmeticException if rhs is zero. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal divideInteger(com.ibm.icu.math.BigDecimal rhs){ + //-- // scale 0 to drop .000 when plain + //-- return this.dodivide('I',rhs,plainMC,0); + //-- } + + /** + * Returns a BigDecimal whose value is the integer + * part of this/rhs. + *

      + * Implements the integer division operator + * (as defined in the decimal documentation, see {@link BigDecimal + * class header}), + * and returns the result as a BigDecimal object. + * + * @param rhs The BigDecimal for the right hand side of + * the integer division. + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is the integer + * part of this/rhs. + * @throws ArithmeticException if rhs is zero. + * @throws ArithmeticException if the result will not fit in the + * number of digits specified for the context. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal divideInteger(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){ + function divideInteger() { + var set; + if (divideInteger.arguments.length == 2) + { + set = divideInteger.arguments[1]; + } + else if (divideInteger.arguments.length == 1) + { + set = this.plainMC; + } + else + { + throw "divideInteger(): " + divideInteger.arguments.length + " arguments given; expected 1 or 2"; + } + var rhs = divideInteger.arguments[0]; + // scale 0 to drop .000 when plain + return this.dodivide('I',rhs,set,0); + } + + /** + * Returns a plain BigDecimal whose value is + * the maximum of this and rhs. + *

      + * The same as {@link #max(BigDecimal, MathContext)}, + * where the BigDecimal is rhs, + * and the context is new MathContext(0, MathContext.PLAIN). + * + * @param rhs The BigDecimal for the right hand side of + * the comparison. + * @return A BigDecimal whose value is + * the maximum of this and rhs. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal max(com.ibm.icu.math.BigDecimal rhs){ + //-- return this.max(rhs,plainMC); + //-- } + + /** + * Returns a BigDecimal whose value is + * the maximum of this and rhs. + *

      + * Returns the larger of the current object and the first parameter. + *

      + * If calling the {@link #compareTo(BigDecimal, MathContext)} method + * with the same parameters would return 1 or + * 0, then the result of calling the + * {@link #plus(MathContext)} method on the current object (using the + * same MathContext parameter) is returned. + * Otherwise, the result of calling the {@link #plus(MathContext)} + * method on the first parameter object (using the same + * MathContext parameter) is returned. + * + * @param rhs The BigDecimal for the right hand side of + * the comparison. + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is + * the maximum of this and rhs. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal max(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){ + function max() { + var set; + if (max.arguments.length == 2) + { + set = max.arguments[1]; + } + else if (max.arguments.length == 1) + { + set = this.plainMC; + } + else + { + throw "max(): " + max.arguments.length + " arguments given; expected 1 or 2"; + } + var rhs = max.arguments[0]; + if ((this.compareTo(rhs,set))>=0) + return this.plus(set); + else + return rhs.plus(set); + } + + /** + * Returns a plain BigDecimal whose value is + * the minimum of this and rhs. + *

      + * The same as {@link #min(BigDecimal, MathContext)}, + * where the BigDecimal is rhs, + * and the context is new MathContext(0, MathContext.PLAIN). + * + * @param rhs The BigDecimal for the right hand side of + * the comparison. + * @return A BigDecimal whose value is + * the minimum of this and rhs. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal min(com.ibm.icu.math.BigDecimal rhs){ + //-- return this.min(rhs,plainMC); + //-- } + + /** + * Returns a BigDecimal whose value is + * the minimum of this and rhs. + *

      + * Returns the smaller of the current object and the first parameter. + *

      + * If calling the {@link #compareTo(BigDecimal, MathContext)} method + * with the same parameters would return -1 or + * 0, then the result of calling the + * {@link #plus(MathContext)} method on the current object (using the + * same MathContext parameter) is returned. + * Otherwise, the result of calling the {@link #plus(MathContext)} + * method on the first parameter object (using the same + * MathContext parameter) is returned. + * + * @param rhs The BigDecimal for the right hand side of + * the comparison. + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is + * the minimum of this and rhs. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal min(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){ + function min() { + var set; + if (min.arguments.length == 2) + { + set = min.arguments[1]; + } + else if (min.arguments.length == 1) + { + set = this.plainMC; + } + else + { + throw "min(): " + min.arguments.length + " arguments given; expected 1 or 2"; + } + var rhs = min.arguments[0]; + if ((this.compareTo(rhs,set))<=0) + return this.plus(set); + else + return rhs.plus(set); + } + + /** + * Returns a plain BigDecimal whose value is + * this*rhs, using fixed point arithmetic. + *

      + * The same as {@link #add(BigDecimal, MathContext)}, + * where the BigDecimal is rhs, + * and the context is new MathContext(0, MathContext.PLAIN). + *

      + * The length of the decimal part (the scale) of the result will be + * the sum of the scales of the operands, if they were formatted + * without exponential notation. + * + * @param rhs The BigDecimal for the right hand side of + * the multiplication. + * @return A BigDecimal whose value is + * this*rhs, using fixed point arithmetic. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal multiply(com.ibm.icu.math.BigDecimal rhs){ + //-- return this.multiply(rhs,plainMC); + //-- } + + /** + * Returns a BigDecimal whose value is this*rhs. + *

      + * Implements the multiplication (*) operator + * (as defined in the decimal documentation, see {@link BigDecimal + * class header}), + * and returns the result as a BigDecimal object. + * + * @param rhs The BigDecimal for the right hand side of + * the multiplication. + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is + * this*rhs. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal multiply(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){ + function multiply() { + var set; + if (multiply.arguments.length == 2) + { + set = multiply.arguments[1]; + } + else if (multiply.arguments.length == 1) + { + set = this.plainMC; + } + else + { + throw "multiply(): " + multiply.arguments.length + " arguments given; expected 1 or 2"; + } + var rhs = multiply.arguments[0]; + //--com.ibm.icu.math.BigDecimal lhs; + var lhs; + //--int padding; + var padding; + //--int reqdig; + var reqdig; + //--byte multer[]=null; + var multer=null; + //--byte multand[]=null; + var multand=null; + //--int multandlen; + var multandlen; + //--int acclen=0; + var acclen=0; + //--com.ibm.icu.math.BigDecimal res; + var res; + //--byte acc[]; + var acc; + //--int n=0; + var n=0; + //--byte mult=0; + var mult=0; + if (set.lostDigits) + this.checkdigits(rhs,set.digits); + lhs=this; // name for clarity and proxy + + /* Prepare numbers (truncate, unless unlimited precision) */ + padding=0; // trailing 0's to add + reqdig=set.digits; // local copy + if (reqdig>0) + { + if (lhs.mant.length>reqdig) + lhs=this.clone(lhs).round(set); + if (rhs.mant.length>reqdig) + rhs=this.clone(rhs).round(set); + // [we could reuse the new LHS for result in this case] + } + else + {/* unlimited */ + // fixed point arithmetic will want every trailing 0; we add these + // after the calculation rather than before, for speed. + if (lhs.exp>0) + padding=padding+lhs.exp; + if (rhs.exp>0) + padding=padding+rhs.exp; + } + + // For best speed, as in DMSRCN, we use the shorter number as the + // multiplier and the longer as the multiplicand. + // 1999.12.22: We used to special case when the result would fit in + // a long, but with Java 1.3 this gave no advantage. + if (lhs.mant.length9) + acclen=multandlen+1; + else + acclen=multandlen; + + /* Now the main long multiplication loop */ + res=new BigDecimal(); // where we'll build result + acc=this.createArrayWithZeros(acclen); // accumulator, all zeros + // 1998.07.01: calculate from left to right so that accumulator goes + // to likely final length on first addition; this avoids a one-digit + // extension (and object allocation) each time around the loop. + // Initial number therefore has virtual zeros added to right. + {var $7=multer.length;n=0;n:for(;$7>0;$7--,n++){ + mult=multer[n]; + if (mult!=0) + { // [optimization] + // accumulate [accumulator is reusable array] + acc=this.byteaddsub(acc,acc.length,multand,multandlen,mult,true); + } + // divide multiplicand by 10 for next digit to right + multandlen--; // 'virtual length' + } + }/*n*/ + + res.ind=lhs.ind*rhs.ind; // final sign + res.exp=(lhs.exp+rhs.exp)-padding; // final exponent + // [overflow is checked by finish] + + /* add trailing zeros to the result, if necessary */ + if (padding==0) + res.mant=acc; + else + res.mant=this.extend(acc,acc.length+padding); // add trailing 0s + return res.finish(set,false); + } + + /** + * Returns a plain BigDecimal whose value is + * -this. + *

      + * The same as {@link #negate(MathContext)}, where the context is + * new MathContext(0, MathContext.PLAIN). + *

      + * The length of the decimal part (the scale) of the result will be + * be this.scale() + * + * + * @return A BigDecimal whose value is + * -this. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal negate(){ + //-- return this.negate(plainMC); + //-- } + + /** + * Returns a BigDecimal whose value is -this. + *

      + * Implements the negation (Prefix -) operator + * (as defined in the decimal documentation, see {@link BigDecimal + * class header}), + * and returns the result as a BigDecimal object. + * + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is + * -this. + * @stable ICU 2.0 + */ + + //public com.ibm.icu.math.BigDecimal negate(com.ibm.icu.math.MathContext set){ + function negate() { + var set; + if (negate.arguments.length == 1) + { + set = negate.arguments[0]; + } + else if (negate.arguments.length == 0) + { + set = this.plainMC; + } + else + { + throw "negate(): " + negate.arguments.length + " arguments given; expected 0 or 1"; + } + //--com.ibm.icu.math.BigDecimal res; + var res; + // Originally called minus(), changed to matched Java precedents + // This simply clones, flips the sign, and possibly rounds + if (set.lostDigits) + this.checkdigits(null,set.digits); + res=this.clone(this); // safe copy + res.ind=-res.ind; + return res.finish(set,false); + } + + /** + * Returns a plain BigDecimal whose value is + * +this. + * Note that this is not necessarily a + * plain BigDecimal, but the result will always be. + *

      + * The same as {@link #plus(MathContext)}, where the context is + * new MathContext(0, MathContext.PLAIN). + *

      + * The length of the decimal part (the scale) of the result will be + * be this.scale() + * + * @return A BigDecimal whose value is + * +this. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal plus(){ + //-- return this.plus(plainMC); + //-- } + + /** + * Returns a BigDecimal whose value is + * +this. + *

      + * Implements the plus (Prefix +) operator + * (as defined in the decimal documentation, see {@link BigDecimal + * class header}), + * and returns the result as a BigDecimal object. + *

      + * This method is useful for rounding or otherwise applying a context + * to a decimal value. + * + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is + * +this. + * @stable ICU 2.0 + */ + + //public com.ibm.icu.math.BigDecimal plus(com.ibm.icu.math.MathContext set){ + function plus() { + var set; + if (plus.arguments.length == 1) + { + set = plus.arguments[0]; + } + else if (plus.arguments.length == 0) + { + set = this.plainMC; + } + else + { + throw "plus(): " + plus.arguments.length + " arguments given; expected 0 or 1"; + } + // This clones and forces the result to the new settings + // May return same object + if (set.lostDigits) + this.checkdigits(null,set.digits); + // Optimization: returns same object for some common cases + if (set.form==MathContext.prototype.PLAIN) + if (this.form==MathContext.prototype.PLAIN) + { + if (this.mant.length<=set.digits) + return this; + if (set.digits==0) + return this; + } + return this.clone(this).finish(set,false); + } + + /** + * Returns a plain BigDecimal whose value is + * this**rhs, using fixed point arithmetic. + *

      + * The same as {@link #pow(BigDecimal, MathContext)}, + * where the BigDecimal is rhs, + * and the context is new MathContext(0, MathContext.PLAIN). + *

      + * The parameter is the power to which the this will be + * raised; it must be in the range 0 through 999999999, and must + * have a decimal part of zero. Note that these restrictions may be + * removed in the future, so they should not be used as a test for a + * whole number. + *

      + * In addition, the power must not be negative, as no + * MathContext is used and so the result would then + * always be 0. + * + * @param rhs The BigDecimal for the right hand side of + * the operation (the power). + * @return A BigDecimal whose value is + * this**rhs, using fixed point arithmetic. + * @throws ArithmeticException if rhs is out of range or + * is not a whole number. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal pow(com.ibm.icu.math.BigDecimal rhs){ + //-- return this.pow(rhs,plainMC); + //-- } + // The name for this method is inherited from the precedent set by the + // BigInteger and Math classes. + + /** + * Returns a BigDecimal whose value is this**rhs. + *

      + * Implements the power (**) operator + * (as defined in the decimal documentation, see {@link BigDecimal + * class header}), + * and returns the result as a BigDecimal object. + *

      + * The first parameter is the power to which the this + * will be raised; it must be in the range -999999999 through + * 999999999, and must have a decimal part of zero. Note that these + * restrictions may be removed in the future, so they should not be + * used as a test for a whole number. + *

      + * If the digits setting of the MathContext + * parameter is 0, the power must be zero or positive. + * + * @param rhs The BigDecimal for the right hand side of + * the operation (the power). + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is + * this**rhs. + * @throws ArithmeticException if rhs is out of range or + * is not a whole number. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal pow(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){ + function pow() { + var set; + if (pow.arguments.length == 2) + { + set = pow.arguments[1]; + } + else if (pow.arguments.length == 1) + { + set = this.plainMC; + } + else + { + throw "pow(): " + pow.arguments.length + " arguments given; expected 1 or 2"; + } + var rhs = pow.arguments[0]; + //--int n; + var n; + //--com.ibm.icu.math.BigDecimal lhs; + var lhs; + //--int reqdig; + var reqdig; + //-- int workdigits=0; + var workdigits=0; + //--int L=0; + var L=0; + //--com.ibm.icu.math.MathContext workset; + var workset; + //--com.ibm.icu.math.BigDecimal res; + var res; + //--boolean seenbit; + var seenbit; + //--int i=0; + var i=0; + if (set.lostDigits) + this.checkdigits(rhs,set.digits); + n=rhs.intcheck(this.MinArg,this.MaxArg); // check RHS by the rules + lhs=this; // clarified name + + reqdig=set.digits; // local copy (heavily used) + if (reqdig==0) + { + if (rhs.ind==this.isneg) + //--throw new java.lang.ArithmeticException("Negative power:"+" "+rhs.toString()); + throw "pow(): Negative power: " + rhs.toString(); + workdigits=0; + } + else + {/* non-0 digits */ + if ((rhs.mant.length+rhs.exp)>reqdig) + //--throw new java.lang.ArithmeticException("Too many digits:"+" "+rhs.toString()); + throw "pow(): Too many digits: " + rhs.toString(); + + /* Round the lhs to DIGITS if need be */ + if (lhs.mant.length>reqdig) + lhs=this.clone(lhs).round(set); + + /* L for precision calculation [see ANSI X3.274-1996] */ + L=rhs.mant.length+rhs.exp; // length without decimal zeros/exp + workdigits=(reqdig+L)+1; // calculate the working DIGITS + } + + /* Create a copy of set for working settings */ + // Note: no need to check for lostDigits again. + // 1999.07.17 Note: this construction must follow RHS check + workset=new MathContext(workdigits,set.form,false,set.roundingMode); + + res=this.ONE; // accumulator + if (n==0) + return res; // x**0 == 1 + if (n<0) + n=-n; // [rhs.ind records the sign] + seenbit=false; // set once we've seen a 1-bit + {i=1;i:for(;;i++){ // for each bit [top bit ignored] + //n=n+n; // shift left 1 bit + n<<=1; + if (n<0) + { // top bit is set + seenbit=true; // OK, we're off + res=res.multiply(lhs,workset); // acc=acc*x + } + if (i==31) + break i; // that was the last bit + if ((!seenbit)) + continue i; // we don't have to square 1 + res=res.multiply(res,workset); // acc=acc*acc [square] + } + }/*i*/ // 32 bits + if (rhs.ind<0) // was a **-n [hence digits>0] + res=this.ONE.divide(res,workset); // .. so acc=1/acc + return res.finish(set,true); // round and strip [original digits] + } + + /** + * Returns a plain BigDecimal whose value is + * the remainder of this/rhs, using fixed point arithmetic. + *

      + * The same as {@link #remainder(BigDecimal, MathContext)}, + * where the BigDecimal is rhs, + * and the context is new MathContext(0, MathContext.PLAIN). + *

      + * This is not the modulo operator -- the result may be negative. + * + * @param rhs The BigDecimal for the right hand side of + * the remainder operation. + * @return A BigDecimal whose value is the remainder + * of this/rhs, using fixed point arithmetic. + * @throws ArithmeticException if rhs is zero. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal remainder(com.ibm.icu.math.BigDecimal rhs){ + //-- return this.dodivide('R',rhs,plainMC,-1); + //-- } + + /** + * Returns a BigDecimal whose value is the remainder of + * this/rhs. + *

      + * Implements the remainder operator + * (as defined in the decimal documentation, see {@link BigDecimal + * class header}), + * and returns the result as a BigDecimal object. + *

      + * This is not the modulo operator -- the result may be negative. + * + * @param rhs The BigDecimal for the right hand side of + * the remainder operation. + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is the remainder + * of this+rhs. + * @throws ArithmeticException if rhs is zero. + * @throws ArithmeticException if the integer part of the result will + * not fit in the number of digits specified for the + * context. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal remainder(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){ + function remainder() { + var set; + if (remainder.arguments.length == 2) + { + set = remainder.arguments[1]; + } + else if (remainder.arguments.length == 1) + { + set = this.plainMC; + } + else + { + throw "remainder(): " + remainder.arguments.length + " arguments given; expected 1 or 2"; + } + var rhs = remainder.arguments[0]; + return this.dodivide('R',rhs,set,-1); + } + + /** + * Returns a plain BigDecimal whose value is + * this-rhs, using fixed point arithmetic. + *

      + * The same as {@link #subtract(BigDecimal, MathContext)}, + * where the BigDecimal is rhs, + * and the context is new MathContext(0, MathContext.PLAIN). + *

      + * The length of the decimal part (the scale) of the result will be + * the maximum of the scales of the two operands. + * + * @param rhs The BigDecimal for the right hand side of + * the subtraction. + * @return A BigDecimal whose value is + * this-rhs, using fixed point arithmetic. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal subtract(com.ibm.icu.math.BigDecimal rhs){ + //-- return this.subtract(rhs,plainMC); + //-- } + + /** + * Returns a BigDecimal whose value is this-rhs. + *

      + * Implements the subtraction (-) operator + * (as defined in the decimal documentation, see {@link BigDecimal + * class header}), + * and returns the result as a BigDecimal object. + * + * @param rhs The BigDecimal for the right hand side of + * the subtraction. + * @param set The MathContext arithmetic settings. + * @return A BigDecimal whose value is + * this-rhs. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal subtract(com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set){ + function subtract() { + var set; + if (subtract.arguments.length == 2) + { + set = subtract.arguments[1]; + } + else if (subtract.arguments.length == 1) + { + set = this.plainMC; + } + else + { + throw "subtract(): " + subtract.arguments.length + " arguments given; expected 1 or 2"; + } + var rhs = subtract.arguments[0]; + //--com.ibm.icu.math.BigDecimal newrhs; + var newrhs; + if (set.lostDigits) + this.checkdigits(rhs,set.digits); + // [add will recheck .. but would report -rhs] + /* carry out the subtraction */ + // we could fastpath -0, but it is too rare. + newrhs=this.clone(rhs); // safe copy + newrhs.ind=-newrhs.ind; // prepare to subtract + return this.add(newrhs,set); // arithmetic + } + + /* ---------------------------------------------------------------- */ + /* Other methods */ + /* ---------------------------------------------------------------- */ + + /** + * Converts this BigDecimal to a byte. + * If the BigDecimal has a non-zero decimal part or is + * out of the possible range for a byte (8-bit signed + * integer) result then an ArithmeticException is thrown. + * + * @return A byte equal in value to this. + * @throws ArithmeticException if this has a non-zero + * decimal part, or will not fit in a byte. + * @stable ICU 2.0 + */ + + //--public byte byteValueExact(){ + //-- int num; + //-- num=this.intValueExact(); // will check decimal part too + //-- if ((num>127)|(num<(-128))) + //-- throw new java.lang.ArithmeticException("Conversion overflow:"+" "+this.toString()); + //-- return (byte)num; + //-- } + + /** + * Compares this BigDecimal with the value of the parameter. + *

      + * If the parameter is null, or is not an instance of the + * BigDecimal type, an exception is thrown. + * Otherwise, the parameter is cast to type BigDecimal + * and the result of the {@link #compareTo(BigDecimal)} method, + * using the cast parameter, is returned. + *

      + * The {@link #compareTo(BigDecimal, MathContext)} method should be + * used when a MathContext is needed for the comparison. + * + * @param rhs The Object for the right hand side of + * the comparison. + * @return An int whose value is -1, 0, or 1 as + * this is numerically less than, equal to, + * or greater than rhs. + * @throws ClassCastException if rhs cannot be cast to + * a BigDecimal object. + * @see #compareTo(BigDecimal) + * @stable ICU 2.0 + */ + + //--public int compareTo(java.lang.Object rhsobj){ + //-- // the cast in the next line will raise ClassCastException if necessary + //-- return compareTo((com.ibm.icu.math.BigDecimal)rhsobj,plainMC); + //-- } + + /** + * Converts this BigDecimal to a double. + * If the BigDecimal is out of the possible range for a + * double (64-bit signed floating point) result then an + * ArithmeticException is thrown. + *

      + * The double produced is identical to result of expressing the + * BigDecimal as a String and then + * converting it using the Double(String) constructor; + * this can result in values of Double.NEGATIVE_INFINITY + * or Double.POSITIVE_INFINITY. + * + * @return A double corresponding to this. + * @stable ICU 2.0 + */ + + //--public double doubleValue(){ + //-- // We go via a String [as does BigDecimal in JDK 1.2] + //-- // Next line could possibly raise NumberFormatException + //-- return java.lang.Double.valueOf(this.toString()).doubleValue(); + //-- } + + /** + * Compares this BigDecimal with rhs for + * equality. + *

      + * If the parameter is null, or is not an instance of the + * BigDecimal type, or is not exactly equal to the current + * BigDecimal object, then false is returned. + * Otherwise, true is returned. + *

      + * "Exactly equal", here, means that the String + * representations of the BigDecimal numbers are + * identical (they have the same characters in the same sequence). + *

      + * The {@link #compareTo(BigDecimal, MathContext)} method should be + * used for more general comparisons. + * @param rhs The Object for the right hand side of + * the comparison. + * @return A boolean whose value true if and + * only if the operands have identical string representations. + * @throws ClassCastException if rhs cannot be cast to + * a BigDecimal object. + * @stable ICU 2.0 + * @see #compareTo(Object) + * @see #compareTo(BigDecimal) + * @see #compareTo(BigDecimal, MathContext) + */ + + //--public boolean equals(java.lang.Object obj){ + function equals(obj) { + //--com.ibm.icu.math.BigDecimal rhs; + var rhs; + //--int i=0; + var i=0; + //--char lca[]=null; + var lca=null; + //--char rca[]=null; + var rca=null; + // We are equal iff toString of both are exactly the same + if (obj==null) + return false; // not equal + if ((!(((obj instanceof BigDecimal))))) + return false; // not a decimal + rhs=obj; // cast; we know it will work + if (this.ind!=rhs.ind) + return false; // different signs never match + if (((this.mant.length==rhs.mant.length)&&(this.exp==rhs.exp))&&(this.form==rhs.form)) + + { // mantissas say all + // here with equal-length byte arrays to compare + {var $8=this.mant.length;i=0;i:for(;$8>0;$8--,i++){ + if (this.mant[i]!=rhs.mant[i]) + return false; + } + }/*i*/ + } + else + { // need proper layout + lca=this.layout(); // layout to character array + rca=rhs.layout(); + if (lca.length!=rca.length) + return false; // mismatch + // here with equal-length character arrays to compare + {var $9=lca.length;i=0;i:for(;$9>0;$9--,i++){ + if (lca[i]!=rca[i]) + return false; + } + }/*i*/ + } + return true; // arrays have identical content + } + + /** + * Converts this BigDecimal to a float. + * If the BigDecimal is out of the possible range for a + * float (32-bit signed floating point) result then an + * ArithmeticException is thrown. + *

      + * The float produced is identical to result of expressing the + * BigDecimal as a String and then + * converting it using the Float(String) constructor; + * this can result in values of Float.NEGATIVE_INFINITY + * or Float.POSITIVE_INFINITY. + * + * @return A float corresponding to this. + * @stable ICU 2.0 + */ + + //--public float floatValue(){ + //-- return java.lang.Float.valueOf(this.toString()).floatValue(); + //-- } + + /** + * Returns the String representation of this + * BigDecimal, modified by layout parameters. + *

      + * This method is provided as a primitive for use by more + * sophisticated classes, such as DecimalFormat, that + * can apply locale-sensitive editing of the result. The level of + * formatting that it provides is a necessary part of the BigDecimal + * class as it is sensitive to and must follow the calculation and + * rounding rules for BigDecimal arithmetic. + * However, if the function is provided elsewhere, it may be removed + * from this class. + *

      + * The parameters, for both forms of the format method + * are all of type int. + * A value of -1 for any parameter indicates that the default action + * or value for that parameter should be used. + *

      + * The parameters, before and after, + * specify the number of characters to be used for the integer part + * and decimal part of the result respectively. Exponential notation + * is not used. If either parameter is -1 (which indicates the default + * action), the number of characters used will be exactly as many as + * are needed for that part. + *

      + * before must be a positive number; if it is larger than + * is needed to contain the integer part, that part is padded on the + * left with blanks to the requested length. If before is + * not large enough to contain the integer part of the number + * (including the sign, for negative numbers) an exception is thrown. + *

      + * after must be a non-negative number; if it is not the + * same size as the decimal part of the number, the number will be + * rounded (or extended with zeros) to fit. Specifying 0 for + * after will cause the number to be rounded to an + * integer (that is, it will have no decimal part or decimal point). + * The rounding method will be the default, + * MathContext.ROUND_HALF_UP. + *

      + * Other rounding methods, and the use of exponential notation, can + * be selected by using {@link #format(int,int,int,int,int,int)}. + * Using the two-parameter form of the method has exactly the same + * effect as using the six-parameter form with the final four + * parameters all being -1. + * + * @param before The int specifying the number of places + * before the decimal point. Use -1 for 'as many as + * are needed'. + * @param after The int specifying the number of places + * after the decimal point. Use -1 for 'as many as are + * needed'. + * @return A String representing this + * BigDecimal, laid out according to the + * specified parameters + * @throws ArithmeticException if the number cannot be laid out as + * requested. + * @throws IllegalArgumentException if a parameter is out of range. + * @stable ICU 2.0 + * @see #toString + * @see #toCharArray + */ + + //--public java.lang.String format(int before,int after){ + //-- return format(before,after,-1,-1,com.ibm.icu.math.MathContext.SCIENTIFIC,ROUND_HALF_UP); + //-- } + + /** + * Returns the String representation of this + * BigDecimal, modified by layout parameters and allowing + * exponential notation. + *

      + * This method is provided as a primitive for use by more + * sophisticated classes, such as DecimalFormat, that + * can apply locale-sensitive editing of the result. The level of + * formatting that it provides is a necessary part of the BigDecimal + * class as it is sensitive to and must follow the calculation and + * rounding rules for BigDecimal arithmetic. + * However, if the function is provided elsewhere, it may be removed + * from this class. + *

      + * The parameters are all of type int. + * A value of -1 for any parameter indicates that the default action + * or value for that parameter should be used. + *

      + * The first two parameters (before and + * after) specify the number of characters to be used for + * the integer part and decimal part of the result respectively, as + * defined for {@link #format(int,int)}. + * If either of these is -1 (which indicates the default action), the + * number of characters used will be exactly as many as are needed for + * that part. + *

      + * The remaining parameters control the use of exponential notation + * and rounding. Three (explaces, exdigits, + * and exform) control the exponent part of the result. + * As before, the default action for any of these parameters may be + * selected by using the value -1. + *

      + * explaces must be a positive number; it sets the number + * of places (digits after the sign of the exponent) to be used for + * any exponent part, the default (when explaces is -1) + * being to use as many as are needed. + * If explaces is not -1, space is always reserved for + * an exponent; if one is not needed (for example, if the exponent + * will be 0) then explaces+2 blanks are appended to the + * result. + * + * If explaces is not -1 and is not large enough to + * contain the exponent, an exception is thrown. + *

      + * exdigits sets the trigger point for use of exponential + * notation. If, before any rounding, the number of places needed + * before the decimal point exceeds exdigits, or if the + * absolute value of the result is less than 0.000001, + * then exponential form will be used, provided that + * exdigits was specified. + * When exdigits is -1, exponential notation will never + * be used. If 0 is specified for exdigits, exponential + * notation is always used unless the exponent would be 0. + *

      + * exform sets the form for exponential notation (if + * needed). + * It may be either {@link MathContext#SCIENTIFIC} or + * {@link MathContext#ENGINEERING}. + * If the latter, engineering, form is requested, up to three digits + * (plus sign, if negative) may be needed for the integer part of the + * result (before). Otherwise, only one digit (plus + * sign, if negative) is needed. + *

      + * Finally, the sixth argument, exround, selects the + * rounding algorithm to be used, and must be one of the values + * indicated by a public constant in the {@link MathContext} class + * whose name starts with ROUND_. + * The default (ROUND_HALF_UP) may also be selected by + * using the value -1, as before. + *

      + * The special value MathContext.ROUND_UNNECESSARY may be + * used to detect whether non-zero digits are discarded -- if + * exround has this value than if non-zero digits would + * be discarded (rounded) during formatting then an + * ArithmeticException is thrown. + * + * @param before The int specifying the number of places + * before the decimal point. + * Use -1 for 'as many as are needed'. + * @param after The int specifying the number of places + * after the decimal point. + * Use -1 for 'as many as are needed'. + * @param explaces The int specifying the number of places + * to be used for any exponent. + * Use -1 for 'as many as are needed'. + * @param exdigits The int specifying the trigger + * (digits before the decimal point) which if + * exceeded causes exponential notation to be used. + * Use 0 to force exponential notation. + * Use -1 to force plain notation (no exponential + * notation). + * @param exform The int specifying the form of + * exponential notation to be used + * ({@link MathContext#SCIENTIFIC} or + * {@link MathContext#ENGINEERING}). + * @param exround The int specifying the rounding mode + * to use. + * Use -1 for the default, {@link MathContext#ROUND_HALF_UP}. + * @return A String representing this + * BigDecimal, laid out according to the + * specified parameters + * @throws ArithmeticException if the number cannot be laid out as + * requested. + * @throws IllegalArgumentException if a parameter is out of range. + * @see #toString + * @see #toCharArray + * @stable ICU 2.0 + */ + + //--public java.lang.String format(int before,int after,int explaces,int exdigits,int exformint,int exround){ + function format() { + var explaces; + var exdigits; + var exformint; + var exround; + if (format.arguments.length == 6) + { + explaces = format.arguments[2]; + exdigits = format.arguments[3]; + exformint = format.arguments[4]; + exround = format.arguments[5]; + } + else if (format.arguments.length == 2) + { + explaces = -1; + exdigits = -1; + exformint = MathContext.prototype.SCIENTIFIC; + exround = this.ROUND_HALF_UP; + } + else + { + throw "format(): " + format.arguments.length + " arguments given; expected 2 or 6"; + } + var before = format.arguments[0]; + var after = format.arguments[1]; + //--com.ibm.icu.math.BigDecimal num; + var num; + //--int mag=0; + var mag=0; + //--int thisafter=0; + var thisafter=0; + //--int lead=0; + var lead=0; + //--byte newmant[]=null; + var newmant=null; + //--int chop=0; + var chop=0; + //--int need=0; + var need=0; + //--int oldexp=0; + var oldexp=0; + //--char a[]; + var a; + //--int p=0; + var p=0; + //--char newa[]=null; + var newa=null; + //--int i=0; + var i=0; + //--int places=0; + var places=0; + + + /* Check arguments */ + if ((before<(-1))||(before==0)) + this.badarg("format",1,before); + if (after<(-1)) + this.badarg("format",2,after); + if ((explaces<(-1))||(explaces==0)) + this.badarg("format",3,explaces); + if (exdigits<(-1)) + this.badarg("format",4,exdigits); + {/*select*/ + if (exformint==MathContext.prototype.SCIENTIFIC) + {} + else if (exformint==MathContext.prototype.ENGINEERING) + {} + else if (exformint==(-1)) + exformint=MathContext.prototype.SCIENTIFIC; + // note PLAIN isn't allowed + else{ + this.badarg("format",5,exformint); + } + } + // checking the rounding mode is done by trying to construct a + // MathContext object with that mode; it will fail if bad + if (exround!=this.ROUND_HALF_UP) + {try{ // if non-default... + if (exround==(-1)) + exround=this.ROUND_HALF_UP; + else + new MathContext(9,MathContext.prototype.SCIENTIFIC,false,exround); + } + catch ($10){ + this.badarg("format",6,exround); + }} + + num=this.clone(this); // make private copy + + /* Here: + num is BigDecimal to format + before is places before point [>0] + after is places after point [>=0] + explaces is exponent places [>0] + exdigits is exponent digits [>=0] + exformint is exponent form [one of two] + exround is rounding mode [one of eight] + 'before' through 'exdigits' are -1 if not specified + */ + + /* determine form */ + {setform:do{/*select*/ + if (exdigits==(-1)) + num.form=MathContext.prototype.PLAIN; + else if (num.ind==this.iszero) + num.form=MathContext.prototype.PLAIN; + else{ + // determine whether triggers + mag=num.exp+num.mant.length; + if (mag>exdigits) + num.form=exformint; + else + if (mag<(-5)) + num.form=exformint; + else + num.form=MathContext.prototype.PLAIN; + } + }while(false);}/*setform*/ + + /* If 'after' was specified then we may need to adjust the + mantissa. This is a little tricky, as we must conform to the + rules of exponential layout if necessary (e.g., we cannot end up + with 10.0 if scientific). */ + if (after>=0) + {setafter:for(;;){ + // calculate the current after-length + {/*select*/ + if (num.form==MathContext.prototype.PLAIN) + thisafter=-num.exp; // has decimal part + else if (num.form==MathContext.prototype.SCIENTIFIC) + thisafter=num.mant.length-1; + else{ // engineering + lead=(((num.exp+num.mant.length)-1))%3; // exponent to use + if (lead<0) + lead=3+lead; // negative exponent case + lead++; // number of leading digits + if (lead>=num.mant.length) + thisafter=0; + else + thisafter=num.mant.length-lead; + } + } + if (thisafter==after) + break setafter; // we're in luck + if (thisafter0] + if (chop>num.mant.length) + { // all digits go, no chance of carry + // carry on with zero + num.mant=this.ZERO.mant; + num.ind=this.iszero; + num.exp=0; + continue setafter; // recheck: we may need trailing zeros + } + // we have a digit to inspect from existing mantissa + // round the number as required + need=num.mant.length-chop; // digits to end up with [may be 0] + oldexp=num.exp; // save old exponent + num.round(need,exround); + // if the exponent grew by more than the digits we chopped, then + // we must have had a carry, so will need to recheck the layout + if ((num.exp-oldexp)==chop) + break setafter; // number did not have carry + // mantissa got extended .. so go around and check again + } + }/*setafter*/ + + a=num.layout(); // lay out, with exponent if required, etc. + + /* Here we have laid-out number in 'a' */ + // now apply 'before' and 'explaces' as needed + if (before>0) + { + // look for '.' or 'E' + {var $11=a.length;p=0;p:for(;$11>0;$11--,p++){ + if (a[p]=='.') + break p; + if (a[p]=='E') + break p; + } + }/*p*/ + // p is now offset of '.', 'E', or character after end of array + // that is, the current length of before part + if (p>before) + this.badarg("format",1,before); // won't fit + if (p0;$12--,i++){ + newa[i]=' '; + } + }/*i*/ + //--java.lang.System.arraycopy((java.lang.Object)a,0,(java.lang.Object)newa,i,a.length); + this.arraycopy(a,0,newa,i,a.length); + a=newa; + } + // [if p=before then it's just the right length] + } + + if (explaces>0) + { + // look for 'E' [cannot be at offset 0] + {var $13=a.length-1;p=a.length-1;p:for(;$13>0;$13--,p--){ + if (a[p]=='E') + break p; + } + }/*p*/ + // p is now offset of 'E', or 0 + if (p==0) + { // no E part; add trailing blanks + newa=new Array((a.length+explaces)+2); + //--java.lang.System.arraycopy((java.lang.Object)a,0,(java.lang.Object)newa,0,a.length); + this.arraycopy(a,0,newa,0,a.length); + {var $14=explaces+2;i=a.length;i:for(;$14>0;$14--,i++){ + newa[i]=' '; + } + }/*i*/ + a=newa; + } + else + {/* found E */ // may need to insert zeros + places=(a.length-p)-2; // number so far + if (places>explaces) + this.badarg("format",3,explaces); + if (places0;$15--,i++){ + newa[i]='0'; + } + }/*i*/ + //--java.lang.System.arraycopy((java.lang.Object)a,p+2,(java.lang.Object)newa,i,places); // remainder of exponent + this.arraycopy(a,p+2,newa,i,places); + a=newa; + } + // [if places=explaces then it's just the right length] + } + } + return a.join(""); + } + + /** + * Returns the hashcode for this BigDecimal. + * This hashcode is suitable for use by the + * java.util.Hashtable class. + *

      + * Note that two BigDecimal objects are only guaranteed + * to produce the same hashcode if they are exactly equal (that is, + * the String representations of the + * BigDecimal numbers are identical -- they have the same + * characters in the same sequence). + * + * @return An int that is the hashcode for this. + * @stable ICU 2.0 + */ + + //--public int hashCode(){ + //-- // Maybe calculate ourselves, later. If so, note that there can be + //-- // more than one internal representation for a given toString() result. + //-- return this.toString().hashCode(); + //-- } + + /** + * Converts this BigDecimal to an int. + * If the BigDecimal has a non-zero decimal part it is + * discarded. If the BigDecimal is out of the possible + * range for an int (32-bit signed integer) result then + * only the low-order 32 bits are used. (That is, the number may be + * decapitated.) To avoid unexpected errors when these + * conditions occur, use the {@link #intValueExact} method. + * + * @return An int converted from this, + * truncated and decapitated if necessary. + * @stable ICU 2.0 + */ + + //--public int intValue(){ + //-- return toBigInteger().intValue(); + //-- } + + /** + * Converts this BigDecimal to an int. + * If the BigDecimal has a non-zero decimal part or is + * out of the possible range for an int (32-bit signed + * integer) result then an ArithmeticException is thrown. + * + * @return An int equal in value to this. + * @throws ArithmeticException if this has a non-zero + * decimal part, or will not fit in an + * int. + * @stable ICU 2.0 + */ + + //--public int intValueExact(){ + function intValueExact() { + //--int lodigit; + var lodigit; + //--int useexp=0; + var useexp=0; + //--int result; + var result; + //--int i=0; + var i=0; + //--int topdig=0; + var topdig=0; + // This does not use longValueExact() as the latter can be much + // slower. + // intcheck (from pow) relies on this to check decimal part + if (this.ind==this.iszero) + return 0; // easy, and quite common + /* test and drop any trailing decimal part */ + lodigit=this.mant.length-1; + if (this.exp<0) + { + lodigit=lodigit+this.exp; // reduces by -(-exp) + /* all decimal places must be 0 */ + if ((!(this.allzero(this.mant,lodigit+1)))) + throw "intValueExact(): Decimal part non-zero: " + this.toString(); + if (lodigit<0) + return 0; // -1=0 */ + if ((this.exp+lodigit)>9) // early exit + throw "intValueExact(): Conversion overflow: "+this.toString(); + useexp=this.exp; + } + /* convert the mantissa to binary, inline for speed */ + result=0; + {var $16=lodigit+useexp;i=0;i:for(;i<=$16;i++){ + result=result*10; + if (i<=lodigit) + result=result+this.mant[i]; + } + }/*i*/ + + /* Now, if the risky length, check for overflow */ + if ((lodigit+useexp)==9) + { + // note we cannot just test for -ve result, as overflow can move a + // zero into the top bit [consider 5555555555] + topdig=div(result,1000000000); // get top digit, preserving sign + if (topdig!=this.mant[0]) + { // digit must match and be positive + // except in the special case ... + if (result==-2147483648) // looks like the special + if (this.ind==this.isneg) // really was negative + if (this.mant[0]==2) + return result; // really had top digit 2 + throw "intValueExact(): Conversion overflow: "+this.toString(); + } + } + + /* Looks good */ + if (this.ind==this.ispos) + return result; + return -result; + } + + /** + * Converts this BigDecimal to a long. + * If the BigDecimal has a non-zero decimal part it is + * discarded. If the BigDecimal is out of the possible + * range for a long (64-bit signed integer) result then + * only the low-order 64 bits are used. (That is, the number may be + * decapitated.) To avoid unexpected errors when these + * conditions occur, use the {@link #longValueExact} method. + * + * @return A long converted from this, + * truncated and decapitated if necessary. + * @stable ICU 2.0 + */ + + //--public long longValue(){ + //-- return toBigInteger().longValue(); + //-- } + + /** + * Converts this BigDecimal to a long. + * If the BigDecimal has a non-zero decimal part or is + * out of the possible range for a long (64-bit signed + * integer) result then an ArithmeticException is thrown. + * + * @return A long equal in value to this. + * @throws ArithmeticException if this has a non-zero + * decimal part, or will not fit in a + * long. + * @stable ICU 2.0 + */ + + //--public long longValueExact(){ + //-- int lodigit; + //-- int cstart=0; + //-- int useexp=0; + //-- long result; + //-- int i=0; + //-- long topdig=0; + //-- // Identical to intValueExact except for result=long, and exp>=20 test + //-- if (ind==0) + //-- return 0; // easy, and quite common + //-- lodigit=mant.length-1; // last included digit + //-- if (exp<0) + //-- { + //-- lodigit=lodigit+exp; // -(-exp) + //-- /* all decimal places must be 0 */ + //-- if (lodigit<0) + //-- cstart=0; + //-- else + //-- cstart=lodigit+1; + //-- if ((!(allzero(mant,cstart)))) + //-- throw new java.lang.ArithmeticException("Decimal part non-zero:"+" "+this.toString()); + //-- if (lodigit<0) + //-- return 0; // -1=0 */ + //-- if ((exp+mant.length)>18) // early exit + //-- throw new java.lang.ArithmeticException("Conversion overflow:"+" "+this.toString()); + //-- useexp=exp; + //-- } + //-- + //-- /* convert the mantissa to binary, inline for speed */ + //-- // note that we could safely use the 'test for wrap to negative' + //-- // algorithm here, but instead we parallel the intValueExact + //-- // algorithm for ease of checking and maintenance. + //-- result=(long)0; + //-- {int $17=lodigit+useexp;i=0;i:for(;i<=$17;i++){ + //-- result=result*10; + //-- if (i<=lodigit) + //-- result=result+mant[i]; + //-- } + //-- }/*i*/ + //-- + //-- /* Now, if the risky length, check for overflow */ + //-- if ((lodigit+useexp)==18) + //-- { + //-- topdig=result/1000000000000000000L; // get top digit, preserving sign + //-- if (topdig!=mant[0]) + //-- { // digit must match and be positive + //-- // except in the special case ... + //-- if (result==java.lang.Long.MIN_VALUE) // looks like the special + //-- if (ind==isneg) // really was negative + //-- if (mant[0]==9) + //-- return result; // really had top digit 9 + //-- throw new java.lang.ArithmeticException("Conversion overflow:"+" "+this.toString()); + //-- } + //-- } + //-- + //-- /* Looks good */ + //-- if (ind==ispos) + //-- return result; + //-- return (long)-result; + //-- } + + /** + * Returns a plain BigDecimal whose decimal point has + * been moved to the left by a specified number of positions. + * The parameter, n, specifies the number of positions to + * move the decimal point. + * That is, if n is 0 or positive, the number returned is + * given by: + *

      + * this.multiply(TEN.pow(new BigDecimal(-n))) + * + *

      + * n may be negative, in which case the method returns + * the same result as movePointRight(-n). + * + * @param n The int specifying the number of places to + * move the decimal point leftwards. + * @return A BigDecimal derived from + * this, with the decimal point moved + * n places to the left. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal movePointLeft(int n){ + function movePointLeft(n) { + //--com.ibm.icu.math.BigDecimal res; + var res; + // very little point in optimizing for shift of 0 + res=this.clone(this); + res.exp=res.exp-n; + return res.finish(this.plainMC,false); // finish sets form and checks exponent + } + + /** + * Returns a plain BigDecimal whose decimal point has + * been moved to the right by a specified number of positions. + * The parameter, n, specifies the number of positions to + * move the decimal point. + * That is, if n is 0 or positive, the number returned is + * given by: + *

      + * this.multiply(TEN.pow(new BigDecimal(n))) + * + *

      + * n may be negative, in which case the method returns + * the same result as movePointLeft(-n). + * + * @param n The int specifying the number of places to + * move the decimal point rightwards. + * @return A BigDecimal derived from + * this, with the decimal point moved + * n places to the right. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal movePointRight(int n){ + function movePointRight(n) { + //--com.ibm.icu.math.BigDecimal res; + var res; + res=this.clone(this); + res.exp=res.exp+n; + return res.finish(this.plainMC,false); + } + + /** + * Returns the scale of this BigDecimal. + * Returns a non-negative int which is the scale of the + * number. The scale is the number of digits in the decimal part of + * the number if the number were formatted without exponential + * notation. + * + * @return An int whose value is the scale of this + * BigDecimal. + * @stable ICU 2.0 + */ + + //--public int scale(){ + function scale() { + if (this.exp>=0) + return 0; // scale can never be negative + return -this.exp; + } + + /** + * Returns a plain BigDecimal with a given scale. + *

      + * If the given scale (which must be zero or positive) is the same as + * or greater than the length of the decimal part (the scale) of this + * BigDecimal then trailing zeros will be added to the + * decimal part as necessary. + *

      + * If the given scale is less than the length of the decimal part (the + * scale) of this BigDecimal then trailing digits + * will be removed, and in this case an + * ArithmeticException is thrown if any discarded digits + * are non-zero. + *

      + * The same as {@link #setScale(int, int)}, where the first parameter + * is the scale, and the second is + * MathContext.ROUND_UNNECESSARY. + * + * @param scale The int specifying the scale of the + * resulting BigDecimal. + * @return A plain BigDecimal with the given scale. + * @throws ArithmeticException if scale is negative. + * @throws ArithmeticException if reducing scale would discard + * non-zero digits. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal setScale(int scale){ + //-- return setScale(scale,ROUND_UNNECESSARY); + //-- } + + /** + * Returns a plain BigDecimal with a given scale. + *

      + * If the given scale (which must be zero or positive) is the same as + * or greater than the length of the decimal part (the scale) of this + * BigDecimal then trailing zeros will be added to the + * decimal part as necessary. + *

      + * If the given scale is less than the length of the decimal part (the + * scale) of this BigDecimal then trailing digits + * will be removed, and the rounding mode given by the second + * parameter is used to determine if the remaining digits are + * affected by a carry. + * In this case, an IllegalArgumentException is thrown if + * round is not a valid rounding mode. + *

      + * If round is MathContext.ROUND_UNNECESSARY, + * an ArithmeticException is thrown if any discarded + * digits are non-zero. + * + * @param scale The int specifying the scale of the + * resulting BigDecimal. + * @param round The int rounding mode to be used for + * the division (see the {@link MathContext} class). + * @return A plain BigDecimal with the given scale. + * @throws IllegalArgumentException if round is not a + * valid rounding mode. + * @throws ArithmeticException if scale is negative. + * @throws ArithmeticException if round is + * MathContext.ROUND_UNNECESSARY, and + * reducing scale would discard non-zero digits. + * @stable ICU 2.0 + */ + + //--public com.ibm.icu.math.BigDecimal setScale(int scale,int round){ + function setScale() { + var round; + if (setScale.arguments.length == 2) + { + round = setScale.arguments[1]; + } + else if (setScale.arguments.length == 1) + { + round = this.ROUND_UNNECESSARY; + } + else + { + throw "setScale(): " + setScale.arguments.length + " given; expected 1 or 2"; + } + var scale = setScale.arguments[0]; + //--int ourscale; + var ourscale; + //--com.ibm.icu.math.BigDecimal res; + var res; + //--int padding=0; + var padding=0; + //--int newlen=0; + var newlen=0; + // at present this naughtily only checks the round value if it is + // needed (used), for speed + ourscale=this.scale(); + if (ourscale==scale) // already correct scale + if (this.form==MathContext.prototype.PLAIN) // .. and form + return this; + res=this.clone(this); // need copy + if (ourscale<=scale) + { // simply zero-padding/changing form + // if ourscale is 0 we may have lots of 0s to add + if (ourscale==0) + padding=res.exp+scale; + else + padding=scale-ourscale; + res.mant=this.extend(res.mant,res.mant.length+padding); + res.exp=-scale; // as requested + } + else + {/* ourscale>scale: shortening, probably */ + if (scale<0) + //--throw new java.lang.ArithmeticException("Negative scale:"+" "+scale); + throw "setScale(): Negative scale: " + scale; + // [round() will raise exception if invalid round] + newlen=res.mant.length-((ourscale-scale)); // [<=0 is OK] + res=res.round(newlen,round); // round to required length + // This could have shifted left if round (say) 0.9->1[.0] + // Repair if so by adding a zero and reducing exponent + if (res.exp!=(-scale)) + { + res.mant=this.extend(res.mant,res.mant.length+1); + res.exp=res.exp-1; + } + } + res.form=MathContext.prototype.PLAIN; // by definition + return res; + } + + /** + * Converts this BigDecimal to a short. + * If the BigDecimal has a non-zero decimal part or is + * out of the possible range for a short (16-bit signed + * integer) result then an ArithmeticException is thrown. + * + * @return A short equal in value to this. + * @throws ArithmeticException if this has a non-zero + * decimal part, or will not fit in a + * short. + * @stable ICU 2.0 + */ + + //--public short shortValueExact(){ + //-- int num; + //-- num=this.intValueExact(); // will check decimal part too + //-- if ((num>32767)|(num<(-32768))) + //-- throw new java.lang.ArithmeticException("Conversion overflow:"+" "+this.toString()); + //-- return (short)num; + //-- } + + /** + * Returns the sign of this BigDecimal, as an + * int. + * This returns the signum function value that represents the + * sign of this BigDecimal. + * That is, -1 if the BigDecimal is negative, 0 if it is + * numerically equal to zero, or 1 if it is positive. + * + * @return An int which is -1 if the + * BigDecimal is negative, 0 if it is + * numerically equal to zero, or 1 if it is positive. + * @stable ICU 2.0 + */ + + //--public int signum(){ + function signum() { + return this.ind; // [note this assumes values for ind.] + } + + /** + * Converts this BigDecimal to a + * java.math.BigDecimal. + *

      + * This is an exact conversion; the result is the same as if the + * BigDecimal were formatted as a plain number without + * any rounding or exponent and then the + * java.math.BigDecimal(java.lang.String) constructor + * were used to construct the result. + *

      + * (Note: this method is provided only in the + * com.ibm.icu.math version of the BigDecimal class. + * It would not be present in a java.math version.) + * + * @return The java.math.BigDecimal equal in value + * to this BigDecimal. + * @stable ICU 2.0 + */ + + //--public java.math.BigDecimal toBigDecimal(){ + //-- return new java.math.BigDecimal(this.unscaledValue(),this.scale()); + //-- } + + /** + * Converts this BigDecimal to a + * java.math.BigInteger. + *

      + * Any decimal part is truncated (discarded). + * If an exception is desired should the decimal part be non-zero, + * use {@link #toBigIntegerExact()}. + * + * @return The java.math.BigInteger equal in value + * to the integer part of this BigDecimal. + * @stable ICU 2.0 + */ + + //--public java.math.BigInteger toBigInteger(){ + //-- com.ibm.icu.math.BigDecimal res=null; + //-- int newlen=0; + //-- byte newmant[]=null; + //-- {/*select*/ + //-- if ((exp>=0)&(form==com.ibm.icu.math.MathContext.PLAIN)) + //-- res=this; // can layout simply + //-- else if (exp>=0) + //-- { + //-- res=clone(this); // safe copy + //-- res.form=(byte)com.ibm.icu.math.MathContext.PLAIN; // .. and request PLAIN + //-- } + //-- else{ + //-- { // exp<0; scale to be truncated + //-- // we could use divideInteger, but we may as well be quicker + //-- if (((int)-this.exp)>=this.mant.length) + //-- res=ZERO; // all blows away + //-- else + //-- { + //-- res=clone(this); // safe copy + //-- newlen=res.mant.length+res.exp; + //-- newmant=new byte[newlen]; // [shorter] + //-- java.lang.System.arraycopy((java.lang.Object)res.mant,0,(java.lang.Object)newmant,0,newlen); + //-- res.mant=newmant; + //-- res.form=(byte)com.ibm.icu.math.MathContext.PLAIN; + //-- res.exp=0; + //-- } + //-- } + //-- } + //-- } + //-- return new BigInteger(new java.lang.String(res.layout())); + //-- } + + /** + * Converts this BigDecimal to a + * java.math.BigInteger. + *

      + * An exception is thrown if the decimal part (if any) is non-zero. + * + * @return The java.math.BigInteger equal in value + * to the integer part of this BigDecimal. + * @throws ArithmeticException if this has a non-zero + * decimal part. + * @stable ICU 2.0 + */ + + //--public java.math.BigInteger toBigIntegerExact(){ + //-- /* test any trailing decimal part */ + //-- if (exp<0) + //-- { // possible decimal part + //-- /* all decimal places must be 0; note exp<0 */ + //-- if ((!(allzero(mant,mant.length+exp)))) + //-- throw new java.lang.ArithmeticException("Decimal part non-zero:"+" "+this.toString()); + //-- } + //-- return toBigInteger(); + //-- } + + /** + * Returns the BigDecimal as a character array. + * The result of this method is the same as using the + * sequence toString().toCharArray(), but avoids creating + * the intermediate String and char[] + * objects. + * + * @return The char[] array corresponding to this + * BigDecimal. + * @stable ICU 2.0 + */ + + //--public char[] toCharArray(){ + //-- return layout(); + //-- } + + /** + * Returns the BigDecimal as a String. + * This returns a String that exactly represents this + * BigDecimal, as defined in the decimal documentation + * (see {@link BigDecimal class header}). + *

      + * By definition, using the {@link #BigDecimal(String)} constructor + * on the result String will create a + * BigDecimal that is exactly equal to the original + * BigDecimal. + * + * @return The String exactly corresponding to this + * BigDecimal. + * @see #format(int, int) + * @see #format(int, int, int, int, int, int) + * @see #toCharArray() + * @stable ICU 2.0 + */ + + //--public java.lang.String toString(){ + function toString() { + return this.layout().join(""); + } + + /** + * Returns the number as a BigInteger after removing the + * scale. + * That is, the number is expressed as a plain number, any decimal + * point is then removed (retaining the digits of any decimal part), + * and the result is then converted to a BigInteger. + * + * @return The java.math.BigInteger equal in value to + * this BigDecimal multiplied by ten to the + * power of this.scale(). + * @stable ICU 2.0 + */ + + //--public java.math.BigInteger unscaledValue(){ + //-- com.ibm.icu.math.BigDecimal res=null; + //-- if (exp>=0) + //-- res=this; + //-- else + //-- { + //-- res=clone(this); // safe copy + //-- res.exp=0; // drop scale + //-- } + //-- return res.toBigInteger(); + //-- } + + /** + * Translates a double to a BigDecimal. + *

      + * Returns a BigDecimal which is the decimal + * representation of the 64-bit signed binary floating point + * parameter. If the parameter is infinite, or is not a number (NaN), + * a NumberFormatException is thrown. + *

      + * The number is constructed as though num had been + * converted to a String using the + * Double.toString() method and the + * {@link #BigDecimal(java.lang.String)} constructor had then been used. + * This is typically not an exact conversion. + * + * @param dub The double to be translated. + * @return The BigDecimal equal in value to + * dub. + * @throws NumberFormatException if the parameter is infinite or + * not a number. + * @stable ICU 2.0 + */ + + //--public static com.ibm.icu.math.BigDecimal valueOf(double dub){ + //-- // Reminder: a zero double returns '0.0', so we cannot fastpath to + //-- // use the constant ZERO. This might be important enough to justify + //-- // a factory approach, a cache, or a few private constants, later. + //-- return new com.ibm.icu.math.BigDecimal((new java.lang.Double(dub)).toString()); + //-- } + + /** + * Translates a long to a BigDecimal. + * That is, returns a plain BigDecimal whose value is + * equal to the given long. + * + * @param lint The long to be translated. + * @return The BigDecimal equal in value to + * lint. + * @stable ICU 2.0 + */ + + //--public static com.ibm.icu.math.BigDecimal valueOf(long lint){ + //-- return valueOf(lint,0); + //-- } + + /** + * Translates a long to a BigDecimal with a + * given scale. + * That is, returns a plain BigDecimal whose unscaled + * value is equal to the given long, adjusted by the + * second parameter, scale. + *

      + * The result is given by: + *

      + * (new BigDecimal(lint)).divide(TEN.pow(new BigDecimal(scale))) + * + *

      + * A NumberFormatException is thrown if scale + * is negative. + * + * @param lint The long to be translated. + * @param scale The int scale to be applied. + * @return The BigDecimal equal in value to + * lint. + * @throws NumberFormatException if the scale is negative. + * @stable ICU 2.0 + */ + + //--public static com.ibm.icu.math.BigDecimal valueOf(long lint,int scale){ + //-- com.ibm.icu.math.BigDecimal res=null; + //-- {/*select*/ + //-- if (lint==0) + //-- res=ZERO; + //-- else if (lint==1) + //-- res=ONE; + //-- else if (lint==10) + //-- res=TEN; + //-- else{ + //-- res=new com.ibm.icu.math.BigDecimal(lint); + //-- } + //-- } + //-- if (scale==0) + //-- return res; + //-- if (scale<0) + //-- throw new java.lang.NumberFormatException("Negative scale:"+" "+scale); + //-- res=clone(res); // safe copy [do not mutate] + //-- res.exp=(int)-scale; // exponent is -scale + //-- return res; + //-- } + + /* ---------------------------------------------------------------- */ + /* Private methods */ + /* ---------------------------------------------------------------- */ + + /* Return char array value of a BigDecimal (conversion from + BigDecimal to laid-out canonical char array). +

      The mantissa will either already have been rounded (following an + operation) or will be of length appropriate (in the case of + construction from an int, for example). +

      We must not alter the mantissa, here. +

      'form' describes whether we are to use exponential notation (and + if so, which), or if we are to lay out as a plain/pure numeric. + */ + + //--private char[] layout(){ + function layout() { + //--char cmant[]; + var cmant; + //--int i=0; + var i=0; + //--java.lang.StringBuffer sb=null; + var sb=null; + //--int euse=0; + var euse=0; + //--int sig=0; + var sig=0; + //--char csign=0; + var csign=0; + //--char rec[]=null; + var rec=null; + //--int needsign; + var needsign; + //--int mag; + var mag; + //--int len=0; + var len=0; + cmant=new Array(this.mant.length); // copy byte[] to a char[] + {var $18=this.mant.length;i=0;i:for(;$18>0;$18--,i++){ + cmant[i]=this.mant[i]+''; + } + }/*i*/ + + if (this.form!=MathContext.prototype.PLAIN) + {/* exponential notation needed */ + //--sb=new java.lang.StringBuffer(cmant.length+15); // -x.xxxE+999999999 + sb=""; + if (this.ind==this.isneg) + sb += '-'; + euse=(this.exp+cmant.length)-1; // exponent to use + /* setup sig=significant digits and copy to result */ + if (this.form==MathContext.prototype.SCIENTIFIC) + { // [default] + sb += cmant[0]; // significant character + if (cmant.length>1) // have decimal part + //--sb.append('.').append(cmant,1,cmant.length-1); + sb += '.'; + sb += cmant.slice(1).join(""); + } + else + {engineering:do{ + sig=euse%3; // common + if (sig<0) + sig=3+sig; // negative exponent + euse=euse-sig; + sig++; + if (sig>=cmant.length) + { // zero padding may be needed + //--sb.append(cmant,0,cmant.length); + sb += cmant.join(""); + {var $19=sig-cmant.length;for(;$19>0;$19--){ + sb += '0'; + } + } + } + else + { // decimal point needed + //--sb.append(cmant,0,sig).append('.').append(cmant,sig,cmant.length-sig); + sb += cmant.slice(0,sig).join(""); + sb += '.'; + sb += cmant.slice(sig).join(""); + } + }while(false);}/*engineering*/ + if (euse!=0) + { + if (euse<0) + { + csign='-'; + euse=-euse; + } + else + csign='+'; + //--sb.append('E').append(csign).append(euse); + sb += 'E'; + sb += csign; + sb += euse; + } + //--rec=new Array(sb.length); + //--Utility.getChars(sb, 0,sb.length(),rec,0); + //--return rec; + return sb.split(""); + } + + /* Here for non-exponential (plain) notation */ + if (this.exp==0) + {/* easy */ + if (this.ind>=0) + return cmant; // non-negative integer + rec=new Array(cmant.length+1); + rec[0]='-'; + //--java.lang.System.arraycopy((java.lang.Object)cmant,0,(java.lang.Object)rec,1,cmant.length); + this.arraycopy(cmant,0,rec,1,cmant.length); + return rec; + } + + /* Need a '.' and/or some zeros */ + needsign=((this.ind==this.isneg)?1:0); // space for sign? 0 or 1 + + /* MAG is the position of the point in the mantissa (index of the + character it follows) */ + mag=this.exp+cmant.length; + + if (mag<1) + {/* 0.00xxxx form */ + len=(needsign+2)-this.exp; // needsign+2+(-mag)+cmant.length + rec=new Array(len); + if (needsign!=0) + rec[0]='-'; + rec[needsign]='0'; + rec[needsign+1]='.'; + {var $20=-mag;i=needsign+2;i:for(;$20>0;$20--,i++){ // maybe none + rec[i]='0'; + } + }/*i*/ + //--java.lang.System.arraycopy((java.lang.Object)cmant,0,(java.lang.Object)rec,(needsign+2)-mag,cmant.length); + this.arraycopy(cmant,0,rec,(needsign+2)-mag,cmant.length); + return rec; + } + + if (mag>cmant.length) + {/* xxxx0000 form */ + len=needsign+mag; + rec=new Array(len); + if (needsign!=0) + rec[0]='-'; + //--java.lang.System.arraycopy((java.lang.Object)cmant,0,(java.lang.Object)rec,needsign,cmant.length); + this.arraycopy(cmant,0,rec,needsign,cmant.length); + {var $21=mag-cmant.length;i=needsign+cmant.length;i:for(;$21>0;$21--,i++){ // never 0 + rec[i]='0'; + } + }/*i*/ + return rec; + } + + /* decimal point is in the middle of the mantissa */ + len=(needsign+1)+cmant.length; + rec=new Array(len); + if (needsign!=0) + rec[0]='-'; + //--java.lang.System.arraycopy((java.lang.Object)cmant,0,(java.lang.Object)rec,needsign,mag); + this.arraycopy(cmant,0,rec,needsign,mag); + rec[needsign+mag]='.'; + //--java.lang.System.arraycopy((java.lang.Object)cmant,mag,(java.lang.Object)rec,(needsign+mag)+1,cmant.length-mag); + this.arraycopy(cmant,mag,rec,(needsign+mag)+1,cmant.length-mag); + return rec; + } + + /* Checks a BigDecimal argument to ensure it's a true integer + in a given range. +

      If OK, returns it as an int. */ + // [currently only used by pow] + + //--private int intcheck(int min,int max){ + function intcheck(min, max) { + //--int i; + var i; + i=this.intValueExact(); // [checks for non-0 decimal part] + // Use same message as though intValueExact failed due to size + if ((imax)) + throw "intcheck(): Conversion overflow: "+i; + return i; + } + + /* Carry out division operations. */ + /* + Arg1 is operation code: D=divide, I=integer divide, R=remainder + Arg2 is the rhs. + Arg3 is the context. + Arg4 is explicit scale iff code='D' or 'I' (-1 if none). + + Underlying algorithm (complications for Remainder function and + scaled division are omitted for clarity): + + Test for x/0 and then 0/x + Exp =Exp1 - Exp2 + Exp =Exp +len(var1) -len(var2) + Sign=Sign1 * Sign2 + Pad accumulator (Var1) to double-length with 0's (pad1) + Pad Var2 to same length as Var1 + B2B=1st two digits of var2, +1 to allow for roundup + have=0 + Do until (have=digits+1 OR residue=0) + if exp<0 then if integer divide/residue then leave + this_digit=0 + Do forever + compare numbers + if <0 then leave inner_loop + if =0 then (- quick exit without subtract -) do + this_digit=this_digit+1; output this_digit + leave outer_loop; end + Compare lengths of numbers (mantissae): + If same then CA=first_digit_of_Var1 + else CA=first_two_digits_of_Var1 + mult=ca*10/b2b -- Good and safe guess at divisor + if mult=0 then mult=1 + this_digit=this_digit+mult + subtract + end inner_loop + if have\=0 | this_digit\=0 then do + output this_digit + have=have+1; end + var2=var2/10 + exp=exp-1 + end outer_loop + exp=exp+1 -- set the proper exponent + if have=0 then generate answer=0 + Return to FINISHED + Result defined by MATHV1 + + For extended commentary, see DMSRCN. + */ + + //--private com.ibm.icu.math.BigDecimal dodivide(char code,com.ibm.icu.math.BigDecimal rhs,com.ibm.icu.math.MathContext set,int scale){ + function dodivide(code, rhs, set, scale) { + //--com.ibm.icu.math.BigDecimal lhs; + var lhs; + //--int reqdig; + var reqdig; + //--int newexp; + var newexp; + //--com.ibm.icu.math.BigDecimal res; + var res; + //--int newlen; + var newlen; + //--byte var1[]; + var var1; + //--int var1len; + var var1len; + //--byte var2[]; + var var2; + //--int var2len; + var var2len; + //--int b2b; + var b2b; + //--int have; + var have; + //--int thisdigit=0; + var thisdigit=0; + //--int i=0; + var i=0; + //--byte v2=0; + var v2=0; + //--int ba=0; + var ba=0; + //--int mult=0; + var mult=0; + //--int start=0; + var start=0; + //--int padding=0; + var padding=0; + //--int d=0; + var d=0; + //--byte newvar1[]=null; + var newvar1=null; + //--byte lasthave=0; + var lasthave=0; + //--int actdig=0; + var actdig=0; + //--byte newmant[]=null; + var newmant=null; + + if (set.lostDigits) + this.checkdigits(rhs,set.digits); + lhs=this; // name for clarity + + // [note we must have checked lostDigits before the following checks] + if (rhs.ind==0) + throw "dodivide(): Divide by 0"; // includes 0/0 + if (lhs.ind==0) + { // 0/x => 0 [possibly with .0s] + if (set.form!=MathContext.prototype.PLAIN) + return this.ZERO; + if (scale==(-1)) + return lhs; + return lhs.setScale(scale); + } + + /* Prepare numbers according to BigDecimal rules */ + reqdig=set.digits; // local copy (heavily used) + if (reqdig>0) + { + if (lhs.mant.length>reqdig) + lhs=this.clone(lhs).round(set); + if (rhs.mant.length>reqdig) + rhs=this.clone(rhs).round(set); + } + else + {/* scaled divide */ + if (scale==(-1)) + scale=lhs.scale(); + // set reqdig to be at least large enough for the computation + reqdig=lhs.mant.length; // base length + // next line handles both positive lhs.exp and also scale mismatch + if (scale!=(-lhs.exp)) + reqdig=(reqdig+scale)+lhs.exp; + reqdig=(reqdig-((rhs.mant.length-1)))-rhs.exp; // reduce by RHS effect + if (reqdig1) + b2b=b2b+var2[1]; + + /* start the long-division loops */ + have=0; + {outer:for(;;){ + thisdigit=0; + /* find the next digit */ + {inner:for(;;){ + if (var1len0;$22--,i++){ + // var1len is always <= var1.length + if (iv2) + break compare; // OK to subtract + } + }/*i*/ + /* reach here if lhs and rhs are identical; subtraction will + increase digit by one, and the residue will be 0 so we + are done; leave the loop with residue set to 0 (in case + code is 'R' or ROUND_UNNECESSARY or a ROUND_HALF_xxxx is + being checked) */ + thisdigit++; + res.mant[have]=thisdigit; + have++; + var1[0]=0; // residue to 0 [this is all we'll test] + // var1len=1 -- [optimized out] + break outer; + }while(false);}/*compare*/ + /* prepare for subtraction. Estimate BA (lengths the same) */ + ba=var1[0]; // use only first digit + } // lengths the same + else + {/* lhs longer than rhs */ + /* use first two digits for estimate */ + ba=var1[0]*10; + if (var1len>1) + ba=ba+var1[1]; + } + /* subtraction needed; V1>=V2 */ + mult=div((ba*10),b2b); + if (mult==0) + mult=1; + thisdigit=thisdigit+mult; + // subtract; var1 reusable + var1=this.byteaddsub(var1,var1len,var2,var2len,-mult,true); + if (var1[0]!=0) + continue inner; // maybe another subtract needed + /* V1 now probably has leading zeros, remove leading 0's and try + again. (It could be longer than V2) */ + {var $23=var1len-2;start=0;start:for(;start<=$23;start++){ + if (var1[start]!=0) + break start; + var1len--; + } + }/*start*/ + if (start==0) + continue inner; + // shift left + //--java.lang.System.arraycopy((java.lang.Object)var1,start,(java.lang.Object)var1,0,var1len); + this.arraycopy(var1,start,var1,0,var1len); + } + }/*inner*/ + + /* We have the next digit */ + if ((have!=0)||(thisdigit!=0)) + { // put the digit we got + res.mant[have]=thisdigit; + have++; + if (have==(reqdig+1)) + break outer; // we have all we need + if (var1[0]==0) + break outer; // residue now 0 + } + /* can leave now if a scaled divide and exponent is small enough */ + if (scale>=0) + if ((-res.exp)>scale) + break outer; + /* can leave now if not Divide and no integer part left */ + if (code!='D') + if (res.exp<=0) + break outer; + res.exp=res.exp-1; // reduce the exponent + /* to get here, V1 is less than V2, so divide V2 by 10 and go for + the next digit */ + var2len--; + } + }/*outer*/ + + /* here when we have finished dividing, for some reason */ + // have is the number of digits we collected in res.mant + if (have==0) + have=1; // res.mant[0] is 0; we always want a digit + + if ((code=='I')||(code=='R')) + {/* check for integer overflow needed */ + if ((have+res.exp)>reqdig) + throw "dodivide(): Integer overflow"; + + if (code=='R') + {remainder:do{ + /* We were doing Remainder -- return the residue */ + if (res.mant[0]==0) // no integer part was found + return this.clone(lhs).finish(set,false); // .. so return lhs, canonical + if (var1[0]==0) + return this.ZERO; // simple 0 residue + res.ind=lhs.ind; // sign is always as LHS + /* Calculate the exponent by subtracting the number of padding zeros + we added and adding the original exponent */ + padding=((reqdig+reqdig)+1)-lhs.mant.length; + res.exp=(res.exp-padding)+lhs.exp; + + /* strip insignificant padding zeros from residue, and create/copy + the resulting mantissa if need be */ + d=var1len; + {i=d-1;i:for(;i>=1;i--){if(!((res.exp=0) + {scaled:do{ + // say 'scale have res.exp len' scale have res.exp res.mant.length + if (have!=res.mant.length) + // already padded with 0's, so just adjust exponent + res.exp=res.exp-((res.mant.length-have)); + // calculate number of digits we really want [may be 0] + actdig=res.mant.length-(((-res.exp)-scale)); + res.round(actdig,set.roundingMode); // round to desired length + // This could have shifted left if round (say) 0.9->1[.0] + // Repair if so by adding a zero and reducing exponent + if (res.exp!=(-scale)) + { + res.mant=this.extend(res.mant,res.mant.length+1); + res.exp=res.exp-1; + } + return res.finish(set,true); // [strip if not PLAIN] + }while(false);}/*scaled*/ + + // reach here only if a non-scaled + if (have==res.mant.length) + { // got digits+1 digits + res.round(set); + have=reqdig; + } + else + {/* have<=reqdig */ + if (res.mant[0]==0) + return this.ZERO; // fastpath + // make the mantissa truly just 'have' long + // [we could let finish do this, during strip, if we adjusted + // the exponent; however, truncation avoids the strip loop] + newmant=new Array(have); // shorten + //--java.lang.System.arraycopy((java.lang.Object)res.mant,0,(java.lang.Object)newmant,0,have); + this.arraycopy(res.mant,0,newmant,0,have); + res.mant=newmant; + } + return res.finish(set,true); + } + + /* Report a conversion exception. */ + + //--private void bad(char s[]){ + function bad(prefix, s) { + throw prefix + "Not a number: "+s; + } + + /* Report a bad argument to a method. + Arg1 is method name + Arg2 is argument position + Arg3 is what was found */ + + //--private void badarg(java.lang.String name,int pos,java.lang.String value){ + function badarg(name, pos, value) { + throw "Bad argument "+pos+" to "+name+": "+value; + } + + /* Extend byte array to given length, padding with 0s. If no + extension is required then return the same array. + + Arg1 is the source byte array + Arg2 is the new length (longer) + */ + + //--private static final byte[] extend(byte inarr[],int newlen){ + function extend(inarr, newlen) { + //--byte newarr[]; + var newarr; + if (inarr.length==newlen) + return inarr; + newarr=createArrayWithZeros(newlen); + //--java.lang.System.arraycopy((java.lang.Object)inarr,0,(java.lang.Object)newarr,0,inarr.length); + this.arraycopy(inarr,0,newarr,0,inarr.length); + // 0 padding is carried out by the JVM on allocation initialization + return newarr; + } + + /* Add or subtract two >=0 integers in byte arrays +

      This routine performs the calculation: +

      +    C=A+(B*M)
      +    
      + Where M is in the range -9 through +9 +

      + If M<0 then A>=B must be true, so the result is always + non-negative. + + Leading zeros are not removed after a subtraction. The result is + either the same length as the longer of A and B, or 1 longer than + that (if a carry occurred). + + A is not altered unless Arg6 is 1. + B is never altered. + + Arg1 is A + Arg2 is A length to use (if longer than A, pad with 0's) + Arg3 is B + Arg4 is B length to use (if longer than B, pad with 0's) + Arg5 is M, the multiplier + Arg6 is 1 if A can be used to build the result (if it fits) + + This routine is severely performance-critical; *any* change here + must be measured (timed) to assure no performance degradation. + */ + // 1996.02.20 -- enhanced version of DMSRCN algorithm (1981) + // 1997.10.05 -- changed to byte arrays (from char arrays) + // 1998.07.01 -- changed to allow destructive reuse of LHS + // 1998.07.01 -- changed to allow virtual lengths for the arrays + // 1998.12.29 -- use lookaside for digit/carry calculation + // 1999.08.07 -- avoid multiply when mult=1, and make db an int + // 1999.12.22 -- special case m=-1, also drop 0 special case + + //--private static final byte[] byteaddsub(byte a[],int avlen,byte b[],int bvlen,int m,boolean reuse){ + function byteaddsub(a, avlen, b, bvlen, m, reuse) { + //--int alength; + var alength; + //--int blength; + var blength; + //--int ap; + var ap; + //--int bp; + var bp; + //--int maxarr; + var maxarr; + //--byte reb[]; + var reb; + //--boolean quickm; + var quickm; + //--int digit; + var digit; + //--int op=0; + var op=0; + //--int dp90=0; + var dp90=0; + //--byte newarr[]; + var newarr; + //--int i=0; + var i=0; + + + + + // We'll usually be right if we assume no carry + alength=a.length; // physical lengths + blength=b.length; // .. + ap=avlen-1; // -> final (rightmost) digit + bp=bvlen-1; // .. + maxarr=bp; + if (maxarr=0;op--){ + if (ap>=0) + { + if (ap=0) + { + if (bp0) + digit=digit+b[bp]; // most common + else + digit=digit-b[bp]; // also common + } + else + digit=digit+(b[bp]*m); + } + bp--; + } + /* result so far (digit) could be -90 through 99 */ + if (digit<10) + if (digit>=0) + {quick:do{ // 0-9 + reb[op]=digit; + digit=0; // no carry + continue op; + }while(false);}/*quick*/ + dp90=digit+90; + reb[op]=this.bytedig[dp90]; // this digit + digit=this.bytecar[dp90]; // carry or borrow + } + }/*op*/ + + if (digit==0) + return reb; // no carry + // following line will become an Assert, later + // if digit<0 then signal ArithmeticException("internal.error ["digit"]") + + /* We have carry -- need to make space for the extra digit */ + newarr=null; + if (reuse) + if ((maxarr+2)==a.length) + newarr=a; // OK to reuse A + if (newarr==null) + newarr=new Array(maxarr+2); + newarr[0]=digit; // the carried digit .. + // .. and all the rest [use local loop for short numbers] + //--if (maxarr<10) + {var $24=maxarr+1;i=0;i:for(;$24>0;$24--,i++){ + newarr[i+1]=reb[i]; + } + }/*i*/ + //--else + //--java.lang.System.arraycopy((java.lang.Object)reb,0,(java.lang.Object)newarr,1,maxarr+1); + return newarr; + } + + /* Initializer for digit array properties (lookaside). + Returns the digit array, and initializes the carry array. */ + + //--private static final byte[] diginit(){ + function diginit() { + //--byte work[]; + var work; + //--int op=0; + var op=0; + //--int digit=0; + var digit=0; + work=new Array((90+99)+1); + {op=0;op:for(;op<=(90+99);op++){ + digit=op-90; + if (digit>=0) + { + work[op]=(digit%10); + BigDecimal.prototype.bytecar[op]=(div(digit,10)); // calculate carry + continue op; + } + // borrowing... + digit=digit+100; // yes, this is right [consider -50] + work[op]=(digit%10); + BigDecimal.prototype.bytecar[op]=((div(digit,10))-10); // calculate borrow [NB: - after %] + } + }/*op*/ + return work; + } + + /* Create a copy of BigDecimal object for local use. +

      This does NOT make a copy of the mantissa array. + + Arg1 is the BigDecimal to clone (non-null) + */ + + //--private static final com.ibm.icu.math.BigDecimal clone(com.ibm.icu.math.BigDecimal dec){ + function clone(dec) { + //--com.ibm.icu.math.BigDecimal copy; + var copy; + copy=new BigDecimal(); + copy.ind=dec.ind; + copy.exp=dec.exp; + copy.form=dec.form; + copy.mant=dec.mant; + return copy; + } + + /* Check one or two numbers for lost digits. + Arg1 is RHS (or null, if none) + Arg2 is current DIGITS setting + returns quietly or throws an exception */ + + //--private void checkdigits(com.ibm.icu.math.BigDecimal rhs,int dig){ + function checkdigits(rhs, dig) { + if (dig==0) + return; // don't check if digits=0 + // first check lhs... + if (this.mant.length>dig) + if ((!(this.allzero(this.mant,dig)))) + throw "Too many digits: "+this.toString(); + if (rhs==null) + return; // monadic + if (rhs.mant.length>dig) + if ((!(this.allzero(rhs.mant,dig)))) + throw "Too many digits: "+rhs.toString(); + return; + } + + /* Round to specified digits, if necessary. + Arg1 is requested MathContext [with length and rounding mode] + returns this, for convenience */ + + //--private com.ibm.icu.math.BigDecimal round(com.ibm.icu.math.MathContext set){ + //-- return round(set.digits,set.roundingMode); + //-- } + + /* Round to specified digits, if necessary. + Arg1 is requested length (digits to round to) + [may be <=0 when called from format, dodivide, etc.] + Arg2 is rounding mode + returns this, for convenience + + ind and exp are adjusted, but not cleared for a mantissa of zero + + The length of the mantissa returned will be Arg1, except when Arg1 + is 0, in which case the returned mantissa length will be 1. + + */ + + //private com.ibm.icu.math.BigDecimal round(int len,int mode){ + function round() { + var len; + var mode; + if (round.arguments.length == 2) + { + len = round.arguments[0]; + mode = round.arguments[1]; + } + else if (round.arguments.length == 1) + { + var set = round.arguments[0]; + len = set.digits; + mode = set.roundingMode; + } + else + { + throw "round(): " + round.arguments.length + " arguments given; expected 1 or 2"; + } + //int adjust; + var adjust; + //int sign; + var sign; + //byte oldmant[]; + var oldmant; + //boolean reuse=false; + var reuse=false; + //--byte first=0; + var first=0; + //--int increment; + var increment; + //--byte newmant[]=null; + var newmant=null; + adjust=this.mant.length-len; + if (adjust<=0) + return this; // nowt to do + + this.exp=this.exp+adjust; // exponent of result + sign=this.ind; // save [assumes -1, 0, 1] + oldmant=this.mant; // save + if (len>0) + { + // remove the unwanted digits + this.mant=new Array(len); + //--java.lang.System.arraycopy((java.lang.Object)oldmant,0,(java.lang.Object)mant,0,len); + this.arraycopy(oldmant,0,this.mant,0,len); + reuse=true; // can reuse mantissa + first=oldmant[len]; // first of discarded digits + } + else + {/* len<=0 */ + this.mant=this.ZERO.mant; + this.ind=this.iszero; + reuse=false; // cannot reuse mantissa + if (len==0) + first=oldmant[0]; + else + first=0; // [virtual digit] + } + + // decide rounding adjustment depending on mode, sign, and discarded digits + increment=0; // bumper + {modes:do{/*select*/ + if (mode==this.ROUND_HALF_UP) + { // default first [most common] + if (first>=5) + increment=sign; + } + else if (mode==this.ROUND_UNNECESSARY) + { // default for setScale() + // discarding any non-zero digits is an error + if ((!(this.allzero(oldmant,len)))) + throw "round(): Rounding necessary"; + } + else if (mode==this.ROUND_HALF_DOWN) + { // 0.5000 goes down + if (first>5) + increment=sign; + else + if (first==5) + if ((!(this.allzero(oldmant,len+1)))) + increment=sign; + } + else if (mode==this.ROUND_HALF_EVEN) + { // 0.5000 goes down if left digit even + if (first>5) + increment=sign; + else + if (first==5) + { + if ((!(this.allzero(oldmant,len+1)))) + increment=sign; + else /* 0.5000 */ + if ((((this.mant[this.mant.length-1])%2))==1) + increment=sign; + } + } + else if (mode==this.ROUND_DOWN) + {} // never increment + else if (mode==this.ROUND_UP) + { // increment if discarded non-zero + if ((!(this.allzero(oldmant,len)))) + increment=sign; + } + else if (mode==this.ROUND_CEILING) + { // more positive + if (sign>0) + if ((!(this.allzero(oldmant,len)))) + increment=sign; + } + else if (mode==this.ROUND_FLOOR) + { // more negative + if (sign<0) + if ((!(this.allzero(oldmant,len)))) + increment=sign; + } + else{ + throw "round(): Bad round value: "+mode; + } + }while(false);}/*modes*/ + + if (increment!=0) + {bump:do{ + if (this.ind==this.iszero) + { + // we must not subtract from 0, but result is trivial anyway + this.mant=this.ONE.mant; + this.ind=increment; + } + else + { + // mantissa is non-0; we can safely add or subtract 1 + if (this.ind==this.isneg) + increment=-increment; + newmant=this.byteaddsub(this.mant,this.mant.length,this.ONE.mant,1,increment,reuse); + if (newmant.length>this.mant.length) + { // had a carry + // drop rightmost digit and raise exponent + this.exp++; + // mant is already the correct length + //java.lang.System.arraycopy((java.lang.Object)newmant,0,(java.lang.Object)mant,0,mant.length); + this.arraycopy(newmant,0,this.mant,0,this.mant.length); + } + else + this.mant=newmant; + } + }while(false);}/*bump*/ + // rounding can increase exponent significantly + if (this.exp>this.MaxExp) + throw "round(): Exponent Overflow: "+this.exp; + return this; + } + + /* Test if rightmost digits are all 0. + Arg1 is a mantissa array to test + Arg2 is the offset of first digit to check + [may be negative; if so, digits to left are 0's] + returns 1 if all the digits starting at Arg2 are 0 + + Arg2 may be beyond array bounds, in which case 1 is returned + */ + + //--private static final boolean allzero(byte array[],int start){ + function allzero(array, start) { + //--int i=0; + var i=0; + if (start<0) + start=0; + {var $25=array.length-1;i=start;i:for(;i<=$25;i++){ + if (array[i]!=0) + return false; + } + }/*i*/ + return true; + } + + /* Carry out final checks and canonicalization +

      + This finishes off the current number by: + 1. Rounding if necessary (NB: length includes leading zeros) + 2. Stripping trailing zeros (if requested and \PLAIN) + 3. Stripping leading zeros (always) + 4. Selecting exponential notation (if required) + 5. Converting a zero result to just '0' (if \PLAIN) + In practice, these operations overlap and share code. + It always sets form. + + Arg1 is requested MathContext (length to round to, trigger, and FORM) + Arg2 is 1 if trailing insignificant zeros should be removed after + round (for division, etc.), provided that set.form isn't PLAIN. + returns this, for convenience + */ + + //--private com.ibm.icu.math.BigDecimal finish(com.ibm.icu.math.MathContext set,boolean strip){ + function finish(set, strip) { + //--int d=0; + var d=0; + //--int i=0; + var i=0; + //--byte newmant[]=null; + var newmant=null; + //--int mag=0; + var mag=0; + //--int sig=0; + var sig=0; + /* Round if mantissa too long and digits requested */ + if (set.digits!=0) + if (this.mant.length>set.digits) + this.round(set); + + /* If strip requested (and standard formatting), remove + insignificant trailing zeros. */ + if (strip) + if (set.form!=MathContext.prototype.PLAIN) + { + d=this.mant.length; + /* see if we need to drop any trailing zeros */ + {i=d-1;i:for(;i>=1;i--){ + if (this.mant[i]!=0) + break i; + d--; + this.exp++; + } + }/*i*/ + if (d0;$26--,i++){ + if (this.mant[i]!=0) + { + // non-0 result; ind will be correct + // remove leading zeros [e.g., after subtract] + if (i>0) + {delead:do{ + newmant=new Array(this.mant.length-i); + //--java.lang.System.arraycopy((java.lang.Object)this.mant,i,(java.lang.Object)newmant,0,this.mant.length-i); + this.arraycopy(this.mant,i,newmant,0,this.mant.length-i); + this.mant=newmant; + }while(false);}/*delead*/ + // now determine form if not PLAIN + mag=this.exp+this.mant.length; + if (mag>0) + { // most common path + if (mag>set.digits) + if (set.digits!=0) + this.form=set.form; + if ((mag-1)<=this.MaxExp) + return this; // no overflow; quick return + } + else + if (mag<(-5)) + this.form=set.form; + /* check for overflow */ + mag--; + if ((magthis.MaxExp)) + {overflow:do{ + // possible reprieve if form is engineering + if (this.form==MathContext.prototype.ENGINEERING) + { + sig=mag%3; // leftover + if (sig<0) + sig=3+sig; // negative exponent + mag=mag-sig; // exponent to use + // 1999.06.29: second test here must be MaxExp + if (mag>=this.MinExp) + if (mag<=this.MaxExp) + break overflow; + } + throw "finish(): Exponent Overflow: "+mag; + }while(false);}/*overflow*/ + return this; + } + } + }/*i*/ + + // Drop through to here only if mantissa is all zeros + this.ind=this.iszero; + {/*select*/ + if (set.form!=MathContext.prototype.PLAIN) + this.exp=0; // standard result; go to '0' + else if (this.exp>0) + this.exp=0; // +ve exponent also goes to '0' + else{ + // a plain number with -ve exponent; preserve and check exponent + if (this.exp 0; + }; + function isLessThan(other) { + return this.compareTo(other) < 0; + }; + function isGreaterThanOrEqualTo(other) { + return this.compareTo(other) >= 0; + }; + function isLessThanOrEqualTo(other) { + return this.compareTo(other) <= 0; + }; + function isPositive() { + return this.compareTo(BigDecimal.prototype.ZERO) > 0; + }; + function isNegative() { + return this.compareTo(BigDecimal.prototype.ZERO) < 0; + }; + function isZero() { + return this.compareTo(BigDecimal.prototype.ZERO) === 0; + }; +return BigDecimal; +})(MathContext); // BigDecimal depends on MathContext + +if (typeof define === "function" && define.amd != null) { + // AMD-loader compatible resource declaration + // require('bigdecimal') will return JS Object: + // {'BigDecimal':BigDecimalPointer, 'MathContext':MathContextPointer} + define({'BigDecimal':BigDecimal, 'MathContext':MathContext}); +} else if (typeof this === "object"){ + // global-polluting outcome. + this.BigDecimal = BigDecimal; + this.MathContext = MathContext; +} + +}).call(this); // in browser 'this' will be 'window' or simulated window object in AMD-loading scenarios. diff --git a/bower_components/bignumber.js/perf/lib/bigdecimal_ICU4J/BigDecimal-all-last.min.js b/bower_components/bignumber.js/perf/lib/bigdecimal_ICU4J/BigDecimal-all-last.min.js new file mode 100644 index 00000000..01a29308 --- /dev/null +++ b/bower_components/bignumber.js/perf/lib/bigdecimal_ICU4J/BigDecimal-all-last.min.js @@ -0,0 +1,61 @@ +/* + Copyright (c) 2012 Daniel Trebbien and other contributors +Portions Copyright (c) 2003 STZ-IDA and PTV AG, Karlsruhe, Germany +Portions Copyright (c) 1995-2001 International Business Machines Corporation and others + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. +*/ +(function(){var y=function(){function h(){this.form=this.digits=0;this.lostDigits=!1;this.roundingMode=0;var v=this.DEFAULT_FORM,r=this.DEFAULT_LOSTDIGITS,f=this.DEFAULT_ROUNDINGMODE;if(4==h.arguments.length)v=h.arguments[1],r=h.arguments[2],f=h.arguments[3];else if(3==h.arguments.length)v=h.arguments[1],r=h.arguments[2];else if(2==h.arguments.length)v=h.arguments[1];else if(1!=h.arguments.length)throw"MathContext(): "+h.arguments.length+" arguments given; expected 1 to 4";var t=h.arguments[0];if(t!= +this.DEFAULT_DIGITS){if(tthis.MAX_DIGITS)throw"MathContext(): Digits too large: "+t;}if(v!=this.SCIENTIFIC&&v!=this.ENGINEERING&&v!=this.PLAIN)throw"MathContext() Bad form value: "+v;if(!this.isValidRound(f))throw"MathContext(): Bad roundingMode value: "+f;this.digits=t;this.form=v;this.lostDigits=r;this.roundingMode=f}h.prototype.getDigits=function(){return this.digits};h.prototype.getForm=function(){return this.form};h.prototype.getLostDigits= +function(){return this.lostDigits};h.prototype.getRoundingMode=function(){return this.roundingMode};h.prototype.toString=function(){var h=null,r=0,f=null,h=this.form==this.SCIENTIFIC?"SCIENTIFIC":this.form==this.ENGINEERING?"ENGINEERING":"PLAIN",t=this.ROUNDS.length,r=0;a:for(;0=c&&this.bad("BigDecimal(): ",a);this.ind=this.ispos;"-"==a[0]?(c--,0==c&&this.bad("BigDecimal(): ",a),this.ind=this.isneg,b++):"+"==a[0]&&(c--,0==c&&this.bad("BigDecimal(): ",a),b++);e=d=!1;n=0;k=g=-1;q=c;l=b;a:for(;0=m){k=l;n++;continue a}if("."==m){0<=g&&this.bad("BigDecimal(): ", +a);g=l-b;continue a}if("e"!=m&&"E"!=m){("0">m||"9"c-2&&this.bad("BigDecimal(): ",a);e=!1;"-"==a[l+1]?(e=!0,l+=2):l="+"==a[l+1]?l+2:l+1;m=c-(l-b);(0==m||9q&&this.bad("BigDecimal(): ",a),"9"=q?this.mant[l]=q-0:this.bad("BigDecimal(): ",a),m++;else for(b=n,l=0;0this.MaxExp)&&this.bad("BigDecimal(): ",a))}}function t(){var a; +if(1==t.arguments.length)a=t.arguments[0];else if(0==t.arguments.length)a=this.plainMC;else throw"abs(): "+t.arguments.length+" arguments given; expected 0 or 1";return this.ind==this.isneg?this.negate(a):this.plus(a)}function z(){var a;if(2==z.arguments.length)a=z.arguments[1];else if(1==z.arguments.length)a=this.plainMC;else throw"add(): "+z.arguments.length+" arguments given; expected 1 or 2";var b=z.arguments[0],c,d,e,n,g,k,l,m=0;d=m=0;var m=null,q=m=0,p=0,r=0,t=0,s=0;a.lostDigits&&this.checkdigits(b, +a.digits);c=this;if(0==c.ind&&a.form!=h.prototype.PLAIN)return b.plus(a);if(0==b.ind&&a.form!=h.prototype.PLAIN)return c.plus(a);d=a.digits;0d&&(c=this.clone(c).round(a)),b.mant.length>d&&(b=this.clone(b).round(a)));e=new f;n=c.mant;g=c.mant.length;k=b.mant;l=b.mant.length;if(c.exp==b.exp)e.exp=c.exp;else if(c.exp>b.exp){m=g+c.exp-b.exp;if(m>=l+d+1&&0d+1&&0g&&(g=m)}else{m=l+b.exp-c.exp;if(m>=g+d+1&&0d+1&&0l&&(l=m)}e.ind=c.ind==this.iszero?this.ispos:c.ind;if((c.ind==this.isneg?1:0)==(b.ind==this.isneg?1:0))d=1;else{do{d=-1;do if(b.ind!=this.iszero)if(gl))c:for(q=m=0,p=n.length-1,r=k.length-1;;){if(m<= +p)t=n[m];else{if(q>r){if(a.form!=h.prototype.PLAIN)return this.ZERO;break c}t=0}s=q<=r?k[q]:0;if(t!=s){tb.mant.length)return this.ind;if(c<=a.digits||0==a.digits){a=c;c=0;for(;0b.mant[c])return this.ind}return 0}}else{if(this.indb.ind)return 1}b=this.clone(b);b.ind=-b.ind;return this.add(b,a).ind}function u(){var a,b=-1;if(2==u.arguments.length)a="number"==typeof u.arguments[1]?new h(0,h.prototype.PLAIN,!1,u.arguments[1]): +u.arguments[1];else if(3==u.arguments.length){b=u.arguments[1];if(0>b)throw"divide(): Negative scale: "+b;a=new h(0,h.prototype.PLAIN,!1,u.arguments[2])}else if(1==u.arguments.length)a=this.plainMC;else throw"divide(): "+u.arguments.length+" arguments given; expected between 1 and 3";return this.dodivide("D",u.arguments[0],a,b)}function B(){var a;if(2==B.arguments.length)a=B.arguments[1];else if(1==B.arguments.length)a=this.plainMC;else throw"divideInteger(): "+B.arguments.length+" arguments given; expected 1 or 2"; +return this.dodivide("I",B.arguments[0],a,0)}function C(){var a;if(2==C.arguments.length)a=C.arguments[1];else if(1==C.arguments.length)a=this.plainMC;else throw"max(): "+C.arguments.length+" arguments given; expected 1 or 2";var b=C.arguments[0];return 0<=this.compareTo(b,a)?this.plus(a):b.plus(a)}function D(){var a;if(2==D.arguments.length)a=D.arguments[1];else if(1==D.arguments.length)a=this.plainMC;else throw"min(): "+D.arguments.length+" arguments given; expected 1 or 2";var b=D.arguments[0]; +return 0>=this.compareTo(b,a)?this.plus(a):b.plus(a)}function E(){var a;if(2==E.arguments.length)a=E.arguments[1];else if(1==E.arguments.length)a=this.plainMC;else throw"multiply(): "+E.arguments.length+" arguments given; expected 1 or 2";var b=E.arguments[0],c,d,e,h=e=null,g,k=0,l,m=0,q=0;a.lostDigits&&this.checkdigits(b,a.digits);c=this;d=0;e=a.digits;0e&&(c=this.clone(c).round(a)),b.mant.length>e&&(b=this.clone(b).round(a))):(0e)throw"pow(): Too many digits: "+b.toString();d.mant.length>e&&(d=this.clone(d).round(a));f=b.mant.length+b.exp;e=e+f+1}e= +new h(e,a.form,!1,a.roundingMode);f=this.ONE;if(0==c)return f;0>c&&(c=-c);g=!1;k=1;a:for(;;k++){c<<=1;0>c&&(g=!0,f=f.multiply(d,e));if(31==k)break a;if(!g)continue a;f=f.multiply(f,e)}0>b.ind&&(f=this.ONE.divide(f,e));return f.finish(a,!0)}function G(){var a;if(2==G.arguments.length)a=G.arguments[1];else if(1==G.arguments.length)a=this.plainMC;else throw"remainder(): "+G.arguments.length+" arguments given; expected 1 or 2";return this.dodivide("R",G.arguments[0],a,-1)}function H(){var a;if(2==H.arguments.length)a= +H.arguments[1];else if(1==H.arguments.length)a=this.plainMC;else throw"subtract(): "+H.arguments.length+" arguments given; expected 1 or 2";var b=H.arguments[0];a.lostDigits&&this.checkdigits(b,a.digits);b=this.clone(b);b.ind=-b.ind;return this.add(b,a)}function w(){var a,b,c,d;if(6==w.arguments.length)a=w.arguments[2],b=w.arguments[3],c=w.arguments[4],d=w.arguments[5];else if(2==w.arguments.length)b=a=-1,c=h.prototype.SCIENTIFIC,d=this.ROUND_HALF_UP;else throw"format(): "+w.arguments.length+" arguments given; expected 2 or 6"; +var e=w.arguments[0],f=w.arguments[1],g,k=0,k=k=0,l=null,m=l=k=0;g=0;k=null;m=l=0;(-1>e||0==e)&&this.badarg("format",1,e);-1>f&&this.badarg("format",2,f);(-1>a||0==a)&&this.badarg("format",3,a);-1>b&&this.badarg("format",4,b);c!=h.prototype.SCIENTIFIC&&c!=h.prototype.ENGINEERING&&(-1==c?c=h.prototype.SCIENTIFIC:this.badarg("format",5,c));if(d!=this.ROUND_HALF_UP)try{-1==d?d=this.ROUND_HALF_UP:new h(9,h.prototype.SCIENTIFIC,!1,d)}catch(q){this.badarg("format",6,d)}g=this.clone(this);-1==b?g.form=h.prototype.PLAIN: +g.ind==this.iszero?g.form=h.prototype.PLAIN:(k=g.exp+g.mant.length,g.form=k>b?c:-5>k?c:h.prototype.PLAIN);if(0<=f)a:for(;;){g.form==h.prototype.PLAIN?k=-g.exp:g.form==h.prototype.SCIENTIFIC?k=g.mant.length-1:(k=(g.exp+g.mant.length-1)%3,0>k&&(k=3+k),k++,k=k>=g.mant.length?0:g.mant.length-k);if(k==f)break a;if(kg.mant.length){g.mant=this.ZERO.mant;g.ind= +this.iszero;g.exp=0;continue a}l=g.mant.length-k;m=g.exp;g.round(l,d);if(g.exp-m==k)break a}b=g.layout();if(0e&&this.badarg("format",1,e);if(ga&&this.badarg("format",3,a),mb)throw"setScale(): Negative scale: "+b;c=d.mant.length-(c-b);d=d.round(c,a);d.exp!=-b&&(d.mant=this.extend(d.mant,d.mant.length+1),d.exp-=1)}d.form=h.prototype.PLAIN;return d}function y(){var a,b=0,c=0;a=Array(190);b=0;a:for(;189>=b;b++){c=b-90;if(0<=c){a[b]=c%10;f.prototype.bytecar[b]=v(c,10);continue a}c+=100;a[b]=c%10;f.prototype.bytecar[b]=v(c,10)-10}return a}function x(){var a,b;if(2==x.arguments.length)a= +x.arguments[0],b=x.arguments[1];else if(1==x.arguments.length)b=x.arguments[0],a=b.digits,b=b.roundingMode;else throw"round(): "+x.arguments.length+" arguments given; expected 1 or 2";var c,d,e=!1,f=0,g;c=null;c=this.mant.length-a;if(0>=c)return this;this.exp+=c;c=this.ind;d=this.mant;0c&&(this.allzero(d,a)||(g=c));else throw"round(): Bad round value: "+b;0!=g&&(this.ind==this.iszero?(this.mant= +this.ONE.mant,this.ind=g):(this.ind==this.isneg&&(g=-g),c=this.byteaddsub(this.mant,this.mant.length,this.ONE.mant,1,g,e),c.length>this.mant.length?(this.exp++,this.arraycopy(c,0,this.mant,0,this.mant.length)):this.mant=c));if(this.exp>this.MaxExp)throw"round(): Exponent Overflow: "+this.exp;return this}f.prototype.div=v;f.prototype.arraycopy=function(a,b,c,d,e){var f;if(d>b)for(f=e-1;0<=f;--f)c[f+d]=a[f+b];else for(f=0;fthis.exp){a+=this.exp;if(!this.allzero(this.mant,a+1))throw"intValueExact(): Decimal part non-zero: "+this.toString();if(0>a)return 0;b=0}else{if(9d&&(d=3+d),c-=d,d++,d>=a.length)for(b+=a.join(""),a=d-a.length;0c?(a="-",c=-c):a="+",b+="E",b+=a,b+=c);return b.split("")}if(0==this.exp){if(0<=this.ind)return a;d=Array(a.length+1);d[0]="-";this.arraycopy(a,0,d,1,a.length);return d}c=this.ind==this.isneg?1:0;e=this.exp+a.length;if(1>e){b=c+2-this.exp;d=Array(b);0!=c&&(d[0]="-");d[c]="0";d[c+1]=".";var f=-e,b=c+2;for(;0a.length){d=Array(c+e);0!=c&&(d[0]="-");this.arraycopy(a,0,d,c,a.length);e-=a.length;b=c+a.length;for(;0b)throw"intcheck(): Conversion overflow: "+c;return c};f.prototype.dodivide=function(a,b,c,d){var e,n,g,k,l,m,q,p,t,r=0,s=0,u=0;n=n=s=s=s= +0;e=null;e=e=0;e=null;c.lostDigits&&this.checkdigits(b,c.digits);e=this;if(0==b.ind)throw"dodivide(): Divide by 0";if(0==e.ind)return c.form!=h.prototype.PLAIN?this.ZERO:-1==d?e:e.setScale(d);n=c.digits;0n&&(e=this.clone(e).round(c)),b.mant.length>n&&(b=this.clone(b).round(c))):(-1==d&&(d=e.scale()),n=e.mant.length,d!=-e.exp&&(n=n+d+e.exp),n=n-(b.mant.length-1)-b.exp,ng&&"D"!=a)return"I"==a?this.ZERO:this.clone(e).finish(c,!1);k=new f;k.ind=e.ind*b.ind;k.exp=g;k.mant=this.createArrayWithZeros(n+1);l=n+n+1;g=this.extend(e.mant,l);m=l;q=b.mant;p=l;t=10*q[0]+1;1u)break c}r++;k.mant[l]=r;l++;g[0]=0;break a}while(0);s=g[0]}else s=10*g[0],1d)break a;if("D"!=a&&0>=k.exp)break a;k.exp-=1;p--}0==l&&(l=1);if("I"==a||"R"==a){if(l+k.exp>n)throw"dodivide(): Integer overflow";if("R"==a){do{if(0==k.mant[0])return this.clone(e).finish(c,!1);if(0==g[0])return this.ZERO;k.ind=e.ind;n=n+n+1-e.mant.length;k.exp=k.exp-n+e.exp;n=m;s=n-1;b:for(;1<= +s&&k.expp&&0<=p){do{d[r]=p;p=0;continue a}while(0)}p+=90;d[r]=this.bytedig[p];p=this.bytecar[p]}if(0==p)return d;c=null;f&&m+2==a.length&&(c=a);null==c&&(c=Array(m+2));c[0]=p;a=m+1;g=0;for(;0 +b&&!this.allzero(this.mant,b))throw"Too many digits: "+this.toString();if(null!=a&&a.mant.length>b&&!this.allzero(a.mant,b))throw"Too many digits: "+a.toString();}};f.prototype.round=x;f.prototype.allzero=function(a,b){var c=0;0>b&&(b=0);var d=a.length-1,c=b;for(;c<=d;c++)if(0!=a[c])return!1;return!0};f.prototype.finish=function(a,b){var c=0,d=0,e=null,c=d=0;0!=a.digits&&this.mant.length>a.digits&&this.round(a);if(b&&a.form!=h.prototype.PLAIN){c=this.mant.length;d=c-1;a:for(;1<=d;d--){if(0!=this.mant[d])break a; +c--;this.exp++}ca.digits&&0!=a.digits&&(this.form=a.form),d-1<=this.MaxExp)return this}else-5>d&&(this.form=a.form);d--;if(dthis.MaxExp){b:do{if(this.form==h.prototype.ENGINEERING&& +(c=d%3,0>c&&(c=3+c),d-=c,d>=this.MinExp&&d<=this.MaxExp))break b;throw"finish(): Exponent Overflow: "+d;}while(0)}return this}this.ind=this.iszero;if(a.form!=h.prototype.PLAIN)this.exp=0;else if(0this.compareTo(a)};f.prototype.isGreaterThanOrEqualTo=function(a){return 0<= +this.compareTo(a)};f.prototype.isLessThanOrEqualTo=function(a){return 0>=this.compareTo(a)};f.prototype.isPositive=function(){return 0this.compareTo(f.prototype.ZERO)};f.prototype.isZero=function(){return 0===this.compareTo(f.prototype.ZERO)};f.ROUND_CEILING=f.prototype.ROUND_CEILING=h.prototype.ROUND_CEILING;f.ROUND_DOWN=f.prototype.ROUND_DOWN=h.prototype.ROUND_DOWN;f.ROUND_FLOOR=f.prototype.ROUND_FLOOR=h.prototype.ROUND_FLOOR; +f.ROUND_HALF_DOWN=f.prototype.ROUND_HALF_DOWN=h.prototype.ROUND_HALF_DOWN;f.ROUND_HALF_EVEN=f.prototype.ROUND_HALF_EVEN=h.prototype.ROUND_HALF_EVEN;f.ROUND_HALF_UP=f.prototype.ROUND_HALF_UP=h.prototype.ROUND_HALF_UP;f.ROUND_UNNECESSARY=f.prototype.ROUND_UNNECESSARY=h.prototype.ROUND_UNNECESSARY;f.ROUND_UP=f.prototype.ROUND_UP=h.prototype.ROUND_UP;f.prototype.ispos=1;f.prototype.iszero=0;f.prototype.isneg=-1;f.prototype.MinExp=-999999999;f.prototype.MaxExp=999999999;f.prototype.MinArg=-999999999;f.prototype.MaxArg= +999999999;f.prototype.plainMC=new h(0,h.prototype.PLAIN);f.prototype.bytecar=Array(190);f.prototype.bytedig=y();f.ZERO=f.prototype.ZERO=new f("0");f.ONE=f.prototype.ONE=new f("1");f.TEN=f.prototype.TEN=new f("10");return f}(y);"function"===typeof define&&null!=define.amd?define({BigDecimal:L,MathContext:y}):"object"===typeof this&&(this.BigDecimal=L,this.MathContext=y)}).call(this); diff --git a/bower_components/bignumber.js/perf/lib/bigdecimal_ICU4J/LICENCE.txt b/bower_components/bignumber.js/perf/lib/bigdecimal_ICU4J/LICENCE.txt new file mode 100644 index 00000000..ca1ad2ef --- /dev/null +++ b/bower_components/bignumber.js/perf/lib/bigdecimal_ICU4J/LICENCE.txt @@ -0,0 +1,30 @@ +Copyright (c) 2012 Daniel Trebbien and other contributors +Portions Copyright (c) 2003 STZ-IDA and PTV AG, Karlsruhe, Germany +Portions Copyright (c) 1995-2001 International Business Machines Corporation and others + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. + + + +ICU4J license - ICU4J 1.3.1 and later +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1995-2001 International Business Machines Corporation and others + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. + + +-------------------------------------------------------------------------------- +All trademarks and registered trademarks mentioned herein are the property of their respective owners. \ No newline at end of file diff --git a/bower_components/blockies/.bower.json b/bower_components/blockies/.bower.json new file mode 100644 index 00000000..bd405db6 --- /dev/null +++ b/bower_components/blockies/.bower.json @@ -0,0 +1,34 @@ +{ + "name": "blockies", + "main": "blockies.js", + "version": "0.1.1", + "homepage": "https://github.com/download13/blockies", + "authors": [ + "Erin Dachtler " + ], + "description": "<1k library that generates blocky identicons", + "moduleType": [ + "globals" + ], + "keywords": [ + "identicon", + "blocky" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "README.md", + "sample.png", + "build.js" + ], + "_release": "0.1.1", + "_resolution": { + "type": "version", + "tag": "v0.1.1", + "commit": "ba3cc89403b30a8a126becf170662b576e1a8dfc" + }, + "_source": "https://github.com/download13/blockies.git", + "_target": "^0.1.1", + "_originalSource": "blockies", + "_direct": true +} \ No newline at end of file diff --git a/bower_components/blockies/blockies.js b/bower_components/blockies/blockies.js new file mode 100644 index 00000000..8a893a71 --- /dev/null +++ b/bower_components/blockies/blockies.js @@ -0,0 +1,108 @@ +(function() { + // The random number is a js implementation of the Xorshift PRNG + var randseed = new Array(4); // Xorshift: [x, y, z, w] 32 bit values + + function seedrand(seed) { + for (var i = 0; i < randseed.length; i++) { + randseed[i] = 0; + } + for (var i = 0; i < seed.length; i++) { + randseed[i%4] = ((randseed[i%4] << 5) - randseed[i%4]) + seed.charCodeAt(i); + } + } + + function rand() { + // based on Java's String.hashCode(), expanded to 4 32bit values + var t = randseed[0] ^ (randseed[0] << 11); + + randseed[0] = randseed[1]; + randseed[1] = randseed[2]; + randseed[2] = randseed[3]; + randseed[3] = (randseed[3] ^ (randseed[3] >> 19) ^ t ^ (t >> 8)); + + return (randseed[3]>>>0) / ((1 << 31)>>>0); + } + + function createColor() { + //saturation is the whole color spectrum + var h = Math.floor(rand() * 360); + //saturation goes from 40 to 100, it avoids greyish colors + var s = ((rand() * 60) + 40) + '%'; + //lightness can be anything from 0 to 100, but probabilities are a bell curve around 50% + var l = ((rand()+rand()+rand()+rand()) * 25) + '%'; + + var color = 'hsl(' + h + ',' + s + ',' + l + ')'; + return color; + } + + function createImageData(size) { + var width = size; // Only support square icons for now + var height = size; + + var dataWidth = Math.ceil(width / 2); + var mirrorWidth = width - dataWidth; + + var data = []; + for(var y = 0; y < height; y++) { + var row = []; + for(var x = 0; x < dataWidth; x++) { + // this makes foreground and background color to have a 43% (1/2.3) probability + // spot color has 13% chance + row[x] = Math.floor(rand()*2.3); + } + var r = row.slice(0, mirrorWidth); + r.reverse(); + row = row.concat(r); + + for(var i = 0; i < row.length; i++) { + data.push(row[i]); + } + } + + return data; + } + + function createCanvas(imageData, color, scale, bgcolor, spotcolor) { + var c = document.createElement('canvas'); + var width = Math.sqrt(imageData.length); + c.width = c.height = width * scale; + + var cc = c.getContext('2d'); + cc.fillStyle = bgcolor; + cc.fillRect(0, 0, c.width, c.height); + cc.fillStyle = color; + + for(var i = 0; i < imageData.length; i++) { + var row = Math.floor(i / width); + var col = i % width; + // if data is 2, choose spot color, if 1 choose foreground + cc.fillStyle = (imageData[i] == 1) ? color : spotcolor; + + // if data is 0, leave the background + if(imageData[i]) { + cc.fillRect(col * scale, row * scale, scale, scale); + } + } + + return c; + } + + function createIcon(opts) { + opts = opts || {}; + var size = opts.size || 8; + var scale = opts.scale || 4; + var seed = opts.seed || Math.floor((Math.random()*Math.pow(10,16))).toString(16); + + seedrand(seed); + + var color = opts.color || createColor(); + var bgcolor = opts.bgcolor || createColor(); + var spotcolor = opts.spotcolor || createColor(); + var imageData = createImageData(size); + var canvas = createCanvas(imageData, color, scale, bgcolor, spotcolor); + + return canvas; + } + + window.blockies = {create: createIcon}; +})(); diff --git a/bower_components/blockies/blockies.min.js b/bower_components/blockies/blockies.min.js new file mode 100644 index 00000000..dcd26fb8 --- /dev/null +++ b/bower_components/blockies/blockies.min.js @@ -0,0 +1 @@ +!function(){function r(r){for(var t=0;t>19^r^r>>8,(l[3]>>>0)/(1<<31>>>0)}function e(){var r=Math.floor(360*t()),e=60*t()+40+"%",o=25*(t()+t()+t()+t())+"%",n="hsl("+r+","+e+","+o+")";return n}function o(r){for(var e=r,o=r,n=Math.ceil(e/2),a=e-n,l=[],c=0;o>c;c++){for(var f=[],h=0;n>h;h++)f[h]=Math.floor(2.3*t());var i=f.slice(0,a);i.reverse(),f=f.concat(i);for(var v=0;v" + ], + "description": "<1k library that generates blocky identicons", + "moduleType": [ + "globals" + ], + "keywords": [ + "identicon", + "blocky" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "README.md", + "sample.png", + "build.js" + ] +} diff --git a/bower_components/crypto-js/.bower.json b/bower_components/crypto-js/.bower.json new file mode 100644 index 00000000..d777fb2e --- /dev/null +++ b/bower_components/crypto-js/.bower.json @@ -0,0 +1,44 @@ +{ + "name": "crypto-js", + "version": "3.1.9", + "description": "JavaScript library of crypto standards.", + "license": "MIT", + "homepage": "http://github.com/brix/crypto-js", + "repository": { + "type": "git", + "url": "http://github.com/brix/crypto-js.git" + }, + "keywords": [ + "security", + "crypto", + "Hash", + "MD5", + "SHA1", + "SHA-1", + "SHA256", + "SHA-256", + "RC4", + "Rabbit", + "AES", + "DES", + "PBKDF2", + "HMAC", + "OFB", + "CFB", + "CTR", + "CBC", + "Base64" + ], + "main": "index.js", + "dependencies": {}, + "ignore": [], + "_release": "3.1.9", + "_resolution": { + "type": "version", + "tag": "3.1.9", + "commit": "c8ac779bb0f5b8c7947422e09e96c75d768b019e" + }, + "_source": "https://github.com/brix/crypto-js.git", + "_target": "~3.1.4", + "_originalSource": "crypto-js" +} \ No newline at end of file diff --git a/bower_components/crypto-js/CONTRIBUTING.md b/bower_components/crypto-js/CONTRIBUTING.md new file mode 100644 index 00000000..09bf774a --- /dev/null +++ b/bower_components/crypto-js/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# Contribution + +# Git Flow + +The crypto-js project uses [git flow](https://github.com/nvie/gitflow) to manage branches. +Do your changes on the `develop` or even better on a `feature/*` branch. Don't do any changes on the `master` branch. + +# Pull request + +Target your pull request on `develop` branch. Other pull request won't be accepted. + +# How to build + +1. Clone + +2. Run + + ```sh + npm install + ``` + +3. Run + + ```sh + npm run build + ``` + +4. Check `build` folder \ No newline at end of file diff --git a/bower_components/crypto-js/LICENSE b/bower_components/crypto-js/LICENSE new file mode 100644 index 00000000..b0828e52 --- /dev/null +++ b/bower_components/crypto-js/LICENSE @@ -0,0 +1,24 @@ +# License + +[The MIT License (MIT)](http://opensource.org/licenses/MIT) + +Copyright (c) 2009-2013 Jeff Mott +Copyright (c) 2013-2016 Evan Vosberg + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/bower_components/crypto-js/README.md b/bower_components/crypto-js/README.md new file mode 100644 index 00000000..1f4b0efa --- /dev/null +++ b/bower_components/crypto-js/README.md @@ -0,0 +1,198 @@ +# crypto-js + +JavaScript library of crypto standards. + +## Node.js (Install) + +Requirements: + +- Node.js +- npm (Node.js package manager) + +```bash +npm install crypto-js +``` + +### Usage + +Modular include: + +```javascript +var AES = require("crypto-js/aes"); +var SHA256 = require("crypto-js/sha256"); +... +console.log(SHA256("Message")); +``` + +Including all libraries, for access to extra methods: + +```javascript +var CryptoJS = require("crypto-js"); +console.log(CryptoJS.HmacSHA1("Message", "Key")); +``` + +## Client (browser) + +Requirements: + +- Node.js +- Bower (package manager for frontend) + +```bash +bower install crypto-js +``` + +### Usage + +Modular include: + +```javascript +require.config({ + packages: [ + { + name: 'crypto-js', + location: 'path-to/bower_components/crypto-js', + main: 'index' + } + ] +}); + +require(["crypto-js/aes", "crypto-js/sha256"], function (AES, SHA256) { + console.log(SHA256("Message")); +}); +``` + +Including all libraries, for access to extra methods: + +```javascript +// Above-mentioned will work or use this simple form +require.config({ + paths: { + 'crypto-js': 'path-to/bower_components/crypto-js/crypto-js' + } +}); + +require(["crypto-js"], function (CryptoJS) { + console.log(CryptoJS.HmacSHA1("Message", "Key")); +}); +``` + +### Usage without RequireJS + +```html + + +``` + +## API + +See: https://code.google.com/p/crypto-js + +### AES Encryption + +#### Plain text encryption + +```javascript +var CryptoJS = require("crypto-js"); + +// Encrypt +var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123'); + +// Decrypt +var bytes = CryptoJS.AES.decrypt(ciphertext.toString(), 'secret key 123'); +var plaintext = bytes.toString(CryptoJS.enc.Utf8); + +console.log(plaintext); +``` + +#### Object encryption + +```javascript +var CryptoJS = require("crypto-js"); + +var data = [{id: 1}, {id: 2}] + +// Encrypt +var ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), 'secret key 123'); + +// Decrypt +var bytes = CryptoJS.AES.decrypt(ciphertext.toString(), 'secret key 123'); +var decryptedData = JSON.parse(bytes.toString(CryptoJS.enc.Utf8)); + +console.log(decryptedData); +``` + +### List of modules + + +- ```crypto-js/core``` +- ```crypto-js/x64-core``` +- ```crypto-js/lib-typedarrays``` + +--- + +- ```crypto-js/md5``` +- ```crypto-js/sha1``` +- ```crypto-js/sha256``` +- ```crypto-js/sha224``` +- ```crypto-js/sha512``` +- ```crypto-js/sha384``` +- ```crypto-js/sha3``` +- ```crypto-js/ripemd160``` + +--- + +- ```crypto-js/hmac-md5``` +- ```crypto-js/hmac-sha1``` +- ```crypto-js/hmac-sha256``` +- ```crypto-js/hmac-sha224``` +- ```crypto-js/hmac-sha512``` +- ```crypto-js/hmac-sha384``` +- ```crypto-js/hmac-sha3``` +- ```crypto-js/hmac-ripemd160``` + +--- + +- ```crypto-js/pbkdf2``` + +--- + +- ```crypto-js/aes``` +- ```crypto-js/tripledes``` +- ```crypto-js/rc4``` +- ```crypto-js/rabbit``` +- ```crypto-js/rabbit-legacy``` +- ```crypto-js/evpkdf``` + +--- + +- ```crypto-js/format-openssl``` +- ```crypto-js/format-hex``` + +--- + +- ```crypto-js/enc-latin1``` +- ```crypto-js/enc-utf8``` +- ```crypto-js/enc-hex``` +- ```crypto-js/enc-utf16``` +- ```crypto-js/enc-base64``` + +--- + +- ```crypto-js/mode-cfb``` +- ```crypto-js/mode-ctr``` +- ```crypto-js/mode-ctr-gladman``` +- ```crypto-js/mode-ofb``` +- ```crypto-js/mode-ecb``` + +--- + +- ```crypto-js/pad-pkcs7``` +- ```crypto-js/pad-ansix923``` +- ```crypto-js/pad-iso10126``` +- ```crypto-js/pad-iso97971``` +- ```crypto-js/pad-zeropadding``` +- ```crypto-js/pad-nopadding``` diff --git a/bower_components/crypto-js/aes.js b/bower_components/crypto-js/aes.js new file mode 100644 index 00000000..508d5127 --- /dev/null +++ b/bower_components/crypto-js/aes.js @@ -0,0 +1,232 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + var t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); + }()); + + + return CryptoJS.AES; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/bower.json b/bower_components/crypto-js/bower.json new file mode 100644 index 00000000..a995f687 --- /dev/null +++ b/bower_components/crypto-js/bower.json @@ -0,0 +1,35 @@ +{ + "name": "crypto-js", + "version": "3.1.9", + "description": "JavaScript library of crypto standards.", + "license": "MIT", + "homepage": "http://github.com/brix/crypto-js", + "repository": { + "type": "git", + "url": "http://github.com/brix/crypto-js.git" + }, + "keywords": [ + "security", + "crypto", + "Hash", + "MD5", + "SHA1", + "SHA-1", + "SHA256", + "SHA-256", + "RC4", + "Rabbit", + "AES", + "DES", + "PBKDF2", + "HMAC", + "OFB", + "CFB", + "CTR", + "CBC", + "Base64" + ], + "main": "index.js", + "dependencies": {}, + "ignore": [] +} diff --git a/bower_components/crypto-js/cipher-core.js b/bower_components/crypto-js/cipher-core.js new file mode 100644 index 00000000..751c8166 --- /dev/null +++ b/bower_components/crypto-js/cipher-core.js @@ -0,0 +1,880 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./evpkdf")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./evpkdf"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher core components. + */ + CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + var block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + var modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + var modeCreator = mode.createDecryptor; + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + + if (this._mode && this._mode.__creator == modeCreator) { + this._mode.init(this, iv && iv.words); + } else { + this._mode = modeCreator.call(mode, this, iv && iv.words); + this._mode.__creator = modeCreator; + } + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + var wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + var salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); + }()); + + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/core.js b/bower_components/crypto-js/core.js new file mode 100644 index 00000000..28e34c13 --- /dev/null +++ b/bower_components/crypto-js/core.js @@ -0,0 +1,760 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(); + } + else if (typeof define === "function" && define.amd) { + // AMD + define([], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(); + } +}(this, function () { + + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + /* + * Local polyfil of Object.create + */ + var create = Object.create || (function () { + function F() {}; + + return function (obj) { + var subtype; + + F.prototype = obj; + + subtype = new F(); + + F.prototype = null; + + return subtype; + }; + }()) + + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + var r = (function (m_w) { + var m_w = m_w; + var m_z = 0x3ade68b1; + var mask = 0xffffffff; + + return function () { + m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; + m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; + var result = ((m_z << 0x10) + m_w) & mask; + result /= 0x100000000; + result += 0.5; + return result * (Math.random() > .5 ? 1 : -1); + } + }); + + for (var i = 0, rcache; i < nBytes; i += 4) { + var _r = r((rcache || Math.random()) * 0x100000000); + + rcache = _r() * 0x3ade67b7; + words.push((_r() * 0x100000000) | 0); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + var processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; + }(Math)); + + + return CryptoJS; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/crypto-js.js b/bower_components/crypto-js/crypto-js.js new file mode 100644 index 00000000..17f2b116 --- /dev/null +++ b/bower_components/crypto-js/crypto-js.js @@ -0,0 +1,5988 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(); + } + else if (typeof define === "function" && define.amd) { + // AMD + define([], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(); + } +}(this, function () { + + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + /* + * Local polyfil of Object.create + */ + var create = Object.create || (function () { + function F() {}; + + return function (obj) { + var subtype; + + F.prototype = obj; + + subtype = new F(); + + F.prototype = null; + + return subtype; + }; + }()) + + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + var r = (function (m_w) { + var m_w = m_w; + var m_z = 0x3ade68b1; + var mask = 0xffffffff; + + return function () { + m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; + m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; + var result = ((m_z << 0x10) + m_w) & mask; + result /= 0x100000000; + result += 0.5; + return result * (Math.random() > .5 ? 1 : -1); + } + }); + + for (var i = 0, rcache; i < nBytes; i += 4) { + var _r = r((rcache || Math.random()) * 0x100000000); + + rcache = _r() * 0x3ade67b7; + words.push((_r() * 0x100000000) | 0); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + var processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; + + /** + * SHA-1 hash algorithm. + */ + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); + } + + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; + } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); + }()); + + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } + }()); + + + (function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } + + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + + // Reference original init + var superInit = WordArray.init; + + // Augment WordArray.init to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; + + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } + + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal init + superInit.apply(this, arguments); + } + }; + + subInit.prototype = WordArray; + }()); + + + /** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + + /** + * RIPEMD160 hash algorithm. + */ + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, + + _doProcessBlock: function (M, offset) { + + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<>>(32-n)); + } + + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); + */ + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; + + /** + * HMAC algorithm. + */ + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function (hasher, key) { + // Init hasher + hasher = this._hasher = new hasher.init(); + + // Convert string to WordArray, else assume WordArray already + if (typeof key == 'string') { + key = Utf8.parse(key); + } + + // Shortcuts + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + + // Allow arbitrary length keys + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA1 = C_algo.SHA1; + var HMAC = C_algo.HMAC; + + /** + * Password-Based Key Derivation Function 2 algorithm. + */ + var PBKDF2 = C_algo.PBKDF2 = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hasher to use. Default: SHA1 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: SHA1, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.PBKDF2.create(); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init HMAC + var hmac = HMAC.create(cfg.hasher, password); + + // Initial values + var derivedKey = WordArray.create(); + var blockIndex = WordArray.create([0x00000001]); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var blockIndexWords = blockIndex.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + var block = hmac.update(salt).finalize(blockIndex); + hmac.reset(); + + // Shortcuts + var blockWords = block.words; + var blockWordsLength = blockWords.length; + + // Iterations + var intermediate = block; + for (var i = 1; i < iterations; i++) { + intermediate = hmac.finalize(intermediate); + hmac.reset(); + + // Shortcut + var intermediateWords = intermediate.words; + + // XOR intermediate with block + for (var j = 0; j < blockWordsLength; j++) { + blockWords[j] ^= intermediateWords[j]; + } + } + + derivedKey.concat(block); + blockIndexWords[0]++; + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.PBKDF2(password, salt); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.PBKDF2 = function (password, salt, cfg) { + return PBKDF2.create(cfg).compute(password, salt); + }; + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var MD5 = C_algo.MD5; + + /** + * This key derivation function is meant to conform with EVP_BytesToKey. + * www.openssl.org/docs/crypto/EVP_BytesToKey.html + */ + var EvpKDF = C_algo.EvpKDF = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hash algorithm to use. Default: MD5 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: MD5, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.EvpKDF.create(); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init hasher + var hasher = cfg.hasher.create(); + + // Initial values + var derivedKey = WordArray.create(); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + if (block) { + hasher.update(block); + } + var block = hasher.update(password).finalize(salt); + hasher.reset(); + + // Iterations + for (var i = 1; i < iterations; i++) { + block = hasher.finalize(block); + hasher.reset(); + } + + derivedKey.concat(block); + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.EvpKDF(password, salt); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.EvpKDF = function (password, salt, cfg) { + return EvpKDF.create(cfg).compute(password, salt); + }; + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + + /** + * SHA-224 hash algorithm. + */ + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, + + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); + + hash.sigBytes -= 4; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); + */ + C.SHA224 = SHA256._createHelper(SHA224); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); + }()); + + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var X32WordArray = C_lib.WordArray; + + /** + * x64 namespace. + */ + var C_x64 = C.x64 = {}; + + /** + * A 64-bit word. + */ + var X64Word = C_x64.Word = Base.extend({ + /** + * Initializes a newly created 64-bit word. + * + * @param {number} high The high 32 bits. + * @param {number} low The low 32 bits. + * + * @example + * + * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); + */ + init: function (high, low) { + this.high = high; + this.low = low; + } + + /** + * Bitwise NOTs this word. + * + * @return {X64Word} A new x64-Word object after negating. + * + * @example + * + * var negated = x64Word.not(); + */ + // not: function () { + // var high = ~this.high; + // var low = ~this.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ANDs this word with the passed word. + * + * @param {X64Word} word The x64-Word to AND with this word. + * + * @return {X64Word} A new x64-Word object after ANDing. + * + * @example + * + * var anded = x64Word.and(anotherX64Word); + */ + // and: function (word) { + // var high = this.high & word.high; + // var low = this.low & word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to OR with this word. + * + * @return {X64Word} A new x64-Word object after ORing. + * + * @example + * + * var ored = x64Word.or(anotherX64Word); + */ + // or: function (word) { + // var high = this.high | word.high; + // var low = this.low | word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise XORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to XOR with this word. + * + * @return {X64Word} A new x64-Word object after XORing. + * + * @example + * + * var xored = x64Word.xor(anotherX64Word); + */ + // xor: function (word) { + // var high = this.high ^ word.high; + // var low = this.low ^ word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the left. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftL(25); + */ + // shiftL: function (n) { + // if (n < 32) { + // var high = (this.high << n) | (this.low >>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + + // return X64Word.create(high, low); + // } + }); + + /** + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { + // Shortcuts + var x64Words = this.words; + var x64WordsLength = x64Words.length; + + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + + return X32WordArray.create(x32Words, this.sigBytes); + }, + + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } + + return clone; + } + }); + }()); + + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } + + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } + + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } + + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); + + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); + + /** + * SHA-3 hash algorithm. + */ + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + + // Rotate lanes + if (rhoOffset < 32) { + var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } + + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low;; + } + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); + }, + + clone: function () { + var clone = Hasher.clone.call(this); + + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + }(Math)); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; + (function () { + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); + } + }()); + + /** + * SHA-512 hash algorithm. + */ + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var H = this._hash.words; + + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + + // Rounds + for (var i = 0; i < 80; i++) { + // Shortcut + var Wi = W[i]; + + // Extend message + if (i < 16) { + var Wih = Wi.high = M[offset + i * 2] | 0; + var Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + var Wil = gamma0l + Wi7l; + var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + var Wil = Wil + gamma1l; + var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + var Wil = Wil + Wi16l; + var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } + + // Intermediate hash value + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + }, + + blockSize: 1024/32 + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); + */ + C.SHA512 = Hasher._createHelper(SHA512); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA512(message, key); + */ + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, + + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); + + hash.sigBytes -= 16; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); + }()); + + + /** + * Cipher core components. + */ + CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + var block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + var modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + var modeCreator = mode.createDecryptor; + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + + if (this._mode && this._mode.__creator == modeCreator) { + this._mode.init(this, iv && iv.words); + } else { + this._mode = modeCreator.call(mode, this, iv && iv.words); + this._mode.__creator = modeCreator; + } + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + var wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + var salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); + }()); + + + /** + * Cipher Feedback block mode. + */ + CryptoJS.mode.CFB = (function () { + var CFB = CryptoJS.lib.BlockCipherMode.extend(); + + CFB.Encryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + CFB.Decryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { + // Shortcut + var iv = this._iv; + + // Generate keystream + if (iv) { + var keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var keystream = this._prevBlock; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + + return CFB; + }()); + + + /** + * Electronic Codebook block mode. + */ + CryptoJS.mode.ECB = (function () { + var ECB = CryptoJS.lib.BlockCipherMode.extend(); + + ECB.Encryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.encryptBlock(words, offset); + } + }); + + ECB.Decryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.decryptBlock(words, offset); + } + }); + + return ECB; + }()); + + + /** + * ANSI X.923 padding strategy. + */ + CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + /** + * ISO 10126 padding strategy. + */ + CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + /** + * ISO/IEC 9797-1 Padding Method 2. + */ + CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); + + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } + }; + + + /** + * Output Feedback block mode. + */ + CryptoJS.mode.OFB = (function () { + var OFB = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = OFB.Encryptor = OFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var keystream = this._keystream; + + // Generate keystream + if (iv) { + keystream = this._keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + OFB.Decryptor = Encryptor; + + return OFB; + }()); + + + /** + * A noop padding strategy. + */ + CryptoJS.pad.NoPadding = { + pad: function () { + }, + + unpad: function () { + } + }; + + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var CipherParams = C_lib.CipherParams; + var C_enc = C.enc; + var Hex = C_enc.Hex; + var C_format = C.format; + + var HexFormatter = C_format.Hex = { + /** + * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The hexadecimally encoded string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.format.Hex.stringify(cipherParams); + */ + stringify: function (cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, + + /** + * Converts a hexadecimally encoded ciphertext string to a cipher params object. + * + * @param {string} input The hexadecimally encoded string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.Hex.parse(hexString); + */ + parse: function (input) { + var ciphertext = Hex.parse(input); + return CipherParams.create({ ciphertext: ciphertext }); + } + }; + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + var t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; + + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 + }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; + + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } + + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; + + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; + + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + } + + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + } + + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, + + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, + + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; + + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); + + // Rounds + for (var round = 0; round < 16; round++) { + // Shortcuts + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); + + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; + }, + + keySize: 64/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } + + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); + */ + C.DES = BlockCipher._createHelper(DES); + + /** + * Triple-DES block cipher algorithm. + */ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); + this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); + this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); + }, + + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); + }, + + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, + + keySize: 192/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); + */ + C.TripleDES = BlockCipher._createHelper(TripleDES); + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + /** + * RC4 stream cipher algorithm. + */ + var RC4 = C_algo.RC4 = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySigBytes = key.sigBytes; + + // Init sbox + var S = this._S = []; + for (var i = 0; i < 256; i++) { + S[i] = i; + } + + // Key setup + for (var i = 0, j = 0; i < 256; i++) { + var keyByteIndex = i % keySigBytes; + var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + + j = (j + S[i] + keyByte) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } + + // Counters + this._i = this._j = 0; + }, + + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, + + keySize: 256/32, + + ivSize: 0 + }); + + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; + + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } + + // Update counters + this._i = i; + this._j = j; + + return keystreamWord; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); + */ + C.RC4 = StreamCipher._createHelper(RC4); + + /** + * Modified RC4 stream cipher algorithm. + */ + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } + } + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); + */ + C.RC4Drop = StreamCipher._createHelper(RC4Drop); + }()); + + + /** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + CryptoJS.mode.CTRGladman = (function () { + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); + + function incWord(word) + { + if (((word >> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; + + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } + + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } + + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } + + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + + incCounter(counter); + + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTRGladman.Decryptor = Encryptor; + + return CTRGladman; + }()); + + + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + */ + C.Rabbit = StreamCipher._createHelper(Rabbit); + }()); + + + /** + * Counter block mode. + */ + CryptoJS.mode.CTR = (function () { + var CTR = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = CTR.Encryptor = CTR.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Increment counter + counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTR.Decryptor = Encryptor; + + return CTR; + }()); + + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. + */ + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); + }()); + + + /** + * Zero padding strategy. + */ + CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, + + unpad: function (data) { + // Shortcut + var dataWords = data.words; + + // Unpad + var i = data.sigBytes - 1; + while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + i--; + } + data.sigBytes = i + 1; + } + }; + + + return CryptoJS; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/docs/QuickStartGuide.wiki b/bower_components/crypto-js/docs/QuickStartGuide.wiki new file mode 100644 index 00000000..6b201997 --- /dev/null +++ b/bower_components/crypto-js/docs/QuickStartGuide.wiki @@ -0,0 +1,470 @@ + + +---- + += Quick-start Guide = + +== Hashers == + +=== The Hasher Algorithms === + +==== MD5 ==== + +MD5 is a widely used hash function. It's been used in a variety of security applications and is also commonly used to check the integrity of files. Though, MD5 is not collision resistant, and it isn't suitable for applications like SSL certificates or digital signatures that rely on this property. + +{{{ + + +}}} + +==== SHA-1 ==== + +The SHA hash functions were designed by the National Security Agency (NSA). SHA-1 is the most established of the existing SHA hash functions, and it's used in a variety of security applications and protocols. Though, SHA-1's collision resistance has been weakening as new attacks are discovered or improved. + +{{{ + + +}}} + +==== SHA-2 ==== + +SHA-256 is one of the four variants in the SHA-2 set. It isn't as widely used as SHA-1, though it appears to provide much better security. + +{{{ + + +}}} + +SHA-512 is largely identical to SHA-256 but operates on 64-bit words rather than 32. + +{{{ + + +}}} + +CryptoJS also supports SHA-224 and SHA-384, which are largely identical but truncated versions of SHA-256 and SHA-512 respectively. + +==== SHA-3 ==== + +SHA-3 is the winner of a five-year competition to select a new cryptographic hash algorithm where 64 competing designs were evaluated. + +{{{ + + +}}} + +SHA-3 can be configured to output hash lengths of one of 224, 256, 384, or 512 bits. The default is 512 bits. + +{{{ + + +}}} + +==== RIPEMD-160 ==== + +{{{ + + +}}} + +=== The Hasher Input === + +The hash algorithms accept either strings or instances of CryptoJS.lib.WordArray. A WordArray object represents an array of 32-bit words. When you pass a string, it's automatically converted to a WordArray encoded as UTF-8. + +=== The Hasher Output === + +The hash you get back isn't a string yet. It's a WordArray object. When you use a WordArray object in a string context, it's automatically converted to a hex string. + +{{{ + + +}}} + +You can convert a WordArray object to other formats by explicitly calling the toString method and passing an encoder. + +{{{ + + + +}}} + +=== Progressive Hashing === + +{{{ + + +}}} + +== HMAC == + +Keyed-hash message authentication codes (HMAC) is a mechanism for message authentication using cryptographic hash functions. + +HMAC can be used in combination with any iterated cryptographic hash function. + +{{{ + + + + + +}}} + +=== Progressive HMAC Hashing === + +{{{ + + +}}} + +== PBKDF2 == + +PBKDF2 is a password-based key derivation function. In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required. + +A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack. + +{{{ + + +}}} + +== Ciphers == + +=== The Cipher Algorithms === + +==== AES ==== + +The Advanced Encryption Standard (AES) is a U.S. Federal Information Processing Standard (FIPS). It was selected after a 5-year process where 15 competing designs were evaluated. + +{{{ + + +}}} + +CryptoJS supports AES-128, AES-192, and AES-256. It will pick the variant by the size of the key you pass in. If you use a passphrase, then it will generate a 256-bit key. + +==== DES, Triple DES ==== + +DES is a previously dominant algorithm for encryption, and was published as an official Federal Information Processing Standard (FIPS). DES is now considered to be insecure due to the small key size. + +{{{ + + +}}} + +Triple DES applies DES three times to each block to increase the key size. The algorithm is believed to be secure in this form. + +{{{ + + +}}} + +==== Rabbit ==== + +Rabbit is a high-performance stream cipher and a finalist in the eSTREAM Portfolio. It is one of the four designs selected after a 3 1/2-year process where 22 designs were evaluated. + +{{{ + + +}}} + +==== RC4, RC4Drop ==== + +RC4 is a widely-used stream cipher. It's used in popular protocols such as SSL and WEP. Although remarkable for its simplicity and speed, the algorithm's history doesn't inspire confidence in its security. + +{{{ + + +}}} + +It was discovered that the first few bytes of keystream are strongly non-random and leak information about the key. We can defend against this attack by discarding the initial portion of the keystream. This modified algorithm is traditionally called RC4-drop. + +By default, 192 words (768 bytes) are dropped, but you can configure the algorithm to drop any number of words. + +{{{ + + +}}} + +=== Custom Key and IV === + +{{{ + + +}}} + +=== Block Modes and Padding === + +{{{ + + + + +}}} + +CryptoJS supports the following modes: + + * CBC (the default) + * CFB + * CTR + * OFB + * ECB + +And CryptoJS supports the following padding schemes: + + * Pkcs7 (the default) + * Iso97971 + * AnsiX923 + * Iso10126 + * ZeroPadding + * NoPadding + +=== The Cipher Input === + +For the plaintext message, the cipher algorithms accept either strings or instances of CryptoJS.lib.WordArray. + +For the key, when you pass a string, it's treated as a passphrase and used to derive an actual key and IV. Or you can pass a WordArray that represents the actual key. If you pass the actual key, you must also pass the actual IV. + +For the ciphertext, the cipher algorithms accept either strings or instances of CryptoJS.lib.CipherParams. A CipherParams object represents a collection of parameters such as the IV, a salt, and the raw ciphertext itself. When you pass a string, it's automatically converted to a CipherParams object according to a configurable format strategy. + +=== The Cipher Output === + +The plaintext you get back after decryption is a WordArray object. See Hashers' Output for more detail. + +The ciphertext you get back after encryption isn't a string yet. It's a CipherParams object. A CipherParams object gives you access to all the parameters used during encryption. When you use a CipherParams object in a string context, it's automatically converted to a string according to a format strategy. The default is an OpenSSL-compatible format. + +{{{ + + +}}} + +You can define your own formats in order to be compatible with other crypto implementations. A format is an object with two methods—stringify and parse—that converts between CipherParams objects and ciphertext strings. + +Here's how you might write a JSON formatter: + +{{{ + + +}}} + +=== Progressive Ciphering === + +{{{ + + +}}} + +=== Interoperability === + +==== With OpenSSL ==== + +Encrypt with OpenSSL: + +{{{ +openssl enc -aes-256-cbc -in infile -out outfile -pass pass:"Secret Passphrase" -e -base64 +}}} + +Decrypt with CryptoJS: + +{{{ + + +}}} + +== Encoders == + +CryptoJS can convert from encoding formats such as Base64, Latin1 or Hex to WordArray objects and vica versa. + +{{{ + + + + +}}} \ No newline at end of file diff --git a/bower_components/crypto-js/enc-base64.js b/bower_components/crypto-js/enc-base64.js new file mode 100644 index 00000000..d5d40824 --- /dev/null +++ b/bower_components/crypto-js/enc-base64.js @@ -0,0 +1,135 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + return CryptoJS.enc.Base64; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/enc-hex.js b/bower_components/crypto-js/enc-hex.js new file mode 100644 index 00000000..88161ff5 --- /dev/null +++ b/bower_components/crypto-js/enc-hex.js @@ -0,0 +1,18 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.enc.Hex; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/enc-latin1.js b/bower_components/crypto-js/enc-latin1.js new file mode 100644 index 00000000..ade56dcd --- /dev/null +++ b/bower_components/crypto-js/enc-latin1.js @@ -0,0 +1,18 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.enc.Latin1; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/enc-utf16.js b/bower_components/crypto-js/enc-utf16.js new file mode 100644 index 00000000..7de62457 --- /dev/null +++ b/bower_components/crypto-js/enc-utf16.js @@ -0,0 +1,149 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } + }()); + + + return CryptoJS.enc.Utf16; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/enc-utf8.js b/bower_components/crypto-js/enc-utf8.js new file mode 100644 index 00000000..e7a251d8 --- /dev/null +++ b/bower_components/crypto-js/enc-utf8.js @@ -0,0 +1,18 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.enc.Utf8; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/evpkdf.js b/bower_components/crypto-js/evpkdf.js new file mode 100644 index 00000000..3fe5c01c --- /dev/null +++ b/bower_components/crypto-js/evpkdf.js @@ -0,0 +1,132 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var MD5 = C_algo.MD5; + + /** + * This key derivation function is meant to conform with EVP_BytesToKey. + * www.openssl.org/docs/crypto/EVP_BytesToKey.html + */ + var EvpKDF = C_algo.EvpKDF = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hash algorithm to use. Default: MD5 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: MD5, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.EvpKDF.create(); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init hasher + var hasher = cfg.hasher.create(); + + // Initial values + var derivedKey = WordArray.create(); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + if (block) { + hasher.update(block); + } + var block = hasher.update(password).finalize(salt); + hasher.reset(); + + // Iterations + for (var i = 1; i < iterations; i++) { + block = hasher.finalize(block); + hasher.reset(); + } + + derivedKey.concat(block); + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.EvpKDF(password, salt); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.EvpKDF = function (password, salt, cfg) { + return EvpKDF.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.EvpKDF; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/format-hex.js b/bower_components/crypto-js/format-hex.js new file mode 100644 index 00000000..2e9a861f --- /dev/null +++ b/bower_components/crypto-js/format-hex.js @@ -0,0 +1,66 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var CipherParams = C_lib.CipherParams; + var C_enc = C.enc; + var Hex = C_enc.Hex; + var C_format = C.format; + + var HexFormatter = C_format.Hex = { + /** + * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The hexadecimally encoded string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.format.Hex.stringify(cipherParams); + */ + stringify: function (cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, + + /** + * Converts a hexadecimally encoded ciphertext string to a cipher params object. + * + * @param {string} input The hexadecimally encoded string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.Hex.parse(hexString); + */ + parse: function (input) { + var ciphertext = Hex.parse(input); + return CipherParams.create({ ciphertext: ciphertext }); + } + }; + }()); + + + return CryptoJS.format.Hex; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/format-openssl.js b/bower_components/crypto-js/format-openssl.js new file mode 100644 index 00000000..3373edc6 --- /dev/null +++ b/bower_components/crypto-js/format-openssl.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.format.OpenSSL; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/hmac-md5.js b/bower_components/crypto-js/hmac-md5.js new file mode 100644 index 00000000..ad7a90ad --- /dev/null +++ b/bower_components/crypto-js/hmac-md5.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./md5"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./md5", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacMD5; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/hmac-ripemd160.js b/bower_components/crypto-js/hmac-ripemd160.js new file mode 100644 index 00000000..73d55a77 --- /dev/null +++ b/bower_components/crypto-js/hmac-ripemd160.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./ripemd160"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./ripemd160", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacRIPEMD160; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/hmac-sha1.js b/bower_components/crypto-js/hmac-sha1.js new file mode 100644 index 00000000..0b570cbc --- /dev/null +++ b/bower_components/crypto-js/hmac-sha1.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA1; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/hmac-sha224.js b/bower_components/crypto-js/hmac-sha224.js new file mode 100644 index 00000000..3778863a --- /dev/null +++ b/bower_components/crypto-js/hmac-sha224.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256"), require("./sha224"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256", "./sha224", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA224; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/hmac-sha256.js b/bower_components/crypto-js/hmac-sha256.js new file mode 100644 index 00000000..33b0c9fe --- /dev/null +++ b/bower_components/crypto-js/hmac-sha256.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA256; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/hmac-sha3.js b/bower_components/crypto-js/hmac-sha3.js new file mode 100644 index 00000000..12488049 --- /dev/null +++ b/bower_components/crypto-js/hmac-sha3.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha3"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha3", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA3; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/hmac-sha384.js b/bower_components/crypto-js/hmac-sha384.js new file mode 100644 index 00000000..0036e2b8 --- /dev/null +++ b/bower_components/crypto-js/hmac-sha384.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"), require("./sha384"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512", "./sha384", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA384; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/hmac-sha512.js b/bower_components/crypto-js/hmac-sha512.js new file mode 100644 index 00000000..c1005b6a --- /dev/null +++ b/bower_components/crypto-js/hmac-sha512.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.HmacSHA512; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/hmac.js b/bower_components/crypto-js/hmac.js new file mode 100644 index 00000000..8c098511 --- /dev/null +++ b/bower_components/crypto-js/hmac.js @@ -0,0 +1,143 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; + + /** + * HMAC algorithm. + */ + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function (hasher, key) { + // Init hasher + hasher = this._hasher = new hasher.init(); + + // Convert string to WordArray, else assume WordArray already + if (typeof key == 'string') { + key = Utf8.parse(key); + } + + // Shortcuts + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + + // Allow arbitrary length keys + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); + }()); + + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/index.js b/bower_components/crypto-js/index.js new file mode 100644 index 00000000..c93556a7 --- /dev/null +++ b/bower_components/crypto-js/index.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./lib-typedarrays"), require("./enc-utf16"), require("./enc-base64"), require("./md5"), require("./sha1"), require("./sha256"), require("./sha224"), require("./sha512"), require("./sha384"), require("./sha3"), require("./ripemd160"), require("./hmac"), require("./pbkdf2"), require("./evpkdf"), require("./cipher-core"), require("./mode-cfb"), require("./mode-ctr"), require("./mode-ctr-gladman"), require("./mode-ofb"), require("./mode-ecb"), require("./pad-ansix923"), require("./pad-iso10126"), require("./pad-iso97971"), require("./pad-zeropadding"), require("./pad-nopadding"), require("./format-hex"), require("./aes"), require("./tripledes"), require("./rc4"), require("./rabbit"), require("./rabbit-legacy")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy"], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/lib-typedarrays.js b/bower_components/crypto-js/lib-typedarrays.js new file mode 100644 index 00000000..264b2107 --- /dev/null +++ b/bower_components/crypto-js/lib-typedarrays.js @@ -0,0 +1,76 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } + + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + + // Reference original init + var superInit = WordArray.init; + + // Augment WordArray.init to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; + + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } + + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal init + superInit.apply(this, arguments); + } + }; + + subInit.prototype = WordArray; + }()); + + + return CryptoJS.lib.WordArray; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/md5.js b/bower_components/crypto-js/md5.js new file mode 100644 index 00000000..12b0fdd4 --- /dev/null +++ b/bower_components/crypto-js/md5.js @@ -0,0 +1,268 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); + }(Math)); + + + return CryptoJS.MD5; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/mode-cfb.js b/bower_components/crypto-js/mode-cfb.js new file mode 100644 index 00000000..86231f1b --- /dev/null +++ b/bower_components/crypto-js/mode-cfb.js @@ -0,0 +1,78 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher Feedback block mode. + */ + CryptoJS.mode.CFB = (function () { + var CFB = CryptoJS.lib.BlockCipherMode.extend(); + + CFB.Encryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + CFB.Decryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { + // Shortcut + var iv = this._iv; + + // Generate keystream + if (iv) { + var keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var keystream = this._prevBlock; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + + return CFB; + }()); + + + return CryptoJS.mode.CFB; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/mode-ctr-gladman.js b/bower_components/crypto-js/mode-ctr-gladman.js new file mode 100644 index 00000000..bbc56876 --- /dev/null +++ b/bower_components/crypto-js/mode-ctr-gladman.js @@ -0,0 +1,116 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + CryptoJS.mode.CTRGladman = (function () { + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); + + function incWord(word) + { + if (((word >> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; + + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } + + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } + + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } + + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + + incCounter(counter); + + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTRGladman.Decryptor = Encryptor; + + return CTRGladman; + }()); + + + + + return CryptoJS.mode.CTRGladman; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/mode-ctr.js b/bower_components/crypto-js/mode-ctr.js new file mode 100644 index 00000000..c3d470a6 --- /dev/null +++ b/bower_components/crypto-js/mode-ctr.js @@ -0,0 +1,58 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Counter block mode. + */ + CryptoJS.mode.CTR = (function () { + var CTR = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = CTR.Encryptor = CTR.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Increment counter + counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTR.Decryptor = Encryptor; + + return CTR; + }()); + + + return CryptoJS.mode.CTR; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/mode-ecb.js b/bower_components/crypto-js/mode-ecb.js new file mode 100644 index 00000000..ff069217 --- /dev/null +++ b/bower_components/crypto-js/mode-ecb.js @@ -0,0 +1,40 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Electronic Codebook block mode. + */ + CryptoJS.mode.ECB = (function () { + var ECB = CryptoJS.lib.BlockCipherMode.extend(); + + ECB.Encryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.encryptBlock(words, offset); + } + }); + + ECB.Decryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.decryptBlock(words, offset); + } + }); + + return ECB; + }()); + + + return CryptoJS.mode.ECB; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/mode-ofb.js b/bower_components/crypto-js/mode-ofb.js new file mode 100644 index 00000000..c01314c2 --- /dev/null +++ b/bower_components/crypto-js/mode-ofb.js @@ -0,0 +1,54 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Output Feedback block mode. + */ + CryptoJS.mode.OFB = (function () { + var OFB = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = OFB.Encryptor = OFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var keystream = this._keystream; + + // Generate keystream + if (iv) { + keystream = this._keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + OFB.Decryptor = Encryptor; + + return OFB; + }()); + + + return CryptoJS.mode.OFB; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/package.json b/bower_components/crypto-js/package.json new file mode 100644 index 00000000..dae37ed2 --- /dev/null +++ b/bower_components/crypto-js/package.json @@ -0,0 +1,38 @@ +{ + "name": "crypto-js", + "version": "3.1.9", + "description": "JavaScript library of crypto standards.", + "license": "MIT", + "author": { + "name": "Evan Vosberg", + "url": "http://github.com/evanvosberg" + }, + "homepage": "http://github.com/brix/crypto-js", + "repository": { + "type": "git", + "url": "http://github.com/brix/crypto-js.git" + }, + "keywords": [ + "security", + "crypto", + "Hash", + "MD5", + "SHA1", + "SHA-1", + "SHA256", + "SHA-256", + "RC4", + "Rabbit", + "AES", + "DES", + "PBKDF2", + "HMAC", + "OFB", + "CFB", + "CTR", + "CBC", + "Base64" + ], + "main": "index.js", + "dependencies": {} +} diff --git a/bower_components/crypto-js/pad-ansix923.js b/bower_components/crypto-js/pad-ansix923.js new file mode 100644 index 00000000..f01f21e4 --- /dev/null +++ b/bower_components/crypto-js/pad-ansix923.js @@ -0,0 +1,49 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ANSI X.923 padding strategy. + */ + CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Ansix923; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/pad-iso10126.js b/bower_components/crypto-js/pad-iso10126.js new file mode 100644 index 00000000..6e2aefd8 --- /dev/null +++ b/bower_components/crypto-js/pad-iso10126.js @@ -0,0 +1,44 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO 10126 padding strategy. + */ + CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Iso10126; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/pad-iso97971.js b/bower_components/crypto-js/pad-iso97971.js new file mode 100644 index 00000000..41049b45 --- /dev/null +++ b/bower_components/crypto-js/pad-iso97971.js @@ -0,0 +1,40 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO/IEC 9797-1 Padding Method 2. + */ + CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); + + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } + }; + + + return CryptoJS.pad.Iso97971; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/pad-nopadding.js b/bower_components/crypto-js/pad-nopadding.js new file mode 100644 index 00000000..c7787c94 --- /dev/null +++ b/bower_components/crypto-js/pad-nopadding.js @@ -0,0 +1,30 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * A noop padding strategy. + */ + CryptoJS.pad.NoPadding = { + pad: function () { + }, + + unpad: function () { + } + }; + + + return CryptoJS.pad.NoPadding; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/pad-pkcs7.js b/bower_components/crypto-js/pad-pkcs7.js new file mode 100644 index 00000000..35551685 --- /dev/null +++ b/bower_components/crypto-js/pad-pkcs7.js @@ -0,0 +1,18 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS.pad.Pkcs7; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/pad-zeropadding.js b/bower_components/crypto-js/pad-zeropadding.js new file mode 100644 index 00000000..0e8a859c --- /dev/null +++ b/bower_components/crypto-js/pad-zeropadding.js @@ -0,0 +1,45 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Zero padding strategy. + */ + CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, + + unpad: function (data) { + // Shortcut + var dataWords = data.words; + + // Unpad + var i = data.sigBytes - 1; + while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + i--; + } + data.sigBytes = i + 1; + } + }; + + + return CryptoJS.pad.ZeroPadding; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/pbkdf2.js b/bower_components/crypto-js/pbkdf2.js new file mode 100644 index 00000000..1258251a --- /dev/null +++ b/bower_components/crypto-js/pbkdf2.js @@ -0,0 +1,145 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA1 = C_algo.SHA1; + var HMAC = C_algo.HMAC; + + /** + * Password-Based Key Derivation Function 2 algorithm. + */ + var PBKDF2 = C_algo.PBKDF2 = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hasher to use. Default: SHA1 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: SHA1, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.PBKDF2.create(); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init HMAC + var hmac = HMAC.create(cfg.hasher, password); + + // Initial values + var derivedKey = WordArray.create(); + var blockIndex = WordArray.create([0x00000001]); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var blockIndexWords = blockIndex.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + var block = hmac.update(salt).finalize(blockIndex); + hmac.reset(); + + // Shortcuts + var blockWords = block.words; + var blockWordsLength = blockWords.length; + + // Iterations + var intermediate = block; + for (var i = 1; i < iterations; i++) { + intermediate = hmac.finalize(intermediate); + hmac.reset(); + + // Shortcut + var intermediateWords = intermediate.words; + + // XOR intermediate with block + for (var j = 0; j < blockWordsLength; j++) { + blockWords[j] ^= intermediateWords[j]; + } + } + + derivedKey.concat(block); + blockIndexWords[0]++; + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.PBKDF2(password, salt); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.PBKDF2 = function (password, salt, cfg) { + return PBKDF2.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.PBKDF2; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/rabbit-legacy.js b/bower_components/crypto-js/rabbit-legacy.js new file mode 100644 index 00000000..e118b6b6 --- /dev/null +++ b/bower_components/crypto-js/rabbit-legacy.js @@ -0,0 +1,190 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. + */ + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); + }()); + + + return CryptoJS.RabbitLegacy; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/rabbit.js b/bower_components/crypto-js/rabbit.js new file mode 100644 index 00000000..1b068336 --- /dev/null +++ b/bower_components/crypto-js/rabbit.js @@ -0,0 +1,192 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + */ + C.Rabbit = StreamCipher._createHelper(Rabbit); + }()); + + + return CryptoJS.Rabbit; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/rc4.js b/bower_components/crypto-js/rc4.js new file mode 100644 index 00000000..0e4bdff5 --- /dev/null +++ b/bower_components/crypto-js/rc4.js @@ -0,0 +1,139 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + /** + * RC4 stream cipher algorithm. + */ + var RC4 = C_algo.RC4 = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySigBytes = key.sigBytes; + + // Init sbox + var S = this._S = []; + for (var i = 0; i < 256; i++) { + S[i] = i; + } + + // Key setup + for (var i = 0, j = 0; i < 256; i++) { + var keyByteIndex = i % keySigBytes; + var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + + j = (j + S[i] + keyByte) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } + + // Counters + this._i = this._j = 0; + }, + + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, + + keySize: 256/32, + + ivSize: 0 + }); + + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; + + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } + + // Update counters + this._i = i; + this._j = j; + + return keystreamWord; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); + */ + C.RC4 = StreamCipher._createHelper(RC4); + + /** + * Modified RC4 stream cipher algorithm. + */ + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } + } + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); + */ + C.RC4Drop = StreamCipher._createHelper(RC4Drop); + }()); + + + return CryptoJS.RC4; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/ripemd160.js b/bower_components/crypto-js/ripemd160.js new file mode 100644 index 00000000..24feb47c --- /dev/null +++ b/bower_components/crypto-js/ripemd160.js @@ -0,0 +1,267 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + + /** + * RIPEMD160 hash algorithm. + */ + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, + + _doProcessBlock: function (M, offset) { + + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<>>(32-n)); + } + + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); + */ + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); + }(Math)); + + + return CryptoJS.RIPEMD160; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/sha1.js b/bower_components/crypto-js/sha1.js new file mode 100644 index 00000000..66911496 --- /dev/null +++ b/bower_components/crypto-js/sha1.js @@ -0,0 +1,150 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; + + /** + * SHA-1 hash algorithm. + */ + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); + } + + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; + } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); + }()); + + + return CryptoJS.SHA1; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/sha224.js b/bower_components/crypto-js/sha224.js new file mode 100644 index 00000000..d8ce9885 --- /dev/null +++ b/bower_components/crypto-js/sha224.js @@ -0,0 +1,80 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + + /** + * SHA-224 hash algorithm. + */ + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, + + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); + + hash.sigBytes -= 4; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); + */ + C.SHA224 = SHA256._createHelper(SHA224); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); + }()); + + + return CryptoJS.SHA224; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/sha256.js b/bower_components/crypto-js/sha256.js new file mode 100644 index 00000000..de2d7fca --- /dev/null +++ b/bower_components/crypto-js/sha256.js @@ -0,0 +1,199 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); + + + return CryptoJS.SHA256; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/sha3.js b/bower_components/crypto-js/sha3.js new file mode 100644 index 00000000..4fb27fe4 --- /dev/null +++ b/bower_components/crypto-js/sha3.js @@ -0,0 +1,323 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } + + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } + + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } + + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); + + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); + + /** + * SHA-3 hash algorithm. + */ + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + + // Rotate lanes + if (rhoOffset < 32) { + var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } + + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low;; + } + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); + }, + + clone: function () { + var clone = Hasher.clone.call(this); + + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + }(Math)); + + + return CryptoJS.SHA3; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/sha384.js b/bower_components/crypto-js/sha384.js new file mode 100644 index 00000000..a0b95bf6 --- /dev/null +++ b/bower_components/crypto-js/sha384.js @@ -0,0 +1,83 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, + + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); + + hash.sigBytes -= 16; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); + }()); + + + return CryptoJS.SHA384; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/sha512.js b/bower_components/crypto-js/sha512.js new file mode 100644 index 00000000..33593158 --- /dev/null +++ b/bower_components/crypto-js/sha512.js @@ -0,0 +1,323 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; + (function () { + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); + } + }()); + + /** + * SHA-512 hash algorithm. + */ + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var H = this._hash.words; + + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + + // Rounds + for (var i = 0; i < 80; i++) { + // Shortcut + var Wi = W[i]; + + // Extend message + if (i < 16) { + var Wih = Wi.high = M[offset + i * 2] | 0; + var Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + var Wil = gamma0l + Wi7l; + var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + var Wil = Wil + gamma1l; + var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + var Wil = Wil + Wi16l; + var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } + + // Intermediate hash value + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + }, + + blockSize: 1024/32 + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); + */ + C.SHA512 = Hasher._createHelper(SHA512); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA512(message, key); + */ + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); + }()); + + + return CryptoJS.SHA512; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/tripledes.js b/bower_components/crypto-js/tripledes.js new file mode 100644 index 00000000..c7becf3b --- /dev/null +++ b/bower_components/crypto-js/tripledes.js @@ -0,0 +1,770 @@ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; + + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 + }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; + + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } + + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; + + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; + + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + } + + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + } + + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, + + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, + + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; + + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); + + // Rounds + for (var round = 0; round < 16; round++) { + // Shortcuts + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); + + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; + }, + + keySize: 64/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } + + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); + */ + C.DES = BlockCipher._createHelper(DES); + + /** + * Triple-DES block cipher algorithm. + */ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); + this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); + this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); + }, + + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); + }, + + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, + + keySize: 192/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); + */ + C.TripleDES = BlockCipher._createHelper(TripleDES); + }()); + + + return CryptoJS.TripleDES; + +})); \ No newline at end of file diff --git a/bower_components/crypto-js/x64-core.js b/bower_components/crypto-js/x64-core.js new file mode 100644 index 00000000..57dcc144 --- /dev/null +++ b/bower_components/crypto-js/x64-core.js @@ -0,0 +1,304 @@ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var X32WordArray = C_lib.WordArray; + + /** + * x64 namespace. + */ + var C_x64 = C.x64 = {}; + + /** + * A 64-bit word. + */ + var X64Word = C_x64.Word = Base.extend({ + /** + * Initializes a newly created 64-bit word. + * + * @param {number} high The high 32 bits. + * @param {number} low The low 32 bits. + * + * @example + * + * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); + */ + init: function (high, low) { + this.high = high; + this.low = low; + } + + /** + * Bitwise NOTs this word. + * + * @return {X64Word} A new x64-Word object after negating. + * + * @example + * + * var negated = x64Word.not(); + */ + // not: function () { + // var high = ~this.high; + // var low = ~this.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ANDs this word with the passed word. + * + * @param {X64Word} word The x64-Word to AND with this word. + * + * @return {X64Word} A new x64-Word object after ANDing. + * + * @example + * + * var anded = x64Word.and(anotherX64Word); + */ + // and: function (word) { + // var high = this.high & word.high; + // var low = this.low & word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to OR with this word. + * + * @return {X64Word} A new x64-Word object after ORing. + * + * @example + * + * var ored = x64Word.or(anotherX64Word); + */ + // or: function (word) { + // var high = this.high | word.high; + // var low = this.low | word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise XORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to XOR with this word. + * + * @return {X64Word} A new x64-Word object after XORing. + * + * @example + * + * var xored = x64Word.xor(anotherX64Word); + */ + // xor: function (word) { + // var high = this.high ^ word.high; + // var low = this.low ^ word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the left. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftL(25); + */ + // shiftL: function (n) { + // if (n < 32) { + // var high = (this.high << n) | (this.low >>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + + // return X64Word.create(high, low); + // } + }); + + /** + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { + // Shortcuts + var x64Words = this.words; + var x64WordsLength = x64Words.length; + + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + + return X32WordArray.create(x32Words, this.sigBytes); + }, + + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } + + return clone; + } + }); + }()); + + + return CryptoJS; + +})); \ No newline at end of file diff --git a/bower_components/framework7/.bower.json b/bower_components/framework7/.bower.json new file mode 100644 index 00000000..94d08bf2 --- /dev/null +++ b/bower_components/framework7/.bower.json @@ -0,0 +1,62 @@ +{ + "name": "framework7", + "repository": { + "type": "git", + "url": "https://github.com/nolimits4web/Framework7.git" + }, + "description": "Full featured mobile HTML framework for building iOS & Android apps", + "version": "1.6.2", + "author": "Vladimir Kharlampidi", + "homepage": "http://framework7.io", + "keywords": [ + "mobile", + "framework", + "ios 7", + "ios7", + "ios8", + "ios 8", + "iphone", + "ipad", + "apple", + "phonegap", + "native", + "touch", + "appstore", + "app", + "f7", + "material", + "android", + "google", + "googleplay" + ], + "scripts": [ + "dist/js/framework7.js" + ], + "main": "dist/", + "styles": [ + "dist/css/framework7.css" + ], + "license": [ + "MIT" + ], + "ignore": [ + ".*", + "build", + "custom", + "kitchen-sink-ios/", + "kitchen-sink-material/", + "gulpfile.js", + "node_modules", + "package.json" + ], + "_release": "1.6.2", + "_resolution": { + "type": "version", + "tag": "v1.6.2", + "commit": "ef609d433786200754de8ab78b83095b9440517d" + }, + "_source": "https://github.com/nolimits4web/Framework7.git", + "_target": "^1.6.2", + "_originalSource": "framework7", + "_direct": true +} \ No newline at end of file diff --git a/bower_components/framework7/CHANGELOG.md b/bower_components/framework7/CHANGELOG.md new file mode 100644 index 00000000..3099dcc4 --- /dev/null +++ b/bower_components/framework7/CHANGELOG.md @@ -0,0 +1,1292 @@ +# Change Log + +## Framework7 v1.6.2 - Updated on May 29, 2017 + * Virtual List + * New `renderExternal` callback parameter that allows to render DOM items using some custom method. Useful in case it is used with Vue plugin to pass DOM rendering and manipulation to Vue + * Pull To Refresh + * Fixed issue with its destory method when used in multiple tabs on single page to destroy it only in specified tab + * Autocomplete + * Fixed issues with not being used `valueProperty` on input + * iOS + * A bit improved page transitions performance using fake opacity layer instead of changing opacity of whole page + * Dom7 + * Now it is used as a standalone library from https://github.com/nolimits4web/Dom7 + * New Dom7.extend(obj1, obj2, ...) method to clone/extend objects + * Proxified events. Now all events are being added/removed using proxy functions. This allows to pass additional arguments to events handlers and detach all assigned event listeners by calling e.g. $$(document).off('someEvent'); + +## Framework7 v1.6.0 - Updated on April 10, 2017 + * New Data Table component + * Lazy Loading + * Lazy image placeholder can be specified in `src` image attribute + * New callbacks in app parameters: `onLazyLoad`, `onLazyLoaded`, `onLazyError` + * Panels + * Fixed issues with swipe panels + * Modals + * New `popoverCloseByOutside` parameter to define wheter popover should be closed on outside (overlay) click or not. Enabled by default + * Minor fixes + +## Framework7 v1.5.4 - Updated on March 13, 2017 + * Panels + * A bit reworked Panels layout/styling in favor of`translate` CSS property. May required small CSS fixes after update if you have changed panels sizes + * Panels Breakpoints. Two new app parameters `panelLeftBreakpoint` and `panelRightBreakpoint` where you can specify minimal width to make panels always visible + * Fixed Chrome issue that now treats most of touch events as "passive" + * Autocomplete + * New `autoFocus` parameter to open standalone autcomplete and auto focus search field + * New `openWithAnimation` parameter (enabled by default) brings option to open standalone autocomplete without animation (if required) + * Forms + * `formFromData` now fires "change" events on form fields + * iOS theme + * Fixed issue on Chrome with invisible range slider thumb + * Material theme: + * Better support for bottom Toolbar/Tabbar + * Navbars/Toolbars now have shadows by default. Use additional "no-shadow" class on navbar/toolbar to disable shadow on it + * Status Bar height increased to 24px in Material theme + * Theme color is also applicable to Status Bar overlay for Material theme + * Swiper updated to latest 3.4.2 version + * Lot of minor fixes + +## Framework7 v1.5.3 - Updated on February 10, 2017 + * Autocomplete + * New Standalone autocomplete parameter `requestSourceOnOpen` (`false`/disabled by default). Will request source on autocomplete open if enabled + * New Dropdown autocomplete paremter `highlightMatches` parameter (`true`/enabled by default) + * Fixed issues with special characters in Dropdown autocomplete + * Fixed status bar overlay positioning when app root element is used + * Smart Select + * Added `data-display-as` attribute on option to display selected option value differently + * Dom7 + * `.append` method now supports multiple arguments (elements) to append + * `.each` methods will now stop iteration if you do `return false` + * Improved `.parseUrlQuery` behavior + * All XHR errors will now also trigger `complete` events/callback + * Navbars/Toolbars + * `.hideNavbar`, `.showNavbar`, `.hideToolbar`, `.showToolbar` methods now accepts boolean parameter to define whether it should be animated or not. By default it will be hidden/shown with animation (as before) + * Panels + * `.openPanel(position, animated)` and `.closePanel(animated)` now accepts additional `animated` parameter that defines whether the panel should be opened/closed with animation or not. Enabled (with animation) by default + * Now swipe panels trigger additional `panel:swipe` event during touch swipe + * Click on panel overlay will now trigger additional `panel:overlay-click` event on currently opened panel before it will be closed + * Modals + * All modal methods now also support new `animated` parameter that defines whether the modal should be opened/closed with animation or not. Enabled (with animation) by default: + * `.actions(target, params, animated)` + * `.popover(modal, target, removeOnClose, animated)` + * `.popup(modal, removeOnClose, animated)` + * `.pickerModal(modal, removeOnClose, animated)` + * `.loginScreen(modal, removeOnClose, animated)` + * `.closeModal(modal, animated)` + * New app parameter `modalsMoveToRoot` (`true`/enabled by default). When enabled it will move opened modal to the app root element (or body) if it is not there on the moment of opening and move back after modal closed. It allows to use modals inside of loaded pages + * Searchbar + * Now it passes `previousQuery` to the `search:clear` event data (or `onClear` callback) + * Tabs + * `.showTab(tab, animated)` now accepts additional `animated` parameter that defines whether the tab should become visible with animation or not. Actual for animated and swipeable tabs. Enabled (with animation) by default + * View + * Now views support names with new `name` property on View initialization with `.addView` method and can be accessed later by same named property of `app.views` + * Virtual List + * Now it has default render template (if not passed anything to `template` or `renderItem` parameters) + * New `emptyTemplate` parameter to specify template when no empty data is passed + * Lot of minor fixes + +## Framework7 v1.5.2 - Updated on December 17, 2016 + * **New Timeline Component** + * **Renamed Events** + * All events are renamed and lowercased to match related components, now all events looks like `page:init`, `page:reinit`, `page:beforeremove`, `popup:open`, `modal:closed`, `accordion:open`, `panel:close`, etc. This can be a breaking change so the old events are still supported/triggered + * Virtual List + * Fixed issues with Virtual List not triggered Infinite Scroll + * Dom7 + * `.val()` method for multiple select now returns array of selected values + * `serializeObject` now keeps empty object properties as empty values + * Panels + * Fixed issue when `swipePanelActiveArea` was ignored when using `swipePanel: 'both'` + * Fast Clicks + * Fixed issue with custom click event on input:file + * Swiper updated to latest 3.4.1 version + * Fixed Zoom for RTL + * Improved slideToClickedSlide behavior when loop is enabled + * Template7 updated to latest 1.1.4 version + * Fixed issue with quotes being added to helpers hash content + * Lot of minor fixes + +## Framework7 v1.5.0 - Updated on November 8, 2016 + * App Root + * New `root` app parameter to specify app root element, by default is `'body'`. Useful when using F7 with libraries like Vue or React that doesn't allow to bind app to the body. + * **Icons** + * Brand new [Framework7 Icons](https://github.com/nolimits4web/Framework7-Icons) font with lot of precious and designed from scratch iOS icons + * Default "Form" icons removed in favor of using F7 or Material icons fonts instead + * **Vue.js** support (beta) with official [Framework7 Vue](https://github.com/nolimits4web/Framework7-Vue) plugin + * **Animate7** (beta) - new built-in animation helper library to help with custom animation. Also avaialble as Dom7 method + * `Animate7(elements, properties, parameters)` + * `Dom7(elements).animate(properties, parameters)` + ```js + Animate7('#animate-me', + { + height: 200, + width: 100 + }, + { + duration: 400, + easing: 'swing', + complete: function () { + console.log('Animation completed') + } + } + ) + ``` + * iOS Theme + * iOS 10 style Notifications + * iOS 10 style Messagebar + * Notifications in iOS theme now doesn't support more than one notification at a time + * Chips + * Now also supported by iOS theme to keep consistency with Material theme + * Floating Action Button + * Now also supported by iOS theme to keep consistency with Material theme + * Messages + * New `scrollMessages` parameter to enable/disable messages autoscrolling when adding new message. Enabled (`true`) by default + * New `scrollMessagesOnlyOnEdge` parameter to autoscroll messages only when user is on top/bottom of the messages view. Disabled (`false`) by default + * Added "message-date" element for message bubble for iOS theme to keep consistency with Material theme messages + * Hairlines + * New `no-hairlines` and `no-hairlines-between` classes for list-blocks and content-blocks to remove block hairlines and hairlines between list items + * Forms + * `formToJSON` renamed to `formToData` method. `formToJSON` is still supported for compatibility + * `formFromJSON` renamed to `formFromData` method. `formFromJSON` is still supported for compatibility + * Color Themes + * `.colors.css` stylesheets are refactored to make higher priority for `color-` rules over `theme-` rules + * Color preloaders now also supported by iOS theme with all default colors by adding `preloader-[color]` or `color-[color]` class, e.g. `preloader-green` or `preloader-orange` etc. + * Sortable + * `sort` event now receives additional `event.detail` object with `startIndex` and `newIndex` properties of sorted element + * Photo Browser + * Added `pinch to zoom` support for Android + * Panels + * Now it supports both left and right panels to be swipeable by setting `swipePanel: 'both'` + * Tabs + * Tab that becomes inactive will also trigger `hide` event + * Swipeout + * New `swipeoutRemoveWithTimeout` app parameter. By default is `false`. When specified, then framework will remove element after `0` timeout instead of immediately. Useful to enable if you use another library like Vue or React to manage (remove) swipeout items + * Router + * Page data and Navbar data are not available anymore in `BeforeRestroy` events + * `.router.load` method supports new `pageElement` parameter to specify page HTMLElement to load if it is already added to the `.pages` container manually or by different means/library + * Added context cache for pages rendered with Template7 to keep context when navigating deep in history and then going back + * New `routerRemoveWithTimeout` app parameter. By default is `false`. When specified, then framework will remove element after `0` timeout instead of immediately. Useful to enable if you use another library like Vue or React to manage (remove) pages + * Now you can keep dynamic navbar inside of page when loading pages dynamically (not inline pages) and router will place it automatically to the correct place. It helps to keep consistency with Material theme page layout + * Dom7 + * New `.siblings(selector)` method to select all previous and next elements + * New `.empty()` method to clear element inner HTML + * New `.removeDiacritics(text)` helper method to remove/replace diacritics in passed text + * Fast Clicks + * New `fastClicksExclude` app parameter to specify elements not handled by fast clicks + * Fixed issue with not-working `` element to limit amount of selected items for "multiple" select + * Dom7 + * New `prependTo(parent)` method to prepend element to parent + * New `appendTo(parent)` method to append element to parent + * Ajax: added support for data types different from "text", like "arraybuffer" and others + * `$.serializeObject` method now supports deep objects with objects and arrays + * Swipeout + * Now overswipe-button will have additonal "swipeout-overswipe-active" class during overswipe + * New `data-close-on-cancel="true"` attribute for "swipeout-delete" buttons with `data-confirm` to close swipeout element in case of user canceled confirm dialog + * Photo Browser + * Double tap to zoom now zooms to the tapped position, not only to the center of picture + * Messagebar + * Now when you type new message it will scroll messages pages to bottom only in case if you are in the bottom of this page + * Picker + * Added `closeByOutsideClick` parameter to close picker automatically when you click outside of related input or picker. By default is `true` + * Now it will set related input's value on initialization with specified value + * Calendar + * Added `closeByOutsideClick` parameter to close picker automatically when you click outside of related input or picker. By default is `true` + * Now it will set related input's value on initialization with specified value + * New `disabled` parameter to specify additional "disabled" days + * New `events` parameter to specify dates with "events" (will be marked with additional dots) + * New `rangesClasses` parameter to easily add custom classes to specified dates + * Pull To Refresh + * New events `pullstart`, `pullmove`, `pullend` and `refreshdone` + * Forms + * Better cross-browser support for `input[type="range"]` element + * Virtual List + * Fixed issue with size and scroll calculating when initialized in hidden tab + * Fixed issue with size and scroll calculating when used not in page + * Searchbar + * Fixed issue with close button when initialized in hidden tab + * Lazy Loading + * Fixed issue with lazy loading in hidden tab + * Template7 update to latest 1.1.0 version: + * Fixed access to data (`@index`, `@key`) and root context (`@root`) in partials + * Fixed `null` variables not to be outputed + * Swiper updated to latest 3.1.7 version: + * Fixed issue with wrong slides fill when number of slides less than `slidesPerView * slidesPerColumn` with `slidesPerColumnFill: 'row'` + * Added support for images `srcset` with lazy loading using `data-srcset` attribute + * Fixed new Chrome errors with `WebkitCSSMatrix` + * Fixed issue with `slideToClickedSlide` with `loop` and `centeredSlides` + * New `freeModeMinimumVelocity` parameter to set minimum required touch velocity to trigger free mode momentum + * Ability to make the Scrollbar draggable using new paramaters: + * `scrollbarDraggable` - (boolean) by default is `false`. Allows to enable draggable scrollbar + * `scrollbarSnapOnRelease` - (boolean) by default is `false`. Control slider snap on scrollbar release + * Router + * Now precompiled/cached tamplates will be ignored in case of `ignoreCache: true` parameter + * Fixed issue with `domCache` when going back with `force:true` to home page + * Lot of minor fixes and improvements + +## Framework7 v1.2.0 - Updated on July 18, 2015 + * New full featured Material theme designed according to Google guidelines + * New Material-specific App' parameters: + * `material` - should be set to `true` to enable Material-specific JS logic + * `materialPageLoadDelay` - option to add page loading delay (in ms) + * `materialPreloaderSvg` - HTML code for Material preloader + * `materialRipple` - option to enable Material-specific touch ripple effect (enabled by default) + * `materialRippleElements` - list of elements to apply touch ripple effect + * New CSS files structure + * All color-specific styles (color themes) are moved to separate `*.colors.css` file + * `*.themes.css` file has beend removed and its content merged into `*.colors.css` file + * Each theme has its own CSS files: + * `framework7.ios.css` - main styles for iOS theme + * `framework7.ios.colors.css` - color-specific styles for iOS theme + * `framework7.ios.rtl.css` - RTL layout styles for iOS theme + * `framework7.material.css` - main styles for Material theme + * `framework7.material.colors.css` - color-specific styles for Material theme + * `framework7.material.rtl.css` - RTL layout styles for Material theme + * Kitchen Sink has been splitted into two platform specific Kitchen Sinks + * Material theme breaking changes: + * Material theme doesn't support Dynamic Navbar + * Material theme doesn't support Through-type layout for Navbars/Toolbars + * A bit different layout for Checkboxes/Radios (check Kitchen Sink examples) + * Notifications are now displayed as so called Snackbars & Toasts + * Toolbar/Tabbar is now on the top of the page, under the Navbar + * Photo Browser + * Photo Browser main template changed to Template7 template + * Smart Select + * Fixed issue with using of optgroup with only one option with Virtual List enabled + * Calendar + * Fixed issue with wrong date formatting + * Notifications + * New global `notificationCloseButtonText` and local `closeButtonText` parameters for button on notifcation (toast) (Used in material theme only) + * Swipeout + * Fixed issue with none closing swipeout using a fast swipe + * Forms + * New Resizable textareas + * All form icons are converted to SVG + * Pull To Refresh + * Fixed "jumping" effect during multi-touch pull on iOS + * RTL + * Fixed issue with back pages navigation + * Swiper updated to latest 3.1.0 version: + * Accessibility (a11y) + * Fixed issue with wrong buttons labels + * Added support for pagination bullets + * New accessibility parameter for pagination label `paginationBulletMessage: 'Go to slide {{index}}'` + * Controler + * New parameter `controlBy` which can be 'slide' (by default) or 'container'. Defines a way how to control another slider: slide by slide or depending on all slides/container (like before) + * Now controllers in `controlBy: 'slide'` (default) mode will respect grid of each other + * Pagination + * New `paginationElement` parameter defines which HTML tag will be use to represent single pagination bullet. By default it is `span` + * New `roundLengths` parameter (by default is `false`) to round values of slides width and height to prevent blurry texts on usual resolution screens + * New `slidesOffsetBefore: 0` and `slidesOffsetAfter: 0` (in px) parameters to add additional slide offset within a container + * Correct calculation for slides size when use CSS padding on `.swiper-container` + * Fixed issue with not working onResize handler when swipes are locked + * Fixed issue with "jumping" effect when you disable `onlyExternal` during touchmove + * Fixed issue when slider goes to previos slide from last slide after window resize + * Custom builder will build both iOS and Android specific CSS files + * Lot of minor fixes and improvements + +## Framework7 v1.0.7 - Updated on June 20, 2015 + * Dom7 + * New `.removeData(key)` method to remove element data + * New `.filter(func)` method to filter elements collections + * Now initial XHR request parameters are available in `xhr.requestParameters` property + * Push State + * Fixed issues in FireFox/IE when going back produces infinite transition to first page in history + * Searchbar + * Fixed issue with not fully active Search Bar when using `customSearch:true` + * `searchbarHideDividers` and `searchbarHideGroups` parameters are moved from global app parameters to Searchbar instance parameters + * Now support callback parameters on initialization: `onSearch`, `onEnable`, `onDisable`, `onClear` + * Searchbar instance has new `.query` property with current seaarch query + * Accordion + * Fixed issue when using Accordion with media lists + * Messages + * Improved "auto-scroll" behavior when adding new message + * Photo Browser + * Fixed issues with `onSlideChangeStart`, `onSlideChangeEnd` callbacks which actually were `onTransitionStart`, `onTransitionEnd` + * Added support for Swiper's `onTransitionStart`, `onTransitionEnd` callbacks + * Color Themes + * Now `border-@color` class will set correct border color on elements that use pseudo-elements (:after, :before) as a borders + * Overlays + * Now pages and navbars in modals/popups should be initialized as normal pages on overlay open/creation + * Template7 updated to latest 1.0.6 version: + * Partials support: + * `registerPartial(name, template)` method to register partial + * `unregisterPartial(name, template)` method to unregister partial + * `>` helper to include partials like `{{> list}}` + * New `escape` helper for escaping strings + * Swiper updated to latest 3.0.8 version: + * Fixed issue with wrong active index and callbacks in Fade effect + * New mousewheel parameters: + * `mousewheelReleaseOnEdges` - will release mousewheel event and allow page scrolling when swiper is on edge positions (in the beginning or in the end) + * `mousewheelInvert` - option to invert mousewheel slides + * Fixed issue with lazy loading in next slides when `slidesPerView` > 1 + * Fixed issue with resistance bounds when swiping is locked + * Fixed issue with wrong slides order in multi-row mode (when `slidesPerColumn` > 1) + * Fixed issue with not working keyboard control in RTL mode + * Fixed issue with nested fade-effect swipers + * Lot of minor fixes + +## Framework7 v1.0.6 - Updated on May 1, 2015 + * Dom7 + * Improved performance for `outerWidth` and `outerHeight` methods + * `.serializeObject` method will apply encode uri to serialized string + * Searchbar + * Fixed search when using groups + * New option `removeDiacritics` to remove/replace diacritics characters (á, í, ó, etc.) during search + * Push State + * New `pushStatePreventOnLoad` option to prevent pop state on app load + * Navbars / Toolbars + * New option `showBarsOnPageScrollTop` to show bars when scoll page to top + * View + * More swipe back callbacks/events on View: `swipebackmove` -> `swipeBackMove`, `swipeBackBeforeChange`, `swipeBackBeforeReset`, `swipeBackAfterChange`, `swipeBackAfterReset` + * Calendar, Picker + * Fixed issues when `input` is not specified + * Grid + * New auto layout columns (equal width) with `col-auto` class + * Swiper updated to latest 3.0.7 version: + * New `width` and `height` parameters to force Swiper size, useful when it is hidden on intialization + * Better support for "Scroll Container". So now Swiper can be used as a scroll container with one single "scrollable"/"swipeable" slide + * Added lazy loading for background images with `data-background` attribute on required elements + * New "Sticky Free Mode" (with `freeModeSticky` parameter) which will snap to slides positions in free mode + * Fixed issues with lazy loading + * Fixed slide removing when loop mode is enabled + * Fixed issues with Autoplay and Fade effect + * Custom Build + * Fixed issues with not working custom build + * Lot of minor fixes + +## Framework7 v1.0.5 - Updated on March 28, 2015 + * Dom7 + * `$.camelCase` utilite renamed to `$.toCamelCase` + * `.removeAttr()` method now returns current Dom7 collection + * All response statuses that are between 200 and 300 will fire "success" callback/event + * Fast Clicks + * Fixed issue whith removing "Active state" when using `fastClicksDistanceThreshold` + * Fixed issues with multiple clicks on Android < 4.4 + * New Tap Hold Event + * It is can be used (if enabled) as usual event on any element like `$('.something').on('taphold', handler)` + * It is controled by new App parameters + * `tapHold: false` - set to true to enable tap hold events + * `tapHoldDelay: 750` - how long (in ms) the user must hold their tap before the taphold event is fired on the target element + * `tapHoldPreventClicks: true` - if enabled (by default), then click event will not be fired after tap hold + * Navbar + * Dynamic Navbar now has some events similar to page events: `navbarReinit`, `navbarBeforeInit`, `navbarInit`, `navbarBeforeRemove`. Each event `detail` contains: + * `navbar` - object with related navbar elements `navbarContainer` and `navbarInnerContainer` + * `page` - object with related page data + * Action Sheet + * Each button support new additional `disabled` parameter to make button disabled + * Added "Action Sheet To Popover" template that can be changed using App's `modalActionsToPopoverTemplate` parameter + * Messages + * New methods to handle messages: + * `messages.removeMessage(message)` - remove message + * `messages.removeMessages(messages)` - remove multiple messages per once + * `messages.addMessages(newMessages, method, animate)` - add multiple messages per once + * The following methods have new additional `animate` argument that allows to add new messages immediately without any transition and page scrolling + * `messages.addMessage(message, method, animate)` + * `messages.appendMessage(message, animate)` + * `messages.prependMessage(message, animate)` + * New `messages` initialization parameter that allows to pass initial messages using JS on initialization + * Template7 update to latest 1.0.5 version: + * Support for root context that may be used in templates as `{{@root.someVar}}` + * Improved support for paths: + * Support to access arrays directly by index `{{someArray.2}}` + * Better support for context "level up" `{{../../../someVar}}` + * New JS helpers with direct JS execution: + * `{{js "this.price * 2"}} - inline helper to modify/check context on the fly or do some JS calculations + * `{{#js_compare "this.price > 1000"}}Too expensive{{/js_compare}} - block helper for easier compares of variables + * Swiper updated to latest 3.0.6 version: + * Fixed sometimes wrong slides position when using "Fade" effect + * `.destroy(deleteInstance, cleanupStyles)` method now has second `cleanupStyles` argument, when passed - all custom styles will be removed from slides, wrapper and container. Useful if you need to destroy Swiper and to init again with new options or in different direction + +## Framework7 v1.0.4 - Updated on March 21, 2015 + * Router + * `preprocess` callback parameter now also supported by View on its initialisation which could overwrite `preprocess` app' parameter (if specified) + * New `preroute(view, options)` callback parameter which is supported by App and View on their initialisation. This callback allows to prevent default router load/back action and to load another page or do another required actions + * Swipeout + * Fixed issue with not opening swipeout after incomplete transition + * Fixed issue with triggering overswipe action on mobiles + * Messages + * New method `messages.clean()` - to clean/remove all the messages + * Calendar + * Fixed issues with years switch when using min/maxDate which didn't allow to return to the current year + * New parameter `onlyInPopover` (disabled by default). Enable it and Calendar will be always opened in Popover + * Picker + * New parameter `onlyInPopover` (disabled by default). Enable it and Picker will be always opened in Popover + * Fixed issues with not-clickable "items" after using `col.replaceValues` method + * Fast Clicks + * Fixed issue that didn't allow to call click programmatically (using element.click()) after first synthetic click + * Dom7 + * Added jQuery-like `$.each(object, callback)` method to iterate through Objects and Arrays + * Added optional `callback` argument for `$.scrollTo/Top/Left` methods to be executed after scrolling completed. With the following arguments options: + * `$.scrollTo(left, top, duration, easing, callback)` + * `$.scrollTo(left, top, duration, callback)` + * `$.scrollTop(top, duration, easing, callback)` + * `$.scrollTop(top, duration, callback)` + * `$.scrollLeft(top, duration, easing, callback)` + * `$.scrollLeft(top, duration, callback)` + * Swipe Back + * Will automatically close any active Picker Modals + * Searchbar + * New `customSearch` parameter. When enabled searchbar will not search through any of list blocks specified by `searchList` and you will be able to use custom search functionality, for example, for calling external APIs with search results and for displaying them manually + * Added ability to search in different places by passing a list of elements in `searchIn` parameters, for example: `searchIn: '.item-title, .item-text'` + * View + * New App method to get current (currently visible and active) View instance: + * `myApp.getCurrentView(index)` - return currently active View. If there are few currently active views (as in split view layout), then you need to specify `index` number of View, otherwise this method will return an array with current Views + * Push State + * More strictly locked to main view only to prevent states from other views + * Swiper updated to latest 3.0.5 version + * New Keyboard accessibility module to provide focusable navigation buttons and basic ARIA for screen readers with new parameters: + * `a11y: false` - enable accessibility + * `prevSlideMessage: 'Previous slide'` - message for screen readers for previous button + * `nextSlideMessage: 'Next slide'` - message for screen readers for next button + * `firstSlideMessage: 'This is the first slide'` - message for screen readers for previous button when swiper is on first slide + * `lastSlideMessage: 'This is the last slide'` - message for screen readers for next button when swiper is on last slide + * New Emitter module. It allows to work with callbacks like with events, even adding them after initialization with new methods: + * `.on(event, handler)` - add event/callback + * `.off(event, handler)` - remove this event/callback + * `.once(event, handler)` - add event/callback that will be executed only once + * Plugins API is back. It allows to write custom Swiper plugins + * New parameter `setWrapperSize` (be default it is `false`) to provide better compatibility with browser without flexbox support. Enabled this option and plugin will set width/height on swiper wrapper equal to total size of all slides + * New `virtualTranslate` parameter. When it is enabled swiper will be operated as usual except it will not move. Useful when you may need to create custom slide transition + * Added support for multiple Pagination containers + * Fixed `onLazyImage...` callbacks + * Fixed issue with not accessible links inside of Slides on Android < 4.4 + * Fixed pagination bullets behavior in loop mode with specified `slidesPerGroup` + +## Framework7 v1.0.3 - Updated on March 7, 2015 + * Dataset + * This could be a breaking change but all `data-` attributes, where used, now must be in hyphens-case instead of camelCase like in many places before. For example: + * `data-animatePages` on links now should be `data-animate-pages` + * `data-slidesPerView` on swiper now should be `data-slides-per-view` + * etc. + * Cards + * Fixed margins when page contains cards only + * Fast Clicks/Clicks + * Fixed scroll prevention on overlays when `fastClicks:false` + * SmartSelect + * `data-back-onselect` renamed to `data-back-on-select` + * Ability to add option color and additional class name using `data-option-color` and `data-option-class` attributes on `

      ')` + * Better width/height calculationg in `.width()` and `.height()` methods + * Support for JSON declaration of attributes and propeties in `.attr()` and `.prop()` methods + * Template7 + * Updated to latest Template7 version with new support of Global context, that could be specified using `Template7.global` property and used as `@global` keyword in templates + * Pull To Refresh + * New `app.destroyPullToRefresh()` method to destroy/disable PTR on page + +## Framework7 v0.9.8 - Updated on November 2, 2014 + * Virtual List + * New component that allows to render lists with huge amount of items without loss of performance. + * Swipeouts + * Improved performance and fixes issues that could cause app crashes + * Fixed issue with `swipeoutNoFollow` + * Compatibility with Virtual List + * Searchbar + * Better calculation for input field width with "Cancel" button + * Send .focus() on search field after tap on clear (x) icon + * Compatibility with Virtual List + * Infinite Scroll + * Compatibility with Virtual List + * Sortable + * Compatibility with Virtual List + * Smart Select + * Close smart select popup when use data-back-onselect attribute + * New attributes (data-form-theme, data-navbar-theme) and new app parameters (smartSelectFormTheme, smartSelectNavbarTheme) to control color theme on smart select page/popup + * Messages + * New `label` property for `app.addMessage()` method to specify message label + * Action Sheet + * Added `bg` property for button to specify button background color + * Slider + * Fixed issues with loop and autoplay when slider jumps over slides + * Fixes issue with focusing form elements in slides + * Swipe Back + * `swipeBackPageBoxShadow` App/View parameter renamed to `swipeBackPageAnimateShadow` + * New app parameter `swipeBackPageAnimateOpacity` that allows to control back page opacity during swipe back + * App + * `externalLinks` parameter now accepts string with CSS selector of external links + * Navbar / Toolbar + * New app methods `app.show/hideNavbar(navbar)`, `app.show/hideToolbar(navbar)` to show and hide navbar and toolbar/tabbar + * Now, tab bar can also be hidden by scroll by adding "hide-tabbar-on-scroll" class to page-content or using `hideTabbarOnPageScroll` parameter + * Fixed issues with disappearing navbar when using domCache + * Pages + * Page data object now has additional `context` property with passed context when using Template7 Pages + * View + * `linksView` parameter now also supports another View instance + * New reload behavior with new `reloadPages: true` parameter. In this mode View will always reload currently active page without loading new one + * Popover + * Fixed "angle" position on edge screen position + + +## Framework7 v0.9.7 - Updated on October 7, 2014 + * Slider + * Now supports continuous loop mode with `loop:true` option + * New `onlyExternal` option to disable swipes + * Fixed issue when `slidesPerView` is more than actual amount of slides + * Photo Browser + * Renamed enable/disable exposition methods to `.enableExposition` and `.disableExposition` + * Also supports continuous loop mode with option `loop:true` + * Added support for images lazy loading with new available options: `lazyLoading`, `lazyLoadingInPrevNext`, `lazyLoadingOnTransitionStart` + * New template `photoLazyTemplate` parameter for lazy laoding images layout + * Now it also supports pan and zoom for `` and `` + * Smart Select + * Now could be opened in Popup instead of Page with configuration using new related App parameters `smartSelectInPopup`, `smartSelectPopupCloseTemplate`, `smartSelectPopupCloseText` + * Smart select element supports new additional attributes `data-open-in` (to open in popup or in page) and `data-popup-close-text` (to sepcify popup's close button text) + * Messages + * New message element `message-label` + * Fixed bubbles masks on iOS 8 devices with none retina screens + * `app.updateMessagesAngles` renamed to `app.updateMessagesLayout` + * Each messages now supports additional classes `message-hide-avatar`, `message-with-tail`, `message-hide-name`, `message-hide-label` + * Auto set tails and hide/show avatars and names now requires for additional `messages-auto-layout` class on `messages` container + * Searchbar + * Fixed `disalbeSearch` and `enableSearch` events + * Pull To Refresh + * Fixed issue when there is no navbar on PTR page + * Icons + * Reworked `icon-bars` for none retina screens + * Navbars/Toolbars + * Now, can be hidden automatically when scrolling content (`page-content`). Could be enabled by adding `hide-bars-on-scroll` or `hide-navbar-on-scroll` or `hide-toolbar-on-scroll` additional classes on `page-content`. Or by setting app parameters: `hideNavbarOnPageScroll`, `hideToolbarOnPageScroll`, `showBarsOnPageScrollEnd` + * Template7 + * Template7 updated to v1.0.1 + * Now supports helpers without context + * New method `.unregisterHelper` to remove helper + * ` +[![Join the chat at https://gitter.im/nolimits4web/Framework7](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nolimits4web/Framework7) +[![Build Status](https://travis-ci.org/nolimits4web/Framework7.svg?branch=master)](https://travis-ci.org/nolimits4web/Framework7) +[![devDependency Status](https://david-dm.org/nolimits4web/framework7/dev-status.svg)](https://david-dm.org/nolimits4web/framework7#info=devDependencies) + +Framework7 +========== + +Full Featured Mobile HTML Framework For Building iOS & Android Apps + +## Getting Started + * [Getting Started Guide](http://www.idangero.us/framework7/get-started/) + * Clone/download this repo + * Start building your App from changing Kitchen Sink, or from a clean template from `dist/` folder + +## Server + +Because Framework7 uses Ajax for navigation between pages you will need a server. So to make it work you should put dist folder (or Kitchen Sink) on a server. Or, as an option, you may use Gulp's server. Just run: + +``` +$ gulp server +``` + + * Kitchen Sink will be available on `http://localhost:3000/kitchen-sink/` + * Dist - on `http://localhost:3000/dist/` + +## Kitchen Sink + +Framework7' JS and CSS files in Kitchen Sink are temporary linked to `build/` to make development process easier on this stage. So to make it work you need to build Framework7 (see Build section) or to re-link JS and CSS files to `dist/` folder. + +## Dist vs Build versions + +On production use files (JS and CSS) only from `dist/` folder, there will be the most stable versions, `build/` folder is only for development purpose + +## Build + +Framework7 uses `gulp` to build a development (build) and dist versions. + +First you need to have `gulp-cli` which you should install globally. + +``` +$ npm install --global gulp +``` + +Then install all dependencies, in repo's root: + +``` +$ npm install +``` + +And build development version of Framework7: +``` +$ gulp build +``` + +The result is available in `build/` folder. + +## Dist/Release + +After you have made build: + +``` +$ gulp dist +``` + +Distributable version will available in `dist/` folder. + +## Custom build + +You can build custom version of Framework7 with only required components/modules. For example, if we need to include only Accordion, Modals and Tabs modules in addition to Framework 7 core: + +``` +$ gulp custom -accordion,modals,tabs +``` +After that you will find created `custom/` folder with generated JS and CSS files. Here is the list of available additional modules: + +* cards +* accordion +* searchbar +* messages +* modals +* swipeout +* sortable +* smart-select +* virtual-list +* pull-to-refresh +* infinite-scroll +* scroll-toolbars +* tabs +* fast-clicks +* forms (means Ajax forms and forms storage) +* push-state +* swiper +* photo-browser +* picker +* calendar +* notifications + +## Contributing + +All changes should be commited to `src/` files. Framework7 uses LESS for CSS compliations, and concatenated JS files (look at gulpfile.js for concat files order) + +The project uses [.editorconfig](http://editorconfig.org/) to define the coding style of each file. We recommend that you install the Editor Config extension for your preferred IDE. + +If you want to help in Framework7 development and make it event better visit this page: http://framework7.io/contribute/ + +## Forum + +If you have questions about Framework7 or want to help others you are welcome to special forum at http://forum.framework7.io/ + +## Docs + +Documentation available at http://framework7.io/docs/ + +## Tutorials + +Tutorials available at http://framework7.io/tutorials/ + +## Showcase + +Appstore apps made with Framework7: http://framework7.io/showcase/ diff --git a/bower_components/framework7/backers.md b/bower_components/framework7/backers.md new file mode 100644 index 00000000..fe2c03d6 --- /dev/null +++ b/bower_components/framework7/backers.md @@ -0,0 +1,71 @@ +# Backers + +Support Framework7 development by [pledging on Patreon](https://www.patreon.com/vladimirkharlampidi)! + +### $1000 + +[Currently vacant. It could be you!](https://www.patreon.com/bePatron?patAmt=1000.0&exp=1&u=4109762&rid=830901) + +--- + +### $500 + +[Currently vacant. It could be you!](https://www.patreon.com/bePatron?patAmt=500.0&exp=1&u=4109762&rid=830876) + +--- + +### $250 + +[Currently vacant. It could be you!](https://www.patreon.com/bePatron?patAmt=250.0&exp=1&u=4109762&rid=830877) + +--- + +### $100 + +Juergen Schimmoeller + +[Join here](https://www.patreon.com/bePatron?patAmt=100.0&exp=1&u=4109762&rid=830841) + +--- + +### $50+ + +Kris Reddy
      +Bart DJ + +[Join here!](https://www.patreon.com/bePatron?exp=1&rid=830842&u=4109762&patAmt=50.0) + +--- + +### $10+ + +Firestream
      +Matthew Becker
      +Greg Hatt
      +Timo Ernst
      +Dmitry Akinin
      +Adrian Maleska
      +Michael Kreinbihl
      +Todd Crowe
      +Thanakrit Tangtermsak
      +Rick Chang
      +Dave Billington + +[Join here!](https://www.patreon.com/bePatron?exp=1&rid=830839&u=4109762&patAmt=10.0) + +--- + +### $5+ + +Mnill
      +Daniel Wüst
      +Tirso Martínez Reyes
      +Zafer Ayan
      +Amir br
      +Toby Allen - Ballymaloe Cookery School
      +Dan Boschen
      +Daniel Dingemanse
      +Henry Blackman
      +Ruslan Skorynin + +[Join here!](https://www.patreon.com/bePatron?exp=1&rid=845389&u=4109762&patAmt=5.0) diff --git a/bower_components/framework7/bower.json b/bower_components/framework7/bower.json new file mode 100644 index 00000000..2f119ddc --- /dev/null +++ b/bower_components/framework7/bower.json @@ -0,0 +1,30 @@ +{ + "name": "framework7", + "repository": { + "type": "git", + "url": "https://github.com/nolimits4web/Framework7.git" + }, + "description": "Full featured mobile HTML framework for building iOS & Android apps", + "version": "1.6.2", + "author": "Vladimir Kharlampidi", + "homepage": "http://framework7.io", + "keywords": ["mobile", "framework", "ios 7", "ios7", "ios8", "ios 8", "iphone", "ipad", "apple", "phonegap", "native", "touch", "appstore", "app", "f7", "material", "android", "google", "googleplay"], + "scripts": [ + "dist/js/framework7.js" + ], + "main": "dist/", + "styles": [ + "dist/css/framework7.css" + ], + "license": ["MIT"], + "ignore": [ + ".*", + "build", + "custom", + "kitchen-sink-ios/", + "kitchen-sink-material/", + "gulpfile.js", + "node_modules", + "package.json" + ] +} diff --git a/bower_components/framework7/composer.json b/bower_components/framework7/composer.json new file mode 100644 index 00000000..3e084e18 --- /dev/null +++ b/bower_components/framework7/composer.json @@ -0,0 +1,40 @@ +{ + "name": "nolimits4web/framework7", + "description": "Full featured mobile HTML framework for building iOS & Android apps", + "keywords": [ + "mobile", + "framework", + "ios", + "ios 7", + "ios7", + "ios8", + "ios 8", + "ios9", + "ios 9", + "iphone", + "ipad", + "apple", + "phonegap", + "native", + "touch", + "appstore", + "app", + "f7", + "material", + "android", + "google", + "googleplay" + ], + "homepage": "http://framework7.io/", + "license": "MIT", + "support": { + "issues": "https://github.com/nolimits4web/framework7/issues" + }, + "authors": [ + { + "name": "Vladimir Kharlampidi", + "email": "nolimits4web@gmail.com", + "homepage": "http://idangero.us" + } + ] +} \ No newline at end of file diff --git a/bower_components/framework7/dist/about.html b/bower_components/framework7/dist/about.html new file mode 100644 index 00000000..2fcd28c6 --- /dev/null +++ b/bower_components/framework7/dist/about.html @@ -0,0 +1,28 @@ + + + + +
      + +
      + +
      +
      +
      +

      Here is About page!

      +

      Go back or click here to create dynamic page.

      +

      Mauris posuere sit amet metus id venenatis. Ut ante dolor, tempor nec commodo rutrum, varius at sem. Nullam ac nisi non neque ornare pretium. Nulla mauris mauris, consequat et elementum sit amet, egestas sed orci. In hac habitasse platea dictumst.

      +

      Fusce eros lectus, accumsan eget mi vel, iaculis tincidunt felis. Nulla tincidunt pharetra sagittis. Fusce in felis eros. Nulla sit amet aliquam lorem, et gravida ipsum. Mauris consectetur nisl non sollicitudin tristique. Praesent vitae metus ac quam rhoncus mattis vel et nisi. Aenean aliquet, felis quis dignissim iaculis, lectus quam tincidunt ligula, et venenatis turpis risus sed lorem. Morbi eu metus elit. Ut vel diam dolor.

      +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/bower_components/framework7/dist/css/framework7.css b/bower_components/framework7/dist/css/framework7.css new file mode 100644 index 00000000..4f7e621a --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.css @@ -0,0 +1,3326 @@ +html, +body, +.framework7-root { + position: relative; + height: 100%; + width: 100%; + overflow-x: hidden; +} +body { + margin: 0; + padding: 0; + font-size: 14px; + width: 100%; + -webkit-text-size-adjust: 100%; + background: #fff; + overflow: hidden; +} +.framework7-root { + overflow: hidden; +} +@media all and (width: 1024px) and (height: 691px) and (orientation: landscape) { + html, + body, + .framework7-root { + height: 671px; + } +} +@media all and (width: 1024px) and (height: 692px) and (orientation: landscape) { + html, + body, + .framework7-root { + height: 672px; + } +} +* { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-touch-callout: none; +} +a, +input, +textarea, +select { + outline: 0; +} +a { + text-decoration: none; +} +p { + margin: 1em 0; +} +html.ios body { + font-family: -apple-system, SF UI Text, Helvetica Neue, Helvetica, Arial, sans-serif; + color: #000; + line-height: 1.4; +} +html.ios .md-only { + display: none; +} +html.ios a { + color: #007aff; +} +@media all and (width: 1024px) and (height: 691px) and (orientation: landscape) { + html.ios, + html.ios body, + html.ios .framework7-root { + height: 671px; + } +} +@media all and (width: 1024px) and (height: 692px) and (orientation: landscape) { + html.ios, + html.ios body, + html.ios .framework7-root { + height: 672px; + } +} +html.md body { + font-family: Roboto, Noto, Helvetica, Arial, sans-serif; + color: #212121; + line-height: 1.5; +} +html.md .ios-only { + display: none; +} +html.md a { + color: #2196f3; +} +/* === Views === */ +.views, +.view { + width: 100%; + position: relative; + height: 100%; + z-index: 5000; + overflow: hidden; + box-sizing: border-box; +} +/* === Pages === */ +.pages { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; +} +.page { + box-sizing: border-box; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + transform: translate3d(0, 0, 0); +} +.page.cached { + display: none; +} +.page-content { + overflow: auto; + -webkit-overflow-scrolling: touch; + box-sizing: border-box; + height: 100%; + position: relative; + z-index: 1; +} +html.ios .swipeback-page-shadow { + position: absolute; + right: 100%; + top: 0; + width: 16px; + height: 100%; + background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); + background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); + z-index: -1; + content: ''; +} +html.ios .swipeback-page-opacity { + position: absolute; + left: 0; + top: 0; + background: rgba(0, 0, 0, 0.1); + width: 100%; + height: 100%; + content: ''; + opacity: 0; + z-index: 10000; +} +html.ios .page { + background: #efeff4; +} +html.ios .page-previous { + transform: translate3d(-20%, 0, 0); +} +html.ios .page-previous .swipeback-page-opacity { + opacity: 1; +} +html.ios .page-previous:after { + opacity: 1; +} +html.ios .page-current .swipeback-page-shadow { + opacity: 1; +} +html.ios .page-current .swipeback-page-opacity { + opacity: 0 !important; +} +html.ios .page-next { + transform: translate3d(100%, 0, 0); +} +html.ios .page-next .swipeback-page-shadow { + opacity: 0 !important; +} +html.ios .page-next-to-current { + animation: ios-page-next-to-current 400ms forwards; +} +html.ios .page-next-to-current:before { + position: absolute; + right: 100%; + top: 0; + width: 16px; + height: 100%; + background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); + background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); + z-index: -1; + content: ''; + animation: ios-page-next-to-current-shadow 400ms forwards; +} +html.ios .page-previous-to-current { + animation: ios-page-previous-to-current 400ms forwards; +} +html.ios .page-previous-to-current:after { + position: absolute; + left: 0; + top: 0; + background: rgba(0, 0, 0, 0.1); + width: 100%; + height: 100%; + content: ''; + opacity: 0; + z-index: 10000; + animation: ios-page-previous-to-current-opacity 400ms forwards; +} +html.ios .page-current-to-next { + animation: ios-page-current-to-next 400ms forwards; +} +html.ios .page-current-to-next:before { + position: absolute; + right: 100%; + top: 0; + width: 16px; + height: 100%; + background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); + background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); + z-index: -1; + content: ''; + animation: ios-page-current-to-next-shadow 400ms forwards; +} +html.ios .page-current-to-previous { + animation: ios-page-current-to-previous 400ms forwards; +} +html.ios .page-current-to-previous:after { + position: absolute; + left: 0; + top: 0; + background: rgba(0, 0, 0, 0.1); + width: 100%; + height: 100%; + content: ''; + opacity: 0; + z-index: 10000; + animation: ios-page-current-to-previous-opacity 400ms forwards; +} +html.ios .page-transitioning, +html.ios .page-transitioning .swipeback-page-shadow, +html.ios .page-transitioning .swipeback-page-opacity { + transition-duration: 400ms; +} +@keyframes ios-page-next-to-current { + from { + transform: translate3d(100%, 0, 0); + } + to { + transform: translate3d(0%, 0, 0); + } +} +@keyframes ios-page-next-to-current-shadow { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes ios-page-previous-to-current { + from { + transform: translate3d(-20%, 0, 0); + } + to { + transform: translate3d(0%, 0, 0); + } +} +@keyframes ios-page-previous-to-current-opacity { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@keyframes ios-page-current-to-previous { + from { + transform: translate3d(0, 0, 0); + } + to { + transform: translate3d(-20%, 0, 0); + } +} +@keyframes ios-page-current-to-previous-opacity { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes ios-page-current-to-next { + from { + transform: translate3d(0, 0, 0); + } + to { + transform: translate3d(100%, 0, 0); + } +} +@keyframes ios-page-current-to-next-shadow { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +html.md .page { + background: #fff; +} +html.md .page-next { + transform: translate3d(0, 56px, 0); + opacity: 0; + pointer-events: none; +} +html.md .page-next-to-current { + pointer-events: none; + animation: md-page-next-to-current 300ms forwards; +} +html.md .page-previous-to-current { + pointer-events: none; + animation: md-page-previous-to-current 300ms forwards; +} +html.md .page-current-to-next { + pointer-events: none; + animation: md-page-current-to-next 300ms forwards; +} +html.md .page-current-to-previous { + pointer-events: none; + animation: md-page-current-to-previous 300ms forwards; +} +html.md .page-transitioning { + transition-duration: 300ms; +} +@keyframes md-page-next-to-current { + from { + transform: translate3d(0, 56px, 0); + opacity: 0; + } + to { + transform: translate3d(0, 0px, 0); + opacity: 1; + } +} +@keyframes md-page-previous-to-current { + from { + transform: translate3d(0, 0, 0); + } + to { + transform: translate3d(0, 0, 0); + } +} +@keyframes md-page-current-to-previous { + from { + transform: translate3d(0, 0, 0); + } + to { + transform: translate3d(0, 0, 0); + } +} +@keyframes md-page-current-to-next { + from { + transform: translate3d(0, 0, 0); + opacity: 1; + } + to { + transform: translate3d(0, 56px, 0); + opacity: 0; + } +} +/* === Link === */ +.link, +.tab-link { + display: inline-flex; + align-items: center; + align-content: center; + position: relative; + box-sizing: border-box; + transform: translate3d(0, 0, 0); +} +html.ios .link { + transition: opacity 300ms; +} +html.ios .link.active-state { + opacity: 0.3; + transition-duration: 0ms; +} +/* === Navbar === */ +.navbar { + position: relative; + left: 0; + top: 0; + width: 100%; + z-index: 500; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + box-sizing: border-box; + margin: 0; + transform: translate3d(0, 0, 0); +} +.navbar b { + font-weight: 500; +} +.navbar a.link { + display: flex; +} +.navbar .title { + text-align: center; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + flex-shrink: 10; + display: flex; + align-items: center; + font-weight: 500; +} +.navbar .left, +.navbar .right { + flex-shrink: 0; + display: flex; + justify-content: flex-start; + align-items: center; + transform: translate3d(0, 0, 0); +} +.navbar .right:first-child { + position: absolute; + height: 100%; +} +.navbar-inner { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + display: flex; + align-items: center; + box-sizing: border-box; +} +.navbar-inner.stacked { + display: none; +} +.views > .navbar, +.view > .navbar, +.page > .navbar { + position: absolute; +} +html.ios .navbar { + height: 44px; + font-size: 17px; + background: #f7f7f8; +} +html.ios .navbar.no-border:after { + display: none !important; +} +html.ios .navbar:after { + backface-visibility: hidden; +} +html.ios .navbar a.link { + justify-content: flex-start; + line-height: 44px; + height: 44px; +} +html.ios .navbar a.link i + span, +html.ios .navbar a.link i + i, +html.ios .navbar a.link span + i, +html.ios .navbar a.link span + span { + margin-left: 7px; +} +html.ios .navbar a.icon-only { + min-width: 44px; + margin: 0; + justify-content: flex-start; +} +html.ios .navbar .title { + font-size: 17px; + margin: 0; + line-height: 44px; +} +html.ios .navbar .left a + a, +html.ios .navbar .right a + a { + margin-left: 15px; +} +html.ios .navbar .left { + margin-right: 10px; +} +html.ios .navbar .right { + margin-left: 10px; +} +html.ios .navbar .right:first-child { + right: 8px; +} +html.ios .navbar:after { + content: ''; + position: absolute; + background-color: #c4c4c4; + display: block; + z-index: 15; + top: auto; + right: auto; + bottom: 0; + left: 0; + height: 1px; + width: 100%; + transform-origin: 50% 100%; +} +html.ios.device-pixel-ratio-2 .navbar:after { + transform: scaleY(0.5); +} +html.ios.device-pixel-ratio-3 .navbar:after { + transform: scaleY(0.33); +} +html.ios.device-ios-gt-8 .navbar b, +html.ios.device-ios-gt-8 .navbar .title { + font-weight: 600; +} +html.ios .navbar-inner { + justify-content: space-between; + padding: 0 8px; +} +html.ios .navbar ~ * .page-content, +html.ios .navbar ~ .page-content { + padding-top: 44px; +} +html.ios .navbar-previous .left, +html.ios .navbar-previous .right, +html.ios .navbar-previous .title, +html.ios .navbar-previous .subnavbar, +html.ios .navbar-previous .fading { + opacity: 0; +} +html.ios .navbar-previous .sliding { + opacity: 0; +} +html.ios .navbar-previous .subnavbar.sliding { + opacity: 1; + trasnform: translate3d(-100%, 0, 0); +} +html.ios .navbar-next .left, +html.ios .navbar-next .right, +html.ios .navbar-next .title, +html.ios .navbar-next .subnavbar, +html.ios .navbar-next .fading { + opacity: 0; +} +html.ios .navbar-next .sliding { + opacity: 0; +} +html.ios .navbar-next.sliding .left, +html.ios .navbar-next.sliding .right, +html.ios .navbar-next.sliding .title, +html.ios .navbar-next.sliding .subnavbar { + opacity: 0; +} +html.ios .navbar-next .subnavbar.sliding, +html.ios .navbar-next.sliding .subnavbar { + trasnform: translate3d(100%, 0, 0); +} +html.ios .navbar-transitioning { + transition-duration: 400ms; +} +html.ios .navbar-hidden { + transform: translate3d(0, -100%, 0); +} +html.ios .navbar-next-to-current .left, +html.ios .navbar-previous-to-current .left, +html.ios .navbar-next-to-current .right, +html.ios .navbar-previous-to-current .right, +html.ios .navbar-next-to-current .title, +html.ios .navbar-previous-to-current .title, +html.ios .navbar-next-to-current .subnavbar, +html.ios .navbar-previous-to-current .subnavbar, +html.ios .navbar-next-to-current .fading, +html.ios .navbar-previous-to-current .fading { + animation: ios-navbar-element-fade-in 400ms forwards; +} +html.ios .navbar-next-to-current .sliding, +html.ios .navbar-previous-to-current .sliding { + opacity: 1; +} +html.ios .navbar-next-to-current.sliding .left, +html.ios .navbar-previous-to-current.sliding .left, +html.ios .navbar-next-to-current.sliding .right, +html.ios .navbar-previous-to-current.sliding .right, +html.ios .navbar-next-to-current.sliding .title, +html.ios .navbar-previous-to-current.sliding .title, +html.ios .navbar-next-to-current.sliding .subnavbar, +html.ios .navbar-previous-to-current.sliding .subnavbar { + opacity: 1; +} +html.ios .navbar-current-to-next .left, +html.ios .navbar-current-to-previous .left, +html.ios .navbar-current-to-next .right, +html.ios .navbar-current-to-previous .right, +html.ios .navbar-current-to-next .title, +html.ios .navbar-current-to-previous .title, +html.ios .navbar-current-to-next .subnavbar, +html.ios .navbar-current-to-previous .subnavbar, +html.ios .navbar-current-to-next .fading, +html.ios .navbar-current-to-previous .fading { + animation: ios-navbar-element-fade-out 400ms forwards; +} +html.ios .navbar-current-to-next .sliding, +html.ios .navbar-current-to-previous .sliding { + opacity: 0; +} +html.ios .navbar-current-to-next .subnavbar.sliding, +html.ios .navbar-current-to-previous .subnavbar.sliding { + opacity: 1; +} +html.ios .navbar-current-to-next.sliding .subnavbar, +html.ios .navbar-current-to-previous.sliding .subnavbar { + opacity: 1; +} +html.ios .navbar-current-to-next.sliding .left, +html.ios .navbar-current-to-previous.sliding .left, +html.ios .navbar-current-to-next.sliding .right, +html.ios .navbar-current-to-previous.sliding .right, +html.ios .navbar-current-to-next.sliding .title, +html.ios .navbar-current-to-previous.sliding .title, +html.ios .navbar-current-to-next.sliding .subnavbar, +html.ios .navbar-current-to-previous.sliding .subnavbar { + opacity: 0; +} +html.ios .navbar-next-to-current .left.sliding .back.link .icon, +html.ios .navbar-previous-to-current .left.sliding .back.link .icon, +html.ios .navbar-current-to-next .left.sliding .back.link .icon, +html.ios .navbar-current-to-previous .left.sliding .back.link .icon { + transition-duration: 400ms; +} +html.ios .navbar-next-to-current .sliding, +html.ios .navbar-previous-to-current .sliding, +html.ios .navbar-current-to-next .sliding, +html.ios .navbar-current-to-previous .sliding { + transition: 400ms; + animation: none; +} +html.ios .navbar-next-to-current.sliding .left, +html.ios .navbar-previous-to-current.sliding .left, +html.ios .navbar-current-to-next.sliding .left, +html.ios .navbar-current-to-previous.sliding .left, +html.ios .navbar-next-to-current.sliding .right, +html.ios .navbar-previous-to-current.sliding .right, +html.ios .navbar-current-to-next.sliding .right, +html.ios .navbar-current-to-previous.sliding .right, +html.ios .navbar-next-to-current.sliding .title, +html.ios .navbar-previous-to-current.sliding .title, +html.ios .navbar-current-to-next.sliding .title, +html.ios .navbar-current-to-previous.sliding .title, +html.ios .navbar-next-to-current.sliding .subnavbar, +html.ios .navbar-previous-to-current.sliding .subnavbar, +html.ios .navbar-current-to-next.sliding .subnavbar, +html.ios .navbar-current-to-previous.sliding .subnavbar { + transition: 400ms; + animation: none; +} +html.ios .navbar-next-to-current.sliding .left .back .icon, +html.ios .navbar-previous-to-current.sliding .left .back .icon, +html.ios .navbar-current-to-next.sliding .left .back .icon, +html.ios .navbar-current-to-previous.sliding .left .back .icon { + transition-duration: 400ms; +} +@keyframes ios-navbar-element-fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes ios-navbar-element-fade-out { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +html.md .navbar { + height: 56px; + background: #2196f3; + color: #fff; + font-size: 20px; + box-shadow: 0 4px 4px -1px rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.14), 0 2px 10px -5px rgba(0, 0, 0, 0.12); +} +html.md .navbar.no-shadow { + box-shadow: none !important; +} +html.md .navbar a { + color: inherit; +} +html.md .navbar a.link { + justify-content: center; + padding: 0 16px; + min-width: 48px; + height: 56px; + line-height: 56px; +} +html.md .navbar a.link:before { + content: ''; + width: 152%; + height: 152%; + position: absolute; + left: -26%; + top: -26%; + background-image: -webkit-radial-gradient(center, circle cover, rgba(255, 255, 255, 0.15) 66%, rgba(255, 255, 255, 0) 66%); + background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 66%, rgba(255, 255, 255, 0) 66%); + background-repeat: no-repeat; + background-position: center; + background-size: 100% 100%; + opacity: 0; + pointer-events: none; + transition-duration: 600ms; +} +html.md .navbar a.link.active-state:before { + opacity: 1; + transition-duration: 150ms; +} +html.md .navbar a.link i + span, +html.md .navbar a.link i + i, +html.md .navbar a.link span + i, +html.md .navbar a.link span + span { + margin-left: 8px; +} +html.md .navbar a.icon-only { + min-width: 0; + flex-shrink: 0; +} +html.md .navbar .title { + margin: 0 16px; + line-height: 56px; + display: inline-block; + text-align: left; +} +html.md .navbar .right { + margin-left: auto; +} +html.md .navbar .right:first-child { + right: 16px; +} +html.md .navbar-inner { + justify-content: flex-start; + overflow: hidden; +} +html.md .navbar ~ * .page-content, +html.md .navbar ~ .page-content { + padding-top: 56px; +} +@media (min-width: 768px) { + html.md .navbar { + height: 64px; + } + html.md .navbar a.link { + height: 64px; + line-height: 64px; + } + html.md .navbar .title { + line-height: 64px; + } + html.md .navbar ~ * .page-content, + html.md .navbar ~ .page-content { + padding-top: 64px; + } +} +html.md .navbar-transitioning { + transition-duration: 400ms; +} +html.md .navbar-hidden { + box-shadow: none; + transform: translate3d(0, -100%, 0); +} +/* === Toolbar === */ +.toolbar { + width: 100%; + position: relative; + margin: 0; + transform: translate3d(0, 0, 0); + backface-visibility: hidden; + z-index: 500; + box-sizing: border-box; + left: 0; +} +.toolbar b { + font-weight: 500; +} +.toolbar a { + box-sizing: border-box; + flex-shrink: 1; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; +} +.toolbar a.link { + display: flex; +} +.toolbar i.icon { + display: block; +} +.toolbar-inner { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + display: flex; + justify-content: space-between; + box-sizing: border-box; + align-items: center; + align-content: center; +} +.tabbar, +.tabbar-labels { + z-index: 5001; +} +.tabbar a.link, +.tabbar-labels a.link { + line-height: 1.4; +} +.tabbar a.tab-link, +.tabbar-labels a.tab-link, +.tabbar a.link, +.tabbar-labels a.link { + height: 100%; + width: 100%; + box-sizing: border-box; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} +.tabbar-labels a.tab-link, +.tabbar-labels a.link { + height: 100%; + justify-content: space-between; + align-items: center; +} +.tabbar-labels a.tab-link .tabbar-label, +.tabbar-labels a.link .tabbar-label { + display: block; + line-height: 1; + margin: 0; + position: relative; + text-overflow: ellipsis; + white-space: nowrap; +} +.tabbar-scrollable .toolbar-inner { + justify-content: flex-start; + overflow: auto; +} +.tabbar-scrollable .toolbar-inner::-webkit-scrollbar { + display: none !important; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + opacity: 0 !important; +} +.tabbar-scrollable a.tab-link, +.tabbar-scrollable a.link { + width: auto; + flex-shrink: 0; +} +.views > .toolbar, +.view > .toolbar, +.page > .toolbar { + position: absolute; +} +html.ios .toolbar { + height: 44px; + font-size: 17px; + background: #f7f7f8; + bottom: 0; +} +html.ios .toolbar:after { + backface-visibility: hidden; +} +html.ios .toolbar a.link { + line-height: 44px; + height: 44px; + justify-content: flex-start; +} +html.ios .toolbar a.link i + span, +html.ios .toolbar a.link i + i, +html.ios .toolbar a.link span + i, +html.ios .toolbar a.link span + span { + margin-left: 7px; +} +html.ios .toolbar a.icon-only { + min-height: 44px; + display: flex; + justify-content: center; + align-items: center; + margin: 0; +} +html.ios .toolbar.no-border:before { + display: none !important; +} +html.ios .toolbar:before { + content: ''; + position: absolute; + background-color: #c4c4c4; + display: block; + z-index: 15; + top: 0; + right: auto; + bottom: auto; + left: 0; + height: 1px; + width: 100%; + transform-origin: 50% 0%; +} +html.ios.device-pixel-ratio-2 .toolbar:before { + transform: scaleY(0.5); +} +html.ios.device-pixel-ratio-3 .toolbar:before { + transform: scaleY(0.33); +} +html.ios.device-ios-gt-8 .navbar b { + font-weight: 600; +} +html.ios .toolbar-inner { + padding: 0 8px; +} +html.ios .tabbar, +html.ios .tabbar-labels { + color: #929292; +} +html.ios .tabbar a, +html.ios .tabbar-labels a { + color: #929292; +} +html.ios .tabbar a.tab-link-active, +html.ios .tabbar-labels a.tab-link-active { + color: #007aff; +} +html.ios .tabbar i.icon, +html.ios .tabbar-labels i.icon { + height: 30px; +} +html.ios .tabbar-labels { + height: 50px; +} +html.ios .tabbar-labels a.tab-link, +html.ios .tabbar-labels a.link { + padding-top: 4px; + padding-bottom: 4px; +} +html.ios .tabbar-labels a.tab-link i + span, +html.ios .tabbar-labels a.link i + span { + margin: 0; +} +html.ios .tabbar-labels .tabbar-label { + letter-spacing: 0.01em; + font-size: 10px; +} +@media (min-width: 768px) { + html.ios .tabbar .toolbar-inner, + html.ios .tabbar-labels .toolbar-inner { + justify-content: center; + } + html.ios .tabbar a.tab-link, + html.ios .tabbar-labels a.tab-link, + html.ios .tabbar a.link, + html.ios .tabbar-labels a.link { + width: auto; + min-width: 105px; + } + html.ios .tabbar-labels { + height: 56px; + } + html.ios .tabbar-labels .tabbar-label { + font-size: 14px; + } +} +html.ios .tabbar-scrollable a.tab-link, +html.ios .tabbar-scrollable a.link { + padding: 0 8px; +} +html.ios .toolbar ~ * .page-content, +html.ios .toolbar ~ .page-content { + padding-bottom: 44px; +} +html.ios .tabbar-labels ~ * .page-content, +html.ios .tabbar-labels ~ .page-content { + padding-bottom: 50px; +} +@media (min-width: 768px) { + html.ios .tabbar-labels ~ * .page-content, + html.ios .tabbar-labels ~ .page-content { + padding-bottom: 56px; + } +} +html.ios .toolbar-transitioning { + transition-duration: 400ms; +} +html.ios .toolbar-hidden { + transform: translate3d(0, 100%, 0); +} +html.md .toolbar { + background: #2196f3; + height: 48px; + color: #fff; + font-size: 14px; + overflow: hidden; + top: 0; + box-shadow: 0 4px 4px -1px rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.14), 0 2px 10px -5px rgba(0, 0, 0, 0.12); +} +html.md .toolbar.no-shadow { + box-shadow: none !important; +} +html.md .toolbar a { + color: #fff; +} +html.md .toolbar a.link { + justify-content: center; + padding: 0 16px; + min-width: 48px; + line-height: 48px; + height: 48px; +} +html.md .toolbar a.link:before { + content: ''; + width: 152%; + height: 152%; + position: absolute; + left: -26%; + top: -26%; + background-image: -webkit-radial-gradient(center, circle cover, rgba(255, 255, 255, 0.15) 66%, rgba(255, 255, 255, 0) 66%); + background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 66%, rgba(255, 255, 255, 0) 66%); + background-repeat: no-repeat; + background-position: center; + background-size: 100% 100%; + opacity: 0; + pointer-events: none; + transition-duration: 600ms; +} +html.md .toolbar a.link.active-state:before { + opacity: 1; + transition-duration: 150ms; +} +html.md .toolbar a.link i + span, +html.md .toolbar a.link i + i, +html.md .toolbar a.link span + i, +html.md .toolbar a.link span + span { + margin-left: 8px; +} +html.md .toolbar a.icon-only { + min-width: 0; + flex-shrink: 0; +} +html.md .tabbar a.link, +html.md .tabbar-labels a.link, +html.md .tabbar a.tab-link, +html.md .tabbar-labels a.tab-link { + padding-left: 0; + padding-right: 0; + font-size: 14px; + text-transform: uppercase; +} +html.md .tabbar i.icon, +html.md .tabbar-labels i.icon { + height: 24px; +} +html.md .tabbar a.tab-link, +html.md .tabbar-labels a.tab-link { + transition-duration: 300ms; + overflow: hidden; + color: rgba(255, 255, 255, 0.7); + position: relative; +} +html.md .tabbar a.tab-link.tab-link-active, +html.md .tabbar-labels a.tab-link.tab-link-active, +html.md .tabbar a.tab-link.active-state, +html.md .tabbar-labels a.tab-link.active-state { + color: #ffffff; +} +html.md .tabbar .tab-link-highlight, +html.md .tabbar-labels .tab-link-highlight { + position: absolute; + left: 0; + bottom: 0; + height: 3px; + background: rgba(255, 255, 255, 0.5); + transition-duration: 300ms; +} +html.md .toolbar-bottom { + top: auto !important; + bottom: 0 !important; + box-shadow: 0 -4px 4px -1px rgba(0, 0, 0, 0.2), 0 -5px 5px 0 rgba(0, 0, 0, 0.14), 0 -2px 10px -5px rgba(0, 0, 0, 0.12); +} +html.md .toolbar-bottom .tab-link-highlight { + bottom: auto; + top: 0; +} +html.md .tabbar-labels { + height: 72px; +} +html.md .tabbar-labels a.tab-link, +html.md .tabbar-labels a.link { + padding-top: 12px; + padding-bottom: 12px; +} +html.md .tabbar-labels .tabbar-label { + margin-top: 10px; + max-width: 100%; + overflow: hidden; +} +html.md .tabbar-labels.toolbar-bottom .tabbar-label { + text-transform: none; +} +html.md .tabbar-scrollable a.tab-link, +html.md .tabbar-scrollable a.link { + padding: 0 16px; +} +html.md .toolbar:not(.toolbar-bottom) ~ * .page-content, +html.md .toolbar:not(.toolbar-bottom) ~ .page-content { + padding-top: 48px; +} +html.md .tabbar-labels:not(.toolbar-bottom) ~ * .page-content, +html.md .tabbar-labels:not(.toolbar-bottom) ~ .page-content { + padding-top: 72px; +} +html.md .toolbar-hidden { + transform: translate3d(0, -100%, 0); + box-shadow: none; +} +html.md .toolbar-hidden.toolbar-bottom { + transform: translate3d(0, 100%, 0); +} +html.md .navbar + .toolbar:not(.toolbar-bottom) { + top: 56px; +} +html.md .navbar + .toolbar:not(.toolbar-bottom) ~ * .page-content, +html.md .navbar + .toolbar:not(.toolbar-bottom) ~ .page-content { + padding-top: 104px; +} +html.md .navbar + .tabbar-labels:not(.toolbar-bottom) ~ * .page-content, +html.md .navbar + .tabbar-labels:not(.toolbar-bottom) ~ .page-content { + padding-top: 128px; +} +html.md .navbar + .toolbar-hidden:not(.toolbar-bottom) { + transform: translate3d(0, -104px, 0); +} +html.md .navbar + .toolbar-hidden.tabbar-labels:not(.toolbar-bottom) { + transform: translate3d(0, -128px, 0); +} +html.md .navbar.navbar-hidden + .toolbar:not(.toolbar-bottom) { + transform: translate3d(0, -56px, 0); +} +@media (min-width: 768px) { + html.md .navbar + .toolbar:not(.toolbar-bottom) { + top: 64px; + } + html.md .navbar + .toolbar:not(.toolbar-bottom) ~ * .page-content, + html.md .navbar + .toolbar:not(.toolbar-bottom) ~ .page-content { + padding-top: 112px; + } + html.md .navbar + .tabbar-labels:not(.toolbar-bottom) ~ * .page-content, + html.md .navbar + .tabbar-labels:not(.toolbar-bottom) ~ .page-content { + padding-top: 136px; + } + html.md .navbar.navbar-hidden + .toolbar:not(.toolbar-bottom) { + transform: translate3d(0, -64px, 0); + } + html.md .navbar + .toolbar-hidden:not(.toolbar-bottom) { + transform: translate3d(0, -112px, 0); + } + html.md .navbar + .toolbar-hidden.tabbar-labels:not(.toolbar-bottom) { + transform: translate3d(0, -136px, 0); + } +} +html.md .toolbar-bottom ~ * .page-content, +html.md .toolbar-bottom ~ .page-content { + padding-bottom: 48px; +} +html.md .toolbar-bottom.tabbar-labels ~ * .page-content, +html.md .toolbar-bottom.tabbar-labels ~ .page-content { + padding-bottom: 72px; +} +html.md .toolbar-transitioning, +html.md .navbar-transitioning + .toolbar { + transition-duration: 400ms; +} +/* === Content Block === */ +.content-block { + box-sizing: border-box; +} +.block-title { + position: relative; + overflow: hidden; + margin: 0; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 14px; + line-height: 1; +} +.block-title + .list-block, +.block-title + .content-block, +.block-title + .card, +.block-title + .timeline { + margin-top: 10px; +} +.content-block-inner { + width: 100%; + position: relative; +} +.content-block.inset { + border-radius: 7px; +} +.content-block.inset .content-block-inner:before { + display: none !important; +} +.content-block.inset .content-block-inner:after { + display: none !important; +} +@media all and (min-width: 768px) { + .content-block.tablet-inset .content-block-inner:before { + display: none !important; + } + .content-block.tablet-inset .content-block-inner:after { + display: none !important; + } +} +/* === Content Block === */ +html.ios .content-block { + margin: 35px 0; + padding: 0 15px; + color: #6d6d72; +} +html.ios .block-title { + text-transform: uppercase; + color: #6d6d72; + margin: 35px 15px 10px; +} +html.ios .block-title + .list-block, +html.ios .block-title + .content-block, +html.ios .block-title + .card, +html.ios .block-title + .timeline { + margin-top: 10px; +} +html.ios .content-block-inner { + color: #000; + background: #fff; + padding: 10px 15px; + margin-left: -15px; +} +html.ios .content-block-inner:before { + content: ''; + position: absolute; + background-color: #c8c7cc; + display: block; + z-index: 15; + top: 0; + right: auto; + bottom: auto; + left: 0; + height: 1px; + width: 100%; + transform-origin: 50% 0%; +} +html.ios.device-pixel-ratio-2 .content-block-inner:before { + transform: scaleY(0.5); +} +html.ios.device-pixel-ratio-3 .content-block-inner:before { + transform: scaleY(0.33); +} +html.ios .content-block-inner:after { + content: ''; + position: absolute; + background-color: #c8c7cc; + display: block; + z-index: 15; + top: auto; + right: auto; + bottom: 0; + left: 0; + height: 1px; + width: 100%; + transform-origin: 50% 100%; +} +html.ios.device-pixel-ratio-2 .content-block-inner:after { + transform: scaleY(0.5); +} +html.ios.device-pixel-ratio-3 .content-block-inner:after { + transform: scaleY(0.33); +} +html.ios .content-block.inset { + margin-left: 15px; + margin-right: 15px; +} +html.ios .content-block.inset .content-block-inner { + border-radius: 7px; +} +@media all and (min-width: 768px) { + html.ios .content-block.tablet-inset { + margin-left: 15px; + margin-right: 15px; + border-radius: 7px; + } + html.ios .content-block.tablet-inset .content-block-inner { + border-radius: 7px; + } +} +html.md .content-block { + margin: 32px 0; + padding: 0 16px; +} +html.md .block-title { + color: rgba(0, 0, 0, 0.54); + margin: 16px 16px 16px; + padding-top: 16px; + line-height: 16px; + font-weight: 500; +} +html.md .block-title + .list-block, +html.md .block-title + .content-block, +html.md .block-title + .card, +html.md .block-title + .timeline { + margin-top: 0px; +} +html.md .content-block-inner { + padding: 16px 16px; + margin-left: -16px; +} +html.md .content-block-inner > p:first-child { + margin-top: 0; +} +html.md .content-block-inner > p:last-child { + margin-bottom: 0; +} +html.md .content-block-inner:before { + content: ''; + position: absolute; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + top: 0; + right: auto; + bottom: auto; + left: 0; + height: 1px; + width: 100%; + transform-origin: 50% 0%; +} +html.md.device-pixel-ratio-2 .content-block-inner:before { + transform: scaleY(0.5); +} +html.md.device-pixel-ratio-3 .content-block-inner:before { + transform: scaleY(0.33); +} +html.md .content-block-inner:after { + content: ''; + position: absolute; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + top: auto; + right: auto; + bottom: 0; + left: 0; + height: 1px; + width: 100%; + transform-origin: 50% 100%; +} +html.md.device-pixel-ratio-2 .content-block-inner:after { + transform: scaleY(0.5); +} +html.md.device-pixel-ratio-3 .content-block-inner:after { + transform: scaleY(0.33); +} +html.md .content-block.inset { + margin-left: 16px; + margin-right: 16px; +} +html.md .content-block.inset .content-block-inner { + border-radius: 4px; +} +@media all and (min-width: 768px) { + html.md .content-block.tablet-inset { + margin-left: 16px; + margin-right: 16px; + border-radius: 4px; + } + html.md .content-block.tablet-inset .content-block-inner { + border-radius: 4px; + } +} +/* === Grid === */ +.row { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + align-items: flex-start; +} +.row > [class*="col-"] { + box-sizing: border-box; +} +.row .col-auto { + width: 100%; +} +/* === Grid === */ +html.ios .row .col-100 { + width: 100%; + width: -webkit-calc((100% - 15px*0) / 1); + width: calc((100% - 15px*0) / 1); +} +html.ios .row.no-gutter .col-100 { + width: 100%; +} +html.ios .row .col-95 { + width: 95%; + width: -webkit-calc((100% - 15px*0.05263157894736836) / 1.0526315789473684); + width: calc((100% - 15px*0.05263157894736836) / 1.0526315789473684); +} +html.ios .row.no-gutter .col-95 { + width: 95%; +} +html.ios .row .col-90 { + width: 90%; + width: -webkit-calc((100% - 15px*0.11111111111111116) / 1.1111111111111112); + width: calc((100% - 15px*0.11111111111111116) / 1.1111111111111112); +} +html.ios .row.no-gutter .col-90 { + width: 90%; +} +html.ios .row .col-85 { + width: 85%; + width: -webkit-calc((100% - 15px*0.17647058823529416) / 1.1764705882352942); + width: calc((100% - 15px*0.17647058823529416) / 1.1764705882352942); +} +html.ios .row.no-gutter .col-85 { + width: 85%; +} +html.ios .row .col-80 { + width: 80%; + width: -webkit-calc((100% - 15px*0.25) / 1.25); + width: calc((100% - 15px*0.25) / 1.25); +} +html.ios .row.no-gutter .col-80 { + width: 80%; +} +html.ios .row .col-75 { + width: 75%; + width: -webkit-calc((100% - 15px*0.33333333333333326) / 1.3333333333333333); + width: calc((100% - 15px*0.33333333333333326) / 1.3333333333333333); +} +html.ios .row.no-gutter .col-75 { + width: 75%; +} +html.ios .row .col-70 { + width: 70%; + width: -webkit-calc((100% - 15px*0.4285714285714286) / 1.4285714285714286); + width: calc((100% - 15px*0.4285714285714286) / 1.4285714285714286); +} +html.ios .row.no-gutter .col-70 { + width: 70%; +} +html.ios .row .col-66 { + width: 66.66666666666666%; + width: -webkit-calc((100% - 15px*0.5000000000000002) / 1.5000000000000002); + width: calc((100% - 15px*0.5000000000000002) / 1.5000000000000002); +} +html.ios .row.no-gutter .col-66 { + width: 66.66666666666666%; +} +html.ios .row .col-65 { + width: 65%; + width: -webkit-calc((100% - 15px*0.5384615384615385) / 1.5384615384615385); + width: calc((100% - 15px*0.5384615384615385) / 1.5384615384615385); +} +html.ios .row.no-gutter .col-65 { + width: 65%; +} +html.ios .row .col-60 { + width: 60%; + width: -webkit-calc((100% - 15px*0.6666666666666667) / 1.6666666666666667); + width: calc((100% - 15px*0.6666666666666667) / 1.6666666666666667); +} +html.ios .row.no-gutter .col-60 { + width: 60%; +} +html.ios .row .col-55 { + width: 55%; + width: -webkit-calc((100% - 15px*0.8181818181818181) / 1.8181818181818181); + width: calc((100% - 15px*0.8181818181818181) / 1.8181818181818181); +} +html.ios .row.no-gutter .col-55 { + width: 55%; +} +html.ios .row .col-50 { + width: 50%; + width: -webkit-calc((100% - 15px*1) / 2); + width: calc((100% - 15px*1) / 2); +} +html.ios .row.no-gutter .col-50 { + width: 50%; +} +html.ios .row .col-45 { + width: 45%; + width: -webkit-calc((100% - 15px*1.2222222222222223) / 2.2222222222222223); + width: calc((100% - 15px*1.2222222222222223) / 2.2222222222222223); +} +html.ios .row.no-gutter .col-45 { + width: 45%; +} +html.ios .row .col-40 { + width: 40%; + width: -webkit-calc((100% - 15px*1.5) / 2.5); + width: calc((100% - 15px*1.5) / 2.5); +} +html.ios .row.no-gutter .col-40 { + width: 40%; +} +html.ios .row .col-35 { + width: 35%; + width: -webkit-calc((100% - 15px*1.8571428571428572) / 2.857142857142857); + width: calc((100% - 15px*1.8571428571428572) / 2.857142857142857); +} +html.ios .row.no-gutter .col-35 { + width: 35%; +} +html.ios .row .col-33 { + width: 33.333333333333336%; + width: -webkit-calc((100% - 15px*2) / 3); + width: calc((100% - 15px*2) / 3); +} +html.ios .row.no-gutter .col-33 { + width: 33.333333333333336%; +} +html.ios .row .col-30 { + width: 30%; + width: -webkit-calc((100% - 15px*2.3333333333333335) / 3.3333333333333335); + width: calc((100% - 15px*2.3333333333333335) / 3.3333333333333335); +} +html.ios .row.no-gutter .col-30 { + width: 30%; +} +html.ios .row .col-25 { + width: 25%; + width: -webkit-calc((100% - 15px*3) / 4); + width: calc((100% - 15px*3) / 4); +} +html.ios .row.no-gutter .col-25 { + width: 25%; +} +html.ios .row .col-20 { + width: 20%; + width: -webkit-calc((100% - 15px*4) / 5); + width: calc((100% - 15px*4) / 5); +} +html.ios .row.no-gutter .col-20 { + width: 20%; +} +html.ios .row .col-15 { + width: 15%; + width: -webkit-calc((100% - 15px*5.666666666666667) / 6.666666666666667); + width: calc((100% - 15px*5.666666666666667) / 6.666666666666667); +} +html.ios .row.no-gutter .col-15 { + width: 15%; +} +html.ios .row .col-10 { + width: 10%; + width: -webkit-calc((100% - 15px*9) / 10); + width: calc((100% - 15px*9) / 10); +} +html.ios .row.no-gutter .col-10 { + width: 10%; +} +html.ios .row .col-5 { + width: 5%; + width: -webkit-calc((100% - 15px*19) / 20); + width: calc((100% - 15px*19) / 20); +} +html.ios .row.no-gutter .col-5 { + width: 5%; +} +html.ios .row .col-auto:nth-last-child(1), +html.ios .row .col-auto:nth-last-child(1) ~ .col-auto { + width: 100%; + width: -webkit-calc((100% - 15px*0) / 1); + width: calc((100% - 15px*0) / 1); +} +html.ios .row.no-gutter .col-auto:nth-last-child(1), +html.ios .row.no-gutter .col-auto:nth-last-child(1) ~ .col-auto { + width: 100%; +} +html.ios .row .col-auto:nth-last-child(2), +html.ios .row .col-auto:nth-last-child(2) ~ .col-auto { + width: 50%; + width: -webkit-calc((100% - 15px*1) / 2); + width: calc((100% - 15px*1) / 2); +} +html.ios .row.no-gutter .col-auto:nth-last-child(2), +html.ios .row.no-gutter .col-auto:nth-last-child(2) ~ .col-auto { + width: 50%; +} +html.ios .row .col-auto:nth-last-child(3), +html.ios .row .col-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; + width: -webkit-calc((100% - 15px*2) / 3); + width: calc((100% - 15px*2) / 3); +} +html.ios .row.no-gutter .col-auto:nth-last-child(3), +html.ios .row.no-gutter .col-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; +} +html.ios .row .col-auto:nth-last-child(4), +html.ios .row .col-auto:nth-last-child(4) ~ .col-auto { + width: 25%; + width: -webkit-calc((100% - 15px*3) / 4); + width: calc((100% - 15px*3) / 4); +} +html.ios .row.no-gutter .col-auto:nth-last-child(4), +html.ios .row.no-gutter .col-auto:nth-last-child(4) ~ .col-auto { + width: 25%; +} +html.ios .row .col-auto:nth-last-child(5), +html.ios .row .col-auto:nth-last-child(5) ~ .col-auto { + width: 20%; + width: -webkit-calc((100% - 15px*4) / 5); + width: calc((100% - 15px*4) / 5); +} +html.ios .row.no-gutter .col-auto:nth-last-child(5), +html.ios .row.no-gutter .col-auto:nth-last-child(5) ~ .col-auto { + width: 20%; +} +html.ios .row .col-auto:nth-last-child(6), +html.ios .row .col-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; + width: -webkit-calc((100% - 15px*5) / 6); + width: calc((100% - 15px*5) / 6); +} +html.ios .row.no-gutter .col-auto:nth-last-child(6), +html.ios .row.no-gutter .col-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; +} +html.ios .row .col-auto:nth-last-child(7), +html.ios .row .col-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; + width: -webkit-calc((100% - 15px*6) / 7); + width: calc((100% - 15px*6) / 7); +} +html.ios .row.no-gutter .col-auto:nth-last-child(7), +html.ios .row.no-gutter .col-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; +} +html.ios .row .col-auto:nth-last-child(8), +html.ios .row .col-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; + width: -webkit-calc((100% - 15px*7) / 8); + width: calc((100% - 15px*7) / 8); +} +html.ios .row.no-gutter .col-auto:nth-last-child(8), +html.ios .row.no-gutter .col-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; +} +html.ios .row .col-auto:nth-last-child(9), +html.ios .row .col-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; + width: -webkit-calc((100% - 15px*8) / 9); + width: calc((100% - 15px*8) / 9); +} +html.ios .row.no-gutter .col-auto:nth-last-child(9), +html.ios .row.no-gutter .col-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; +} +html.ios .row .col-auto:nth-last-child(10), +html.ios .row .col-auto:nth-last-child(10) ~ .col-auto { + width: 10%; + width: -webkit-calc((100% - 15px*9) / 10); + width: calc((100% - 15px*9) / 10); +} +html.ios .row.no-gutter .col-auto:nth-last-child(10), +html.ios .row.no-gutter .col-auto:nth-last-child(10) ~ .col-auto { + width: 10%; +} +html.ios .row .col-auto:nth-last-child(11), +html.ios .row .col-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; + width: -webkit-calc((100% - 15px*10) / 11); + width: calc((100% - 15px*10) / 11); +} +html.ios .row.no-gutter .col-auto:nth-last-child(11), +html.ios .row.no-gutter .col-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; +} +html.ios .row .col-auto:nth-last-child(12), +html.ios .row .col-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; + width: -webkit-calc((100% - 15px*11) / 12); + width: calc((100% - 15px*11) / 12); +} +html.ios .row.no-gutter .col-auto:nth-last-child(12), +html.ios .row.no-gutter .col-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; +} +html.ios .row .col-auto:nth-last-child(13), +html.ios .row .col-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; + width: -webkit-calc((100% - 15px*12) / 13); + width: calc((100% - 15px*12) / 13); +} +html.ios .row.no-gutter .col-auto:nth-last-child(13), +html.ios .row.no-gutter .col-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; +} +html.ios .row .col-auto:nth-last-child(14), +html.ios .row .col-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; + width: -webkit-calc((100% - 15px*13) / 14); + width: calc((100% - 15px*13) / 14); +} +html.ios .row.no-gutter .col-auto:nth-last-child(14), +html.ios .row.no-gutter .col-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; +} +html.ios .row .col-auto:nth-last-child(15), +html.ios .row .col-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; + width: -webkit-calc((100% - 15px*14) / 15); + width: calc((100% - 15px*14) / 15); +} +html.ios .row.no-gutter .col-auto:nth-last-child(15), +html.ios .row.no-gutter .col-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; +} +html.ios .row .col-auto:nth-last-child(16), +html.ios .row .col-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; + width: -webkit-calc((100% - 15px*15) / 16); + width: calc((100% - 15px*15) / 16); +} +html.ios .row.no-gutter .col-auto:nth-last-child(16), +html.ios .row.no-gutter .col-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; +} +html.ios .row .col-auto:nth-last-child(17), +html.ios .row .col-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; + width: -webkit-calc((100% - 15px*16) / 17); + width: calc((100% - 15px*16) / 17); +} +html.ios .row.no-gutter .col-auto:nth-last-child(17), +html.ios .row.no-gutter .col-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; +} +html.ios .row .col-auto:nth-last-child(18), +html.ios .row .col-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; + width: -webkit-calc((100% - 15px*17) / 18); + width: calc((100% - 15px*17) / 18); +} +html.ios .row.no-gutter .col-auto:nth-last-child(18), +html.ios .row.no-gutter .col-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; +} +html.ios .row .col-auto:nth-last-child(19), +html.ios .row .col-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; + width: -webkit-calc((100% - 15px*18) / 19); + width: calc((100% - 15px*18) / 19); +} +html.ios .row.no-gutter .col-auto:nth-last-child(19), +html.ios .row.no-gutter .col-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; +} +html.ios .row .col-auto:nth-last-child(20), +html.ios .row .col-auto:nth-last-child(20) ~ .col-auto { + width: 5%; + width: -webkit-calc((100% - 15px*19) / 20); + width: calc((100% - 15px*19) / 20); +} +html.ios .row.no-gutter .col-auto:nth-last-child(20), +html.ios .row.no-gutter .col-auto:nth-last-child(20) ~ .col-auto { + width: 5%; +} +html.ios .row .col-auto:nth-last-child(21), +html.ios .row .col-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; + width: -webkit-calc((100% - 15px*20) / 21); + width: calc((100% - 15px*20) / 21); +} +html.ios .row.no-gutter .col-auto:nth-last-child(21), +html.ios .row.no-gutter .col-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; +} +@media all and (min-width: 768px) { + html.ios .row .tablet-100 { + width: 100%; + width: -webkit-calc((100% - 15px*0) / 1); + width: calc((100% - 15px*0) / 1); + } + html.ios .row.no-gutter .tablet-100 { + width: 100%; + } + html.ios .row .tablet-95 { + width: 95%; + width: -webkit-calc((100% - 15px*0.05263157894736836) / 1.0526315789473684); + width: calc((100% - 15px*0.05263157894736836) / 1.0526315789473684); + } + html.ios .row.no-gutter .tablet-95 { + width: 95%; + } + html.ios .row .tablet-90 { + width: 90%; + width: -webkit-calc((100% - 15px*0.11111111111111116) / 1.1111111111111112); + width: calc((100% - 15px*0.11111111111111116) / 1.1111111111111112); + } + html.ios .row.no-gutter .tablet-90 { + width: 90%; + } + html.ios .row .tablet-85 { + width: 85%; + width: -webkit-calc((100% - 15px*0.17647058823529416) / 1.1764705882352942); + width: calc((100% - 15px*0.17647058823529416) / 1.1764705882352942); + } + html.ios .row.no-gutter .tablet-85 { + width: 85%; + } + html.ios .row .tablet-80 { + width: 80%; + width: -webkit-calc((100% - 15px*0.25) / 1.25); + width: calc((100% - 15px*0.25) / 1.25); + } + html.ios .row.no-gutter .tablet-80 { + width: 80%; + } + html.ios .row .tablet-75 { + width: 75%; + width: -webkit-calc((100% - 15px*0.33333333333333326) / 1.3333333333333333); + width: calc((100% - 15px*0.33333333333333326) / 1.3333333333333333); + } + html.ios .row.no-gutter .tablet-75 { + width: 75%; + } + html.ios .row .tablet-70 { + width: 70%; + width: -webkit-calc((100% - 15px*0.4285714285714286) / 1.4285714285714286); + width: calc((100% - 15px*0.4285714285714286) / 1.4285714285714286); + } + html.ios .row.no-gutter .tablet-70 { + width: 70%; + } + html.ios .row .tablet-66 { + width: 66.66666666666666%; + width: -webkit-calc((100% - 15px*0.5000000000000002) / 1.5000000000000002); + width: calc((100% - 15px*0.5000000000000002) / 1.5000000000000002); + } + html.ios .row.no-gutter .tablet-66 { + width: 66.66666666666666%; + } + html.ios .row .tablet-65 { + width: 65%; + width: -webkit-calc((100% - 15px*0.5384615384615385) / 1.5384615384615385); + width: calc((100% - 15px*0.5384615384615385) / 1.5384615384615385); + } + html.ios .row.no-gutter .tablet-65 { + width: 65%; + } + html.ios .row .tablet-60 { + width: 60%; + width: -webkit-calc((100% - 15px*0.6666666666666667) / 1.6666666666666667); + width: calc((100% - 15px*0.6666666666666667) / 1.6666666666666667); + } + html.ios .row.no-gutter .tablet-60 { + width: 60%; + } + html.ios .row .tablet-55 { + width: 55%; + width: -webkit-calc((100% - 15px*0.8181818181818181) / 1.8181818181818181); + width: calc((100% - 15px*0.8181818181818181) / 1.8181818181818181); + } + html.ios .row.no-gutter .tablet-55 { + width: 55%; + } + html.ios .row .tablet-50 { + width: 50%; + width: -webkit-calc((100% - 15px*1) / 2); + width: calc((100% - 15px*1) / 2); + } + html.ios .row.no-gutter .tablet-50 { + width: 50%; + } + html.ios .row .tablet-45 { + width: 45%; + width: -webkit-calc((100% - 15px*1.2222222222222223) / 2.2222222222222223); + width: calc((100% - 15px*1.2222222222222223) / 2.2222222222222223); + } + html.ios .row.no-gutter .tablet-45 { + width: 45%; + } + html.ios .row .tablet-40 { + width: 40%; + width: -webkit-calc((100% - 15px*1.5) / 2.5); + width: calc((100% - 15px*1.5) / 2.5); + } + html.ios .row.no-gutter .tablet-40 { + width: 40%; + } + html.ios .row .tablet-35 { + width: 35%; + width: -webkit-calc((100% - 15px*1.8571428571428572) / 2.857142857142857); + width: calc((100% - 15px*1.8571428571428572) / 2.857142857142857); + } + html.ios .row.no-gutter .tablet-35 { + width: 35%; + } + html.ios .row .tablet-33 { + width: 33.333333333333336%; + width: -webkit-calc((100% - 15px*2) / 3); + width: calc((100% - 15px*2) / 3); + } + html.ios .row.no-gutter .tablet-33 { + width: 33.333333333333336%; + } + html.ios .row .tablet-30 { + width: 30%; + width: -webkit-calc((100% - 15px*2.3333333333333335) / 3.3333333333333335); + width: calc((100% - 15px*2.3333333333333335) / 3.3333333333333335); + } + html.ios .row.no-gutter .tablet-30 { + width: 30%; + } + html.ios .row .tablet-25 { + width: 25%; + width: -webkit-calc((100% - 15px*3) / 4); + width: calc((100% - 15px*3) / 4); + } + html.ios .row.no-gutter .tablet-25 { + width: 25%; + } + html.ios .row .tablet-20 { + width: 20%; + width: -webkit-calc((100% - 15px*4) / 5); + width: calc((100% - 15px*4) / 5); + } + html.ios .row.no-gutter .tablet-20 { + width: 20%; + } + html.ios .row .tablet-15 { + width: 15%; + width: -webkit-calc((100% - 15px*5.666666666666667) / 6.666666666666667); + width: calc((100% - 15px*5.666666666666667) / 6.666666666666667); + } + html.ios .row.no-gutter .tablet-15 { + width: 15%; + } + html.ios .row .tablet-10 { + width: 10%; + width: -webkit-calc((100% - 15px*9) / 10); + width: calc((100% - 15px*9) / 10); + } + html.ios .row.no-gutter .tablet-10 { + width: 10%; + } + html.ios .row .tablet-5 { + width: 5%; + width: -webkit-calc((100% - 15px*19) / 20); + width: calc((100% - 15px*19) / 20); + } + html.ios .row.no-gutter .tablet-5 { + width: 5%; + } + html.ios .row .tablet-auto:nth-last-child(1), + html.ios .row .tablet-auto:nth-last-child(1) ~ .col-auto { + width: 100%; + width: -webkit-calc((100% - 15px*0) / 1); + width: calc((100% - 15px*0) / 1); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(1), + html.ios .row.no-gutter .tablet-auto:nth-last-child(1) ~ .tablet-auto { + width: 100%; + } + html.ios .row .tablet-auto:nth-last-child(2), + html.ios .row .tablet-auto:nth-last-child(2) ~ .col-auto { + width: 50%; + width: -webkit-calc((100% - 15px*1) / 2); + width: calc((100% - 15px*1) / 2); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(2), + html.ios .row.no-gutter .tablet-auto:nth-last-child(2) ~ .tablet-auto { + width: 50%; + } + html.ios .row .tablet-auto:nth-last-child(3), + html.ios .row .tablet-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; + width: -webkit-calc((100% - 15px*2) / 3); + width: calc((100% - 15px*2) / 3); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(3), + html.ios .row.no-gutter .tablet-auto:nth-last-child(3) ~ .tablet-auto { + width: 33.33333333%; + } + html.ios .row .tablet-auto:nth-last-child(4), + html.ios .row .tablet-auto:nth-last-child(4) ~ .col-auto { + width: 25%; + width: -webkit-calc((100% - 15px*3) / 4); + width: calc((100% - 15px*3) / 4); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(4), + html.ios .row.no-gutter .tablet-auto:nth-last-child(4) ~ .tablet-auto { + width: 25%; + } + html.ios .row .tablet-auto:nth-last-child(5), + html.ios .row .tablet-auto:nth-last-child(5) ~ .col-auto { + width: 20%; + width: -webkit-calc((100% - 15px*4) / 5); + width: calc((100% - 15px*4) / 5); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(5), + html.ios .row.no-gutter .tablet-auto:nth-last-child(5) ~ .tablet-auto { + width: 20%; + } + html.ios .row .tablet-auto:nth-last-child(6), + html.ios .row .tablet-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; + width: -webkit-calc((100% - 15px*5) / 6); + width: calc((100% - 15px*5) / 6); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(6), + html.ios .row.no-gutter .tablet-auto:nth-last-child(6) ~ .tablet-auto { + width: 16.66666667%; + } + html.ios .row .tablet-auto:nth-last-child(7), + html.ios .row .tablet-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; + width: -webkit-calc((100% - 15px*6) / 7); + width: calc((100% - 15px*6) / 7); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(7), + html.ios .row.no-gutter .tablet-auto:nth-last-child(7) ~ .tablet-auto { + width: 14.28571429%; + } + html.ios .row .tablet-auto:nth-last-child(8), + html.ios .row .tablet-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; + width: -webkit-calc((100% - 15px*7) / 8); + width: calc((100% - 15px*7) / 8); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(8), + html.ios .row.no-gutter .tablet-auto:nth-last-child(8) ~ .tablet-auto { + width: 12.5%; + } + html.ios .row .tablet-auto:nth-last-child(9), + html.ios .row .tablet-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; + width: -webkit-calc((100% - 15px*8) / 9); + width: calc((100% - 15px*8) / 9); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(9), + html.ios .row.no-gutter .tablet-auto:nth-last-child(9) ~ .tablet-auto { + width: 11.11111111%; + } + html.ios .row .tablet-auto:nth-last-child(10), + html.ios .row .tablet-auto:nth-last-child(10) ~ .col-auto { + width: 10%; + width: -webkit-calc((100% - 15px*9) / 10); + width: calc((100% - 15px*9) / 10); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(10), + html.ios .row.no-gutter .tablet-auto:nth-last-child(10) ~ .tablet-auto { + width: 10%; + } + html.ios .row .tablet-auto:nth-last-child(11), + html.ios .row .tablet-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; + width: -webkit-calc((100% - 15px*10) / 11); + width: calc((100% - 15px*10) / 11); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(11), + html.ios .row.no-gutter .tablet-auto:nth-last-child(11) ~ .tablet-auto { + width: 9.09090909%; + } + html.ios .row .tablet-auto:nth-last-child(12), + html.ios .row .tablet-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; + width: -webkit-calc((100% - 15px*11) / 12); + width: calc((100% - 15px*11) / 12); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(12), + html.ios .row.no-gutter .tablet-auto:nth-last-child(12) ~ .tablet-auto { + width: 8.33333333%; + } + html.ios .row .tablet-auto:nth-last-child(13), + html.ios .row .tablet-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; + width: -webkit-calc((100% - 15px*12) / 13); + width: calc((100% - 15px*12) / 13); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(13), + html.ios .row.no-gutter .tablet-auto:nth-last-child(13) ~ .tablet-auto { + width: 7.69230769%; + } + html.ios .row .tablet-auto:nth-last-child(14), + html.ios .row .tablet-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; + width: -webkit-calc((100% - 15px*13) / 14); + width: calc((100% - 15px*13) / 14); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(14), + html.ios .row.no-gutter .tablet-auto:nth-last-child(14) ~ .tablet-auto { + width: 7.14285714%; + } + html.ios .row .tablet-auto:nth-last-child(15), + html.ios .row .tablet-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; + width: -webkit-calc((100% - 15px*14) / 15); + width: calc((100% - 15px*14) / 15); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(15), + html.ios .row.no-gutter .tablet-auto:nth-last-child(15) ~ .tablet-auto { + width: 6.66666667%; + } + html.ios .row .tablet-auto:nth-last-child(16), + html.ios .row .tablet-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; + width: -webkit-calc((100% - 15px*15) / 16); + width: calc((100% - 15px*15) / 16); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(16), + html.ios .row.no-gutter .tablet-auto:nth-last-child(16) ~ .tablet-auto { + width: 6.25%; + } + html.ios .row .tablet-auto:nth-last-child(17), + html.ios .row .tablet-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; + width: -webkit-calc((100% - 15px*16) / 17); + width: calc((100% - 15px*16) / 17); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(17), + html.ios .row.no-gutter .tablet-auto:nth-last-child(17) ~ .tablet-auto { + width: 5.88235294%; + } + html.ios .row .tablet-auto:nth-last-child(18), + html.ios .row .tablet-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; + width: -webkit-calc((100% - 15px*17) / 18); + width: calc((100% - 15px*17) / 18); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(18), + html.ios .row.no-gutter .tablet-auto:nth-last-child(18) ~ .tablet-auto { + width: 5.55555556%; + } + html.ios .row .tablet-auto:nth-last-child(19), + html.ios .row .tablet-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; + width: -webkit-calc((100% - 15px*18) / 19); + width: calc((100% - 15px*18) / 19); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(19), + html.ios .row.no-gutter .tablet-auto:nth-last-child(19) ~ .tablet-auto { + width: 5.26315789%; + } + html.ios .row .tablet-auto:nth-last-child(20), + html.ios .row .tablet-auto:nth-last-child(20) ~ .col-auto { + width: 5%; + width: -webkit-calc((100% - 15px*19) / 20); + width: calc((100% - 15px*19) / 20); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(20), + html.ios .row.no-gutter .tablet-auto:nth-last-child(20) ~ .tablet-auto { + width: 5%; + } + html.ios .row .tablet-auto:nth-last-child(21), + html.ios .row .tablet-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; + width: -webkit-calc((100% - 15px*20) / 21); + width: calc((100% - 15px*20) / 21); + } + html.ios .row.no-gutter .tablet-auto:nth-last-child(21), + html.ios .row.no-gutter .tablet-auto:nth-last-child(21) ~ .tablet-auto { + width: 4.76190476%; + } +} +/* === Grid === */ +html.md .row .col-100 { + width: 100%; + width: -webkit-calc((100% - 16px*0) / 1); + width: calc((100% - 16px*0) / 1); +} +html.md .row.no-gutter .col-100 { + width: 100%; +} +html.md .row .col-95 { + width: 95%; + width: -webkit-calc((100% - 16px*0.05263157894736836) / 1.0526315789473684); + width: calc((100% - 16px*0.05263157894736836) / 1.0526315789473684); +} +html.md .row.no-gutter .col-95 { + width: 95%; +} +html.md .row .col-90 { + width: 90%; + width: -webkit-calc((100% - 16px*0.11111111111111116) / 1.1111111111111112); + width: calc((100% - 16px*0.11111111111111116) / 1.1111111111111112); +} +html.md .row.no-gutter .col-90 { + width: 90%; +} +html.md .row .col-85 { + width: 85%; + width: -webkit-calc((100% - 16px*0.17647058823529416) / 1.1764705882352942); + width: calc((100% - 16px*0.17647058823529416) / 1.1764705882352942); +} +html.md .row.no-gutter .col-85 { + width: 85%; +} +html.md .row .col-80 { + width: 80%; + width: -webkit-calc((100% - 16px*0.25) / 1.25); + width: calc((100% - 16px*0.25) / 1.25); +} +html.md .row.no-gutter .col-80 { + width: 80%; +} +html.md .row .col-75 { + width: 75%; + width: -webkit-calc((100% - 16px*0.33333333333333326) / 1.3333333333333333); + width: calc((100% - 16px*0.33333333333333326) / 1.3333333333333333); +} +html.md .row.no-gutter .col-75 { + width: 75%; +} +html.md .row .col-70 { + width: 70%; + width: -webkit-calc((100% - 16px*0.4285714285714286) / 1.4285714285714286); + width: calc((100% - 16px*0.4285714285714286) / 1.4285714285714286); +} +html.md .row.no-gutter .col-70 { + width: 70%; +} +html.md .row .col-66 { + width: 66.66666666666666%; + width: -webkit-calc((100% - 16px*0.5000000000000002) / 1.5000000000000002); + width: calc((100% - 16px*0.5000000000000002) / 1.5000000000000002); +} +html.md .row.no-gutter .col-66 { + width: 66.66666666666666%; +} +html.md .row .col-65 { + width: 65%; + width: -webkit-calc((100% - 16px*0.5384615384615385) / 1.5384615384615385); + width: calc((100% - 16px*0.5384615384615385) / 1.5384615384615385); +} +html.md .row.no-gutter .col-65 { + width: 65%; +} +html.md .row .col-60 { + width: 60%; + width: -webkit-calc((100% - 16px*0.6666666666666667) / 1.6666666666666667); + width: calc((100% - 16px*0.6666666666666667) / 1.6666666666666667); +} +html.md .row.no-gutter .col-60 { + width: 60%; +} +html.md .row .col-55 { + width: 55%; + width: -webkit-calc((100% - 16px*0.8181818181818181) / 1.8181818181818181); + width: calc((100% - 16px*0.8181818181818181) / 1.8181818181818181); +} +html.md .row.no-gutter .col-55 { + width: 55%; +} +html.md .row .col-50 { + width: 50%; + width: -webkit-calc((100% - 16px*1) / 2); + width: calc((100% - 16px*1) / 2); +} +html.md .row.no-gutter .col-50 { + width: 50%; +} +html.md .row .col-45 { + width: 45%; + width: -webkit-calc((100% - 16px*1.2222222222222223) / 2.2222222222222223); + width: calc((100% - 16px*1.2222222222222223) / 2.2222222222222223); +} +html.md .row.no-gutter .col-45 { + width: 45%; +} +html.md .row .col-40 { + width: 40%; + width: -webkit-calc((100% - 16px*1.5) / 2.5); + width: calc((100% - 16px*1.5) / 2.5); +} +html.md .row.no-gutter .col-40 { + width: 40%; +} +html.md .row .col-35 { + width: 35%; + width: -webkit-calc((100% - 16px*1.8571428571428572) / 2.857142857142857); + width: calc((100% - 16px*1.8571428571428572) / 2.857142857142857); +} +html.md .row.no-gutter .col-35 { + width: 35%; +} +html.md .row .col-33 { + width: 33.333333333333336%; + width: -webkit-calc((100% - 16px*2) / 3); + width: calc((100% - 16px*2) / 3); +} +html.md .row.no-gutter .col-33 { + width: 33.333333333333336%; +} +html.md .row .col-30 { + width: 30%; + width: -webkit-calc((100% - 16px*2.3333333333333335) / 3.3333333333333335); + width: calc((100% - 16px*2.3333333333333335) / 3.3333333333333335); +} +html.md .row.no-gutter .col-30 { + width: 30%; +} +html.md .row .col-25 { + width: 25%; + width: -webkit-calc((100% - 16px*3) / 4); + width: calc((100% - 16px*3) / 4); +} +html.md .row.no-gutter .col-25 { + width: 25%; +} +html.md .row .col-20 { + width: 20%; + width: -webkit-calc((100% - 16px*4) / 5); + width: calc((100% - 16px*4) / 5); +} +html.md .row.no-gutter .col-20 { + width: 20%; +} +html.md .row .col-15 { + width: 15%; + width: -webkit-calc((100% - 16px*5.666666666666667) / 6.666666666666667); + width: calc((100% - 16px*5.666666666666667) / 6.666666666666667); +} +html.md .row.no-gutter .col-15 { + width: 15%; +} +html.md .row .col-10 { + width: 10%; + width: -webkit-calc((100% - 16px*9) / 10); + width: calc((100% - 16px*9) / 10); +} +html.md .row.no-gutter .col-10 { + width: 10%; +} +html.md .row .col-5 { + width: 5%; + width: -webkit-calc((100% - 16px*19) / 20); + width: calc((100% - 16px*19) / 20); +} +html.md .row.no-gutter .col-5 { + width: 5%; +} +html.md .row .col-auto:nth-last-child(1), +html.md .row .col-auto:nth-last-child(1) ~ .col-auto { + width: 100%; + width: -webkit-calc((100% - 16px*0) / 1); + width: calc((100% - 16px*0) / 1); +} +html.md .row.no-gutter .col-auto:nth-last-child(1), +html.md .row.no-gutter .col-auto:nth-last-child(1) ~ .col-auto { + width: 100%; +} +html.md .row .col-auto:nth-last-child(2), +html.md .row .col-auto:nth-last-child(2) ~ .col-auto { + width: 50%; + width: -webkit-calc((100% - 16px*1) / 2); + width: calc((100% - 16px*1) / 2); +} +html.md .row.no-gutter .col-auto:nth-last-child(2), +html.md .row.no-gutter .col-auto:nth-last-child(2) ~ .col-auto { + width: 50%; +} +html.md .row .col-auto:nth-last-child(3), +html.md .row .col-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; + width: -webkit-calc((100% - 16px*2) / 3); + width: calc((100% - 16px*2) / 3); +} +html.md .row.no-gutter .col-auto:nth-last-child(3), +html.md .row.no-gutter .col-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; +} +html.md .row .col-auto:nth-last-child(4), +html.md .row .col-auto:nth-last-child(4) ~ .col-auto { + width: 25%; + width: -webkit-calc((100% - 16px*3) / 4); + width: calc((100% - 16px*3) / 4); +} +html.md .row.no-gutter .col-auto:nth-last-child(4), +html.md .row.no-gutter .col-auto:nth-last-child(4) ~ .col-auto { + width: 25%; +} +html.md .row .col-auto:nth-last-child(5), +html.md .row .col-auto:nth-last-child(5) ~ .col-auto { + width: 20%; + width: -webkit-calc((100% - 16px*4) / 5); + width: calc((100% - 16px*4) / 5); +} +html.md .row.no-gutter .col-auto:nth-last-child(5), +html.md .row.no-gutter .col-auto:nth-last-child(5) ~ .col-auto { + width: 20%; +} +html.md .row .col-auto:nth-last-child(6), +html.md .row .col-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; + width: -webkit-calc((100% - 16px*5) / 6); + width: calc((100% - 16px*5) / 6); +} +html.md .row.no-gutter .col-auto:nth-last-child(6), +html.md .row.no-gutter .col-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; +} +html.md .row .col-auto:nth-last-child(7), +html.md .row .col-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; + width: -webkit-calc((100% - 16px*6) / 7); + width: calc((100% - 16px*6) / 7); +} +html.md .row.no-gutter .col-auto:nth-last-child(7), +html.md .row.no-gutter .col-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; +} +html.md .row .col-auto:nth-last-child(8), +html.md .row .col-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; + width: -webkit-calc((100% - 16px*7) / 8); + width: calc((100% - 16px*7) / 8); +} +html.md .row.no-gutter .col-auto:nth-last-child(8), +html.md .row.no-gutter .col-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; +} +html.md .row .col-auto:nth-last-child(9), +html.md .row .col-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; + width: -webkit-calc((100% - 16px*8) / 9); + width: calc((100% - 16px*8) / 9); +} +html.md .row.no-gutter .col-auto:nth-last-child(9), +html.md .row.no-gutter .col-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; +} +html.md .row .col-auto:nth-last-child(10), +html.md .row .col-auto:nth-last-child(10) ~ .col-auto { + width: 10%; + width: -webkit-calc((100% - 16px*9) / 10); + width: calc((100% - 16px*9) / 10); +} +html.md .row.no-gutter .col-auto:nth-last-child(10), +html.md .row.no-gutter .col-auto:nth-last-child(10) ~ .col-auto { + width: 10%; +} +html.md .row .col-auto:nth-last-child(11), +html.md .row .col-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; + width: -webkit-calc((100% - 16px*10) / 11); + width: calc((100% - 16px*10) / 11); +} +html.md .row.no-gutter .col-auto:nth-last-child(11), +html.md .row.no-gutter .col-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; +} +html.md .row .col-auto:nth-last-child(12), +html.md .row .col-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; + width: -webkit-calc((100% - 16px*11) / 12); + width: calc((100% - 16px*11) / 12); +} +html.md .row.no-gutter .col-auto:nth-last-child(12), +html.md .row.no-gutter .col-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; +} +html.md .row .col-auto:nth-last-child(13), +html.md .row .col-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; + width: -webkit-calc((100% - 16px*12) / 13); + width: calc((100% - 16px*12) / 13); +} +html.md .row.no-gutter .col-auto:nth-last-child(13), +html.md .row.no-gutter .col-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; +} +html.md .row .col-auto:nth-last-child(14), +html.md .row .col-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; + width: -webkit-calc((100% - 16px*13) / 14); + width: calc((100% - 16px*13) / 14); +} +html.md .row.no-gutter .col-auto:nth-last-child(14), +html.md .row.no-gutter .col-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; +} +html.md .row .col-auto:nth-last-child(15), +html.md .row .col-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; + width: -webkit-calc((100% - 16px*14) / 15); + width: calc((100% - 16px*14) / 15); +} +html.md .row.no-gutter .col-auto:nth-last-child(15), +html.md .row.no-gutter .col-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; +} +html.md .row .col-auto:nth-last-child(16), +html.md .row .col-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; + width: -webkit-calc((100% - 16px*15) / 16); + width: calc((100% - 16px*15) / 16); +} +html.md .row.no-gutter .col-auto:nth-last-child(16), +html.md .row.no-gutter .col-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; +} +html.md .row .col-auto:nth-last-child(17), +html.md .row .col-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; + width: -webkit-calc((100% - 16px*16) / 17); + width: calc((100% - 16px*16) / 17); +} +html.md .row.no-gutter .col-auto:nth-last-child(17), +html.md .row.no-gutter .col-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; +} +html.md .row .col-auto:nth-last-child(18), +html.md .row .col-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; + width: -webkit-calc((100% - 16px*17) / 18); + width: calc((100% - 16px*17) / 18); +} +html.md .row.no-gutter .col-auto:nth-last-child(18), +html.md .row.no-gutter .col-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; +} +html.md .row .col-auto:nth-last-child(19), +html.md .row .col-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; + width: -webkit-calc((100% - 16px*18) / 19); + width: calc((100% - 16px*18) / 19); +} +html.md .row.no-gutter .col-auto:nth-last-child(19), +html.md .row.no-gutter .col-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; +} +html.md .row .col-auto:nth-last-child(20), +html.md .row .col-auto:nth-last-child(20) ~ .col-auto { + width: 5%; + width: -webkit-calc((100% - 16px*19) / 20); + width: calc((100% - 16px*19) / 20); +} +html.md .row.no-gutter .col-auto:nth-last-child(20), +html.md .row.no-gutter .col-auto:nth-last-child(20) ~ .col-auto { + width: 5%; +} +html.md .row .col-auto:nth-last-child(21), +html.md .row .col-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; + width: -webkit-calc((100% - 16px*20) / 21); + width: calc((100% - 16px*20) / 21); +} +html.md .row.no-gutter .col-auto:nth-last-child(21), +html.md .row.no-gutter .col-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; +} +@media all and (min-width: 768px) { + html.md .row .tablet-100 { + width: 100%; + width: -webkit-calc((100% - 16px*0) / 1); + width: calc((100% - 16px*0) / 1); + } + html.md .row.no-gutter .tablet-100 { + width: 100%; + } + html.md .row .tablet-95 { + width: 95%; + width: -webkit-calc((100% - 16px*0.05263157894736836) / 1.0526315789473684); + width: calc((100% - 16px*0.05263157894736836) / 1.0526315789473684); + } + html.md .row.no-gutter .tablet-95 { + width: 95%; + } + html.md .row .tablet-90 { + width: 90%; + width: -webkit-calc((100% - 16px*0.11111111111111116) / 1.1111111111111112); + width: calc((100% - 16px*0.11111111111111116) / 1.1111111111111112); + } + html.md .row.no-gutter .tablet-90 { + width: 90%; + } + html.md .row .tablet-85 { + width: 85%; + width: -webkit-calc((100% - 16px*0.17647058823529416) / 1.1764705882352942); + width: calc((100% - 16px*0.17647058823529416) / 1.1764705882352942); + } + html.md .row.no-gutter .tablet-85 { + width: 85%; + } + html.md .row .tablet-80 { + width: 80%; + width: -webkit-calc((100% - 16px*0.25) / 1.25); + width: calc((100% - 16px*0.25) / 1.25); + } + html.md .row.no-gutter .tablet-80 { + width: 80%; + } + html.md .row .tablet-75 { + width: 75%; + width: -webkit-calc((100% - 16px*0.33333333333333326) / 1.3333333333333333); + width: calc((100% - 16px*0.33333333333333326) / 1.3333333333333333); + } + html.md .row.no-gutter .tablet-75 { + width: 75%; + } + html.md .row .tablet-70 { + width: 70%; + width: -webkit-calc((100% - 16px*0.4285714285714286) / 1.4285714285714286); + width: calc((100% - 16px*0.4285714285714286) / 1.4285714285714286); + } + html.md .row.no-gutter .tablet-70 { + width: 70%; + } + html.md .row .tablet-66 { + width: 66.66666666666666%; + width: -webkit-calc((100% - 16px*0.5000000000000002) / 1.5000000000000002); + width: calc((100% - 16px*0.5000000000000002) / 1.5000000000000002); + } + html.md .row.no-gutter .tablet-66 { + width: 66.66666666666666%; + } + html.md .row .tablet-65 { + width: 65%; + width: -webkit-calc((100% - 16px*0.5384615384615385) / 1.5384615384615385); + width: calc((100% - 16px*0.5384615384615385) / 1.5384615384615385); + } + html.md .row.no-gutter .tablet-65 { + width: 65%; + } + html.md .row .tablet-60 { + width: 60%; + width: -webkit-calc((100% - 16px*0.6666666666666667) / 1.6666666666666667); + width: calc((100% - 16px*0.6666666666666667) / 1.6666666666666667); + } + html.md .row.no-gutter .tablet-60 { + width: 60%; + } + html.md .row .tablet-55 { + width: 55%; + width: -webkit-calc((100% - 16px*0.8181818181818181) / 1.8181818181818181); + width: calc((100% - 16px*0.8181818181818181) / 1.8181818181818181); + } + html.md .row.no-gutter .tablet-55 { + width: 55%; + } + html.md .row .tablet-50 { + width: 50%; + width: -webkit-calc((100% - 16px*1) / 2); + width: calc((100% - 16px*1) / 2); + } + html.md .row.no-gutter .tablet-50 { + width: 50%; + } + html.md .row .tablet-45 { + width: 45%; + width: -webkit-calc((100% - 16px*1.2222222222222223) / 2.2222222222222223); + width: calc((100% - 16px*1.2222222222222223) / 2.2222222222222223); + } + html.md .row.no-gutter .tablet-45 { + width: 45%; + } + html.md .row .tablet-40 { + width: 40%; + width: -webkit-calc((100% - 16px*1.5) / 2.5); + width: calc((100% - 16px*1.5) / 2.5); + } + html.md .row.no-gutter .tablet-40 { + width: 40%; + } + html.md .row .tablet-35 { + width: 35%; + width: -webkit-calc((100% - 16px*1.8571428571428572) / 2.857142857142857); + width: calc((100% - 16px*1.8571428571428572) / 2.857142857142857); + } + html.md .row.no-gutter .tablet-35 { + width: 35%; + } + html.md .row .tablet-33 { + width: 33.333333333333336%; + width: -webkit-calc((100% - 16px*2) / 3); + width: calc((100% - 16px*2) / 3); + } + html.md .row.no-gutter .tablet-33 { + width: 33.333333333333336%; + } + html.md .row .tablet-30 { + width: 30%; + width: -webkit-calc((100% - 16px*2.3333333333333335) / 3.3333333333333335); + width: calc((100% - 16px*2.3333333333333335) / 3.3333333333333335); + } + html.md .row.no-gutter .tablet-30 { + width: 30%; + } + html.md .row .tablet-25 { + width: 25%; + width: -webkit-calc((100% - 16px*3) / 4); + width: calc((100% - 16px*3) / 4); + } + html.md .row.no-gutter .tablet-25 { + width: 25%; + } + html.md .row .tablet-20 { + width: 20%; + width: -webkit-calc((100% - 16px*4) / 5); + width: calc((100% - 16px*4) / 5); + } + html.md .row.no-gutter .tablet-20 { + width: 20%; + } + html.md .row .tablet-15 { + width: 15%; + width: -webkit-calc((100% - 16px*5.666666666666667) / 6.666666666666667); + width: calc((100% - 16px*5.666666666666667) / 6.666666666666667); + } + html.md .row.no-gutter .tablet-15 { + width: 15%; + } + html.md .row .tablet-10 { + width: 10%; + width: -webkit-calc((100% - 16px*9) / 10); + width: calc((100% - 16px*9) / 10); + } + html.md .row.no-gutter .tablet-10 { + width: 10%; + } + html.md .row .tablet-5 { + width: 5%; + width: -webkit-calc((100% - 16px*19) / 20); + width: calc((100% - 16px*19) / 20); + } + html.md .row.no-gutter .tablet-5 { + width: 5%; + } + html.md .row .tablet-auto:nth-last-child(1), + html.md .row .tablet-auto:nth-last-child(1) ~ .col-auto { + width: 100%; + width: -webkit-calc((100% - 16px*0) / 1); + width: calc((100% - 16px*0) / 1); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(1), + html.md .row.no-gutter .tablet-auto:nth-last-child(1) ~ .tablet-auto { + width: 100%; + } + html.md .row .tablet-auto:nth-last-child(2), + html.md .row .tablet-auto:nth-last-child(2) ~ .col-auto { + width: 50%; + width: -webkit-calc((100% - 16px*1) / 2); + width: calc((100% - 16px*1) / 2); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(2), + html.md .row.no-gutter .tablet-auto:nth-last-child(2) ~ .tablet-auto { + width: 50%; + } + html.md .row .tablet-auto:nth-last-child(3), + html.md .row .tablet-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; + width: -webkit-calc((100% - 16px*2) / 3); + width: calc((100% - 16px*2) / 3); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(3), + html.md .row.no-gutter .tablet-auto:nth-last-child(3) ~ .tablet-auto { + width: 33.33333333%; + } + html.md .row .tablet-auto:nth-last-child(4), + html.md .row .tablet-auto:nth-last-child(4) ~ .col-auto { + width: 25%; + width: -webkit-calc((100% - 16px*3) / 4); + width: calc((100% - 16px*3) / 4); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(4), + html.md .row.no-gutter .tablet-auto:nth-last-child(4) ~ .tablet-auto { + width: 25%; + } + html.md .row .tablet-auto:nth-last-child(5), + html.md .row .tablet-auto:nth-last-child(5) ~ .col-auto { + width: 20%; + width: -webkit-calc((100% - 16px*4) / 5); + width: calc((100% - 16px*4) / 5); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(5), + html.md .row.no-gutter .tablet-auto:nth-last-child(5) ~ .tablet-auto { + width: 20%; + } + html.md .row .tablet-auto:nth-last-child(6), + html.md .row .tablet-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; + width: -webkit-calc((100% - 16px*5) / 6); + width: calc((100% - 16px*5) / 6); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(6), + html.md .row.no-gutter .tablet-auto:nth-last-child(6) ~ .tablet-auto { + width: 16.66666667%; + } + html.md .row .tablet-auto:nth-last-child(7), + html.md .row .tablet-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; + width: -webkit-calc((100% - 16px*6) / 7); + width: calc((100% - 16px*6) / 7); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(7), + html.md .row.no-gutter .tablet-auto:nth-last-child(7) ~ .tablet-auto { + width: 14.28571429%; + } + html.md .row .tablet-auto:nth-last-child(8), + html.md .row .tablet-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; + width: -webkit-calc((100% - 16px*7) / 8); + width: calc((100% - 16px*7) / 8); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(8), + html.md .row.no-gutter .tablet-auto:nth-last-child(8) ~ .tablet-auto { + width: 12.5%; + } + html.md .row .tablet-auto:nth-last-child(9), + html.md .row .tablet-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; + width: -webkit-calc((100% - 16px*8) / 9); + width: calc((100% - 16px*8) / 9); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(9), + html.md .row.no-gutter .tablet-auto:nth-last-child(9) ~ .tablet-auto { + width: 11.11111111%; + } + html.md .row .tablet-auto:nth-last-child(10), + html.md .row .tablet-auto:nth-last-child(10) ~ .col-auto { + width: 10%; + width: -webkit-calc((100% - 16px*9) / 10); + width: calc((100% - 16px*9) / 10); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(10), + html.md .row.no-gutter .tablet-auto:nth-last-child(10) ~ .tablet-auto { + width: 10%; + } + html.md .row .tablet-auto:nth-last-child(11), + html.md .row .tablet-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; + width: -webkit-calc((100% - 16px*10) / 11); + width: calc((100% - 16px*10) / 11); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(11), + html.md .row.no-gutter .tablet-auto:nth-last-child(11) ~ .tablet-auto { + width: 9.09090909%; + } + html.md .row .tablet-auto:nth-last-child(12), + html.md .row .tablet-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; + width: -webkit-calc((100% - 16px*11) / 12); + width: calc((100% - 16px*11) / 12); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(12), + html.md .row.no-gutter .tablet-auto:nth-last-child(12) ~ .tablet-auto { + width: 8.33333333%; + } + html.md .row .tablet-auto:nth-last-child(13), + html.md .row .tablet-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; + width: -webkit-calc((100% - 16px*12) / 13); + width: calc((100% - 16px*12) / 13); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(13), + html.md .row.no-gutter .tablet-auto:nth-last-child(13) ~ .tablet-auto { + width: 7.69230769%; + } + html.md .row .tablet-auto:nth-last-child(14), + html.md .row .tablet-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; + width: -webkit-calc((100% - 16px*13) / 14); + width: calc((100% - 16px*13) / 14); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(14), + html.md .row.no-gutter .tablet-auto:nth-last-child(14) ~ .tablet-auto { + width: 7.14285714%; + } + html.md .row .tablet-auto:nth-last-child(15), + html.md .row .tablet-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; + width: -webkit-calc((100% - 16px*14) / 15); + width: calc((100% - 16px*14) / 15); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(15), + html.md .row.no-gutter .tablet-auto:nth-last-child(15) ~ .tablet-auto { + width: 6.66666667%; + } + html.md .row .tablet-auto:nth-last-child(16), + html.md .row .tablet-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; + width: -webkit-calc((100% - 16px*15) / 16); + width: calc((100% - 16px*15) / 16); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(16), + html.md .row.no-gutter .tablet-auto:nth-last-child(16) ~ .tablet-auto { + width: 6.25%; + } + html.md .row .tablet-auto:nth-last-child(17), + html.md .row .tablet-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; + width: -webkit-calc((100% - 16px*16) / 17); + width: calc((100% - 16px*16) / 17); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(17), + html.md .row.no-gutter .tablet-auto:nth-last-child(17) ~ .tablet-auto { + width: 5.88235294%; + } + html.md .row .tablet-auto:nth-last-child(18), + html.md .row .tablet-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; + width: -webkit-calc((100% - 16px*17) / 18); + width: calc((100% - 16px*17) / 18); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(18), + html.md .row.no-gutter .tablet-auto:nth-last-child(18) ~ .tablet-auto { + width: 5.55555556%; + } + html.md .row .tablet-auto:nth-last-child(19), + html.md .row .tablet-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; + width: -webkit-calc((100% - 16px*18) / 19); + width: calc((100% - 16px*18) / 19); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(19), + html.md .row.no-gutter .tablet-auto:nth-last-child(19) ~ .tablet-auto { + width: 5.26315789%; + } + html.md .row .tablet-auto:nth-last-child(20), + html.md .row .tablet-auto:nth-last-child(20) ~ .col-auto { + width: 5%; + width: -webkit-calc((100% - 16px*19) / 20); + width: calc((100% - 16px*19) / 20); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(20), + html.md .row.no-gutter .tablet-auto:nth-last-child(20) ~ .tablet-auto { + width: 5%; + } + html.md .row .tablet-auto:nth-last-child(21), + html.md .row .tablet-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; + width: -webkit-calc((100% - 16px*20) / 21); + width: calc((100% - 16px*20) / 21); + } + html.md .row.no-gutter .tablet-auto:nth-last-child(21), + html.md .row.no-gutter .tablet-auto:nth-last-child(21) ~ .tablet-auto { + width: 4.76190476%; + } +} +/* === Preloader === */ +/* === Progressbar === */ +/* === Dialog === */ +.dialog-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.4); + z-index: 13000; + visibility: hidden; + opacity: 0; + transition-duration: 400ms; + will-change: opacity; + contain: strict; +} +.dialog-overlay.not-animated { + transition-duration: 0ms; +} +.dialog-overlay.overlay-in { + visibility: visible; + opacity: 1; +} +.dialog { + position: absolute; + z-index: 13500; + left: 50%; + margin-top: 0; + top: 50%; + overflow: hidden; + opacity: 0; + transform: translate3d(0, 0, 0) scale(1.185); + transition-property: transform, opacity; + display: none; + contain: content; + will-change: transform, opacity; + transition-duration: 400ms; +} +.dialog.modal-in { + opacity: 1; + transform: translate3d(0, 0, 0) scale(1); +} +.dialog.modal-out { + opacity: 0; + z-index: 13499; +} +.dialog.not-animated { + transition-duration: 0ms; +} +.dialog-inner { + position: relative; +} +.dialog-title { + font-weight: 500; +} +.dialog-buttons { + position: relative; + display: flex; +} +.dialog-buttons-vertical .dialog-buttons { + display: block; + height: auto; +} +.dialog-no-buttons .dialog-buttons { + display: none; +} +.dialog-input { + box-sizing: border-box; + margin: 0; + margin-top: 15px; + border-radius: 0; + appearance: none; + width: 100%; + display: block; + font-family: inherit; + box-shadow: none; +} +html.ios .dialog { + width: 270px; + margin-left: -135px; + text-align: center; + border-radius: 13px; + color: #000; +} +html.ios .dialog.modal-out { + transform: translate3d(0, 0, 0) scale(1); +} +html.ios .dialog-inner { + padding: 15px; + border-radius: 13px 13px 0 0; + background: rgba(255, 255, 255, 0.95); +} +html.ios .dialog-inner:after { + content: ''; + position: absolute; + background-color: rgba(0, 0, 0, 0.2); + display: block; + z-index: 15; + top: auto; + right: auto; + bottom: 0; + left: 0; + height: 1px; + width: 100%; + transform-origin: 50% 100%; +} +html.ios.device-pixel-ratio-2 .dialog-inner:after { + transform: scaleY(0.5); +} +html.ios.device-pixel-ratio-3 .dialog-inner:after { + transform: scaleY(0.33); +} +html.ios .dialog-title { + font-size: 18px; + text-align: center; +} +html.device-ios-gt-8 html.ios .dialog-title { + font-weight: 600; +} +html.ios .dialog-title + .dialog-text { + margin-top: 5px; +} +html.ios .dialog-buttons { + height: 44px; + justify-content: center; +} +html.ios .dialog-button { + width: 100%; + padding: 0 5px; + height: 44px; + font-size: 17px; + line-height: 44px; + text-align: center; + color: #007aff; + display: block; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + cursor: pointer; + box-sizing: border-box; + -webkit-box-flex: 1; + -ms-flex: 1; + background: rgba(255, 255, 255, 0.95); +} +html.ios .dialog-button:first-child { + border-radius: 0 0 0 13px; +} +html.ios .dialog-button:last-child { + border-radius: 0 0 13px 0; +} +html.ios .dialog-button:last-child:after { + display: none !important; +} +html.ios .dialog-button:first-child:last-child { + border-radius: 0 0 13px 13px; +} +html.ios .dialog-button.dialog-button-bold { + font-weight: 500; +} +html.ios .dialog-button.active-state { + background: rgba(230, 230, 230, 0.95); +} +html.ios .dialog-buttons-vertical .dialog-buttons { + height: auto; +} +html.ios .dialog-buttons-vertical .dialog-button { + border-radius: 0; +} +html.ios .dialog-buttons-vertical .dialog-button:last-child { + border-radius: 0 0 13px 13px; +} +html.ios .dialog-buttons-vertical .dialog-button:last-child:after { + display: none !important; +} +html.ios.device-ios-gt-8 .dialog-button.dialog-button-bold { + font-weight: 600; +} +html.ios .dialog-button:after { + content: ''; + position: absolute; + background-color: rgba(0, 0, 0, 0.2); + display: block; + z-index: 15; + top: 0; + right: 0; + bottom: auto; + left: auto; + width: 1px; + height: 100%; + transform-origin: 100% 50%; +} +html.ios.device-pixel-ratio-2 .dialog-button:after { + transform: scaleX(0.5); +} +html.ios.device-pixel-ratio-3 .dialog-button:after { + transform: scaleX(0.33); +} +html.ios .dialog-buttons-vertical .dialog-button:after { + content: ''; + position: absolute; + background-color: rgba(0, 0, 0, 0.2); + display: block; + z-index: 15; + top: auto; + right: auto; + bottom: 0; + left: 0; + height: 1px; + width: 100%; + transform-origin: 50% 100%; +} +html.ios.device-pixel-ratio-2 .dialog-buttons-vertical .dialog-button:after { + transform: scaleY(0.5); +} +html.ios.device-pixel-ratio-3 .dialog-buttons-vertical .dialog-button:after { + transform: scaleY(0.33); +} +html.ios .dialog-no-buttons .dialog-inner { + border-radius: 13px; +} +html.ios .dialog-no-buttons .dialog-inner:after { + display: none !important; +} +html.ios .dialog-input { + height: 26px; + background: #fff; + padding: 0 5px; + border: 1px solid rgba(0, 0, 0, 0.3); + font-size: 14px; +} +html.ios .dialog-input + .dialog-input { + margin-top: 5px; +} +html.ios .dialog-input-double + .dialog-input-double .dialog-input { + border-top: 0; + margin-top: 0; +} +html.ios .dialog-preloader .prelaoder { + width: 34px; + height: 34px; +} +html.md .dialog { + width: 280px; + margin-left: -140px; + border-radius: 3px; + color: #757575; + background: #fff; + font-size: 16px; + box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); +} +html.md .dialog.modal-in { + opacity: 1; + transform: translate3d(0, 0, 0) scale(1); +} +html.md .dialog.modal-out { + opacity: 0; + z-index: 13499; + transform: translate3d(0, 0, 0) scale(0.815); +} +html.md .dialog-inner { + padding: 24px 24px 20px; +} +html.md .dialog-title { + font-size: 20px; + color: #212121; + line-height: 1.3; +} +html.md .dialog-title + .dialog-text { + margin-top: 20px; +} +html.md .dialog-text { + line-height: 1.5; +} +html.md .dialog-buttons { + height: 48px; + padding: 6px 8px; + overflow: hidden; + box-sizing: border-box; + justify-content: flex-end; +} +html.md .dialog-buttons.dialog-buttons-vertical { + padding: 0 0 8px 0; +} +html.md .dialog-buttons.dialog-buttons-vertical .dialog-button { + margin-left: 0; + text-align: right; + height: 48px; + line-height: 48px; + border-radius: 0; + padding-left: 16px; + padding-right: 16px; +} +html.md .dialog-button.dialog-button-bold, +html.md .dialog-buttons .button.dialog-button-bold { + font-weight: 700; +} +html.md .dialog-button + .dialog-button, +html.md .dialog-buttons .button + .dialog-button { + margin-left: 4px; +} +html.md .dialog-input { + height: 36px; + padding: 0; + border: none; + font-size: 16px; + transition-duration: 200ms; + position: relative; +} +html.md .dialog-input::-webkit-input-placeholder { + color: rgba(0, 0, 0, 0.35); +} +html.md .dialog-input + .dialog-input { + margin-top: 16px; +} +html.md .dialog-preloader .dialog-title, +html.md .dialog-preloader .dialog-inner { + text-align: center; +} +/* === Popup === */ +/* === Popover === */ +/* === Actions === */ +/* === Touch Ripple === */ +html.md .ripple, +html.md a.floating-button, +html.md .floating-button > a, +html.md a.link, +html.md a.item-link, +html.md .button, +html.md .modal-button, +html.md .tab-link, +html.md .label-radio, +html.md .label-checkbox, +html.md .actions-modal-button, +html.md .speed-dial-buttons a { + -webkit-user-select: none; + user-select: none; +} +html.md .ripple-wave { + left: 0; + top: 0; + position: absolute !important; + border-radius: 50%; + pointer-events: none; + z-index: -1; + background: rgba(0, 0, 0, 0.1); + padding: 0; + margin: 0; + font-size: 0; + transform: translate3d(0px, 0px, 0) scale(0); + transition-duration: 1400ms; +} +html.md .ripple-wave.ripple-wave-fill { + transition-duration: 300ms; + opacity: 0.35; +} +html.md .ripple-wave.ripple-wave-out { + transition-duration: 600ms; + opacity: 0; +} +.button-fill html.md .ripple-wave, +.picker-calendar-day html.md .ripple-wave { + z-index: 1; +} +html.md .button-fill .ripple-wave, +html.md .navbar .ripple-wave, +html.md .toolbar .ripple-wave, +html.md .subnavbar .ripple-wave, +html.md .searchbar .ripple-wave, +html.md .notifications .ripple-wave, +html.md .floating-button .ripple-wave, +html.md .speed-dial-buttons a .ripple-wave { + background: rgba(255, 255, 255, 0.3); +} +html.md .messagebar .ripple-wave { + background: rgba(0, 0, 0, 0.1); +} +html.md .data-table .sortable-cell .ripple-wave { + z-index: 0; +} +html.md .form-checkbox .ripple-wave, +html.md .form-radio .ripple-wave { + background: rgba(33, 150, 243, 0.5); + z-index: 0; +} diff --git a/bower_components/framework7/dist/css/framework7.ios.colors.css b/bower_components/framework7/dist/css/framework7.ios.colors.css new file mode 100644 index 00000000..a02c2acb --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.ios.colors.css @@ -0,0 +1,3232 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * iOS Theme + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +/*========================== +Framework7 Color Themes +==========================*/ +.theme-gray .button:not(.button-fill) { + border-color: #8e8e93; +} +html:not(.watch-active-state) .theme-gray .button:not(.button-fill):active, +.theme-gray .button:not(.button-fill).active-state { + background-color: rgba(142, 142, 147, 0.15); +} +.theme-gray .button:not(.button-fill).active { + background-color: #8e8e93; + color: #fff; +} +.theme-gray .button.button-fill { + background: #8e8e93; + color: #fff; +} +.progressbar.theme-gray span, +.theme-gray .progressbar span { + background-color: #8e8e93; +} +.progressbar-infinite.theme-gray:before, +.theme-gray .progressbar-infinite:before { + background-color: #8e8e93; +} +.theme-gray i.icon, +i.icon.theme-gray { + color: #8e8e93; +} +i.icon-next.color-gray, +i.icon-next.theme-gray, +.theme-gray i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-gray, +i.icon-prev.theme-gray, +.theme-gray i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-gray, +i.icon-back.theme-gray, +.theme-gray i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-gray, +i.icon-forward.theme-gray, +.theme-gray i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-gray, +i.icon-bars.theme-gray, +.theme-gray i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E"); +} +@media (-webkit-min-device-pixel-ratio: 2) { + i.icon-bars.color-gray, + i.icon-bars.theme-gray, + .theme-gray i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E"); + } +} +.theme-gray a, +.theme-gray .item-link.list-button, +.theme-gray .list-button { + color: #8e8e93; +} +.theme-gray .tabbar a, +.tabbar.theme-gray a, +.theme-gray .tabbar a i, +.tabbar.theme-gray a i { + color: inherit; +} +.theme-gray .tabbar a.active, +.tabbar.theme-gray a.active, +.theme-gray .tabbar a.active i, +.tabbar.theme-gray a.active i { + color: #8e8e93; +} +.theme-gray .messagebar .messagebar-send-link { + background-color: #8e8e93; +} +.theme-gray label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-gray label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-gray .form-checkbox input[type="checkbox"]:checked ~ i, +label.label-checkbox.theme-gray input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-gray input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox.theme-gray input[type="checkbox"]:checked ~ i { + background-color: #8e8e93; +} +.theme-gray .form-radio input[type="radio"]:checked ~ i, +.theme-gray label.label-radio input[type="checkbox"]:checked ~ .item-inner, +.theme-gray label.label-radio input[type="radio"]:checked ~ .item-inner, +.form-radio.theme-gray input[type="radio"]:checked ~ i, +label.label-radio.theme-gray input[type="checkbox"]:checked ~ .item-inner, +label.label-radio.theme-gray input[type="radio"]:checked ~ .item-inner { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%238e8e93'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E"); +} +.theme-gray .picker-calendar-day.picker-calendar-day-selected span { + background-color: #8e8e93 !important; +} +.theme-gray .data-table .data-table-header-selected, +.data-table.theme-gray .data-table-header-selected { + background: rgba(142, 142, 147, 0.1); +} +.theme-gray .data-table .data-table-title-selected, +.data-table.theme-gray .data-table-title-selected { + color: #8e8e93; +} +.swiper-pagination.color-gray .swiper-pagination-bullet-active, +.theme-gray .swiper-pagination .swiper-pagination-bullet-active { + background-color: #8e8e93; +} +.swiper-pagination.color-gray .swiper-pagination-progressbar, +.theme-gray .swiper-pagination .swiper-pagination-progressbar { + background-color: #8e8e93; +} +.swiper-pagination.swiper-pagination-progress.bg-gray { + background-color: rgba(142, 142, 147, 0.25); +} +.swiper-button-next.color-gray, +.swiper-container-rtl .swiper-button-prev.color-gray, +.theme-gray .swiper-button-next, +.theme-gray .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-gray, +.swiper-container-rtl .swiper-button-next.color-gray, +.theme-gray .swiper-button-prev, +.theme-gray .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E"); +} +.theme-gray .floating-button, +.theme-gray .speed-dial-buttons a, +.floating-button.theme-gray, +.speed-dial-buttons a.theme-gray { + color: #fff; + background: #8e8e93; +} +html:not(.watch-active-state) .theme-gray .floating-button:active, +html:not(.watch-active-state) .theme-gray .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-gray:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-gray:active, +.theme-gray .floating-button.active-state, +.theme-gray .speed-dial-buttons a.active-state, +.floating-button.theme-gray.active-state, +.speed-dial-buttons a.theme-gray.active-state { + background: #79797f; +} +.theme-gray .floating-button i, +.theme-gray .speed-dial-buttons a i, +.floating-button.theme-gray i, +.speed-dial-buttons a.theme-gray i { + color: inherit; +} +.theme-gray .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-gray input[type="range"]::-webkit-slider-thumb:before { + background-color: #8e8e93; +} +.theme-gray .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-gray input[type="range"]::-ms-fill-lower { + background-color: #8e8e93; +} +.badge.theme-gray { + background-color: #8e8e93; + color: #fff; +} +.theme-white .button:not(.button-fill) { + border-color: #ffffff; +} +html:not(.watch-active-state) .theme-white .button:not(.button-fill):active, +.theme-white .button:not(.button-fill).active-state { + background-color: rgba(255, 255, 255, 0.15); +} +.theme-white .button:not(.button-fill).active { + background-color: #ffffff; + color: #fff; +} +.theme-white .button.button-fill { + background: #ffffff; + color: #fff; +} +.progressbar.theme-white span, +.theme-white .progressbar span { + background-color: #ffffff; +} +.progressbar-infinite.theme-white:before, +.theme-white .progressbar-infinite:before { + background-color: #ffffff; +} +.theme-white i.icon, +i.icon.theme-white { + color: #ffffff; +} +i.icon-next.color-white, +i.icon-next.theme-white, +.theme-white i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-white, +i.icon-prev.theme-white, +.theme-white i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-white, +i.icon-back.theme-white, +.theme-white i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-white, +i.icon-forward.theme-white, +.theme-white i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-white, +i.icon-bars.theme-white, +.theme-white i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E"); +} +@media (-webkit-min-device-pixel-ratio: 2) { + i.icon-bars.color-white, + i.icon-bars.theme-white, + .theme-white i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E"); + } +} +.theme-white a, +.theme-white .item-link.list-button, +.theme-white .list-button { + color: #ffffff; +} +.theme-white .tabbar a, +.tabbar.theme-white a, +.theme-white .tabbar a i, +.tabbar.theme-white a i { + color: inherit; +} +.theme-white .tabbar a.active, +.tabbar.theme-white a.active, +.theme-white .tabbar a.active i, +.tabbar.theme-white a.active i { + color: #ffffff; +} +.theme-white .messagebar .messagebar-send-link { + background-color: #ffffff; +} +.theme-white label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-white label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-white .form-checkbox input[type="checkbox"]:checked ~ i, +label.label-checkbox.theme-white input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-white input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox.theme-white input[type="checkbox"]:checked ~ i { + background-color: #ffffff; +} +.theme-white .form-radio input[type="radio"]:checked ~ i, +.theme-white label.label-radio input[type="checkbox"]:checked ~ .item-inner, +.theme-white label.label-radio input[type="radio"]:checked ~ .item-inner, +.form-radio.theme-white input[type="radio"]:checked ~ i, +label.label-radio.theme-white input[type="checkbox"]:checked ~ .item-inner, +label.label-radio.theme-white input[type="radio"]:checked ~ .item-inner { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23ffffff'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E"); +} +.theme-white .picker-calendar-day.picker-calendar-day-selected span { + background-color: #ffffff !important; +} +.theme-white .data-table .data-table-header-selected, +.data-table.theme-white .data-table-header-selected { + background: rgba(255, 255, 255, 0.1); +} +.theme-white .data-table .data-table-title-selected, +.data-table.theme-white .data-table-title-selected { + color: #ffffff; +} +.swiper-pagination.color-white .swiper-pagination-bullet-active, +.theme-white .swiper-pagination .swiper-pagination-bullet-active { + background-color: #ffffff; +} +.swiper-pagination.color-white .swiper-pagination-progressbar, +.theme-white .swiper-pagination .swiper-pagination-progressbar { + background-color: #ffffff; +} +.swiper-pagination.swiper-pagination-progress.bg-white { + background-color: rgba(255, 255, 255, 0.25); +} +.swiper-button-next.color-white, +.swiper-container-rtl .swiper-button-prev.color-white, +.theme-white .swiper-button-next, +.theme-white .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-white, +.swiper-container-rtl .swiper-button-next.color-white, +.theme-white .swiper-button-prev, +.theme-white .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +.theme-white .floating-button, +.theme-white .speed-dial-buttons a, +.floating-button.theme-white, +.speed-dial-buttons a.theme-white { + color: #fff; + background: #ffffff; +} +html:not(.watch-active-state) .theme-white .floating-button:active, +html:not(.watch-active-state) .theme-white .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-white:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-white:active, +.theme-white .floating-button.active-state, +.theme-white .speed-dial-buttons a.active-state, +.floating-button.theme-white.active-state, +.speed-dial-buttons a.theme-white.active-state { + background: #ebebeb; +} +.theme-white .floating-button i, +.theme-white .speed-dial-buttons a i, +.floating-button.theme-white i, +.speed-dial-buttons a.theme-white i { + color: inherit; +} +.theme-white .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-white input[type="range"]::-webkit-slider-thumb:before { + background-color: #ffffff; +} +.theme-white .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-white input[type="range"]::-ms-fill-lower { + background-color: #ffffff; +} +.badge.theme-white { + background-color: #ffffff; + color: #fff; +} +.theme-black .button:not(.button-fill) { + border-color: #000000; +} +html:not(.watch-active-state) .theme-black .button:not(.button-fill):active, +.theme-black .button:not(.button-fill).active-state { + background-color: rgba(0, 0, 0, 0.15); +} +.theme-black .button:not(.button-fill).active { + background-color: #000000; + color: #fff; +} +.theme-black .button.button-fill { + background: #000000; + color: #fff; +} +.progressbar.theme-black span, +.theme-black .progressbar span { + background-color: #000000; +} +.progressbar-infinite.theme-black:before, +.theme-black .progressbar-infinite:before { + background-color: #000000; +} +.theme-black i.icon, +i.icon.theme-black { + color: #000000; +} +i.icon-next.color-black, +i.icon-next.theme-black, +.theme-black i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-black, +i.icon-prev.theme-black, +.theme-black i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-black, +i.icon-back.theme-black, +.theme-black i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-black, +i.icon-forward.theme-black, +.theme-black i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-black, +i.icon-bars.theme-black, +.theme-black i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E"); +} +@media (-webkit-min-device-pixel-ratio: 2) { + i.icon-bars.color-black, + i.icon-bars.theme-black, + .theme-black i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E"); + } +} +.theme-black a, +.theme-black .item-link.list-button, +.theme-black .list-button { + color: #000000; +} +.theme-black .tabbar a, +.tabbar.theme-black a, +.theme-black .tabbar a i, +.tabbar.theme-black a i { + color: inherit; +} +.theme-black .tabbar a.active, +.tabbar.theme-black a.active, +.theme-black .tabbar a.active i, +.tabbar.theme-black a.active i { + color: #000000; +} +.theme-black .messagebar .messagebar-send-link { + background-color: #000000; +} +.theme-black label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-black label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-black .form-checkbox input[type="checkbox"]:checked ~ i, +label.label-checkbox.theme-black input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-black input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox.theme-black input[type="checkbox"]:checked ~ i { + background-color: #000000; +} +.theme-black .form-radio input[type="radio"]:checked ~ i, +.theme-black label.label-radio input[type="checkbox"]:checked ~ .item-inner, +.theme-black label.label-radio input[type="radio"]:checked ~ .item-inner, +.form-radio.theme-black input[type="radio"]:checked ~ i, +label.label-radio.theme-black input[type="checkbox"]:checked ~ .item-inner, +label.label-radio.theme-black input[type="radio"]:checked ~ .item-inner { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23000000'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E"); +} +.theme-black .picker-calendar-day.picker-calendar-day-selected span { + background-color: #000000 !important; +} +.theme-black .data-table .data-table-header-selected, +.data-table.theme-black .data-table-header-selected { + background: rgba(0, 0, 0, 0.1); +} +.theme-black .data-table .data-table-title-selected, +.data-table.theme-black .data-table-title-selected { + color: #000000; +} +.swiper-pagination.color-black .swiper-pagination-bullet-active, +.theme-black .swiper-pagination .swiper-pagination-bullet-active { + background-color: #000000; +} +.swiper-pagination.color-black .swiper-pagination-progressbar, +.theme-black .swiper-pagination .swiper-pagination-progressbar { + background-color: #000000; +} +.swiper-pagination.swiper-pagination-progress.bg-black { + background-color: rgba(0, 0, 0, 0.25); +} +.swiper-button-next.color-black, +.swiper-container-rtl .swiper-button-prev.color-black, +.theme-black .swiper-button-next, +.theme-black .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-black, +.swiper-container-rtl .swiper-button-next.color-black, +.theme-black .swiper-button-prev, +.theme-black .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +.theme-black .floating-button, +.theme-black .speed-dial-buttons a, +.floating-button.theme-black, +.speed-dial-buttons a.theme-black { + color: #fff; + background: #000000; +} +html:not(.watch-active-state) .theme-black .floating-button:active, +html:not(.watch-active-state) .theme-black .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-black:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-black:active, +.theme-black .floating-button.active-state, +.theme-black .speed-dial-buttons a.active-state, +.floating-button.theme-black.active-state, +.speed-dial-buttons a.theme-black.active-state { + background: #000000; +} +.theme-black .floating-button i, +.theme-black .speed-dial-buttons a i, +.floating-button.theme-black i, +.speed-dial-buttons a.theme-black i { + color: inherit; +} +.theme-black .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-black input[type="range"]::-webkit-slider-thumb:before { + background-color: #000000; +} +.theme-black .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-black input[type="range"]::-ms-fill-lower { + background-color: #000000; +} +.badge.theme-black { + background-color: #000000; + color: #fff; +} +.theme-lightblue .button:not(.button-fill) { + border-color: #5ac8fa; +} +html:not(.watch-active-state) .theme-lightblue .button:not(.button-fill):active, +.theme-lightblue .button:not(.button-fill).active-state { + background-color: rgba(90, 200, 250, 0.15); +} +.theme-lightblue .button:not(.button-fill).active { + background-color: #5ac8fa; + color: #fff; +} +.theme-lightblue .button.button-fill { + background: #5ac8fa; + color: #fff; +} +.progressbar.theme-lightblue span, +.theme-lightblue .progressbar span { + background-color: #5ac8fa; +} +.progressbar-infinite.theme-lightblue:before, +.theme-lightblue .progressbar-infinite:before { + background-color: #5ac8fa; +} +.theme-lightblue i.icon, +i.icon.theme-lightblue { + color: #5ac8fa; +} +i.icon-next.color-lightblue, +i.icon-next.theme-lightblue, +.theme-lightblue i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-lightblue, +i.icon-prev.theme-lightblue, +.theme-lightblue i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-lightblue, +i.icon-back.theme-lightblue, +.theme-lightblue i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-lightblue, +i.icon-forward.theme-lightblue, +.theme-lightblue i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-lightblue, +i.icon-bars.theme-lightblue, +.theme-lightblue i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E"); +} +@media (-webkit-min-device-pixel-ratio: 2) { + i.icon-bars.color-lightblue, + i.icon-bars.theme-lightblue, + .theme-lightblue i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E"); + } +} +.theme-lightblue a, +.theme-lightblue .item-link.list-button, +.theme-lightblue .list-button { + color: #5ac8fa; +} +.theme-lightblue .tabbar a, +.tabbar.theme-lightblue a, +.theme-lightblue .tabbar a i, +.tabbar.theme-lightblue a i { + color: inherit; +} +.theme-lightblue .tabbar a.active, +.tabbar.theme-lightblue a.active, +.theme-lightblue .tabbar a.active i, +.tabbar.theme-lightblue a.active i { + color: #5ac8fa; +} +.theme-lightblue .messagebar .messagebar-send-link { + background-color: #5ac8fa; +} +.theme-lightblue label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-lightblue label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-lightblue .form-checkbox input[type="checkbox"]:checked ~ i, +label.label-checkbox.theme-lightblue input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-lightblue input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox.theme-lightblue input[type="checkbox"]:checked ~ i { + background-color: #5ac8fa; +} +.theme-lightblue .form-radio input[type="radio"]:checked ~ i, +.theme-lightblue label.label-radio input[type="checkbox"]:checked ~ .item-inner, +.theme-lightblue label.label-radio input[type="radio"]:checked ~ .item-inner, +.form-radio.theme-lightblue input[type="radio"]:checked ~ i, +label.label-radio.theme-lightblue input[type="checkbox"]:checked ~ .item-inner, +label.label-radio.theme-lightblue input[type="radio"]:checked ~ .item-inner { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%235ac8fa'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E"); +} +.theme-lightblue .picker-calendar-day.picker-calendar-day-selected span { + background-color: #5ac8fa !important; +} +.theme-lightblue .data-table .data-table-header-selected, +.data-table.theme-lightblue .data-table-header-selected { + background: rgba(90, 200, 250, 0.1); +} +.theme-lightblue .data-table .data-table-title-selected, +.data-table.theme-lightblue .data-table-title-selected { + color: #5ac8fa; +} +.swiper-pagination.color-lightblue .swiper-pagination-bullet-active, +.theme-lightblue .swiper-pagination .swiper-pagination-bullet-active { + background-color: #5ac8fa; +} +.swiper-pagination.color-lightblue .swiper-pagination-progressbar, +.theme-lightblue .swiper-pagination .swiper-pagination-progressbar { + background-color: #5ac8fa; +} +.swiper-pagination.swiper-pagination-progress.bg-lightblue { + background-color: rgba(90, 200, 250, 0.25); +} +.swiper-button-next.color-lightblue, +.swiper-container-rtl .swiper-button-prev.color-lightblue, +.theme-lightblue .swiper-button-next, +.theme-lightblue .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-lightblue, +.swiper-container-rtl .swiper-button-next.color-lightblue, +.theme-lightblue .swiper-button-prev, +.theme-lightblue .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E"); +} +.theme-lightblue .floating-button, +.theme-lightblue .speed-dial-buttons a, +.floating-button.theme-lightblue, +.speed-dial-buttons a.theme-lightblue { + color: #fff; + background: #5ac8fa; +} +html:not(.watch-active-state) .theme-lightblue .floating-button:active, +html:not(.watch-active-state) .theme-lightblue .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-lightblue:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-lightblue:active, +.theme-lightblue .floating-button.active-state, +.theme-lightblue .speed-dial-buttons a.active-state, +.floating-button.theme-lightblue.active-state, +.speed-dial-buttons a.theme-lightblue.active-state { + background: #32bbf9; +} +.theme-lightblue .floating-button i, +.theme-lightblue .speed-dial-buttons a i, +.floating-button.theme-lightblue i, +.speed-dial-buttons a.theme-lightblue i { + color: inherit; +} +.theme-lightblue .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-lightblue input[type="range"]::-webkit-slider-thumb:before { + background-color: #5ac8fa; +} +.theme-lightblue .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-lightblue input[type="range"]::-ms-fill-lower { + background-color: #5ac8fa; +} +.badge.theme-lightblue { + background-color: #5ac8fa; + color: #fff; +} +.theme-yellow .button:not(.button-fill) { + border-color: #ffcc00; +} +html:not(.watch-active-state) .theme-yellow .button:not(.button-fill):active, +.theme-yellow .button:not(.button-fill).active-state { + background-color: rgba(255, 204, 0, 0.15); +} +.theme-yellow .button:not(.button-fill).active { + background-color: #ffcc00; + color: #fff; +} +.theme-yellow .button.button-fill { + background: #ffcc00; + color: #fff; +} +.progressbar.theme-yellow span, +.theme-yellow .progressbar span { + background-color: #ffcc00; +} +.progressbar-infinite.theme-yellow:before, +.theme-yellow .progressbar-infinite:before { + background-color: #ffcc00; +} +.theme-yellow i.icon, +i.icon.theme-yellow { + color: #ffcc00; +} +i.icon-next.color-yellow, +i.icon-next.theme-yellow, +.theme-yellow i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-yellow, +i.icon-prev.theme-yellow, +.theme-yellow i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-yellow, +i.icon-back.theme-yellow, +.theme-yellow i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-yellow, +i.icon-forward.theme-yellow, +.theme-yellow i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-yellow, +i.icon-bars.theme-yellow, +.theme-yellow i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E"); +} +@media (-webkit-min-device-pixel-ratio: 2) { + i.icon-bars.color-yellow, + i.icon-bars.theme-yellow, + .theme-yellow i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E"); + } +} +.theme-yellow a, +.theme-yellow .item-link.list-button, +.theme-yellow .list-button { + color: #ffcc00; +} +.theme-yellow .tabbar a, +.tabbar.theme-yellow a, +.theme-yellow .tabbar a i, +.tabbar.theme-yellow a i { + color: inherit; +} +.theme-yellow .tabbar a.active, +.tabbar.theme-yellow a.active, +.theme-yellow .tabbar a.active i, +.tabbar.theme-yellow a.active i { + color: #ffcc00; +} +.theme-yellow .messagebar .messagebar-send-link { + background-color: #ffcc00; +} +.theme-yellow label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-yellow label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-yellow .form-checkbox input[type="checkbox"]:checked ~ i, +label.label-checkbox.theme-yellow input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-yellow input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox.theme-yellow input[type="checkbox"]:checked ~ i { + background-color: #ffcc00; +} +.theme-yellow .form-radio input[type="radio"]:checked ~ i, +.theme-yellow label.label-radio input[type="checkbox"]:checked ~ .item-inner, +.theme-yellow label.label-radio input[type="radio"]:checked ~ .item-inner, +.form-radio.theme-yellow input[type="radio"]:checked ~ i, +label.label-radio.theme-yellow input[type="checkbox"]:checked ~ .item-inner, +label.label-radio.theme-yellow input[type="radio"]:checked ~ .item-inner { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23ffcc00'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E"); +} +.theme-yellow .picker-calendar-day.picker-calendar-day-selected span { + background-color: #ffcc00 !important; +} +.theme-yellow .data-table .data-table-header-selected, +.data-table.theme-yellow .data-table-header-selected { + background: rgba(255, 204, 0, 0.1); +} +.theme-yellow .data-table .data-table-title-selected, +.data-table.theme-yellow .data-table-title-selected { + color: #ffcc00; +} +.swiper-pagination.color-yellow .swiper-pagination-bullet-active, +.theme-yellow .swiper-pagination .swiper-pagination-bullet-active { + background-color: #ffcc00; +} +.swiper-pagination.color-yellow .swiper-pagination-progressbar, +.theme-yellow .swiper-pagination .swiper-pagination-progressbar { + background-color: #ffcc00; +} +.swiper-pagination.swiper-pagination-progress.bg-yellow { + background-color: rgba(255, 204, 0, 0.25); +} +.swiper-button-next.color-yellow, +.swiper-container-rtl .swiper-button-prev.color-yellow, +.theme-yellow .swiper-button-next, +.theme-yellow .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-yellow, +.swiper-container-rtl .swiper-button-next.color-yellow, +.theme-yellow .swiper-button-prev, +.theme-yellow .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E"); +} +.theme-yellow .floating-button, +.theme-yellow .speed-dial-buttons a, +.floating-button.theme-yellow, +.speed-dial-buttons a.theme-yellow { + color: #fff; + background: #ffcc00; +} +html:not(.watch-active-state) .theme-yellow .floating-button:active, +html:not(.watch-active-state) .theme-yellow .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-yellow:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-yellow:active, +.theme-yellow .floating-button.active-state, +.theme-yellow .speed-dial-buttons a.active-state, +.floating-button.theme-yellow.active-state, +.speed-dial-buttons a.theme-yellow.active-state { + background: #d6ab00; +} +.theme-yellow .floating-button i, +.theme-yellow .speed-dial-buttons a i, +.floating-button.theme-yellow i, +.speed-dial-buttons a.theme-yellow i { + color: inherit; +} +.theme-yellow .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-yellow input[type="range"]::-webkit-slider-thumb:before { + background-color: #ffcc00; +} +.theme-yellow .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-yellow input[type="range"]::-ms-fill-lower { + background-color: #ffcc00; +} +.badge.theme-yellow { + background-color: #ffcc00; + color: #fff; +} +.theme-orange .button:not(.button-fill) { + border-color: #ff9500; +} +html:not(.watch-active-state) .theme-orange .button:not(.button-fill):active, +.theme-orange .button:not(.button-fill).active-state { + background-color: rgba(255, 149, 0, 0.15); +} +.theme-orange .button:not(.button-fill).active { + background-color: #ff9500; + color: #fff; +} +.theme-orange .button.button-fill { + background: #ff9500; + color: #fff; +} +.progressbar.theme-orange span, +.theme-orange .progressbar span { + background-color: #ff9500; +} +.progressbar-infinite.theme-orange:before, +.theme-orange .progressbar-infinite:before { + background-color: #ff9500; +} +.theme-orange i.icon, +i.icon.theme-orange { + color: #ff9500; +} +i.icon-next.color-orange, +i.icon-next.theme-orange, +.theme-orange i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-orange, +i.icon-prev.theme-orange, +.theme-orange i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-orange, +i.icon-back.theme-orange, +.theme-orange i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-orange, +i.icon-forward.theme-orange, +.theme-orange i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-orange, +i.icon-bars.theme-orange, +.theme-orange i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E"); +} +@media (-webkit-min-device-pixel-ratio: 2) { + i.icon-bars.color-orange, + i.icon-bars.theme-orange, + .theme-orange i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E"); + } +} +.theme-orange a, +.theme-orange .item-link.list-button, +.theme-orange .list-button { + color: #ff9500; +} +.theme-orange .tabbar a, +.tabbar.theme-orange a, +.theme-orange .tabbar a i, +.tabbar.theme-orange a i { + color: inherit; +} +.theme-orange .tabbar a.active, +.tabbar.theme-orange a.active, +.theme-orange .tabbar a.active i, +.tabbar.theme-orange a.active i { + color: #ff9500; +} +.theme-orange .messagebar .messagebar-send-link { + background-color: #ff9500; +} +.theme-orange label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-orange label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-orange .form-checkbox input[type="checkbox"]:checked ~ i, +label.label-checkbox.theme-orange input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-orange input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox.theme-orange input[type="checkbox"]:checked ~ i { + background-color: #ff9500; +} +.theme-orange .form-radio input[type="radio"]:checked ~ i, +.theme-orange label.label-radio input[type="checkbox"]:checked ~ .item-inner, +.theme-orange label.label-radio input[type="radio"]:checked ~ .item-inner, +.form-radio.theme-orange input[type="radio"]:checked ~ i, +label.label-radio.theme-orange input[type="checkbox"]:checked ~ .item-inner, +label.label-radio.theme-orange input[type="radio"]:checked ~ .item-inner { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23ff9500'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E"); +} +.theme-orange .picker-calendar-day.picker-calendar-day-selected span { + background-color: #ff9500 !important; +} +.theme-orange .data-table .data-table-header-selected, +.data-table.theme-orange .data-table-header-selected { + background: rgba(255, 149, 0, 0.1); +} +.theme-orange .data-table .data-table-title-selected, +.data-table.theme-orange .data-table-title-selected { + color: #ff9500; +} +.swiper-pagination.color-orange .swiper-pagination-bullet-active, +.theme-orange .swiper-pagination .swiper-pagination-bullet-active { + background-color: #ff9500; +} +.swiper-pagination.color-orange .swiper-pagination-progressbar, +.theme-orange .swiper-pagination .swiper-pagination-progressbar { + background-color: #ff9500; +} +.swiper-pagination.swiper-pagination-progress.bg-orange { + background-color: rgba(255, 149, 0, 0.25); +} +.swiper-button-next.color-orange, +.swiper-container-rtl .swiper-button-prev.color-orange, +.theme-orange .swiper-button-next, +.theme-orange .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-orange, +.swiper-container-rtl .swiper-button-next.color-orange, +.theme-orange .swiper-button-prev, +.theme-orange .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E"); +} +.theme-orange .floating-button, +.theme-orange .speed-dial-buttons a, +.floating-button.theme-orange, +.speed-dial-buttons a.theme-orange { + color: #fff; + background: #ff9500; +} +html:not(.watch-active-state) .theme-orange .floating-button:active, +html:not(.watch-active-state) .theme-orange .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-orange:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-orange:active, +.theme-orange .floating-button.active-state, +.theme-orange .speed-dial-buttons a.active-state, +.floating-button.theme-orange.active-state, +.speed-dial-buttons a.theme-orange.active-state { + background: #d67d00; +} +.theme-orange .floating-button i, +.theme-orange .speed-dial-buttons a i, +.floating-button.theme-orange i, +.speed-dial-buttons a.theme-orange i { + color: inherit; +} +.theme-orange .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-orange input[type="range"]::-webkit-slider-thumb:before { + background-color: #ff9500; +} +.theme-orange .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-orange input[type="range"]::-ms-fill-lower { + background-color: #ff9500; +} +.badge.theme-orange { + background-color: #ff9500; + color: #fff; +} +.theme-pink .button:not(.button-fill) { + border-color: #ff2d55; +} +html:not(.watch-active-state) .theme-pink .button:not(.button-fill):active, +.theme-pink .button:not(.button-fill).active-state { + background-color: rgba(255, 45, 85, 0.15); +} +.theme-pink .button:not(.button-fill).active { + background-color: #ff2d55; + color: #fff; +} +.theme-pink .button.button-fill { + background: #ff2d55; + color: #fff; +} +.progressbar.theme-pink span, +.theme-pink .progressbar span { + background-color: #ff2d55; +} +.progressbar-infinite.theme-pink:before, +.theme-pink .progressbar-infinite:before { + background-color: #ff2d55; +} +.theme-pink i.icon, +i.icon.theme-pink { + color: #ff2d55; +} +i.icon-next.color-pink, +i.icon-next.theme-pink, +.theme-pink i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-pink, +i.icon-prev.theme-pink, +.theme-pink i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-pink, +i.icon-back.theme-pink, +.theme-pink i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-pink, +i.icon-forward.theme-pink, +.theme-pink i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-pink, +i.icon-bars.theme-pink, +.theme-pink i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E"); +} +@media (-webkit-min-device-pixel-ratio: 2) { + i.icon-bars.color-pink, + i.icon-bars.theme-pink, + .theme-pink i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E"); + } +} +.theme-pink a, +.theme-pink .item-link.list-button, +.theme-pink .list-button { + color: #ff2d55; +} +.theme-pink .tabbar a, +.tabbar.theme-pink a, +.theme-pink .tabbar a i, +.tabbar.theme-pink a i { + color: inherit; +} +.theme-pink .tabbar a.active, +.tabbar.theme-pink a.active, +.theme-pink .tabbar a.active i, +.tabbar.theme-pink a.active i { + color: #ff2d55; +} +.theme-pink .messagebar .messagebar-send-link { + background-color: #ff2d55; +} +.theme-pink label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-pink label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-pink .form-checkbox input[type="checkbox"]:checked ~ i, +label.label-checkbox.theme-pink input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-pink input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox.theme-pink input[type="checkbox"]:checked ~ i { + background-color: #ff2d55; +} +.theme-pink .form-radio input[type="radio"]:checked ~ i, +.theme-pink label.label-radio input[type="checkbox"]:checked ~ .item-inner, +.theme-pink label.label-radio input[type="radio"]:checked ~ .item-inner, +.form-radio.theme-pink input[type="radio"]:checked ~ i, +label.label-radio.theme-pink input[type="checkbox"]:checked ~ .item-inner, +label.label-radio.theme-pink input[type="radio"]:checked ~ .item-inner { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23ff2d55'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E"); +} +.theme-pink .picker-calendar-day.picker-calendar-day-selected span { + background-color: #ff2d55 !important; +} +.theme-pink .data-table .data-table-header-selected, +.data-table.theme-pink .data-table-header-selected { + background: rgba(255, 45, 85, 0.1); +} +.theme-pink .data-table .data-table-title-selected, +.data-table.theme-pink .data-table-title-selected { + color: #ff2d55; +} +.swiper-pagination.color-pink .swiper-pagination-bullet-active, +.theme-pink .swiper-pagination .swiper-pagination-bullet-active { + background-color: #ff2d55; +} +.swiper-pagination.color-pink .swiper-pagination-progressbar, +.theme-pink .swiper-pagination .swiper-pagination-progressbar { + background-color: #ff2d55; +} +.swiper-pagination.swiper-pagination-progress.bg-pink { + background-color: rgba(255, 45, 85, 0.25); +} +.swiper-button-next.color-pink, +.swiper-container-rtl .swiper-button-prev.color-pink, +.theme-pink .swiper-button-next, +.theme-pink .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-pink, +.swiper-container-rtl .swiper-button-next.color-pink, +.theme-pink .swiper-button-prev, +.theme-pink .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E"); +} +.theme-pink .floating-button, +.theme-pink .speed-dial-buttons a, +.floating-button.theme-pink, +.speed-dial-buttons a.theme-pink { + color: #fff; + background: #ff2d55; +} +html:not(.watch-active-state) .theme-pink .floating-button:active, +html:not(.watch-active-state) .theme-pink .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-pink:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-pink:active, +.theme-pink .floating-button.active-state, +.theme-pink .speed-dial-buttons a.active-state, +.floating-button.theme-pink.active-state, +.speed-dial-buttons a.theme-pink.active-state { + background: #ff0434; +} +.theme-pink .floating-button i, +.theme-pink .speed-dial-buttons a i, +.floating-button.theme-pink i, +.speed-dial-buttons a.theme-pink i { + color: inherit; +} +.theme-pink .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-pink input[type="range"]::-webkit-slider-thumb:before { + background-color: #ff2d55; +} +.theme-pink .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-pink input[type="range"]::-ms-fill-lower { + background-color: #ff2d55; +} +.badge.theme-pink { + background-color: #ff2d55; + color: #fff; +} +.theme-blue .button:not(.button-fill) { + border-color: #007aff; +} +html:not(.watch-active-state) .theme-blue .button:not(.button-fill):active, +.theme-blue .button:not(.button-fill).active-state { + background-color: rgba(0, 122, 255, 0.15); +} +.theme-blue .button:not(.button-fill).active { + background-color: #007aff; + color: #fff; +} +.theme-blue .button.button-fill { + background: #007aff; + color: #fff; +} +.progressbar.theme-blue span, +.theme-blue .progressbar span { + background-color: #007aff; +} +.progressbar-infinite.theme-blue:before, +.theme-blue .progressbar-infinite:before { + background-color: #007aff; +} +.theme-blue i.icon, +i.icon.theme-blue { + color: #007aff; +} +i.icon-next.color-blue, +i.icon-next.theme-blue, +.theme-blue i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-blue, +i.icon-prev.theme-blue, +.theme-blue i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-blue, +i.icon-back.theme-blue, +.theme-blue i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-blue, +i.icon-forward.theme-blue, +.theme-blue i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-blue, +i.icon-bars.theme-blue, +.theme-blue i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E"); +} +@media (-webkit-min-device-pixel-ratio: 2) { + i.icon-bars.color-blue, + i.icon-bars.theme-blue, + .theme-blue i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E"); + } +} +.theme-blue a, +.theme-blue .item-link.list-button, +.theme-blue .list-button { + color: #007aff; +} +.theme-blue .tabbar a, +.tabbar.theme-blue a, +.theme-blue .tabbar a i, +.tabbar.theme-blue a i { + color: inherit; +} +.theme-blue .tabbar a.active, +.tabbar.theme-blue a.active, +.theme-blue .tabbar a.active i, +.tabbar.theme-blue a.active i { + color: #007aff; +} +.theme-blue .messagebar .messagebar-send-link { + background-color: #007aff; +} +.theme-blue label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-blue label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-blue .form-checkbox input[type="checkbox"]:checked ~ i, +label.label-checkbox.theme-blue input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-blue input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox.theme-blue input[type="checkbox"]:checked ~ i { + background-color: #007aff; +} +.theme-blue .form-radio input[type="radio"]:checked ~ i, +.theme-blue label.label-radio input[type="checkbox"]:checked ~ .item-inner, +.theme-blue label.label-radio input[type="radio"]:checked ~ .item-inner, +.form-radio.theme-blue input[type="radio"]:checked ~ i, +label.label-radio.theme-blue input[type="checkbox"]:checked ~ .item-inner, +label.label-radio.theme-blue input[type="radio"]:checked ~ .item-inner { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23007aff'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E"); +} +.theme-blue .picker-calendar-day.picker-calendar-day-selected span { + background-color: #007aff !important; +} +.theme-blue .data-table .data-table-header-selected, +.data-table.theme-blue .data-table-header-selected { + background: rgba(0, 122, 255, 0.1); +} +.theme-blue .data-table .data-table-title-selected, +.data-table.theme-blue .data-table-title-selected { + color: #007aff; +} +.swiper-pagination.color-blue .swiper-pagination-bullet-active, +.theme-blue .swiper-pagination .swiper-pagination-bullet-active { + background-color: #007aff; +} +.swiper-pagination.color-blue .swiper-pagination-progressbar, +.theme-blue .swiper-pagination .swiper-pagination-progressbar { + background-color: #007aff; +} +.swiper-pagination.swiper-pagination-progress.bg-blue { + background-color: rgba(0, 122, 255, 0.25); +} +.swiper-button-next.color-blue, +.swiper-container-rtl .swiper-button-prev.color-blue, +.theme-blue .swiper-button-next, +.theme-blue .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-blue, +.swiper-container-rtl .swiper-button-next.color-blue, +.theme-blue .swiper-button-prev, +.theme-blue .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); +} +.theme-blue .floating-button, +.theme-blue .speed-dial-buttons a, +.floating-button.theme-blue, +.speed-dial-buttons a.theme-blue { + color: #fff; + background: #007aff; +} +html:not(.watch-active-state) .theme-blue .floating-button:active, +html:not(.watch-active-state) .theme-blue .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-blue:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-blue:active, +.theme-blue .floating-button.active-state, +.theme-blue .speed-dial-buttons a.active-state, +.floating-button.theme-blue.active-state, +.speed-dial-buttons a.theme-blue.active-state { + background: #0066d6; +} +.theme-blue .floating-button i, +.theme-blue .speed-dial-buttons a i, +.floating-button.theme-blue i, +.speed-dial-buttons a.theme-blue i { + color: inherit; +} +.theme-blue .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-blue input[type="range"]::-webkit-slider-thumb:before { + background-color: #007aff; +} +.theme-blue .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-blue input[type="range"]::-ms-fill-lower { + background-color: #007aff; +} +.badge.theme-blue { + background-color: #007aff; + color: #fff; +} +.theme-green .button:not(.button-fill) { + border-color: #4cd964; +} +html:not(.watch-active-state) .theme-green .button:not(.button-fill):active, +.theme-green .button:not(.button-fill).active-state { + background-color: rgba(76, 217, 100, 0.15); +} +.theme-green .button:not(.button-fill).active { + background-color: #4cd964; + color: #fff; +} +.theme-green .button.button-fill { + background: #4cd964; + color: #fff; +} +.progressbar.theme-green span, +.theme-green .progressbar span { + background-color: #4cd964; +} +.progressbar-infinite.theme-green:before, +.theme-green .progressbar-infinite:before { + background-color: #4cd964; +} +.theme-green i.icon, +i.icon.theme-green { + color: #4cd964; +} +i.icon-next.color-green, +i.icon-next.theme-green, +.theme-green i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-green, +i.icon-prev.theme-green, +.theme-green i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-green, +i.icon-back.theme-green, +.theme-green i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-green, +i.icon-forward.theme-green, +.theme-green i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-green, +i.icon-bars.theme-green, +.theme-green i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E"); +} +@media (-webkit-min-device-pixel-ratio: 2) { + i.icon-bars.color-green, + i.icon-bars.theme-green, + .theme-green i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E"); + } +} +.theme-green a, +.theme-green .item-link.list-button, +.theme-green .list-button { + color: #4cd964; +} +.theme-green .tabbar a, +.tabbar.theme-green a, +.theme-green .tabbar a i, +.tabbar.theme-green a i { + color: inherit; +} +.theme-green .tabbar a.active, +.tabbar.theme-green a.active, +.theme-green .tabbar a.active i, +.tabbar.theme-green a.active i { + color: #4cd964; +} +.theme-green .messagebar .messagebar-send-link { + background-color: #4cd964; +} +.theme-green label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-green label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-green .form-checkbox input[type="checkbox"]:checked ~ i, +label.label-checkbox.theme-green input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-green input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox.theme-green input[type="checkbox"]:checked ~ i { + background-color: #4cd964; +} +.theme-green .form-radio input[type="radio"]:checked ~ i, +.theme-green label.label-radio input[type="checkbox"]:checked ~ .item-inner, +.theme-green label.label-radio input[type="radio"]:checked ~ .item-inner, +.form-radio.theme-green input[type="radio"]:checked ~ i, +label.label-radio.theme-green input[type="checkbox"]:checked ~ .item-inner, +label.label-radio.theme-green input[type="radio"]:checked ~ .item-inner { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%234cd964'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E"); +} +.theme-green .picker-calendar-day.picker-calendar-day-selected span { + background-color: #4cd964 !important; +} +.theme-green .data-table .data-table-header-selected, +.data-table.theme-green .data-table-header-selected { + background: rgba(76, 217, 100, 0.1); +} +.theme-green .data-table .data-table-title-selected, +.data-table.theme-green .data-table-title-selected { + color: #4cd964; +} +.swiper-pagination.color-green .swiper-pagination-bullet-active, +.theme-green .swiper-pagination .swiper-pagination-bullet-active { + background-color: #4cd964; +} +.swiper-pagination.color-green .swiper-pagination-progressbar, +.theme-green .swiper-pagination .swiper-pagination-progressbar { + background-color: #4cd964; +} +.swiper-pagination.swiper-pagination-progress.bg-green { + background-color: rgba(76, 217, 100, 0.25); +} +.swiper-button-next.color-green, +.swiper-container-rtl .swiper-button-prev.color-green, +.theme-green .swiper-button-next, +.theme-green .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-green, +.swiper-container-rtl .swiper-button-next.color-green, +.theme-green .swiper-button-prev, +.theme-green .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E"); +} +.theme-green .floating-button, +.theme-green .speed-dial-buttons a, +.floating-button.theme-green, +.speed-dial-buttons a.theme-green { + color: #fff; + background: #4cd964; +} +html:not(.watch-active-state) .theme-green .floating-button:active, +html:not(.watch-active-state) .theme-green .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-green:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-green:active, +.theme-green .floating-button.active-state, +.theme-green .speed-dial-buttons a.active-state, +.floating-button.theme-green.active-state, +.speed-dial-buttons a.theme-green.active-state { + background: #2cd048; +} +.theme-green .floating-button i, +.theme-green .speed-dial-buttons a i, +.floating-button.theme-green i, +.speed-dial-buttons a.theme-green i { + color: inherit; +} +.theme-green .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-green input[type="range"]::-webkit-slider-thumb:before { + background-color: #4cd964; +} +.theme-green .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-green input[type="range"]::-ms-fill-lower { + background-color: #4cd964; +} +.badge.theme-green { + background-color: #4cd964; + color: #fff; +} +.theme-red .button:not(.button-fill) { + border-color: #ff3b30; +} +html:not(.watch-active-state) .theme-red .button:not(.button-fill):active, +.theme-red .button:not(.button-fill).active-state { + background-color: rgba(255, 59, 48, 0.15); +} +.theme-red .button:not(.button-fill).active { + background-color: #ff3b30; + color: #fff; +} +.theme-red .button.button-fill { + background: #ff3b30; + color: #fff; +} +.progressbar.theme-red span, +.theme-red .progressbar span { + background-color: #ff3b30; +} +.progressbar-infinite.theme-red:before, +.theme-red .progressbar-infinite:before { + background-color: #ff3b30; +} +.theme-red i.icon, +i.icon.theme-red { + color: #ff3b30; +} +i.icon-next.color-red, +i.icon-next.theme-red, +.theme-red i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-red, +i.icon-prev.theme-red, +.theme-red i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-red, +i.icon-back.theme-red, +.theme-red i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-red, +i.icon-forward.theme-red, +.theme-red i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-red, +i.icon-bars.theme-red, +.theme-red i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E"); +} +@media (-webkit-min-device-pixel-ratio: 2) { + i.icon-bars.color-red, + i.icon-bars.theme-red, + .theme-red i.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E"); + } +} +.theme-red a, +.theme-red .item-link.list-button, +.theme-red .list-button { + color: #ff3b30; +} +.theme-red .tabbar a, +.tabbar.theme-red a, +.theme-red .tabbar a i, +.tabbar.theme-red a i { + color: inherit; +} +.theme-red .tabbar a.active, +.tabbar.theme-red a.active, +.theme-red .tabbar a.active i, +.tabbar.theme-red a.active i { + color: #ff3b30; +} +.theme-red .messagebar .messagebar-send-link { + background-color: #ff3b30; +} +.theme-red label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-red label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-red .form-checkbox input[type="checkbox"]:checked ~ i, +label.label-checkbox.theme-red input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-red input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox.theme-red input[type="checkbox"]:checked ~ i { + background-color: #ff3b30; +} +.theme-red .form-radio input[type="radio"]:checked ~ i, +.theme-red label.label-radio input[type="checkbox"]:checked ~ .item-inner, +.theme-red label.label-radio input[type="radio"]:checked ~ .item-inner, +.form-radio.theme-red input[type="radio"]:checked ~ i, +label.label-radio.theme-red input[type="checkbox"]:checked ~ .item-inner, +label.label-radio.theme-red input[type="radio"]:checked ~ .item-inner { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23ff3b30'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E"); +} +.theme-red .picker-calendar-day.picker-calendar-day-selected span { + background-color: #ff3b30 !important; +} +.theme-red .data-table .data-table-header-selected, +.data-table.theme-red .data-table-header-selected { + background: rgba(255, 59, 48, 0.1); +} +.theme-red .data-table .data-table-title-selected, +.data-table.theme-red .data-table-title-selected { + color: #ff3b30; +} +.swiper-pagination.color-red .swiper-pagination-bullet-active, +.theme-red .swiper-pagination .swiper-pagination-bullet-active { + background-color: #ff3b30; +} +.swiper-pagination.color-red .swiper-pagination-progressbar, +.theme-red .swiper-pagination .swiper-pagination-progressbar { + background-color: #ff3b30; +} +.swiper-pagination.swiper-pagination-progress.bg-red { + background-color: rgba(255, 59, 48, 0.25); +} +.swiper-button-next.color-red, +.swiper-container-rtl .swiper-button-prev.color-red, +.theme-red .swiper-button-next, +.theme-red .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-red, +.swiper-container-rtl .swiper-button-next.color-red, +.theme-red .swiper-button-prev, +.theme-red .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E"); +} +.theme-red .floating-button, +.theme-red .speed-dial-buttons a, +.floating-button.theme-red, +.speed-dial-buttons a.theme-red { + color: #fff; + background: #ff3b30; +} +html:not(.watch-active-state) .theme-red .floating-button:active, +html:not(.watch-active-state) .theme-red .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-red:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-red:active, +.theme-red .floating-button.active-state, +.theme-red .speed-dial-buttons a.active-state, +.floating-button.theme-red.active-state, +.speed-dial-buttons a.theme-red.active-state { + background: #ff1407; +} +.theme-red .floating-button i, +.theme-red .speed-dial-buttons a i, +.floating-button.theme-red i, +.speed-dial-buttons a.theme-red i { + color: inherit; +} +.theme-red .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-red input[type="range"]::-webkit-slider-thumb:before { + background-color: #ff3b30; +} +.theme-red .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-red input[type="range"]::-ms-fill-lower { + background-color: #ff3b30; +} +.badge.theme-red { + background-color: #ff3b30; + color: #fff; +} +/*========================== +Framework7 Color + Bg + Border +==========================*/ +.color-gray { + color: #8e8e93; +} +.list-block .item-link.list-button.color-gray, +.list-button.color-gray, +.tabbar a.active.color-gray, +a.color-gray { + color: #8e8e93; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-gray, +.label-switch.color-gray input[type="checkbox"]:checked + .checkbox { + background-color: #8e8e93; +} +.color-gray.button:not(.button-fill), +.color-gray.buttons-row .button { + border-color: #8e8e93; +} +html:not(.watch-active-state) .color-gray.button:not(.button-fill):active, +html:not(.watch-active-state) .color-gray.buttons-row .button:active, +.color-gray.button:not(.button-fill).active-state, +.color-gray.buttons-row .button.active-state { + background-color: rgba(142, 142, 147, 0.15); +} +.color-gray.button:not(.button-fill).active, +.color-gray.buttons-row .button.active { + background-color: #8e8e93; + color: #fff; +} +.button.button-fill.color-gray { + background: #8e8e93; + color: #fff; +} +.progressbar.color-gray span, +.progressbar.bg-gray span { + background-color: #8e8e93; +} +.progressbar-infinite.color-gray:before, +.progressbar-infinite.bg-gray:before { + background-color: #8e8e93; +} +.color-gray i.icon, +i.icon.color-gray { + color: #8e8e93; +} +.preloader.color-gray, +.preloader.preloader-gray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%238e8e93'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +.bg-gray, +.button.button-fill.bg-gray, +a.bg-gray, +.list-block .swipeout-actions-left a.bg-gray, +.list-block .swipeout-actions-right a.bg-gray { + background-color: #8e8e93; +} +.border-gray { + border-color: #8e8e93; +} +.list-block .border-gray.item-inner:after, +.list-block ul.border-gray:after, +.border-gray:after, +.list-block .border-gray.item-inner:before, +.list-block ul.border-gray:before, +.border-gray:before { + background-color: #8e8e93; +} +.floating-button.color-gray, +.speed-dial-buttons a.color-gray, +.floating-button.bg-gray, +.speed-dial-buttons a.bg-gray { + color: #fff; + background: #8e8e93; +} +html:not(.watch-active-state) .floating-button.color-gray:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-gray:active, +html:not(.watch-active-state) .floating-button.bg-gray:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-gray:active, +.floating-button.color-gray.active-state, +.speed-dial-buttons a.color-gray.active-state, +.floating-button.bg-gray.active-state, +.speed-dial-buttons a.bg-gray.active-state { + background: #79797f; +} +.floating-button.color-gray i, +.speed-dial-buttons a.color-gray i, +.floating-button.bg-gray i, +.speed-dial-buttons a.bg-gray i { + color: inherit; +} +.range-slider.color-gray input[type="range"]::-webkit-slider-thumb:before { + background-color: #8e8e93; +} +.range-slider.color-gray input[type="range"]::-ms-fill-lower { + background-color: #8e8e93; +} +.badge.color-gray { + background-color: #8e8e93; + color: #fff; +} +.color-white { + color: #ffffff; +} +.list-block .item-link.list-button.color-white, +.list-button.color-white, +.tabbar a.active.color-white, +a.color-white { + color: #ffffff; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-white, +.label-switch.color-white input[type="checkbox"]:checked + .checkbox { + background-color: #ffffff; +} +.color-white.button:not(.button-fill), +.color-white.buttons-row .button { + border-color: #ffffff; +} +html:not(.watch-active-state) .color-white.button:not(.button-fill):active, +html:not(.watch-active-state) .color-white.buttons-row .button:active, +.color-white.button:not(.button-fill).active-state, +.color-white.buttons-row .button.active-state { + background-color: rgba(255, 255, 255, 0.15); +} +.color-white.button:not(.button-fill).active, +.color-white.buttons-row .button.active { + background-color: #ffffff; + color: #fff; +} +.button.button-fill.color-white { + background: #ffffff; + color: #fff; +} +.progressbar.color-white span, +.progressbar.bg-white span { + background-color: #ffffff; +} +.progressbar-infinite.color-white:before, +.progressbar-infinite.bg-white:before { + background-color: #ffffff; +} +.color-white i.icon, +i.icon.color-white { + color: #ffffff; +} +.preloader.color-white, +.preloader.preloader-white { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23ffffff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +.bg-white, +.button.button-fill.bg-white, +a.bg-white, +.list-block .swipeout-actions-left a.bg-white, +.list-block .swipeout-actions-right a.bg-white { + background-color: #ffffff; +} +.border-white { + border-color: #ffffff; +} +.list-block .border-white.item-inner:after, +.list-block ul.border-white:after, +.border-white:after, +.list-block .border-white.item-inner:before, +.list-block ul.border-white:before, +.border-white:before { + background-color: #ffffff; +} +.floating-button.color-white, +.speed-dial-buttons a.color-white, +.floating-button.bg-white, +.speed-dial-buttons a.bg-white { + color: #fff; + background: #ffffff; +} +html:not(.watch-active-state) .floating-button.color-white:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-white:active, +html:not(.watch-active-state) .floating-button.bg-white:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-white:active, +.floating-button.color-white.active-state, +.speed-dial-buttons a.color-white.active-state, +.floating-button.bg-white.active-state, +.speed-dial-buttons a.bg-white.active-state { + background: #ebebeb; +} +.floating-button.color-white i, +.speed-dial-buttons a.color-white i, +.floating-button.bg-white i, +.speed-dial-buttons a.bg-white i { + color: inherit; +} +.range-slider.color-white input[type="range"]::-webkit-slider-thumb:before { + background-color: #ffffff; +} +.range-slider.color-white input[type="range"]::-ms-fill-lower { + background-color: #ffffff; +} +.badge.color-white { + background-color: #ffffff; + color: #fff; +} +.color-black { + color: #000000; +} +.list-block .item-link.list-button.color-black, +.list-button.color-black, +.tabbar a.active.color-black, +a.color-black { + color: #000000; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-black, +.label-switch.color-black input[type="checkbox"]:checked + .checkbox { + background-color: #000000; +} +.color-black.button:not(.button-fill), +.color-black.buttons-row .button { + border-color: #000000; +} +html:not(.watch-active-state) .color-black.button:not(.button-fill):active, +html:not(.watch-active-state) .color-black.buttons-row .button:active, +.color-black.button:not(.button-fill).active-state, +.color-black.buttons-row .button.active-state { + background-color: rgba(0, 0, 0, 0.15); +} +.color-black.button:not(.button-fill).active, +.color-black.buttons-row .button.active { + background-color: #000000; + color: #fff; +} +.button.button-fill.color-black { + background: #000000; + color: #fff; +} +.progressbar.color-black span, +.progressbar.bg-black span { + background-color: #000000; +} +.progressbar-infinite.color-black:before, +.progressbar-infinite.bg-black:before { + background-color: #000000; +} +.color-black i.icon, +i.icon.color-black { + color: #000000; +} +.preloader.color-black, +.preloader.preloader-black { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23000000'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +.bg-black, +.button.button-fill.bg-black, +a.bg-black, +.list-block .swipeout-actions-left a.bg-black, +.list-block .swipeout-actions-right a.bg-black { + background-color: #000000; +} +.border-black { + border-color: #000000; +} +.list-block .border-black.item-inner:after, +.list-block ul.border-black:after, +.border-black:after, +.list-block .border-black.item-inner:before, +.list-block ul.border-black:before, +.border-black:before { + background-color: #000000; +} +.floating-button.color-black, +.speed-dial-buttons a.color-black, +.floating-button.bg-black, +.speed-dial-buttons a.bg-black { + color: #fff; + background: #000000; +} +html:not(.watch-active-state) .floating-button.color-black:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-black:active, +html:not(.watch-active-state) .floating-button.bg-black:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-black:active, +.floating-button.color-black.active-state, +.speed-dial-buttons a.color-black.active-state, +.floating-button.bg-black.active-state, +.speed-dial-buttons a.bg-black.active-state { + background: #000000; +} +.floating-button.color-black i, +.speed-dial-buttons a.color-black i, +.floating-button.bg-black i, +.speed-dial-buttons a.bg-black i { + color: inherit; +} +.range-slider.color-black input[type="range"]::-webkit-slider-thumb:before { + background-color: #000000; +} +.range-slider.color-black input[type="range"]::-ms-fill-lower { + background-color: #000000; +} +.badge.color-black { + background-color: #000000; + color: #fff; +} +.color-lightblue { + color: #5ac8fa; +} +.list-block .item-link.list-button.color-lightblue, +.list-button.color-lightblue, +.tabbar a.active.color-lightblue, +a.color-lightblue { + color: #5ac8fa; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-lightblue, +.label-switch.color-lightblue input[type="checkbox"]:checked + .checkbox { + background-color: #5ac8fa; +} +.color-lightblue.button:not(.button-fill), +.color-lightblue.buttons-row .button { + border-color: #5ac8fa; +} +html:not(.watch-active-state) .color-lightblue.button:not(.button-fill):active, +html:not(.watch-active-state) .color-lightblue.buttons-row .button:active, +.color-lightblue.button:not(.button-fill).active-state, +.color-lightblue.buttons-row .button.active-state { + background-color: rgba(90, 200, 250, 0.15); +} +.color-lightblue.button:not(.button-fill).active, +.color-lightblue.buttons-row .button.active { + background-color: #5ac8fa; + color: #fff; +} +.button.button-fill.color-lightblue { + background: #5ac8fa; + color: #fff; +} +.progressbar.color-lightblue span, +.progressbar.bg-lightblue span { + background-color: #5ac8fa; +} +.progressbar-infinite.color-lightblue:before, +.progressbar-infinite.bg-lightblue:before { + background-color: #5ac8fa; +} +.color-lightblue i.icon, +i.icon.color-lightblue { + color: #5ac8fa; +} +.preloader.color-lightblue, +.preloader.preloader-lightblue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%235ac8fa'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +.bg-lightblue, +.button.button-fill.bg-lightblue, +a.bg-lightblue, +.list-block .swipeout-actions-left a.bg-lightblue, +.list-block .swipeout-actions-right a.bg-lightblue { + background-color: #5ac8fa; +} +.border-lightblue { + border-color: #5ac8fa; +} +.list-block .border-lightblue.item-inner:after, +.list-block ul.border-lightblue:after, +.border-lightblue:after, +.list-block .border-lightblue.item-inner:before, +.list-block ul.border-lightblue:before, +.border-lightblue:before { + background-color: #5ac8fa; +} +.floating-button.color-lightblue, +.speed-dial-buttons a.color-lightblue, +.floating-button.bg-lightblue, +.speed-dial-buttons a.bg-lightblue { + color: #fff; + background: #5ac8fa; +} +html:not(.watch-active-state) .floating-button.color-lightblue:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-lightblue:active, +html:not(.watch-active-state) .floating-button.bg-lightblue:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-lightblue:active, +.floating-button.color-lightblue.active-state, +.speed-dial-buttons a.color-lightblue.active-state, +.floating-button.bg-lightblue.active-state, +.speed-dial-buttons a.bg-lightblue.active-state { + background: #32bbf9; +} +.floating-button.color-lightblue i, +.speed-dial-buttons a.color-lightblue i, +.floating-button.bg-lightblue i, +.speed-dial-buttons a.bg-lightblue i { + color: inherit; +} +.range-slider.color-lightblue input[type="range"]::-webkit-slider-thumb:before { + background-color: #5ac8fa; +} +.range-slider.color-lightblue input[type="range"]::-ms-fill-lower { + background-color: #5ac8fa; +} +.badge.color-lightblue { + background-color: #5ac8fa; + color: #fff; +} +.color-yellow { + color: #ffcc00; +} +.list-block .item-link.list-button.color-yellow, +.list-button.color-yellow, +.tabbar a.active.color-yellow, +a.color-yellow { + color: #ffcc00; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-yellow, +.label-switch.color-yellow input[type="checkbox"]:checked + .checkbox { + background-color: #ffcc00; +} +.color-yellow.button:not(.button-fill), +.color-yellow.buttons-row .button { + border-color: #ffcc00; +} +html:not(.watch-active-state) .color-yellow.button:not(.button-fill):active, +html:not(.watch-active-state) .color-yellow.buttons-row .button:active, +.color-yellow.button:not(.button-fill).active-state, +.color-yellow.buttons-row .button.active-state { + background-color: rgba(255, 204, 0, 0.15); +} +.color-yellow.button:not(.button-fill).active, +.color-yellow.buttons-row .button.active { + background-color: #ffcc00; + color: #fff; +} +.button.button-fill.color-yellow { + background: #ffcc00; + color: #fff; +} +.progressbar.color-yellow span, +.progressbar.bg-yellow span { + background-color: #ffcc00; +} +.progressbar-infinite.color-yellow:before, +.progressbar-infinite.bg-yellow:before { + background-color: #ffcc00; +} +.color-yellow i.icon, +i.icon.color-yellow { + color: #ffcc00; +} +.preloader.color-yellow, +.preloader.preloader-yellow { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23ffcc00'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +.bg-yellow, +.button.button-fill.bg-yellow, +a.bg-yellow, +.list-block .swipeout-actions-left a.bg-yellow, +.list-block .swipeout-actions-right a.bg-yellow { + background-color: #ffcc00; +} +.border-yellow { + border-color: #ffcc00; +} +.list-block .border-yellow.item-inner:after, +.list-block ul.border-yellow:after, +.border-yellow:after, +.list-block .border-yellow.item-inner:before, +.list-block ul.border-yellow:before, +.border-yellow:before { + background-color: #ffcc00; +} +.floating-button.color-yellow, +.speed-dial-buttons a.color-yellow, +.floating-button.bg-yellow, +.speed-dial-buttons a.bg-yellow { + color: #fff; + background: #ffcc00; +} +html:not(.watch-active-state) .floating-button.color-yellow:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-yellow:active, +html:not(.watch-active-state) .floating-button.bg-yellow:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-yellow:active, +.floating-button.color-yellow.active-state, +.speed-dial-buttons a.color-yellow.active-state, +.floating-button.bg-yellow.active-state, +.speed-dial-buttons a.bg-yellow.active-state { + background: #d6ab00; +} +.floating-button.color-yellow i, +.speed-dial-buttons a.color-yellow i, +.floating-button.bg-yellow i, +.speed-dial-buttons a.bg-yellow i { + color: inherit; +} +.range-slider.color-yellow input[type="range"]::-webkit-slider-thumb:before { + background-color: #ffcc00; +} +.range-slider.color-yellow input[type="range"]::-ms-fill-lower { + background-color: #ffcc00; +} +.badge.color-yellow { + background-color: #ffcc00; + color: #fff; +} +.color-orange { + color: #ff9500; +} +.list-block .item-link.list-button.color-orange, +.list-button.color-orange, +.tabbar a.active.color-orange, +a.color-orange { + color: #ff9500; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-orange, +.label-switch.color-orange input[type="checkbox"]:checked + .checkbox { + background-color: #ff9500; +} +.color-orange.button:not(.button-fill), +.color-orange.buttons-row .button { + border-color: #ff9500; +} +html:not(.watch-active-state) .color-orange.button:not(.button-fill):active, +html:not(.watch-active-state) .color-orange.buttons-row .button:active, +.color-orange.button:not(.button-fill).active-state, +.color-orange.buttons-row .button.active-state { + background-color: rgba(255, 149, 0, 0.15); +} +.color-orange.button:not(.button-fill).active, +.color-orange.buttons-row .button.active { + background-color: #ff9500; + color: #fff; +} +.button.button-fill.color-orange { + background: #ff9500; + color: #fff; +} +.progressbar.color-orange span, +.progressbar.bg-orange span { + background-color: #ff9500; +} +.progressbar-infinite.color-orange:before, +.progressbar-infinite.bg-orange:before { + background-color: #ff9500; +} +.color-orange i.icon, +i.icon.color-orange { + color: #ff9500; +} +.preloader.color-orange, +.preloader.preloader-orange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23ff9500'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +.bg-orange, +.button.button-fill.bg-orange, +a.bg-orange, +.list-block .swipeout-actions-left a.bg-orange, +.list-block .swipeout-actions-right a.bg-orange { + background-color: #ff9500; +} +.border-orange { + border-color: #ff9500; +} +.list-block .border-orange.item-inner:after, +.list-block ul.border-orange:after, +.border-orange:after, +.list-block .border-orange.item-inner:before, +.list-block ul.border-orange:before, +.border-orange:before { + background-color: #ff9500; +} +.floating-button.color-orange, +.speed-dial-buttons a.color-orange, +.floating-button.bg-orange, +.speed-dial-buttons a.bg-orange { + color: #fff; + background: #ff9500; +} +html:not(.watch-active-state) .floating-button.color-orange:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-orange:active, +html:not(.watch-active-state) .floating-button.bg-orange:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-orange:active, +.floating-button.color-orange.active-state, +.speed-dial-buttons a.color-orange.active-state, +.floating-button.bg-orange.active-state, +.speed-dial-buttons a.bg-orange.active-state { + background: #d67d00; +} +.floating-button.color-orange i, +.speed-dial-buttons a.color-orange i, +.floating-button.bg-orange i, +.speed-dial-buttons a.bg-orange i { + color: inherit; +} +.range-slider.color-orange input[type="range"]::-webkit-slider-thumb:before { + background-color: #ff9500; +} +.range-slider.color-orange input[type="range"]::-ms-fill-lower { + background-color: #ff9500; +} +.badge.color-orange { + background-color: #ff9500; + color: #fff; +} +.color-pink { + color: #ff2d55; +} +.list-block .item-link.list-button.color-pink, +.list-button.color-pink, +.tabbar a.active.color-pink, +a.color-pink { + color: #ff2d55; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-pink, +.label-switch.color-pink input[type="checkbox"]:checked + .checkbox { + background-color: #ff2d55; +} +.color-pink.button:not(.button-fill), +.color-pink.buttons-row .button { + border-color: #ff2d55; +} +html:not(.watch-active-state) .color-pink.button:not(.button-fill):active, +html:not(.watch-active-state) .color-pink.buttons-row .button:active, +.color-pink.button:not(.button-fill).active-state, +.color-pink.buttons-row .button.active-state { + background-color: rgba(255, 45, 85, 0.15); +} +.color-pink.button:not(.button-fill).active, +.color-pink.buttons-row .button.active { + background-color: #ff2d55; + color: #fff; +} +.button.button-fill.color-pink { + background: #ff2d55; + color: #fff; +} +.progressbar.color-pink span, +.progressbar.bg-pink span { + background-color: #ff2d55; +} +.progressbar-infinite.color-pink:before, +.progressbar-infinite.bg-pink:before { + background-color: #ff2d55; +} +.color-pink i.icon, +i.icon.color-pink { + color: #ff2d55; +} +.preloader.color-pink, +.preloader.preloader-pink { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23ff2d55'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +.bg-pink, +.button.button-fill.bg-pink, +a.bg-pink, +.list-block .swipeout-actions-left a.bg-pink, +.list-block .swipeout-actions-right a.bg-pink { + background-color: #ff2d55; +} +.border-pink { + border-color: #ff2d55; +} +.list-block .border-pink.item-inner:after, +.list-block ul.border-pink:after, +.border-pink:after, +.list-block .border-pink.item-inner:before, +.list-block ul.border-pink:before, +.border-pink:before { + background-color: #ff2d55; +} +.floating-button.color-pink, +.speed-dial-buttons a.color-pink, +.floating-button.bg-pink, +.speed-dial-buttons a.bg-pink { + color: #fff; + background: #ff2d55; +} +html:not(.watch-active-state) .floating-button.color-pink:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-pink:active, +html:not(.watch-active-state) .floating-button.bg-pink:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-pink:active, +.floating-button.color-pink.active-state, +.speed-dial-buttons a.color-pink.active-state, +.floating-button.bg-pink.active-state, +.speed-dial-buttons a.bg-pink.active-state { + background: #ff0434; +} +.floating-button.color-pink i, +.speed-dial-buttons a.color-pink i, +.floating-button.bg-pink i, +.speed-dial-buttons a.bg-pink i { + color: inherit; +} +.range-slider.color-pink input[type="range"]::-webkit-slider-thumb:before { + background-color: #ff2d55; +} +.range-slider.color-pink input[type="range"]::-ms-fill-lower { + background-color: #ff2d55; +} +.badge.color-pink { + background-color: #ff2d55; + color: #fff; +} +.color-blue { + color: #007aff; +} +.list-block .item-link.list-button.color-blue, +.list-button.color-blue, +.tabbar a.active.color-blue, +a.color-blue { + color: #007aff; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-blue, +.label-switch.color-blue input[type="checkbox"]:checked + .checkbox { + background-color: #007aff; +} +.color-blue.button:not(.button-fill), +.color-blue.buttons-row .button { + border-color: #007aff; +} +html:not(.watch-active-state) .color-blue.button:not(.button-fill):active, +html:not(.watch-active-state) .color-blue.buttons-row .button:active, +.color-blue.button:not(.button-fill).active-state, +.color-blue.buttons-row .button.active-state { + background-color: rgba(0, 122, 255, 0.15); +} +.color-blue.button:not(.button-fill).active, +.color-blue.buttons-row .button.active { + background-color: #007aff; + color: #fff; +} +.button.button-fill.color-blue { + background: #007aff; + color: #fff; +} +.progressbar.color-blue span, +.progressbar.bg-blue span { + background-color: #007aff; +} +.progressbar-infinite.color-blue:before, +.progressbar-infinite.bg-blue:before { + background-color: #007aff; +} +.color-blue i.icon, +i.icon.color-blue { + color: #007aff; +} +.preloader.color-blue, +.preloader.preloader-blue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23007aff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +.bg-blue, +.button.button-fill.bg-blue, +a.bg-blue, +.list-block .swipeout-actions-left a.bg-blue, +.list-block .swipeout-actions-right a.bg-blue { + background-color: #007aff; +} +.border-blue { + border-color: #007aff; +} +.list-block .border-blue.item-inner:after, +.list-block ul.border-blue:after, +.border-blue:after, +.list-block .border-blue.item-inner:before, +.list-block ul.border-blue:before, +.border-blue:before { + background-color: #007aff; +} +.floating-button.color-blue, +.speed-dial-buttons a.color-blue, +.floating-button.bg-blue, +.speed-dial-buttons a.bg-blue { + color: #fff; + background: #007aff; +} +html:not(.watch-active-state) .floating-button.color-blue:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-blue:active, +html:not(.watch-active-state) .floating-button.bg-blue:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-blue:active, +.floating-button.color-blue.active-state, +.speed-dial-buttons a.color-blue.active-state, +.floating-button.bg-blue.active-state, +.speed-dial-buttons a.bg-blue.active-state { + background: #0066d6; +} +.floating-button.color-blue i, +.speed-dial-buttons a.color-blue i, +.floating-button.bg-blue i, +.speed-dial-buttons a.bg-blue i { + color: inherit; +} +.range-slider.color-blue input[type="range"]::-webkit-slider-thumb:before { + background-color: #007aff; +} +.range-slider.color-blue input[type="range"]::-ms-fill-lower { + background-color: #007aff; +} +.badge.color-blue { + background-color: #007aff; + color: #fff; +} +.color-green { + color: #4cd964; +} +.list-block .item-link.list-button.color-green, +.list-button.color-green, +.tabbar a.active.color-green, +a.color-green { + color: #4cd964; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-green, +.label-switch.color-green input[type="checkbox"]:checked + .checkbox { + background-color: #4cd964; +} +.color-green.button:not(.button-fill), +.color-green.buttons-row .button { + border-color: #4cd964; +} +html:not(.watch-active-state) .color-green.button:not(.button-fill):active, +html:not(.watch-active-state) .color-green.buttons-row .button:active, +.color-green.button:not(.button-fill).active-state, +.color-green.buttons-row .button.active-state { + background-color: rgba(76, 217, 100, 0.15); +} +.color-green.button:not(.button-fill).active, +.color-green.buttons-row .button.active { + background-color: #4cd964; + color: #fff; +} +.button.button-fill.color-green { + background: #4cd964; + color: #fff; +} +.progressbar.color-green span, +.progressbar.bg-green span { + background-color: #4cd964; +} +.progressbar-infinite.color-green:before, +.progressbar-infinite.bg-green:before { + background-color: #4cd964; +} +.color-green i.icon, +i.icon.color-green { + color: #4cd964; +} +.preloader.color-green, +.preloader.preloader-green { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%234cd964'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +.bg-green, +.button.button-fill.bg-green, +a.bg-green, +.list-block .swipeout-actions-left a.bg-green, +.list-block .swipeout-actions-right a.bg-green { + background-color: #4cd964; +} +.border-green { + border-color: #4cd964; +} +.list-block .border-green.item-inner:after, +.list-block ul.border-green:after, +.border-green:after, +.list-block .border-green.item-inner:before, +.list-block ul.border-green:before, +.border-green:before { + background-color: #4cd964; +} +.floating-button.color-green, +.speed-dial-buttons a.color-green, +.floating-button.bg-green, +.speed-dial-buttons a.bg-green { + color: #fff; + background: #4cd964; +} +html:not(.watch-active-state) .floating-button.color-green:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-green:active, +html:not(.watch-active-state) .floating-button.bg-green:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-green:active, +.floating-button.color-green.active-state, +.speed-dial-buttons a.color-green.active-state, +.floating-button.bg-green.active-state, +.speed-dial-buttons a.bg-green.active-state { + background: #2cd048; +} +.floating-button.color-green i, +.speed-dial-buttons a.color-green i, +.floating-button.bg-green i, +.speed-dial-buttons a.bg-green i { + color: inherit; +} +.range-slider.color-green input[type="range"]::-webkit-slider-thumb:before { + background-color: #4cd964; +} +.range-slider.color-green input[type="range"]::-ms-fill-lower { + background-color: #4cd964; +} +.badge.color-green { + background-color: #4cd964; + color: #fff; +} +.color-red { + color: #ff3b30; +} +.list-block .item-link.list-button.color-red, +.list-button.color-red, +.tabbar a.active.color-red, +a.color-red { + color: #ff3b30; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-red, +.label-switch.color-red input[type="checkbox"]:checked + .checkbox { + background-color: #ff3b30; +} +.color-red.button:not(.button-fill), +.color-red.buttons-row .button { + border-color: #ff3b30; +} +html:not(.watch-active-state) .color-red.button:not(.button-fill):active, +html:not(.watch-active-state) .color-red.buttons-row .button:active, +.color-red.button:not(.button-fill).active-state, +.color-red.buttons-row .button.active-state { + background-color: rgba(255, 59, 48, 0.15); +} +.color-red.button:not(.button-fill).active, +.color-red.buttons-row .button.active { + background-color: #ff3b30; + color: #fff; +} +.button.button-fill.color-red { + background: #ff3b30; + color: #fff; +} +.progressbar.color-red span, +.progressbar.bg-red span { + background-color: #ff3b30; +} +.progressbar-infinite.color-red:before, +.progressbar-infinite.bg-red:before { + background-color: #ff3b30; +} +.color-red i.icon, +i.icon.color-red { + color: #ff3b30; +} +.preloader.color-red, +.preloader.preloader-red { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23ff3b30'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +.bg-red, +.button.button-fill.bg-red, +a.bg-red, +.list-block .swipeout-actions-left a.bg-red, +.list-block .swipeout-actions-right a.bg-red { + background-color: #ff3b30; +} +.border-red { + border-color: #ff3b30; +} +.list-block .border-red.item-inner:after, +.list-block ul.border-red:after, +.border-red:after, +.list-block .border-red.item-inner:before, +.list-block ul.border-red:before, +.border-red:before { + background-color: #ff3b30; +} +.floating-button.color-red, +.speed-dial-buttons a.color-red, +.floating-button.bg-red, +.speed-dial-buttons a.bg-red { + color: #fff; + background: #ff3b30; +} +html:not(.watch-active-state) .floating-button.color-red:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-red:active, +html:not(.watch-active-state) .floating-button.bg-red:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-red:active, +.floating-button.color-red.active-state, +.speed-dial-buttons a.color-red.active-state, +.floating-button.bg-red.active-state, +.speed-dial-buttons a.bg-red.active-state { + background: #ff1407; +} +.floating-button.color-red i, +.speed-dial-buttons a.color-red i, +.floating-button.bg-red i, +.speed-dial-buttons a.bg-red i { + color: inherit; +} +.range-slider.color-red input[type="range"]::-webkit-slider-thumb:before { + background-color: #ff3b30; +} +.range-slider.color-red input[type="range"]::-ms-fill-lower { + background-color: #ff3b30; +} +.badge.color-red { + background-color: #ff3b30; + color: #fff; +} +/*========================== +Framework7 Layouts Themes +==========================*/ +/* === Dark layout === */ +.layout-dark .navbar, +.navbar.layout-dark, +.layout-dark .subnavbar, +.subnavbar.layout-dark { + background-color: #131313; + color: #fff; +} +.layout-dark .navbar:after, +.navbar.layout-dark:after, +.layout-dark .subnavbar:after, +.subnavbar.layout-dark:after { + background-color: #333; +} +.layout-dark .toolbar, +.toolbar.layout-dark { + background-color: #131313; + color: #fff; +} +.layout-dark .toolbar:before, +.toolbar.layout-dark:before { + background-color: #333; +} +.layout-dark .picker-modal .toolbar { + background-color: #131313; +} +.layout-dark .popover .picker-modal .toolbar { + background: none; +} +.layout-dark .picker-calendar-week-days { + color: #fff; + background-color: #131313; +} +.layout-dark .popover .picker-modal .picker-center-highlight:before, +.layout-dark .picker-modal.picker-modal-inline .picker-center-highlight:before { + background-color: #333; +} +.layout-dark .popover .picker-modal .picker-center-highlight:after, +.layout-dark .picker-modal.picker-modal-inline .picker-center-highlight:after { + background-color: #333; +} +.layout-dark .popover .picker-modal .picker-item.picker-selected, +.layout-dark .picker-modal.picker-modal-inline .picker-item.picker-selected { + color: #fff; +} +.layout-dark .popover .picker-modal .picker-calendar-week-days, +.layout-dark .picker-modal.picker-modal-inline .picker-calendar-week-days { + color: #fff; +} +.layout-dark .popover .picker-modal .picker-calendar-day, +.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day { + color: #fff; +} +.layout-dark .popover .picker-modal .picker-calendar-day.picker-calendar-day-prev, +.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day.picker-calendar-day-prev, +.layout-dark .popover .picker-modal .picker-calendar-day.picker-calendar-day-next, +.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day.picker-calendar-day-next { + color: #777; +} +.layout-dark .popover .picker-modal .picker-calendar-day.picker-calendar-day-disabled, +.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day.picker-calendar-day-disabled { + color: #555; +} +.layout-dark .popover .picker-modal .picker-calendar-day.picker-calendar-day-today span, +.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day.picker-calendar-day-today span { + background: #333; +} +.layout-dark .popover .picker-modal .picker-calendar-day.picker-calendar-day-has-events span:after, +.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day.picker-calendar-day-has-events span:after { + background: #555; +} +.layout-dark .popover .picker-modal .picker-calendar-week-days:after, +.layout-dark .picker-modal.picker-modal-inline .picker-calendar-week-days:after, +.layout-dark .popover .picker-modal .picker-calendar-row:after, +.layout-dark .picker-modal.picker-modal-inline .picker-calendar-row:after { + background-color: #333; +} +.layout-dark .popover .picker-modal .toolbar ~ .picker-modal-inner .picker-calendar-months:before, +.layout-dark .picker-modal.picker-modal-inline .toolbar ~ .picker-modal-inner .picker-calendar-months:before, +.layout-dark .popover .picker-modal .picker-calendar-week-days ~ .picker-calendar-months:before, +.layout-dark .picker-modal.picker-modal-inline .picker-calendar-week-days ~ .picker-calendar-months:before { + background-color: #333; +} +.layout-dark .popover .picker-modal .toolbar:after { + background-color: #333; +} +.layout-dark .photo-browser .navbar, +.layout-dark .views .view[data-page="photo-browser-slides"] .navbar, +.layout-dark .photo-browser .toolbar, +.layout-dark .views .view[data-page="photo-browser-slides"] .toolbar { + color: #000; + background: rgba(247, 247, 247, 0.95); +} +.layout-dark .photo-browser-dark .navbar, +.layout-dark .photo-browser-dark .toolbar { + background: rgba(30, 30, 30, 0.8); + color: #fff; +} +.layout-dark .tabbar a:not(.active) { + color: #fff; +} +.layout-dark .page, +.layout-dark .login-screen-content, +.page.layout-dark, +.layout-dark .panel, +.panel.layout-dark { + background-color: #222426; + color: #ddd; +} +.layout-dark .content-block-title { + color: #fff; +} +.layout-dark .content-block, +.content-block.layout-dark { + color: #bbb; +} +.layout-dark .content-block-inner { + background: #1c1d1f; + color: #ddd; +} +.layout-dark .content-block-inner:before { + background-color: #393939; +} +.layout-dark .content-block-inner:after { + background-color: #393939; +} +.layout-dark .list-block ul, +.list-block.layout-dark ul { + background: #1c1d1f; +} +.layout-dark .list-block ul:before, +.list-block.layout-dark ul:before { + background-color: #393939; +} +.layout-dark .list-block ul:after, +.list-block.layout-dark ul:after { + background-color: #393939; +} +.layout-dark .list-block.inset ul, +.list-block.layout-dark.inset ul { + background: #1c1d1f; +} +.layout-dark .list-block.notifications > ul, +.list-block.layout-dark.notifications > ul { + background: none; +} +.layout-dark .autocomplete-dropdown { + background: #1c1d1f; +} +.layout-dark .autocomplete-dropdown .list-block b { + color: #fff; +} +.layout-dark .card { + background: #1c1d1f; +} +.layout-dark .card-header:after { + background-color: #393939; +} +.layout-dark .card-footer { + color: #bbb; +} +.layout-dark .card-footer:before { + background-color: #393939; +} +.layout-dark .popover, +.popover.layout-dark { + background: rgba(0, 0, 0, 0.8); +} +.layout-dark .popover .popover-angle:after, +.popover.layout-dark .popover-angle:after { + background: rgba(0, 0, 0, 0.8); +} +.layout-dark .popover .list-block ul, +.popover.layout-dark .list-block ul { + background: none; +} +.layout-dark .actions-popover .list-block ul:before { + background-color: #393939; +} +.layout-dark .actions-popover .list-block ul:after { + background-color: #393939; +} +.layout-dark .actions-popover .actions-popover-label:after { + background-color: #393939; +} +.layout-dark li.sorting { + background-color: #29292f; +} +.layout-dark .swipeout-actions-left a, +.layout-dark .swipeout-actions-right a { + background-color: #444; +} +.layout-dark .item-inner:after, +.layout-dark .list-block ul ul li:last-child .item-inner:after { + background-color: #393939; +} +.layout-dark .item-after { + color: #bbb; +} +html:not(.watch-active-state) .layout-dark .item-link:active, +html:not(.watch-active-state) .layout-dark label.label-checkbox:active, +html:not(.watch-active-state) .layout-dark label.label-radio:active, +.layout-dark .item-link.active-state, +.layout-dark label.label-checkbox.active-state, +.layout-dark label.label-radio.active-state { + background-color: #29292f; +} +.layout-dark .item-link.list-button:after, +.layout-dark .list-button:after { + background-color: #393939; +} +.layout-dark .list-block-label { + color: #bbb; +} +.layout-dark .item-divider, +.layout-dark .list-group-title { + background: #1a1a1a; + color: #bbb; +} +.layout-dark .item-divider:before, +.layout-dark .list-group-title:before { + background-color: #393939; +} +.layout-dark .searchbar { + background: #333; +} +.layout-dark .searchbar:after { + background-color: #333; +} +.layout-dark .list-block input[type="text"], +.list-block.layout-dark input[type="text"], +.layout-dark .list-block input[type="password"], +.list-block.layout-dark input[type="password"], +.layout-dark .list-block input[type="email"], +.list-block.layout-dark input[type="email"], +.layout-dark .list-block input[type="tel"], +.list-block.layout-dark input[type="tel"], +.layout-dark .list-block input[type="url"], +.list-block.layout-dark input[type="url"], +.layout-dark .list-block input[type="date"], +.list-block.layout-dark input[type="date"], +.layout-dark .list-block input[type="datetime-local"], +.list-block.layout-dark input[type="datetime-local"], +.layout-dark .list-block input[type="number"], +.list-block.layout-dark input[type="number"], +.layout-dark .list-block select, +.list-block.layout-dark select, +.layout-dark .list-block textarea, +.list-block.layout-dark textarea { + color: #fff; +} +.layout-dark .label-switch .checkbox { + background-color: #393939; +} +.layout-dark .label-switch .checkbox:before { + background-color: #1c1d1f; +} +.layout-dark .range-slider input[type="range"]:after { + background: #1c1d1f; +} +.layout-dark .range-slider input[type="range"]::-ms-thumb { + border: none; +} +.layout-dark .timeline-item-inner { + background: #1c1d1f; +} +.layout-dark .timeline-item-divider { + background: rgba(255, 255, 255, 0.3); +} +.layout-dark .content-block-inner .timeline-item-inner { + border-color: #393939; +} +.layout-dark .timeline-item-time { + color: #8e8e93; +} +.layout-dark .timeline-horizontal .timeline-item-date { + background-color: #131313; +} +.layout-dark .timeline-horizontal .timeline-item-date:after { + background-color: #333; +} +.layout-dark .timeline-horizontal .timeline-item:after { + background-color: #333; +} +.layout-dark .timeline-year-title, +.layout-dark .timeline-month-title { + background-color: #131313; +} +.layout-dark .timeline-month .timeline-item:before { + background-color: #333; +} +.layout-dark .timeline-year:after { + background-color: #333; +} +.layout-dark .data-table tbody tr.data-table-row-selected { + background: rgba(255, 255, 255, 0.05); +} +.layout-dark .data-table tbody td:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #393939; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .layout-dark .data-table tbody td:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .layout-dark .data-table tbody td:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +html:not(.ios):not(.android) .layout-dark .data-table tbody tr:hover { + background: rgba(255, 255, 255, 0.05); +} +.layout-dark .data-table .sortable-cell:not(.numeric-cell):after, +.layout-dark .data-table .sortable-cell.numeric-cell:before { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23ffffff'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200h24v24H0V0z'%20fill%3D'none'%2F%3E%3Cpath%20d%3D'M20%2012l-1.41-1.41L13%2016.17V4h-2v12.17l-5.58-5.59L4%2012l8%208%208-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +@media (max-width: 480px) and (orientation: portrait) { + .layout-dark .data-table.data-table-collapsible tr:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #393939; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; + } + html.pixel-ratio-2 .layout-dark .data-table.data-table-collapsible tr:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + } + html.pixel-ratio-3 .layout-dark .data-table.data-table-collapsible tr:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); + } + .layout-dark .data-table.data-table-collapsible tr:hover { + background-color: inherit; + } +} +/* === White layout === */ +.layout-white .navbar, +.navbar.layout-white, +.layout-white .subnavbar, +.subnavbar.layout-white { + background-color: #fff; + color: #000; +} +.layout-white .navbar:after, +.navbar.layout-white:after, +.layout-white .subnavbar:after, +.subnavbar.layout-white:after { + background-color: #ddd; +} +.layout-white .toolbar, +.toolbar.layout-white { + background-color: #fff; + color: #000; +} +.layout-white .toolbar:before, +.toolbar.layout-white:before { + background-color: #ddd; +} +.layout-white .picker-modal .toolbar { + background-color: #fff; +} +.layout-white .popover .picker-modal .toolbar { + background: none; +} +.layout-white .popover .picker-modal .picker-center-highlight:before, +.layout-white .picker-modal.picker-modal-inline .picker-center-highlight:before { + background-color: #ddd; +} +.layout-white .popover .picker-modal .picker-center-highlight:after, +.layout-white .picker-modal.picker-modal-inline .picker-center-highlight:after { + background-color: #ddd; +} +.layout-white .popover .picker-modal .picker-calendar-week-days:after, +.layout-white .picker-modal.picker-modal-inline .picker-calendar-week-days:after, +.layout-white .popover .picker-modal .picker-calendar-row:after, +.layout-white .picker-modal.picker-modal-inline .picker-calendar-row:after { + background-color: #ddd; +} +.layout-white .popover .picker-modal .toolbar ~ .picker-modal-inner .picker-calendar-months:before, +.layout-white .picker-modal.picker-modal-inline .toolbar ~ .picker-modal-inner .picker-calendar-months:before, +.layout-white .popover .picker-modal .picker-calendar-week-days ~ .picker-calendar-months:before, +.layout-white .picker-modal.picker-modal-inline .picker-calendar-week-days ~ .picker-calendar-months:before { + background-color: #ddd; +} +.layout-white .popover .picker-modal .toolbar:after { + background-color: #ddd; +} +.layout-white .photo-browser .navbar, +.layout-white .views .view[data-page="photo-browser-slides"] .navbar, +.layout-white .photo-browser .toolbar, +.layout-white .views .view[data-page="photo-browser-slides"] .toolbar { + color: #000; + background: rgba(247, 247, 247, 0.95); +} +.layout-white .photo-browser-dark .navbar, +.layout-white .photo-browser-dark .toolbar { + background: rgba(30, 30, 30, 0.8); + color: #fff; +} +.layout-white .tabbar a:not(.active) { + color: #777; +} +.layout-white .page, +.layout-white .login-screen-content, +.page.layout-white, +.layout-white .panel, +.panel.layout-white { + background-color: #fff; + color: #000; +} +.layout-white .content-block-title { + color: #777; +} +.layout-white .content-block, +.content-block.layout-white { + color: #777; +} +.layout-white .content-block-inner { + background: #fafafa; + color: #000; +} +.layout-white .content-block-inner:after { + background-color: #ddd; +} +.layout-white .content-block-inner:before { + background-color: #ddd; +} +.layout-white .list-block ul, +.list-block.layout-white ul { + background: #fff; +} +.layout-white .list-block ul:after, +.list-block.layout-white ul:after { + background-color: #ddd; +} +.layout-white .list-block ul:before, +.list-block.layout-white ul:before { + background-color: #ddd; +} +.layout-white .list-block.inset ul, +.list-block.layout-white.inset ul { + background: #fafafa; +} +.layout-white .list-block.notifications > ul, +.list-block.layout-white.notifications > ul { + background: none; +} +.layout-white .popover-inner > .list-block ul { + background: none; +} +.layout-white li.sorting { + background-color: #eee; +} +.layout-white .swipeout-actions-left a, +.layout-white .swipeout-actions-right a { + background-color: #c7c7cc; +} +.layout-white .item-inner, +.layout-white .list-block ul ul li:last-child .item-inner { + border-color: #ddd; +} +.layout-white .item-inner:after, +.layout-white .list-block ul ul li:last-child .item-inner:after { + background-color: #ddd; +} +.layout-white .item-after { + color: #8e8e93; +} +html:not(.watch-active-state) .layout-white .item-link:active, +html:not(.watch-active-state) .layout-white label.label-checkbox:active, +html:not(.watch-active-state) .layout-white label.label-radio:active, +.layout-white .item-link.active-state, +.layout-white label.label-checkbox.active-state, +.layout-white label.label-radio.active-state { + background-color: #eee; +} +.layout-white .item-link.list-button:after, +.layout-white .list-button:after { + background-color: #ddd; +} +.layout-white .list-block-label { + color: #777; +} +.layout-white .item-divider, +.layout-white .list-group-title { + background: #f7f7f7; + color: #777; +} +.layout-white .item-divider:before, +.layout-white .list-group-title:before { + background-color: #ddd; +} +.layout-white .searchbar { + background: #c9c9ce; +} +.layout-white .searchbar:after { + background-color: #b4b4b4; +} +.layout-white .list-block input[type="text"], +.list-block.layout-white input[type="text"], +.layout-white .list-block input[type="password"], +.list-block.layout-white input[type="password"], +.layout-white .list-block input[type="email"], +.list-block.layout-white input[type="email"], +.layout-white .list-block input[type="tel"], +.list-block.layout-white input[type="tel"], +.layout-white .list-block input[type="url"], +.list-block.layout-white input[type="url"], +.layout-white .list-block input[type="date"], +.list-block.layout-white input[type="date"], +.layout-white .list-block input[type="datetime-local"], +.list-block.layout-white input[type="datetime-local"], +.layout-white .list-block input[type="number"], +.list-block.layout-white input[type="number"], +.layout-white .list-block select, +.list-block.layout-white select, +.layout-white .list-block textarea, +.list-block.layout-white textarea { + color: #777; +} +.layout-white .label-switch .checkbox { + background-color: #e5e5e5; +} +.layout-white .label-switch .checkbox:before { + background-color: #fff; +} +.layout-white .range-slider input[type="range"]:after { + background: #fff; +} +.layout-white .timeline-item-inner { + background: #fafafa; +} +.layout-white .content-block-inner .timeline-item-inner { + border-color: #ddd; +} +.layout-white .timeline-item-time { + color: #8e8e93; +} +.layout-white .timeline-horizontal .timeline-item-date { + background-color: #fff; +} +.layout-white .timeline-horizontal .timeline-item-date:after { + background-color: #ddd; +} +.layout-white .timeline-horizontal .timeline-item:after { + background-color: #ddd; +} +.layout-white .timeline-year-title, +.layout-white .timeline-month-title { + background-color: #fff; +} +.layout-white .timeline-month .timeline-item:before { + background-color: #ddd; +} +.layout-white .timeline-year:after { + background-color: #ddd; +} diff --git a/bower_components/framework7/dist/css/framework7.ios.colors.min.css b/bower_components/framework7/dist/css/framework7.ios.colors.min.css new file mode 100644 index 00000000..f530e3aa --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.ios.colors.min.css @@ -0,0 +1,15 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +.theme-gray .button:not(.button-fill){border-color:#8e8e93}.theme-gray .button:not(.button-fill).active-state,html:not(.watch-active-state) .theme-gray .button:not(.button-fill):active{background-color:rgba(142,142,147,.15)}.theme-gray .button:not(.button-fill).active{background-color:#8e8e93;color:#fff}.theme-gray .button.button-fill{background:#8e8e93;color:#fff}.progressbar.theme-gray span,.theme-gray .progressbar span{background-color:#8e8e93}.progressbar-infinite.theme-gray:before,.theme-gray .progressbar-infinite:before{background-color:#8e8e93}.theme-gray i.icon,i.icon.theme-gray{color:#8e8e93}.theme-gray i.icon-next,i.icon-next.color-gray,i.icon-next.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-gray i.icon-prev,i.icon-prev.color-gray,i.icon-prev.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-gray i.icon-back,i.icon-back.color-gray,i.icon-back.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E")}.theme-gray i.icon-forward,i.icon-forward.color-gray,i.icon-forward.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E")}.theme-gray i.icon-bars,i.icon-bars.color-gray,i.icon-bars.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E")}@media (-webkit-min-device-pixel-ratio:2){.theme-gray i.icon-bars,i.icon-bars.color-gray,i.icon-bars.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E")}}.theme-gray .item-link.list-button,.theme-gray .list-button,.theme-gray a{color:#8e8e93}.tabbar.theme-gray a,.tabbar.theme-gray a i,.theme-gray .tabbar a,.theme-gray .tabbar a i{color:inherit}.tabbar.theme-gray a.active,.tabbar.theme-gray a.active i,.theme-gray .tabbar a.active,.theme-gray .tabbar a.active i{color:#8e8e93}.theme-gray .messagebar .messagebar-send-link{background-color:#8e8e93}.form-checkbox.theme-gray input[type=checkbox]:checked~i,.theme-gray .form-checkbox input[type=checkbox]:checked~i,.theme-gray label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-gray label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-gray input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-gray input[type=radio]:checked+.item-media i.icon-form-checkbox{background-color:#8e8e93}.form-radio.theme-gray input[type=radio]:checked~i,.theme-gray .form-radio input[type=radio]:checked~i,.theme-gray label.label-radio input[type=checkbox]:checked~.item-inner,.theme-gray label.label-radio input[type=radio]:checked~.item-inner,label.label-radio.theme-gray input[type=checkbox]:checked~.item-inner,label.label-radio.theme-gray input[type=radio]:checked~.item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%238e8e93'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E")}.theme-gray .picker-calendar-day.picker-calendar-day-selected span{background-color:#8e8e93!important}.data-table.theme-gray .data-table-header-selected,.theme-gray .data-table .data-table-header-selected{background:rgba(142,142,147,.1)}.data-table.theme-gray .data-table-title-selected,.theme-gray .data-table .data-table-title-selected{color:#8e8e93}.swiper-pagination.color-gray .swiper-pagination-bullet-active,.theme-gray .swiper-pagination .swiper-pagination-bullet-active{background-color:#8e8e93}.swiper-pagination.color-gray .swiper-pagination-progressbar,.theme-gray .swiper-pagination .swiper-pagination-progressbar{background-color:#8e8e93}.swiper-pagination.swiper-pagination-progress.bg-gray{background-color:rgba(142,142,147,.25)}.swiper-button-next.color-gray,.swiper-container-rtl .swiper-button-prev.color-gray,.theme-gray .swiper-button-next,.theme-gray .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-gray,.swiper-container-rtl .swiper-button-next.color-gray,.theme-gray .swiper-button-prev,.theme-gray .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-gray,.speed-dial-buttons a.theme-gray,.theme-gray .floating-button,.theme-gray .speed-dial-buttons a{color:#fff;background:#8e8e93}.floating-button.theme-gray.active-state,.speed-dial-buttons a.theme-gray.active-state,.theme-gray .floating-button.active-state,.theme-gray .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-gray:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-gray:active,html:not(.watch-active-state) .theme-gray .floating-button:active,html:not(.watch-active-state) .theme-gray .speed-dial-buttons a:active{background:#79797f}.floating-button.theme-gray i,.speed-dial-buttons a.theme-gray i,.theme-gray .floating-button i,.theme-gray .speed-dial-buttons a i{color:inherit}.range-slider.theme-gray input[type=range]::-webkit-slider-thumb:before,.theme-gray .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#8e8e93}.range-slider.theme-gray input[type=range]::-ms-fill-lower,.theme-gray .range-slider input[type=range]::-ms-fill-lower{background-color:#8e8e93}.badge.theme-gray{background-color:#8e8e93;color:#fff}.theme-white .button:not(.button-fill){border-color:#fff}.theme-white .button:not(.button-fill).active-state,html:not(.watch-active-state) .theme-white .button:not(.button-fill):active{background-color:rgba(255,255,255,.15)}.theme-white .button:not(.button-fill).active{background-color:#fff;color:#fff}.theme-white .button.button-fill{background:#fff;color:#fff}.progressbar.theme-white span,.theme-white .progressbar span{background-color:#fff}.progressbar-infinite.theme-white:before,.theme-white .progressbar-infinite:before{background-color:#fff}.theme-white i.icon,i.icon.theme-white{color:#fff}.theme-white i.icon-next,i.icon-next.color-white,i.icon-next.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-white i.icon-prev,i.icon-prev.color-white,i.icon-prev.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-white i.icon-back,i.icon-back.color-white,i.icon-back.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.theme-white i.icon-forward,i.icon-forward.color-white,i.icon-forward.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.theme-white i.icon-bars,i.icon-bars.color-white,i.icon-bars.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E")}@media (-webkit-min-device-pixel-ratio:2){.theme-white i.icon-bars,i.icon-bars.color-white,i.icon-bars.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E")}}.theme-white .item-link.list-button,.theme-white .list-button,.theme-white a{color:#fff}.tabbar.theme-white a,.tabbar.theme-white a i,.theme-white .tabbar a,.theme-white .tabbar a i{color:inherit}.tabbar.theme-white a.active,.tabbar.theme-white a.active i,.theme-white .tabbar a.active,.theme-white .tabbar a.active i{color:#fff}.theme-white .messagebar .messagebar-send-link{background-color:#fff}.form-checkbox.theme-white input[type=checkbox]:checked~i,.theme-white .form-checkbox input[type=checkbox]:checked~i,.theme-white label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-white label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-white input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-white input[type=radio]:checked+.item-media i.icon-form-checkbox{background-color:#fff}.form-radio.theme-white input[type=radio]:checked~i,.theme-white .form-radio input[type=radio]:checked~i,.theme-white label.label-radio input[type=checkbox]:checked~.item-inner,.theme-white label.label-radio input[type=radio]:checked~.item-inner,label.label-radio.theme-white input[type=checkbox]:checked~.item-inner,label.label-radio.theme-white input[type=radio]:checked~.item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23ffffff'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E")}.theme-white .picker-calendar-day.picker-calendar-day-selected span{background-color:#fff!important}.data-table.theme-white .data-table-header-selected,.theme-white .data-table .data-table-header-selected{background:rgba(255,255,255,.1)}.data-table.theme-white .data-table-title-selected,.theme-white .data-table .data-table-title-selected{color:#fff}.swiper-pagination.color-white .swiper-pagination-bullet-active,.theme-white .swiper-pagination .swiper-pagination-bullet-active{background-color:#fff}.swiper-pagination.color-white .swiper-pagination-progressbar,.theme-white .swiper-pagination .swiper-pagination-progressbar{background-color:#fff}.swiper-pagination.swiper-pagination-progress.bg-white{background-color:rgba(255,255,255,.25)}.swiper-button-next.color-white,.swiper-container-rtl .swiper-button-prev.color-white,.theme-white .swiper-button-next,.theme-white .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-white,.swiper-container-rtl .swiper-button-next.color-white,.theme-white .swiper-button-prev,.theme-white .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-white,.speed-dial-buttons a.theme-white,.theme-white .floating-button,.theme-white .speed-dial-buttons a{color:#fff;background:#fff}.floating-button.theme-white.active-state,.speed-dial-buttons a.theme-white.active-state,.theme-white .floating-button.active-state,.theme-white .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-white:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-white:active,html:not(.watch-active-state) .theme-white .floating-button:active,html:not(.watch-active-state) .theme-white .speed-dial-buttons a:active{background:#ebebeb}.floating-button.theme-white i,.speed-dial-buttons a.theme-white i,.theme-white .floating-button i,.theme-white .speed-dial-buttons a i{color:inherit}.range-slider.theme-white input[type=range]::-webkit-slider-thumb:before,.theme-white .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#fff}.range-slider.theme-white input[type=range]::-ms-fill-lower,.theme-white .range-slider input[type=range]::-ms-fill-lower{background-color:#fff}.badge.theme-white{background-color:#fff;color:#fff}.theme-black .button:not(.button-fill){border-color:#000}.theme-black .button:not(.button-fill).active-state,html:not(.watch-active-state) .theme-black .button:not(.button-fill):active{background-color:rgba(0,0,0,.15)}.theme-black .button:not(.button-fill).active{background-color:#000;color:#fff}.theme-black .button.button-fill{background:#000;color:#fff}.progressbar.theme-black span,.theme-black .progressbar span{background-color:#000}.progressbar-infinite.theme-black:before,.theme-black .progressbar-infinite:before{background-color:#000}.theme-black i.icon,i.icon.theme-black{color:#000}.theme-black i.icon-next,i.icon-next.color-black,i.icon-next.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-black i.icon-prev,i.icon-prev.color-black,i.icon-prev.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-black i.icon-back,i.icon-back.color-black,i.icon-back.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.theme-black i.icon-forward,i.icon-forward.color-black,i.icon-forward.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.theme-black i.icon-bars,i.icon-bars.color-black,i.icon-bars.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E")}@media (-webkit-min-device-pixel-ratio:2){.theme-black i.icon-bars,i.icon-bars.color-black,i.icon-bars.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E")}}.theme-black .item-link.list-button,.theme-black .list-button,.theme-black a{color:#000}.tabbar.theme-black a,.tabbar.theme-black a i,.theme-black .tabbar a,.theme-black .tabbar a i{color:inherit}.tabbar.theme-black a.active,.tabbar.theme-black a.active i,.theme-black .tabbar a.active,.theme-black .tabbar a.active i{color:#000}.theme-black .messagebar .messagebar-send-link{background-color:#000}.form-checkbox.theme-black input[type=checkbox]:checked~i,.theme-black .form-checkbox input[type=checkbox]:checked~i,.theme-black label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-black label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-black input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-black input[type=radio]:checked+.item-media i.icon-form-checkbox{background-color:#000}.form-radio.theme-black input[type=radio]:checked~i,.theme-black .form-radio input[type=radio]:checked~i,.theme-black label.label-radio input[type=checkbox]:checked~.item-inner,.theme-black label.label-radio input[type=radio]:checked~.item-inner,label.label-radio.theme-black input[type=checkbox]:checked~.item-inner,label.label-radio.theme-black input[type=radio]:checked~.item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23000000'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E")}.theme-black .picker-calendar-day.picker-calendar-day-selected span{background-color:#000!important}.data-table.theme-black .data-table-header-selected,.theme-black .data-table .data-table-header-selected{background:rgba(0,0,0,.1)}.data-table.theme-black .data-table-title-selected,.theme-black .data-table .data-table-title-selected{color:#000}.swiper-pagination.color-black .swiper-pagination-bullet-active,.theme-black .swiper-pagination .swiper-pagination-bullet-active{background-color:#000}.swiper-pagination.color-black .swiper-pagination-progressbar,.theme-black .swiper-pagination .swiper-pagination-progressbar{background-color:#000}.swiper-pagination.swiper-pagination-progress.bg-black{background-color:rgba(0,0,0,.25)}.swiper-button-next.color-black,.swiper-container-rtl .swiper-button-prev.color-black,.theme-black .swiper-button-next,.theme-black .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-black,.swiper-container-rtl .swiper-button-next.color-black,.theme-black .swiper-button-prev,.theme-black .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-black,.speed-dial-buttons a.theme-black,.theme-black .floating-button,.theme-black .speed-dial-buttons a{color:#fff;background:#000}.floating-button.theme-black.active-state,.speed-dial-buttons a.theme-black.active-state,.theme-black .floating-button.active-state,.theme-black .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-black:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-black:active,html:not(.watch-active-state) .theme-black .floating-button:active,html:not(.watch-active-state) .theme-black .speed-dial-buttons a:active{background:#000}.floating-button.theme-black i,.speed-dial-buttons a.theme-black i,.theme-black .floating-button i,.theme-black .speed-dial-buttons a i{color:inherit}.range-slider.theme-black input[type=range]::-webkit-slider-thumb:before,.theme-black .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#000}.range-slider.theme-black input[type=range]::-ms-fill-lower,.theme-black .range-slider input[type=range]::-ms-fill-lower{background-color:#000}.badge.theme-black{background-color:#000;color:#fff}.theme-lightblue .button:not(.button-fill){border-color:#5ac8fa}.theme-lightblue .button:not(.button-fill).active-state,html:not(.watch-active-state) .theme-lightblue .button:not(.button-fill):active{background-color:rgba(90,200,250,.15)}.theme-lightblue .button:not(.button-fill).active{background-color:#5ac8fa;color:#fff}.theme-lightblue .button.button-fill{background:#5ac8fa;color:#fff}.progressbar.theme-lightblue span,.theme-lightblue .progressbar span{background-color:#5ac8fa}.progressbar-infinite.theme-lightblue:before,.theme-lightblue .progressbar-infinite:before{background-color:#5ac8fa}.theme-lightblue i.icon,i.icon.theme-lightblue{color:#5ac8fa}.theme-lightblue i.icon-next,i.icon-next.color-lightblue,i.icon-next.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-lightblue i.icon-prev,i.icon-prev.color-lightblue,i.icon-prev.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-lightblue i.icon-back,i.icon-back.color-lightblue,i.icon-back.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E")}.theme-lightblue i.icon-forward,i.icon-forward.color-lightblue,i.icon-forward.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E")}.theme-lightblue i.icon-bars,i.icon-bars.color-lightblue,i.icon-bars.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E")}@media (-webkit-min-device-pixel-ratio:2){.theme-lightblue i.icon-bars,i.icon-bars.color-lightblue,i.icon-bars.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E")}}.theme-lightblue .item-link.list-button,.theme-lightblue .list-button,.theme-lightblue a{color:#5ac8fa}.tabbar.theme-lightblue a,.tabbar.theme-lightblue a i,.theme-lightblue .tabbar a,.theme-lightblue .tabbar a i{color:inherit}.tabbar.theme-lightblue a.active,.tabbar.theme-lightblue a.active i,.theme-lightblue .tabbar a.active,.theme-lightblue .tabbar a.active i{color:#5ac8fa}.theme-lightblue .messagebar .messagebar-send-link{background-color:#5ac8fa}.form-checkbox.theme-lightblue input[type=checkbox]:checked~i,.theme-lightblue .form-checkbox input[type=checkbox]:checked~i,.theme-lightblue label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-lightblue label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-lightblue input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-lightblue input[type=radio]:checked+.item-media i.icon-form-checkbox{background-color:#5ac8fa}.form-radio.theme-lightblue input[type=radio]:checked~i,.theme-lightblue .form-radio input[type=radio]:checked~i,.theme-lightblue label.label-radio input[type=checkbox]:checked~.item-inner,.theme-lightblue label.label-radio input[type=radio]:checked~.item-inner,label.label-radio.theme-lightblue input[type=checkbox]:checked~.item-inner,label.label-radio.theme-lightblue input[type=radio]:checked~.item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%235ac8fa'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E")}.theme-lightblue .picker-calendar-day.picker-calendar-day-selected span{background-color:#5ac8fa!important}.data-table.theme-lightblue .data-table-header-selected,.theme-lightblue .data-table .data-table-header-selected{background:rgba(90,200,250,.1)}.data-table.theme-lightblue .data-table-title-selected,.theme-lightblue .data-table .data-table-title-selected{color:#5ac8fa}.swiper-pagination.color-lightblue .swiper-pagination-bullet-active,.theme-lightblue .swiper-pagination .swiper-pagination-bullet-active{background-color:#5ac8fa}.swiper-pagination.color-lightblue .swiper-pagination-progressbar,.theme-lightblue .swiper-pagination .swiper-pagination-progressbar{background-color:#5ac8fa}.swiper-pagination.swiper-pagination-progress.bg-lightblue{background-color:rgba(90,200,250,.25)}.swiper-button-next.color-lightblue,.swiper-container-rtl .swiper-button-prev.color-lightblue,.theme-lightblue .swiper-button-next,.theme-lightblue .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-lightblue,.swiper-container-rtl .swiper-button-next.color-lightblue,.theme-lightblue .swiper-button-prev,.theme-lightblue .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-lightblue,.speed-dial-buttons a.theme-lightblue,.theme-lightblue .floating-button,.theme-lightblue .speed-dial-buttons a{color:#fff;background:#5ac8fa}.floating-button.theme-lightblue.active-state,.speed-dial-buttons a.theme-lightblue.active-state,.theme-lightblue .floating-button.active-state,.theme-lightblue .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-lightblue:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-lightblue:active,html:not(.watch-active-state) .theme-lightblue .floating-button:active,html:not(.watch-active-state) .theme-lightblue .speed-dial-buttons a:active{background:#32bbf9}.floating-button.theme-lightblue i,.speed-dial-buttons a.theme-lightblue i,.theme-lightblue .floating-button i,.theme-lightblue .speed-dial-buttons a i{color:inherit}.range-slider.theme-lightblue input[type=range]::-webkit-slider-thumb:before,.theme-lightblue .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#5ac8fa}.range-slider.theme-lightblue input[type=range]::-ms-fill-lower,.theme-lightblue .range-slider input[type=range]::-ms-fill-lower{background-color:#5ac8fa}.badge.theme-lightblue{background-color:#5ac8fa;color:#fff}.theme-yellow .button:not(.button-fill){border-color:#fc0}.theme-yellow .button:not(.button-fill).active-state,html:not(.watch-active-state) .theme-yellow .button:not(.button-fill):active{background-color:rgba(255,204,0,.15)}.theme-yellow .button:not(.button-fill).active{background-color:#fc0;color:#fff}.theme-yellow .button.button-fill{background:#fc0;color:#fff}.progressbar.theme-yellow span,.theme-yellow .progressbar span{background-color:#fc0}.progressbar-infinite.theme-yellow:before,.theme-yellow .progressbar-infinite:before{background-color:#fc0}.theme-yellow i.icon,i.icon.theme-yellow{color:#fc0}.theme-yellow i.icon-next,i.icon-next.color-yellow,i.icon-next.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-yellow i.icon-prev,i.icon-prev.color-yellow,i.icon-prev.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-yellow i.icon-back,i.icon-back.color-yellow,i.icon-back.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E")}.theme-yellow i.icon-forward,i.icon-forward.color-yellow,i.icon-forward.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E")}.theme-yellow i.icon-bars,i.icon-bars.color-yellow,i.icon-bars.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E")}@media (-webkit-min-device-pixel-ratio:2){.theme-yellow i.icon-bars,i.icon-bars.color-yellow,i.icon-bars.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E")}}.theme-yellow .item-link.list-button,.theme-yellow .list-button,.theme-yellow a{color:#fc0}.tabbar.theme-yellow a,.tabbar.theme-yellow a i,.theme-yellow .tabbar a,.theme-yellow .tabbar a i{color:inherit}.tabbar.theme-yellow a.active,.tabbar.theme-yellow a.active i,.theme-yellow .tabbar a.active,.theme-yellow .tabbar a.active i{color:#fc0}.theme-yellow .messagebar .messagebar-send-link{background-color:#fc0}.form-checkbox.theme-yellow input[type=checkbox]:checked~i,.theme-yellow .form-checkbox input[type=checkbox]:checked~i,.theme-yellow label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-yellow label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-yellow input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-yellow input[type=radio]:checked+.item-media i.icon-form-checkbox{background-color:#fc0}.form-radio.theme-yellow input[type=radio]:checked~i,.theme-yellow .form-radio input[type=radio]:checked~i,.theme-yellow label.label-radio input[type=checkbox]:checked~.item-inner,.theme-yellow label.label-radio input[type=radio]:checked~.item-inner,label.label-radio.theme-yellow input[type=checkbox]:checked~.item-inner,label.label-radio.theme-yellow input[type=radio]:checked~.item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23ffcc00'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E")}.theme-yellow .picker-calendar-day.picker-calendar-day-selected span{background-color:#fc0!important}.data-table.theme-yellow .data-table-header-selected,.theme-yellow .data-table .data-table-header-selected{background:rgba(255,204,0,.1)}.data-table.theme-yellow .data-table-title-selected,.theme-yellow .data-table .data-table-title-selected{color:#fc0}.swiper-pagination.color-yellow .swiper-pagination-bullet-active,.theme-yellow .swiper-pagination .swiper-pagination-bullet-active{background-color:#fc0}.swiper-pagination.color-yellow .swiper-pagination-progressbar,.theme-yellow .swiper-pagination .swiper-pagination-progressbar{background-color:#fc0}.swiper-pagination.swiper-pagination-progress.bg-yellow{background-color:rgba(255,204,0,.25)}.swiper-button-next.color-yellow,.swiper-container-rtl .swiper-button-prev.color-yellow,.theme-yellow .swiper-button-next,.theme-yellow .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-yellow,.swiper-container-rtl .swiper-button-next.color-yellow,.theme-yellow .swiper-button-prev,.theme-yellow .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-yellow,.speed-dial-buttons a.theme-yellow,.theme-yellow .floating-button,.theme-yellow .speed-dial-buttons a{color:#fff;background:#fc0}.floating-button.theme-yellow.active-state,.speed-dial-buttons a.theme-yellow.active-state,.theme-yellow .floating-button.active-state,.theme-yellow .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-yellow:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-yellow:active,html:not(.watch-active-state) .theme-yellow .floating-button:active,html:not(.watch-active-state) .theme-yellow .speed-dial-buttons a:active{background:#d6ab00}.floating-button.theme-yellow i,.speed-dial-buttons a.theme-yellow i,.theme-yellow .floating-button i,.theme-yellow .speed-dial-buttons a i{color:inherit}.range-slider.theme-yellow input[type=range]::-webkit-slider-thumb:before,.theme-yellow .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#fc0}.range-slider.theme-yellow input[type=range]::-ms-fill-lower,.theme-yellow .range-slider input[type=range]::-ms-fill-lower{background-color:#fc0}.badge.theme-yellow{background-color:#fc0;color:#fff}.theme-orange .button:not(.button-fill){border-color:#ff9500}.theme-orange .button:not(.button-fill).active-state,html:not(.watch-active-state) .theme-orange .button:not(.button-fill):active{background-color:rgba(255,149,0,.15)}.theme-orange .button:not(.button-fill).active{background-color:#ff9500;color:#fff}.theme-orange .button.button-fill{background:#ff9500;color:#fff}.progressbar.theme-orange span,.theme-orange .progressbar span{background-color:#ff9500}.progressbar-infinite.theme-orange:before,.theme-orange .progressbar-infinite:before{background-color:#ff9500}.theme-orange i.icon,i.icon.theme-orange{color:#ff9500}.theme-orange i.icon-next,i.icon-next.color-orange,i.icon-next.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-orange i.icon-prev,i.icon-prev.color-orange,i.icon-prev.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-orange i.icon-back,i.icon-back.color-orange,i.icon-back.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E")}.theme-orange i.icon-forward,i.icon-forward.color-orange,i.icon-forward.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E")}.theme-orange i.icon-bars,i.icon-bars.color-orange,i.icon-bars.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E")}@media (-webkit-min-device-pixel-ratio:2){.theme-orange i.icon-bars,i.icon-bars.color-orange,i.icon-bars.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E")}}.theme-orange .item-link.list-button,.theme-orange .list-button,.theme-orange a{color:#ff9500}.tabbar.theme-orange a,.tabbar.theme-orange a i,.theme-orange .tabbar a,.theme-orange .tabbar a i{color:inherit}.tabbar.theme-orange a.active,.tabbar.theme-orange a.active i,.theme-orange .tabbar a.active,.theme-orange .tabbar a.active i{color:#ff9500}.theme-orange .messagebar .messagebar-send-link{background-color:#ff9500}.form-checkbox.theme-orange input[type=checkbox]:checked~i,.theme-orange .form-checkbox input[type=checkbox]:checked~i,.theme-orange label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-orange label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-orange input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-orange input[type=radio]:checked+.item-media i.icon-form-checkbox{background-color:#ff9500}.form-radio.theme-orange input[type=radio]:checked~i,.theme-orange .form-radio input[type=radio]:checked~i,.theme-orange label.label-radio input[type=checkbox]:checked~.item-inner,.theme-orange label.label-radio input[type=radio]:checked~.item-inner,label.label-radio.theme-orange input[type=checkbox]:checked~.item-inner,label.label-radio.theme-orange input[type=radio]:checked~.item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23ff9500'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E")}.theme-orange .picker-calendar-day.picker-calendar-day-selected span{background-color:#ff9500!important}.data-table.theme-orange .data-table-header-selected,.theme-orange .data-table .data-table-header-selected{background:rgba(255,149,0,.1)}.data-table.theme-orange .data-table-title-selected,.theme-orange .data-table .data-table-title-selected{color:#ff9500}.swiper-pagination.color-orange .swiper-pagination-bullet-active,.theme-orange .swiper-pagination .swiper-pagination-bullet-active{background-color:#ff9500}.swiper-pagination.color-orange .swiper-pagination-progressbar,.theme-orange .swiper-pagination .swiper-pagination-progressbar{background-color:#ff9500}.swiper-pagination.swiper-pagination-progress.bg-orange{background-color:rgba(255,149,0,.25)}.swiper-button-next.color-orange,.swiper-container-rtl .swiper-button-prev.color-orange,.theme-orange .swiper-button-next,.theme-orange .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-orange,.swiper-container-rtl .swiper-button-next.color-orange,.theme-orange .swiper-button-prev,.theme-orange .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-orange,.speed-dial-buttons a.theme-orange,.theme-orange .floating-button,.theme-orange .speed-dial-buttons a{color:#fff;background:#ff9500}.floating-button.theme-orange.active-state,.speed-dial-buttons a.theme-orange.active-state,.theme-orange .floating-button.active-state,.theme-orange .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-orange:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-orange:active,html:not(.watch-active-state) .theme-orange .floating-button:active,html:not(.watch-active-state) .theme-orange .speed-dial-buttons a:active{background:#d67d00}.floating-button.theme-orange i,.speed-dial-buttons a.theme-orange i,.theme-orange .floating-button i,.theme-orange .speed-dial-buttons a i{color:inherit}.range-slider.theme-orange input[type=range]::-webkit-slider-thumb:before,.theme-orange .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#ff9500}.range-slider.theme-orange input[type=range]::-ms-fill-lower,.theme-orange .range-slider input[type=range]::-ms-fill-lower{background-color:#ff9500}.badge.theme-orange{background-color:#ff9500;color:#fff}.theme-pink .button:not(.button-fill){border-color:#ff2d55}.theme-pink .button:not(.button-fill).active-state,html:not(.watch-active-state) .theme-pink .button:not(.button-fill):active{background-color:rgba(255,45,85,.15)}.theme-pink .button:not(.button-fill).active{background-color:#ff2d55;color:#fff}.theme-pink .button.button-fill{background:#ff2d55;color:#fff}.progressbar.theme-pink span,.theme-pink .progressbar span{background-color:#ff2d55}.progressbar-infinite.theme-pink:before,.theme-pink .progressbar-infinite:before{background-color:#ff2d55}.theme-pink i.icon,i.icon.theme-pink{color:#ff2d55}.theme-pink i.icon-next,i.icon-next.color-pink,i.icon-next.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-pink i.icon-prev,i.icon-prev.color-pink,i.icon-prev.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-pink i.icon-back,i.icon-back.color-pink,i.icon-back.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E")}.theme-pink i.icon-forward,i.icon-forward.color-pink,i.icon-forward.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E")}.theme-pink i.icon-bars,i.icon-bars.color-pink,i.icon-bars.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E")}@media (-webkit-min-device-pixel-ratio:2){.theme-pink i.icon-bars,i.icon-bars.color-pink,i.icon-bars.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E")}}.theme-pink .item-link.list-button,.theme-pink .list-button,.theme-pink a{color:#ff2d55}.tabbar.theme-pink a,.tabbar.theme-pink a i,.theme-pink .tabbar a,.theme-pink .tabbar a i{color:inherit}.tabbar.theme-pink a.active,.tabbar.theme-pink a.active i,.theme-pink .tabbar a.active,.theme-pink .tabbar a.active i{color:#ff2d55}.theme-pink .messagebar .messagebar-send-link{background-color:#ff2d55}.form-checkbox.theme-pink input[type=checkbox]:checked~i,.theme-pink .form-checkbox input[type=checkbox]:checked~i,.theme-pink label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-pink label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-pink input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-pink input[type=radio]:checked+.item-media i.icon-form-checkbox{background-color:#ff2d55}.form-radio.theme-pink input[type=radio]:checked~i,.theme-pink .form-radio input[type=radio]:checked~i,.theme-pink label.label-radio input[type=checkbox]:checked~.item-inner,.theme-pink label.label-radio input[type=radio]:checked~.item-inner,label.label-radio.theme-pink input[type=checkbox]:checked~.item-inner,label.label-radio.theme-pink input[type=radio]:checked~.item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23ff2d55'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E")}.theme-pink .picker-calendar-day.picker-calendar-day-selected span{background-color:#ff2d55!important}.data-table.theme-pink .data-table-header-selected,.theme-pink .data-table .data-table-header-selected{background:rgba(255,45,85,.1)}.data-table.theme-pink .data-table-title-selected,.theme-pink .data-table .data-table-title-selected{color:#ff2d55}.swiper-pagination.color-pink .swiper-pagination-bullet-active,.theme-pink .swiper-pagination .swiper-pagination-bullet-active{background-color:#ff2d55}.swiper-pagination.color-pink .swiper-pagination-progressbar,.theme-pink .swiper-pagination .swiper-pagination-progressbar{background-color:#ff2d55}.swiper-pagination.swiper-pagination-progress.bg-pink{background-color:rgba(255,45,85,.25)}.swiper-button-next.color-pink,.swiper-container-rtl .swiper-button-prev.color-pink,.theme-pink .swiper-button-next,.theme-pink .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-pink,.swiper-container-rtl .swiper-button-next.color-pink,.theme-pink .swiper-button-prev,.theme-pink .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-pink,.speed-dial-buttons a.theme-pink,.theme-pink .floating-button,.theme-pink .speed-dial-buttons a{color:#fff;background:#ff2d55}.floating-button.theme-pink.active-state,.speed-dial-buttons a.theme-pink.active-state,.theme-pink .floating-button.active-state,.theme-pink .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-pink:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-pink:active,html:not(.watch-active-state) .theme-pink .floating-button:active,html:not(.watch-active-state) .theme-pink .speed-dial-buttons a:active{background:#ff0434}.floating-button.theme-pink i,.speed-dial-buttons a.theme-pink i,.theme-pink .floating-button i,.theme-pink .speed-dial-buttons a i{color:inherit}.range-slider.theme-pink input[type=range]::-webkit-slider-thumb:before,.theme-pink .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#ff2d55}.range-slider.theme-pink input[type=range]::-ms-fill-lower,.theme-pink .range-slider input[type=range]::-ms-fill-lower{background-color:#ff2d55}.badge.theme-pink{background-color:#ff2d55;color:#fff}.theme-blue .button:not(.button-fill){border-color:#007aff}.theme-blue .button:not(.button-fill).active-state,html:not(.watch-active-state) .theme-blue .button:not(.button-fill):active{background-color:rgba(0,122,255,.15)}.theme-blue .button:not(.button-fill).active{background-color:#007aff;color:#fff}.theme-blue .button.button-fill{background:#007aff;color:#fff}.progressbar.theme-blue span,.theme-blue .progressbar span{background-color:#007aff}.progressbar-infinite.theme-blue:before,.theme-blue .progressbar-infinite:before{background-color:#007aff}.theme-blue i.icon,i.icon.theme-blue{color:#007aff}.theme-blue i.icon-next,i.icon-next.color-blue,i.icon-next.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-blue i.icon-prev,i.icon-prev.color-blue,i.icon-prev.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-blue i.icon-back,i.icon-back.color-blue,i.icon-back.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E")}.theme-blue i.icon-forward,i.icon-forward.color-blue,i.icon-forward.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E")}.theme-blue i.icon-bars,i.icon-bars.color-blue,i.icon-bars.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E")}@media (-webkit-min-device-pixel-ratio:2){.theme-blue i.icon-bars,i.icon-bars.color-blue,i.icon-bars.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E")}}.theme-blue .item-link.list-button,.theme-blue .list-button,.theme-blue a{color:#007aff}.tabbar.theme-blue a,.tabbar.theme-blue a i,.theme-blue .tabbar a,.theme-blue .tabbar a i{color:inherit}.tabbar.theme-blue a.active,.tabbar.theme-blue a.active i,.theme-blue .tabbar a.active,.theme-blue .tabbar a.active i{color:#007aff}.theme-blue .messagebar .messagebar-send-link{background-color:#007aff}.form-checkbox.theme-blue input[type=checkbox]:checked~i,.theme-blue .form-checkbox input[type=checkbox]:checked~i,.theme-blue label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-blue label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-blue input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-blue input[type=radio]:checked+.item-media i.icon-form-checkbox{background-color:#007aff}.form-radio.theme-blue input[type=radio]:checked~i,.theme-blue .form-radio input[type=radio]:checked~i,.theme-blue label.label-radio input[type=checkbox]:checked~.item-inner,.theme-blue label.label-radio input[type=radio]:checked~.item-inner,label.label-radio.theme-blue input[type=checkbox]:checked~.item-inner,label.label-radio.theme-blue input[type=radio]:checked~.item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23007aff'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E")}.theme-blue .picker-calendar-day.picker-calendar-day-selected span{background-color:#007aff!important}.data-table.theme-blue .data-table-header-selected,.theme-blue .data-table .data-table-header-selected{background:rgba(0,122,255,.1)}.data-table.theme-blue .data-table-title-selected,.theme-blue .data-table .data-table-title-selected{color:#007aff}.swiper-pagination.color-blue .swiper-pagination-bullet-active,.theme-blue .swiper-pagination .swiper-pagination-bullet-active{background-color:#007aff}.swiper-pagination.color-blue .swiper-pagination-progressbar,.theme-blue .swiper-pagination .swiper-pagination-progressbar{background-color:#007aff}.swiper-pagination.swiper-pagination-progress.bg-blue{background-color:rgba(0,122,255,.25)}.swiper-button-next.color-blue,.swiper-container-rtl .swiper-button-prev.color-blue,.theme-blue .swiper-button-next,.theme-blue .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-blue,.swiper-container-rtl .swiper-button-next.color-blue,.theme-blue .swiper-button-prev,.theme-blue .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-blue,.speed-dial-buttons a.theme-blue,.theme-blue .floating-button,.theme-blue .speed-dial-buttons a{color:#fff;background:#007aff}.floating-button.theme-blue.active-state,.speed-dial-buttons a.theme-blue.active-state,.theme-blue .floating-button.active-state,.theme-blue .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-blue:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-blue:active,html:not(.watch-active-state) .theme-blue .floating-button:active,html:not(.watch-active-state) .theme-blue .speed-dial-buttons a:active{background:#0066d6}.floating-button.theme-blue i,.speed-dial-buttons a.theme-blue i,.theme-blue .floating-button i,.theme-blue .speed-dial-buttons a i{color:inherit}.range-slider.theme-blue input[type=range]::-webkit-slider-thumb:before,.theme-blue .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#007aff}.range-slider.theme-blue input[type=range]::-ms-fill-lower,.theme-blue .range-slider input[type=range]::-ms-fill-lower{background-color:#007aff}.badge.theme-blue{background-color:#007aff;color:#fff}.theme-green .button:not(.button-fill){border-color:#4cd964}.theme-green .button:not(.button-fill).active-state,html:not(.watch-active-state) .theme-green .button:not(.button-fill):active{background-color:rgba(76,217,100,.15)}.theme-green .button:not(.button-fill).active{background-color:#4cd964;color:#fff}.theme-green .button.button-fill{background:#4cd964;color:#fff}.progressbar.theme-green span,.theme-green .progressbar span{background-color:#4cd964}.progressbar-infinite.theme-green:before,.theme-green .progressbar-infinite:before{background-color:#4cd964}.theme-green i.icon,i.icon.theme-green{color:#4cd964}.theme-green i.icon-next,i.icon-next.color-green,i.icon-next.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-green i.icon-prev,i.icon-prev.color-green,i.icon-prev.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-green i.icon-back,i.icon-back.color-green,i.icon-back.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E")}.theme-green i.icon-forward,i.icon-forward.color-green,i.icon-forward.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E")}.theme-green i.icon-bars,i.icon-bars.color-green,i.icon-bars.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E")}@media (-webkit-min-device-pixel-ratio:2){.theme-green i.icon-bars,i.icon-bars.color-green,i.icon-bars.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E")}}.theme-green .item-link.list-button,.theme-green .list-button,.theme-green a{color:#4cd964}.tabbar.theme-green a,.tabbar.theme-green a i,.theme-green .tabbar a,.theme-green .tabbar a i{color:inherit}.tabbar.theme-green a.active,.tabbar.theme-green a.active i,.theme-green .tabbar a.active,.theme-green .tabbar a.active i{color:#4cd964}.theme-green .messagebar .messagebar-send-link{background-color:#4cd964}.form-checkbox.theme-green input[type=checkbox]:checked~i,.theme-green .form-checkbox input[type=checkbox]:checked~i,.theme-green label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-green label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-green input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-green input[type=radio]:checked+.item-media i.icon-form-checkbox{background-color:#4cd964}.form-radio.theme-green input[type=radio]:checked~i,.theme-green .form-radio input[type=radio]:checked~i,.theme-green label.label-radio input[type=checkbox]:checked~.item-inner,.theme-green label.label-radio input[type=radio]:checked~.item-inner,label.label-radio.theme-green input[type=checkbox]:checked~.item-inner,label.label-radio.theme-green input[type=radio]:checked~.item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%234cd964'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E")}.theme-green .picker-calendar-day.picker-calendar-day-selected span{background-color:#4cd964!important}.data-table.theme-green .data-table-header-selected,.theme-green .data-table .data-table-header-selected{background:rgba(76,217,100,.1)}.data-table.theme-green .data-table-title-selected,.theme-green .data-table .data-table-title-selected{color:#4cd964}.swiper-pagination.color-green .swiper-pagination-bullet-active,.theme-green .swiper-pagination .swiper-pagination-bullet-active{background-color:#4cd964}.swiper-pagination.color-green .swiper-pagination-progressbar,.theme-green .swiper-pagination .swiper-pagination-progressbar{background-color:#4cd964}.swiper-pagination.swiper-pagination-progress.bg-green{background-color:rgba(76,217,100,.25)}.swiper-button-next.color-green,.swiper-container-rtl .swiper-button-prev.color-green,.theme-green .swiper-button-next,.theme-green .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-green,.swiper-container-rtl .swiper-button-next.color-green,.theme-green .swiper-button-prev,.theme-green .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-green,.speed-dial-buttons a.theme-green,.theme-green .floating-button,.theme-green .speed-dial-buttons a{color:#fff;background:#4cd964}.floating-button.theme-green.active-state,.speed-dial-buttons a.theme-green.active-state,.theme-green .floating-button.active-state,.theme-green .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-green:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-green:active,html:not(.watch-active-state) .theme-green .floating-button:active,html:not(.watch-active-state) .theme-green .speed-dial-buttons a:active{background:#2cd048}.floating-button.theme-green i,.speed-dial-buttons a.theme-green i,.theme-green .floating-button i,.theme-green .speed-dial-buttons a i{color:inherit}.range-slider.theme-green input[type=range]::-webkit-slider-thumb:before,.theme-green .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#4cd964}.range-slider.theme-green input[type=range]::-ms-fill-lower,.theme-green .range-slider input[type=range]::-ms-fill-lower{background-color:#4cd964}.badge.theme-green{background-color:#4cd964;color:#fff}.theme-red .button:not(.button-fill){border-color:#ff3b30}.theme-red .button:not(.button-fill).active-state,html:not(.watch-active-state) .theme-red .button:not(.button-fill):active{background-color:rgba(255,59,48,.15)}.theme-red .button:not(.button-fill).active{background-color:#ff3b30;color:#fff}.theme-red .button.button-fill{background:#ff3b30;color:#fff}.progressbar.theme-red span,.theme-red .progressbar span{background-color:#ff3b30}.progressbar-infinite.theme-red:before,.theme-red .progressbar-infinite:before{background-color:#ff3b30}.theme-red i.icon,i.icon.theme-red{color:#ff3b30}.theme-red i.icon-next,i.icon-next.color-red,i.icon-next.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-red i.icon-prev,i.icon-prev.color-red,i.icon-prev.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-red i.icon-back,i.icon-back.color-red,i.icon-back.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E")}.theme-red i.icon-forward,i.icon-forward.color-red,i.icon-forward.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E")}.theme-red i.icon-bars,i.icon-bars.color-red,i.icon-bars.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E")}@media (-webkit-min-device-pixel-ratio:2){.theme-red i.icon-bars,i.icon-bars.color-red,i.icon-bars.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E")}}.theme-red .item-link.list-button,.theme-red .list-button,.theme-red a{color:#ff3b30}.tabbar.theme-red a,.tabbar.theme-red a i,.theme-red .tabbar a,.theme-red .tabbar a i{color:inherit}.tabbar.theme-red a.active,.tabbar.theme-red a.active i,.theme-red .tabbar a.active,.theme-red .tabbar a.active i{color:#ff3b30}.theme-red .messagebar .messagebar-send-link{background-color:#ff3b30}.form-checkbox.theme-red input[type=checkbox]:checked~i,.theme-red .form-checkbox input[type=checkbox]:checked~i,.theme-red label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-red label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-red input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-red input[type=radio]:checked+.item-media i.icon-form-checkbox{background-color:#ff3b30}.form-radio.theme-red input[type=radio]:checked~i,.theme-red .form-radio input[type=radio]:checked~i,.theme-red label.label-radio input[type=checkbox]:checked~.item-inner,.theme-red label.label-radio input[type=radio]:checked~.item-inner,label.label-radio.theme-red input[type=checkbox]:checked~.item-inner,label.label-radio.theme-red input[type=radio]:checked~.item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23ff3b30'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E")}.theme-red .picker-calendar-day.picker-calendar-day-selected span{background-color:#ff3b30!important}.data-table.theme-red .data-table-header-selected,.theme-red .data-table .data-table-header-selected{background:rgba(255,59,48,.1)}.data-table.theme-red .data-table-title-selected,.theme-red .data-table .data-table-title-selected{color:#ff3b30}.swiper-pagination.color-red .swiper-pagination-bullet-active,.theme-red .swiper-pagination .swiper-pagination-bullet-active{background-color:#ff3b30}.swiper-pagination.color-red .swiper-pagination-progressbar,.theme-red .swiper-pagination .swiper-pagination-progressbar{background-color:#ff3b30}.swiper-pagination.swiper-pagination-progress.bg-red{background-color:rgba(255,59,48,.25)}.swiper-button-next.color-red,.swiper-container-rtl .swiper-button-prev.color-red,.theme-red .swiper-button-next,.theme-red .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-red,.swiper-container-rtl .swiper-button-next.color-red,.theme-red .swiper-button-prev,.theme-red .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-red,.speed-dial-buttons a.theme-red,.theme-red .floating-button,.theme-red .speed-dial-buttons a{color:#fff;background:#ff3b30}.floating-button.theme-red.active-state,.speed-dial-buttons a.theme-red.active-state,.theme-red .floating-button.active-state,.theme-red .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-red:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-red:active,html:not(.watch-active-state) .theme-red .floating-button:active,html:not(.watch-active-state) .theme-red .speed-dial-buttons a:active{background:#ff1407}.floating-button.theme-red i,.speed-dial-buttons a.theme-red i,.theme-red .floating-button i,.theme-red .speed-dial-buttons a i{color:inherit}.range-slider.theme-red input[type=range]::-webkit-slider-thumb:before,.theme-red .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#ff3b30}.range-slider.theme-red input[type=range]::-ms-fill-lower,.theme-red .range-slider input[type=range]::-ms-fill-lower{background-color:#ff3b30}.badge.theme-red{background-color:#ff3b30;color:#fff}.color-gray{color:#8e8e93}.list-block .item-link.list-button.color-gray,.list-button.color-gray,.tabbar a.active.color-gray,a.color-gray{color:#8e8e93}.label-switch input[type=checkbox]:checked+.checkbox.color-gray,.label-switch.color-gray input[type=checkbox]:checked+.checkbox{background-color:#8e8e93}.color-gray.button:not(.button-fill),.color-gray.buttons-row .button{border-color:#8e8e93}.color-gray.button:not(.button-fill).active-state,.color-gray.buttons-row .button.active-state,html:not(.watch-active-state) .color-gray.button:not(.button-fill):active,html:not(.watch-active-state) .color-gray.buttons-row .button:active{background-color:rgba(142,142,147,.15)}.color-gray.button:not(.button-fill).active,.color-gray.buttons-row .button.active{background-color:#8e8e93;color:#fff}.button.button-fill.color-gray{background:#8e8e93;color:#fff}.progressbar.bg-gray span,.progressbar.color-gray span{background-color:#8e8e93}.progressbar-infinite.bg-gray:before,.progressbar-infinite.color-gray:before{background-color:#8e8e93}.color-gray i.icon,i.icon.color-gray{color:#8e8e93}.preloader.color-gray,.preloader.preloader-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%238e8e93'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.bg-gray,.button.button-fill.bg-gray,.list-block .swipeout-actions-left a.bg-gray,.list-block .swipeout-actions-right a.bg-gray,a.bg-gray{background-color:#8e8e93}.border-gray{border-color:#8e8e93}.border-gray:after,.border-gray:before,.list-block .border-gray.item-inner:after,.list-block .border-gray.item-inner:before,.list-block ul.border-gray:after,.list-block ul.border-gray:before{background-color:#8e8e93}.floating-button.bg-gray,.floating-button.color-gray,.speed-dial-buttons a.bg-gray,.speed-dial-buttons a.color-gray{color:#fff;background:#8e8e93}.floating-button.bg-gray.active-state,.floating-button.color-gray.active-state,.speed-dial-buttons a.bg-gray.active-state,.speed-dial-buttons a.color-gray.active-state,html:not(.watch-active-state) .floating-button.bg-gray:active,html:not(.watch-active-state) .floating-button.color-gray:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-gray:active,html:not(.watch-active-state) .speed-dial-buttons a.color-gray:active{background:#79797f}.floating-button.bg-gray i,.floating-button.color-gray i,.speed-dial-buttons a.bg-gray i,.speed-dial-buttons a.color-gray i{color:inherit}.range-slider.color-gray input[type=range]::-webkit-slider-thumb:before{background-color:#8e8e93}.range-slider.color-gray input[type=range]::-ms-fill-lower{background-color:#8e8e93}.badge.color-gray{background-color:#8e8e93;color:#fff}.color-white{color:#fff}.list-block .item-link.list-button.color-white,.list-button.color-white,.tabbar a.active.color-white,a.color-white{color:#fff}.label-switch input[type=checkbox]:checked+.checkbox.color-white,.label-switch.color-white input[type=checkbox]:checked+.checkbox{background-color:#fff}.color-white.button:not(.button-fill),.color-white.buttons-row .button{border-color:#fff}.color-white.button:not(.button-fill).active-state,.color-white.buttons-row .button.active-state,html:not(.watch-active-state) .color-white.button:not(.button-fill):active,html:not(.watch-active-state) .color-white.buttons-row .button:active{background-color:rgba(255,255,255,.15)}.color-white.button:not(.button-fill).active,.color-white.buttons-row .button.active{background-color:#fff;color:#fff}.button.button-fill.color-white{background:#fff;color:#fff}.progressbar.bg-white span,.progressbar.color-white span{background-color:#fff}.progressbar-infinite.bg-white:before,.progressbar-infinite.color-white:before{background-color:#fff}.color-white i.icon,i.icon.color-white{color:#fff}.preloader.color-white,.preloader.preloader-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23ffffff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.bg-white,.button.button-fill.bg-white,.list-block .swipeout-actions-left a.bg-white,.list-block .swipeout-actions-right a.bg-white,a.bg-white{background-color:#fff}.border-white{border-color:#fff}.border-white:after,.border-white:before,.list-block .border-white.item-inner:after,.list-block .border-white.item-inner:before,.list-block ul.border-white:after,.list-block ul.border-white:before{background-color:#fff}.floating-button.bg-white,.floating-button.color-white,.speed-dial-buttons a.bg-white,.speed-dial-buttons a.color-white{color:#fff;background:#fff}.floating-button.bg-white.active-state,.floating-button.color-white.active-state,.speed-dial-buttons a.bg-white.active-state,.speed-dial-buttons a.color-white.active-state,html:not(.watch-active-state) .floating-button.bg-white:active,html:not(.watch-active-state) .floating-button.color-white:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-white:active,html:not(.watch-active-state) .speed-dial-buttons a.color-white:active{background:#ebebeb}.floating-button.bg-white i,.floating-button.color-white i,.speed-dial-buttons a.bg-white i,.speed-dial-buttons a.color-white i{color:inherit}.range-slider.color-white input[type=range]::-webkit-slider-thumb:before{background-color:#fff}.range-slider.color-white input[type=range]::-ms-fill-lower{background-color:#fff}.badge.color-white{background-color:#fff;color:#fff}.color-black{color:#000}.list-block .item-link.list-button.color-black,.list-button.color-black,.tabbar a.active.color-black,a.color-black{color:#000}.label-switch input[type=checkbox]:checked+.checkbox.color-black,.label-switch.color-black input[type=checkbox]:checked+.checkbox{background-color:#000}.color-black.button:not(.button-fill),.color-black.buttons-row .button{border-color:#000}.color-black.button:not(.button-fill).active-state,.color-black.buttons-row .button.active-state,html:not(.watch-active-state) .color-black.button:not(.button-fill):active,html:not(.watch-active-state) .color-black.buttons-row .button:active{background-color:rgba(0,0,0,.15)}.color-black.button:not(.button-fill).active,.color-black.buttons-row .button.active{background-color:#000;color:#fff}.button.button-fill.color-black{background:#000;color:#fff}.progressbar.bg-black span,.progressbar.color-black span{background-color:#000}.progressbar-infinite.bg-black:before,.progressbar-infinite.color-black:before{background-color:#000}.color-black i.icon,i.icon.color-black{color:#000}.preloader.color-black,.preloader.preloader-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23000000'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.bg-black,.button.button-fill.bg-black,.list-block .swipeout-actions-left a.bg-black,.list-block .swipeout-actions-right a.bg-black,a.bg-black{background-color:#000}.border-black{border-color:#000}.border-black:after,.border-black:before,.list-block .border-black.item-inner:after,.list-block .border-black.item-inner:before,.list-block ul.border-black:after,.list-block ul.border-black:before{background-color:#000}.floating-button.bg-black,.floating-button.color-black,.speed-dial-buttons a.bg-black,.speed-dial-buttons a.color-black{color:#fff;background:#000}.floating-button.bg-black.active-state,.floating-button.color-black.active-state,.speed-dial-buttons a.bg-black.active-state,.speed-dial-buttons a.color-black.active-state,html:not(.watch-active-state) .floating-button.bg-black:active,html:not(.watch-active-state) .floating-button.color-black:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-black:active,html:not(.watch-active-state) .speed-dial-buttons a.color-black:active{background:#000}.floating-button.bg-black i,.floating-button.color-black i,.speed-dial-buttons a.bg-black i,.speed-dial-buttons a.color-black i{color:inherit}.range-slider.color-black input[type=range]::-webkit-slider-thumb:before{background-color:#000}.range-slider.color-black input[type=range]::-ms-fill-lower{background-color:#000}.badge.color-black{background-color:#000;color:#fff}.color-lightblue{color:#5ac8fa}.list-block .item-link.list-button.color-lightblue,.list-button.color-lightblue,.tabbar a.active.color-lightblue,a.color-lightblue{color:#5ac8fa}.label-switch input[type=checkbox]:checked+.checkbox.color-lightblue,.label-switch.color-lightblue input[type=checkbox]:checked+.checkbox{background-color:#5ac8fa}.color-lightblue.button:not(.button-fill),.color-lightblue.buttons-row .button{border-color:#5ac8fa}.color-lightblue.button:not(.button-fill).active-state,.color-lightblue.buttons-row .button.active-state,html:not(.watch-active-state) .color-lightblue.button:not(.button-fill):active,html:not(.watch-active-state) .color-lightblue.buttons-row .button:active{background-color:rgba(90,200,250,.15)}.color-lightblue.button:not(.button-fill).active,.color-lightblue.buttons-row .button.active{background-color:#5ac8fa;color:#fff}.button.button-fill.color-lightblue{background:#5ac8fa;color:#fff}.progressbar.bg-lightblue span,.progressbar.color-lightblue span{background-color:#5ac8fa}.progressbar-infinite.bg-lightblue:before,.progressbar-infinite.color-lightblue:before{background-color:#5ac8fa}.color-lightblue i.icon,i.icon.color-lightblue{color:#5ac8fa}.preloader.color-lightblue,.preloader.preloader-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%235ac8fa'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.bg-lightblue,.button.button-fill.bg-lightblue,.list-block .swipeout-actions-left a.bg-lightblue,.list-block .swipeout-actions-right a.bg-lightblue,a.bg-lightblue{background-color:#5ac8fa}.border-lightblue{border-color:#5ac8fa}.border-lightblue:after,.border-lightblue:before,.list-block .border-lightblue.item-inner:after,.list-block .border-lightblue.item-inner:before,.list-block ul.border-lightblue:after,.list-block ul.border-lightblue:before{background-color:#5ac8fa}.floating-button.bg-lightblue,.floating-button.color-lightblue,.speed-dial-buttons a.bg-lightblue,.speed-dial-buttons a.color-lightblue{color:#fff;background:#5ac8fa}.floating-button.bg-lightblue.active-state,.floating-button.color-lightblue.active-state,.speed-dial-buttons a.bg-lightblue.active-state,.speed-dial-buttons a.color-lightblue.active-state,html:not(.watch-active-state) .floating-button.bg-lightblue:active,html:not(.watch-active-state) .floating-button.color-lightblue:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-lightblue:active,html:not(.watch-active-state) .speed-dial-buttons a.color-lightblue:active{background:#32bbf9}.floating-button.bg-lightblue i,.floating-button.color-lightblue i,.speed-dial-buttons a.bg-lightblue i,.speed-dial-buttons a.color-lightblue i{color:inherit}.range-slider.color-lightblue input[type=range]::-webkit-slider-thumb:before{background-color:#5ac8fa}.range-slider.color-lightblue input[type=range]::-ms-fill-lower{background-color:#5ac8fa}.badge.color-lightblue{background-color:#5ac8fa;color:#fff}.color-yellow{color:#fc0}.list-block .item-link.list-button.color-yellow,.list-button.color-yellow,.tabbar a.active.color-yellow,a.color-yellow{color:#fc0}.label-switch input[type=checkbox]:checked+.checkbox.color-yellow,.label-switch.color-yellow input[type=checkbox]:checked+.checkbox{background-color:#fc0}.color-yellow.button:not(.button-fill),.color-yellow.buttons-row .button{border-color:#fc0}.color-yellow.button:not(.button-fill).active-state,.color-yellow.buttons-row .button.active-state,html:not(.watch-active-state) .color-yellow.button:not(.button-fill):active,html:not(.watch-active-state) .color-yellow.buttons-row .button:active{background-color:rgba(255,204,0,.15)}.color-yellow.button:not(.button-fill).active,.color-yellow.buttons-row .button.active{background-color:#fc0;color:#fff}.button.button-fill.color-yellow{background:#fc0;color:#fff}.progressbar.bg-yellow span,.progressbar.color-yellow span{background-color:#fc0}.progressbar-infinite.bg-yellow:before,.progressbar-infinite.color-yellow:before{background-color:#fc0}.color-yellow i.icon,i.icon.color-yellow{color:#fc0}.preloader.color-yellow,.preloader.preloader-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23ffcc00'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.bg-yellow,.button.button-fill.bg-yellow,.list-block .swipeout-actions-left a.bg-yellow,.list-block .swipeout-actions-right a.bg-yellow,a.bg-yellow{background-color:#fc0}.border-yellow{border-color:#fc0}.border-yellow:after,.border-yellow:before,.list-block .border-yellow.item-inner:after,.list-block .border-yellow.item-inner:before,.list-block ul.border-yellow:after,.list-block ul.border-yellow:before{background-color:#fc0}.floating-button.bg-yellow,.floating-button.color-yellow,.speed-dial-buttons a.bg-yellow,.speed-dial-buttons a.color-yellow{color:#fff;background:#fc0}.floating-button.bg-yellow.active-state,.floating-button.color-yellow.active-state,.speed-dial-buttons a.bg-yellow.active-state,.speed-dial-buttons a.color-yellow.active-state,html:not(.watch-active-state) .floating-button.bg-yellow:active,html:not(.watch-active-state) .floating-button.color-yellow:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-yellow:active,html:not(.watch-active-state) .speed-dial-buttons a.color-yellow:active{background:#d6ab00}.floating-button.bg-yellow i,.floating-button.color-yellow i,.speed-dial-buttons a.bg-yellow i,.speed-dial-buttons a.color-yellow i{color:inherit}.range-slider.color-yellow input[type=range]::-webkit-slider-thumb:before{background-color:#fc0}.range-slider.color-yellow input[type=range]::-ms-fill-lower{background-color:#fc0}.badge.color-yellow{background-color:#fc0;color:#fff}.color-orange{color:#ff9500}.list-block .item-link.list-button.color-orange,.list-button.color-orange,.tabbar a.active.color-orange,a.color-orange{color:#ff9500}.label-switch input[type=checkbox]:checked+.checkbox.color-orange,.label-switch.color-orange input[type=checkbox]:checked+.checkbox{background-color:#ff9500}.color-orange.button:not(.button-fill),.color-orange.buttons-row .button{border-color:#ff9500}.color-orange.button:not(.button-fill).active-state,.color-orange.buttons-row .button.active-state,html:not(.watch-active-state) .color-orange.button:not(.button-fill):active,html:not(.watch-active-state) .color-orange.buttons-row .button:active{background-color:rgba(255,149,0,.15)}.color-orange.button:not(.button-fill).active,.color-orange.buttons-row .button.active{background-color:#ff9500;color:#fff}.button.button-fill.color-orange{background:#ff9500;color:#fff}.progressbar.bg-orange span,.progressbar.color-orange span{background-color:#ff9500}.progressbar-infinite.bg-orange:before,.progressbar-infinite.color-orange:before{background-color:#ff9500}.color-orange i.icon,i.icon.color-orange{color:#ff9500}.preloader.color-orange,.preloader.preloader-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23ff9500'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.bg-orange,.button.button-fill.bg-orange,.list-block .swipeout-actions-left a.bg-orange,.list-block .swipeout-actions-right a.bg-orange,a.bg-orange{background-color:#ff9500}.border-orange{border-color:#ff9500}.border-orange:after,.border-orange:before,.list-block .border-orange.item-inner:after,.list-block .border-orange.item-inner:before,.list-block ul.border-orange:after,.list-block ul.border-orange:before{background-color:#ff9500}.floating-button.bg-orange,.floating-button.color-orange,.speed-dial-buttons a.bg-orange,.speed-dial-buttons a.color-orange{color:#fff;background:#ff9500}.floating-button.bg-orange.active-state,.floating-button.color-orange.active-state,.speed-dial-buttons a.bg-orange.active-state,.speed-dial-buttons a.color-orange.active-state,html:not(.watch-active-state) .floating-button.bg-orange:active,html:not(.watch-active-state) .floating-button.color-orange:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-orange:active,html:not(.watch-active-state) .speed-dial-buttons a.color-orange:active{background:#d67d00}.floating-button.bg-orange i,.floating-button.color-orange i,.speed-dial-buttons a.bg-orange i,.speed-dial-buttons a.color-orange i{color:inherit}.range-slider.color-orange input[type=range]::-webkit-slider-thumb:before{background-color:#ff9500}.range-slider.color-orange input[type=range]::-ms-fill-lower{background-color:#ff9500}.badge.color-orange{background-color:#ff9500;color:#fff}.color-pink{color:#ff2d55}.list-block .item-link.list-button.color-pink,.list-button.color-pink,.tabbar a.active.color-pink,a.color-pink{color:#ff2d55}.label-switch input[type=checkbox]:checked+.checkbox.color-pink,.label-switch.color-pink input[type=checkbox]:checked+.checkbox{background-color:#ff2d55}.color-pink.button:not(.button-fill),.color-pink.buttons-row .button{border-color:#ff2d55}.color-pink.button:not(.button-fill).active-state,.color-pink.buttons-row .button.active-state,html:not(.watch-active-state) .color-pink.button:not(.button-fill):active,html:not(.watch-active-state) .color-pink.buttons-row .button:active{background-color:rgba(255,45,85,.15)}.color-pink.button:not(.button-fill).active,.color-pink.buttons-row .button.active{background-color:#ff2d55;color:#fff}.button.button-fill.color-pink{background:#ff2d55;color:#fff}.progressbar.bg-pink span,.progressbar.color-pink span{background-color:#ff2d55}.progressbar-infinite.bg-pink:before,.progressbar-infinite.color-pink:before{background-color:#ff2d55}.color-pink i.icon,i.icon.color-pink{color:#ff2d55}.preloader.color-pink,.preloader.preloader-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23ff2d55'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.bg-pink,.button.button-fill.bg-pink,.list-block .swipeout-actions-left a.bg-pink,.list-block .swipeout-actions-right a.bg-pink,a.bg-pink{background-color:#ff2d55}.border-pink{border-color:#ff2d55}.border-pink:after,.border-pink:before,.list-block .border-pink.item-inner:after,.list-block .border-pink.item-inner:before,.list-block ul.border-pink:after,.list-block ul.border-pink:before{background-color:#ff2d55}.floating-button.bg-pink,.floating-button.color-pink,.speed-dial-buttons a.bg-pink,.speed-dial-buttons a.color-pink{color:#fff;background:#ff2d55}.floating-button.bg-pink.active-state,.floating-button.color-pink.active-state,.speed-dial-buttons a.bg-pink.active-state,.speed-dial-buttons a.color-pink.active-state,html:not(.watch-active-state) .floating-button.bg-pink:active,html:not(.watch-active-state) .floating-button.color-pink:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-pink:active,html:not(.watch-active-state) .speed-dial-buttons a.color-pink:active{background:#ff0434}.floating-button.bg-pink i,.floating-button.color-pink i,.speed-dial-buttons a.bg-pink i,.speed-dial-buttons a.color-pink i{color:inherit}.range-slider.color-pink input[type=range]::-webkit-slider-thumb:before{background-color:#ff2d55}.range-slider.color-pink input[type=range]::-ms-fill-lower{background-color:#ff2d55}.badge.color-pink{background-color:#ff2d55;color:#fff}.color-blue{color:#007aff}.list-block .item-link.list-button.color-blue,.list-button.color-blue,.tabbar a.active.color-blue,a.color-blue{color:#007aff}.label-switch input[type=checkbox]:checked+.checkbox.color-blue,.label-switch.color-blue input[type=checkbox]:checked+.checkbox{background-color:#007aff}.color-blue.button:not(.button-fill),.color-blue.buttons-row .button{border-color:#007aff}.color-blue.button:not(.button-fill).active-state,.color-blue.buttons-row .button.active-state,html:not(.watch-active-state) .color-blue.button:not(.button-fill):active,html:not(.watch-active-state) .color-blue.buttons-row .button:active{background-color:rgba(0,122,255,.15)}.color-blue.button:not(.button-fill).active,.color-blue.buttons-row .button.active{background-color:#007aff;color:#fff}.button.button-fill.color-blue{background:#007aff;color:#fff}.progressbar.bg-blue span,.progressbar.color-blue span{background-color:#007aff}.progressbar-infinite.bg-blue:before,.progressbar-infinite.color-blue:before{background-color:#007aff}.color-blue i.icon,i.icon.color-blue{color:#007aff}.preloader.color-blue,.preloader.preloader-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23007aff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.bg-blue,.button.button-fill.bg-blue,.list-block .swipeout-actions-left a.bg-blue,.list-block .swipeout-actions-right a.bg-blue,a.bg-blue{background-color:#007aff}.border-blue{border-color:#007aff}.border-blue:after,.border-blue:before,.list-block .border-blue.item-inner:after,.list-block .border-blue.item-inner:before,.list-block ul.border-blue:after,.list-block ul.border-blue:before{background-color:#007aff}.floating-button.bg-blue,.floating-button.color-blue,.speed-dial-buttons a.bg-blue,.speed-dial-buttons a.color-blue{color:#fff;background:#007aff}.floating-button.bg-blue.active-state,.floating-button.color-blue.active-state,.speed-dial-buttons a.bg-blue.active-state,.speed-dial-buttons a.color-blue.active-state,html:not(.watch-active-state) .floating-button.bg-blue:active,html:not(.watch-active-state) .floating-button.color-blue:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-blue:active,html:not(.watch-active-state) .speed-dial-buttons a.color-blue:active{background:#0066d6}.floating-button.bg-blue i,.floating-button.color-blue i,.speed-dial-buttons a.bg-blue i,.speed-dial-buttons a.color-blue i{color:inherit}.range-slider.color-blue input[type=range]::-webkit-slider-thumb:before{background-color:#007aff}.range-slider.color-blue input[type=range]::-ms-fill-lower{background-color:#007aff}.badge.color-blue{background-color:#007aff;color:#fff}.color-green{color:#4cd964}.list-block .item-link.list-button.color-green,.list-button.color-green,.tabbar a.active.color-green,a.color-green{color:#4cd964}.label-switch input[type=checkbox]:checked+.checkbox.color-green,.label-switch.color-green input[type=checkbox]:checked+.checkbox{background-color:#4cd964}.color-green.button:not(.button-fill),.color-green.buttons-row .button{border-color:#4cd964}.color-green.button:not(.button-fill).active-state,.color-green.buttons-row .button.active-state,html:not(.watch-active-state) .color-green.button:not(.button-fill):active,html:not(.watch-active-state) .color-green.buttons-row .button:active{background-color:rgba(76,217,100,.15)}.color-green.button:not(.button-fill).active,.color-green.buttons-row .button.active{background-color:#4cd964;color:#fff}.button.button-fill.color-green{background:#4cd964;color:#fff}.progressbar.bg-green span,.progressbar.color-green span{background-color:#4cd964}.progressbar-infinite.bg-green:before,.progressbar-infinite.color-green:before{background-color:#4cd964}.color-green i.icon,i.icon.color-green{color:#4cd964}.preloader.color-green,.preloader.preloader-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%234cd964'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.bg-green,.button.button-fill.bg-green,.list-block .swipeout-actions-left a.bg-green,.list-block .swipeout-actions-right a.bg-green,a.bg-green{background-color:#4cd964}.border-green{border-color:#4cd964}.border-green:after,.border-green:before,.list-block .border-green.item-inner:after,.list-block .border-green.item-inner:before,.list-block ul.border-green:after,.list-block ul.border-green:before{background-color:#4cd964}.floating-button.bg-green,.floating-button.color-green,.speed-dial-buttons a.bg-green,.speed-dial-buttons a.color-green{color:#fff;background:#4cd964}.floating-button.bg-green.active-state,.floating-button.color-green.active-state,.speed-dial-buttons a.bg-green.active-state,.speed-dial-buttons a.color-green.active-state,html:not(.watch-active-state) .floating-button.bg-green:active,html:not(.watch-active-state) .floating-button.color-green:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-green:active,html:not(.watch-active-state) .speed-dial-buttons a.color-green:active{background:#2cd048}.floating-button.bg-green i,.floating-button.color-green i,.speed-dial-buttons a.bg-green i,.speed-dial-buttons a.color-green i{color:inherit}.range-slider.color-green input[type=range]::-webkit-slider-thumb:before{background-color:#4cd964}.range-slider.color-green input[type=range]::-ms-fill-lower{background-color:#4cd964}.badge.color-green{background-color:#4cd964;color:#fff}.color-red{color:#ff3b30}.list-block .item-link.list-button.color-red,.list-button.color-red,.tabbar a.active.color-red,a.color-red{color:#ff3b30}.label-switch input[type=checkbox]:checked+.checkbox.color-red,.label-switch.color-red input[type=checkbox]:checked+.checkbox{background-color:#ff3b30}.color-red.button:not(.button-fill),.color-red.buttons-row .button{border-color:#ff3b30}.color-red.button:not(.button-fill).active-state,.color-red.buttons-row .button.active-state,html:not(.watch-active-state) .color-red.button:not(.button-fill):active,html:not(.watch-active-state) .color-red.buttons-row .button:active{background-color:rgba(255,59,48,.15)}.color-red.button:not(.button-fill).active,.color-red.buttons-row .button.active{background-color:#ff3b30;color:#fff}.button.button-fill.color-red{background:#ff3b30;color:#fff}.progressbar.bg-red span,.progressbar.color-red span{background-color:#ff3b30}.progressbar-infinite.bg-red:before,.progressbar-infinite.color-red:before{background-color:#ff3b30}.color-red i.icon,i.icon.color-red{color:#ff3b30}.preloader.color-red,.preloader.preloader-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23ff3b30'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.bg-red,.button.button-fill.bg-red,.list-block .swipeout-actions-left a.bg-red,.list-block .swipeout-actions-right a.bg-red,a.bg-red{background-color:#ff3b30}.border-red{border-color:#ff3b30}.border-red:after,.border-red:before,.list-block .border-red.item-inner:after,.list-block .border-red.item-inner:before,.list-block ul.border-red:after,.list-block ul.border-red:before{background-color:#ff3b30}.floating-button.bg-red,.floating-button.color-red,.speed-dial-buttons a.bg-red,.speed-dial-buttons a.color-red{color:#fff;background:#ff3b30}.floating-button.bg-red.active-state,.floating-button.color-red.active-state,.speed-dial-buttons a.bg-red.active-state,.speed-dial-buttons a.color-red.active-state,html:not(.watch-active-state) .floating-button.bg-red:active,html:not(.watch-active-state) .floating-button.color-red:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-red:active,html:not(.watch-active-state) .speed-dial-buttons a.color-red:active{background:#ff1407}.floating-button.bg-red i,.floating-button.color-red i,.speed-dial-buttons a.bg-red i,.speed-dial-buttons a.color-red i{color:inherit}.range-slider.color-red input[type=range]::-webkit-slider-thumb:before{background-color:#ff3b30}.range-slider.color-red input[type=range]::-ms-fill-lower{background-color:#ff3b30}.badge.color-red{background-color:#ff3b30;color:#fff}.layout-dark .navbar,.layout-dark .subnavbar,.navbar.layout-dark,.subnavbar.layout-dark{background-color:#131313;color:#fff}.layout-dark .navbar:after,.layout-dark .subnavbar:after,.navbar.layout-dark:after,.subnavbar.layout-dark:after{background-color:#333}.layout-dark .toolbar,.toolbar.layout-dark{background-color:#131313;color:#fff}.layout-dark .toolbar:before,.toolbar.layout-dark:before{background-color:#333}.layout-dark .picker-modal .toolbar{background-color:#131313}.layout-dark .popover .picker-modal .toolbar{background:0 0}.layout-dark .picker-calendar-week-days{color:#fff;background-color:#131313}.layout-dark .picker-modal.picker-modal-inline .picker-center-highlight:before,.layout-dark .popover .picker-modal .picker-center-highlight:before{background-color:#333}.layout-dark .picker-modal.picker-modal-inline .picker-center-highlight:after,.layout-dark .popover .picker-modal .picker-center-highlight:after{background-color:#333}.layout-dark .picker-modal.picker-modal-inline .picker-item.picker-selected,.layout-dark .popover .picker-modal .picker-item.picker-selected{color:#fff}.layout-dark .picker-modal.picker-modal-inline .picker-calendar-week-days,.layout-dark .popover .picker-modal .picker-calendar-week-days{color:#fff}.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day,.layout-dark .popover .picker-modal .picker-calendar-day{color:#fff}.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day.picker-calendar-day-next,.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day.picker-calendar-day-prev,.layout-dark .popover .picker-modal .picker-calendar-day.picker-calendar-day-next,.layout-dark .popover .picker-modal .picker-calendar-day.picker-calendar-day-prev{color:#777}.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day.picker-calendar-day-disabled,.layout-dark .popover .picker-modal .picker-calendar-day.picker-calendar-day-disabled{color:#555}.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day.picker-calendar-day-today span,.layout-dark .popover .picker-modal .picker-calendar-day.picker-calendar-day-today span{background:#333}.layout-dark .picker-modal.picker-modal-inline .picker-calendar-day.picker-calendar-day-has-events span:after,.layout-dark .popover .picker-modal .picker-calendar-day.picker-calendar-day-has-events span:after{background:#555}.layout-dark .picker-modal.picker-modal-inline .picker-calendar-row:after,.layout-dark .picker-modal.picker-modal-inline .picker-calendar-week-days:after,.layout-dark .popover .picker-modal .picker-calendar-row:after,.layout-dark .popover .picker-modal .picker-calendar-week-days:after{background-color:#333}.layout-dark .picker-modal.picker-modal-inline .picker-calendar-week-days~.picker-calendar-months:before,.layout-dark .picker-modal.picker-modal-inline .toolbar~.picker-modal-inner .picker-calendar-months:before,.layout-dark .popover .picker-modal .picker-calendar-week-days~.picker-calendar-months:before,.layout-dark .popover .picker-modal .toolbar~.picker-modal-inner .picker-calendar-months:before{background-color:#333}.layout-dark .popover .picker-modal .toolbar:after{background-color:#333}.layout-dark .photo-browser .navbar,.layout-dark .photo-browser .toolbar,.layout-dark .views .view[data-page=photo-browser-slides] .navbar,.layout-dark .views .view[data-page=photo-browser-slides] .toolbar{color:#000;background:rgba(247,247,247,.95)}.layout-dark .photo-browser-dark .navbar,.layout-dark .photo-browser-dark .toolbar{background:rgba(30,30,30,.8);color:#fff}.layout-dark .tabbar a:not(.active){color:#fff}.layout-dark .login-screen-content,.layout-dark .page,.layout-dark .panel,.page.layout-dark,.panel.layout-dark{background-color:#222426;color:#ddd}.layout-dark .content-block-title{color:#fff}.content-block.layout-dark,.layout-dark .content-block{color:#bbb}.layout-dark .content-block-inner{background:#1c1d1f;color:#ddd}.layout-dark .content-block-inner:before{background-color:#393939}.layout-dark .content-block-inner:after{background-color:#393939}.layout-dark .list-block ul,.list-block.layout-dark ul{background:#1c1d1f}.layout-dark .list-block ul:before,.list-block.layout-dark ul:before{background-color:#393939}.layout-dark .list-block ul:after,.list-block.layout-dark ul:after{background-color:#393939}.layout-dark .list-block.inset ul,.list-block.layout-dark.inset ul{background:#1c1d1f}.layout-dark .list-block.notifications>ul,.list-block.layout-dark.notifications>ul{background:0 0}.layout-dark .autocomplete-dropdown{background:#1c1d1f}.layout-dark .autocomplete-dropdown .list-block b{color:#fff}.layout-dark .card{background:#1c1d1f}.layout-dark .card-header:after{background-color:#393939}.layout-dark .card-footer{color:#bbb}.layout-dark .card-footer:before{background-color:#393939}.layout-dark .popover,.popover.layout-dark{background:rgba(0,0,0,.8)}.layout-dark .popover .popover-angle:after,.popover.layout-dark .popover-angle:after{background:rgba(0,0,0,.8)}.layout-dark .popover .list-block ul,.popover.layout-dark .list-block ul{background:0 0}.layout-dark .actions-popover .list-block ul:before{background-color:#393939}.layout-dark .actions-popover .list-block ul:after{background-color:#393939}.layout-dark .actions-popover .actions-popover-label:after{background-color:#393939}.layout-dark li.sorting{background-color:#29292f}.layout-dark .swipeout-actions-left a,.layout-dark .swipeout-actions-right a{background-color:#444}.layout-dark .item-inner:after,.layout-dark .list-block ul ul li:last-child .item-inner:after{background-color:#393939}.layout-dark .item-after{color:#bbb}.layout-dark .item-link.active-state,.layout-dark label.label-checkbox.active-state,.layout-dark label.label-radio.active-state,html:not(.watch-active-state) .layout-dark .item-link:active,html:not(.watch-active-state) .layout-dark label.label-checkbox:active,html:not(.watch-active-state) .layout-dark label.label-radio:active{background-color:#29292f}.layout-dark .item-link.list-button:after,.layout-dark .list-button:after{background-color:#393939}.layout-dark .list-block-label{color:#bbb}.layout-dark .item-divider,.layout-dark .list-group-title{background:#1a1a1a;color:#bbb}.layout-dark .item-divider:before,.layout-dark .list-group-title:before{background-color:#393939}.layout-dark .searchbar{background:#333}.layout-dark .searchbar:after{background-color:#333}.layout-dark .list-block input[type=date],.layout-dark .list-block input[type=datetime-local],.layout-dark .list-block input[type=email],.layout-dark .list-block input[type=number],.layout-dark .list-block input[type=password],.layout-dark .list-block input[type=tel],.layout-dark .list-block input[type=text],.layout-dark .list-block input[type=url],.layout-dark .list-block select,.layout-dark .list-block textarea,.list-block.layout-dark input[type=date],.list-block.layout-dark input[type=datetime-local],.list-block.layout-dark input[type=email],.list-block.layout-dark input[type=number],.list-block.layout-dark input[type=password],.list-block.layout-dark input[type=tel],.list-block.layout-dark input[type=text],.list-block.layout-dark input[type=url],.list-block.layout-dark select,.list-block.layout-dark textarea{color:#fff}.layout-dark .label-switch .checkbox{background-color:#393939}.layout-dark .label-switch .checkbox:before{background-color:#1c1d1f}.layout-dark .range-slider input[type=range]:after{background:#1c1d1f}.layout-dark .range-slider input[type=range]::-ms-thumb{border:none}.layout-dark .timeline-item-inner{background:#1c1d1f}.layout-dark .timeline-item-divider{background:rgba(255,255,255,.3)}.layout-dark .content-block-inner .timeline-item-inner{border-color:#393939}.layout-dark .timeline-item-time{color:#8e8e93}.layout-dark .timeline-horizontal .timeline-item-date{background-color:#131313}.layout-dark .timeline-horizontal .timeline-item-date:after{background-color:#333}.layout-dark .timeline-horizontal .timeline-item:after{background-color:#333}.layout-dark .timeline-month-title,.layout-dark .timeline-year-title{background-color:#131313}.layout-dark .timeline-month .timeline-item:before{background-color:#333}.layout-dark .timeline-year:after{background-color:#333}.layout-dark .data-table tbody tr.data-table-row-selected{background:rgba(255,255,255,.05)}.layout-dark .data-table tbody td:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#393939;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .layout-dark .data-table tbody td:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .layout-dark .data-table tbody td:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}html:not(.ios):not(.android) .layout-dark .data-table tbody tr:hover{background:rgba(255,255,255,.05)}.layout-dark .data-table .sortable-cell.numeric-cell:before,.layout-dark .data-table .sortable-cell:not(.numeric-cell):after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23ffffff'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200h24v24H0V0z'%20fill%3D'none'%2F%3E%3Cpath%20d%3D'M20%2012l-1.41-1.41L13%2016.17V4h-2v12.17l-5.58-5.59L4%2012l8%208%208-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}@media (max-width:480px) and (orientation:portrait){.layout-dark .data-table.data-table-collapsible tr:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#393939;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .layout-dark .data-table.data-table-collapsible tr:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .layout-dark .data-table.data-table-collapsible tr:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.layout-dark .data-table.data-table-collapsible tr:hover{background-color:inherit}}.layout-white .navbar,.layout-white .subnavbar,.navbar.layout-white,.subnavbar.layout-white{background-color:#fff;color:#000}.layout-white .navbar:after,.layout-white .subnavbar:after,.navbar.layout-white:after,.subnavbar.layout-white:after{background-color:#ddd}.layout-white .toolbar,.toolbar.layout-white{background-color:#fff;color:#000}.layout-white .toolbar:before,.toolbar.layout-white:before{background-color:#ddd}.layout-white .picker-modal .toolbar{background-color:#fff}.layout-white .popover .picker-modal .toolbar{background:0 0}.layout-white .picker-modal.picker-modal-inline .picker-center-highlight:before,.layout-white .popover .picker-modal .picker-center-highlight:before{background-color:#ddd}.layout-white .picker-modal.picker-modal-inline .picker-center-highlight:after,.layout-white .popover .picker-modal .picker-center-highlight:after{background-color:#ddd}.layout-white .picker-modal.picker-modal-inline .picker-calendar-row:after,.layout-white .picker-modal.picker-modal-inline .picker-calendar-week-days:after,.layout-white .popover .picker-modal .picker-calendar-row:after,.layout-white .popover .picker-modal .picker-calendar-week-days:after{background-color:#ddd}.layout-white .picker-modal.picker-modal-inline .picker-calendar-week-days~.picker-calendar-months:before,.layout-white .picker-modal.picker-modal-inline .toolbar~.picker-modal-inner .picker-calendar-months:before,.layout-white .popover .picker-modal .picker-calendar-week-days~.picker-calendar-months:before,.layout-white .popover .picker-modal .toolbar~.picker-modal-inner .picker-calendar-months:before{background-color:#ddd}.layout-white .popover .picker-modal .toolbar:after{background-color:#ddd}.layout-white .photo-browser .navbar,.layout-white .photo-browser .toolbar,.layout-white .views .view[data-page=photo-browser-slides] .navbar,.layout-white .views .view[data-page=photo-browser-slides] .toolbar{color:#000;background:rgba(247,247,247,.95)}.layout-white .photo-browser-dark .navbar,.layout-white .photo-browser-dark .toolbar{background:rgba(30,30,30,.8);color:#fff}.layout-white .tabbar a:not(.active){color:#777}.layout-white .login-screen-content,.layout-white .page,.layout-white .panel,.page.layout-white,.panel.layout-white{background-color:#fff;color:#000}.layout-white .content-block-title{color:#777}.content-block.layout-white,.layout-white .content-block{color:#777}.layout-white .content-block-inner{background:#fafafa;color:#000}.layout-white .content-block-inner:after{background-color:#ddd}.layout-white .content-block-inner:before{background-color:#ddd}.layout-white .list-block ul,.list-block.layout-white ul{background:#fff}.layout-white .list-block ul:after,.list-block.layout-white ul:after{background-color:#ddd}.layout-white .list-block ul:before,.list-block.layout-white ul:before{background-color:#ddd}.layout-white .list-block.inset ul,.list-block.layout-white.inset ul{background:#fafafa}.layout-white .list-block.notifications>ul,.list-block.layout-white.notifications>ul{background:0 0}.layout-white .popover-inner>.list-block ul{background:0 0}.layout-white li.sorting{background-color:#eee}.layout-white .swipeout-actions-left a,.layout-white .swipeout-actions-right a{background-color:#c7c7cc}.layout-white .item-inner,.layout-white .list-block ul ul li:last-child .item-inner{border-color:#ddd}.layout-white .item-inner:after,.layout-white .list-block ul ul li:last-child .item-inner:after{background-color:#ddd}.layout-white .item-after{color:#8e8e93}.layout-white .item-link.active-state,.layout-white label.label-checkbox.active-state,.layout-white label.label-radio.active-state,html:not(.watch-active-state) .layout-white .item-link:active,html:not(.watch-active-state) .layout-white label.label-checkbox:active,html:not(.watch-active-state) .layout-white label.label-radio:active{background-color:#eee}.layout-white .item-link.list-button:after,.layout-white .list-button:after{background-color:#ddd}.layout-white .list-block-label{color:#777}.layout-white .item-divider,.layout-white .list-group-title{background:#f7f7f7;color:#777}.layout-white .item-divider:before,.layout-white .list-group-title:before{background-color:#ddd}.layout-white .searchbar{background:#c9c9ce}.layout-white .searchbar:after{background-color:#b4b4b4}.layout-white .list-block input[type=date],.layout-white .list-block input[type=datetime-local],.layout-white .list-block input[type=email],.layout-white .list-block input[type=number],.layout-white .list-block input[type=password],.layout-white .list-block input[type=tel],.layout-white .list-block input[type=text],.layout-white .list-block input[type=url],.layout-white .list-block select,.layout-white .list-block textarea,.list-block.layout-white input[type=date],.list-block.layout-white input[type=datetime-local],.list-block.layout-white input[type=email],.list-block.layout-white input[type=number],.list-block.layout-white input[type=password],.list-block.layout-white input[type=tel],.list-block.layout-white input[type=text],.list-block.layout-white input[type=url],.list-block.layout-white select,.list-block.layout-white textarea{color:#777}.layout-white .label-switch .checkbox{background-color:#e5e5e5}.layout-white .label-switch .checkbox:before{background-color:#fff}.layout-white .range-slider input[type=range]:after{background:#fff}.layout-white .timeline-item-inner{background:#fafafa}.layout-white .content-block-inner .timeline-item-inner{border-color:#ddd}.layout-white .timeline-item-time{color:#8e8e93}.layout-white .timeline-horizontal .timeline-item-date{background-color:#fff}.layout-white .timeline-horizontal .timeline-item-date:after{background-color:#ddd}.layout-white .timeline-horizontal .timeline-item:after{background-color:#ddd}.layout-white .timeline-month-title,.layout-white .timeline-year-title{background-color:#fff}.layout-white .timeline-month .timeline-item:before{background-color:#ddd}.layout-white .timeline-year:after{background-color:#ddd} \ No newline at end of file diff --git a/bower_components/framework7/dist/css/framework7.ios.css b/bower_components/framework7/dist/css/framework7.ios.css new file mode 100644 index 00000000..9c79a36e --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.ios.css @@ -0,0 +1,8348 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * iOS Theme + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +html, +body, +.framework7-root { + position: relative; + height: 100%; + width: 100%; + overflow-x: hidden; +} +body { + font-family: -apple-system, SF UI Text, Helvetica Neue, Helvetica, Arial, sans-serif; + margin: 0; + padding: 0; + color: #000; + font-size: 14px; + line-height: 1.4; + width: 100%; + -webkit-text-size-adjust: 100%; + background: #fff; + overflow: hidden; +} +.framework7-root { + overflow: hidden; +} +@media all and (width: 1024px) and (height: 691px) and (orientation: landscape) { + html, + body, + .framework7-root { + height: 671px; + } +} +@media all and (width: 1024px) and (height: 692px) and (orientation: landscape) { + html, + body, + .framework7-root { + height: 672px; + } +} +* { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-touch-callout: none; +} +a, +input, +textarea, +select { + outline: 0; +} +a { + text-decoration: none; + color: #007aff; +} +p { + margin: 1em 0; +} +/* === Grid === */ +.row { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.row > [class*="col-"] { + box-sizing: border-box; +} +.row .col-auto { + width: 100%; +} +.row .col-100 { + width: 100%; + width: -webkit-calc((100% - 15px*0) / 1); + width: calc((100% - 15px*0) / 1); +} +.row.no-gutter .col-100 { + width: 100%; +} +.row .col-95 { + width: 95%; + width: -webkit-calc((100% - 15px*0.05263157894736836) / 1.0526315789473684); + width: calc((100% - 15px*0.05263157894736836) / 1.0526315789473684); +} +.row.no-gutter .col-95 { + width: 95%; +} +.row .col-90 { + width: 90%; + width: -webkit-calc((100% - 15px*0.11111111111111116) / 1.1111111111111112); + width: calc((100% - 15px*0.11111111111111116) / 1.1111111111111112); +} +.row.no-gutter .col-90 { + width: 90%; +} +.row .col-85 { + width: 85%; + width: -webkit-calc((100% - 15px*0.17647058823529416) / 1.1764705882352942); + width: calc((100% - 15px*0.17647058823529416) / 1.1764705882352942); +} +.row.no-gutter .col-85 { + width: 85%; +} +.row .col-80 { + width: 80%; + width: -webkit-calc((100% - 15px*0.25) / 1.25); + width: calc((100% - 15px*0.25) / 1.25); +} +.row.no-gutter .col-80 { + width: 80%; +} +.row .col-75 { + width: 75%; + width: -webkit-calc((100% - 15px*0.33333333333333326) / 1.3333333333333333); + width: calc((100% - 15px*0.33333333333333326) / 1.3333333333333333); +} +.row.no-gutter .col-75 { + width: 75%; +} +.row .col-70 { + width: 70%; + width: -webkit-calc((100% - 15px*0.4285714285714286) / 1.4285714285714286); + width: calc((100% - 15px*0.4285714285714286) / 1.4285714285714286); +} +.row.no-gutter .col-70 { + width: 70%; +} +.row .col-66 { + width: 66.66666666666666%; + width: -webkit-calc((100% - 15px*0.5000000000000002) / 1.5000000000000002); + width: calc((100% - 15px*0.5000000000000002) / 1.5000000000000002); +} +.row.no-gutter .col-66 { + width: 66.66666666666666%; +} +.row .col-65 { + width: 65%; + width: -webkit-calc((100% - 15px*0.5384615384615385) / 1.5384615384615385); + width: calc((100% - 15px*0.5384615384615385) / 1.5384615384615385); +} +.row.no-gutter .col-65 { + width: 65%; +} +.row .col-60 { + width: 60%; + width: -webkit-calc((100% - 15px*0.6666666666666667) / 1.6666666666666667); + width: calc((100% - 15px*0.6666666666666667) / 1.6666666666666667); +} +.row.no-gutter .col-60 { + width: 60%; +} +.row .col-55 { + width: 55%; + width: -webkit-calc((100% - 15px*0.8181818181818181) / 1.8181818181818181); + width: calc((100% - 15px*0.8181818181818181) / 1.8181818181818181); +} +.row.no-gutter .col-55 { + width: 55%; +} +.row .col-50 { + width: 50%; + width: -webkit-calc((100% - 15px*1) / 2); + width: calc((100% - 15px*1) / 2); +} +.row.no-gutter .col-50 { + width: 50%; +} +.row .col-45 { + width: 45%; + width: -webkit-calc((100% - 15px*1.2222222222222223) / 2.2222222222222223); + width: calc((100% - 15px*1.2222222222222223) / 2.2222222222222223); +} +.row.no-gutter .col-45 { + width: 45%; +} +.row .col-40 { + width: 40%; + width: -webkit-calc((100% - 15px*1.5) / 2.5); + width: calc((100% - 15px*1.5) / 2.5); +} +.row.no-gutter .col-40 { + width: 40%; +} +.row .col-35 { + width: 35%; + width: -webkit-calc((100% - 15px*1.8571428571428572) / 2.857142857142857); + width: calc((100% - 15px*1.8571428571428572) / 2.857142857142857); +} +.row.no-gutter .col-35 { + width: 35%; +} +.row .col-33 { + width: 33.333333333333336%; + width: -webkit-calc((100% - 15px*2) / 3); + width: calc((100% - 15px*2) / 3); +} +.row.no-gutter .col-33 { + width: 33.333333333333336%; +} +.row .col-30 { + width: 30%; + width: -webkit-calc((100% - 15px*2.3333333333333335) / 3.3333333333333335); + width: calc((100% - 15px*2.3333333333333335) / 3.3333333333333335); +} +.row.no-gutter .col-30 { + width: 30%; +} +.row .col-25 { + width: 25%; + width: -webkit-calc((100% - 15px*3) / 4); + width: calc((100% - 15px*3) / 4); +} +.row.no-gutter .col-25 { + width: 25%; +} +.row .col-20 { + width: 20%; + width: -webkit-calc((100% - 15px*4) / 5); + width: calc((100% - 15px*4) / 5); +} +.row.no-gutter .col-20 { + width: 20%; +} +.row .col-15 { + width: 15%; + width: -webkit-calc((100% - 15px*5.666666666666667) / 6.666666666666667); + width: calc((100% - 15px*5.666666666666667) / 6.666666666666667); +} +.row.no-gutter .col-15 { + width: 15%; +} +.row .col-10 { + width: 10%; + width: -webkit-calc((100% - 15px*9) / 10); + width: calc((100% - 15px*9) / 10); +} +.row.no-gutter .col-10 { + width: 10%; +} +.row .col-5 { + width: 5%; + width: -webkit-calc((100% - 15px*19) / 20); + width: calc((100% - 15px*19) / 20); +} +.row.no-gutter .col-5 { + width: 5%; +} +.row .col-auto:nth-last-child(1), +.row .col-auto:nth-last-child(1) ~ .col-auto { + width: 100%; + width: -webkit-calc((100% - 15px*0) / 1); + width: calc((100% - 15px*0) / 1); +} +.row.no-gutter .col-auto:nth-last-child(1), +.row.no-gutter .col-auto:nth-last-child(1) ~ .col-auto { + width: 100%; +} +.row .col-auto:nth-last-child(2), +.row .col-auto:nth-last-child(2) ~ .col-auto { + width: 50%; + width: -webkit-calc((100% - 15px*1) / 2); + width: calc((100% - 15px*1) / 2); +} +.row.no-gutter .col-auto:nth-last-child(2), +.row.no-gutter .col-auto:nth-last-child(2) ~ .col-auto { + width: 50%; +} +.row .col-auto:nth-last-child(3), +.row .col-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; + width: -webkit-calc((100% - 15px*2) / 3); + width: calc((100% - 15px*2) / 3); +} +.row.no-gutter .col-auto:nth-last-child(3), +.row.no-gutter .col-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; +} +.row .col-auto:nth-last-child(4), +.row .col-auto:nth-last-child(4) ~ .col-auto { + width: 25%; + width: -webkit-calc((100% - 15px*3) / 4); + width: calc((100% - 15px*3) / 4); +} +.row.no-gutter .col-auto:nth-last-child(4), +.row.no-gutter .col-auto:nth-last-child(4) ~ .col-auto { + width: 25%; +} +.row .col-auto:nth-last-child(5), +.row .col-auto:nth-last-child(5) ~ .col-auto { + width: 20%; + width: -webkit-calc((100% - 15px*4) / 5); + width: calc((100% - 15px*4) / 5); +} +.row.no-gutter .col-auto:nth-last-child(5), +.row.no-gutter .col-auto:nth-last-child(5) ~ .col-auto { + width: 20%; +} +.row .col-auto:nth-last-child(6), +.row .col-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; + width: -webkit-calc((100% - 15px*5) / 6); + width: calc((100% - 15px*5) / 6); +} +.row.no-gutter .col-auto:nth-last-child(6), +.row.no-gutter .col-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; +} +.row .col-auto:nth-last-child(7), +.row .col-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; + width: -webkit-calc((100% - 15px*6) / 7); + width: calc((100% - 15px*6) / 7); +} +.row.no-gutter .col-auto:nth-last-child(7), +.row.no-gutter .col-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; +} +.row .col-auto:nth-last-child(8), +.row .col-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; + width: -webkit-calc((100% - 15px*7) / 8); + width: calc((100% - 15px*7) / 8); +} +.row.no-gutter .col-auto:nth-last-child(8), +.row.no-gutter .col-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; +} +.row .col-auto:nth-last-child(9), +.row .col-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; + width: -webkit-calc((100% - 15px*8) / 9); + width: calc((100% - 15px*8) / 9); +} +.row.no-gutter .col-auto:nth-last-child(9), +.row.no-gutter .col-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; +} +.row .col-auto:nth-last-child(10), +.row .col-auto:nth-last-child(10) ~ .col-auto { + width: 10%; + width: -webkit-calc((100% - 15px*9) / 10); + width: calc((100% - 15px*9) / 10); +} +.row.no-gutter .col-auto:nth-last-child(10), +.row.no-gutter .col-auto:nth-last-child(10) ~ .col-auto { + width: 10%; +} +.row .col-auto:nth-last-child(11), +.row .col-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; + width: -webkit-calc((100% - 15px*10) / 11); + width: calc((100% - 15px*10) / 11); +} +.row.no-gutter .col-auto:nth-last-child(11), +.row.no-gutter .col-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; +} +.row .col-auto:nth-last-child(12), +.row .col-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; + width: -webkit-calc((100% - 15px*11) / 12); + width: calc((100% - 15px*11) / 12); +} +.row.no-gutter .col-auto:nth-last-child(12), +.row.no-gutter .col-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; +} +.row .col-auto:nth-last-child(13), +.row .col-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; + width: -webkit-calc((100% - 15px*12) / 13); + width: calc((100% - 15px*12) / 13); +} +.row.no-gutter .col-auto:nth-last-child(13), +.row.no-gutter .col-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; +} +.row .col-auto:nth-last-child(14), +.row .col-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; + width: -webkit-calc((100% - 15px*13) / 14); + width: calc((100% - 15px*13) / 14); +} +.row.no-gutter .col-auto:nth-last-child(14), +.row.no-gutter .col-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; +} +.row .col-auto:nth-last-child(15), +.row .col-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; + width: -webkit-calc((100% - 15px*14) / 15); + width: calc((100% - 15px*14) / 15); +} +.row.no-gutter .col-auto:nth-last-child(15), +.row.no-gutter .col-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; +} +.row .col-auto:nth-last-child(16), +.row .col-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; + width: -webkit-calc((100% - 15px*15) / 16); + width: calc((100% - 15px*15) / 16); +} +.row.no-gutter .col-auto:nth-last-child(16), +.row.no-gutter .col-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; +} +.row .col-auto:nth-last-child(17), +.row .col-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; + width: -webkit-calc((100% - 15px*16) / 17); + width: calc((100% - 15px*16) / 17); +} +.row.no-gutter .col-auto:nth-last-child(17), +.row.no-gutter .col-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; +} +.row .col-auto:nth-last-child(18), +.row .col-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; + width: -webkit-calc((100% - 15px*17) / 18); + width: calc((100% - 15px*17) / 18); +} +.row.no-gutter .col-auto:nth-last-child(18), +.row.no-gutter .col-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; +} +.row .col-auto:nth-last-child(19), +.row .col-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; + width: -webkit-calc((100% - 15px*18) / 19); + width: calc((100% - 15px*18) / 19); +} +.row.no-gutter .col-auto:nth-last-child(19), +.row.no-gutter .col-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; +} +.row .col-auto:nth-last-child(20), +.row .col-auto:nth-last-child(20) ~ .col-auto { + width: 5%; + width: -webkit-calc((100% - 15px*19) / 20); + width: calc((100% - 15px*19) / 20); +} +.row.no-gutter .col-auto:nth-last-child(20), +.row.no-gutter .col-auto:nth-last-child(20) ~ .col-auto { + width: 5%; +} +.row .col-auto:nth-last-child(21), +.row .col-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; + width: -webkit-calc((100% - 15px*20) / 21); + width: calc((100% - 15px*20) / 21); +} +.row.no-gutter .col-auto:nth-last-child(21), +.row.no-gutter .col-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; +} +@media all and (min-width: 768px) { + .row .tablet-100 { + width: 100%; + width: -webkit-calc((100% - 15px*0) / 1); + width: calc((100% - 15px*0) / 1); + } + .row.no-gutter .tablet-100 { + width: 100%; + } + .row .tablet-95 { + width: 95%; + width: -webkit-calc((100% - 15px*0.05263157894736836) / 1.0526315789473684); + width: calc((100% - 15px*0.05263157894736836) / 1.0526315789473684); + } + .row.no-gutter .tablet-95 { + width: 95%; + } + .row .tablet-90 { + width: 90%; + width: -webkit-calc((100% - 15px*0.11111111111111116) / 1.1111111111111112); + width: calc((100% - 15px*0.11111111111111116) / 1.1111111111111112); + } + .row.no-gutter .tablet-90 { + width: 90%; + } + .row .tablet-85 { + width: 85%; + width: -webkit-calc((100% - 15px*0.17647058823529416) / 1.1764705882352942); + width: calc((100% - 15px*0.17647058823529416) / 1.1764705882352942); + } + .row.no-gutter .tablet-85 { + width: 85%; + } + .row .tablet-80 { + width: 80%; + width: -webkit-calc((100% - 15px*0.25) / 1.25); + width: calc((100% - 15px*0.25) / 1.25); + } + .row.no-gutter .tablet-80 { + width: 80%; + } + .row .tablet-75 { + width: 75%; + width: -webkit-calc((100% - 15px*0.33333333333333326) / 1.3333333333333333); + width: calc((100% - 15px*0.33333333333333326) / 1.3333333333333333); + } + .row.no-gutter .tablet-75 { + width: 75%; + } + .row .tablet-70 { + width: 70%; + width: -webkit-calc((100% - 15px*0.4285714285714286) / 1.4285714285714286); + width: calc((100% - 15px*0.4285714285714286) / 1.4285714285714286); + } + .row.no-gutter .tablet-70 { + width: 70%; + } + .row .tablet-66 { + width: 66.66666666666666%; + width: -webkit-calc((100% - 15px*0.5000000000000002) / 1.5000000000000002); + width: calc((100% - 15px*0.5000000000000002) / 1.5000000000000002); + } + .row.no-gutter .tablet-66 { + width: 66.66666666666666%; + } + .row .tablet-65 { + width: 65%; + width: -webkit-calc((100% - 15px*0.5384615384615385) / 1.5384615384615385); + width: calc((100% - 15px*0.5384615384615385) / 1.5384615384615385); + } + .row.no-gutter .tablet-65 { + width: 65%; + } + .row .tablet-60 { + width: 60%; + width: -webkit-calc((100% - 15px*0.6666666666666667) / 1.6666666666666667); + width: calc((100% - 15px*0.6666666666666667) / 1.6666666666666667); + } + .row.no-gutter .tablet-60 { + width: 60%; + } + .row .tablet-55 { + width: 55%; + width: -webkit-calc((100% - 15px*0.8181818181818181) / 1.8181818181818181); + width: calc((100% - 15px*0.8181818181818181) / 1.8181818181818181); + } + .row.no-gutter .tablet-55 { + width: 55%; + } + .row .tablet-50 { + width: 50%; + width: -webkit-calc((100% - 15px*1) / 2); + width: calc((100% - 15px*1) / 2); + } + .row.no-gutter .tablet-50 { + width: 50%; + } + .row .tablet-45 { + width: 45%; + width: -webkit-calc((100% - 15px*1.2222222222222223) / 2.2222222222222223); + width: calc((100% - 15px*1.2222222222222223) / 2.2222222222222223); + } + .row.no-gutter .tablet-45 { + width: 45%; + } + .row .tablet-40 { + width: 40%; + width: -webkit-calc((100% - 15px*1.5) / 2.5); + width: calc((100% - 15px*1.5) / 2.5); + } + .row.no-gutter .tablet-40 { + width: 40%; + } + .row .tablet-35 { + width: 35%; + width: -webkit-calc((100% - 15px*1.8571428571428572) / 2.857142857142857); + width: calc((100% - 15px*1.8571428571428572) / 2.857142857142857); + } + .row.no-gutter .tablet-35 { + width: 35%; + } + .row .tablet-33 { + width: 33.333333333333336%; + width: -webkit-calc((100% - 15px*2) / 3); + width: calc((100% - 15px*2) / 3); + } + .row.no-gutter .tablet-33 { + width: 33.333333333333336%; + } + .row .tablet-30 { + width: 30%; + width: -webkit-calc((100% - 15px*2.3333333333333335) / 3.3333333333333335); + width: calc((100% - 15px*2.3333333333333335) / 3.3333333333333335); + } + .row.no-gutter .tablet-30 { + width: 30%; + } + .row .tablet-25 { + width: 25%; + width: -webkit-calc((100% - 15px*3) / 4); + width: calc((100% - 15px*3) / 4); + } + .row.no-gutter .tablet-25 { + width: 25%; + } + .row .tablet-20 { + width: 20%; + width: -webkit-calc((100% - 15px*4) / 5); + width: calc((100% - 15px*4) / 5); + } + .row.no-gutter .tablet-20 { + width: 20%; + } + .row .tablet-15 { + width: 15%; + width: -webkit-calc((100% - 15px*5.666666666666667) / 6.666666666666667); + width: calc((100% - 15px*5.666666666666667) / 6.666666666666667); + } + .row.no-gutter .tablet-15 { + width: 15%; + } + .row .tablet-10 { + width: 10%; + width: -webkit-calc((100% - 15px*9) / 10); + width: calc((100% - 15px*9) / 10); + } + .row.no-gutter .tablet-10 { + width: 10%; + } + .row .tablet-5 { + width: 5%; + width: -webkit-calc((100% - 15px*19) / 20); + width: calc((100% - 15px*19) / 20); + } + .row.no-gutter .tablet-5 { + width: 5%; + } + .row .tablet-auto:nth-last-child(1), + .row .tablet-auto:nth-last-child(1) ~ .col-auto { + width: 100%; + width: -webkit-calc((100% - 15px*0) / 1); + width: calc((100% - 15px*0) / 1); + } + .row.no-gutter .tablet-auto:nth-last-child(1), + .row.no-gutter .tablet-auto:nth-last-child(1) ~ .tablet-auto { + width: 100%; + } + .row .tablet-auto:nth-last-child(2), + .row .tablet-auto:nth-last-child(2) ~ .col-auto { + width: 50%; + width: -webkit-calc((100% - 15px*1) / 2); + width: calc((100% - 15px*1) / 2); + } + .row.no-gutter .tablet-auto:nth-last-child(2), + .row.no-gutter .tablet-auto:nth-last-child(2) ~ .tablet-auto { + width: 50%; + } + .row .tablet-auto:nth-last-child(3), + .row .tablet-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; + width: -webkit-calc((100% - 15px*2) / 3); + width: calc((100% - 15px*2) / 3); + } + .row.no-gutter .tablet-auto:nth-last-child(3), + .row.no-gutter .tablet-auto:nth-last-child(3) ~ .tablet-auto { + width: 33.33333333%; + } + .row .tablet-auto:nth-last-child(4), + .row .tablet-auto:nth-last-child(4) ~ .col-auto { + width: 25%; + width: -webkit-calc((100% - 15px*3) / 4); + width: calc((100% - 15px*3) / 4); + } + .row.no-gutter .tablet-auto:nth-last-child(4), + .row.no-gutter .tablet-auto:nth-last-child(4) ~ .tablet-auto { + width: 25%; + } + .row .tablet-auto:nth-last-child(5), + .row .tablet-auto:nth-last-child(5) ~ .col-auto { + width: 20%; + width: -webkit-calc((100% - 15px*4) / 5); + width: calc((100% - 15px*4) / 5); + } + .row.no-gutter .tablet-auto:nth-last-child(5), + .row.no-gutter .tablet-auto:nth-last-child(5) ~ .tablet-auto { + width: 20%; + } + .row .tablet-auto:nth-last-child(6), + .row .tablet-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; + width: -webkit-calc((100% - 15px*5) / 6); + width: calc((100% - 15px*5) / 6); + } + .row.no-gutter .tablet-auto:nth-last-child(6), + .row.no-gutter .tablet-auto:nth-last-child(6) ~ .tablet-auto { + width: 16.66666667%; + } + .row .tablet-auto:nth-last-child(7), + .row .tablet-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; + width: -webkit-calc((100% - 15px*6) / 7); + width: calc((100% - 15px*6) / 7); + } + .row.no-gutter .tablet-auto:nth-last-child(7), + .row.no-gutter .tablet-auto:nth-last-child(7) ~ .tablet-auto { + width: 14.28571429%; + } + .row .tablet-auto:nth-last-child(8), + .row .tablet-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; + width: -webkit-calc((100% - 15px*7) / 8); + width: calc((100% - 15px*7) / 8); + } + .row.no-gutter .tablet-auto:nth-last-child(8), + .row.no-gutter .tablet-auto:nth-last-child(8) ~ .tablet-auto { + width: 12.5%; + } + .row .tablet-auto:nth-last-child(9), + .row .tablet-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; + width: -webkit-calc((100% - 15px*8) / 9); + width: calc((100% - 15px*8) / 9); + } + .row.no-gutter .tablet-auto:nth-last-child(9), + .row.no-gutter .tablet-auto:nth-last-child(9) ~ .tablet-auto { + width: 11.11111111%; + } + .row .tablet-auto:nth-last-child(10), + .row .tablet-auto:nth-last-child(10) ~ .col-auto { + width: 10%; + width: -webkit-calc((100% - 15px*9) / 10); + width: calc((100% - 15px*9) / 10); + } + .row.no-gutter .tablet-auto:nth-last-child(10), + .row.no-gutter .tablet-auto:nth-last-child(10) ~ .tablet-auto { + width: 10%; + } + .row .tablet-auto:nth-last-child(11), + .row .tablet-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; + width: -webkit-calc((100% - 15px*10) / 11); + width: calc((100% - 15px*10) / 11); + } + .row.no-gutter .tablet-auto:nth-last-child(11), + .row.no-gutter .tablet-auto:nth-last-child(11) ~ .tablet-auto { + width: 9.09090909%; + } + .row .tablet-auto:nth-last-child(12), + .row .tablet-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; + width: -webkit-calc((100% - 15px*11) / 12); + width: calc((100% - 15px*11) / 12); + } + .row.no-gutter .tablet-auto:nth-last-child(12), + .row.no-gutter .tablet-auto:nth-last-child(12) ~ .tablet-auto { + width: 8.33333333%; + } + .row .tablet-auto:nth-last-child(13), + .row .tablet-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; + width: -webkit-calc((100% - 15px*12) / 13); + width: calc((100% - 15px*12) / 13); + } + .row.no-gutter .tablet-auto:nth-last-child(13), + .row.no-gutter .tablet-auto:nth-last-child(13) ~ .tablet-auto { + width: 7.69230769%; + } + .row .tablet-auto:nth-last-child(14), + .row .tablet-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; + width: -webkit-calc((100% - 15px*13) / 14); + width: calc((100% - 15px*13) / 14); + } + .row.no-gutter .tablet-auto:nth-last-child(14), + .row.no-gutter .tablet-auto:nth-last-child(14) ~ .tablet-auto { + width: 7.14285714%; + } + .row .tablet-auto:nth-last-child(15), + .row .tablet-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; + width: -webkit-calc((100% - 15px*14) / 15); + width: calc((100% - 15px*14) / 15); + } + .row.no-gutter .tablet-auto:nth-last-child(15), + .row.no-gutter .tablet-auto:nth-last-child(15) ~ .tablet-auto { + width: 6.66666667%; + } + .row .tablet-auto:nth-last-child(16), + .row .tablet-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; + width: -webkit-calc((100% - 15px*15) / 16); + width: calc((100% - 15px*15) / 16); + } + .row.no-gutter .tablet-auto:nth-last-child(16), + .row.no-gutter .tablet-auto:nth-last-child(16) ~ .tablet-auto { + width: 6.25%; + } + .row .tablet-auto:nth-last-child(17), + .row .tablet-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; + width: -webkit-calc((100% - 15px*16) / 17); + width: calc((100% - 15px*16) / 17); + } + .row.no-gutter .tablet-auto:nth-last-child(17), + .row.no-gutter .tablet-auto:nth-last-child(17) ~ .tablet-auto { + width: 5.88235294%; + } + .row .tablet-auto:nth-last-child(18), + .row .tablet-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; + width: -webkit-calc((100% - 15px*17) / 18); + width: calc((100% - 15px*17) / 18); + } + .row.no-gutter .tablet-auto:nth-last-child(18), + .row.no-gutter .tablet-auto:nth-last-child(18) ~ .tablet-auto { + width: 5.55555556%; + } + .row .tablet-auto:nth-last-child(19), + .row .tablet-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; + width: -webkit-calc((100% - 15px*18) / 19); + width: calc((100% - 15px*18) / 19); + } + .row.no-gutter .tablet-auto:nth-last-child(19), + .row.no-gutter .tablet-auto:nth-last-child(19) ~ .tablet-auto { + width: 5.26315789%; + } + .row .tablet-auto:nth-last-child(20), + .row .tablet-auto:nth-last-child(20) ~ .col-auto { + width: 5%; + width: -webkit-calc((100% - 15px*19) / 20); + width: calc((100% - 15px*19) / 20); + } + .row.no-gutter .tablet-auto:nth-last-child(20), + .row.no-gutter .tablet-auto:nth-last-child(20) ~ .tablet-auto { + width: 5%; + } + .row .tablet-auto:nth-last-child(21), + .row .tablet-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; + width: -webkit-calc((100% - 15px*20) / 21); + width: calc((100% - 15px*20) / 21); + } + .row.no-gutter .tablet-auto:nth-last-child(21), + .row.no-gutter .tablet-auto:nth-last-child(21) ~ .tablet-auto { + width: 4.76190476%; + } +} +/* === Views === */ +.views, +.view { + position: relative; + height: 100%; + z-index: 5000; +} +.views { + overflow: auto; + -webkit-overflow-scrolling: touch; +} +.view { + overflow: hidden; + box-sizing: border-box; + width: 100%; +} +/* === Pages === */ +.pages { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; + background: #000; +} +.page { + box-sizing: border-box; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: #efeff4; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.page.cached { + display: none; +} +.page-on-left { + -webkit-transform: translate3d(-20%, 0, 0); + transform: translate3d(-20%, 0, 0); +} +.page-on-left .swipeback-page-opacity { + opacity: 1; +} +.page-on-left:after { + opacity: 1; +} +.page-on-center .swipeback-page-shadow { + opacity: 1; +} +.page-on-center .swipeback-page-opacity { + opacity: 0 !important; +} +.page-on-right { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); +} +.page-on-right .swipeback-page-shadow { + opacity: 0 !important; +} +.page-content { + overflow: auto; + -webkit-overflow-scrolling: touch; + box-sizing: border-box; + height: 100%; + position: relative; + z-index: 1; +} +.swipeback-page-shadow { + position: absolute; + right: 100%; + top: 0; + width: 16px; + height: 100%; + background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); + background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); + z-index: -1; + content: ''; + will-change: opacity; + contain: strict; +} +html.android .swipeback-page-shadow { + display: none; + -webkit-animation: none; + animation: none; +} +.swipeback-page-opacity { + position: absolute; + left: 0; + top: 0; + background: rgba(0, 0, 0, 0.1); + width: 100%; + height: 100%; + content: ''; + opacity: 0; + z-index: 10000; + will-change: opacity; + contain: strict; +} +.page-transitioning, +.page-transitioning .swipeback-page-shadow, +.page-transitioning .swipeback-page-opacity { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.page-from-right-to-center:before, +.page-from-center-to-right:before { + position: absolute; + right: 100%; + top: 0; + width: 16px; + height: 100%; + background: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); + background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); + z-index: -1; + content: ''; + will-change: opacity; + contain: strict; +} +html.android .page-from-right-to-center:before, +html.android .page-from-center-to-right:before { + display: none; + -webkit-animation: none; + animation: none; +} +.page-from-right-to-center { + -webkit-animation: pageFromRightToCenter 400ms forwards; + animation: pageFromRightToCenter 400ms forwards; +} +.page-from-right-to-center:before { + -webkit-animation: pageFromRightToCenterShadow 400ms forwards; + animation: pageFromRightToCenterShadow 400ms forwards; +} +.page-from-center-to-right { + -webkit-animation: pageFromCenterToRight 400ms forwards; + animation: pageFromCenterToRight 400ms forwards; +} +.page-from-center-to-right:before { + -webkit-animation: pageFromCenterToRightShadow 400ms forwards; + animation: pageFromCenterToRightShadow 400ms forwards; +} +@-webkit-keyframes pageFromRightToCenter { + from { + -webkit-transform: translate3d(100%, 0, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + } +} +@keyframes pageFromRightToCenter { + from { + transform: translate3d(100%, 0, 0); + } + to { + transform: translate3d(0, 0, 0); + } +} +@-webkit-keyframes pageFromRightToCenterShadow { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes pageFromRightToCenterShadow { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@-webkit-keyframes pageFromCenterToRight { + from { + -webkit-transform: translate3d(0, 0, 0); + } + to { + -webkit-transform: translate3d(100%, 0, 0); + } +} +@keyframes pageFromCenterToRight { + from { + transform: translate3d(0, 0, 0); + } + to { + transform: translate3d(100%, 0, 0); + } +} +@-webkit-keyframes pageFromCenterToRightShadow { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@keyframes pageFromCenterToRightShadow { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +.page-from-center-to-left { + -webkit-animation: pageFromCenterToLeft 400ms forwards; + animation: pageFromCenterToLeft 400ms forwards; +} +.page-from-center-to-left:after { + position: absolute; + left: 0; + top: 0; + background: rgba(0, 0, 0, 0.1); + width: 100%; + height: 100%; + content: ''; + opacity: 0; + z-index: 10000; + will-change: opacity; + contain: strict; + -webkit-animation: pageFromCenterToLeftOpacity 400ms forwards; + animation: pageFromCenterToLeftOpacity 400ms forwards; +} +.page-from-left-to-center { + -webkit-animation: pageFromLeftToCenter 400ms forwards; + animation: pageFromLeftToCenter 400ms forwards; +} +.page-from-left-to-center:after { + position: absolute; + left: 0; + top: 0; + background: rgba(0, 0, 0, 0.1); + width: 100%; + height: 100%; + content: ''; + opacity: 0; + z-index: 10000; + will-change: opacity; + contain: strict; + -webkit-animation: pageFromLeftToCenterOpacity 400ms forwards; + animation: pageFromLeftToCenterOpacity 400ms forwards; +} +@-webkit-keyframes pageFromCenterToLeft { + from { + -webkit-transform: translate3d(0, 0, 0); + } + to { + -webkit-transform: translate3d(-20%, 0, 0); + } +} +@keyframes pageFromCenterToLeft { + from { + transform: translate3d(0, 0, 0); + } + to { + transform: translate3d(-20%, 0, 0); + } +} +@-webkit-keyframes pageFromLeftToCenter { + from { + -webkit-transform: translate3d(-20%, 0, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + } +} +@keyframes pageFromLeftToCenter { + from { + transform: translate3d(-20%, 0, 0); + } + to { + transform: translate3d(0, 0, 0); + } +} +@-webkit-keyframes pageFromCenterToLeftOpacity { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes pageFromCenterToLeftOpacity { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@-webkit-keyframes pageFromLeftToCenterOpacity { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@keyframes pageFromLeftToCenterOpacity { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +/* === Toolbars === */ +.navbar-inner, +.toolbar-inner { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + padding: 0 8px; + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.navbar-inner.cached { + display: none; +} +.navbar, +.toolbar { + height: 44px; + width: 100%; + box-sizing: border-box; + font-size: 17px; + position: relative; + margin: 0; + z-index: 500; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.navbar b, +.toolbar b { + font-weight: 500; +} +html.ios-gt-8 .navbar b, +html.ios-gt-8 .toolbar b { + font-weight: 600; +} +.navbar, +.toolbar, +.subnavbar { + background: #f7f7f8; +} +.navbar a.link, +.toolbar a.link, +.subnavbar a.link { + line-height: 44px; + height: 44px; + text-decoration: none; + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: translateZ(0px); + transform: translateZ(0px); +} +html:not(.watch-active-state) .navbar a.link:active, +html:not(.watch-active-state) .toolbar a.link:active, +html:not(.watch-active-state) .subnavbar a.link:active, +.navbar a.link.active-state, +.toolbar a.link.active-state, +.subnavbar a.link.active-state { + opacity: 0.3; + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.navbar a.link i + span, +.toolbar a.link i + span, +.subnavbar a.link i + span, +.navbar a.link i + i, +.toolbar a.link i + i, +.subnavbar a.link i + i, +.navbar a.link span + i, +.toolbar a.link span + i, +.subnavbar a.link span + i, +.navbar a.link span + span, +.toolbar a.link span + span, +.subnavbar a.link span + span { + margin-left: 7px; +} +.navbar a.icon-only, +.toolbar a.icon-only, +.subnavbar a.icon-only { + min-width: 44px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + margin: 0; +} +.navbar i.icon, +.toolbar i.icon, +.subnavbar i.icon { + display: block; +} +.navbar { + left: 0; + top: 0; +} +.navbar:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .navbar:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .navbar:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.navbar:after { + backface-visibility: hidden; +} +.navbar.no-border:after { + display: none; +} +.navbar .center { + font-size: 17px; + font-weight: 500; + text-align: center; + margin: 0; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + line-height: 44px; + -webkit-flex-shrink: 10; + -ms-flex: 0 10 auto; + flex-shrink: 10; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +html.ios-gt-8 .navbar .center { + font-weight: 600; +} +.navbar .center .subtitle { + color: #6d6d72; + display: block; + line-height: 1; + bottom: 3px; + font-size: 10px; + position: absolute; + text-align: center; + width: 100%; +} +.navbar .left, +.navbar .right { + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.navbar .left a + a, +.navbar .right a + a { + margin-left: 15px; +} +.navbar .left { + margin-right: 10px; +} +.navbar .right { + margin-left: 10px; +} +.navbar .right:first-child { + position: absolute; + right: 8px; + height: 100%; +} +.popup .navbar { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.subnavbar { + height: 44px; + width: 100%; + position: absolute; + left: 0; + top: 100%; + margin-top: -1px; + z-index: 20; + box-sizing: border-box; + padding: 0 8px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.subnavbar:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .subnavbar:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .subnavbar:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.subnavbar.no-border:after { + display: none; +} +.navbar.no-border .subnavbar { + margin-top: 0; +} +.navbar-on-left .subnavbar, +.navbar-on-right .subnavbar { + pointer-events: none; +} +.navbar .subnavbar, +.page .subnavbar { + position: absolute; +} +.page > .subnavbar { + top: 0; + margin-top: 0; +} +.subnavbar > .buttons-row { + width: 100%; +} +.subnavbar .searchbar, +.subnavbar.searchbar { + position: absolute; +} +.subnavbar.searchbar, +.subnavbar .searchbar { + position: absolute; +} +.subnavbar .searchbar { + left: 0; + top: 0; +} +.toolbar { + left: 0; + bottom: 0; +} +.toolbar:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .toolbar:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .toolbar:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.toolbar.no-border:before { + display: none; +} +.toolbar a { + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.tabbar { + color: #929292; + z-index: 5001; +} +.tabbar a { + color: #929292; +} +.tabbar a.active { + color: #007aff; +} +.tabbar a.link { + line-height: 1.4; +} +.tabbar a.tab-link, +.tabbar a.link { + height: 100%; + width: 100%; + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + overflow: visible; + -webkit-box-flex: 1; + -ms-flex: 1; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.tabbar i.icon { + height: 30px; +} +.tabbar-labels { + height: 50px; +} +.tabbar-labels a.tab-link, +.tabbar-labels a.link { + padding-top: 4px; + padding-bottom: 4px; + height: 100%; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} +.tabbar-labels a.tab-link i + span, +.tabbar-labels a.link i + span { + margin: 0; +} +.tabbar-labels span.tabbar-label { + line-height: 1; + display: block; + margin: 0; + letter-spacing: 0.01em; + font-size: 10px; + position: relative; + text-overflow: ellipsis; + white-space: nowrap; +} +.subnavbar input[type="text"], +.navbar input[type="text"], +.subnavbar input[type="password"], +.navbar input[type="password"], +.subnavbar input[type="search"], +.navbar input[type="search"], +.subnavbar input[type="email"], +.navbar input[type="email"], +.subnavbar input[type="tel"], +.navbar input[type="tel"], +.subnavbar input[type="url"], +.navbar input[type="url"] { + box-sizing: border-box; + width: 100%; + height: 28px; + display: block; + border: none; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border-radius: 5px; + font-family: inherit; + color: #000; + font-size: 14px; + font-weight: normal; + padding: 0 8px; + background-color: #fff; +} +@media all and (min-width: 768px) { + .tabbar .toolbar-inner { + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + } + .tabbar a.tab-link, + .tabbar a.link { + width: auto; + min-width: 105px; + } + .tabbar-labels { + height: 56px; + } + .tabbar-labels span.tabbar-label { + font-size: 14px; + } +} +.navbar-from-right-to-center .left, +.navbar-from-right-to-center .right, +.navbar-from-right-to-center .center, +.navbar-from-right-to-center .subnavbar, +.navbar-from-right-to-center .fading { + -webkit-animation: navbarElementFadeIn 400ms forwards; + animation: navbarElementFadeIn 400ms forwards; +} +.navbar-from-right-to-center .sliding { + opacity: 1; +} +.navbar-from-center-to-right .left, +.navbar-from-center-to-right .right, +.navbar-from-center-to-right .center, +.navbar-from-center-to-right .subnavbar, +.navbar-from-center-to-right .fading { + -webkit-animation: navbarElementFadeOut 400ms forwards; + animation: navbarElementFadeOut 400ms forwards; +} +.navbar-from-center-to-right .sliding { + opacity: 0; +} +.navbar-from-center-to-right .subnavbar.sliding { + opacity: 1; +} +@-webkit-keyframes navbarElementFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes navbarElementFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +.navbar-from-center-to-left .left, +.navbar-from-center-to-left .right, +.navbar-from-center-to-left .center, +.navbar-from-center-to-left .subnavbar, +.navbar-from-center-to-left .fading { + -webkit-animation: navbarElementFadeOut 400ms forwards; + animation: navbarElementFadeOut 400ms forwards; +} +.navbar-from-center-to-left .sliding { + opacity: 0; +} +.navbar-from-center-to-left .subnavbar.sliding { + opacity: 1; +} +.navbar-from-left-to-center .left, +.navbar-from-left-to-center .right, +.navbar-from-left-to-center .center, +.navbar-from-left-to-center .subnavbar, +.navbar-from-left-to-center .fading { + -webkit-animation: navbarElementFadeIn 400ms forwards; + animation: navbarElementFadeIn 400ms forwards; +} +.navbar-from-left-to-center .sliding { + opacity: 1; +} +.navbar-on-left .left, +.navbar-on-left .right, +.navbar-on-left .center, +.navbar-on-left .subnavbar, +.navbar-on-left .fading { + opacity: 0; +} +.navbar-on-left .sliding { + opacity: 0; +} +.navbar-on-left .subnavbar.sliding { + opacity: 1; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); +} +.navbar-on-right .left, +.navbar-on-right .right, +.navbar-on-right .center, +.navbar-on-right .subnavbar, +.navbar-on-right .fading { + opacity: 0; +} +.navbar-on-right .sliding { + opacity: 0; +} +.navbar-on-right .subnavbar.sliding { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); +} +@-webkit-keyframes navbarElementFadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@keyframes navbarElementFadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +.navbar-from-right-to-center .left.sliding .back.link .icon, +.navbar-from-center-to-right .left.sliding .back.link .icon, +.navbar-from-center-to-left .left.sliding .back.link .icon, +.navbar-from-left-to-center .left.sliding .back.link .icon { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.navbar-from-right-to-center .sliding, +.navbar-from-center-to-right .sliding, +.navbar-from-center-to-left .sliding, +.navbar-from-left-to-center .sliding { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-animation: none; + animation: none; +} +/* === Relation between toolbar/navbar types and pages === */ +.page > .navbar, +.view > .navbar, +.views > .navbar, +.page > .toolbar, +.view > .toolbar, +.views > .toolbar { + position: absolute; +} +.subnavbar ~ .page-content { + padding-top: 44px; +} +.navbar-through .page-content, +.navbar-fixed .page-content { + padding-top: 44px; +} +.navbar-through .with-subnavbar .page-content, +.navbar-fixed .with-subnavbar .page-content, +.navbar-through .page-content.with-subnavbar, +.navbar-fixed .page-content.with-subnavbar, +.navbar-through .subnavbar ~ .page-content, +.navbar-fixed .subnavbar ~ .page-content { + padding-top: 88px; +} +.navbar-through .page .subnavbar, +.navbar-fixed .page .subnavbar, +.navbar-through.page .subnavbar, +.navbar-fixed.page .subnavbar { + top: 44px; +} +.toolbar-through .page-content, +.toolbar-fixed .page-content, +.tabbar-through .page-content, +.tabbar-fixed .page-content { + padding-bottom: 44px; +} +.tabbar-labels-fixed .page-content, +.tabbar-labels-through .page-content { + padding-bottom: 50px; +} +@media all and (min-width: 768px) { + .tabbar-labels-fixed .page-content, + .tabbar-labels-through .page-content { + padding-bottom: 56px; + } +} +.navbar.navbar-hiding { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.navbar.navbar-hiding ~ .page-content .list-group-title, +.navbar.navbar-hiding ~ .pages .list-group-title, +.navbar.navbar-hiding ~ .page .list-group-title { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.navbar.navbar-hiding ~ .page-content .subnavbar, +.navbar.navbar-hiding ~ .pages .subnavbar, +.navbar.navbar-hiding ~ .page .subnavbar { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.navbar.navbar-hidden { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); +} +.navbar.navbar-hidden ~ .page-content .list-group-title, +.navbar.navbar-hidden ~ .pages .list-group-title, +.navbar.navbar-hidden ~ .page .list-group-title { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + top: -44px; +} +.navbar.navbar-hidden ~ .page-content .subnavbar, +.navbar.navbar-hidden ~ .pages .subnavbar, +.navbar.navbar-hidden ~ .page .subnavbar { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.navbar.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.page.no-navbar .page-content { + padding-top: 0; +} +.page.no-navbar.with-subnavbar .page-content, +.with-subnavbar .page.no-navbar .page-content, +.page.no-navbar .page-content.with-subnavbar { + padding-top: 44px; +} +.toolbar.toolbar-hiding, +.tabbar.toolbar-hiding, +.toolbar.tabbar-hiding, +.tabbar.tabbar-hiding { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.toolbar.toolbar-hidden, +.tabbar.toolbar-hidden, +.toolbar.tabbar-hidden, +.tabbar.tabbar-hidden { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.toolbar.not-animated, +.tabbar.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.page.no-toolbar .page-content, +.page.no-tabbar .page-content { + padding-bottom: 0; +} +/* === Search Bar === */ +.searchbar { + height: 44px; + width: 100%; + background: #c9c9ce; + box-sizing: border-box; + padding: 0 8px; + overflow: hidden; + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.searchbar:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #b4b4b4; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .searchbar:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .searchbar:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.searchbar .searchbar-input { + width: 100%; + height: 28px; + position: relative; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; +} +.searchbar input[type="search"] { + box-sizing: border-box; + width: 100%; + height: 28px; + display: block; + border: none; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border-radius: 5px; + font-family: inherit; + color: #000; + font-size: 14px; + font-weight: normal; + padding: 0 8px; + background-color: #fff; + padding: 0 28px; + height: 100%; + background-repeat: no-repeat; + background-position: 8px center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2013'%20enable-background%3D'new%200%200%2013%2013'%3E%3Cg%3E%3Cpath%20fill%3D'%23939398'%20d%3D'M5%2C1c2.2%2C0%2C4%2C1.8%2C4%2C4S7.2%2C9%2C5%2C9S1%2C7.2%2C1%2C5S2.8%2C1%2C5%2C1%20M5%2C0C2.2%2C0%2C0%2C2.2%2C0%2C5s2.2%2C5%2C5%2C5s5-2.2%2C5-5S7.8%2C0%2C5%2C0%20L5%2C0z'%2F%3E%3C%2Fg%3E%3Cline%20stroke%3D'%23939398'%20stroke-miterlimit%3D'10'%20x1%3D'12.6'%20y1%3D'12.6'%20x2%3D'8.2'%20y2%3D'8.2'%2F%3E%3C%2Fsvg%3E"); + -webkit-background-size: 13px 13px; + background-size: 13px 13px; +} +.searchbar input[type="search"]::-webkit-input-placeholder { + color: #939398; + opacity: 1; +} +.searchbar input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} +.searchbar .searchbar-clear { + position: absolute; + width: 28px; + height: 28px; + right: 0; + top: 0; + opacity: 0; + pointer-events: none; + background-position: center; + background-repeat: no-repeat; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2028%2028'%3E%3Ccircle%20cx%3D'14'%20cy%3D'14'%20r%3D'14'%20fill%3D'%238e8e93'%2F%3E%3Cline%20stroke%3D'%23ffffff'%20stroke-width%3D'2'%20stroke-miterlimit%3D'10'%20x1%3D'8'%20y1%3D'8'%20x2%3D'20'%20y2%3D'20'%2F%3E%3Cline%20fill%3D'none'%20stroke%3D'%23ffffff'%20stroke-width%3D'2'%20stroke-miterlimit%3D'10'%20x1%3D'20'%20y1%3D'8'%20x2%3D'8'%20y2%3D'20'%2F%3E%3C%2Fsvg%3E"); + -webkit-background-size: 14px 14px; + background-size: 14px 14px; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + cursor: pointer; +} +.searchbar .searchbar-cancel { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + font-size: 17px; + cursor: pointer; + opacity: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + margin-left: 0; + pointer-events: none; + display: none; +} +.searchbar.searchbar-active .searchbar-cancel { + margin-left: 8px; + opacity: 1; + pointer-events: auto; +} +html:not(.watch-active-state) .searchbar.searchbar-active .searchbar-cancel:active, +.searchbar.searchbar-active .searchbar-cancel.active-state { + opacity: 0.3; + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.searchbar.searchbar-not-empty .searchbar-clear { + pointer-events: auto; + opacity: 1; +} +.searchbar-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 100; + opacity: 0; + pointer-events: none; + background: rgba(0, 0, 0, 0.4); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.searchbar-overlay.searchbar-overlay-active { + opacity: 1; + pointer-events: auto; +} +.searchbar-not-found { + display: none; +} +.hidden-by-searchbar, +.list-block .hidden-by-searchbar, +.list-block li.hidden-by-searchbar { + display: none; +} +.page > .searchbar { + position: absolute; + width: 100%; + left: 0; + top: 0; + z-index: 200; +} +.page > .searchbar ~ .page-content { + padding-top: 44px; +} +.navbar-fixed .page > .searchbar, +.navbar-through .page > .searchbar, +.navbar-fixed > .searchbar, +.navbar-through > .searchbar { + top: 44px; +} +.navbar-fixed .page > .searchbar ~ .page-content, +.navbar-through .page > .searchbar ~ .page-content, +.navbar-fixed > .searchbar ~ .page-content, +.navbar-through > .searchbar ~ .page-content { + padding-top: 88px; +} +/* === Message Bar === */ +.messagebar { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-transition-duration: 0ms; + transition-duration: 0ms; + background: #fff; +} +.messagebar:before { + display: none; +} +.messagebar textarea { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid #c8c8cd; + background: #fff; + border-radius: 17px; + box-shadow: none; + display: block; + padding: 6px 15px; + margin: 0; + width: 100%; + height: 34px; + color: #000; + font-size: 17px; + line-height: 20px; + font-family: inherit; + resize: none; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; +} +.messagebar .link { + -ms-flex-item-align: flex-end; + -webkit-align-self: flex-end; + align-self: flex-end; +} +.messagebar .link.icon-only:first-child { + margin-left: -6px; +} +.messagebar .link:not(.icon-only) + textarea { + margin-left: 8px; +} +.messagebar textarea + .link { + margin-left: 8px; +} +.messagebar .link { + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; +} +.page.no-toolbar .messagebar ~ .page-content, +.page.no-tabbar .messagebar ~ .page-content { + padding-bottom: 44px; +} +.hidden-toolbar .messagebar { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +/* === Icons === */ +i.icon { + display: inline-block; + vertical-align: middle; + background-size: 100% auto; + background-position: center; + background-repeat: no-repeat; + font-style: normal; + position: relative; +} +i.icon.icon-back { + width: 12px; + height: 20px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-forward { + width: 12px; + height: 20px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-bars { + width: 21px; + height: 14px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E"); +} +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2ddpx) { + i.icon.icon-bars { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E"); + height: 13px; + } +} +i.icon.icon-camera { + width: 25px; + height: 20px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20x%3D'0px'%20y%3D'0px'%20viewBox%3D'0%200%2025%2020'%3E%3Cpath%20fill%3D'%238C8D92'%20d%3D'M13.3%2C5.5c-2.7%2C0-5%2C2.2-5%2C5s2.2%2C5%2C5%2C5c2.7%2C0%2C5-2.2%2C5-5S16%2C5.5%2C13.3%2C5.5z'%2F%3E%3Cpath%20fill%3D'%238C8D92'%20d%3D'M22.8%2C1.8h-3.3c-0.2-1.3-1-1.8-2-1.8H8.1c-1%2C0-1.8%2C0.4-2%2C1.8H2.8C1.4%2C1.8%2C0%2C2.8%2C0%2C4.2v12.6%20c0%2C1.4%2C1.4%2C2.5%2C2.8%2C2.5h20c1.4%2C0%2C2.2-1.1%2C2.2-2.5V4.2C25%2C2.8%2C24.2%2C1.8%2C22.8%2C1.8z%20M3.5%2C6.4C2.6%2C6.4%2C2%2C5.8%2C2%2C5c0-0.8%2C0.7-1.5%2C1.5-1.5%20S5%2C4.1%2C5%2C5C5%2C5.8%2C4.3%2C6.4%2C3.5%2C6.4z%20M13.3%2C16.8c-3.5%2C0-6.3-2.7-6.3-6.2c0-3.3%2C2.5-6.2%2C5.7-6.2h1.2c3.2%2C0%2C5.7%2C2.9%2C5.7%2C6.2%20C19.6%2C14.1%2C16.7%2C16.8%2C13.3%2C16.8z'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-f7 { + width: 29px; + height: 29px; + background-image: url("../img/i-f7-ios.png"); + border-radius: 6px; +} +i.icon.icon-next, +i.icon.icon-prev { + width: 15px; + height: 15px; +} +i.icon.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon.icon-plus { + width: 25px; + height: 25px; + font-size: 31px; + line-height: 20px; + text-align: center; + font-weight: 100; +} +.navbar .framework7-icons, +.navbar .f7-icons, +.toolbar .framework7-icons, +.toolbar .f7-icons { + font-size: 22px; +} +.tabbar .framework7-icons, +.tabbar .f7-icons, +.tabbar-labels .framework7-icons, +.tabbar-labels .f7-icons { + font-size: 25px; +} +.item-media .framework7-icons, +.item-media .f7-icons { + font-size: 29px; +} +.button .framework7-icons, +.button .f7-icons { + font-size: 22px; +} +.item-actions .framework7-icons, +.item-actions .f7-icons { + font-size: 23px; + vertical-align: top; +} +.badge { + font-size: 13px; + display: inline-block; + color: #fff; + background: #8e8e93; + border-radius: 20px; + padding: 0px 6px; + height: 20px; + line-height: 20px; + box-sizing: border-box; + text-align: center; +} +.item-after .badge { + min-width: 20px; +} +.icon .badge, +.f7-icons .badge, +.framework7-icons .badge { + position: absolute; + left: 100%; + margin-left: -10px; + top: -2px; + font-size: 10px; + line-height: 16px; + height: 16px; + border-radius: 16px; + padding: 0px 4px; + min-width: 16px; + font-family: -apple-system, SF UI Text, Helvetica Neue, Helvetica, Arial, sans-serif; +} +/* === Chips === */ +.chip { + font-size: 14px; + font-weight: normal; + color: #fff; + background: rgba(0, 0, 0, 0.37); + display: inline-block; + height: 23px; + line-height: 23px; + border-radius: 5px; + padding: 0 6px; + box-sizing: border-box; + vertical-align: middle; + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: -webkit-inline-flex; + display: inline-flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + margin: 2px 0; +} +.chip-media { + width: 16px; + height: 16px; + vertical-align: middle; + border-radius: 50%; + text-align: center; + line-height: 16px; + color: #fff; + font-size: 12px; + box-sizing: border-box; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; +} +.chip-media img { + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; + border-radius: 50%; + display: block; +} +.chip-media + .chip-label { + margin-left: 4px; +} +.chip-media i.icon { + font-size: 16px; + height: 16px; +} +.chip-label { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + position: relative; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + min-width: 0; +} +.chip-delete { + margin-right: -6px; + width: 23px; + height: 23px; + text-align: center; + line-height: 23px; + cursor: pointer; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2028%2028'%3E%3Ccircle%20cx%3D'14'%20cy%3D'14'%20r%3D'14'%20fill%3D'%23fff'%2F%3E%3Cline%20stroke%3D'%23000'%20stroke-width%3D'2'%20stroke-miterlimit%3D'10'%20x1%3D'8'%20y1%3D'8'%20x2%3D'20'%20y2%3D'20'%2F%3E%3Cline%20fill%3D'none'%20stroke%3D'%23000'%20stroke-width%3D'2'%20stroke-miterlimit%3D'10'%20x1%3D'20'%20y1%3D'8'%20x2%3D'8'%20y2%3D'20'%2F%3E%3C%2Fsvg%3E"); + background-repeat: no-repeat; + background-position: center; + -webkit-background-size: 13px 13px; + background-size: 13px 13px; + opacity: 0.7; +} +html:not(.watch-active-state) .chip-delete:active, +.chip-delete.active-state { + opacity: 1; +} +/* === Content Block === */ +.content-block { + margin: 35px 0; + padding: 0 15px; + color: #6d6d72; + box-sizing: border-box; +} +.content-block.no-hairlines:before, +.content-block.no-hairlines ul:before, +.content-block.no-hairlines .content-block-inner:before { + display: none; +} +.content-block.no-hairlines:after, +.content-block.no-hairlines ul:after, +.content-block.no-hairlines .content-block-inner:after { + display: none; +} +.content-block-title { + position: relative; + overflow: hidden; + margin: 0; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 14px; + text-transform: uppercase; + line-height: 1; + color: #6d6d72; + margin: 35px 15px 10px; +} +.content-block-title + .list-block, +.content-block-title + .content-block, +.content-block-title + .card, +.content-block-title + .timeline { + margin-top: 10px; +} +.content-block-inner { + background: #fff; + padding: 10px 15px; + margin-left: -15px; + width: 100%; + position: relative; + color: #000; +} +.content-block-inner:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #c8c7cc; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .content-block-inner:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .content-block-inner:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.content-block-inner:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #c8c7cc; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .content-block-inner:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .content-block-inner:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.content-block.inset { + margin-left: 15px; + margin-right: 15px; + border-radius: 7px; +} +.content-block.inset .content-block-inner { + border-radius: 7px; +} +.content-block.inset .content-block-inner:before { + display: none; +} +.content-block.inset .content-block-inner:after { + display: none; +} +@media all and (min-width: 768px) { + .content-block.tablet-inset { + margin-left: 15px; + margin-right: 15px; + border-radius: 7px; + } + .content-block.tablet-inset .content-block-inner { + border-radius: 7px; + } + .content-block.tablet-inset .content-block-inner:before { + display: none; + } + .content-block.tablet-inset .content-block-inner:after { + display: none; + } +} +/* === Lists === */ +.list-block { + margin: 35px 0; + font-size: 17px; +} +.list-block ul { + background: #fff; + list-style: none; + padding: 0; + margin: 0; + position: relative; +} +.list-block ul:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #c8c7cc; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .list-block ul:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .list-block ul:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.list-block ul:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #c8c7cc; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .list-block ul:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .list-block ul:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.list-block ul ul { + padding-left: 45px; +} +.list-block ul ul:before { + display: none; +} +.list-block ul ul:after { + display: none; +} +.list-block .align-top, +.list-block .align-top .item-content, +.list-block .align-top .item-inner { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.list-block.inset { + margin-left: 15px; + margin-right: 15px; + border-radius: 7px; +} +.list-block.inset .content-block-title { + margin-left: 0; + margin-right: 0; +} +.list-block.inset ul { + border-radius: 7px; +} +.list-block.inset ul:before { + display: none; +} +.list-block.inset ul:after { + display: none; +} +.list-block.inset li:first-child > a { + border-radius: 7px 7px 0 0; +} +.list-block.inset li:last-child > a { + border-radius: 0 0 7px 7px; +} +.list-block.inset li:first-child:last-child > a { + border-radius: 7px; +} +@media all and (min-width: 768px) { + .list-block.tablet-inset { + margin-left: 15px; + margin-right: 15px; + border-radius: 7px; + } + .list-block.tablet-inset .content-block-title { + margin-left: 0; + margin-right: 0; + } + .list-block.tablet-inset ul { + border-radius: 7px; + } + .list-block.tablet-inset ul:before { + display: none; + } + .list-block.tablet-inset ul:after { + display: none; + } + .list-block.tablet-inset li:first-child > a { + border-radius: 7px 7px 0 0; + } + .list-block.tablet-inset li:last-child > a { + border-radius: 0 0 7px 7px; + } + .list-block.tablet-inset li:first-child:last-child > a { + border-radius: 7px; + } + .list-block.tablet-inset .content-block-title { + margin-left: 0; + margin-right: 0; + } + .list-block.tablet-inset ul { + border-radius: 7px; + } + .list-block.tablet-inset ul:before { + display: none; + } + .list-block.tablet-inset ul:after { + display: none; + } + .list-block.tablet-inset li:first-child > a { + border-radius: 7px 7px 0 0; + } + .list-block.tablet-inset li:last-child > a { + border-radius: 0 0 7px 7px; + } + .list-block.tablet-inset li:first-child:last-child > a { + border-radius: 7px; + } +} +.list-block li { + box-sizing: border-box; + position: relative; +} +.list-block .item-media { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + -webkit-box-lines: single; + -moz-box-lines: single; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: none; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + box-sizing: border-box; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + padding-top: 7px; + padding-bottom: 8px; +} +.list-block .item-media i + i { + margin-left: 5px; +} +.list-block .item-media i + img { + margin-left: 5px; +} +.list-block .item-media + .item-inner { + margin-left: 15px; +} +.list-block .item-inner { + padding-right: 15px; + position: relative; + width: 100%; + padding-top: 8px; + padding-bottom: 7px; + min-height: 44px; + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-flex: 1; + -ms-flex: 1; + overflow: hidden; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -ms-flex-item-align: stretch; + -webkit-align-self: stretch; + align-self: stretch; +} +.list-block .item-inner:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #c8c7cc; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .list-block .item-inner:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .list-block .item-inner:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.list-block .item-title { + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + min-width: 0; + white-space: nowrap; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; +} +.list-block .item-after { + white-space: nowrap; + color: #8e8e93; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + margin-left: auto; + padding-left: 5px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + max-height: 28px; +} +.list-block .smart-select .item-after, +.list-block .autocomplete-opener .item-after { + max-width: 70%; + overflow: hidden; + text-overflow: ellipsis; + position: relative; + display: block; +} +.list-block .item-actions { + margin-left: auto; + padding-left: 15px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} +.list-block .item-actions a { + min-width: 23px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +html:not(.watch-active-state) .list-block .item-actions a:active, +.list-block .item-actions a.active-state { + opacity: 0.3; + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.list-block .item-actions a + a { + margin-left: 8px; +} +.list-block .item-after + .item-actions { + margin-left: 0; +} +.list-block .item-link, +.list-block .list-button { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + display: block; + color: inherit; +} +.list-block .item-link .item-inner, +.list-block .list-button .item-inner { + padding-right: 35px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E"); + background-size: 10px 20px; + background-repeat: no-repeat; + background-position: 95% center; + background-position: -webkit-calc(100% - 15px) center; + background-position: calc(100% - 15px) center; +} +html:not(.watch-active-state) .list-block .item-link:active, +html:not(.watch-active-state) .list-block .list-button:active, +.list-block .item-link.active-state, +.list-block .list-button.active-state { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; + background-color: #d9d9d9; +} +html:not(.watch-active-state) .list-block .item-link:active .item-inner:after, +html:not(.watch-active-state) .list-block .list-button:active .item-inner:after, +.list-block .item-link.active-state .item-inner:after, +.list-block .list-button.active-state .item-inner:after { + background-color: transparent; +} +.list-block .list-button { + padding: 0 15px; + text-align: center; + color: #007aff; + display: block; + line-height: 43px; +} +.list-block .list-button:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #c8c7cc; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .list-block .list-button:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .list-block .list-button:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.list-block .item-content { + box-sizing: border-box; + padding-left: 15px; + min-height: 44px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.list-block .list-block-label { + margin: 10px 0 35px; + padding: 0 15px; + font-size: 14px; + color: #8f8f94; +} +.list-block .swipeout { + overflow: hidden; + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; +} +.list-block .swipeout.deleting { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block .swipeout.deleting .swipeout-content { + -webkit-transform: translateX(-100%); + transform: translateX(-100%); +} +.list-block .swipeout.transitioning .swipeout-content, +.list-block .swipeout.transitioning .swipeout-actions-right a, +.list-block .swipeout.transitioning .swipeout-actions-left a, +.list-block .swipeout.transitioning .swipeout-overswipe { + -webkit-transition: 300ms; + transition: 300ms; +} +.list-block .swipeout-content { + position: relative; + z-index: 10; +} +.list-block .swipeout-overswipe { + -webkit-transition: 200ms left; + transition: 200ms left; +} +.list-block .swipeout-actions-left, +.list-block .swipeout-actions-right { + position: absolute; + top: 0; + height: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.list-block .swipeout-actions-left a, +.list-block .swipeout-actions-right a { + padding: 0 30px; + color: #fff; + background: #c7c7cc; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + position: relative; + left: 0; +} +.list-block .swipeout-actions-left a:after, +.list-block .swipeout-actions-right a:after { + content: ''; + position: absolute; + top: 0; + width: 600%; + height: 100%; + background: inherit; + z-index: -1; +} +.list-block .swipeout-actions-left a.swipeout-delete, +.list-block .swipeout-actions-right a.swipeout-delete { + background: #ff3b30; +} +.list-block .swipeout-actions-right { + right: 0%; + -webkit-transform: translateX(100%); + transform: translateX(100%); +} +.list-block .swipeout-actions-right a:after { + left: 100%; + margin-left: -1px; +} +.list-block .swipeout-actions-left { + left: 0%; + -webkit-transform: translateX(-100%); + transform: translateX(-100%); +} +.list-block .swipeout-actions-left a:after { + right: 100%; + margin-right: -1px; +} +.list-block .item-subtitle { + font-size: 15px; + position: relative; + overflow: hidden; + white-space: nowrap; + max-width: 100%; + text-overflow: ellipsis; +} +.list-block .item-text { + font-size: 15px; + color: #8e8e93; + line-height: 21px; + position: relative; + overflow: hidden; + height: 42px; + text-overflow: ellipsis; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + display: -webkit-box; +} +.list-block.media-list .item-title, +.list-block li.media-item .item-title { + font-weight: 500; +} +html.ios-gt-8 .list-block.media-list .item-title, +html.ios-gt-8 .list-block li.media-item .item-title { + font-weight: 600; +} +.list-block.media-list .item-inner, +.list-block li.media-item .item-inner { + display: block; + padding-top: 10px; + padding-bottom: 9px; + -ms-flex-item-align: stretch; + -webkit-align-self: stretch; + align-self: stretch; +} +.list-block.media-list .item-link .item-inner, +.list-block li.media-item .item-link .item-inner { + background: none; + padding-right: 15px; +} +.list-block.media-list .item-link .item-title-row, +.list-block li.media-item .item-link .item-title-row { + padding-right: 20px; + background: no-repeat right center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E"); + background-size: 10px 20px; +} +.list-block.media-list .item-media, +.list-block li.media-item .item-media { + padding-top: 9px; + padding-bottom: 10px; +} +.list-block.media-list .item-media img, +.list-block li.media-item .item-media img { + display: block; +} +.list-block.media-list .item-title-row, +.list-block li.media-item .item-title-row { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} +.list-block.media-list .item-content > .item-after, +.list-block li.media-item .item-content > .item-after { + margin-right: 15px; + margin-left: 15px; +} +.list-block .list-group ul:after, +.list-block .list-group ul:before { + z-index: 25; +} +.list-block .list-group + .list-group ul:before { + display: none; +} +.list-block .item-divider, +.list-block .list-group-title { + background: #F7F7F7; + margin-top: -1px; + padding: 4px 15px; + white-space: nowrap; + position: relative; + max-width: 100%; + text-overflow: ellipsis; + overflow: hidden; + color: #8e8e93; + z-index: 15; +} +.list-block .item-divider:before, +.list-block .list-group-title:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #c8c7cc; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .list-block .item-divider:before, +html.pixel-ratio-2 .list-block .list-group-title:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .list-block .item-divider:before, +html.pixel-ratio-3 .list-block .list-group-title:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.list-block .list-group-title { + position: relative; + position: -webkit-sticky; + position: -moz-sticky; + position: sticky; + top: 0px; + z-index: 20; + margin-top: 0; +} +.list-block .list-group-title:before { + display: none; +} +.list-block .sortable-handler { + position: absolute; + right: 0; + top: 0; + bottom: 1px; + z-index: 10; + background-repeat: no-repeat; + background-size: 18px 12px; + background-position: center; + width: 35px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2018%2012'%20fill%3D'%23c7c7cc'%3E%3Cpath%20d%3D'M0%2C2V0h22v2H0z'%2F%3E%3Cpath%20d%3D'M0%2C7V5h22v2H0z'%2F%3E%3Cpath%20d%3D'M0%2C12v-2h22v2H0z'%2F%3E%3C%2Fsvg%3E"); + opacity: 0; + visibility: hidden; + cursor: pointer; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block.sortable .item-inner { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block.sortable-opened .sortable-handler { + visibility: visible; + opacity: 1; +} +.list-block.sortable-opened .item-inner, +.list-block.sortable-opened .item-link .item-inner { + padding-right: 35px; +} +.list-block.sortable-opened .item-link .item-inner, +.list-block.sortable-opened .item-link .item-title-row { + background-image: none; +} +.list-block.sortable-sorting li { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block li.sorting { + z-index: 50; + background: rgba(255, 255, 255, 0.8); + box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.6); + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.list-block li.sorting .item-inner:after { + display: none; +} +.list-block li:last-child .list-button:after { + display: none; +} +.list-block li:last-child .item-inner:after, +.list-block li:last-child li:last-child .item-inner:after { + display: none; +} +.list-block li li:last-child .item-inner:after, +.list-block li:last-child li .item-inner:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #c8c7cc; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .list-block li li:last-child .item-inner:after, +html.pixel-ratio-2 .list-block li:last-child li .item-inner:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .list-block li li:last-child .item-inner:after, +html.pixel-ratio-3 .list-block li:last-child li .item-inner:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.list-block.no-hairlines:before, +.list-block.no-hairlines ul:before, +.list-block.no-hairlines .content-block-inner:before { + display: none; +} +.list-block.no-hairlines:after, +.list-block.no-hairlines ul:after, +.list-block.no-hairlines .content-block-inner:after { + display: none; +} +.list-block.no-hairlines-between .item-inner:after, +.list-block.no-hairlines-between .list-button:after, +.list-block.no-hairlines-between .item-divider:after, +.list-block.no-hairlines-between .list-group-title:after, +.list-block.no-hairlines-between .list-group-title:after { + display: none; +} +/* === Contacts === */ +.contacts-content { + background: #fff; +} +.contacts-block { + margin: 0; +} +.contacts-block .list-group-title { + padding: 0 15px; + background: #f7f7f7; + color: #000; + font-weight: 500; + line-height: 22px; + height: 22px; +} +html.ios-gt-8 .contacts-block .list-group-title { + font-weight: 600; +} +.contacts-block .list-group:first-child ul:before { + display: none; +} +.contacts-block .list-group:last-child ul:after { + display: none; +} +/* === Forms === */ +.list-block input[type="text"], +.list-block input[type="password"], +.list-block input[type="search"], +.list-block input[type="email"], +.list-block input[type="tel"], +.list-block input[type="url"], +.list-block input[type="date"], +.list-block input[type="datetime-local"], +.list-block input[type="time"], +.list-block input[type="number"], +.list-block select, +.list-block textarea { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + box-sizing: border-box; + border: none; + background: none; + border-radius: 0 0 0 0; + box-shadow: none; + display: block; + padding: 0px; + margin: 0; + width: 100%; + height: 43px; + color: #000; + font-size: 17px; + font-family: inherit; +} +.list-block .item-title.label { + vertical-align: top; +} +.list-block .item-title.label + .item-input { + margin-left: 5px; +} +.list-block input[type="date"], +.list-block input[type="datetime-local"] { + line-height: 44px; +} +.list-block select { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; +} +.list-block textarea { + height: 100px; + resize: none; + line-height: 1.4; + padding-top: 8px; + padding-bottom: 7px; +} +.list-block textarea.resizable { + height: 43px; +} +.list-block .item-input { + width: 100%; + margin-top: -8px; + margin-bottom: -7px; + -webkit-box-flex: 1; + -ms-flex: 1; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; +} +.list-block .item-title.label { + width: 35%; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; +} +.label-switch { + display: inline-block; + vertical-align: middle; + width: 52px; + border-radius: 16px; + box-sizing: border-box; + height: 32px; + position: relative; + cursor: pointer; + -ms-flex-item-align: center; + -webkit-align-self: center; + align-self: center; +} +.label-switch .checkbox { + width: 52px; + border-radius: 16px; + box-sizing: border-box; + height: 32px; + background: #e5e5e5; + z-index: 0; + margin: 0; + padding: 0; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border: none; + cursor: pointer; + position: relative; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.label-switch .checkbox:before { + content: ' '; + position: absolute; + left: 2px; + top: 2px; + width: 48px; + border-radius: 16px; + box-sizing: border-box; + height: 28px; + background: #fff; + z-index: 1; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: scale(1); + transform: scale(1); +} +.label-switch .checkbox:after { + content: ' '; + height: 28px; + width: 28px; + border-radius: 28px; + background: #fff; + position: absolute; + z-index: 2; + top: 2px; + left: 2px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4); + -webkit-transform: translateX(0px); + transform: translateX(0px); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.label-switch input[type="checkbox"] { + display: none; +} +.label-switch input[type="checkbox"]:checked + .checkbox { + background: #4cd964; +} +.label-switch input[type="checkbox"]:checked + .checkbox:before { + -webkit-transform: scale(0); + transform: scale(0); +} +.label-switch input[type="checkbox"]:checked + .checkbox:after { + -webkit-transform: translateX(20px); + transform: translateX(20px); +} +html.android .label-switch input[type="checkbox"] + .checkbox { + -webkit-transition-duration: 0; + transition-duration: 0; +} +html.android .label-switch input[type="checkbox"] + .checkbox:after, +html.android .label-switch input[type="checkbox"] + .checkbox:before { + -webkit-transition-duration: 0; + transition-duration: 0; +} +.button { + border: 1px solid #007aff; + color: #007aff; + text-decoration: none; + text-align: center; + display: block; + border-radius: 5px; + line-height: 27px; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + background: none; + padding: 0 10px; + margin: 0; + height: 29px; + white-space: nowrap; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + font-size: 14px; + font-family: inherit; + cursor: pointer; + outline: 0; +} +input[type="submit"].button, +input[type="button"].button { + width: 100%; +} +html:not(.watch-active-state) .button:active, +.button.active-state { + background: rgba(0, 122, 255, 0.15); +} +.button.button-round { + border-radius: 27px; +} +.button.active { + background: #007aff; + color: #fff; +} +.button.button-big { + font-size: 17px; + height: 44px; + line-height: 42px; +} +.button.button-fill { + color: #fff; + background: #007aff; + border-color: transparent; +} +html:not(.watch-active-state) .button.button-fill:active, +.button.button-fill.active-state { + opacity: 0.8; +} +.button i.icon:first-child { + margin-right: 10px; +} +.button i.icon:last-child { + margin-left: 10px; +} +.button i.icon:first-child:last-child { + margin-left: 0; + margin-right: 0; +} +.buttons-row { + -ms-flex-item-align: center; + -webkit-align-self: center; + align-self: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-lines: single; + -moz-box-lines: single; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: none; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; +} +.buttons-row .button { + border-radius: 0 0 0 0; + border-left-width: 0; + width: 100%; + -webkit-box-flex: 1; + -ms-flex: 1; +} +.buttons-row .button:first-child { + border-radius: 5px 0 0 5px; + border-left-width: 1px; + border-left-style: solid; +} +.buttons-row .button:last-child { + border-radius: 0 5px 5px 0; +} +.buttons-row .button:first-child:last-child { + border-radius: 5px; +} +.buttons-row .button.button-round:first-child { + border-radius: 27px 0 0 27px; +} +.buttons-row .button.button-round:last-child { + border-radius: 0 27px 27px 0; +} +.range-slider { + width: 100%; + position: relative; + overflow: hidden; + padding-left: 3px; + padding-right: 3px; + margin-left: -1px; + -ms-flex-item-align: center; + -webkit-align-self: center; + align-self: center; +} +.range-slider input[type="range"] { + position: relative; + height: 28px; + width: 100%; + margin: 4px 0 5px 0; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + background: -webkit-gradient(linear, 50% 0, 50% 100%, color-stop(0, #b7b8b7), color-stop(100%, #b7b8b7)); + background: linear-gradient(to right, #b7b8b7 0, #b7b8b7 100%); + background-position: center; + background-size: 100% 2px; + background-repeat: no-repeat; + outline: 0; + border: none; + box-sizing: content-box; + -ms-background-position-y: 500px; +} +.range-slider input[type="range"]:focus, +.range-slider input[type="range"]:active { + border: 0; + outline: 0; +} +.range-slider input[type="range"]:after { + height: 2px; + background: #fff; + content: ' '; + width: 5px; + top: 50%; + margin-top: -1px; + left: -5px; + z-index: 1; + position: absolute; +} +.range-slider input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + height: 28px; + width: 28px; + border-radius: 28px; + background: #fff; + z-index: 10; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); + border: 0; + outline: 0; + position: absolute; + box-sizing: border-box; + content: ' '; + position: relative; + cursor: pointer; + margin-top: -1px; +} +.range-slider input[type="range"]::-webkit-slider-thumb:after { + height: 28px; + width: 28px; + border-radius: 28px; + background: #fff; + z-index: 10; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); + border: 0; + outline: 0; + position: absolute; + box-sizing: border-box; + content: ' '; + left: 0; + top: 0; +} +.range-slider input[type="range"]::-webkit-slider-thumb:before { + position: absolute; + top: 50%; + right: 100%; + width: 2000px; + height: 2px; + margin-top: -1px; + z-index: 1; + background: #007aff; + content: ' '; +} +.range-slider input[type="range"]::-moz-range-track { + width: 100%; + height: 2px; + background: #b7b8b7; + border: none; + outline: 0; +} +.range-slider input[type="range"]::-moz-range-thumb { + height: 28px; + width: 28px; + border-radius: 28px; + background: #fff; + z-index: 10; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); + border: 0; + outline: 0; + position: absolute; + box-sizing: border-box; + content: ' '; +} +.range-slider input[type="range"]::-ms-track { + width: 100%; + height: 2px; + cursor: pointer; + background: transparent; + border-color: transparent; + color: transparent; +} +.range-slider input[type="range"]::-ms-thumb { + height: 28px; + width: 28px; + border-radius: 28px; + background: #fff; + z-index: 10; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); + border: 0; + outline: 0; + position: absolute; + content: ' '; + box-shadow: none; + border: 1px solid rgba(0, 0, 0, 0.2); + box-sizing: border-box; + margin-top: 0; + top: 50%; +} +.range-slider input[type="range"]::-ms-fill-lower { + background: #007aff; +} +.range-slider input[type="range"]::-ms-fill-upper { + background: #b7b8b7; +} +.form-checkbox { + position: relative; + display: inline-block; + vertical-align: middle; +} +label.label-checkbox, +.form-checkbox { + cursor: pointer; +} +label.label-checkbox input[type="checkbox"], +.form-checkbox input[type="checkbox"], +label.label-checkbox input[type="radio"], +.form-checkbox input[type="radio"] { + display: none; +} +label.label-checkbox i.icon-form-checkbox, +.form-checkbox i { + width: 22px; + height: 22px; + position: relative; + border-radius: 22px; + border: 1px solid #c7c7cc; + box-sizing: border-box; + display: block; +} +label.label-checkbox i.icon-form-checkbox:after, +.form-checkbox i:after { + content: ' '; + position: absolute; + left: 50%; + margin-left: -6px; + top: 50%; + margin-top: -4px; + width: 12px; + height: 9px; +} +label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox input[type="checkbox"]:checked ~ i { + border: none; + background-color: #007aff; +} +label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox:after, +label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox:after, +.form-checkbox input[type="checkbox"]:checked ~ i:after { + background: no-repeat center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20x%3D'0px'%20y%3D'0px'%20viewBox%3D'0%200%2012%209'%20xml%3Aspace%3D'preserve'%3E%3Cpolygon%20fill%3D'%23ffffff'%20points%3D'12%2C0.7%2011.3%2C0%203.9%2C7.4%200.7%2C4.2%200%2C4.9%203.9%2C8.8%203.9%2C8.8%203.9%2C8.8%20'%2F%3E%3C%2Fsvg%3E"); + -webkit-background-size: 12px 9px; + background-size: 12px 9px; +} +.form-radio { + display: inline-block; + vertical-align: middle; + position: relative; +} +.form-radio i { + width: 22px; + height: 22px; + position: relative; + border-radius: 4px; + border: 1px solid #c7c7cc; + box-sizing: border-box; + display: block; +} +label.label-radio, +.form-radio { + cursor: pointer; +} +label.label-radio input[type="checkbox"], +.form-radio input[type="checkbox"], +label.label-radio input[type="radio"], +.form-radio input[type="radio"] { + display: none; +} +.form-radio input[type="radio"]:checked ~ i, +label.label-radio input[type="checkbox"]:checked ~ .item-inner, +label.label-radio input[type="radio"]:checked ~ .item-inner { + background: no-repeat center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23007aff'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E"); + -webkit-background-size: 13px 10px; + background-size: 13px 10px; +} +label.label-radio input[type="checkbox"], +label.label-radio input[type="radio"] { + display: none; +} +label.label-radio input[type="checkbox"] ~ .item-inner, +label.label-radio input[type="radio"] ~ .item-inner { + padding-right: 35px; +} +label.label-radio input[type="checkbox"]:checked ~ .item-inner, +label.label-radio input[type="radio"]:checked ~ .item-inner { + background-position: 90% center; + background-position: -webkit-calc(100% - 15px) center; + background-position: calc(100% - 15px) center; +} +label.label-checkbox, +label.label-radio { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +html:not(.watch-active-state) label.label-checkbox:active, +html:not(.watch-active-state) label.label-radio:active, +label.label-checkbox.active-state, +label.label-radio.active-state { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; + background-color: #d9d9d9; +} +html:not(.watch-active-state) label.label-checkbox:active .item-inner:after, +html:not(.watch-active-state) label.label-radio:active .item-inner:after, +label.label-checkbox.active-state .item-inner:after, +label.label-radio.active-state .item-inner:after { + background-color: transparent; +} +.smart-select select { + display: none; +} +/* === Floating Action Button === */ +.floating-button { + position: absolute; + right: 15px; + bottom: 15px; + width: 50px; + height: 50px; + border-radius: 50%; + z-index: 1500; + background-color: #007aff; + color: #fff; + overflow: hidden; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; +} +html:not(.watch-active-state) .floating-button:active, +.floating-button.active-state { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; + background: #0066d6; +} +.toolbar-fixed .floating-button, +.toolbar-through .floating-button { + bottom: 59px; +} +.tabbar-labels-fixed .floating-button, +.tabbar-labels-through .floating-button { + bottom: 65px; +} +@media (min-width: 768px) { + .tabbar-labels-fixed .floating-button, + .tabbar-labels-through .floating-button { + bottom: 71px; + } +} +.floating-button-toolbar, +.speed-dial { + position: absolute; + right: 15px; + bottom: 15px; + z-index: 1500; +} +.toolbar-fixed .floating-button-toolbar, +.toolbar-fixed .speed-dial, +.toolbar-through .floating-button-toolbar, +.toolbar-through .speed-dial { + bottom: 59px; +} +.tabbar-labels-fixed .floating-button-toolbar, +.tabbar-labels-fixed .speed-dial, +.tabbar-labels-through .floating-button-toolbar, +.tabbar-labels-through .speed-dial { + bottom: 65px; +} +@media (min-width: 768px) { + .tabbar-labels-fixed .floating-button-toolbar, + .tabbar-labels-fixed .speed-dial, + .tabbar-labels-through .floating-button-toolbar, + .tabbar-labels-through .speed-dial { + bottom: 71px; + } +} +.floating-button-toolbar .floating-button, +.speed-dial .floating-button { + right: 0; + bottom: 0; + position: relative; +} +.speed-dial .floating-button i { + position: absolute; + left: 50%; + top: 50%; + -webkit-transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(1); + transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(1); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.speed-dial .floating-button i + i { + -webkit-transform: translate3d(-50%, -50%, 0) rotate(-90deg) scale(0.5); + transform: translate3d(-50%, -50%, 0) rotate(-90deg) scale(0.5); + opacity: 0; +} +.speed-dial.speed-dial-opened .floating-button i { + -webkit-transform: translate3d(-50%, -50%, 0) rotate(90deg) scale(0.5); + transform: translate3d(-50%, -50%, 0) rotate(90deg) scale(0.5); + opacity: 0; +} +.speed-dial.speed-dial-opened .floating-button i + i { + -webkit-transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(1); + transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(1); + opacity: 1; +} +.speed-dial-buttons { + position: absolute; + width: 40px; + left: 50%; + margin-left: -20px; + bottom: 100%; + margin-bottom: 16px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: reverse; + -moz-box-orient: vertical; + -moz-box-direction: reverse; + -ms-flex-direction: column-reverse; + -webkit-flex-direction: column-reverse; + flex-direction: column-reverse; + visibility: hidden; + pointer-events: none; +} +.speed-dial-buttons a { + width: 40px; + height: 40px; + opacity: 0; + color: #fff; + border-radius: 50%; + position: relative; + z-index: 1; + overflow: hidden; + background-color: #007aff; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-transform: translate3d(0, 8px, 0) scale(0.3); + transform: translate3d(0, 8px, 0) scale(0.3); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; +} +.speed-dial-buttons a + a { + margin-bottom: 16px; +} +html:not(.watch-active-state) .speed-dial-buttons a:active, +.speed-dial-buttons a.active-state { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; + background: #0066d6; +} +.speed-dial-opened .speed-dial-buttons { + visibility: visible; + pointer-events: auto; +} +.speed-dial-opened .speed-dial-buttons a { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0) scaleY(1); + transform: translate3d(0, 0, 0) scaleY(1); +} +.speed-dial-opened .speed-dial-buttons a:nth-child(2) { + -webkit-transition-delay: 50ms; + transition-delay: 50ms; +} +.speed-dial-opened .speed-dial-buttons a:nth-child(3) { + -webkit-transition-delay: 100ms; + transition-delay: 100ms; +} +.speed-dial-opened .speed-dial-buttons a:nth-child(4) { + -webkit-transition-delay: 150ms; + transition-delay: 150ms; +} +.speed-dial-opened .speed-dial-buttons a:nth-child(5) { + -webkit-transition-delay: 200ms; + transition-delay: 200ms; +} +.speed-dial-opened .speed-dial-buttons a:nth-child(6) { + -webkit-transition-delay: 250ms; + transition-delay: 250ms; +} +.floating-button-to-popover.floating-button-to-popover { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.floating-button-to-popover.floating-button-to-popover-in { + -webkit-transition-duration: 100ms; + transition-duration: 100ms; +} +.floating-button-to-popover.floating-button-to-popover-in i { + opacity: 0; + -webkit-transition-duration: 100ms; + transition-duration: 100ms; +} +.floating-button-to-popover.floating-button-to-popover-scale { + border-radius: 0; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + box-shadow: none; +} +.floating-button-to-popover.floating-button-to-popover-out { + -webkit-transition-delay: 0ms; + transition-delay: 0ms; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.floating-button-to-popover.floating-button-to-popover-out i { + opacity: 1; + -webkit-transition-duration: 100ms; + transition-duration: 100ms; + -webkit-transition-delay: 200ms; + transition-delay: 200ms; +} +/* === Accordion === */ +.list-block .accordion-item-toggle { + cursor: pointer; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block .accordion-item-toggle .item-inner { + padding-right: 35px; + background: no-repeat -webkit-calc(100% - 15px) center; + background: no-repeat calc(100% - 15px) center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E"); + background-size: 10px 20px; +} +html:not(.watch-active-state) .list-block .accordion-item-toggle:active, +.list-block .accordion-item-toggle.active-state { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; + background-color: #d9d9d9; +} +html:not(.watch-active-state) .list-block .accordion-item-toggle:active > .item-inner:after, +.list-block .accordion-item-toggle.active-state > .item-inner:after { + background-color: transparent; +} +.list-block .accordion-item-toggle .item-inner, +.list-block .accordion-item > .item-link .item-inner { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transition-property: background-color; + transition-property: background-color; +} +.list-block .accordion-item-toggle .item-inner:after, +.list-block .accordion-item > .item-link .item-inner:after { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner, +.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) > .item-link .item-inner, +.list-block.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row, +.list-block.media-list .accordion-item-expanded > .item-link .item-title-row, +.list-block .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row, +.list-block .accordion-item-expanded.media-item > .item-link .item-title-row { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20transform%3D'translate(115%2C%2030)%20rotate(90)'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E"); + background-size: 20px 20px; +} +.list-block .accordion-item-expanded .accordion-item-toggle .item-inner:after, +.list-block .accordion-item-expanded > .item-link .item-inner:after { + background-color: transparent; +} +.list-block .accordion-item .content-block, +.list-block .accordion-item .list-block { + margin-top: 0; + margin-bottom: 0; +} +.list-block .accordion-item ul { + padding-left: 0; +} +.accordion-item-content { + position: relative; + overflow: hidden; + height: 0; + font-size: 14px; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.accordion-item-expanded > .accordion-item-content { + height: auto; +} +html.android-4 .accordion-item-content { + -webkit-transform: none; + transform: none; +} +/* === Cards === */ +.cards-list ul, +.card .list-block ul { + background: none; +} +.cards-list > ul:before, +.card .list-block > ul:before { + display: none; +} +.cards-list > ul:after, +.card .list-block > ul:after { + display: none; +} +.card { + background: #fff; + box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3); + margin: 10px; + position: relative; + border-radius: 2px; + font-size: 14px; +} +.card .list-block, +.card .content-block { + margin: 0; +} +.row:not(.no-gutter) .col > .card { + margin-left: 0; + margin-right: 0; +} +.card-content { + position: relative; +} +.card-content-inner { + padding: 15px; + position: relative; +} +.card-content-inner > p:first-child { + margin-top: 0; +} +.card-content-inner > p:last-child { + margin-bottom: 0; +} +.card-content-inner > .list-block, +.card-content-inner > .content-block { + margin: -15px; +} +.card-header, +.card-footer { + min-height: 44px; + position: relative; + padding: 10px 15px; + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.card-header[valign="top"], +.card-footer[valign="top"] { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.card-header[valign="bottom"], +.card-footer[valign="bottom"] { + -webkit-box-align: end; + -ms-flex-align: end; + -webkit-align-items: flex-end; + align-items: flex-end; +} +.card-header a.link, +.card-footer a.link { + line-height: 44px; + height: 44px; + text-decoration: none; + position: relative; + margin-top: -10px; + margin-bottom: -10px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +html:not(.watch-active-state) .card-header a.link:active, +html:not(.watch-active-state) .card-footer a.link:active, +.card-header a.link.active-state, +.card-footer a.link.active-state { + opacity: 0.3; + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.card-header a.link i + span, +.card-footer a.link i + span, +.card-header a.link i + i, +.card-footer a.link i + i, +.card-header a.link span + i, +.card-footer a.link span + i, +.card-header a.link span + span, +.card-footer a.link span + span { + margin-left: 7px; +} +.card-header a.link i.icon, +.card-footer a.link i.icon { + display: block; +} +.card-header a.icon-only, +.card-footer a.icon-only { + min-width: 44px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + margin: 0; +} +.card-header { + border-radius: 2px 2px 0 0; + font-size: 17px; +} +.card-header:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #e1e1e1; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .card-header:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .card-header:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.card-header.no-border:after { + display: none; +} +.card-footer { + border-radius: 0 0 2px 2px; + color: #6d6d72; +} +.card-footer:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #e1e1e1; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .card-footer:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .card-footer:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.card-footer.no-border:before { + display: none; +} +/* === Modals === */ +.modal-overlay, +.preloader-indicator-overlay, +.popup-overlay, +.picker-modal-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.4); + z-index: 13000; + visibility: hidden; + opacity: 0; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.modal-overlay.not-animated, +.preloader-indicator-overlay.not-animated, +.popup-overlay.not-animated, +.picker-modal-overlay.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.modal-overlay.modal-overlay-visible, +.preloader-indicator-overlay.modal-overlay-visible, +.popup-overlay.modal-overlay-visible, +.picker-modal-overlay.modal-overlay-visible { + visibility: visible; + opacity: 1; +} +.picker-modal-overlay { + z-index: 12000; +} +.popup-overlay { + z-index: 10500; +} +.modal { + width: 270px; + position: absolute; + z-index: 13500; + left: 50%; + margin-left: -135px; + margin-top: 0; + top: 50%; + text-align: center; + border-radius: 13px; + overflow: hidden; + opacity: 0; + -webkit-transform: translate3d(0, 0, 0) scale(1.185); + transform: translate3d(0, 0, 0) scale(1.185); + -webkit-transition-property: -webkit-transform, opacity; + -moz-transition-property: -moz-transform, opacity; + -ms-transition-property: -ms-transform, opacity; + -o-transition-property: -o-transform, opacity; + transition-property: transform, opacity; + color: #000; + display: none; +} +.modal.modal-in { + opacity: 1; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transform: translate3d(0, 0, 0) scale(1); + transform: translate3d(0, 0, 0) scale(1); +} +.modal.modal-out { + opacity: 0; + z-index: 13499; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transform: translate3d(0, 0, 0) scale(1); + transform: translate3d(0, 0, 0) scale(1); +} +.modal-inner { + padding: 15px; + border-radius: 13px 13px 0 0; + position: relative; + background: rgba(255, 255, 255, 0.95); +} +.modal-inner:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.2); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .modal-inner:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .modal-inner:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.modal-title { + font-weight: 500; + font-size: 18px; + text-align: center; +} +html.ios-gt-8 .modal-title { + font-weight: 600; +} +.modal-title + .modal-text { + margin-top: 5px; +} +.modal-buttons { + height: 44px; + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; +} +.modal-buttons.modal-buttons-vertical { + display: block; + height: auto; +} +.modal-button { + width: 100%; + padding: 0 5px; + height: 44px; + font-size: 17px; + line-height: 44px; + text-align: center; + color: #007aff; + display: block; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + cursor: pointer; + box-sizing: border-box; + -webkit-box-flex: 1; + -ms-flex: 1; + background: rgba(255, 255, 255, 0.95); +} +.modal-button:after { + content: ''; + position: absolute; + right: 0; + top: 0; + left: auto; + bottom: auto; + width: 1px; + height: 100%; + background-color: rgba(0, 0, 0, 0.2); + display: block; + z-index: 15; + -webkit-transform-origin: 100% 50%; + transform-origin: 100% 50%; +} +html.pixel-ratio-2 .modal-button:after { + -webkit-transform: scaleX(0.5); + transform: scaleX(0.5); +} +html.pixel-ratio-3 .modal-button:after { + -webkit-transform: scaleX(0.33); + transform: scaleX(0.33); +} +.modal-button:first-child { + border-radius: 0 0 0 13px; +} +.modal-button:last-child { + border-radius: 0 0 13px 0; +} +.modal-button:last-child:after { + display: none; +} +.modal-button:first-child:last-child { + border-radius: 0 0 13px 13px; +} +.modal-button.modal-button-bold { + font-weight: 500; +} +html.ios-gt-8 .modal-button.modal-button-bold { + font-weight: 600; +} +html:not(.watch-active-state) .modal-button:active, +.modal-button.active-state { + background: rgba(230, 230, 230, 0.95); +} +.modal-buttons-vertical .modal-button { + border-radius: 0; +} +.modal-buttons-vertical .modal-button:after { + display: none; +} +.modal-buttons-vertical .modal-button:before { + display: none; +} +.modal-buttons-vertical .modal-button:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.2); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .modal-buttons-vertical .modal-button:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .modal-buttons-vertical .modal-button:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.modal-buttons-vertical .modal-button:last-child { + border-radius: 0 0 13px 13px; +} +.modal-buttons-vertical .modal-button:last-child:after { + display: none; +} +.modal-no-buttons .modal-inner { + border-radius: 13px; +} +.modal-no-buttons .modal-inner:after { + display: none; +} +.modal-no-buttons .modal-buttons { + display: none; +} +.actions-modal { + position: absolute; + left: 0; + bottom: 0; + z-index: 13500; + width: 100%; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + max-height: 100%; + overflow: auto; + -webkit-overflow-scrolling: touch; +} +@media (min-width: 496px) { + .actions-modal { + width: 480px; + left: 50%; + margin-left: -240px; + } +} +.actions-modal.modal-in, +.actions-modal.modal-out { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.actions-modal.modal-in.not-animated, +.actions-modal.modal-out.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.actions-modal.modal-in { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.actions-modal.modal-out { + z-index: 13499; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.actions-modal-group { + margin: 8px; + position: relative; + border-radius: 13px; + overflow: hidden; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.actions-modal-button, +.actions-modal-label { + width: 100%; + text-align: center; + font-weight: normal; + margin: 0; + background: rgba(255, 255, 255, 0.95); + box-sizing: border-box; + display: block; + position: relative; + overflow: hidden; +} +.actions-modal-button:after, +.actions-modal-label:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.2); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .actions-modal-button:after, +html.pixel-ratio-2 .actions-modal-label:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .actions-modal-button:after, +html.pixel-ratio-3 .actions-modal-label:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.actions-modal-button a, +.actions-modal-label a { + text-decoration: none; + color: inherit; + display: block; +} +.actions-modal-button b, +.actions-modal-label b { + font-weight: 500; +} +html.ios-gt-8 .actions-modal-button b, +html.ios-gt-8 .actions-modal-label b { + font-weight: 600; +} +.actions-modal-button.actions-modal-button-bold, +.actions-modal-label.actions-modal-button-bold { + font-weight: 500; +} +html.ios-gt-8 .actions-modal-button.actions-modal-button-bold, +html.ios-gt-8 .actions-modal-label.actions-modal-button-bold { + font-weight: 600; +} +.actions-modal-button.actions-modal-button-red, +.actions-modal-label.actions-modal-button-red { + color: #ff3b30; +} +.actions-modal-button:first-child, +.actions-modal-label:first-child { + border-radius: 13px 13px 0 0; +} +.actions-modal-button:last-child, +.actions-modal-label:last-child { + border-radius: 0 0 13px 13px; +} +.actions-modal-button:last-child:after, +.actions-modal-label:last-child:after { + display: none; +} +.actions-modal-button:first-child:last-child, +.actions-modal-label:first-child:last-child { + border-radius: 13px; +} +.actions-modal-button.disabled, +.actions-modal-label.disabled { + opacity: 0.9; + color: #8e8e93; +} +.actions-modal-button { + cursor: pointer; + height: 57px; + line-height: 57px; + font-size: 20px; + color: #007aff; + white-space: normal; + text-overflow: ellipsis; +} +html:not(.watch-active-state) .actions-modal-button:active, +.actions-modal-button.active-state { + background: rgba(230, 230, 230, 0.9); +} +.actions-modal-label { + font-size: 13px; + line-height: 1.3; + min-height: 57px; + padding: 8px 10px; + color: #8a8a8a; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +@media (orientation: landscape) { + .actions-modal-label { + min-height: 44px; + } + .actions-modal-button { + height: 44px; + line-height: 44px; + } +} +input.modal-text-input { + box-sizing: border-box; + height: 26px; + background: #fff; + margin: 0; + margin-top: 15px; + padding: 0 5px; + border: 1px solid rgba(0, 0, 0, 0.3); + border-radius: 0; + width: 100%; + font-size: 14px; + font-family: inherit; + display: block; + box-shadow: 0 0 0 rgba(0, 0, 0, 0); + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; +} +input.modal-text-input + input.modal-text-input { + margin-top: 5px; +} +.modal-input-double + .modal-input-double input.modal-text-input { + border-top: 0; + margin-top: 0; +} +.popover { + width: 320px; + background: rgba(255, 255, 255, 0.95); + z-index: 13500; + margin: 0; + top: 0; + opacity: 0; + left: 0; + border-radius: 13px; + position: absolute; + display: none; + -webkit-transform: none; + transform: none; + -webkit-transition-property: opacity; + -moz-transition-property: opacity; + -ms-transition-property: opacity; + -o-transition-property: opacity; + transition-property: opacity; +} +.popover.modal-in { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + opacity: 1; +} +.popover.modal-in.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.popover .list-block { + margin: 0; +} +.popover .list-block ul { + background: none; +} +.popover .list-block:first-child ul { + border-radius: 13px 13px 0 0; +} +.popover .list-block:first-child ul:before { + display: none; +} +.popover .list-block:first-child li:first-child a { + border-radius: 13px 13px 0 0; +} +.popover .list-block:last-child ul { + border-radius: 0 0 13px 13px; +} +.popover .list-block:last-child ul:after { + display: none; +} +.popover .list-block:last-child li:last-child a { + border-radius: 0 0 13px 13px; +} +.popover .list-block:first-child:last-child li:first-child:last-child a, +.popover .list-block:first-child:last-child ul:first-child:last-child { + border-radius: 13px; +} +.popover .list-block + .list-block { + margin-top: 35px; +} +.popover-angle { + width: 26px; + height: 26px; + position: absolute; + left: -26px; + top: 0; + z-index: 100; + overflow: hidden; +} +.popover-angle:after { + content: ' '; + background: rgba(255, 255, 255, 0.95); + width: 26px; + height: 26px; + position: absolute; + left: 0; + top: 0; + border-radius: 3px; + -webkit-transform: rotate(45deg); + transform: rotate(45deg); +} +.popover-angle.on-left { + left: -26px; +} +.popover-angle.on-left:after { + left: 19px; + top: 0; +} +.popover-angle.on-right { + left: 100%; +} +.popover-angle.on-right:after { + left: -19px; + top: 0; +} +.popover-angle.on-top { + left: 0; + top: -26px; +} +.popover-angle.on-top:after { + left: 0; + top: 19px; +} +.popover-angle.on-bottom { + left: 0; + top: 100%; +} +.popover-angle.on-bottom:after { + left: 0; + top: -19px; +} +.popover-inner { + overflow: auto; + -webkit-overflow-scrolling: touch; +} +.actions-popover .list-block + .list-block { + margin-top: 20px; +} +.actions-popover .list-block ul { + background: #fff; +} +.actions-popover-label { + padding: 8px 10px; + color: #8a8a8a; + font-size: 13px; + line-height: 1.3; + text-align: center; + position: relative; +} +.actions-popover-label:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.2); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .actions-popover-label:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .actions-popover-label:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.actions-popover-label:last-child:after { + display: none; +} +.popup, +.login-screen { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 11000; + background: #fff; + box-sizing: border-box; + display: none; + overflow: auto; + -webkit-overflow-scrolling: touch; + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -ms-transition-property: -ms-transform; + -o-transition-property: -o-transform; + transition-property: transform; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.popup.modal-in, +.login-screen.modal-in, +.popup.modal-out, +.login-screen.modal-out { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.popup.modal-in.not-animated, +.login-screen.modal-in.not-animated, +.popup.modal-out.not-animated, +.login-screen.modal-out.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.popup.modal-in, +.login-screen.modal-in { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.popup.modal-out, +.login-screen.modal-out { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.login-screen.modal-in, +.login-screen.modal-out { + display: block; +} +@media all and (min-width: 630px) and (min-height: 630px) { + .popup:not(.tablet-fullscreen) { + width: 630px; + height: 630px; + left: 50%; + top: 50%; + margin-left: -315px; + margin-top: -315px; + -webkit-transform: translate3d(0, 1024px, 0); + transform: translate3d(0, 1024px, 0); + } + .popup:not(.tablet-fullscreen).modal-in { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + .popup:not(.tablet-fullscreen).modal-out { + -webkit-transform: translate3d(0, 1024px, 0); + transform: translate3d(0, 1024px, 0); + } +} +@media all and (max-width: 629px), (max-height: 629px) { + html.with-statusbar-overlay .popup { + height: -webkit-calc(100% - 20px); + height: calc(100% - 20px); + top: 20px; + } + html.with-statusbar-overlay .popup-overlay { + z-index: 9500; + } +} +html.with-statusbar-overlay .login-screen, +html.with-statusbar-overlay .popup.tablet-fullscreen { + height: -webkit-calc(100% - 20px); + height: calc(100% - 20px); + top: 20px; +} +.modal .preloader { + width: 34px; + height: 34px; +} +.preloader-indicator-overlay { + visibility: visible; + opacity: 0; + background: none; +} +.preloader-indicator-modal { + position: absolute; + left: 50%; + top: 50%; + padding: 8px; + margin-left: -25px; + margin-top: -25px; + background: rgba(0, 0, 0, 0.8); + z-index: 13500; + border-radius: 5px; +} +.preloader-indicator-modal .preloader { + display: block; + width: 34px; + height: 34px; +} +.picker-modal { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 260px; + z-index: 12500; + display: none; + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -ms-transition-property: -ms-transform; + -o-transition-property: -o-transform; + transition-property: transform; + background: #cfd5da; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.picker-modal.modal-in, +.picker-modal.modal-out { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.picker-modal.modal-in.not-animated, +.picker-modal.modal-out.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.picker-modal.modal-in { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.picker-modal.modal-out { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.picker-modal .picker-modal-inner { + height: 100%; + position: relative; +} +.picker-modal .toolbar { + position: relative; + width: 100%; + background: #f7f7f8; +} +.picker-modal .toolbar:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #929499; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .picker-modal .toolbar:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .picker-modal .toolbar:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.picker-modal .toolbar + .picker-modal-inner { + height: -webkit-calc(100% - 44px); + height: -moz-calc(100% - 44px); + height: calc(100% - 44px); +} +.picker-modal.picker-modal-inline, +.popover .picker-modal { + display: block; + position: relative; + background: none; + z-index: inherit; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.picker-modal.picker-modal-inline .toolbar:before, +.popover .picker-modal .toolbar:before { + display: none; +} +.picker-modal.picker-modal-inline .toolbar:after, +.popover .picker-modal .toolbar:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #929499; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .picker-modal.picker-modal-inline .toolbar:after, +html.pixel-ratio-2 .popover .picker-modal .toolbar:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .picker-modal.picker-modal-inline .toolbar:after, +html.pixel-ratio-3 .popover .picker-modal .toolbar:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.popover .picker-modal { + width: auto; +} +.popover .picker-modal .toolbar { + background: none; +} +.picker-modal.smart-select-picker .page { + background: #fff; +} +.picker-modal.smart-select-picker .toolbar:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .picker-modal.smart-select-picker .toolbar:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .picker-modal.smart-select-picker .toolbar:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.picker-modal.smart-select-picker .list-block { + margin: 0; +} +.picker-modal.smart-select-picker .list-block ul:before { + display: none; +} +.picker-modal.smart-select-picker .list-block ul:after { + display: none; +} +/* === Panels === */ +.panel-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0); + opacity: 0; + z-index: 5999; + display: none; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.panel-overlay.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.panel { + z-index: 1000; + display: none; + background: #111; + box-sizing: border-box; + overflow: auto; + -webkit-overflow-scrolling: touch; + position: absolute; + width: 260px; + top: 0; + height: 100%; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.panel.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.panel.panel-left { + left: 0; +} +.panel.panel-left.panel-cover { + z-index: 6000; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); +} +.panel.panel-right { + right: 0; +} +.panel.panel-right.panel-cover { + z-index: 6000; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); +} +.panel.panel-visible-by-breakpoint { + display: block; + -webkit-transform: translate3d(0, 0, 0) !important; + transform: translate3d(0, 0, 0) !important; +} +.panel.panel-visible-by-breakpoint.panel-cover { + z-index: 5900; +} +body.with-panel-left-cover .views, +body.with-panel-right-cover .views { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +body.with-panel-left-cover .panel-overlay, +body.with-panel-right-cover .panel-overlay { + display: block; + opacity: 1; +} +body.with-panel-left-reveal .views, +body.with-panel-right-reveal .views { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + transition-property: transform; +} +body.with-panel-left-reveal .panel.not-animated ~ .views, +body.with-panel-right-reveal .panel.not-animated ~ .views { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +body.with-panel-left-reveal .panel-overlay, +body.with-panel-right-reveal .panel-overlay { + background: rgba(0, 0, 0, 0); + display: block; + opacity: 0; +} +body.with-panel-left-reveal .views { + -webkit-transform: translate3d(260px, 0, 0); + transform: translate3d(260px, 0, 0); +} +body.with-panel-left-reveal .panel-overlay { + -webkit-transform: translate3d(260px, 0, 0); + transform: translate3d(260px, 0, 0); +} +body.with-panel-left-cover .panel.panel-left { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +body.with-panel-right-reveal .views { + -webkit-transform: translate3d(-260px, 0, 0); + transform: translate3d(-260px, 0, 0); +} +body.with-panel-right-reveal .panel-overlay { + -webkit-transform: translate3d(-260px, 0, 0); + transform: translate3d(-260px, 0, 0); +} +body.with-panel-right-cover .panel.panel-right { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +body.panel-closing .panel-overlay { + display: block; +} +body.panel-closing .views { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + transition-property: transform; +} +body.panel-closing .panel.not-animated ~ .views { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +/* === Images Lazy Loading === */ +.lazy-loaded.lazy-fadeIn { + -webkit-animation: lazyFadeIn 600ms; + animation: lazyFadeIn 600ms; +} +@-webkit-keyframes lazyFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes lazyFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +/* === Tabs === */ +.tabs .tab { + display: none; +} +.tabs .tab.active { + display: block; +} +.tabs-animated-wrap { + position: relative; + width: 100%; + overflow: hidden; + height: 100%; +} +.tabs-animated-wrap > .tabs { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + height: 100%; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.tabs-animated-wrap > .tabs > .tab { + width: 100%; + display: block; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; +} +.tabs-animated-wrap.not-animated > .tabs { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.tabs-swipeable-wrap { + height: 100%; +} +.tabs-swipeable-wrap > .tabs > .tab { + display: block; +} +/* === Messages === */ +.messages-content { + background: #fff; +} +.messages { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.messages-date { + text-align: center; + font-weight: 500; + font-size: 11px; + line-height: 1; + margin: 10px 15px; + color: #8e8e93; +} +html.ios-gt-8 .messages-date { + font-weight: 600; +} +.messages-date span { + font-weight: 400; +} +.message { + box-sizing: border-box; + margin: 1px 10px 0; + max-width: 70%; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.message:first-child { + margin-top: 10px; +} +.message .message-text { + box-sizing: border-box; + border-radius: 16px; + padding: 6px 16px 9px; + min-width: 48px; + min-height: 35px; + font-size: 17px; + line-height: 1.2; + word-break: break-word; +} +.message .message-text img { + max-width: 100%; + height: auto; +} +.message.message-pic .message-text { + padding: 0; + background: none; +} +.message.message-pic img { + display: block; + border-radius: 16px; +} +.message-name { + font-size: 12px; + line-height: 1; + color: #8e8e93; + margin-bottom: 2px; + margin-top: 7px; +} +.message-hide-name .message-name { + display: none; +} +.message-label { + font-size: 12px; + line-height: 1; + color: #8e8e93; + margin-top: 4px; +} +.message-hide-label .message-label { + display: none; +} +.message-avatar { + width: 29px; + height: 29px; + border-radius: 100%; + margin-top: -29px; + position: relative; + top: 1px; + background-size: cover; + opacity: 1; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.message-hide-avatar .message-avatar { + opacity: 0; +} +.message-date { + font-size: 12px; + margin-top: 4px; + opacity: 0.8; +} +.message-pic img + .message-date { + margin-top: 8px; +} +.message-sent .message-date { + text-align: right; +} +.message-sent { + -ms-flex-item-align: end; + -webkit-align-self: flex-end; + align-self: flex-end; + -webkit-box-align: end; + -ms-flex-align: end; + -webkit-align-items: flex-end; + align-items: flex-end; +} +.message-sent .message-name { + margin-right: 16px; +} +.message-sent .message-label { + margin-right: 6px; +} +.message-sent.message-with-avatar .message-text { + margin-right: 29px; +} +.message-sent.message-with-avatar .message-name { + margin-right: 45px; +} +.message-sent.message-with-avatar .message-label { + margin-right: 34px; +} +.message-sent .message-text { + padding-right: 22px; + background-color: #00d449; + color: white; + margin-left: auto; + -webkit-mask-box-image: url("data:image/svg+xml;charset=utf-8,") 50% 56% 46% 42%; +} +.message-sent.message-last .message-text, +.message-sent.message-with-tail .message-text { + border-radius: 16px 16px 0 16px; + -webkit-mask-box-image: url("data:image/svg+xml;charset=utf-8,") 50% 56% 46% 42%; +} +.message-sent.message-last.message-pic img, +.message-sent.message-with-tail.message-pic img { + border-radius: 16px 16px 0 16px; +} +.message-received { + -ms-flex-item-align: start; + -webkit-align-self: flex-start; + align-self: flex-start; + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.message-received .message-text { + padding-left: 22px; + background-color: #e5e5ea; + color: #000; + -webkit-mask-box-image: url("data:image/svg+xml;charset=utf-8,") 50% 42% 46% 56%; +} +.message-received .message-name { + margin-left: 16px; +} +.message-received .message-label { + margin-left: 6px; +} +.message-received.message-with-avatar .message-text { + margin-left: 29px; +} +.message-received.message-with-avatar .message-name { + margin-left: 45px; +} +.message-received.message-with-avatar .message-label { + margin-left: 34px; +} +.message-received.message-last .message-text, +.message-received.message-with-tail .message-text { + border-radius: 16px 16px 16px 0; + -webkit-mask-box-image: url("data:image/svg+xml;charset=utf-8,") 50% 42% 46% 56%; +} +.message-received.message-last.message-pic img, +.message-received.message-with-tail.message-pic img { + border-radius: 16px 16px 16px 0; +} +.message-last { + margin-bottom: 8px; +} +.message-appear-from-bottom { + -webkit-animation: messageAppearFromBottom 400ms; + animation: messageAppearFromBottom 400ms; +} +.message-appear-from-top { + -webkit-animation: messageAppearFromTop 400ms; + animation: messageAppearFromTop 400ms; +} +.messages-auto-layout .message-name, +.messages-auto-layout .message-label { + display: none; +} +.messages-auto-layout .message-avatar { + opacity: 0; +} +.messages-auto-layout .message-first .message-name { + display: block; +} +.messages-auto-layout .message-last .message-avatar { + opacity: 1; +} +.messages-auto-layout .message-last .message-label { + display: block; +} +html.retina.ios-6 .message, +html.retina.ios-6 .message.message-pic img { + -webkit-mask-box-image: none; + border-radius: 16px; +} +@-webkit-keyframes messageAppearFromBottom { + from { + -webkit-transform: translate3d(0, 100%, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + } +} +@keyframes messageAppearFromBottom { + from { + transform: translate3d(0, 100%, 0); + } + to { + transform: translate3d(0, 0, 0); + } +} +@-webkit-keyframes messageAppearFromTop { + from { + -webkit-transform: translate3d(0, -100%, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + } +} +@keyframes messageAppearFromTop { + from { + transform: translate3d(0, -100%, 0); + } + to { + transform: translate3d(0, 0, 0); + } +} +/* === Statusbar overlay === */ +html.with-statusbar-overlay .framework7-root { + padding-top: 20px; + box-sizing: border-box; +} +html.with-statusbar-overlay .framework7-root .statusbar-overlay { + display: block; +} +html.with-statusbar-overlay .framework7-root .panel { + padding-top: 20px; +} +.statusbar-overlay { + background: #f7f7f8; + z-index: 10000; + position: absolute; + left: 0; + top: 0; + height: 20px; + width: 100%; + display: none; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +/* === Preloader === */ +.preloader { + display: inline-block; + width: 20px; + height: 20px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); + background-position: 50%; + background-size: 100%; + background-repeat: no-repeat; + -webkit-animation: preloader-spin 1s steps(12, end) infinite; + animation: preloader-spin 1s steps(12, end) infinite; +} +@-webkit-keyframes preloader-spin { + 100% { + -webkit-transform: rotate(360deg); + } +} +@keyframes preloader-spin { + 100% { + transform: rotate(360deg); + } +} +/* === Progress Bar === */ +.progressbar, +.progressbar-infinite { + height: 2px; + width: 100%; + overflow: hidden; + position: relative; + display: block; + background: #b6b6b6; + border-radius: 2px; + -webkit-transform-origin: center top; + transform-origin: center top; + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; +} +.progressbar { + vertical-align: middle; +} +.progressbar span { + width: 100%; + background: #007aff; + height: 100%; + position: absolute; + left: 0; + top: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + -webkit-transition-duration: 150ms; + transition-duration: 150ms; +} +.progressbar-infinite:before { + content: ''; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: #007aff; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-transform-origin: left center; + transform-origin: left center; + -webkit-animation: progressbar-infinite 1s linear infinite; + animation: progressbar-infinite 1s linear infinite; +} +html.with-statusbar-overlay body > .progressbar-infinite, +html.with-statusbar-overlay .framework7-root > .progressbar-infinite { + top: 20px; +} +.progressbar-infinite.color-multi { + background: none; +} +.progressbar-infinite.color-multi:before { + content: ''; + position: absolute; + left: 0; + top: 0; + width: 400%; + height: 100%; + background-image: -webkit-linear-gradient(left, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55, #5856d6, #34aadc, #007aff, #5ac8fa, #4cd964); + background-image: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55, #5856d6, #34aadc, #007aff, #5ac8fa, #4cd964); + background-size: 25% 100%; + background-repeat: repeat-x; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-animation: progressbar-infinite-multicolor 3s linear infinite; + animation: progressbar-infinite-multicolor 3s linear infinite; +} +html.with-statusbar-overlay body > .progressbar-infinite.color-multi, +html.with-statusbar-overlay .framework7-root > .progressbar-infinite.color-multi { + top: 20px; +} +body > .progressbar, +.view > .progressbar, +.views > .progressbar, +.page > .progressbar, +.panel > .progressbar, +.popup > .progressbar, +.framework7-root > .progressbar, +body > .progressbar-infinite, +.view > .progressbar-infinite, +.views > .progressbar-infinite, +.page > .progressbar-infinite, +.panel > .progressbar-infinite, +.popup > .progressbar-infinite, +.framework7-root > .progressbar-infinite { + position: absolute; + left: 0; + top: 0; + z-index: 15000; + border-radius: 0; +} +.progressbar-in { + -webkit-animation: progressbar-in 300ms forwards; + animation: progressbar-in 300ms forwards; +} +.progressbar-out { + -webkit-animation: progressbar-out 300ms forwards; + animation: progressbar-out 300ms forwards; +} +html.with-statusbar-overlay .framework7-root > .progressbar, +html.with-statusbar-overlay body > .progressbar { + top: 20px; +} +@-webkit-keyframes progressbar-in { + from { + opacity: 0; + -webkit-transform: scaleY(0); + } + to { + opacity: 1; + -webkit-transform: scaleY(1); + } +} +@keyframes progressbar-in { + from { + opacity: 0; + transform: scaleY(0); + } + to { + opacity: 1; + transform: scaleY(1); + } +} +@-webkit-keyframes progressbar-out { + from { + opacity: 1; + -webkit-transform: scaleY(1); + } + to { + opacity: 0; + -webkit-transform: scaleY(0); + } +} +@keyframes progressbar-out { + from { + opacity: 1; + transform: scaleY(1); + } + to { + opacity: 0; + transform: scaleY(0); + } +} +@-webkit-keyframes progressbar-infinite { + 0% { + -webkit-transform: translate3d(-50%, 0, 0) scaleX(0.5); + } + 100% { + -webkit-transform: translate3d(100%, 0, 0) scaleX(0.5); + } +} +@keyframes progressbar-infinite { + 0% { + transform: translate3d(-50%, 0, 0) scaleX(0.5); + } + 100% { + transform: translate3d(100%, 0, 0) scaleX(0.5); + } +} +@-webkit-keyframes progressbar-infinite-multicolor { + from { + -webkit-transform: translate3d(0%, 0, 0); + } + to { + -webkit-transform: translate3d(-50%, 0, 0); + } +} +@keyframes progressbar-infinite-multicolor { + from { + transform: translate3d(0%, 0, 0); + } + to { + transform: translate3d(-50%, 0, 0); + } +} +/* === Pull To Refresh === */ +.pull-to-refresh-layer { + position: absolute; + position: relative; + margin-top: -44px; + left: 0; + top: 0; + width: 100%; + height: 44px; +} +.pull-to-refresh-layer .preloader { + position: absolute; + left: 50%; + top: 50%; + margin-left: -10px; + margin-top: -10px; + visibility: hidden; +} +.pull-to-refresh-layer .pull-to-refresh-arrow { + width: 13px; + height: 20px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -6px; + margin-top: -10px; + background: no-repeat center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2026%2040'%3E%3Cpolygon%20points%3D'9%2C22%209%2C0%2017%2C0%2017%2C22%2026%2C22%2013.5%2C40%200%2C22'%20fill%3D'%238c8c8c'%2F%3E%3C%2Fsvg%3E"); + background-size: 13px 20px; + z-index: 10; + -webkit-transform: rotate(0deg) translate3d(0, 0, 0); + transform: rotate(0deg) translate3d(0, 0, 0); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.pull-to-refresh-content.pull-to-refresh-no-navbar { + margin-top: -44px; + height: -webkit-calc(100% + 44px); + height: -moz-calc(100% + 44px); + height: calc(100% + 44px); +} +.pull-to-refresh-content.pull-to-refresh-no-navbar .pull-to-refresh-layer { + margin-top: 0; +} +.pull-to-refresh-content.transitioning, +.pull-to-refresh-content.refreshing { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.pull-to-refresh-content:not(.refreshing) .pull-to-refresh-layer .preloader { + -webkit-animation: none; + animation: none; +} +.pull-to-refresh-content.refreshing { + -webkit-transform: translate3d(0, 44px, 0); + transform: translate3d(0, 44px, 0); +} +.pull-to-refresh-content.refreshing .pull-to-refresh-arrow { + visibility: hidden; + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.pull-to-refresh-content.refreshing .preloader { + visibility: visible; +} +.pull-to-refresh-content.pull-up .pull-to-refresh-arrow { + -webkit-transform: rotate(180deg) translate3d(0, 0, 0); + transform: rotate(180deg) translate3d(0, 0, 0); +} +/* === Infinite Scroll Preloader === */ +.infinite-scroll-preloader { + text-align: center; + padding: 5px 0; +} +/* === Autocomplete === */ +.autocomplete-page .autocomplete-found { + display: block; +} +.autocomplete-page .autocomplete-not-found { + display: none; +} +.autocomplete-page .autocomplete-values { + display: block; +} +.autocomplete-page .list-block ul:empty { + display: none; +} +.autocomplete-preloader:not(.autocomplete-preloader-visible) { + -webkit-animation: none; + animation: none; + visibility: hidden; +} +.autocomplete-dropdown { + background: #fff; + box-sizing: border-box; + position: absolute; + z-index: 500; + box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.2); + width: 100%; + left: 0; +} +.autocomplete-dropdown .autocomplete-dropdown-inner { + position: relative; + overflow: auto; + -webkit-overflow-scrolling: touch; + height: 100%; + z-index: 1; +} +.autocomplete-dropdown .autocomplete-preloader { + display: none; + position: absolute; + right: 15px; + bottom: 100%; + margin-bottom: 12px; + width: 20px; + height: 20px; +} +.autocomplete-dropdown .autocomplete-preloader-visible { + display: block; +} +.autocomplete-dropdown .autocomplete-dropdown-placeholder { + color: #a9a9a9; +} +.autocomplete-dropdown .list-block { + margin: 0; +} +.autocomplete-dropdown .list-block ul { + background: none !important; +} +.autocomplete-dropdown .list-block ul:before { + display: none; +} +.autocomplete-dropdown .list-block ul:after { + display: none; +} +.autocomplete-dropdown .list-block b { + font-weight: 500; +} +html.ios-gt-8 .autocomplete-dropdown .list-block b { + font-weight: 600; +} +.list-block .item-content-dropdown-expand .item-title.label { + width: 0; + -webkit-flex-shrink: 10; + -ms-flex: 0 10 auto; + flex-shrink: 10; +} +.list-block .item-content-dropdown-expand .item-title.label + .item-input { + margin-left: 0; +} +.list-block .item-content-dropdown-expand .item-input { + width: 100%; +} +/* === Timeline === */ +.timeline { + margin: 35px 0; + padding: 0 15px; + box-sizing: border-box; +} +.content-block-inner .timeline { + padding: 0; + margin: 0; +} +.timeline-item { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; + overflow: hidden; + padding: 2px 0px 15px; + box-sizing: border-box; + position: relative; +} +.timeline-item:last-child { + padding-bottom: 2px; +} +.timeline-item-date { + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + width: 50px; + text-align: right; + box-sizing: border-box; +} +.timeline-item-date small { + font-size: 10px; +} +.timeline-item-content { + margin: 2px; + min-width: 0; + position: relative; + -webkit-flex-shrink: 10; + -ms-flex: 0 10 auto; + flex-shrink: 10; +} +.timeline-item-content p:first-child, +.timeline-item-content ul:first-child, +.timeline-item-content ol:first-child, +.timeline-item-content h1:first-child, +.timeline-item-content h2:first-child, +.timeline-item-content h3:first-child, +.timeline-item-content h4:first-child { + margin-top: 0; +} +.timeline-item-content p:last-child, +.timeline-item-content ul:last-child, +.timeline-item-content ol:last-child, +.timeline-item-content h1:last-child, +.timeline-item-content h2:last-child, +.timeline-item-content h3:last-child, +.timeline-item-content h4:last-child { + margin-bottom: 0; +} +.timeline-item-content .card, +.timeline-item-content.card, +.timeline-item-content .list-block, +.timeline-item-content.list-block, +.timeline-item-content .content-block, +.timeline-item-content.content-block { + margin: 0; + width: 100%; +} +.timeline-item-content .card + .card, +.timeline-item-content .list-block + .card, +.timeline-item-content .content-block + .card, +.timeline-item-content .card + .list-block, +.timeline-item-content .list-block + .list-block, +.timeline-item-content .content-block + .list-block, +.timeline-item-content .card + .content-block, +.timeline-item-content .list-block + .content-block, +.timeline-item-content .content-block + .content-block { + margin: 15px 0 0; +} +.timeline-item-inner { + border-radius: 7px; + padding: 8px 15px; + background: #fff; + box-sizing: border-box; +} +.timeline-item-inner .content-block { + padding: 0; + color: inherit; +} +.timeline-item-inner .content-block-inner { + padding-left: 0; + padding-right: 0; + margin: 0; +} +.timeline-item-inner .content-block-inner:before { + display: none; +} +.timeline-item-inner .content-block-inner:after { + display: none; +} +.timeline-item-inner .list-block ul:before { + display: none; +} +.timeline-item-inner .list-block ul:after { + display: none; +} +.content-block-inner .timeline-item-inner { + border-radius: 3px; + border: 1px solid rgba(0, 0, 0, 0.1); +} +.timeline-item-inner + .timeline-item-inner { + margin-top: 15px; +} +.timeline-item-divider { + width: 1px; + margin: 0 15px; + position: relative; + width: 10px; + height: 10px; + background: #bbb; + border-radius: 50%; + margin-top: 3px; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; +} +.timeline-item-divider:after, +.timeline-item-divider:before { + content: ' '; + width: 1px; + height: 100vh; + position: absolute; + left: 50%; + background: inherit; + -webkit-transform: translate3d(-50%, 0, 0); + transform: translate3d(-50%, 0, 0); +} +.timeline-item-divider:after { + top: 100%; +} +.timeline-item-divider:before { + bottom: 100%; +} +.timeline-item:last-child .timeline-item-divider:after { + display: none; +} +.timeline-item:first-child .timeline-item-divider:before { + display: none; +} +.timeline-item-time { + margin-top: 15px; + font-size: 13px; + color: #6d6d72; +} +.timeline-item-time:first-child, +.timeline-item-time:last-child { + margin-top: 0; +} +.timeline-item-title + .timeline-item-time { + margin-top: 0; +} +.timeline-item-title { + font-size: 17px; + font-weight: 500; +} +html.ios-gt-8 .timeline-item-title { + font-weight: 600; +} +.timeline-item-subtitle { + font-size: 15px; +} +.timeline-sides .timeline-item { + margin-left: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: calc(50% - (30px + 10px) / 2 - 50px); + margin-right: 0; +} +.timeline-sides .timeline-item .timeline-item-date { + text-align: right; +} +.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-right: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: calc(50% - (30px + 10px) / 2 - 50px); + margin-left: 0; +} +.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date { + text-align: left; +} +.timeline-sides .timeline-item-left { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-right: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: calc(50% - (30px + 10px) / 2 - 50px); + margin-left: 0; +} +.timeline-sides .timeline-item-left .timeline-item-date { + text-align: left; +} +.timeline-sides .timeline-item-right { + margin-left: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: calc(50% - (30px + 10px) / 2 - 50px); + margin-right: 0; +} +.timeline-sides .timeline-item-right .timeline-item-date { + text-align: right; +} +@media (min-width: 768px) { + .tablet-sides .timeline-item { + margin-left: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: calc(50% - (30px + 10px) / 2 - 50px); + margin-right: 0; + } + .tablet-sides .timeline-item .timeline-item-date { + text-align: right; + } + .tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-right: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: calc(50% - (30px + 10px) / 2 - 50px); + margin-left: 0; + } + .tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date { + text-align: left; + } + .tablet-sides .timeline-item-left { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-right: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: calc(50% - (30px + 10px) / 2 - 50px); + margin-left: 0; + } + .tablet-sides .timeline-item-left .timeline-item-date { + text-align: left; + } + .tablet-sides .timeline-item-right { + margin-left: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: calc(50% - (30px + 10px) / 2 - 50px); + margin-right: 0; + } + .tablet-sides .timeline-item-right .timeline-item-date { + text-align: right; + } +} +.timeline-horizontal { + padding: 0; + margin: 0; + height: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.timeline-horizontal .timeline-item { + display: block; + width: 33.33333333vw; + margin: 0; + padding: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + padding-top: 34px; + padding-bottom: 10px; + position: relative; + height: 100%; +} +.timeline-horizontal .timeline-item:after { + content: ''; + position: absolute; + right: 0; + top: 0; + left: auto; + bottom: auto; + width: 1px; + height: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 100% 50%; + transform-origin: 100% 50%; +} +html.pixel-ratio-2 .timeline-horizontal .timeline-item:after { + -webkit-transform: scaleX(0.5); + transform: scaleX(0.5); +} +html.pixel-ratio-3 .timeline-horizontal .timeline-item:after { + -webkit-transform: scaleX(0.33); + transform: scaleX(0.33); +} +.timeline-horizontal .timeline-month:last-child .timeline-item:last-child:after { + display: none; +} +.timeline-horizontal .timeline-item-date { + background: #f7f7f8; + width: auto; + text-align: left; + padding: 0px 10px; + line-height: 34px; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 34px; +} +.timeline-horizontal .timeline-item-date:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .timeline-horizontal .timeline-item-date:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .timeline-horizontal .timeline-item-date:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.timeline-horizontal .timeline-item-content { + padding: 10px; + overflow: auto; + -webkit-overflow-scrolling: touch; + margin: 0; + height: -webkit-calc(100% - 10px); + height: -moz-calc(100% - 10px); + height: calc(100% - 10px); +} +.timeline-horizontal .timeline-item-divider { + display: none; +} +.timeline-horizontal.col-100 .timeline-item { + width: 100vw; +} +.timeline-horizontal.col-95 .timeline-item { + width: 95vw; +} +.timeline-horizontal.col-90 .timeline-item { + width: 90vw; +} +.timeline-horizontal.col-85 .timeline-item { + width: 85vw; +} +.timeline-horizontal.col-80 .timeline-item { + width: 80vw; +} +.timeline-horizontal.col-75 .timeline-item { + width: 75vw; +} +.timeline-horizontal.col-70 .timeline-item { + width: 70vw; +} +.timeline-horizontal.col-66 .timeline-item { + width: 66.66666666666666vw; +} +.timeline-horizontal.col-65 .timeline-item { + width: 65vw; +} +.timeline-horizontal.col-60 .timeline-item { + width: 60vw; +} +.timeline-horizontal.col-55 .timeline-item { + width: 55vw; +} +.timeline-horizontal.col-50 .timeline-item { + width: 50vw; +} +.timeline-horizontal.col-45 .timeline-item { + width: 45vw; +} +.timeline-horizontal.col-40 .timeline-item { + width: 40vw; +} +.timeline-horizontal.col-35 .timeline-item { + width: 35vw; +} +.timeline-horizontal.col-33 .timeline-item { + width: 33.333333333333336vw; +} +.timeline-horizontal.col-30 .timeline-item { + width: 30vw; +} +.timeline-horizontal.col-25 .timeline-item { + width: 25vw; +} +.timeline-horizontal.col-20 .timeline-item { + width: 20vw; +} +.timeline-horizontal.col-15 .timeline-item { + width: 15vw; +} +.timeline-horizontal.col-10 .timeline-item { + width: 10vw; +} +.timeline-horizontal.col-5 .timeline-item { + width: 5vw; +} +@media all and (min-width: 768px) { + .timeline-horizontal.tablet-100 .timeline-item { + width: 100vw; + } + .timeline-horizontal.tablet-95 .timeline-item { + width: 95vw; + } + .timeline-horizontal.tablet-90 .timeline-item { + width: 90vw; + } + .timeline-horizontal.tablet-85 .timeline-item { + width: 85vw; + } + .timeline-horizontal.tablet-80 .timeline-item { + width: 80vw; + } + .timeline-horizontal.tablet-75 .timeline-item { + width: 75vw; + } + .timeline-horizontal.tablet-70 .timeline-item { + width: 70vw; + } + .timeline-horizontal.tablet-66 .timeline-item { + width: 66.66666666666666vw; + } + .timeline-horizontal.tablet-65 .timeline-item { + width: 65vw; + } + .timeline-horizontal.tablet-60 .timeline-item { + width: 60vw; + } + .timeline-horizontal.tablet-55 .timeline-item { + width: 55vw; + } + .timeline-horizontal.tablet-50 .timeline-item { + width: 50vw; + } + .timeline-horizontal.tablet-45 .timeline-item { + width: 45vw; + } + .timeline-horizontal.tablet-40 .timeline-item { + width: 40vw; + } + .timeline-horizontal.tablet-35 .timeline-item { + width: 35vw; + } + .timeline-horizontal.tablet-33 .timeline-item { + width: 33.333333333333336vw; + } + .timeline-horizontal.tablet-30 .timeline-item { + width: 30vw; + } + .timeline-horizontal.tablet-25 .timeline-item { + width: 25vw; + } + .timeline-horizontal.tablet-20 .timeline-item { + width: 20vw; + } + .timeline-horizontal.tablet-15 .timeline-item { + width: 15vw; + } + .timeline-horizontal.tablet-10 .timeline-item { + width: 10vw; + } + .timeline-horizontal.tablet-5 .timeline-item { + width: 5vw; + } +} +.timeline-year, +.timeline-month { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + padding-top: 24px; + position: relative; + box-sizing: border-box; + height: 100%; +} +.timeline-year:after { + content: ''; + position: absolute; + right: 0; + top: 0; + left: auto; + bottom: auto; + width: 1px; + height: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 100% 50%; + transform-origin: 100% 50%; +} +html.pixel-ratio-2 .timeline-year:after { + -webkit-transform: scaleX(0.5); + transform: scaleX(0.5); +} +html.pixel-ratio-3 .timeline-year:after { + -webkit-transform: scaleX(0.33); + transform: scaleX(0.33); +} +.timeline-year:last-child:after { + display: none; +} +.timeline-month .timeline-item:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .timeline-month .timeline-item:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .timeline-month .timeline-item:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.timeline-year-title, +.timeline-month-title { + position: absolute; + left: 0; + top: 0; + width: 100%; + line-height: 24px; + height: 24px; + padding: 0 10px; + box-sizing: border-box; + background: #f7f7f8; +} +.timeline-year-title span, +.timeline-month-title span { + display: inline-block; + position: -webkit-sticky; + position: -moz-sticky; + position: sticky; + left: 10px; +} +.timeline-year-title { + font-size: 16px; +} +.timeline-year-title span { + margin-top: 3px; +} +.timeline-month-title span { + margin-top: -2px; +} +/* === Swiper === */ +.swiper-container { + margin-left: auto; + margin-right: auto; + position: relative; + overflow: hidden; + /* Fix of Webkit flickering */ + z-index: 1; +} +.swiper-container-no-flexbox .swiper-slide { + float: left; +} +.swiper-container-vertical > .swiper-wrapper { + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.swiper-wrapper { + position: relative; + width: 100%; + height: 100%; + z-index: 1; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -o-transition-property: -o-transform; + -ms-transition-property: -ms-transform; + transition-property: transform; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +.swiper-container-android .swiper-slide, +.swiper-wrapper { + -webkit-transform: translate3d(0px, 0, 0); + -moz-transform: translate3d(0px, 0, 0); + -o-transform: translate(0px, 0px); + -ms-transform: translate3d(0px, 0, 0); + transform: translate3d(0px, 0, 0); +} +.swiper-container-multirow > .swiper-wrapper { + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -ms-flex-wrap: wrap; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; +} +.swiper-container-free-mode > .swiper-wrapper { + -webkit-transition-timing-function: ease-out; + -moz-transition-timing-function: ease-out; + -ms-transition-timing-function: ease-out; + -o-transition-timing-function: ease-out; + transition-timing-function: ease-out; + margin: 0 auto; +} +.swiper-slide { + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + width: 100%; + height: 100%; + position: relative; +} +/* Auto Height */ +.swiper-container-autoheight, +.swiper-container-autoheight .swiper-slide { + height: auto; +} +.swiper-container-autoheight .swiper-wrapper { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; + -webkit-transition-property: -webkit-transform, height; + -moz-transition-property: -moz-transform; + -o-transition-property: -o-transform; + -ms-transition-property: -ms-transform; + transition-property: transform, height; +} +/* a11y */ +.swiper-container .swiper-notification { + position: absolute; + left: 0; + top: 0; + pointer-events: none; + opacity: 0; + z-index: -1000; +} +/* IE10 Windows Phone 8 Fixes */ +.swiper-wp8-horizontal { + -ms-touch-action: pan-y; + touch-action: pan-y; +} +.swiper-wp8-vertical { + -ms-touch-action: pan-x; + touch-action: pan-x; +} +/* Arrows */ +.swiper-button-prev, +.swiper-button-next { + position: absolute; + top: 50%; + width: 27px; + height: 44px; + margin-top: -22px; + z-index: 10; + cursor: pointer; + -moz-background-size: 27px 44px; + -webkit-background-size: 27px 44px; + background-size: 27px 44px; + background-position: center; + background-repeat: no-repeat; +} +.swiper-button-prev.swiper-button-disabled, +.swiper-button-next.swiper-button-disabled { + opacity: 0.35; + cursor: auto; + pointer-events: none; +} +.swiper-button-prev, +.swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); + left: 10px; + right: auto; +} +.swiper-button-next, +.swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); + right: 10px; + left: auto; +} +/* Pagination Styles */ +.swiper-pagination { + position: absolute; + text-align: center; + -webkit-transition: 300ms; + -moz-transition: 300ms; + -o-transition: 300ms; + transition: 300ms; + -webkit-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + z-index: 10; +} +.swiper-pagination.swiper-pagination-hidden { + opacity: 0; +} +/* Common Styles */ +.swiper-pagination-fraction, +.swiper-pagination-custom, +.swiper-container-horizontal > .swiper-pagination-bullets { + bottom: 10px; + left: 0; + width: 100%; +} +/* Bullets */ +.swiper-pagination-bullet { + width: 8px; + height: 8px; + display: inline-block; + border-radius: 100%; + background: #000; + opacity: 0.2; +} +button.swiper-pagination-bullet { + border: none; + margin: 0; + padding: 0; + box-shadow: none; + -moz-appearance: none; + -ms-appearance: none; + -webkit-appearance: none; + appearance: none; +} +.swiper-pagination-clickable .swiper-pagination-bullet { + cursor: pointer; +} +.swiper-pagination-bullet-active { + opacity: 1; + background: #007aff; +} +.swiper-container-vertical > .swiper-pagination-bullets { + right: 10px; + top: 50%; + -webkit-transform: translate3d(0px, -50%, 0); + -moz-transform: translate3d(0px, -50%, 0); + -o-transform: translate(0px, -50%); + -ms-transform: translate3d(0px, -50%, 0); + transform: translate3d(0px, -50%, 0); +} +.swiper-container-vertical > .swiper-pagination-bullets .swiper-pagination-bullet { + margin: 5px 0; + display: block; +} +.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet { + margin: 0 5px; +} +/* Progress */ +.swiper-pagination-progress { + background: rgba(0, 0, 0, 0.25); + position: absolute; +} +.swiper-pagination-progress .swiper-pagination-progressbar { + background: #007aff; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + -webkit-transform: scale(0); + -ms-transform: scale(0); + -o-transform: scale(0); + transform: scale(0); + -webkit-transform-origin: left top; + -moz-transform-origin: left top; + -ms-transform-origin: left top; + -o-transform-origin: left top; + transform-origin: left top; +} +.swiper-container-rtl .swiper-pagination-progress .swiper-pagination-progressbar { + -webkit-transform-origin: right top; + -moz-transform-origin: right top; + -ms-transform-origin: right top; + -o-transform-origin: right top; + transform-origin: right top; +} +.swiper-container-horizontal > .swiper-pagination-progress { + width: 100%; + height: 4px; + left: 0; + top: 0; +} +.swiper-container-vertical > .swiper-pagination-progress { + width: 4px; + height: 100%; + left: 0; + top: 0; +} +/* 3D Container */ +.swiper-container-3d { + -webkit-perspective: 1200px; + -moz-perspective: 1200px; + -o-perspective: 1200px; + perspective: 1200px; +} +.swiper-container-3d .swiper-wrapper, +.swiper-container-3d .swiper-slide, +.swiper-container-3d .swiper-slide-shadow-left, +.swiper-container-3d .swiper-slide-shadow-right, +.swiper-container-3d .swiper-slide-shadow-top, +.swiper-container-3d .swiper-slide-shadow-bottom, +.swiper-container-3d .swiper-cube-shadow { + -webkit-transform-style: preserve-3d; + -moz-transform-style: preserve-3d; + -ms-transform-style: preserve-3d; + transform-style: preserve-3d; +} +.swiper-container-3d .swiper-slide-shadow-left, +.swiper-container-3d .swiper-slide-shadow-right, +.swiper-container-3d .swiper-slide-shadow-top, +.swiper-container-3d .swiper-slide-shadow-bottom { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + pointer-events: none; + z-index: 10; +} +.swiper-container-3d .swiper-slide-shadow-left { + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); + /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Opera 11.10-12.00 */ + background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 16+, IE10, Opera 12.50+ */ +} +.swiper-container-3d .swiper-slide-shadow-right { + background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); + /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Opera 11.10-12.00 */ + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 16+, IE10, Opera 12.50+ */ +} +.swiper-container-3d .swiper-slide-shadow-top { + background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); + /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Opera 11.10-12.00 */ + background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 16+, IE10, Opera 12.50+ */ +} +.swiper-container-3d .swiper-slide-shadow-bottom { + background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); + /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Opera 11.10-12.00 */ + background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 16+, IE10, Opera 12.50+ */ +} +/* Coverflow */ +.swiper-container-coverflow .swiper-wrapper, +.swiper-container-flip .swiper-wrapper { + /* Windows 8 IE 10 fix */ + -ms-perspective: 1200px; +} +/* Cube + Flip */ +.swiper-container-cube, +.swiper-container-flip { + overflow: visible; +} +.swiper-container-cube .swiper-slide, +.swiper-container-flip .swiper-slide { + pointer-events: none; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; + z-index: 1; +} +.swiper-container-cube .swiper-slide .swiper-slide, +.swiper-container-flip .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-container-cube .swiper-slide-active, +.swiper-container-flip .swiper-slide-active, +.swiper-container-cube .swiper-slide-active .swiper-slide-active, +.swiper-container-flip .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-container-cube .swiper-slide-shadow-top, +.swiper-container-flip .swiper-slide-shadow-top, +.swiper-container-cube .swiper-slide-shadow-bottom, +.swiper-container-flip .swiper-slide-shadow-bottom, +.swiper-container-cube .swiper-slide-shadow-left, +.swiper-container-flip .swiper-slide-shadow-left, +.swiper-container-cube .swiper-slide-shadow-right, +.swiper-container-flip .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; +} +/* Cube */ +.swiper-container-cube .swiper-slide { + visibility: hidden; + -webkit-transform-origin: 0 0; + -moz-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + width: 100%; + height: 100%; +} +.swiper-container-cube.swiper-container-rtl .swiper-slide { + -webkit-transform-origin: 100% 0; + -moz-transform-origin: 100% 0; + -ms-transform-origin: 100% 0; + transform-origin: 100% 0; +} +.swiper-container-cube .swiper-slide-active, +.swiper-container-cube .swiper-slide-next, +.swiper-container-cube .swiper-slide-prev, +.swiper-container-cube .swiper-slide-next + .swiper-slide { + pointer-events: auto; + visibility: visible; +} +.swiper-container-cube .swiper-cube-shadow { + position: absolute; + left: 0; + bottom: 0px; + width: 100%; + height: 100%; + background: #000; + opacity: 0.6; + -webkit-filter: blur(50px); + filter: blur(50px); + z-index: 0; +} +/* Fade */ +.swiper-container-fade.swiper-container-free-mode .swiper-slide { + -webkit-transition-timing-function: ease-out; + -moz-transition-timing-function: ease-out; + -ms-transition-timing-function: ease-out; + -o-transition-timing-function: ease-out; + transition-timing-function: ease-out; +} +.swiper-container-fade .swiper-slide { + pointer-events: none; + -webkit-transition-property: opacity; + -moz-transition-property: opacity; + -o-transition-property: opacity; + transition-property: opacity; +} +.swiper-container-fade .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-container-fade .swiper-slide-active, +.swiper-container-fade .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-zoom-container { + width: 100%; + height: 100%; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -moz-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -moz-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + text-align: center; +} +.swiper-zoom-container > img, +.swiper-zoom-container > svg, +.swiper-zoom-container > canvas { + max-width: 100%; + max-height: 100%; + object-fit: contain; +} +/* Scrollbar */ +.swiper-scrollbar { + border-radius: 10px; + position: relative; + -ms-touch-action: none; + background: rgba(0, 0, 0, 0.1); +} +.swiper-container-horizontal > .swiper-scrollbar { + position: absolute; + left: 1%; + bottom: 3px; + z-index: 50; + height: 5px; + width: 98%; +} +.swiper-container-vertical > .swiper-scrollbar { + position: absolute; + right: 3px; + top: 1%; + z-index: 50; + width: 5px; + height: 98%; +} +.swiper-scrollbar-drag { + height: 100%; + width: 100%; + position: relative; + background: rgba(0, 0, 0, 0.5); + border-radius: 10px; + left: 0; + top: 0; +} +.swiper-scrollbar-cursor-drag { + cursor: move; +} +/* Preloader */ +.swiper-slide .preloader { + width: 42px; + height: 42px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -21px; + margin-top: -21px; + z-index: 10; +} +/* === Photo Browser === */ +.photo-browser { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 11500; +} +body > .photo-browser, +.framework7-root > .photo-browser { + opacity: 0; + display: none; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +body > .photo-browser.photo-browser-in, +.framework7-root > .photo-browser.photo-browser-in { + display: block; + -webkit-animation: photoBrowserIn 400ms forwards; + animation: photoBrowserIn 400ms forwards; +} +body > .photo-browser.photo-browser-out, +.framework7-root > .photo-browser.photo-browser-out { + display: block; + -webkit-animation: photoBrowserOut 400ms forwards; + animation: photoBrowserOut 400ms forwards; +} +html.with-statusbar-overlay body > .photo-browser, +html.with-statusbar-overlay .framework7-root > .photo-browser { + height: -webkit-calc(100% - 20px); + height: calc(100% - 20px); + top: 20px; +} +.popup > .photo-browser .navbar, +body > .photo-browser .navbar, +.framework7-root > .photo-browser .navbar, +.popup > .photo-browser .toolbar, +body > .photo-browser .toolbar, +.framework7-root > .photo-browser .toolbar { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.photo-browser .page[data-page="photo-browser-slides"] { + background: none; +} +.photo-browser-popup { + background: none; +} +.photo-browser .navbar, +.views .view[data-page="photo-browser-slides"] .navbar, +.photo-browser .toolbar, +.views .view[data-page="photo-browser-slides"] .toolbar { + background: rgba(247, 247, 247, 0.95); + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.view[data-page="photo-browser-slides"] .page[data-page="photo-browser-slides"] .navbar, +.view[data-page="photo-browser-slides"] .page[data-page="photo-browser-slides"] .toolbar { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.photo-browser-exposed .navbar, +.photo-browser-exposed .toolbar { + opacity: 0; + visibility: hidden; + pointer-events: none; +} +.photo-browser-exposed .photo-browser-swiper-container { + background: #000; +} +.photo-browser-of { + margin: 0 5px; +} +.photo-browser-captions { + pointer-events: none; + position: absolute; + left: 0; + width: 100%; + bottom: 0; + z-index: 10; + opacity: 1; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.photo-browser-captions.photo-browser-captions-exposed { + opacity: 0; +} +.toolbar ~ .photo-browser-captions { + bottom: 44px; + -webkit-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); +} +.photo-browser-exposed .toolbar ~ .photo-browser-captions { + -webkit-transform: translate3d(0, 44px, 0); + transform: translate3d(0, 44px, 0); +} +.toolbar ~ .photo-browser-captions.photo-browser-captions-exposed { + -webkit-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); +} +.photo-browser-caption { + box-sizing: border-box; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + position: absolute; + bottom: 0; + left: 0; + opacity: 0; + padding: 4px 5px; + width: 100%; + text-align: center; + color: #fff; + background: rgba(0, 0, 0, 0.8); +} +.photo-browser-caption:empty { + display: none; +} +.photo-browser-caption.photo-browser-caption-active { + opacity: 1; +} +.photo-browser-captions-light .photo-browser-caption { + background: rgba(255, 255, 255, 0.8); + color: #000; +} +.photo-browser-exposed .photo-browser-caption { + color: #fff; + background: rgba(0, 0, 0, 0.8); +} +.photo-browser-swiper-container { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: hidden; + background: #fff; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.photo-browser-swiper-wrapper { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + padding: 0; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.photo-browser-link-inactive { + opacity: 0.3; +} +.photo-browser-slide { + width: 100%; + height: 100%; + position: relative; + overflow: hidden; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + box-sizing: border-box; +} +.photo-browser-slide.transitioning { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.photo-browser-slide span.swiper-zoom-container { + display: none; +} +.photo-browser-slide img { + width: auto; + height: auto; + max-width: 100%; + max-height: 100%; + display: none; +} +.photo-browser-slide.swiper-slide-active span.swiper-zoom-container, +.photo-browser-slide.swiper-slide-next span.swiper-zoom-container, +.photo-browser-slide.swiper-slide-prev span.swiper-zoom-container { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.photo-browser-slide.swiper-slide-active img, +.photo-browser-slide.swiper-slide-next img, +.photo-browser-slide.swiper-slide-prev img { + display: inline; +} +.photo-browser-slide.swiper-slide-active.photo-browser-slide-lazy .preloader, +.photo-browser-slide.swiper-slide-next.photo-browser-slide-lazy .preloader, +.photo-browser-slide.swiper-slide-prev.photo-browser-slide-lazy .preloader { + display: block; +} +.photo-browser-slide iframe { + width: 100%; + height: 100%; +} +.photo-browser-slide .preloader { + display: none; + position: absolute; + width: 42px; + height: 42px; + margin-left: -21px; + margin-top: -21px; + left: 50%; + top: 50%; +} +.photo-browser-dark .navbar, +.photo-browser-dark .toolbar { + background: rgba(30, 30, 30, 0.8); + color: #fff; +} +.photo-browser-dark .navbar:before, +.photo-browser-dark .toolbar:before { + display: none; +} +.photo-browser-dark .navbar:after, +.photo-browser-dark .toolbar:after { + display: none; +} +.photo-browser-dark .navbar a, +.photo-browser-dark .toolbar a { + color: #fff; +} +.photo-browser-dark .photo-browser-swiper-container { + background: #000; +} +@-webkit-keyframes photoBrowserIn { + 0% { + -webkit-transform: translate3d(0, 0, 0) scale(0.5); + opacity: 0; + } + 100% { + -webkit-transform: translate3d(0, 0, 0) scale(1); + opacity: 1; + } +} +@keyframes photoBrowserIn { + 0% { + transform: translate3d(0, 0, 0) scale(0.5); + opacity: 0; + } + 100% { + transform: translate3d(0, 0, 0) scale(1); + opacity: 1; + } +} +@-webkit-keyframes photoBrowserOut { + 0% { + -webkit-transform: translate3d(0, 0, 0) scale(1); + opacity: 1; + } + 100% { + -webkit-transform: translate3d(0, 0, 0) scale(0.5); + opacity: 0; + } +} +@keyframes photoBrowserOut { + 0% { + transform: translate3d(0, 0, 0) scale(1); + opacity: 1; + } + 100% { + transform: translate3d(0, 0, 0) scale(0.5); + opacity: 0; + } +} +/* === Columns Picker === */ +.picker-columns { + width: 100%; + height: 260px; + z-index: 11500; +} +.picker-columns.picker-modal-inline, +.popover .picker-columns { + height: 200px; +} +@media (orientation: landscape) and (max-height: 415px) { + .picker-columns:not(.picker-modal-inline) { + height: 200px; + } +} +.popover.popover-picker-columns { + width: 280px; +} +.picker-items { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + padding: 0; + text-align: right; + font-size: 24px; + -webkit-mask-box-image: -webkit-linear-gradient(bottom, transparent, transparent 5%, white 20%, white 80%, transparent 95%, transparent); + -webkit-mask-box-image: linear-gradient(to top, transparent, transparent 5%, white 20%, white 80%, transparent 95%, transparent); +} +.picker-items-col { + overflow: hidden; + position: relative; + max-height: 100%; +} +.picker-items-col.picker-items-col-left { + text-align: left; +} +.picker-items-col.picker-items-col-center { + text-align: center; +} +.picker-items-col.picker-items-col-right { + text-align: right; +} +.picker-items-col.picker-items-col-divider { + color: #000; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.picker-items-col-wrapper { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; +} +.picker-item { + height: 36px; + line-height: 36px; + white-space: nowrap; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + color: #707274; + left: 0; + top: 0; + width: 100%; + box-sizing: border-box; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.picker-item span { + padding: 0 10px; +} +.picker-items-col-absolute .picker-item { + position: absolute; +} +.picker-item.picker-item-far { + pointer-events: none; +} +.picker-item.picker-selected { + color: #000; + -webkit-transform: translate3d(0, 0, 0) rotateX(0deg); + transform: translate3d(0, 0, 0) rotateX(0deg); +} +.picker-center-highlight { + height: 36px; + box-sizing: border-box; + position: absolute; + left: 0; + width: 100%; + top: 50%; + margin-top: -18px; + pointer-events: none; +} +.picker-center-highlight:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #a8abb0; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .picker-center-highlight:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .picker-center-highlight:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.picker-center-highlight:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #a8abb0; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .picker-center-highlight:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .picker-center-highlight:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.picker-3d .picker-items { + overflow: hidden; + -webkit-perspective: 1200px; + perspective: 1200px; +} +.picker-3d .picker-items-col, +.picker-3d .picker-items-col-wrapper, +.picker-3d .picker-item { + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; +} +.picker-3d .picker-items-col { + overflow: visible; +} +.picker-3d .picker-item { + -webkit-transform-origin: center center -110px; + transform-origin: center center -110px; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; +} +/* === Calendar === */ +.picker-calendar { + background: #fff; + height: 320px; + width: 100%; + overflow: hidden; +} +@media (orientation: landscape) and (max-height: 415px) { + .picker-calendar:not(.picker-modal-inline) { + height: 220px; + } +} +.picker-calendar .picker-modal-inner { + overflow: hidden; +} +.popover-picker-calendar .picker-calendar { + height: 320px; +} +.popover.popover-picker-calendar { + width: 320px; +} +.picker-calendar-week-days { + height: 18px; + background: #f7f7f8; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 11px; + box-sizing: border-box; + position: relative; +} +.picker-calendar-week-days:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .picker-calendar-week-days:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .picker-calendar-week-days:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.picker-calendar-week-days .picker-calendar-week-day { + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + width: 14.28571429%; + width: -webkit-calc(100% / 7); + width: -moz-calc(100% / 7); + width: calc(100% / 7); + line-height: 17px; + text-align: center; +} +.picker-calendar-week-days + .picker-calendar-months { + height: -webkit-calc(100% - 18px); + height: -moz-calc(100% - 18px); + height: calc(100% - 18px); +} +.picker-calendar-months { + width: 100%; + height: 100%; + overflow: hidden; + position: relative; +} +.picker-calendar-months-wrapper { + position: relative; + width: 100%; + height: 100%; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.picker-calendar-month { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; +} +.picker-calendar-row { + height: 16.66666667%; + height: -webkit-calc(100% / 6); + height: -moz-calc(100% / 6); + height: calc(100% / 6); + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + width: 100%; + position: relative; +} +.picker-calendar-row:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #ccc; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .picker-calendar-row:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .picker-calendar-row:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.picker-calendar-row:last-child:after { + display: none; +} +.picker-calendar-day { + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + box-sizing: border-box; + width: 14.28571429%; + width: -webkit-calc(100% / 7); + width: -moz-calc(100% / 7); + width: calc(100% / 7); + text-align: center; + color: #000; + font-size: 15px; + cursor: pointer; + z-index: 20; + height: 100%; +} +.picker-calendar-day.picker-calendar-day-prev, +.picker-calendar-day.picker-calendar-day-next { + color: #b8b8b8; +} +.picker-calendar-day.picker-calendar-day-disabled { + color: #d4d4d4; + cursor: auto; +} +.picker-calendar-day.picker-calendar-day-today span { + background: #e3e3e3; +} +.picker-calendar-day.picker-calendar-day-selected span { + background: #007aff; + color: #fff; +} +.picker-calendar-day.picker-calendar-day-has-events span:after { + content: ''; + width: 4px; + height: 4px; + border-radius: 50%; + background: #ccc; + position: absolute; + margin-left: -2px; + left: 50%; + bottom: 1px; +} +.picker-calendar-day.picker-calendar-day-has-events.picker-calendar-day-selected span:after { + display: none; +} +.picker-calendar-day span { + display: inline-block; + border-radius: 100%; + width: 30px; + height: 30px; + line-height: 30px; + position: relative; +} +.picker-calendar-range .picker-calendar-day.picker-calendar-day-selected { + -webkit-box-align: stretch; + -ms-flex-align: stretch; + -webkit-align-items: stretch; + align-items: stretch; + -ms-flex-line-pack: stretch; + -webkit-align-content: stretch; + align-content: stretch; +} +.picker-calendar-range .picker-calendar-day.picker-calendar-day-selected span { + width: 100%; + border-radius: 0; + height: auto; + text-align: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; +} +.picker-calendar-month-picker, +.picker-calendar-year-picker { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + width: 50%; + max-width: 200px; + -webkit-flex-shrink: 10; + -ms-flex: 0 10 auto; + flex-shrink: 10; +} +.picker-calendar-month-picker a.icon-only, +.picker-calendar-year-picker a.icon-only { + min-width: 36px; +} +.picker-calendar-month-picker span, +.picker-calendar-year-picker span { + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + position: relative; + overflow: hidden; + text-overflow: ellipsis; +} +.popover .picker-calendar .picker-calendar-week-days, +.picker-calendar.picker-modal-inline .picker-calendar-week-days { + background: none; +} +.popover .picker-calendar .toolbar:before, +.picker-calendar.picker-modal-inline .toolbar:before, +.popover .picker-calendar .picker-calendar-week-days:before, +.picker-calendar.picker-modal-inline .picker-calendar-week-days:before { + display: none; +} +.popover .picker-calendar .toolbar:after, +.picker-calendar.picker-modal-inline .toolbar:after, +.popover .picker-calendar .picker-calendar-week-days:after, +.picker-calendar.picker-modal-inline .picker-calendar-week-days:after { + display: none; +} +.popover .picker-calendar .toolbar ~ .picker-modal-inner .picker-calendar-months:before, +.picker-calendar.picker-modal-inline .toolbar ~ .picker-modal-inner .picker-calendar-months:before, +.popover .picker-calendar .picker-calendar-week-days ~ .picker-calendar-months:before, +.picker-calendar.picker-modal-inline .picker-calendar-week-days ~ .picker-calendar-months:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .popover .picker-calendar .toolbar ~ .picker-modal-inner .picker-calendar-months:before, +html.pixel-ratio-2 .picker-calendar.picker-modal-inline .toolbar ~ .picker-modal-inner .picker-calendar-months:before, +html.pixel-ratio-2 .popover .picker-calendar .picker-calendar-week-days ~ .picker-calendar-months:before, +html.pixel-ratio-2 .picker-calendar.picker-modal-inline .picker-calendar-week-days ~ .picker-calendar-months:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .popover .picker-calendar .toolbar ~ .picker-modal-inner .picker-calendar-months:before, +html.pixel-ratio-3 .picker-calendar.picker-modal-inline .toolbar ~ .picker-modal-inner .picker-calendar-months:before, +html.pixel-ratio-3 .popover .picker-calendar .picker-calendar-week-days ~ .picker-calendar-months:before, +html.pixel-ratio-3 .picker-calendar.picker-modal-inline .picker-calendar-week-days ~ .picker-calendar-months:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +/* === Notifications === */ +.notifications { + position: absolute; + left: 0; + top: 0; + width: 100%; + z-index: 20000; + font-size: 14px; + margin: 0; + border: none; + display: none; + box-sizing: border-box; + max-height: 100%; + -webkit-transition-duration: 450ms; + transition-duration: 450ms; + -webkit-perspective: 1200px; + perspective: 1200px; + padding-top: 8px; + padding-bottom: 8px; +} +.notifications.list-block > ul { + background: none; + margin: 0 auto; + max-width: 584px; +} +.notifications.list-block > ul:before { + display: none; +} +.notifications.list-block > ul:after { + display: none; +} +.with-statusbar-overlay .notifications { + padding-top: 20px; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); +} +.notifications .item-content { + padding-left: 8px; + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.notifications .item-title-row { + margin-bottom: 8px; +} +.notifications .item-title-row:before { + position: absolute; + left: 0; + top: 0; + height: 36px; + border-radius: 12px 12px 0 0; + z-index: -1; + background: #fff; + content: ''; + width: 100%; +} +.notifications .item-title { + font-weight: 400 !important; + height: 36px; + text-transform: uppercase; + line-height: 35px; + font-size: 13px; +} +html.ios-gt-8 .notifications .item-title { + font-weight: 400 !important; +} +.notifications .item-subtitle { + font-size: 15px; + font-weight: 500; +} +html.ios-gt-8 .notifications .item-subtitle { + font-weight: 600; +} +.notifications .item-text { + font-size: 14px; + color: inherit; + height: auto; + line-height: inherit; +} +.notifications .item-subtitle:first-child, +.notifications .item-text:first-child { + margin-top: 8px; +} +.notifications .item-content, +.notifications .item-inner { + min-height: 0; +} +.notifications .item-inner { + position: static; +} +.notifications .item-inner:after { + display: none; +} +.notifications .item-media { + width: 20px; +} +.notifications .item-media img { + max-width: 20px; + max-height: 20px; +} +.notifications .item-media i.icon { + width: 20px; + height: 20px; + -webkit-background-size: cover; + background-size: cover; + background-position: center; + background-repeat: no-repeat; +} +.notifications .item-media + .item-inner { + margin-left: 8px; + overflow: visible; +} +.notifications li.notification-item { + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15); +} +.notifications li.notification-item .item-inner { + padding-top: 0; +} +.notifications li.notification-item .item-media { + padding-top: 8px; +} +.notifications .item-after { + margin-top: auto; + margin-bottom: auto; +} +.notifications .close-notification { + width: 22px; + height: 22px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2044%2044'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cg%20stroke%3D'none'%20stroke-width%3D'1'%20fill%3D'none'%20fill-rule%3D'evenodd'%3E%3Cpath%20d%3D'M22.5%2C20.3786797%20L14.7218254%2C12.6005051%20L12.6005051%2C14.7218254%20L20.3786797%2C22.5%20L12.6005051%2C30.2781746%20L14.7218254%2C32.3994949%20L22.5%2C24.6213203%20L30.2781746%2C32.3994949%20L32.3994949%2C30.2781746%20L24.6213203%2C22.5%20L32.3994949%2C14.7218254%20L30.2781746%2C12.6005051%20L22.5%2C20.3786797%20Z%20M22%2C44%20C34.1502645%2C44%2044%2C34.1502645%2044%2C22%20C44%2C9.8497355%2034.1502645%2C0%2022%2C0%20C9.8497355%2C0%200%2C9.8497355%200%2C22%20C0%2C34.1502645%209.8497355%2C44%2022%2C44%20Z'%20fill%3D'%23000000'%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E"); + background-position: center top; + background-repeat: no-repeat; + -webkit-background-size: 100% auto; + background-size: 100% auto; + position: relative; + opacity: 0.2; +} +.notifications .close-notification span { + position: absolute; + width: 44px; + height: 44px; + left: 50%; + top: 50%; + margin-left: -22px; + margin-top: -22px; +} +.notifications .notification-item { + max-width: 568px; + margin: 0 auto 8px; + -webkit-transition-duration: 450ms; + transition-duration: 450ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; + background: rgba(250, 250, 250, 0.95); + border-radius: 12px; + width: -webkit-calc(100% - 16px); + width: -moz-calc(100% - 16px); + width: calc(100% - 16px); + position: absolute; + left: 8px; + top: 0; +} +.notifications .notification-item:last-child { + margin-bottom: 0; +} +.notifications .notification-hidden { + opacity: 0; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +/* === Login screen === */ +.login-screen-content { + background: #fff; +} +.login-screen-content .login-screen-title, +.login-screen-content .list-block, +.login-screen-content .content-block, +.login-screen-content .list-block-label { + max-width: 480px; + margin: 25px auto; +} +.login-screen-content .list-block ul { + background: none; +} +.login-screen-content .list-block ul:before { + display: none; +} +.login-screen-content .list-block ul:after { + display: none; +} +.login-screen-content .list-block-label { + text-align: center; +} +.login-screen-title { + text-align: center; + font-size: 30px; +} +/* === Disabled elements === */ +.disabled, +[disabled] { + opacity: 0.55; + pointer-events: none; +} +.disabled .disabled, +.disabled [disabled], +[disabled] .disabled, +[disabled] [disabled] { + opacity: 1; +} +.data-table { + overflow-x: auto; +} +.data-table table { + width: 100%; + border: none; + padding: 0; + margin: 0; + border-collapse: collapse; + text-align: left; +} +.data-table thead { + font-size: 12px; +} +.data-table thead th, +.data-table thead td { + font-weight: 500; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + line-height: 16px; +} +html.ios-gt-8 .data-table thead th, +html.ios-gt-8 .data-table thead td { + font-weight: 600; +} +.data-table thead th:not(.sortable-active), +.data-table thead td:not(.sortable-active) { + color: #8e8e93; +} +.data-table thead i.icon, +.data-table thead i.f7-icons { + font-size: 18px; + width: 18px; + height: 18px; + vertical-align: top; +} +.data-table tbody tr.data-table-row-selected { + background: #f7f7f8; +} +.data-table tbody td:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #c8c7cc; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .data-table tbody td:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .data-table tbody td:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +html:not(.ios):not(.android) .data-table tbody tr:hover { + background: #f7f7f8; +} +.data-table th, +.data-table td { + padding: 0; + position: relative; + padding-left: 15px; + padding-right: 15px; + height: 44px; +} +.data-table th.numeric-cell, +.data-table td.numeric-cell { + text-align: right; +} +.data-table th.checkbox-cell, +.data-table td.checkbox-cell { + padding-right: 7px; + width: 22px; + overflow: visible; +} +.data-table th.checkbox-cell + td, +.data-table td.checkbox-cell + td, +.data-table th.checkbox-cell + th, +.data-table td.checkbox-cell + th { + padding-left: 8px; +} +.data-table th.actions-cell, +.data-table td.actions-cell { + text-align: right; + white-space: nowrap; +} +.data-table th.actions-cell a.link, +.data-table td.actions-cell a.link { + position: relative; + z-index: 1; + cursor: pointer; +} +.data-table th.actions-cell a.link + a.link, +.data-table td.actions-cell a.link + a.link { + margin-left: 15px; +} +.data-table th.actions-cell a.icon-only, +.data-table td.actions-cell a.icon-only { + width: 18px; + height: 18px; + display: inline-block; + vertical-align: middle; + font-size: 18px; + line-height: 18px; + text-align: center; + font-size: 0; +} +.data-table th.actions-cell a.icon-only i, +.data-table td.actions-cell a.icon-only i { + font-size: 18px; + vertical-align: middle; +} +.data-table .sortable-cell { + cursor: pointer; + position: relative; +} +.data-table .sortable-cell:not(.numeric-cell):after, +.data-table .sortable-cell.numeric-cell:before { + content: ''; + display: inline-block; + vertical-align: top; + width: 16px; + height: 16px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23000000'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200h24v24H0V0z'%20fill%3D'none'%2F%3E%3Cpath%20d%3D'M20%2012l-1.41-1.41L13%2016.17V4h-2v12.17l-5.58-5.59L4%2012l8%208%208-8z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); + background-size: 100% auto; + background-position: center; + background-repeat: no-repeat; + font-size: 0; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 0; +} +html:not(.ios):not(.android) .data-table .sortable-cell:not(.sortable-active):hover:after, +html:not(.ios):not(.android) .data-table .sortable-cell:not(.sortable-active):hover:before { + opacity: 0.54; +} +.data-table .sortable-cell.sortable-active:after, +.data-table .sortable-cell.sortable-active:before { + opacity: 0.87; +} +.data-table .sortable-cell.sortable-desc:after, +.data-table .sortable-cell.sortable-desc:before { + -webkit-transform: rotate(180deg); + transform: rotate(180deg); +} +.data-table .sortable-cell:not(.numeric-cell):after { + margin-left: 5px; +} +.data-table .sortable-cell.numeric-cell:before { + margin-right: 5px; +} +.data-table.card .card-header, +.card .data-table .card-header, +.data-table.card .card-footer, +.card .data-table .card-footer { + padding-left: 15px; + padding-right: 8px; +} +.data-table.card .card-header, +.card .data-table .card-header { + height: 64px; +} +.data-table.card .card-content, +.card .data-table .card-content { + overflow-x: auto; +} +.data-table .data-table-title { + font-size: 17px; + font-weight: 500; +} +html.ios-gt-8 .data-table .data-table-title { + font-weight: 600; +} +.data-table .data-table-links, +.data-table .data-table-actions { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} +.data-table .data-table-links a.link, +.data-table .data-table-actions a.link { + cursor: pointer; +} +.data-table .data-table-links a.link + a.link, +.data-table .data-table-actions a.link + a.link { + margin-left: 15px; +} +.data-table .data-table-actions { + margin-left: auto; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.data-table .data-table-actions a.link { + min-width: 0; + cursor: pointer; +} +.data-table .data-table-actions a.link.icon-only { + width: 44px; + height: 44px; + line-height: 1; +} +.data-table .data-table-actions i.icon, +.data-table .data-table-actions i.f7-icons { + font-size: 22px; +} +.data-table .data-table-header, +.data-table .data-table-header-selected { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + width: 100%; +} +.data-table .card-header > .data-table-header, +.data-table .card-header > .data-table-header-selected { + padding-left: 15px; + padding-right: 8px; + margin-left: -15px; + margin-right: -8px; + height: 100%; + padding-top: 10px; + padding-bottom: 10px; +} +.data-table .data-table-header-selected { + display: none; + background: rgba(0, 122, 255, 0.1); +} +.data-table.data-table-has-checked .data-table-header { + display: none; +} +.data-table.data-table-has-checked .data-table-header-selected { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.data-table .data-table-title-selected { + color: #007aff; + font-size: 14px; +} +@media (max-width: 480px) and (orientation: portrait) { + .data-table.data-table-collapsible thead { + display: none; + } + .data-table.data-table-collapsible tbody, + .data-table.data-table-collapsible tr, + .data-table.data-table-collapsible td { + display: block; + } + .data-table.data-table-collapsible tr { + position: relative; + } + .data-table.data-table-collapsible tr:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #c8c7cc; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; + } + html.pixel-ratio-2 .data-table.data-table-collapsible tr:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + } + html.pixel-ratio-3 .data-table.data-table-collapsible tr:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); + } + .data-table.data-table-collapsible tr:hover { + background-color: inherit; + } + .data-table.data-table-collapsible td { + text-align: left; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -ms-flex-line-pack: center; + -webkit-align-content: center; + align-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; + } + .data-table.data-table-collapsible td:before { + display: none; + } + .data-table.data-table-collapsible td:not(.checkbox-cell) { + font-size: 17px; + line-height: 17px; + } + .data-table.data-table-collapsible td:not(.checkbox-cell):before { + width: 40%; + display: block; + content: attr(data-collapsible-title); + position: relative; + height: auto; + background: none; + -webkit-transform: none !important; + transform: none !important; + color: #8e8e93; + font-weight: 500; + font-size: 12px; + margin-right: 16px; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + } + html.ios-gt-8 .data-table.data-table-collapsible td:not(.checkbox-cell):before { + font-weight: 600; + } + .data-table.data-table-collapsible td.checkbox-cell { + position: absolute; + left: 0; + top: 0; + } + .data-table.data-table-collapsible td.checkbox-cell + td { + padding-left: 16px; + } + .data-table.data-table-collapsible td.checkbox-cell ~ td { + margin-left: 32px; + } +} +.data-table .tablet-only, +.data-table .tablet-landscape-only { + display: none; +} +@media (min-width: 768px) { + .data-table .tablet-only { + display: table-cell; + } +} +@media (min-width: 768px) and (orientation: landscape) { + .data-table .tablet-landscape-only { + display: table-cell; + } +} diff --git a/bower_components/framework7/dist/css/framework7.ios.min.css b/bower_components/framework7/dist/css/framework7.ios.min.css new file mode 100644 index 00000000..3fe5edfc --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.ios.min.css @@ -0,0 +1,15 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +.framework7-root,body,html{position:relative;height:100%;width:100%;overflow-x:hidden}body{font-family:-apple-system,SF UI Text,Helvetica Neue,Helvetica,Arial,sans-serif;margin:0;padding:0;color:#000;font-size:14px;line-height:1.4;width:100%;-webkit-text-size-adjust:100%;background:#fff;overflow:hidden}.framework7-root{overflow:hidden}@media all and (width:1024px) and (height:691px) and (orientation:landscape){.framework7-root,body,html{height:671px}}@media all and (width:1024px) and (height:692px) and (orientation:landscape){.framework7-root,body,html{height:672px}}*{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}a,input,select,textarea{outline:0}a{text-decoration:none;color:#007aff}p{margin:1em 0}.row{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-lines:multiple;-moz-box-lines:multiple;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.row>[class*=col-]{box-sizing:border-box}.row .col-auto{width:100%}.row .col-100{width:100%;width:-webkit-calc((100% - 15px*0)/ 1);width:calc((100% - 15px*0)/ 1)}.row.no-gutter .col-100{width:100%}.row .col-95{width:95%;width:-webkit-calc((100% - 15px*.05263157894736836)/ 1.0526315789473684);width:calc((100% - 15px*.05263157894736836)/ 1.0526315789473684)}.row.no-gutter .col-95{width:95%}.row .col-90{width:90%;width:-webkit-calc((100% - 15px*.11111111111111116)/ 1.1111111111111112);width:calc((100% - 15px*.11111111111111116)/ 1.1111111111111112)}.row.no-gutter .col-90{width:90%}.row .col-85{width:85%;width:-webkit-calc((100% - 15px*.17647058823529416)/ 1.1764705882352942);width:calc((100% - 15px*.17647058823529416)/ 1.1764705882352942)}.row.no-gutter .col-85{width:85%}.row .col-80{width:80%;width:-webkit-calc((100% - 15px*.25)/ 1.25);width:calc((100% - 15px*.25)/ 1.25)}.row.no-gutter .col-80{width:80%}.row .col-75{width:75%;width:-webkit-calc((100% - 15px*.33333333333333326)/ 1.3333333333333333);width:calc((100% - 15px*.33333333333333326)/ 1.3333333333333333)}.row.no-gutter .col-75{width:75%}.row .col-70{width:70%;width:-webkit-calc((100% - 15px*.4285714285714286)/ 1.4285714285714286);width:calc((100% - 15px*.4285714285714286)/ 1.4285714285714286)}.row.no-gutter .col-70{width:70%}.row .col-66{width:66.66666666666666%;width:-webkit-calc((100% - 15px*.5000000000000002)/ 1.5000000000000002);width:calc((100% - 15px*.5000000000000002)/ 1.5000000000000002)}.row.no-gutter .col-66{width:66.66666666666666%}.row .col-65{width:65%;width:-webkit-calc((100% - 15px*.5384615384615385)/ 1.5384615384615385);width:calc((100% - 15px*.5384615384615385)/ 1.5384615384615385)}.row.no-gutter .col-65{width:65%}.row .col-60{width:60%;width:-webkit-calc((100% - 15px*.6666666666666667)/ 1.6666666666666667);width:calc((100% - 15px*.6666666666666667)/ 1.6666666666666667)}.row.no-gutter .col-60{width:60%}.row .col-55{width:55%;width:-webkit-calc((100% - 15px*.8181818181818181)/ 1.8181818181818181);width:calc((100% - 15px*.8181818181818181)/ 1.8181818181818181)}.row.no-gutter .col-55{width:55%}.row .col-50{width:50%;width:-webkit-calc((100% - 15px*1)/ 2);width:calc((100% - 15px*1)/ 2)}.row.no-gutter .col-50{width:50%}.row .col-45{width:45%;width:-webkit-calc((100% - 15px*1.2222222222222223)/ 2.2222222222222223);width:calc((100% - 15px*1.2222222222222223)/ 2.2222222222222223)}.row.no-gutter .col-45{width:45%}.row .col-40{width:40%;width:-webkit-calc((100% - 15px*1.5)/ 2.5);width:calc((100% - 15px*1.5)/ 2.5)}.row.no-gutter .col-40{width:40%}.row .col-35{width:35%;width:-webkit-calc((100% - 15px*1.8571428571428572)/ 2.857142857142857);width:calc((100% - 15px*1.8571428571428572)/ 2.857142857142857)}.row.no-gutter .col-35{width:35%}.row .col-33{width:33.333333333333336%;width:-webkit-calc((100% - 15px*2)/ 3);width:calc((100% - 15px*2)/ 3)}.row.no-gutter .col-33{width:33.333333333333336%}.row .col-30{width:30%;width:-webkit-calc((100% - 15px*2.3333333333333335)/ 3.3333333333333335);width:calc((100% - 15px*2.3333333333333335)/ 3.3333333333333335)}.row.no-gutter .col-30{width:30%}.row .col-25{width:25%;width:-webkit-calc((100% - 15px*3)/ 4);width:calc((100% - 15px*3)/ 4)}.row.no-gutter .col-25{width:25%}.row .col-20{width:20%;width:-webkit-calc((100% - 15px*4)/ 5);width:calc((100% - 15px*4)/ 5)}.row.no-gutter .col-20{width:20%}.row .col-15{width:15%;width:-webkit-calc((100% - 15px*5.666666666666667)/ 6.666666666666667);width:calc((100% - 15px*5.666666666666667)/ 6.666666666666667)}.row.no-gutter .col-15{width:15%}.row .col-10{width:10%;width:-webkit-calc((100% - 15px*9)/ 10);width:calc((100% - 15px*9)/ 10)}.row.no-gutter .col-10{width:10%}.row .col-5{width:5%;width:-webkit-calc((100% - 15px*19)/ 20);width:calc((100% - 15px*19)/ 20)}.row.no-gutter .col-5{width:5%}.row .col-auto:nth-last-child(1),.row .col-auto:nth-last-child(1)~.col-auto{width:100%;width:-webkit-calc((100% - 15px*0)/ 1);width:calc((100% - 15px*0)/ 1)}.row.no-gutter .col-auto:nth-last-child(1),.row.no-gutter .col-auto:nth-last-child(1)~.col-auto{width:100%}.row .col-auto:nth-last-child(2),.row .col-auto:nth-last-child(2)~.col-auto{width:50%;width:-webkit-calc((100% - 15px*1)/ 2);width:calc((100% - 15px*1)/ 2)}.row.no-gutter .col-auto:nth-last-child(2),.row.no-gutter .col-auto:nth-last-child(2)~.col-auto{width:50%}.row .col-auto:nth-last-child(3),.row .col-auto:nth-last-child(3)~.col-auto{width:33.33333333%;width:-webkit-calc((100% - 15px*2)/ 3);width:calc((100% - 15px*2)/ 3)}.row.no-gutter .col-auto:nth-last-child(3),.row.no-gutter .col-auto:nth-last-child(3)~.col-auto{width:33.33333333%}.row .col-auto:nth-last-child(4),.row .col-auto:nth-last-child(4)~.col-auto{width:25%;width:-webkit-calc((100% - 15px*3)/ 4);width:calc((100% - 15px*3)/ 4)}.row.no-gutter .col-auto:nth-last-child(4),.row.no-gutter .col-auto:nth-last-child(4)~.col-auto{width:25%}.row .col-auto:nth-last-child(5),.row .col-auto:nth-last-child(5)~.col-auto{width:20%;width:-webkit-calc((100% - 15px*4)/ 5);width:calc((100% - 15px*4)/ 5)}.row.no-gutter .col-auto:nth-last-child(5),.row.no-gutter .col-auto:nth-last-child(5)~.col-auto{width:20%}.row .col-auto:nth-last-child(6),.row .col-auto:nth-last-child(6)~.col-auto{width:16.66666667%;width:-webkit-calc((100% - 15px*5)/ 6);width:calc((100% - 15px*5)/ 6)}.row.no-gutter .col-auto:nth-last-child(6),.row.no-gutter .col-auto:nth-last-child(6)~.col-auto{width:16.66666667%}.row .col-auto:nth-last-child(7),.row .col-auto:nth-last-child(7)~.col-auto{width:14.28571429%;width:-webkit-calc((100% - 15px*6)/ 7);width:calc((100% - 15px*6)/ 7)}.row.no-gutter .col-auto:nth-last-child(7),.row.no-gutter .col-auto:nth-last-child(7)~.col-auto{width:14.28571429%}.row .col-auto:nth-last-child(8),.row .col-auto:nth-last-child(8)~.col-auto{width:12.5%;width:-webkit-calc((100% - 15px*7)/ 8);width:calc((100% - 15px*7)/ 8)}.row.no-gutter .col-auto:nth-last-child(8),.row.no-gutter .col-auto:nth-last-child(8)~.col-auto{width:12.5%}.row .col-auto:nth-last-child(9),.row .col-auto:nth-last-child(9)~.col-auto{width:11.11111111%;width:-webkit-calc((100% - 15px*8)/ 9);width:calc((100% - 15px*8)/ 9)}.row.no-gutter .col-auto:nth-last-child(9),.row.no-gutter .col-auto:nth-last-child(9)~.col-auto{width:11.11111111%}.row .col-auto:nth-last-child(10),.row .col-auto:nth-last-child(10)~.col-auto{width:10%;width:-webkit-calc((100% - 15px*9)/ 10);width:calc((100% - 15px*9)/ 10)}.row.no-gutter .col-auto:nth-last-child(10),.row.no-gutter .col-auto:nth-last-child(10)~.col-auto{width:10%}.row .col-auto:nth-last-child(11),.row .col-auto:nth-last-child(11)~.col-auto{width:9.09090909%;width:-webkit-calc((100% - 15px*10)/ 11);width:calc((100% - 15px*10)/ 11)}.row.no-gutter .col-auto:nth-last-child(11),.row.no-gutter .col-auto:nth-last-child(11)~.col-auto{width:9.09090909%}.row .col-auto:nth-last-child(12),.row .col-auto:nth-last-child(12)~.col-auto{width:8.33333333%;width:-webkit-calc((100% - 15px*11)/ 12);width:calc((100% - 15px*11)/ 12)}.row.no-gutter .col-auto:nth-last-child(12),.row.no-gutter .col-auto:nth-last-child(12)~.col-auto{width:8.33333333%}.row .col-auto:nth-last-child(13),.row .col-auto:nth-last-child(13)~.col-auto{width:7.69230769%;width:-webkit-calc((100% - 15px*12)/ 13);width:calc((100% - 15px*12)/ 13)}.row.no-gutter .col-auto:nth-last-child(13),.row.no-gutter .col-auto:nth-last-child(13)~.col-auto{width:7.69230769%}.row .col-auto:nth-last-child(14),.row .col-auto:nth-last-child(14)~.col-auto{width:7.14285714%;width:-webkit-calc((100% - 15px*13)/ 14);width:calc((100% - 15px*13)/ 14)}.row.no-gutter .col-auto:nth-last-child(14),.row.no-gutter .col-auto:nth-last-child(14)~.col-auto{width:7.14285714%}.row .col-auto:nth-last-child(15),.row .col-auto:nth-last-child(15)~.col-auto{width:6.66666667%;width:-webkit-calc((100% - 15px*14)/ 15);width:calc((100% - 15px*14)/ 15)}.row.no-gutter .col-auto:nth-last-child(15),.row.no-gutter .col-auto:nth-last-child(15)~.col-auto{width:6.66666667%}.row .col-auto:nth-last-child(16),.row .col-auto:nth-last-child(16)~.col-auto{width:6.25%;width:-webkit-calc((100% - 15px*15)/ 16);width:calc((100% - 15px*15)/ 16)}.row.no-gutter .col-auto:nth-last-child(16),.row.no-gutter .col-auto:nth-last-child(16)~.col-auto{width:6.25%}.row .col-auto:nth-last-child(17),.row .col-auto:nth-last-child(17)~.col-auto{width:5.88235294%;width:-webkit-calc((100% - 15px*16)/ 17);width:calc((100% - 15px*16)/ 17)}.row.no-gutter .col-auto:nth-last-child(17),.row.no-gutter .col-auto:nth-last-child(17)~.col-auto{width:5.88235294%}.row .col-auto:nth-last-child(18),.row .col-auto:nth-last-child(18)~.col-auto{width:5.55555556%;width:-webkit-calc((100% - 15px*17)/ 18);width:calc((100% - 15px*17)/ 18)}.row.no-gutter .col-auto:nth-last-child(18),.row.no-gutter .col-auto:nth-last-child(18)~.col-auto{width:5.55555556%}.row .col-auto:nth-last-child(19),.row .col-auto:nth-last-child(19)~.col-auto{width:5.26315789%;width:-webkit-calc((100% - 15px*18)/ 19);width:calc((100% - 15px*18)/ 19)}.row.no-gutter .col-auto:nth-last-child(19),.row.no-gutter .col-auto:nth-last-child(19)~.col-auto{width:5.26315789%}.row .col-auto:nth-last-child(20),.row .col-auto:nth-last-child(20)~.col-auto{width:5%;width:-webkit-calc((100% - 15px*19)/ 20);width:calc((100% - 15px*19)/ 20)}.row.no-gutter .col-auto:nth-last-child(20),.row.no-gutter .col-auto:nth-last-child(20)~.col-auto{width:5%}.row .col-auto:nth-last-child(21),.row .col-auto:nth-last-child(21)~.col-auto{width:4.76190476%;width:-webkit-calc((100% - 15px*20)/ 21);width:calc((100% - 15px*20)/ 21)}.row.no-gutter .col-auto:nth-last-child(21),.row.no-gutter .col-auto:nth-last-child(21)~.col-auto{width:4.76190476%}@media all and (min-width:768px){.row .tablet-100{width:100%;width:-webkit-calc((100% - 15px*0)/ 1);width:calc((100% - 15px*0)/ 1)}.row.no-gutter .tablet-100{width:100%}.row .tablet-95{width:95%;width:-webkit-calc((100% - 15px*.05263157894736836)/ 1.0526315789473684);width:calc((100% - 15px*.05263157894736836)/ 1.0526315789473684)}.row.no-gutter .tablet-95{width:95%}.row .tablet-90{width:90%;width:-webkit-calc((100% - 15px*.11111111111111116)/ 1.1111111111111112);width:calc((100% - 15px*.11111111111111116)/ 1.1111111111111112)}.row.no-gutter .tablet-90{width:90%}.row .tablet-85{width:85%;width:-webkit-calc((100% - 15px*.17647058823529416)/ 1.1764705882352942);width:calc((100% - 15px*.17647058823529416)/ 1.1764705882352942)}.row.no-gutter .tablet-85{width:85%}.row .tablet-80{width:80%;width:-webkit-calc((100% - 15px*.25)/ 1.25);width:calc((100% - 15px*.25)/ 1.25)}.row.no-gutter .tablet-80{width:80%}.row .tablet-75{width:75%;width:-webkit-calc((100% - 15px*.33333333333333326)/ 1.3333333333333333);width:calc((100% - 15px*.33333333333333326)/ 1.3333333333333333)}.row.no-gutter .tablet-75{width:75%}.row .tablet-70{width:70%;width:-webkit-calc((100% - 15px*.4285714285714286)/ 1.4285714285714286);width:calc((100% - 15px*.4285714285714286)/ 1.4285714285714286)}.row.no-gutter .tablet-70{width:70%}.row .tablet-66{width:66.66666666666666%;width:-webkit-calc((100% - 15px*.5000000000000002)/ 1.5000000000000002);width:calc((100% - 15px*.5000000000000002)/ 1.5000000000000002)}.row.no-gutter .tablet-66{width:66.66666666666666%}.row .tablet-65{width:65%;width:-webkit-calc((100% - 15px*.5384615384615385)/ 1.5384615384615385);width:calc((100% - 15px*.5384615384615385)/ 1.5384615384615385)}.row.no-gutter .tablet-65{width:65%}.row .tablet-60{width:60%;width:-webkit-calc((100% - 15px*.6666666666666667)/ 1.6666666666666667);width:calc((100% - 15px*.6666666666666667)/ 1.6666666666666667)}.row.no-gutter .tablet-60{width:60%}.row .tablet-55{width:55%;width:-webkit-calc((100% - 15px*.8181818181818181)/ 1.8181818181818181);width:calc((100% - 15px*.8181818181818181)/ 1.8181818181818181)}.row.no-gutter .tablet-55{width:55%}.row .tablet-50{width:50%;width:-webkit-calc((100% - 15px*1)/ 2);width:calc((100% - 15px*1)/ 2)}.row.no-gutter .tablet-50{width:50%}.row .tablet-45{width:45%;width:-webkit-calc((100% - 15px*1.2222222222222223)/ 2.2222222222222223);width:calc((100% - 15px*1.2222222222222223)/ 2.2222222222222223)}.row.no-gutter .tablet-45{width:45%}.row .tablet-40{width:40%;width:-webkit-calc((100% - 15px*1.5)/ 2.5);width:calc((100% - 15px*1.5)/ 2.5)}.row.no-gutter .tablet-40{width:40%}.row .tablet-35{width:35%;width:-webkit-calc((100% - 15px*1.8571428571428572)/ 2.857142857142857);width:calc((100% - 15px*1.8571428571428572)/ 2.857142857142857)}.row.no-gutter .tablet-35{width:35%}.row .tablet-33{width:33.333333333333336%;width:-webkit-calc((100% - 15px*2)/ 3);width:calc((100% - 15px*2)/ 3)}.row.no-gutter .tablet-33{width:33.333333333333336%}.row .tablet-30{width:30%;width:-webkit-calc((100% - 15px*2.3333333333333335)/ 3.3333333333333335);width:calc((100% - 15px*2.3333333333333335)/ 3.3333333333333335)}.row.no-gutter .tablet-30{width:30%}.row .tablet-25{width:25%;width:-webkit-calc((100% - 15px*3)/ 4);width:calc((100% - 15px*3)/ 4)}.row.no-gutter .tablet-25{width:25%}.row .tablet-20{width:20%;width:-webkit-calc((100% - 15px*4)/ 5);width:calc((100% - 15px*4)/ 5)}.row.no-gutter .tablet-20{width:20%}.row .tablet-15{width:15%;width:-webkit-calc((100% - 15px*5.666666666666667)/ 6.666666666666667);width:calc((100% - 15px*5.666666666666667)/ 6.666666666666667)}.row.no-gutter .tablet-15{width:15%}.row .tablet-10{width:10%;width:-webkit-calc((100% - 15px*9)/ 10);width:calc((100% - 15px*9)/ 10)}.row.no-gutter .tablet-10{width:10%}.row .tablet-5{width:5%;width:-webkit-calc((100% - 15px*19)/ 20);width:calc((100% - 15px*19)/ 20)}.row.no-gutter .tablet-5{width:5%}.row .tablet-auto:nth-last-child(1),.row .tablet-auto:nth-last-child(1)~.col-auto{width:100%;width:-webkit-calc((100% - 15px*0)/ 1);width:calc((100% - 15px*0)/ 1)}.row.no-gutter .tablet-auto:nth-last-child(1),.row.no-gutter .tablet-auto:nth-last-child(1)~.tablet-auto{width:100%}.row .tablet-auto:nth-last-child(2),.row .tablet-auto:nth-last-child(2)~.col-auto{width:50%;width:-webkit-calc((100% - 15px*1)/ 2);width:calc((100% - 15px*1)/ 2)}.row.no-gutter .tablet-auto:nth-last-child(2),.row.no-gutter .tablet-auto:nth-last-child(2)~.tablet-auto{width:50%}.row .tablet-auto:nth-last-child(3),.row .tablet-auto:nth-last-child(3)~.col-auto{width:33.33333333%;width:-webkit-calc((100% - 15px*2)/ 3);width:calc((100% - 15px*2)/ 3)}.row.no-gutter .tablet-auto:nth-last-child(3),.row.no-gutter .tablet-auto:nth-last-child(3)~.tablet-auto{width:33.33333333%}.row .tablet-auto:nth-last-child(4),.row .tablet-auto:nth-last-child(4)~.col-auto{width:25%;width:-webkit-calc((100% - 15px*3)/ 4);width:calc((100% - 15px*3)/ 4)}.row.no-gutter .tablet-auto:nth-last-child(4),.row.no-gutter .tablet-auto:nth-last-child(4)~.tablet-auto{width:25%}.row .tablet-auto:nth-last-child(5),.row .tablet-auto:nth-last-child(5)~.col-auto{width:20%;width:-webkit-calc((100% - 15px*4)/ 5);width:calc((100% - 15px*4)/ 5)}.row.no-gutter .tablet-auto:nth-last-child(5),.row.no-gutter .tablet-auto:nth-last-child(5)~.tablet-auto{width:20%}.row .tablet-auto:nth-last-child(6),.row .tablet-auto:nth-last-child(6)~.col-auto{width:16.66666667%;width:-webkit-calc((100% - 15px*5)/ 6);width:calc((100% - 15px*5)/ 6)}.row.no-gutter .tablet-auto:nth-last-child(6),.row.no-gutter .tablet-auto:nth-last-child(6)~.tablet-auto{width:16.66666667%}.row .tablet-auto:nth-last-child(7),.row .tablet-auto:nth-last-child(7)~.col-auto{width:14.28571429%;width:-webkit-calc((100% - 15px*6)/ 7);width:calc((100% - 15px*6)/ 7)}.row.no-gutter .tablet-auto:nth-last-child(7),.row.no-gutter .tablet-auto:nth-last-child(7)~.tablet-auto{width:14.28571429%}.row .tablet-auto:nth-last-child(8),.row .tablet-auto:nth-last-child(8)~.col-auto{width:12.5%;width:-webkit-calc((100% - 15px*7)/ 8);width:calc((100% - 15px*7)/ 8)}.row.no-gutter .tablet-auto:nth-last-child(8),.row.no-gutter .tablet-auto:nth-last-child(8)~.tablet-auto{width:12.5%}.row .tablet-auto:nth-last-child(9),.row .tablet-auto:nth-last-child(9)~.col-auto{width:11.11111111%;width:-webkit-calc((100% - 15px*8)/ 9);width:calc((100% - 15px*8)/ 9)}.row.no-gutter .tablet-auto:nth-last-child(9),.row.no-gutter .tablet-auto:nth-last-child(9)~.tablet-auto{width:11.11111111%}.row .tablet-auto:nth-last-child(10),.row .tablet-auto:nth-last-child(10)~.col-auto{width:10%;width:-webkit-calc((100% - 15px*9)/ 10);width:calc((100% - 15px*9)/ 10)}.row.no-gutter .tablet-auto:nth-last-child(10),.row.no-gutter .tablet-auto:nth-last-child(10)~.tablet-auto{width:10%}.row .tablet-auto:nth-last-child(11),.row .tablet-auto:nth-last-child(11)~.col-auto{width:9.09090909%;width:-webkit-calc((100% - 15px*10)/ 11);width:calc((100% - 15px*10)/ 11)}.row.no-gutter .tablet-auto:nth-last-child(11),.row.no-gutter .tablet-auto:nth-last-child(11)~.tablet-auto{width:9.09090909%}.row .tablet-auto:nth-last-child(12),.row .tablet-auto:nth-last-child(12)~.col-auto{width:8.33333333%;width:-webkit-calc((100% - 15px*11)/ 12);width:calc((100% - 15px*11)/ 12)}.row.no-gutter .tablet-auto:nth-last-child(12),.row.no-gutter .tablet-auto:nth-last-child(12)~.tablet-auto{width:8.33333333%}.row .tablet-auto:nth-last-child(13),.row .tablet-auto:nth-last-child(13)~.col-auto{width:7.69230769%;width:-webkit-calc((100% - 15px*12)/ 13);width:calc((100% - 15px*12)/ 13)}.row.no-gutter .tablet-auto:nth-last-child(13),.row.no-gutter .tablet-auto:nth-last-child(13)~.tablet-auto{width:7.69230769%}.row .tablet-auto:nth-last-child(14),.row .tablet-auto:nth-last-child(14)~.col-auto{width:7.14285714%;width:-webkit-calc((100% - 15px*13)/ 14);width:calc((100% - 15px*13)/ 14)}.row.no-gutter .tablet-auto:nth-last-child(14),.row.no-gutter .tablet-auto:nth-last-child(14)~.tablet-auto{width:7.14285714%}.row .tablet-auto:nth-last-child(15),.row .tablet-auto:nth-last-child(15)~.col-auto{width:6.66666667%;width:-webkit-calc((100% - 15px*14)/ 15);width:calc((100% - 15px*14)/ 15)}.row.no-gutter .tablet-auto:nth-last-child(15),.row.no-gutter .tablet-auto:nth-last-child(15)~.tablet-auto{width:6.66666667%}.row .tablet-auto:nth-last-child(16),.row .tablet-auto:nth-last-child(16)~.col-auto{width:6.25%;width:-webkit-calc((100% - 15px*15)/ 16);width:calc((100% - 15px*15)/ 16)}.row.no-gutter .tablet-auto:nth-last-child(16),.row.no-gutter .tablet-auto:nth-last-child(16)~.tablet-auto{width:6.25%}.row .tablet-auto:nth-last-child(17),.row .tablet-auto:nth-last-child(17)~.col-auto{width:5.88235294%;width:-webkit-calc((100% - 15px*16)/ 17);width:calc((100% - 15px*16)/ 17)}.row.no-gutter .tablet-auto:nth-last-child(17),.row.no-gutter .tablet-auto:nth-last-child(17)~.tablet-auto{width:5.88235294%}.row .tablet-auto:nth-last-child(18),.row .tablet-auto:nth-last-child(18)~.col-auto{width:5.55555556%;width:-webkit-calc((100% - 15px*17)/ 18);width:calc((100% - 15px*17)/ 18)}.row.no-gutter .tablet-auto:nth-last-child(18),.row.no-gutter .tablet-auto:nth-last-child(18)~.tablet-auto{width:5.55555556%}.row .tablet-auto:nth-last-child(19),.row .tablet-auto:nth-last-child(19)~.col-auto{width:5.26315789%;width:-webkit-calc((100% - 15px*18)/ 19);width:calc((100% - 15px*18)/ 19)}.row.no-gutter .tablet-auto:nth-last-child(19),.row.no-gutter .tablet-auto:nth-last-child(19)~.tablet-auto{width:5.26315789%}.row .tablet-auto:nth-last-child(20),.row .tablet-auto:nth-last-child(20)~.col-auto{width:5%;width:-webkit-calc((100% - 15px*19)/ 20);width:calc((100% - 15px*19)/ 20)}.row.no-gutter .tablet-auto:nth-last-child(20),.row.no-gutter .tablet-auto:nth-last-child(20)~.tablet-auto{width:5%}.row .tablet-auto:nth-last-child(21),.row .tablet-auto:nth-last-child(21)~.col-auto{width:4.76190476%;width:-webkit-calc((100% - 15px*20)/ 21);width:calc((100% - 15px*20)/ 21)}.row.no-gutter .tablet-auto:nth-last-child(21),.row.no-gutter .tablet-auto:nth-last-child(21)~.tablet-auto{width:4.76190476%}}.view,.views{position:relative;height:100%;z-index:5000}.views{overflow:auto;-webkit-overflow-scrolling:touch}.view{overflow:hidden;box-sizing:border-box;width:100%}.pages{position:relative;width:100%;height:100%;overflow:hidden;background:#000}.page{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;background:#efeff4;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.page.cached{display:none}.page-on-left{-webkit-transform:translate3d(-20%,0,0);transform:translate3d(-20%,0,0)}.page-on-left .swipeback-page-opacity{opacity:1}.page-on-left:after{opacity:1}.page-on-center .swipeback-page-shadow{opacity:1}.page-on-center .swipeback-page-opacity{opacity:0!important}.page-on-right{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.page-on-right .swipeback-page-shadow{opacity:0!important}.page-content{overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;height:100%;position:relative;z-index:1}.swipeback-page-shadow{position:absolute;right:100%;top:0;width:16px;height:100%;background:-webkit-linear-gradient(left,rgba(0,0,0,0) 0,rgba(0,0,0,0) 10%,rgba(0,0,0,.01) 50%,rgba(0,0,0,.2) 100%);background:linear-gradient(to right,rgba(0,0,0,0) 0,rgba(0,0,0,0) 10%,rgba(0,0,0,.01) 50%,rgba(0,0,0,.2) 100%);z-index:-1;content:'';will-change:opacity;contain:strict}html.android .swipeback-page-shadow{display:none;-webkit-animation:none;animation:none}.swipeback-page-opacity{position:absolute;left:0;top:0;background:rgba(0,0,0,.1);width:100%;height:100%;content:'';opacity:0;z-index:10000;will-change:opacity;contain:strict}.page-transitioning,.page-transitioning .swipeback-page-opacity,.page-transitioning .swipeback-page-shadow{-webkit-transition-duration:.4s;transition-duration:.4s}.page-from-center-to-right:before,.page-from-right-to-center:before{position:absolute;right:100%;top:0;width:16px;height:100%;background:-webkit-linear-gradient(left,rgba(0,0,0,0) 0,rgba(0,0,0,0) 10%,rgba(0,0,0,.01) 50%,rgba(0,0,0,.2) 100%);background:linear-gradient(to right,rgba(0,0,0,0) 0,rgba(0,0,0,0) 10%,rgba(0,0,0,.01) 50%,rgba(0,0,0,.2) 100%);z-index:-1;content:'';will-change:opacity;contain:strict}html.android .page-from-center-to-right:before,html.android .page-from-right-to-center:before{display:none;-webkit-animation:none;animation:none}.page-from-right-to-center{-webkit-animation:pageFromRightToCenter .4s forwards;animation:pageFromRightToCenter .4s forwards}.page-from-right-to-center:before{-webkit-animation:pageFromRightToCenterShadow .4s forwards;animation:pageFromRightToCenterShadow .4s forwards}.page-from-center-to-right{-webkit-animation:pageFromCenterToRight .4s forwards;animation:pageFromCenterToRight .4s forwards}.page-from-center-to-right:before{-webkit-animation:pageFromCenterToRightShadow .4s forwards;animation:pageFromCenterToRightShadow .4s forwards}@-webkit-keyframes pageFromRightToCenter{from{-webkit-transform:translate3d(100%,0,0)}to{-webkit-transform:translate3d(0,0,0)}}@keyframes pageFromRightToCenter{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@-webkit-keyframes pageFromRightToCenterShadow{from{opacity:0}to{opacity:1}}@keyframes pageFromRightToCenterShadow{from{opacity:0}to{opacity:1}}@-webkit-keyframes pageFromCenterToRight{from{-webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(100%,0,0)}}@keyframes pageFromCenterToRight{from{transform:translate3d(0,0,0)}to{transform:translate3d(100%,0,0)}}@-webkit-keyframes pageFromCenterToRightShadow{from{opacity:1}to{opacity:0}}@keyframes pageFromCenterToRightShadow{from{opacity:1}to{opacity:0}}.page-from-center-to-left{-webkit-animation:pageFromCenterToLeft .4s forwards;animation:pageFromCenterToLeft .4s forwards}.page-from-center-to-left:after{position:absolute;left:0;top:0;background:rgba(0,0,0,.1);width:100%;height:100%;content:'';opacity:0;z-index:10000;will-change:opacity;contain:strict;-webkit-animation:pageFromCenterToLeftOpacity .4s forwards;animation:pageFromCenterToLeftOpacity .4s forwards}.page-from-left-to-center{-webkit-animation:pageFromLeftToCenter .4s forwards;animation:pageFromLeftToCenter .4s forwards}.page-from-left-to-center:after{position:absolute;left:0;top:0;background:rgba(0,0,0,.1);width:100%;height:100%;content:'';opacity:0;z-index:10000;will-change:opacity;contain:strict;-webkit-animation:pageFromLeftToCenterOpacity .4s forwards;animation:pageFromLeftToCenterOpacity .4s forwards}@-webkit-keyframes pageFromCenterToLeft{from{-webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-20%,0,0)}}@keyframes pageFromCenterToLeft{from{transform:translate3d(0,0,0)}to{transform:translate3d(-20%,0,0)}}@-webkit-keyframes pageFromLeftToCenter{from{-webkit-transform:translate3d(-20%,0,0)}to{-webkit-transform:translate3d(0,0,0)}}@keyframes pageFromLeftToCenter{from{transform:translate3d(-20%,0,0)}to{transform:translate3d(0,0,0)}}@-webkit-keyframes pageFromCenterToLeftOpacity{from{opacity:0}to{opacity:1}}@keyframes pageFromCenterToLeftOpacity{from{opacity:0}to{opacity:1}}@-webkit-keyframes pageFromLeftToCenterOpacity{from{opacity:1}to{opacity:0}}@keyframes pageFromLeftToCenterOpacity{from{opacity:1}to{opacity:0}}.navbar-inner,.toolbar-inner{position:absolute;left:0;top:0;width:100%;height:100%;padding:0 8px;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.navbar-inner.cached{display:none}.navbar,.toolbar{height:44px;width:100%;box-sizing:border-box;font-size:17px;position:relative;margin:0;z-index:500;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.navbar b,.toolbar b{font-weight:500}html.ios-gt-8 .navbar b,html.ios-gt-8 .toolbar b{font-weight:600}.navbar,.subnavbar,.toolbar{background:#f7f7f8}.navbar a.link,.subnavbar a.link,.toolbar a.link{line-height:44px;height:44px;text-decoration:none;position:relative;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:translateZ(0);transform:translateZ(0)}.navbar a.link.active-state,.subnavbar a.link.active-state,.toolbar a.link.active-state,html:not(.watch-active-state) .navbar a.link:active,html:not(.watch-active-state) .subnavbar a.link:active,html:not(.watch-active-state) .toolbar a.link:active{opacity:.3;-webkit-transition-duration:0s;transition-duration:0s}.navbar a.link i+i,.navbar a.link i+span,.navbar a.link span+i,.navbar a.link span+span,.subnavbar a.link i+i,.subnavbar a.link i+span,.subnavbar a.link span+i,.subnavbar a.link span+span,.toolbar a.link i+i,.toolbar a.link i+span,.toolbar a.link span+i,.toolbar a.link span+span{margin-left:7px}.navbar a.icon-only,.subnavbar a.icon-only,.toolbar a.icon-only{min-width:44px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;margin:0}.navbar i.icon,.subnavbar i.icon,.toolbar i.icon{display:block}.navbar{left:0;top:0}.navbar:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .navbar:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .navbar:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.navbar:after{backface-visibility:hidden}.navbar.no-border:after{display:none}.navbar .center{font-size:17px;font-weight:500;text-align:center;margin:0;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:44px;-webkit-flex-shrink:10;-ms-flex:0 10 auto;flex-shrink:10;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}html.ios-gt-8 .navbar .center{font-weight:600}.navbar .center .subtitle{color:#6d6d72;display:block;line-height:1;bottom:3px;font-size:10px;position:absolute;text-align:center;width:100%}.navbar .left,.navbar .right{-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.navbar .left a+a,.navbar .right a+a{margin-left:15px}.navbar .left{margin-right:10px}.navbar .right{margin-left:10px}.navbar .right:first-child{position:absolute;right:8px;height:100%}.popup .navbar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.subnavbar{height:44px;width:100%;position:absolute;left:0;top:100%;margin-top:-1px;z-index:20;box-sizing:border-box;padding:0 8px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.subnavbar:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .subnavbar:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .subnavbar:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.subnavbar.no-border:after{display:none}.navbar.no-border .subnavbar{margin-top:0}.navbar-on-left .subnavbar,.navbar-on-right .subnavbar{pointer-events:none}.navbar .subnavbar,.page .subnavbar{position:absolute}.page>.subnavbar{top:0;margin-top:0}.subnavbar>.buttons-row{width:100%}.subnavbar .searchbar,.subnavbar.searchbar{position:absolute}.subnavbar .searchbar,.subnavbar.searchbar{position:absolute}.subnavbar .searchbar{left:0;top:0}.toolbar{left:0;bottom:0}.toolbar:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .toolbar:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .toolbar:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.toolbar.no-border:before{display:none}.toolbar a{-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;position:relative;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.tabbar{color:#929292;z-index:5001}.tabbar a{color:#929292}.tabbar a.active{color:#007aff}.tabbar a.link{line-height:1.4}.tabbar a.link,.tabbar a.tab-link{height:100%;width:100%;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;overflow:visible;-webkit-box-flex:1;-ms-flex:1;-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.tabbar i.icon{height:30px}.tabbar-labels{height:50px}.tabbar-labels a.link,.tabbar-labels a.tab-link{padding-top:4px;padding-bottom:4px;height:100%;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.tabbar-labels a.link i+span,.tabbar-labels a.tab-link i+span{margin:0}.tabbar-labels span.tabbar-label{line-height:1;display:block;margin:0;letter-spacing:.01em;font-size:10px;position:relative;text-overflow:ellipsis;white-space:nowrap}.navbar input[type=email],.navbar input[type=password],.navbar input[type=search],.navbar input[type=tel],.navbar input[type=text],.navbar input[type=url],.subnavbar input[type=email],.subnavbar input[type=password],.subnavbar input[type=search],.subnavbar input[type=tel],.subnavbar input[type=text],.subnavbar input[type=url]{box-sizing:border-box;width:100%;height:28px;display:block;border:none;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border-radius:5px;font-family:inherit;color:#000;font-size:14px;font-weight:400;padding:0 8px;background-color:#fff}@media all and (min-width:768px){.tabbar .toolbar-inner{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.tabbar a.link,.tabbar a.tab-link{width:auto;min-width:105px}.tabbar-labels{height:56px}.tabbar-labels span.tabbar-label{font-size:14px}}.navbar-from-right-to-center .center,.navbar-from-right-to-center .fading,.navbar-from-right-to-center .left,.navbar-from-right-to-center .right,.navbar-from-right-to-center .subnavbar{-webkit-animation:navbarElementFadeIn .4s forwards;animation:navbarElementFadeIn .4s forwards}.navbar-from-right-to-center .sliding{opacity:1}.navbar-from-center-to-right .center,.navbar-from-center-to-right .fading,.navbar-from-center-to-right .left,.navbar-from-center-to-right .right,.navbar-from-center-to-right .subnavbar{-webkit-animation:navbarElementFadeOut .4s forwards;animation:navbarElementFadeOut .4s forwards}.navbar-from-center-to-right .sliding{opacity:0}.navbar-from-center-to-right .subnavbar.sliding{opacity:1}@-webkit-keyframes navbarElementFadeIn{from{opacity:0}to{opacity:1}}@keyframes navbarElementFadeIn{from{opacity:0}to{opacity:1}}.navbar-from-center-to-left .center,.navbar-from-center-to-left .fading,.navbar-from-center-to-left .left,.navbar-from-center-to-left .right,.navbar-from-center-to-left .subnavbar{-webkit-animation:navbarElementFadeOut .4s forwards;animation:navbarElementFadeOut .4s forwards}.navbar-from-center-to-left .sliding{opacity:0}.navbar-from-center-to-left .subnavbar.sliding{opacity:1}.navbar-from-left-to-center .center,.navbar-from-left-to-center .fading,.navbar-from-left-to-center .left,.navbar-from-left-to-center .right,.navbar-from-left-to-center .subnavbar{-webkit-animation:navbarElementFadeIn .4s forwards;animation:navbarElementFadeIn .4s forwards}.navbar-from-left-to-center .sliding{opacity:1}.navbar-on-left .center,.navbar-on-left .fading,.navbar-on-left .left,.navbar-on-left .right,.navbar-on-left .subnavbar{opacity:0}.navbar-on-left .sliding{opacity:0}.navbar-on-left .subnavbar.sliding{opacity:1;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.navbar-on-right .center,.navbar-on-right .fading,.navbar-on-right .left,.navbar-on-right .right,.navbar-on-right .subnavbar{opacity:0}.navbar-on-right .sliding{opacity:0}.navbar-on-right .subnavbar.sliding{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}@-webkit-keyframes navbarElementFadeOut{from{opacity:1}to{opacity:0}}@keyframes navbarElementFadeOut{from{opacity:1}to{opacity:0}}.navbar-from-center-to-left .left.sliding .back.link .icon,.navbar-from-center-to-right .left.sliding .back.link .icon,.navbar-from-left-to-center .left.sliding .back.link .icon,.navbar-from-right-to-center .left.sliding .back.link .icon{-webkit-transition-duration:.4s;transition-duration:.4s}.navbar-from-center-to-left .sliding,.navbar-from-center-to-right .sliding,.navbar-from-left-to-center .sliding,.navbar-from-right-to-center .sliding{-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-animation:none;animation:none}.page>.navbar,.page>.toolbar,.view>.navbar,.view>.toolbar,.views>.navbar,.views>.toolbar{position:absolute}.subnavbar~.page-content{padding-top:44px}.navbar-fixed .page-content,.navbar-through .page-content{padding-top:44px}.navbar-fixed .page-content.with-subnavbar,.navbar-fixed .subnavbar~.page-content,.navbar-fixed .with-subnavbar .page-content,.navbar-through .page-content.with-subnavbar,.navbar-through .subnavbar~.page-content,.navbar-through .with-subnavbar .page-content{padding-top:88px}.navbar-fixed .page .subnavbar,.navbar-fixed.page .subnavbar,.navbar-through .page .subnavbar,.navbar-through.page .subnavbar{top:44px}.tabbar-fixed .page-content,.tabbar-through .page-content,.toolbar-fixed .page-content,.toolbar-through .page-content{padding-bottom:44px}.tabbar-labels-fixed .page-content,.tabbar-labels-through .page-content{padding-bottom:50px}@media all and (min-width:768px){.tabbar-labels-fixed .page-content,.tabbar-labels-through .page-content{padding-bottom:56px}}.navbar.navbar-hiding{-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.navbar.navbar-hiding~.page .list-group-title,.navbar.navbar-hiding~.page-content .list-group-title,.navbar.navbar-hiding~.pages .list-group-title{-webkit-transition-duration:.4s;transition-duration:.4s}.navbar.navbar-hiding~.page .subnavbar,.navbar.navbar-hiding~.page-content .subnavbar,.navbar.navbar-hiding~.pages .subnavbar{-webkit-transition-duration:.4s;transition-duration:.4s}.navbar.navbar-hidden{-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.navbar.navbar-hidden~.page .list-group-title,.navbar.navbar-hidden~.page-content .list-group-title,.navbar.navbar-hidden~.pages .list-group-title{-webkit-transition-duration:.4s;transition-duration:.4s;top:-44px}.navbar.navbar-hidden~.page .subnavbar,.navbar.navbar-hidden~.page-content .subnavbar,.navbar.navbar-hidden~.pages .subnavbar{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);-webkit-transition-duration:.4s;transition-duration:.4s}.navbar.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.page.no-navbar .page-content{padding-top:0}.page.no-navbar .page-content.with-subnavbar,.page.no-navbar.with-subnavbar .page-content,.with-subnavbar .page.no-navbar .page-content{padding-top:44px}.tabbar.tabbar-hiding,.tabbar.toolbar-hiding,.toolbar.tabbar-hiding,.toolbar.toolbar-hiding{-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.tabbar.tabbar-hidden,.tabbar.toolbar-hidden,.toolbar.tabbar-hidden,.toolbar.toolbar-hidden{-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.tabbar.not-animated,.toolbar.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.page.no-tabbar .page-content,.page.no-toolbar .page-content{padding-bottom:0}.searchbar{height:44px;width:100%;background:#c9c9ce;box-sizing:border-box;padding:0 8px;overflow:hidden;position:relative;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.searchbar:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#b4b4b4;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .searchbar:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .searchbar:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.searchbar .searchbar-input{width:100%;height:28px;position:relative;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1}.searchbar input[type=search]{box-sizing:border-box;width:100%;height:28px;display:block;border:none;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border-radius:5px;font-family:inherit;color:#000;font-size:14px;font-weight:400;padding:0 8px;background-color:#fff;padding:0 28px;height:100%;background-repeat:no-repeat;background-position:8px center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2013'%20enable-background%3D'new%200%200%2013%2013'%3E%3Cg%3E%3Cpath%20fill%3D'%23939398'%20d%3D'M5%2C1c2.2%2C0%2C4%2C1.8%2C4%2C4S7.2%2C9%2C5%2C9S1%2C7.2%2C1%2C5S2.8%2C1%2C5%2C1%20M5%2C0C2.2%2C0%2C0%2C2.2%2C0%2C5s2.2%2C5%2C5%2C5s5-2.2%2C5-5S7.8%2C0%2C5%2C0%20L5%2C0z'%2F%3E%3C%2Fg%3E%3Cline%20stroke%3D'%23939398'%20stroke-miterlimit%3D'10'%20x1%3D'12.6'%20y1%3D'12.6'%20x2%3D'8.2'%20y2%3D'8.2'%2F%3E%3C%2Fsvg%3E");-webkit-background-size:13px 13px;background-size:13px 13px}.searchbar input[type=search]::-webkit-input-placeholder{color:#939398;opacity:1}.searchbar input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}.searchbar .searchbar-clear{position:absolute;width:28px;height:28px;right:0;top:0;opacity:0;pointer-events:none;background-position:center;background-repeat:no-repeat;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2028%2028'%3E%3Ccircle%20cx%3D'14'%20cy%3D'14'%20r%3D'14'%20fill%3D'%238e8e93'%2F%3E%3Cline%20stroke%3D'%23ffffff'%20stroke-width%3D'2'%20stroke-miterlimit%3D'10'%20x1%3D'8'%20y1%3D'8'%20x2%3D'20'%20y2%3D'20'%2F%3E%3Cline%20fill%3D'none'%20stroke%3D'%23ffffff'%20stroke-width%3D'2'%20stroke-miterlimit%3D'10'%20x1%3D'20'%20y1%3D'8'%20x2%3D'8'%20y2%3D'20'%2F%3E%3C%2Fsvg%3E");-webkit-background-size:14px 14px;background-size:14px 14px;-webkit-transition-duration:.3s;transition-duration:.3s;cursor:pointer}.searchbar .searchbar-cancel{-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);font-size:17px;cursor:pointer;opacity:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;margin-left:0;pointer-events:none;display:none}.searchbar.searchbar-active .searchbar-cancel{margin-left:8px;opacity:1;pointer-events:auto}.searchbar.searchbar-active .searchbar-cancel.active-state,html:not(.watch-active-state) .searchbar.searchbar-active .searchbar-cancel:active{opacity:.3;-webkit-transition-duration:0s;transition-duration:0s}.searchbar.searchbar-not-empty .searchbar-clear{pointer-events:auto;opacity:1}.searchbar-overlay{position:absolute;left:0;top:0;width:100%;height:100%;z-index:100;opacity:0;pointer-events:none;background:rgba(0,0,0,.4);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.searchbar-overlay.searchbar-overlay-active{opacity:1;pointer-events:auto}.searchbar-not-found{display:none}.hidden-by-searchbar,.list-block .hidden-by-searchbar,.list-block li.hidden-by-searchbar{display:none}.page>.searchbar{position:absolute;width:100%;left:0;top:0;z-index:200}.page>.searchbar~.page-content{padding-top:44px}.navbar-fixed .page>.searchbar,.navbar-fixed>.searchbar,.navbar-through .page>.searchbar,.navbar-through>.searchbar{top:44px}.navbar-fixed .page>.searchbar~.page-content,.navbar-fixed>.searchbar~.page-content,.navbar-through .page>.searchbar~.page-content,.navbar-through>.searchbar~.page-content{padding-top:88px}.messagebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:0s;transition-duration:0s;background:#fff}.messagebar:before{display:none}.messagebar textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #c8c8cd;background:#fff;border-radius:17px;box-shadow:none;display:block;padding:6px 15px;margin:0;width:100%;height:34px;color:#000;font-size:17px;line-height:20px;font-family:inherit;resize:none;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1}.messagebar .link{-ms-flex-item-align:flex-end;-webkit-align-self:flex-end;align-self:flex-end}.messagebar .link.icon-only:first-child{margin-left:-6px}.messagebar .link:not(.icon-only)+textarea{margin-left:8px}.messagebar textarea+.link{margin-left:8px}.messagebar .link{-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}.page.no-tabbar .messagebar~.page-content,.page.no-toolbar .messagebar~.page-content{padding-bottom:44px}.hidden-toolbar .messagebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:0s;transition-duration:0s}i.icon{display:inline-block;vertical-align:middle;background-size:100% auto;background-position:center;background-repeat:no-repeat;font-style:normal;position:relative}i.icon.icon-back{width:12px;height:20px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-forward{width:12px;height:20px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-bars{width:21px;height:14px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2021%2014'%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M0%2C0h2v2H0V0z%20M4%2C0h17v1H4V0z%20M0%2C6h2v2H0V6z%20M4%2C6h17v1H4V6z%20M0%2C12h2v2H0V12z%20M4%2C12h17v1H4V12z'%2F%3E%3C%2Fsvg%3E")}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:2ddpx){i.icon.icon-bars{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2042%2026'%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M0%2C0h4v4H0V0z%20M8%2C1h34v2H8V1z%20M0%2C11h4v4H0V11z%20M8%2C12h34v2H8V12z%20M0%2C22h4v4H0V22z%20M8%2C23h34v2H8V23z'%2F%3E%3C%2Fsvg%3E");height:13px}}i.icon.icon-camera{width:25px;height:20px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20x%3D'0px'%20y%3D'0px'%20viewBox%3D'0%200%2025%2020'%3E%3Cpath%20fill%3D'%238C8D92'%20d%3D'M13.3%2C5.5c-2.7%2C0-5%2C2.2-5%2C5s2.2%2C5%2C5%2C5c2.7%2C0%2C5-2.2%2C5-5S16%2C5.5%2C13.3%2C5.5z'%2F%3E%3Cpath%20fill%3D'%238C8D92'%20d%3D'M22.8%2C1.8h-3.3c-0.2-1.3-1-1.8-2-1.8H8.1c-1%2C0-1.8%2C0.4-2%2C1.8H2.8C1.4%2C1.8%2C0%2C2.8%2C0%2C4.2v12.6%20c0%2C1.4%2C1.4%2C2.5%2C2.8%2C2.5h20c1.4%2C0%2C2.2-1.1%2C2.2-2.5V4.2C25%2C2.8%2C24.2%2C1.8%2C22.8%2C1.8z%20M3.5%2C6.4C2.6%2C6.4%2C2%2C5.8%2C2%2C5c0-0.8%2C0.7-1.5%2C1.5-1.5%20S5%2C4.1%2C5%2C5C5%2C5.8%2C4.3%2C6.4%2C3.5%2C6.4z%20M13.3%2C16.8c-3.5%2C0-6.3-2.7-6.3-6.2c0-3.3%2C2.5-6.2%2C5.7-6.2h1.2c3.2%2C0%2C5.7%2C2.9%2C5.7%2C6.2%20C19.6%2C14.1%2C16.7%2C16.8%2C13.3%2C16.8z'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-f7{width:29px;height:29px;background-image:url(../img/i-f7-ios.png);border-radius:6px}i.icon.icon-next,i.icon.icon-prev{width:15px;height:15px}i.icon.icon-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}i.icon.icon-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}i.icon.icon-plus{width:25px;height:25px;font-size:31px;line-height:20px;text-align:center;font-weight:100}.navbar .f7-icons,.navbar .framework7-icons,.toolbar .f7-icons,.toolbar .framework7-icons{font-size:22px}.tabbar .f7-icons,.tabbar .framework7-icons,.tabbar-labels .f7-icons,.tabbar-labels .framework7-icons{font-size:25px}.item-media .f7-icons,.item-media .framework7-icons{font-size:29px}.button .f7-icons,.button .framework7-icons{font-size:22px}.item-actions .f7-icons,.item-actions .framework7-icons{font-size:23px;vertical-align:top}.badge{font-size:13px;display:inline-block;color:#fff;background:#8e8e93;border-radius:20px;padding:0 6px;height:20px;line-height:20px;box-sizing:border-box;text-align:center}.item-after .badge{min-width:20px}.f7-icons .badge,.framework7-icons .badge,.icon .badge{position:absolute;left:100%;margin-left:-10px;top:-2px;font-size:10px;line-height:16px;height:16px;border-radius:16px;padding:0 4px;min-width:16px;font-family:-apple-system,SF UI Text,Helvetica Neue,Helvetica,Arial,sans-serif}.chip{font-size:14px;font-weight:400;color:#fff;background:rgba(0,0,0,.37);display:inline-block;height:23px;line-height:23px;border-radius:5px;padding:0 6px;box-sizing:border-box;vertical-align:middle;display:-webkit-inline-box;display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;margin:2px 0}.chip-media{width:16px;height:16px;vertical-align:middle;border-radius:50%;text-align:center;line-height:16px;color:#fff;font-size:12px;box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.chip-media img{max-width:100%;max-height:100%;width:auto;height:auto;border-radius:50%;display:block}.chip-media+.chip-label{margin-left:4px}.chip-media i.icon{font-size:16px;height:16px}.chip-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;min-width:0}.chip-delete{margin-right:-6px;width:23px;height:23px;text-align:center;line-height:23px;cursor:pointer;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2028%2028'%3E%3Ccircle%20cx%3D'14'%20cy%3D'14'%20r%3D'14'%20fill%3D'%23fff'%2F%3E%3Cline%20stroke%3D'%23000'%20stroke-width%3D'2'%20stroke-miterlimit%3D'10'%20x1%3D'8'%20y1%3D'8'%20x2%3D'20'%20y2%3D'20'%2F%3E%3Cline%20fill%3D'none'%20stroke%3D'%23000'%20stroke-width%3D'2'%20stroke-miterlimit%3D'10'%20x1%3D'20'%20y1%3D'8'%20x2%3D'8'%20y2%3D'20'%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center;-webkit-background-size:13px 13px;background-size:13px 13px;opacity:.7}.chip-delete.active-state,html:not(.watch-active-state) .chip-delete:active{opacity:1}.content-block{margin:35px 0;padding:0 15px;color:#6d6d72;box-sizing:border-box}.content-block.no-hairlines .content-block-inner:before,.content-block.no-hairlines ul:before,.content-block.no-hairlines:before{display:none}.content-block.no-hairlines .content-block-inner:after,.content-block.no-hairlines ul:after,.content-block.no-hairlines:after{display:none}.content-block-title{position:relative;overflow:hidden;margin:0;white-space:nowrap;text-overflow:ellipsis;font-size:14px;text-transform:uppercase;line-height:1;color:#6d6d72;margin:35px 15px 10px}.content-block-title+.card,.content-block-title+.content-block,.content-block-title+.list-block,.content-block-title+.timeline{margin-top:10px}.content-block-inner{background:#fff;padding:10px 15px;margin-left:-15px;width:100%;position:relative;color:#000}.content-block-inner:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#c8c7cc;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .content-block-inner:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .content-block-inner:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.content-block-inner:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#c8c7cc;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .content-block-inner:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .content-block-inner:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.content-block.inset{margin-left:15px;margin-right:15px;border-radius:7px}.content-block.inset .content-block-inner{border-radius:7px}.content-block.inset .content-block-inner:before{display:none}.content-block.inset .content-block-inner:after{display:none}@media all and (min-width:768px){.content-block.tablet-inset{margin-left:15px;margin-right:15px;border-radius:7px}.content-block.tablet-inset .content-block-inner{border-radius:7px}.content-block.tablet-inset .content-block-inner:before{display:none}.content-block.tablet-inset .content-block-inner:after{display:none}}.list-block{margin:35px 0;font-size:17px}.list-block ul{background:#fff;list-style:none;padding:0;margin:0;position:relative}.list-block ul:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#c8c7cc;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .list-block ul:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .list-block ul:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.list-block ul:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#c8c7cc;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .list-block ul:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .list-block ul:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.list-block ul ul{padding-left:45px}.list-block ul ul:before{display:none}.list-block ul ul:after{display:none}.list-block .align-top,.list-block .align-top .item-content,.list-block .align-top .item-inner{-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.list-block.inset{margin-left:15px;margin-right:15px;border-radius:7px}.list-block.inset .content-block-title{margin-left:0;margin-right:0}.list-block.inset ul{border-radius:7px}.list-block.inset ul:before{display:none}.list-block.inset ul:after{display:none}.list-block.inset li:first-child>a{border-radius:7px 7px 0 0}.list-block.inset li:last-child>a{border-radius:0 0 7px 7px}.list-block.inset li:first-child:last-child>a{border-radius:7px}@media all and (min-width:768px){.list-block.tablet-inset{margin-left:15px;margin-right:15px;border-radius:7px}.list-block.tablet-inset .content-block-title{margin-left:0;margin-right:0}.list-block.tablet-inset ul{border-radius:7px}.list-block.tablet-inset ul:before{display:none}.list-block.tablet-inset ul:after{display:none}.list-block.tablet-inset li:first-child>a{border-radius:7px 7px 0 0}.list-block.tablet-inset li:last-child>a{border-radius:0 0 7px 7px}.list-block.tablet-inset li:first-child:last-child>a{border-radius:7px}.list-block.tablet-inset .content-block-title{margin-left:0;margin-right:0}.list-block.tablet-inset ul{border-radius:7px}.list-block.tablet-inset ul:before{display:none}.list-block.tablet-inset ul:after{display:none}.list-block.tablet-inset li:first-child>a{border-radius:7px 7px 0 0}.list-block.tablet-inset li:last-child>a{border-radius:0 0 7px 7px}.list-block.tablet-inset li:first-child:last-child>a{border-radius:7px}}.list-block li{box-sizing:border-box;position:relative}.list-block .item-media{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;-webkit-box-lines:single;-moz-box-lines:single;-webkit-flex-wrap:nowrap;-ms-flex-wrap:none;-ms-flex-wrap:nowrap;flex-wrap:nowrap;box-sizing:border-box;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;padding-top:7px;padding-bottom:8px}.list-block .item-media i+i{margin-left:5px}.list-block .item-media i+img{margin-left:5px}.list-block .item-media+.item-inner{margin-left:15px}.list-block .item-inner{padding-right:15px;position:relative;width:100%;padding-top:8px;padding-bottom:7px;min-height:44px;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-flex:1;-ms-flex:1;overflow:hidden;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-ms-flex-item-align:stretch;-webkit-align-self:stretch;align-self:stretch}.list-block .item-inner:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#c8c7cc;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .list-block .item-inner:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .list-block .item-inner:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.list-block .item-title{-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;min-width:0;white-space:nowrap;position:relative;overflow:hidden;text-overflow:ellipsis;max-width:100%}.list-block .item-after{white-space:nowrap;color:#8e8e93;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;margin-left:auto;padding-left:5px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;max-height:28px}.list-block .autocomplete-opener .item-after,.list-block .smart-select .item-after{max-width:70%;overflow:hidden;text-overflow:ellipsis;position:relative;display:block}.list-block .item-actions{margin-left:auto;padding-left:15px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.list-block .item-actions a{min-width:23px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-transition-duration:.3s;transition-duration:.3s}.list-block .item-actions a.active-state,html:not(.watch-active-state) .list-block .item-actions a:active{opacity:.3;-webkit-transition-duration:0s;transition-duration:0s}.list-block .item-actions a+a{margin-left:8px}.list-block .item-after+.item-actions{margin-left:0}.list-block .item-link,.list-block .list-button{-webkit-transition-duration:.3s;transition-duration:.3s;display:block;color:inherit}.list-block .item-link .item-inner,.list-block .list-button .item-inner{padding-right:35px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E");background-size:10px 20px;background-repeat:no-repeat;background-position:95% center;background-position:-webkit-calc(100% - 15px) center;background-position:calc(100% - 15px) center}.list-block .item-link.active-state,.list-block .list-button.active-state,html:not(.watch-active-state) .list-block .item-link:active,html:not(.watch-active-state) .list-block .list-button:active{-webkit-transition-duration:0s;transition-duration:0s;background-color:#d9d9d9}.list-block .item-link.active-state .item-inner:after,.list-block .list-button.active-state .item-inner:after,html:not(.watch-active-state) .list-block .item-link:active .item-inner:after,html:not(.watch-active-state) .list-block .list-button:active .item-inner:after{background-color:transparent}.list-block .list-button{padding:0 15px;text-align:center;color:#007aff;display:block;line-height:43px}.list-block .list-button:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#c8c7cc;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .list-block .list-button:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .list-block .list-button:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.list-block .item-content{box-sizing:border-box;padding-left:15px;min-height:44px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.list-block .list-block-label{margin:10px 0 35px;padding:0 15px;font-size:14px;color:#8f8f94}.list-block .swipeout{overflow:hidden;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.list-block .swipeout.deleting{-webkit-transition-duration:.3s;transition-duration:.3s}.list-block .swipeout.deleting .swipeout-content{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.list-block .swipeout.transitioning .swipeout-actions-left a,.list-block .swipeout.transitioning .swipeout-actions-right a,.list-block .swipeout.transitioning .swipeout-content,.list-block .swipeout.transitioning .swipeout-overswipe{-webkit-transition:.3s;transition:.3s}.list-block .swipeout-content{position:relative;z-index:10}.list-block .swipeout-overswipe{-webkit-transition:.2s left;transition:.2s left}.list-block .swipeout-actions-left,.list-block .swipeout-actions-right{position:absolute;top:0;height:100%;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.list-block .swipeout-actions-left a,.list-block .swipeout-actions-right a{padding:0 30px;color:#fff;background:#c7c7cc;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;position:relative;left:0}.list-block .swipeout-actions-left a:after,.list-block .swipeout-actions-right a:after{content:'';position:absolute;top:0;width:600%;height:100%;background:inherit;z-index:-1}.list-block .swipeout-actions-left a.swipeout-delete,.list-block .swipeout-actions-right a.swipeout-delete{background:#ff3b30}.list-block .swipeout-actions-right{right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.list-block .swipeout-actions-right a:after{left:100%;margin-left:-1px}.list-block .swipeout-actions-left{left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.list-block .swipeout-actions-left a:after{right:100%;margin-right:-1px}.list-block .item-subtitle{font-size:15px;position:relative;overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis}.list-block .item-text{font-size:15px;color:#8e8e93;line-height:21px;position:relative;overflow:hidden;height:42px;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box}.list-block li.media-item .item-title,.list-block.media-list .item-title{font-weight:500}html.ios-gt-8 .list-block li.media-item .item-title,html.ios-gt-8 .list-block.media-list .item-title{font-weight:600}.list-block li.media-item .item-inner,.list-block.media-list .item-inner{display:block;padding-top:10px;padding-bottom:9px;-ms-flex-item-align:stretch;-webkit-align-self:stretch;align-self:stretch}.list-block li.media-item .item-link .item-inner,.list-block.media-list .item-link .item-inner{background:0 0;padding-right:15px}.list-block li.media-item .item-link .item-title-row,.list-block.media-list .item-link .item-title-row{padding-right:20px;background:no-repeat right center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E");background-size:10px 20px}.list-block li.media-item .item-media,.list-block.media-list .item-media{padding-top:9px;padding-bottom:10px}.list-block li.media-item .item-media img,.list-block.media-list .item-media img{display:block}.list-block li.media-item .item-title-row,.list-block.media-list .item-title-row{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.list-block li.media-item .item-content>.item-after,.list-block.media-list .item-content>.item-after{margin-right:15px;margin-left:15px}.list-block .list-group ul:after,.list-block .list-group ul:before{z-index:25}.list-block .list-group+.list-group ul:before{display:none}.list-block .item-divider,.list-block .list-group-title{background:#f7f7f7;margin-top:-1px;padding:4px 15px;white-space:nowrap;position:relative;max-width:100%;text-overflow:ellipsis;overflow:hidden;color:#8e8e93;z-index:15}.list-block .item-divider:before,.list-block .list-group-title:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#c8c7cc;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .list-block .item-divider:before,html.pixel-ratio-2 .list-block .list-group-title:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .list-block .item-divider:before,html.pixel-ratio-3 .list-block .list-group-title:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.list-block .list-group-title{position:relative;position:-webkit-sticky;position:-moz-sticky;position:sticky;top:0;z-index:20;margin-top:0}.list-block .list-group-title:before{display:none}.list-block .sortable-handler{position:absolute;right:0;top:0;bottom:1px;z-index:10;background-repeat:no-repeat;background-size:18px 12px;background-position:center;width:35px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2018%2012'%20fill%3D'%23c7c7cc'%3E%3Cpath%20d%3D'M0%2C2V0h22v2H0z'%2F%3E%3Cpath%20d%3D'M0%2C7V5h22v2H0z'%2F%3E%3Cpath%20d%3D'M0%2C12v-2h22v2H0z'%2F%3E%3C%2Fsvg%3E");opacity:0;visibility:hidden;cursor:pointer;-webkit-transition-duration:.3s;transition-duration:.3s}.list-block.sortable .item-inner{-webkit-transition-duration:.3s;transition-duration:.3s}.list-block.sortable-opened .sortable-handler{visibility:visible;opacity:1}.list-block.sortable-opened .item-inner,.list-block.sortable-opened .item-link .item-inner{padding-right:35px}.list-block.sortable-opened .item-link .item-inner,.list-block.sortable-opened .item-link .item-title-row{background-image:none}.list-block.sortable-sorting li{-webkit-transition-duration:.3s;transition-duration:.3s}.list-block li.sorting{z-index:50;background:rgba(255,255,255,.8);box-shadow:0 2px 8px rgba(0,0,0,.6);-webkit-transition-duration:0s;transition-duration:0s}.list-block li.sorting .item-inner:after{display:none}.list-block li:last-child .list-button:after{display:none}.list-block li:last-child .item-inner:after,.list-block li:last-child li:last-child .item-inner:after{display:none}.list-block li li:last-child .item-inner:after,.list-block li:last-child li .item-inner:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#c8c7cc;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .list-block li li:last-child .item-inner:after,html.pixel-ratio-2 .list-block li:last-child li .item-inner:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .list-block li li:last-child .item-inner:after,html.pixel-ratio-3 .list-block li:last-child li .item-inner:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.list-block.no-hairlines .content-block-inner:before,.list-block.no-hairlines ul:before,.list-block.no-hairlines:before{display:none}.list-block.no-hairlines .content-block-inner:after,.list-block.no-hairlines ul:after,.list-block.no-hairlines:after{display:none}.list-block.no-hairlines-between .item-divider:after,.list-block.no-hairlines-between .item-inner:after,.list-block.no-hairlines-between .list-button:after,.list-block.no-hairlines-between .list-group-title:after{display:none}.contacts-content{background:#fff}.contacts-block{margin:0}.contacts-block .list-group-title{padding:0 15px;background:#f7f7f7;color:#000;font-weight:500;line-height:22px;height:22px}html.ios-gt-8 .contacts-block .list-group-title{font-weight:600}.contacts-block .list-group:first-child ul:before{display:none}.contacts-block .list-group:last-child ul:after{display:none}.list-block input[type=date],.list-block input[type=datetime-local],.list-block input[type=email],.list-block input[type=number],.list-block input[type=password],.list-block input[type=search],.list-block input[type=tel],.list-block input[type=text],.list-block input[type=time],.list-block input[type=url],.list-block select,.list-block textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;box-sizing:border-box;border:none;background:0 0;border-radius:0;box-shadow:none;display:block;padding:0;margin:0;width:100%;height:43px;color:#000;font-size:17px;font-family:inherit}.list-block .item-title.label{vertical-align:top}.list-block .item-title.label+.item-input{margin-left:5px}.list-block input[type=date],.list-block input[type=datetime-local]{line-height:44px}.list-block select{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}.list-block textarea{height:100px;resize:none;line-height:1.4;padding-top:8px;padding-bottom:7px}.list-block textarea.resizable{height:43px}.list-block .item-input{width:100%;margin-top:-8px;margin-bottom:-7px;-webkit-box-flex:1;-ms-flex:1;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1}.list-block .item-title.label{width:35%;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}.label-switch{display:inline-block;vertical-align:middle;width:52px;border-radius:16px;box-sizing:border-box;height:32px;position:relative;cursor:pointer;-ms-flex-item-align:center;-webkit-align-self:center;align-self:center}.label-switch .checkbox{width:52px;border-radius:16px;box-sizing:border-box;height:32px;background:#e5e5e5;z-index:0;margin:0;padding:0;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border:none;cursor:pointer;position:relative;-webkit-transition-duration:.3s;transition-duration:.3s}.label-switch .checkbox:before{content:' ';position:absolute;left:2px;top:2px;width:48px;border-radius:16px;box-sizing:border-box;height:28px;background:#fff;z-index:1;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:scale(1);transform:scale(1)}.label-switch .checkbox:after{content:' ';height:28px;width:28px;border-radius:28px;background:#fff;position:absolute;z-index:2;top:2px;left:2px;box-shadow:0 2px 5px rgba(0,0,0,.4);-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition-duration:.3s;transition-duration:.3s}.label-switch input[type=checkbox]{display:none}.label-switch input[type=checkbox]:checked+.checkbox{background:#4cd964}.label-switch input[type=checkbox]:checked+.checkbox:before{-webkit-transform:scale(0);transform:scale(0)}.label-switch input[type=checkbox]:checked+.checkbox:after{-webkit-transform:translateX(20px);transform:translateX(20px)}html.android .label-switch input[type=checkbox]+.checkbox{-webkit-transition-duration:0;transition-duration:0}html.android .label-switch input[type=checkbox]+.checkbox:after,html.android .label-switch input[type=checkbox]+.checkbox:before{-webkit-transition-duration:0;transition-duration:0}.button{border:1px solid #007aff;color:#007aff;text-decoration:none;text-align:center;display:block;border-radius:5px;line-height:27px;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:0 0;padding:0 10px;margin:0;height:29px;white-space:nowrap;position:relative;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-family:inherit;cursor:pointer;outline:0}input[type=button].button,input[type=submit].button{width:100%}.button.active-state,html:not(.watch-active-state) .button:active{background:rgba(0,122,255,.15)}.button.button-round{border-radius:27px}.button.active{background:#007aff;color:#fff}.button.button-big{font-size:17px;height:44px;line-height:42px}.button.button-fill{color:#fff;background:#007aff;border-color:transparent}.button.button-fill.active-state,html:not(.watch-active-state) .button.button-fill:active{opacity:.8}.button i.icon:first-child{margin-right:10px}.button i.icon:last-child{margin-left:10px}.button i.icon:first-child:last-child{margin-left:0;margin-right:0}.buttons-row{-ms-flex-item-align:center;-webkit-align-self:center;align-self:center;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-lines:single;-moz-box-lines:single;-webkit-flex-wrap:nowrap;-ms-flex-wrap:none;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.buttons-row .button{border-radius:0;border-left-width:0;width:100%;-webkit-box-flex:1;-ms-flex:1}.buttons-row .button:first-child{border-radius:5px 0 0 5px;border-left-width:1px;border-left-style:solid}.buttons-row .button:last-child{border-radius:0 5px 5px 0}.buttons-row .button:first-child:last-child{border-radius:5px}.buttons-row .button.button-round:first-child{border-radius:27px 0 0 27px}.buttons-row .button.button-round:last-child{border-radius:0 27px 27px 0}.range-slider{width:100%;position:relative;overflow:hidden;padding-left:3px;padding-right:3px;margin-left:-1px;-ms-flex-item-align:center;-webkit-align-self:center;align-self:center}.range-slider input[type=range]{position:relative;height:28px;width:100%;margin:4px 0 5px 0;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#b7b8b7),color-stop(100%,#b7b8b7));background:linear-gradient(to right,#b7b8b7 0,#b7b8b7 100%);background-position:center;background-size:100% 2px;background-repeat:no-repeat;outline:0;border:none;box-sizing:content-box;-ms-background-position-y:500px}.range-slider input[type=range]:active,.range-slider input[type=range]:focus{border:0;outline:0}.range-slider input[type=range]:after{height:2px;background:#fff;content:' ';width:5px;top:50%;margin-top:-1px;left:-5px;z-index:1;position:absolute}.range-slider input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;height:28px;width:28px;border-radius:28px;background:#fff;z-index:10;box-shadow:0 2px 4px rgba(0,0,0,.4);border:0;outline:0;position:absolute;box-sizing:border-box;content:' ';position:relative;cursor:pointer;margin-top:-1px}.range-slider input[type=range]::-webkit-slider-thumb:after{height:28px;width:28px;border-radius:28px;background:#fff;z-index:10;box-shadow:0 2px 4px rgba(0,0,0,.4);border:0;outline:0;position:absolute;box-sizing:border-box;content:' ';left:0;top:0}.range-slider input[type=range]::-webkit-slider-thumb:before{position:absolute;top:50%;right:100%;width:2000px;height:2px;margin-top:-1px;z-index:1;background:#007aff;content:' '}.range-slider input[type=range]::-moz-range-track{width:100%;height:2px;background:#b7b8b7;border:none;outline:0}.range-slider input[type=range]::-moz-range-thumb{height:28px;width:28px;border-radius:28px;background:#fff;z-index:10;box-shadow:0 2px 4px rgba(0,0,0,.4);border:0;outline:0;position:absolute;box-sizing:border-box;content:' '}.range-slider input[type=range]::-ms-track{width:100%;height:2px;cursor:pointer;background:0 0;border-color:transparent;color:transparent}.range-slider input[type=range]::-ms-thumb{height:28px;width:28px;border-radius:28px;background:#fff;z-index:10;box-shadow:0 2px 4px rgba(0,0,0,.4);border:0;outline:0;position:absolute;content:' ';box-shadow:none;border:1px solid rgba(0,0,0,.2);box-sizing:border-box;margin-top:0;top:50%}.range-slider input[type=range]::-ms-fill-lower{background:#007aff}.range-slider input[type=range]::-ms-fill-upper{background:#b7b8b7}.form-checkbox{position:relative;display:inline-block;vertical-align:middle}.form-checkbox,label.label-checkbox{cursor:pointer}.form-checkbox input[type=checkbox],.form-checkbox input[type=radio],label.label-checkbox input[type=checkbox],label.label-checkbox input[type=radio]{display:none}.form-checkbox i,label.label-checkbox i.icon-form-checkbox{width:22px;height:22px;position:relative;border-radius:22px;border:1px solid #c7c7cc;box-sizing:border-box;display:block}.form-checkbox i:after,label.label-checkbox i.icon-form-checkbox:after{content:' ';position:absolute;left:50%;margin-left:-6px;top:50%;margin-top:-4px;width:12px;height:9px}.form-checkbox input[type=checkbox]:checked~i,label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox{border:none;background-color:#007aff}.form-checkbox input[type=checkbox]:checked~i:after,label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox:after,label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox:after{background:no-repeat center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20x%3D'0px'%20y%3D'0px'%20viewBox%3D'0%200%2012%209'%20xml%3Aspace%3D'preserve'%3E%3Cpolygon%20fill%3D'%23ffffff'%20points%3D'12%2C0.7%2011.3%2C0%203.9%2C7.4%200.7%2C4.2%200%2C4.9%203.9%2C8.8%203.9%2C8.8%203.9%2C8.8%20'%2F%3E%3C%2Fsvg%3E");-webkit-background-size:12px 9px;background-size:12px 9px}.form-radio{display:inline-block;vertical-align:middle;position:relative}.form-radio i{width:22px;height:22px;position:relative;border-radius:4px;border:1px solid #c7c7cc;box-sizing:border-box;display:block}.form-radio,label.label-radio{cursor:pointer}.form-radio input[type=checkbox],.form-radio input[type=radio],label.label-radio input[type=checkbox],label.label-radio input[type=radio]{display:none}.form-radio input[type=radio]:checked~i,label.label-radio input[type=checkbox]:checked~.item-inner,label.label-radio input[type=radio]:checked~.item-inner{background:no-repeat center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2013%2010'%3E%3Cpolygon%20fill%3D'%23007aff'%20points%3D'11.6%2C0%204.4%2C7.2%201.4%2C4.2%200%2C5.6%204.4%2C10%204.4%2C10%204.4%2C10%2013%2C1.4%20'%2F%3E%3C%2Fsvg%3E");-webkit-background-size:13px 10px;background-size:13px 10px}label.label-radio input[type=checkbox],label.label-radio input[type=radio]{display:none}label.label-radio input[type=checkbox]~.item-inner,label.label-radio input[type=radio]~.item-inner{padding-right:35px}label.label-radio input[type=checkbox]:checked~.item-inner,label.label-radio input[type=radio]:checked~.item-inner{background-position:90% center;background-position:-webkit-calc(100% - 15px) center;background-position:calc(100% - 15px) center}label.label-checkbox,label.label-radio{-webkit-transition-duration:.3s;transition-duration:.3s}html:not(.watch-active-state) label.label-checkbox:active,html:not(.watch-active-state) label.label-radio:active,label.label-checkbox.active-state,label.label-radio.active-state{-webkit-transition-duration:0s;transition-duration:0s;background-color:#d9d9d9}html:not(.watch-active-state) label.label-checkbox:active .item-inner:after,html:not(.watch-active-state) label.label-radio:active .item-inner:after,label.label-checkbox.active-state .item-inner:after,label.label-radio.active-state .item-inner:after{background-color:transparent}.smart-select select{display:none}.floating-button{position:absolute;right:15px;bottom:15px;width:50px;height:50px;border-radius:50%;z-index:1500;background-color:#007aff;color:#fff;overflow:hidden;-webkit-transition-duration:.3s;transition-duration:.3s;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.floating-button.active-state,html:not(.watch-active-state) .floating-button:active{-webkit-transition-duration:0s;transition-duration:0s;background:#0066d6}.toolbar-fixed .floating-button,.toolbar-through .floating-button{bottom:59px}.tabbar-labels-fixed .floating-button,.tabbar-labels-through .floating-button{bottom:65px}@media (min-width:768px){.tabbar-labels-fixed .floating-button,.tabbar-labels-through .floating-button{bottom:71px}}.floating-button-toolbar,.speed-dial{position:absolute;right:15px;bottom:15px;z-index:1500}.toolbar-fixed .floating-button-toolbar,.toolbar-fixed .speed-dial,.toolbar-through .floating-button-toolbar,.toolbar-through .speed-dial{bottom:59px}.tabbar-labels-fixed .floating-button-toolbar,.tabbar-labels-fixed .speed-dial,.tabbar-labels-through .floating-button-toolbar,.tabbar-labels-through .speed-dial{bottom:65px}@media (min-width:768px){.tabbar-labels-fixed .floating-button-toolbar,.tabbar-labels-fixed .speed-dial,.tabbar-labels-through .floating-button-toolbar,.tabbar-labels-through .speed-dial{bottom:71px}}.floating-button-toolbar .floating-button,.speed-dial .floating-button{right:0;bottom:0;position:relative}.speed-dial .floating-button i{position:absolute;left:50%;top:50%;-webkit-transform:translate3d(-50%,-50%,0) rotate(0) scale(1);transform:translate3d(-50%,-50%,0) rotate(0) scale(1);-webkit-transition-duration:.3s;transition-duration:.3s}.speed-dial .floating-button i+i{-webkit-transform:translate3d(-50%,-50%,0) rotate(-90deg) scale(.5);transform:translate3d(-50%,-50%,0) rotate(-90deg) scale(.5);opacity:0}.speed-dial.speed-dial-opened .floating-button i{-webkit-transform:translate3d(-50%,-50%,0) rotate(90deg) scale(.5);transform:translate3d(-50%,-50%,0) rotate(90deg) scale(.5);opacity:0}.speed-dial.speed-dial-opened .floating-button i+i{-webkit-transform:translate3d(-50%,-50%,0) rotate(0) scale(1);transform:translate3d(-50%,-50%,0) rotate(0) scale(1);opacity:1}.speed-dial-buttons{position:absolute;width:40px;left:50%;margin-left:-20px;bottom:100%;margin-bottom:16px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-moz-box-orient:vertical;-moz-box-direction:reverse;-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;visibility:hidden;pointer-events:none}.speed-dial-buttons a{width:40px;height:40px;opacity:0;color:#fff;border-radius:50%;position:relative;z-index:1;overflow:hidden;background-color:#007aff;-webkit-transition-duration:.3s;transition-duration:.3s;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-transform:translate3d(0,8px,0) scale(.3);transform:translate3d(0,8px,0) scale(.3);-webkit-transform-origin:center bottom;transform-origin:center bottom}.speed-dial-buttons a+a{margin-bottom:16px}.speed-dial-buttons a.active-state,html:not(.watch-active-state) .speed-dial-buttons a:active{-webkit-transition-duration:0s;transition-duration:0s;background:#0066d6}.speed-dial-opened .speed-dial-buttons{visibility:visible;pointer-events:auto}.speed-dial-opened .speed-dial-buttons a{opacity:1;-webkit-transform:translate3d(0,0,0) scaleY(1);transform:translate3d(0,0,0) scaleY(1)}.speed-dial-opened .speed-dial-buttons a:nth-child(2){-webkit-transition-delay:50ms;transition-delay:50ms}.speed-dial-opened .speed-dial-buttons a:nth-child(3){-webkit-transition-delay:.1s;transition-delay:.1s}.speed-dial-opened .speed-dial-buttons a:nth-child(4){-webkit-transition-delay:150ms;transition-delay:150ms}.speed-dial-opened .speed-dial-buttons a:nth-child(5){-webkit-transition-delay:.2s;transition-delay:.2s}.speed-dial-opened .speed-dial-buttons a:nth-child(6){-webkit-transition-delay:250ms;transition-delay:250ms}.floating-button-to-popover.floating-button-to-popover{-webkit-transition-duration:.3s;transition-duration:.3s}.floating-button-to-popover.floating-button-to-popover-in{-webkit-transition-duration:.1s;transition-duration:.1s}.floating-button-to-popover.floating-button-to-popover-in i{opacity:0;-webkit-transition-duration:.1s;transition-duration:.1s}.floating-button-to-popover.floating-button-to-popover-scale{border-radius:0;-webkit-transition-duration:.3s;transition-duration:.3s;box-shadow:none}.floating-button-to-popover.floating-button-to-popover-out{-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:.3s;transition-duration:.3s}.floating-button-to-popover.floating-button-to-popover-out i{opacity:1;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-delay:.2s;transition-delay:.2s}.list-block .accordion-item-toggle{cursor:pointer;-webkit-transition-duration:.3s;transition-duration:.3s}.list-block .accordion-item-toggle .item-inner{padding-right:35px;background:no-repeat -webkit-calc(100% - 15px) center;background:no-repeat calc(100% - 15px) center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E");background-size:10px 20px}.list-block .accordion-item-toggle.active-state,html:not(.watch-active-state) .list-block .accordion-item-toggle:active{-webkit-transition-duration:0s;transition-duration:0s;background-color:#d9d9d9}.list-block .accordion-item-toggle.active-state>.item-inner:after,html:not(.watch-active-state) .list-block .accordion-item-toggle:active>.item-inner:after{background-color:transparent}.list-block .accordion-item-toggle .item-inner,.list-block .accordion-item>.item-link .item-inner{-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:background-color;transition-property:background-color}.list-block .accordion-item-toggle .item-inner:after,.list-block .accordion-item>.item-link .item-inner:after{-webkit-transition-duration:.3s;transition-duration:.3s}.list-block .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row,.list-block .accordion-item-expanded.media-item>.item-link .item-title-row,.list-block.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row,.list-block.media-list .accordion-item-expanded>.item-link .item-title-row,.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner,.list-block:not(.media-list) .accordion-item-expanded:not(.media-item)>.item-link .item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20transform%3D'translate(115%2C%2030)%20rotate(90)'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E");background-size:20px 20px}.list-block .accordion-item-expanded .accordion-item-toggle .item-inner:after,.list-block .accordion-item-expanded>.item-link .item-inner:after{background-color:transparent}.list-block .accordion-item .content-block,.list-block .accordion-item .list-block{margin-top:0;margin-bottom:0}.list-block .accordion-item ul{padding-left:0}.accordion-item-content{position:relative;overflow:hidden;height:0;font-size:14px;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.accordion-item-expanded>.accordion-item-content{height:auto}html.android-4 .accordion-item-content{-webkit-transform:none;transform:none}.card .list-block ul,.cards-list ul{background:0 0}.card .list-block>ul:before,.cards-list>ul:before{display:none}.card .list-block>ul:after,.cards-list>ul:after{display:none}.card{background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);margin:10px;position:relative;border-radius:2px;font-size:14px}.card .content-block,.card .list-block{margin:0}.row:not(.no-gutter) .col>.card{margin-left:0;margin-right:0}.card-content{position:relative}.card-content-inner{padding:15px;position:relative}.card-content-inner>p:first-child{margin-top:0}.card-content-inner>p:last-child{margin-bottom:0}.card-content-inner>.content-block,.card-content-inner>.list-block{margin:-15px}.card-footer,.card-header{min-height:44px;position:relative;padding:10px 15px;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.card-footer[valign=top],.card-header[valign=top]{-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.card-footer[valign=bottom],.card-header[valign=bottom]{-webkit-box-align:end;-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}.card-footer a.link,.card-header a.link{line-height:44px;height:44px;text-decoration:none;position:relative;margin-top:-10px;margin-bottom:-10px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-transition-duration:.3s;transition-duration:.3s}.card-footer a.link.active-state,.card-header a.link.active-state,html:not(.watch-active-state) .card-footer a.link:active,html:not(.watch-active-state) .card-header a.link:active{opacity:.3;-webkit-transition-duration:0s;transition-duration:0s}.card-footer a.link i+i,.card-footer a.link i+span,.card-footer a.link span+i,.card-footer a.link span+span,.card-header a.link i+i,.card-header a.link i+span,.card-header a.link span+i,.card-header a.link span+span{margin-left:7px}.card-footer a.link i.icon,.card-header a.link i.icon{display:block}.card-footer a.icon-only,.card-header a.icon-only{min-width:44px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;margin:0}.card-header{border-radius:2px 2px 0 0;font-size:17px}.card-header:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#e1e1e1;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .card-header:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .card-header:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.card-header.no-border:after{display:none}.card-footer{border-radius:0 0 2px 2px;color:#6d6d72}.card-footer:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#e1e1e1;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .card-footer:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .card-footer:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.card-footer.no-border:before{display:none}.modal-overlay,.picker-modal-overlay,.popup-overlay,.preloader-indicator-overlay{position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.4);z-index:13000;visibility:hidden;opacity:0;-webkit-transition-duration:.4s;transition-duration:.4s}.modal-overlay.not-animated,.picker-modal-overlay.not-animated,.popup-overlay.not-animated,.preloader-indicator-overlay.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.modal-overlay.modal-overlay-visible,.picker-modal-overlay.modal-overlay-visible,.popup-overlay.modal-overlay-visible,.preloader-indicator-overlay.modal-overlay-visible{visibility:visible;opacity:1}.picker-modal-overlay{z-index:12000}.popup-overlay{z-index:10500}.modal{width:270px;position:absolute;z-index:13500;left:50%;margin-left:-135px;margin-top:0;top:50%;text-align:center;border-radius:13px;overflow:hidden;opacity:0;-webkit-transform:translate3d(0,0,0) scale(1.185);transform:translate3d(0,0,0) scale(1.185);-webkit-transition-property:-webkit-transform,opacity;-moz-transition-property:-moz-transform,opacity;-ms-transition-property:-ms-transform,opacity;-o-transition-property:-o-transform,opacity;transition-property:transform,opacity;color:#000;display:none}.modal.modal-in{opacity:1;-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transform:translate3d(0,0,0) scale(1);transform:translate3d(0,0,0) scale(1)}.modal.modal-out{opacity:0;z-index:13499;-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transform:translate3d(0,0,0) scale(1);transform:translate3d(0,0,0) scale(1)}.modal-inner{padding:15px;border-radius:13px 13px 0 0;position:relative;background:rgba(255,255,255,.95)}.modal-inner:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:rgba(0,0,0,.2);display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .modal-inner:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .modal-inner:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.modal-title{font-weight:500;font-size:18px;text-align:center}html.ios-gt-8 .modal-title{font-weight:600}.modal-title+.modal-text{margin-top:5px}.modal-buttons{height:44px;position:relative;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.modal-buttons.modal-buttons-vertical{display:block;height:auto}.modal-button{width:100%;padding:0 5px;height:44px;font-size:17px;line-height:44px;text-align:center;color:#007aff;display:block;position:relative;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;cursor:pointer;box-sizing:border-box;-webkit-box-flex:1;-ms-flex:1;background:rgba(255,255,255,.95)}.modal-button:after{content:'';position:absolute;right:0;top:0;left:auto;bottom:auto;width:1px;height:100%;background-color:rgba(0,0,0,.2);display:block;z-index:15;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}html.pixel-ratio-2 .modal-button:after{-webkit-transform:scaleX(.5);transform:scaleX(.5)}html.pixel-ratio-3 .modal-button:after{-webkit-transform:scaleX(.33);transform:scaleX(.33)}.modal-button:first-child{border-radius:0 0 0 13px}.modal-button:last-child{border-radius:0 0 13px 0}.modal-button:last-child:after{display:none}.modal-button:first-child:last-child{border-radius:0 0 13px 13px}.modal-button.modal-button-bold{font-weight:500}html.ios-gt-8 .modal-button.modal-button-bold{font-weight:600}.modal-button.active-state,html:not(.watch-active-state) .modal-button:active{background:rgba(230,230,230,.95)}.modal-buttons-vertical .modal-button{border-radius:0}.modal-buttons-vertical .modal-button:after{display:none}.modal-buttons-vertical .modal-button:before{display:none}.modal-buttons-vertical .modal-button:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:rgba(0,0,0,.2);display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .modal-buttons-vertical .modal-button:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .modal-buttons-vertical .modal-button:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.modal-buttons-vertical .modal-button:last-child{border-radius:0 0 13px 13px}.modal-buttons-vertical .modal-button:last-child:after{display:none}.modal-no-buttons .modal-inner{border-radius:13px}.modal-no-buttons .modal-inner:after{display:none}.modal-no-buttons .modal-buttons{display:none}.actions-modal{position:absolute;left:0;bottom:0;z-index:13500;width:100%;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);max-height:100%;overflow:auto;-webkit-overflow-scrolling:touch}@media (min-width:496px){.actions-modal{width:480px;left:50%;margin-left:-240px}}.actions-modal.modal-in,.actions-modal.modal-out{-webkit-transition-duration:.3s;transition-duration:.3s}.actions-modal.modal-in.not-animated,.actions-modal.modal-out.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.actions-modal.modal-in{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.actions-modal.modal-out{z-index:13499;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.actions-modal-group{margin:8px;position:relative;border-radius:13px;overflow:hidden;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.actions-modal-button,.actions-modal-label{width:100%;text-align:center;font-weight:400;margin:0;background:rgba(255,255,255,.95);box-sizing:border-box;display:block;position:relative;overflow:hidden}.actions-modal-button:after,.actions-modal-label:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:rgba(0,0,0,.2);display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .actions-modal-button:after,html.pixel-ratio-2 .actions-modal-label:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .actions-modal-button:after,html.pixel-ratio-3 .actions-modal-label:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.actions-modal-button a,.actions-modal-label a{text-decoration:none;color:inherit;display:block}.actions-modal-button b,.actions-modal-label b{font-weight:500}html.ios-gt-8 .actions-modal-button b,html.ios-gt-8 .actions-modal-label b{font-weight:600}.actions-modal-button.actions-modal-button-bold,.actions-modal-label.actions-modal-button-bold{font-weight:500}html.ios-gt-8 .actions-modal-button.actions-modal-button-bold,html.ios-gt-8 .actions-modal-label.actions-modal-button-bold{font-weight:600}.actions-modal-button.actions-modal-button-red,.actions-modal-label.actions-modal-button-red{color:#ff3b30}.actions-modal-button:first-child,.actions-modal-label:first-child{border-radius:13px 13px 0 0}.actions-modal-button:last-child,.actions-modal-label:last-child{border-radius:0 0 13px 13px}.actions-modal-button:last-child:after,.actions-modal-label:last-child:after{display:none}.actions-modal-button:first-child:last-child,.actions-modal-label:first-child:last-child{border-radius:13px}.actions-modal-button.disabled,.actions-modal-label.disabled{opacity:.9;color:#8e8e93}.actions-modal-button{cursor:pointer;height:57px;line-height:57px;font-size:20px;color:#007aff;white-space:normal;text-overflow:ellipsis}.actions-modal-button.active-state,html:not(.watch-active-state) .actions-modal-button:active{background:rgba(230,230,230,.9)}.actions-modal-label{font-size:13px;line-height:1.3;min-height:57px;padding:8px 10px;color:#8a8a8a;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}@media (orientation:landscape){.actions-modal-label{min-height:44px}.actions-modal-button{height:44px;line-height:44px}}input.modal-text-input{box-sizing:border-box;height:26px;background:#fff;margin:0;margin-top:15px;padding:0 5px;border:1px solid rgba(0,0,0,.3);border-radius:0;width:100%;font-size:14px;font-family:inherit;display:block;box-shadow:0 0 0 transparent;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}input.modal-text-input+input.modal-text-input{margin-top:5px}.modal-input-double+.modal-input-double input.modal-text-input{border-top:0;margin-top:0}.popover{width:320px;background:rgba(255,255,255,.95);z-index:13500;margin:0;top:0;opacity:0;left:0;border-radius:13px;position:absolute;display:none;-webkit-transform:none;transform:none;-webkit-transition-property:opacity;-moz-transition-property:opacity;-ms-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.popover.modal-in{-webkit-transition-duration:.3s;transition-duration:.3s;opacity:1}.popover.modal-in.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.popover .list-block{margin:0}.popover .list-block ul{background:0 0}.popover .list-block:first-child ul{border-radius:13px 13px 0 0}.popover .list-block:first-child ul:before{display:none}.popover .list-block:first-child li:first-child a{border-radius:13px 13px 0 0}.popover .list-block:last-child ul{border-radius:0 0 13px 13px}.popover .list-block:last-child ul:after{display:none}.popover .list-block:last-child li:last-child a{border-radius:0 0 13px 13px}.popover .list-block:first-child:last-child li:first-child:last-child a,.popover .list-block:first-child:last-child ul:first-child:last-child{border-radius:13px}.popover .list-block+.list-block{margin-top:35px}.popover-angle{width:26px;height:26px;position:absolute;left:-26px;top:0;z-index:100;overflow:hidden}.popover-angle:after{content:' ';background:rgba(255,255,255,.95);width:26px;height:26px;position:absolute;left:0;top:0;border-radius:3px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.popover-angle.on-left{left:-26px}.popover-angle.on-left:after{left:19px;top:0}.popover-angle.on-right{left:100%}.popover-angle.on-right:after{left:-19px;top:0}.popover-angle.on-top{left:0;top:-26px}.popover-angle.on-top:after{left:0;top:19px}.popover-angle.on-bottom{left:0;top:100%}.popover-angle.on-bottom:after{left:0;top:-19px}.popover-inner{overflow:auto;-webkit-overflow-scrolling:touch}.actions-popover .list-block+.list-block{margin-top:20px}.actions-popover .list-block ul{background:#fff}.actions-popover-label{padding:8px 10px;color:#8a8a8a;font-size:13px;line-height:1.3;text-align:center;position:relative}.actions-popover-label:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:rgba(0,0,0,.2);display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .actions-popover-label:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .actions-popover-label:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.actions-popover-label:last-child:after{display:none}.login-screen,.popup{position:absolute;left:0;top:0;width:100%;height:100%;z-index:11000;background:#fff;box-sizing:border-box;display:none;overflow:auto;-webkit-overflow-scrolling:touch;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-ms-transition-property:-ms-transform;-o-transition-property:-o-transform;transition-property:transform;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.login-screen.modal-in,.login-screen.modal-out,.popup.modal-in,.popup.modal-out{-webkit-transition-duration:.4s;transition-duration:.4s}.login-screen.modal-in.not-animated,.login-screen.modal-out.not-animated,.popup.modal-in.not-animated,.popup.modal-out.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.login-screen.modal-in,.popup.modal-in{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.login-screen.modal-out,.popup.modal-out{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.login-screen.modal-in,.login-screen.modal-out{display:block}@media all and (min-width:630px) and (min-height:630px){.popup:not(.tablet-fullscreen){width:630px;height:630px;left:50%;top:50%;margin-left:-315px;margin-top:-315px;-webkit-transform:translate3d(0,1024px,0);transform:translate3d(0,1024px,0)}.popup:not(.tablet-fullscreen).modal-in{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.popup:not(.tablet-fullscreen).modal-out{-webkit-transform:translate3d(0,1024px,0);transform:translate3d(0,1024px,0)}}@media all and (max-width:629px),(max-height:629px){html.with-statusbar-overlay .popup{height:-webkit-calc(100% - 20px);height:calc(100% - 20px);top:20px}html.with-statusbar-overlay .popup-overlay{z-index:9500}}html.with-statusbar-overlay .login-screen,html.with-statusbar-overlay .popup.tablet-fullscreen{height:-webkit-calc(100% - 20px);height:calc(100% - 20px);top:20px}.modal .preloader{width:34px;height:34px}.preloader-indicator-overlay{visibility:visible;opacity:0;background:0 0}.preloader-indicator-modal{position:absolute;left:50%;top:50%;padding:8px;margin-left:-25px;margin-top:-25px;background:rgba(0,0,0,.8);z-index:13500;border-radius:5px}.preloader-indicator-modal .preloader{display:block;width:34px;height:34px}.picker-modal{position:absolute;left:0;bottom:0;width:100%;height:260px;z-index:12500;display:none;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-ms-transition-property:-ms-transform;-o-transition-property:-o-transform;transition-property:transform;background:#cfd5da;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.picker-modal.modal-in,.picker-modal.modal-out{-webkit-transition-duration:.4s;transition-duration:.4s}.picker-modal.modal-in.not-animated,.picker-modal.modal-out.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.picker-modal.modal-in{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.picker-modal.modal-out{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.picker-modal .picker-modal-inner{height:100%;position:relative}.picker-modal .toolbar{position:relative;width:100%;background:#f7f7f8}.picker-modal .toolbar:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#929499;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .picker-modal .toolbar:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .picker-modal .toolbar:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.picker-modal .toolbar+.picker-modal-inner{height:-webkit-calc(100% - 44px);height:-moz-calc(100% - 44px);height:calc(100% - 44px)}.picker-modal.picker-modal-inline,.popover .picker-modal{display:block;position:relative;background:0 0;z-index:inherit;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.picker-modal.picker-modal-inline .toolbar:before,.popover .picker-modal .toolbar:before{display:none}.picker-modal.picker-modal-inline .toolbar:after,.popover .picker-modal .toolbar:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#929499;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .picker-modal.picker-modal-inline .toolbar:after,html.pixel-ratio-2 .popover .picker-modal .toolbar:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .picker-modal.picker-modal-inline .toolbar:after,html.pixel-ratio-3 .popover .picker-modal .toolbar:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.popover .picker-modal{width:auto}.popover .picker-modal .toolbar{background:0 0}.picker-modal.smart-select-picker .page{background:#fff}.picker-modal.smart-select-picker .toolbar:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .picker-modal.smart-select-picker .toolbar:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .picker-modal.smart-select-picker .toolbar:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.picker-modal.smart-select-picker .list-block{margin:0}.picker-modal.smart-select-picker .list-block ul:before{display:none}.picker-modal.smart-select-picker .list-block ul:after{display:none}.panel-overlay{position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,0);opacity:0;z-index:5999;display:none;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:.4s;transition-duration:.4s}.panel-overlay.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.panel{z-index:1000;display:none;background:#111;box-sizing:border-box;overflow:auto;-webkit-overflow-scrolling:touch;position:absolute;width:260px;top:0;height:100%;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:.4s;transition-duration:.4s}.panel.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.panel.panel-left{left:0}.panel.panel-left.panel-cover{z-index:6000;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.panel.panel-right{right:0}.panel.panel-right.panel-cover{z-index:6000;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.panel.panel-visible-by-breakpoint{display:block;-webkit-transform:translate3d(0,0,0)!important;transform:translate3d(0,0,0)!important}.panel.panel-visible-by-breakpoint.panel-cover{z-index:5900}body.with-panel-left-cover .views,body.with-panel-right-cover .views{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}body.with-panel-left-cover .panel-overlay,body.with-panel-right-cover .panel-overlay{display:block;opacity:1}body.with-panel-left-reveal .views,body.with-panel-right-reveal .views{-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;transition-property:transform}body.with-panel-left-reveal .panel.not-animated~.views,body.with-panel-right-reveal .panel.not-animated~.views{-webkit-transition-duration:0s;transition-duration:0s}body.with-panel-left-reveal .panel-overlay,body.with-panel-right-reveal .panel-overlay{background:rgba(0,0,0,0);display:block;opacity:0}body.with-panel-left-reveal .views{-webkit-transform:translate3d(260px,0,0);transform:translate3d(260px,0,0)}body.with-panel-left-reveal .panel-overlay{-webkit-transform:translate3d(260px,0,0);transform:translate3d(260px,0,0)}body.with-panel-left-cover .panel.panel-left{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}body.with-panel-right-reveal .views{-webkit-transform:translate3d(-260px,0,0);transform:translate3d(-260px,0,0)}body.with-panel-right-reveal .panel-overlay{-webkit-transform:translate3d(-260px,0,0);transform:translate3d(-260px,0,0)}body.with-panel-right-cover .panel.panel-right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}body.panel-closing .panel-overlay{display:block}body.panel-closing .views{-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;transition-property:transform}body.panel-closing .panel.not-animated~.views{-webkit-transition-duration:0s;transition-duration:0s}.lazy-loaded.lazy-fadeIn{-webkit-animation:lazyFadeIn .6s;animation:lazyFadeIn .6s}@-webkit-keyframes lazyFadeIn{from{opacity:0}to{opacity:1}}@keyframes lazyFadeIn{from{opacity:0}to{opacity:1}}.tabs .tab{display:none}.tabs .tab.active{display:block}.tabs-animated-wrap{position:relative;width:100%;overflow:hidden;height:100%}.tabs-animated-wrap>.tabs{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;height:100%;-webkit-transition-duration:.3s;transition-duration:.3s}.tabs-animated-wrap>.tabs>.tab{width:100%;display:block;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}.tabs-animated-wrap.not-animated>.tabs{-webkit-transition-duration:0s;transition-duration:0s}.tabs-swipeable-wrap{height:100%}.tabs-swipeable-wrap>.tabs>.tab{display:block}.messages-content{background:#fff}.messages{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.messages-date{text-align:center;font-weight:500;font-size:11px;line-height:1;margin:10px 15px;color:#8e8e93}html.ios-gt-8 .messages-date{font-weight:600}.messages-date span{font-weight:400}.message{box-sizing:border-box;margin:1px 10px 0;max-width:70%;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.message:first-child{margin-top:10px}.message .message-text{box-sizing:border-box;border-radius:16px;padding:6px 16px 9px;min-width:48px;min-height:35px;font-size:17px;line-height:1.2;word-break:break-word}.message .message-text img{max-width:100%;height:auto}.message.message-pic .message-text{padding:0;background:0 0}.message.message-pic img{display:block;border-radius:16px}.message-name{font-size:12px;line-height:1;color:#8e8e93;margin-bottom:2px;margin-top:7px}.message-hide-name .message-name{display:none}.message-label{font-size:12px;line-height:1;color:#8e8e93;margin-top:4px}.message-hide-label .message-label{display:none}.message-avatar{width:29px;height:29px;border-radius:100%;margin-top:-29px;position:relative;top:1px;background-size:cover;opacity:1;-webkit-transition-duration:.4s;transition-duration:.4s}.message-hide-avatar .message-avatar{opacity:0}.message-date{font-size:12px;margin-top:4px;opacity:.8}.message-pic img+.message-date{margin-top:8px}.message-sent .message-date{text-align:right}.message-sent{-ms-flex-item-align:end;-webkit-align-self:flex-end;align-self:flex-end;-webkit-box-align:end;-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}.message-sent .message-name{margin-right:16px}.message-sent .message-label{margin-right:6px}.message-sent.message-with-avatar .message-text{margin-right:29px}.message-sent.message-with-avatar .message-name{margin-right:45px}.message-sent.message-with-avatar .message-label{margin-right:34px}.message-sent .message-text{padding-right:22px;background-color:#00d449;color:#fff;margin-left:auto;-webkit-mask-box-image:url("data:image/svg+xml;charset=utf-8,") 50% 56% 46% 42%}.message-sent.message-last .message-text,.message-sent.message-with-tail .message-text{border-radius:16px 16px 0 16px;-webkit-mask-box-image:url("data:image/svg+xml;charset=utf-8,") 50% 56% 46% 42%}.message-sent.message-last.message-pic img,.message-sent.message-with-tail.message-pic img{border-radius:16px 16px 0 16px}.message-received{-ms-flex-item-align:start;-webkit-align-self:flex-start;align-self:flex-start;-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.message-received .message-text{padding-left:22px;background-color:#e5e5ea;color:#000;-webkit-mask-box-image:url("data:image/svg+xml;charset=utf-8,") 50% 42% 46% 56%}.message-received .message-name{margin-left:16px}.message-received .message-label{margin-left:6px}.message-received.message-with-avatar .message-text{margin-left:29px}.message-received.message-with-avatar .message-name{margin-left:45px}.message-received.message-with-avatar .message-label{margin-left:34px}.message-received.message-last .message-text,.message-received.message-with-tail .message-text{border-radius:16px 16px 16px 0;-webkit-mask-box-image:url("data:image/svg+xml;charset=utf-8,") 50% 42% 46% 56%}.message-received.message-last.message-pic img,.message-received.message-with-tail.message-pic img{border-radius:16px 16px 16px 0}.message-last{margin-bottom:8px}.message-appear-from-bottom{-webkit-animation:messageAppearFromBottom .4s;animation:messageAppearFromBottom .4s}.message-appear-from-top{-webkit-animation:messageAppearFromTop .4s;animation:messageAppearFromTop .4s}.messages-auto-layout .message-label,.messages-auto-layout .message-name{display:none}.messages-auto-layout .message-avatar{opacity:0}.messages-auto-layout .message-first .message-name{display:block}.messages-auto-layout .message-last .message-avatar{opacity:1}.messages-auto-layout .message-last .message-label{display:block}html.retina.ios-6 .message,html.retina.ios-6 .message.message-pic img{-webkit-mask-box-image:none;border-radius:16px}@-webkit-keyframes messageAppearFromBottom{from{-webkit-transform:translate3d(0,100%,0)}to{-webkit-transform:translate3d(0,0,0)}}@keyframes messageAppearFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@-webkit-keyframes messageAppearFromTop{from{-webkit-transform:translate3d(0,-100%,0)}to{-webkit-transform:translate3d(0,0,0)}}@keyframes messageAppearFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}html.with-statusbar-overlay .framework7-root{padding-top:20px;box-sizing:border-box}html.with-statusbar-overlay .framework7-root .statusbar-overlay{display:block}html.with-statusbar-overlay .framework7-root .panel{padding-top:20px}.statusbar-overlay{background:#f7f7f8;z-index:10000;position:absolute;left:0;top:0;height:20px;width:100%;display:none;-webkit-transition-duration:.4s;transition-duration:.4s}.preloader{display:inline-block;width:20px;height:20px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-position:50%;background-size:100%;background-repeat:no-repeat;-webkit-animation:preloader-spin 1s steps(12,end) infinite;animation:preloader-spin 1s steps(12,end) infinite}@-webkit-keyframes preloader-spin{100%{-webkit-transform:rotate(360deg)}}@keyframes preloader-spin{100%{transform:rotate(360deg)}}.progressbar,.progressbar-infinite{height:2px;width:100%;overflow:hidden;position:relative;display:block;background:#b6b6b6;border-radius:2px;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.progressbar{vertical-align:middle}.progressbar span{width:100%;background:#007aff;height:100%;position:absolute;left:0;top:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);-webkit-transition-duration:150ms;transition-duration:150ms}.progressbar-infinite:before{content:'';position:absolute;left:0;top:0;width:100%;height:100%;background:#007aff;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transform-origin:left center;transform-origin:left center;-webkit-animation:progressbar-infinite 1s linear infinite;animation:progressbar-infinite 1s linear infinite}html.with-statusbar-overlay .framework7-root>.progressbar-infinite,html.with-statusbar-overlay body>.progressbar-infinite{top:20px}.progressbar-infinite.color-multi{background:0 0}.progressbar-infinite.color-multi:before{content:'';position:absolute;left:0;top:0;width:400%;height:100%;background-image:-webkit-linear-gradient(left,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55,#5856d6,#34aadc,#007aff,#5ac8fa,#4cd964);background-image:linear-gradient(to right,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55,#5856d6,#34aadc,#007aff,#5ac8fa,#4cd964);background-size:25% 100%;background-repeat:repeat-x;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-animation:progressbar-infinite-multicolor 3s linear infinite;animation:progressbar-infinite-multicolor 3s linear infinite}html.with-statusbar-overlay .framework7-root>.progressbar-infinite.color-multi,html.with-statusbar-overlay body>.progressbar-infinite.color-multi{top:20px}.framework7-root>.progressbar,.framework7-root>.progressbar-infinite,.page>.progressbar,.page>.progressbar-infinite,.panel>.progressbar,.panel>.progressbar-infinite,.popup>.progressbar,.popup>.progressbar-infinite,.view>.progressbar,.view>.progressbar-infinite,.views>.progressbar,.views>.progressbar-infinite,body>.progressbar,body>.progressbar-infinite{position:absolute;left:0;top:0;z-index:15000;border-radius:0}.progressbar-in{-webkit-animation:progressbar-in .3s forwards;animation:progressbar-in .3s forwards}.progressbar-out{-webkit-animation:progressbar-out .3s forwards;animation:progressbar-out .3s forwards}html.with-statusbar-overlay .framework7-root>.progressbar,html.with-statusbar-overlay body>.progressbar{top:20px}@-webkit-keyframes progressbar-in{from{opacity:0;-webkit-transform:scaleY(0)}to{opacity:1;-webkit-transform:scaleY(1)}}@keyframes progressbar-in{from{opacity:0;transform:scaleY(0)}to{opacity:1;transform:scaleY(1)}}@-webkit-keyframes progressbar-out{from{opacity:1;-webkit-transform:scaleY(1)}to{opacity:0;-webkit-transform:scaleY(0)}}@keyframes progressbar-out{from{opacity:1;transform:scaleY(1)}to{opacity:0;transform:scaleY(0)}}@-webkit-keyframes progressbar-infinite{0%{-webkit-transform:translate3d(-50%,0,0) scaleX(.5)}100%{-webkit-transform:translate3d(100%,0,0) scaleX(.5)}}@keyframes progressbar-infinite{0%{transform:translate3d(-50%,0,0) scaleX(.5)}100%{transform:translate3d(100%,0,0) scaleX(.5)}}@-webkit-keyframes progressbar-infinite-multicolor{from{-webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-50%,0,0)}}@keyframes progressbar-infinite-multicolor{from{transform:translate3d(0,0,0)}to{transform:translate3d(-50%,0,0)}}.pull-to-refresh-layer{position:absolute;position:relative;margin-top:-44px;left:0;top:0;width:100%;height:44px}.pull-to-refresh-layer .preloader{position:absolute;left:50%;top:50%;margin-left:-10px;margin-top:-10px;visibility:hidden}.pull-to-refresh-layer .pull-to-refresh-arrow{width:13px;height:20px;position:absolute;left:50%;top:50%;margin-left:-6px;margin-top:-10px;background:no-repeat center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2026%2040'%3E%3Cpolygon%20points%3D'9%2C22%209%2C0%2017%2C0%2017%2C22%2026%2C22%2013.5%2C40%200%2C22'%20fill%3D'%238c8c8c'%2F%3E%3C%2Fsvg%3E");background-size:13px 20px;z-index:10;-webkit-transform:rotate(0) translate3d(0,0,0);transform:rotate(0) translate3d(0,0,0);-webkit-transition-duration:.3s;transition-duration:.3s}.pull-to-refresh-content.pull-to-refresh-no-navbar{margin-top:-44px;height:-webkit-calc(100% + 44px);height:-moz-calc(100% + 44px);height:calc(100% + 44px)}.pull-to-refresh-content.pull-to-refresh-no-navbar .pull-to-refresh-layer{margin-top:0}.pull-to-refresh-content.refreshing,.pull-to-refresh-content.transitioning{-webkit-transition-duration:.4s;transition-duration:.4s}.pull-to-refresh-content:not(.refreshing) .pull-to-refresh-layer .preloader{-webkit-animation:none;animation:none}.pull-to-refresh-content.refreshing{-webkit-transform:translate3d(0,44px,0);transform:translate3d(0,44px,0)}.pull-to-refresh-content.refreshing .pull-to-refresh-arrow{visibility:hidden;-webkit-transition-duration:0s;transition-duration:0s}.pull-to-refresh-content.refreshing .preloader{visibility:visible}.pull-to-refresh-content.pull-up .pull-to-refresh-arrow{-webkit-transform:rotate(180deg) translate3d(0,0,0);transform:rotate(180deg) translate3d(0,0,0)}.infinite-scroll-preloader{text-align:center;padding:5px 0}.autocomplete-page .autocomplete-found{display:block}.autocomplete-page .autocomplete-not-found{display:none}.autocomplete-page .autocomplete-values{display:block}.autocomplete-page .list-block ul:empty{display:none}.autocomplete-preloader:not(.autocomplete-preloader-visible){-webkit-animation:none;animation:none;visibility:hidden}.autocomplete-dropdown{background:#fff;box-sizing:border-box;position:absolute;z-index:500;box-shadow:0 3px 3px rgba(0,0,0,.2);width:100%;left:0}.autocomplete-dropdown .autocomplete-dropdown-inner{position:relative;overflow:auto;-webkit-overflow-scrolling:touch;height:100%;z-index:1}.autocomplete-dropdown .autocomplete-preloader{display:none;position:absolute;right:15px;bottom:100%;margin-bottom:12px;width:20px;height:20px}.autocomplete-dropdown .autocomplete-preloader-visible{display:block}.autocomplete-dropdown .autocomplete-dropdown-placeholder{color:#a9a9a9}.autocomplete-dropdown .list-block{margin:0}.autocomplete-dropdown .list-block ul{background:0 0!important}.autocomplete-dropdown .list-block ul:before{display:none}.autocomplete-dropdown .list-block ul:after{display:none}.autocomplete-dropdown .list-block b{font-weight:500}html.ios-gt-8 .autocomplete-dropdown .list-block b{font-weight:600}.list-block .item-content-dropdown-expand .item-title.label{width:0;-webkit-flex-shrink:10;-ms-flex:0 10 auto;flex-shrink:10}.list-block .item-content-dropdown-expand .item-title.label+.item-input{margin-left:0}.list-block .item-content-dropdown-expand .item-input{width:100%}.timeline{margin:35px 0;padding:0 15px;box-sizing:border-box}.content-block-inner .timeline{padding:0;margin:0}.timeline-item{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;overflow:hidden;padding:2px 0 15px;box-sizing:border-box;position:relative}.timeline-item:last-child{padding-bottom:2px}.timeline-item-date{-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;width:50px;text-align:right;box-sizing:border-box}.timeline-item-date small{font-size:10px}.timeline-item-content{margin:2px;min-width:0;position:relative;-webkit-flex-shrink:10;-ms-flex:0 10 auto;flex-shrink:10}.timeline-item-content h1:first-child,.timeline-item-content h2:first-child,.timeline-item-content h3:first-child,.timeline-item-content h4:first-child,.timeline-item-content ol:first-child,.timeline-item-content p:first-child,.timeline-item-content ul:first-child{margin-top:0}.timeline-item-content h1:last-child,.timeline-item-content h2:last-child,.timeline-item-content h3:last-child,.timeline-item-content h4:last-child,.timeline-item-content ol:last-child,.timeline-item-content p:last-child,.timeline-item-content ul:last-child{margin-bottom:0}.timeline-item-content .card,.timeline-item-content .content-block,.timeline-item-content .list-block,.timeline-item-content.card,.timeline-item-content.content-block,.timeline-item-content.list-block{margin:0;width:100%}.timeline-item-content .card+.card,.timeline-item-content .card+.content-block,.timeline-item-content .card+.list-block,.timeline-item-content .content-block+.card,.timeline-item-content .content-block+.content-block,.timeline-item-content .content-block+.list-block,.timeline-item-content .list-block+.card,.timeline-item-content .list-block+.content-block,.timeline-item-content .list-block+.list-block{margin:15px 0 0}.timeline-item-inner{border-radius:7px;padding:8px 15px;background:#fff;box-sizing:border-box}.timeline-item-inner .content-block{padding:0;color:inherit}.timeline-item-inner .content-block-inner{padding-left:0;padding-right:0;margin:0}.timeline-item-inner .content-block-inner:before{display:none}.timeline-item-inner .content-block-inner:after{display:none}.timeline-item-inner .list-block ul:before{display:none}.timeline-item-inner .list-block ul:after{display:none}.content-block-inner .timeline-item-inner{border-radius:3px;border:1px solid rgba(0,0,0,.1)}.timeline-item-inner+.timeline-item-inner{margin-top:15px}.timeline-item-divider{width:1px;margin:0 15px;position:relative;width:10px;height:10px;background:#bbb;border-radius:50%;margin-top:3px;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}.timeline-item-divider:after,.timeline-item-divider:before{content:' ';width:1px;height:100vh;position:absolute;left:50%;background:inherit;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.timeline-item-divider:after{top:100%}.timeline-item-divider:before{bottom:100%}.timeline-item:last-child .timeline-item-divider:after{display:none}.timeline-item:first-child .timeline-item-divider:before{display:none}.timeline-item-time{margin-top:15px;font-size:13px;color:#6d6d72}.timeline-item-time:first-child,.timeline-item-time:last-child{margin-top:0}.timeline-item-title+.timeline-item-time{margin-top:0}.timeline-item-title{font-size:17px;font-weight:500}html.ios-gt-8 .timeline-item-title{font-weight:600}.timeline-item-subtitle{font-size:15px}.timeline-sides .timeline-item{margin-left:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:calc(50% - (30px + 10px)/ 2 - 50px);margin-right:0}.timeline-sides .timeline-item .timeline-item-date{text-align:right}.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n){-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-right:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:calc(50% - (30px + 10px)/ 2 - 50px);margin-left:0}.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date{text-align:left}.timeline-sides .timeline-item-left{-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-right:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:calc(50% - (30px + 10px)/ 2 - 50px);margin-left:0}.timeline-sides .timeline-item-left .timeline-item-date{text-align:left}.timeline-sides .timeline-item-right{margin-left:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:calc(50% - (30px + 10px)/ 2 - 50px);margin-right:0}.timeline-sides .timeline-item-right .timeline-item-date{text-align:right}@media (min-width:768px){.tablet-sides .timeline-item{margin-left:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:calc(50% - (30px + 10px)/ 2 - 50px);margin-right:0}.tablet-sides .timeline-item .timeline-item-date{text-align:right}.tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n){-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-right:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:calc(50% - (30px + 10px)/ 2 - 50px);margin-left:0}.tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date{text-align:left}.tablet-sides .timeline-item-left{-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-right:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:calc(50% - (30px + 10px)/ 2 - 50px);margin-left:0}.tablet-sides .timeline-item-left .timeline-item-date{text-align:left}.tablet-sides .timeline-item-right{margin-left:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:calc(50% - (30px + 10px)/ 2 - 50px);margin-right:0}.tablet-sides .timeline-item-right .timeline-item-date{text-align:right}}.timeline-horizontal{padding:0;margin:0;height:100%;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.timeline-horizontal .timeline-item{display:block;width:33.33333333vw;margin:0;padding:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;padding-top:34px;padding-bottom:10px;position:relative;height:100%}.timeline-horizontal .timeline-item:after{content:'';position:absolute;right:0;top:0;left:auto;bottom:auto;width:1px;height:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}html.pixel-ratio-2 .timeline-horizontal .timeline-item:after{-webkit-transform:scaleX(.5);transform:scaleX(.5)}html.pixel-ratio-3 .timeline-horizontal .timeline-item:after{-webkit-transform:scaleX(.33);transform:scaleX(.33)}.timeline-horizontal .timeline-month:last-child .timeline-item:last-child:after{display:none}.timeline-horizontal .timeline-item-date{background:#f7f7f8;width:auto;text-align:left;padding:0 10px;line-height:34px;position:absolute;left:0;top:0;width:100%;height:34px}.timeline-horizontal .timeline-item-date:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .timeline-horizontal .timeline-item-date:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .timeline-horizontal .timeline-item-date:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.timeline-horizontal .timeline-item-content{padding:10px;overflow:auto;-webkit-overflow-scrolling:touch;margin:0;height:-webkit-calc(100% - 10px);height:-moz-calc(100% - 10px);height:calc(100% - 10px)}.timeline-horizontal .timeline-item-divider{display:none}.timeline-horizontal.col-100 .timeline-item{width:100vw}.timeline-horizontal.col-95 .timeline-item{width:95vw}.timeline-horizontal.col-90 .timeline-item{width:90vw}.timeline-horizontal.col-85 .timeline-item{width:85vw}.timeline-horizontal.col-80 .timeline-item{width:80vw}.timeline-horizontal.col-75 .timeline-item{width:75vw}.timeline-horizontal.col-70 .timeline-item{width:70vw}.timeline-horizontal.col-66 .timeline-item{width:66.66666666666666vw}.timeline-horizontal.col-65 .timeline-item{width:65vw}.timeline-horizontal.col-60 .timeline-item{width:60vw}.timeline-horizontal.col-55 .timeline-item{width:55vw}.timeline-horizontal.col-50 .timeline-item{width:50vw}.timeline-horizontal.col-45 .timeline-item{width:45vw}.timeline-horizontal.col-40 .timeline-item{width:40vw}.timeline-horizontal.col-35 .timeline-item{width:35vw}.timeline-horizontal.col-33 .timeline-item{width:33.333333333333336vw}.timeline-horizontal.col-30 .timeline-item{width:30vw}.timeline-horizontal.col-25 .timeline-item{width:25vw}.timeline-horizontal.col-20 .timeline-item{width:20vw}.timeline-horizontal.col-15 .timeline-item{width:15vw}.timeline-horizontal.col-10 .timeline-item{width:10vw}.timeline-horizontal.col-5 .timeline-item{width:5vw}@media all and (min-width:768px){.timeline-horizontal.tablet-100 .timeline-item{width:100vw}.timeline-horizontal.tablet-95 .timeline-item{width:95vw}.timeline-horizontal.tablet-90 .timeline-item{width:90vw}.timeline-horizontal.tablet-85 .timeline-item{width:85vw}.timeline-horizontal.tablet-80 .timeline-item{width:80vw}.timeline-horizontal.tablet-75 .timeline-item{width:75vw}.timeline-horizontal.tablet-70 .timeline-item{width:70vw}.timeline-horizontal.tablet-66 .timeline-item{width:66.66666666666666vw}.timeline-horizontal.tablet-65 .timeline-item{width:65vw}.timeline-horizontal.tablet-60 .timeline-item{width:60vw}.timeline-horizontal.tablet-55 .timeline-item{width:55vw}.timeline-horizontal.tablet-50 .timeline-item{width:50vw}.timeline-horizontal.tablet-45 .timeline-item{width:45vw}.timeline-horizontal.tablet-40 .timeline-item{width:40vw}.timeline-horizontal.tablet-35 .timeline-item{width:35vw}.timeline-horizontal.tablet-33 .timeline-item{width:33.333333333333336vw}.timeline-horizontal.tablet-30 .timeline-item{width:30vw}.timeline-horizontal.tablet-25 .timeline-item{width:25vw}.timeline-horizontal.tablet-20 .timeline-item{width:20vw}.timeline-horizontal.tablet-15 .timeline-item{width:15vw}.timeline-horizontal.tablet-10 .timeline-item{width:10vw}.timeline-horizontal.tablet-5 .timeline-item{width:5vw}}.timeline-month,.timeline-year{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;padding-top:24px;position:relative;box-sizing:border-box;height:100%}.timeline-year:after{content:'';position:absolute;right:0;top:0;left:auto;bottom:auto;width:1px;height:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}html.pixel-ratio-2 .timeline-year:after{-webkit-transform:scaleX(.5);transform:scaleX(.5)}html.pixel-ratio-3 .timeline-year:after{-webkit-transform:scaleX(.33);transform:scaleX(.33)}.timeline-year:last-child:after{display:none}.timeline-month .timeline-item:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .timeline-month .timeline-item:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .timeline-month .timeline-item:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.timeline-month-title,.timeline-year-title{position:absolute;left:0;top:0;width:100%;line-height:24px;height:24px;padding:0 10px;box-sizing:border-box;background:#f7f7f8}.timeline-month-title span,.timeline-year-title span{display:inline-block;position:-webkit-sticky;position:-moz-sticky;position:sticky;left:10px}.timeline-year-title{font-size:16px}.timeline-year-title span{margin-top:3px}.timeline-month-title span{margin-top:-2px}.swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate(0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-box-lines:multiple;-moz-box-lines:multiple;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-moz-transition-timing-function:ease-out;-ms-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;width:100%;height:100%;position:relative}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;-webkit-transition-property:-webkit-transform,height;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform,height}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-wp8-horizontal{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-wp8-vertical{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;-moz-background-size:27px 44px;-webkit-background-size:27px 44px;background-size:27px 44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");right:10px;left:auto}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s;transition:.3s;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-moz-appearance:none;-ms-appearance:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-o-transform:translate(0,-50%);-ms-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:5px 0;display:block}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 5px}.swiper-pagination-progress{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progress .swiper-pagination-progressbar{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-moz-transform-origin:left top;-ms-transform-origin:left top;-o-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progress .swiper-pagination-progressbar{-webkit-transform-origin:right top;-moz-transform-origin:right top;-ms-transform-origin:right top;-o-transform-origin:right top;transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progress{width:100%;height:4px;left:0;top:0}.swiper-container-vertical>.swiper-pagination-progress{width:4px;height:100%;left:0;top:0}.swiper-container-3d{-webkit-perspective:1200px;-moz-perspective:1200px;-o-perspective:1200px;perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;-ms-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-coverflow .swiper-wrapper,.swiper-container-flip .swiper-wrapper{-ms-perspective:1200px}.swiper-container-cube,.swiper-container-flip{overflow:visible}.swiper-container-cube .swiper-slide,.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-cube .swiper-slide .swiper-slide,.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active,.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top,.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-slide{visibility:hidden;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-moz-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-moz-transition-timing-function:ease-out;-ms-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-moz-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-slide .preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10}.photo-browser{position:absolute;left:0;top:0;width:100%;height:100%;z-index:11500}.framework7-root>.photo-browser,body>.photo-browser{opacity:0;display:none;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.framework7-root>.photo-browser.photo-browser-in,body>.photo-browser.photo-browser-in{display:block;-webkit-animation:photoBrowserIn .4s forwards;animation:photoBrowserIn .4s forwards}.framework7-root>.photo-browser.photo-browser-out,body>.photo-browser.photo-browser-out{display:block;-webkit-animation:photoBrowserOut .4s forwards;animation:photoBrowserOut .4s forwards}html.with-statusbar-overlay .framework7-root>.photo-browser,html.with-statusbar-overlay body>.photo-browser{height:-webkit-calc(100% - 20px);height:calc(100% - 20px);top:20px}.framework7-root>.photo-browser .navbar,.framework7-root>.photo-browser .toolbar,.popup>.photo-browser .navbar,.popup>.photo-browser .toolbar,body>.photo-browser .navbar,body>.photo-browser .toolbar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.photo-browser .page[data-page=photo-browser-slides]{background:0 0}.photo-browser-popup{background:0 0}.photo-browser .navbar,.photo-browser .toolbar,.views .view[data-page=photo-browser-slides] .navbar,.views .view[data-page=photo-browser-slides] .toolbar{background:rgba(247,247,247,.95);-webkit-transition-duration:.4s;transition-duration:.4s}.view[data-page=photo-browser-slides] .page[data-page=photo-browser-slides] .navbar,.view[data-page=photo-browser-slides] .page[data-page=photo-browser-slides] .toolbar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.photo-browser-exposed .navbar,.photo-browser-exposed .toolbar{opacity:0;visibility:hidden;pointer-events:none}.photo-browser-exposed .photo-browser-swiper-container{background:#000}.photo-browser-of{margin:0 5px}.photo-browser-captions{pointer-events:none;position:absolute;left:0;width:100%;bottom:0;z-index:10;opacity:1;-webkit-transition-duration:.4s;transition-duration:.4s}.photo-browser-captions.photo-browser-captions-exposed{opacity:0}.toolbar~.photo-browser-captions{bottom:44px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.photo-browser-exposed .toolbar~.photo-browser-captions{-webkit-transform:translate3d(0,44px,0);transform:translate3d(0,44px,0)}.toolbar~.photo-browser-captions.photo-browser-captions-exposed{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.photo-browser-caption{box-sizing:border-box;-webkit-transition-duration:.3s;transition-duration:.3s;position:absolute;bottom:0;left:0;opacity:0;padding:4px 5px;width:100%;text-align:center;color:#fff;background:rgba(0,0,0,.8)}.photo-browser-caption:empty{display:none}.photo-browser-caption.photo-browser-caption-active{opacity:1}.photo-browser-captions-light .photo-browser-caption{background:rgba(255,255,255,.8);color:#000}.photo-browser-exposed .photo-browser-caption{color:#fff;background:rgba(0,0,0,.8)}.photo-browser-swiper-container{position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden;background:#fff;-webkit-transition-duration:.4s;transition-duration:.4s}.photo-browser-swiper-wrapper{position:absolute;left:0;top:0;width:100%;height:100%;padding:0;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.photo-browser-link-inactive{opacity:.3}.photo-browser-slide{width:100%;height:100%;position:relative;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;box-sizing:border-box}.photo-browser-slide.transitioning{-webkit-transition-duration:.4s;transition-duration:.4s}.photo-browser-slide span.swiper-zoom-container{display:none}.photo-browser-slide img{width:auto;height:auto;max-width:100%;max-height:100%;display:none}.photo-browser-slide.swiper-slide-active span.swiper-zoom-container,.photo-browser-slide.swiper-slide-next span.swiper-zoom-container,.photo-browser-slide.swiper-slide-prev span.swiper-zoom-container{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.photo-browser-slide.swiper-slide-active img,.photo-browser-slide.swiper-slide-next img,.photo-browser-slide.swiper-slide-prev img{display:inline}.photo-browser-slide.swiper-slide-active.photo-browser-slide-lazy .preloader,.photo-browser-slide.swiper-slide-next.photo-browser-slide-lazy .preloader,.photo-browser-slide.swiper-slide-prev.photo-browser-slide-lazy .preloader{display:block}.photo-browser-slide iframe{width:100%;height:100%}.photo-browser-slide .preloader{display:none;position:absolute;width:42px;height:42px;margin-left:-21px;margin-top:-21px;left:50%;top:50%}.photo-browser-dark .navbar,.photo-browser-dark .toolbar{background:rgba(30,30,30,.8);color:#fff}.photo-browser-dark .navbar:before,.photo-browser-dark .toolbar:before{display:none}.photo-browser-dark .navbar:after,.photo-browser-dark .toolbar:after{display:none}.photo-browser-dark .navbar a,.photo-browser-dark .toolbar a{color:#fff}.photo-browser-dark .photo-browser-swiper-container{background:#000}@-webkit-keyframes photoBrowserIn{0%{-webkit-transform:translate3d(0,0,0) scale(.5);opacity:0}100%{-webkit-transform:translate3d(0,0,0) scale(1);opacity:1}}@keyframes photoBrowserIn{0%{transform:translate3d(0,0,0) scale(.5);opacity:0}100%{transform:translate3d(0,0,0) scale(1);opacity:1}}@-webkit-keyframes photoBrowserOut{0%{-webkit-transform:translate3d(0,0,0) scale(1);opacity:1}100%{-webkit-transform:translate3d(0,0,0) scale(.5);opacity:0}}@keyframes photoBrowserOut{0%{transform:translate3d(0,0,0) scale(1);opacity:1}100%{transform:translate3d(0,0,0) scale(.5);opacity:0}}.picker-columns{width:100%;height:260px;z-index:11500}.picker-columns.picker-modal-inline,.popover .picker-columns{height:200px}@media (orientation:landscape) and (max-height:415px){.picker-columns:not(.picker-modal-inline){height:200px}}.popover.popover-picker-columns{width:280px}.picker-items{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;padding:0;text-align:right;font-size:24px;-webkit-mask-box-image:-webkit-linear-gradient(bottom,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent);-webkit-mask-box-image:linear-gradient(to top,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent)}.picker-items-col{overflow:hidden;position:relative;max-height:100%}.picker-items-col.picker-items-col-left{text-align:left}.picker-items-col.picker-items-col-center{text-align:center}.picker-items-col.picker-items-col-right{text-align:right}.picker-items-col.picker-items-col-divider{color:#000;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.picker-items-col-wrapper{-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.picker-item{height:36px;line-height:36px;white-space:nowrap;position:relative;overflow:hidden;text-overflow:ellipsis;color:#707274;left:0;top:0;width:100%;box-sizing:border-box;-webkit-transition-duration:.3s;transition-duration:.3s}.picker-item span{padding:0 10px}.picker-items-col-absolute .picker-item{position:absolute}.picker-item.picker-item-far{pointer-events:none}.picker-item.picker-selected{color:#000;-webkit-transform:translate3d(0,0,0) rotateX(0);transform:translate3d(0,0,0) rotateX(0)}.picker-center-highlight{height:36px;box-sizing:border-box;position:absolute;left:0;width:100%;top:50%;margin-top:-18px;pointer-events:none}.picker-center-highlight:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#a8abb0;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .picker-center-highlight:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .picker-center-highlight:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.picker-center-highlight:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#a8abb0;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .picker-center-highlight:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .picker-center-highlight:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.picker-3d .picker-items{overflow:hidden;-webkit-perspective:1200px;perspective:1200px}.picker-3d .picker-item,.picker-3d .picker-items-col,.picker-3d .picker-items-col-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.picker-3d .picker-items-col{overflow:visible}.picker-3d .picker-item{-webkit-transform-origin:center center -110px;transform-origin:center center -110px;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.picker-calendar{background:#fff;height:320px;width:100%;overflow:hidden}@media (orientation:landscape) and (max-height:415px){.picker-calendar:not(.picker-modal-inline){height:220px}}.picker-calendar .picker-modal-inner{overflow:hidden}.popover-picker-calendar .picker-calendar{height:320px}.popover.popover-picker-calendar{width:320px}.picker-calendar-week-days{height:18px;background:#f7f7f8;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;font-size:11px;box-sizing:border-box;position:relative}.picker-calendar-week-days:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .picker-calendar-week-days:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .picker-calendar-week-days:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.picker-calendar-week-days .picker-calendar-week-day{-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;width:14.28571429%;width:-webkit-calc(100% / 7);width:-moz-calc(100% / 7);width:calc(100% / 7);line-height:17px;text-align:center}.picker-calendar-week-days+.picker-calendar-months{height:-webkit-calc(100% - 18px);height:-moz-calc(100% - 18px);height:calc(100% - 18px)}.picker-calendar-months{width:100%;height:100%;overflow:hidden;position:relative}.picker-calendar-months-wrapper{position:relative;width:100%;height:100%;-webkit-transition-duration:.3s;transition-duration:.3s}.picker-calendar-month{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;width:100%;height:100%;position:absolute;left:0;top:0}.picker-calendar-row{height:16.66666667%;height:-webkit-calc(100% / 6);height:-moz-calc(100% / 6);height:calc(100% / 6);display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;width:100%;position:relative}.picker-calendar-row:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#ccc;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .picker-calendar-row:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .picker-calendar-row:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.picker-calendar-row:last-child:after{display:none}.picker-calendar-day{-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;width:14.28571429%;width:-webkit-calc(100% / 7);width:-moz-calc(100% / 7);width:calc(100% / 7);text-align:center;color:#000;font-size:15px;cursor:pointer;z-index:20;height:100%}.picker-calendar-day.picker-calendar-day-next,.picker-calendar-day.picker-calendar-day-prev{color:#b8b8b8}.picker-calendar-day.picker-calendar-day-disabled{color:#d4d4d4;cursor:auto}.picker-calendar-day.picker-calendar-day-today span{background:#e3e3e3}.picker-calendar-day.picker-calendar-day-selected span{background:#007aff;color:#fff}.picker-calendar-day.picker-calendar-day-has-events span:after{content:'';width:4px;height:4px;border-radius:50%;background:#ccc;position:absolute;margin-left:-2px;left:50%;bottom:1px}.picker-calendar-day.picker-calendar-day-has-events.picker-calendar-day-selected span:after{display:none}.picker-calendar-day span{display:inline-block;border-radius:100%;width:30px;height:30px;line-height:30px;position:relative}.picker-calendar-range .picker-calendar-day.picker-calendar-day-selected{-webkit-box-align:stretch;-ms-flex-align:stretch;-webkit-align-items:stretch;align-items:stretch;-ms-flex-line-pack:stretch;-webkit-align-content:stretch;align-content:stretch}.picker-calendar-range .picker-calendar-day.picker-calendar-day-selected span{width:100%;border-radius:0;height:auto;text-align:center;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.picker-calendar-month-picker,.picker-calendar-year-picker{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;width:50%;max-width:200px;-webkit-flex-shrink:10;-ms-flex:0 10 auto;flex-shrink:10}.picker-calendar-month-picker a.icon-only,.picker-calendar-year-picker a.icon-only{min-width:36px}.picker-calendar-month-picker span,.picker-calendar-year-picker span{-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;position:relative;overflow:hidden;text-overflow:ellipsis}.picker-calendar.picker-modal-inline .picker-calendar-week-days,.popover .picker-calendar .picker-calendar-week-days{background:0 0}.picker-calendar.picker-modal-inline .picker-calendar-week-days:before,.picker-calendar.picker-modal-inline .toolbar:before,.popover .picker-calendar .picker-calendar-week-days:before,.popover .picker-calendar .toolbar:before{display:none}.picker-calendar.picker-modal-inline .picker-calendar-week-days:after,.picker-calendar.picker-modal-inline .toolbar:after,.popover .picker-calendar .picker-calendar-week-days:after,.popover .picker-calendar .toolbar:after{display:none}.picker-calendar.picker-modal-inline .picker-calendar-week-days~.picker-calendar-months:before,.picker-calendar.picker-modal-inline .toolbar~.picker-modal-inner .picker-calendar-months:before,.popover .picker-calendar .picker-calendar-week-days~.picker-calendar-months:before,.popover .picker-calendar .toolbar~.picker-modal-inner .picker-calendar-months:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .picker-calendar.picker-modal-inline .picker-calendar-week-days~.picker-calendar-months:before,html.pixel-ratio-2 .picker-calendar.picker-modal-inline .toolbar~.picker-modal-inner .picker-calendar-months:before,html.pixel-ratio-2 .popover .picker-calendar .picker-calendar-week-days~.picker-calendar-months:before,html.pixel-ratio-2 .popover .picker-calendar .toolbar~.picker-modal-inner .picker-calendar-months:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .picker-calendar.picker-modal-inline .picker-calendar-week-days~.picker-calendar-months:before,html.pixel-ratio-3 .picker-calendar.picker-modal-inline .toolbar~.picker-modal-inner .picker-calendar-months:before,html.pixel-ratio-3 .popover .picker-calendar .picker-calendar-week-days~.picker-calendar-months:before,html.pixel-ratio-3 .popover .picker-calendar .toolbar~.picker-modal-inner .picker-calendar-months:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.notifications{position:absolute;left:0;top:0;width:100%;z-index:20000;font-size:14px;margin:0;border:none;display:none;box-sizing:border-box;max-height:100%;-webkit-transition-duration:450ms;transition-duration:450ms;-webkit-perspective:1200px;perspective:1200px;padding-top:8px;padding-bottom:8px}.notifications.list-block>ul{background:0 0;margin:0 auto;max-width:584px}.notifications.list-block>ul:before{display:none}.notifications.list-block>ul:after{display:none}.with-statusbar-overlay .notifications{padding-top:20px;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}.notifications .item-content{padding-left:8px;-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.notifications .item-title-row{margin-bottom:8px}.notifications .item-title-row:before{position:absolute;left:0;top:0;height:36px;border-radius:12px 12px 0 0;z-index:-1;background:#fff;content:'';width:100%}.notifications .item-title{font-weight:400!important;height:36px;text-transform:uppercase;line-height:35px;font-size:13px}html.ios-gt-8 .notifications .item-title{font-weight:400!important}.notifications .item-subtitle{font-size:15px;font-weight:500}html.ios-gt-8 .notifications .item-subtitle{font-weight:600}.notifications .item-text{font-size:14px;color:inherit;height:auto;line-height:inherit}.notifications .item-subtitle:first-child,.notifications .item-text:first-child{margin-top:8px}.notifications .item-content,.notifications .item-inner{min-height:0}.notifications .item-inner{position:static}.notifications .item-inner:after{display:none}.notifications .item-media{width:20px}.notifications .item-media img{max-width:20px;max-height:20px}.notifications .item-media i.icon{width:20px;height:20px;-webkit-background-size:cover;background-size:cover;background-position:center;background-repeat:no-repeat}.notifications .item-media+.item-inner{margin-left:8px;overflow:visible}.notifications li.notification-item{box-shadow:0 0 10px rgba(0,0,0,.15)}.notifications li.notification-item .item-inner{padding-top:0}.notifications li.notification-item .item-media{padding-top:8px}.notifications .item-after{margin-top:auto;margin-bottom:auto}.notifications .close-notification{width:22px;height:22px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2044%2044'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cg%20stroke%3D'none'%20stroke-width%3D'1'%20fill%3D'none'%20fill-rule%3D'evenodd'%3E%3Cpath%20d%3D'M22.5%2C20.3786797%20L14.7218254%2C12.6005051%20L12.6005051%2C14.7218254%20L20.3786797%2C22.5%20L12.6005051%2C30.2781746%20L14.7218254%2C32.3994949%20L22.5%2C24.6213203%20L30.2781746%2C32.3994949%20L32.3994949%2C30.2781746%20L24.6213203%2C22.5%20L32.3994949%2C14.7218254%20L30.2781746%2C12.6005051%20L22.5%2C20.3786797%20Z%20M22%2C44%20C34.1502645%2C44%2044%2C34.1502645%2044%2C22%20C44%2C9.8497355%2034.1502645%2C0%2022%2C0%20C9.8497355%2C0%200%2C9.8497355%200%2C22%20C0%2C34.1502645%209.8497355%2C44%2022%2C44%20Z'%20fill%3D'%23000000'%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-position:center top;background-repeat:no-repeat;-webkit-background-size:100% auto;background-size:100% auto;position:relative;opacity:.2}.notifications .close-notification span{position:absolute;width:44px;height:44px;left:50%;top:50%;margin-left:-22px;margin-top:-22px}.notifications .notification-item{max-width:568px;margin:0 auto 8px;-webkit-transition-duration:450ms;transition-duration:450ms;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1;background:rgba(250,250,250,.95);border-radius:12px;width:-webkit-calc(100% - 16px);width:-moz-calc(100% - 16px);width:calc(100% - 16px);position:absolute;left:8px;top:0}.notifications .notification-item:last-child{margin-bottom:0}.notifications .notification-hidden{opacity:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.login-screen-content{background:#fff}.login-screen-content .content-block,.login-screen-content .list-block,.login-screen-content .list-block-label,.login-screen-content .login-screen-title{max-width:480px;margin:25px auto}.login-screen-content .list-block ul{background:0 0}.login-screen-content .list-block ul:before{display:none}.login-screen-content .list-block ul:after{display:none}.login-screen-content .list-block-label{text-align:center}.login-screen-title{text-align:center;font-size:30px}.disabled,[disabled]{opacity:.55;pointer-events:none}.disabled .disabled,.disabled [disabled],[disabled] .disabled,[disabled] [disabled]{opacity:1}.data-table{overflow-x:auto}.data-table table{width:100%;border:none;padding:0;margin:0;border-collapse:collapse;text-align:left}.data-table thead{font-size:12px}.data-table thead td,.data-table thead th{font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:16px}html.ios-gt-8 .data-table thead td,html.ios-gt-8 .data-table thead th{font-weight:600}.data-table thead td:not(.sortable-active),.data-table thead th:not(.sortable-active){color:#8e8e93}.data-table thead i.f7-icons,.data-table thead i.icon{font-size:18px;width:18px;height:18px;vertical-align:top}.data-table tbody tr.data-table-row-selected{background:#f7f7f8}.data-table tbody td:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#c8c7cc;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .data-table tbody td:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .data-table tbody td:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}html:not(.ios):not(.android) .data-table tbody tr:hover{background:#f7f7f8}.data-table td,.data-table th{padding:0;position:relative;padding-left:15px;padding-right:15px;height:44px}.data-table td.numeric-cell,.data-table th.numeric-cell{text-align:right}.data-table td.checkbox-cell,.data-table th.checkbox-cell{padding-right:7px;width:22px;overflow:visible}.data-table td.checkbox-cell+td,.data-table td.checkbox-cell+th,.data-table th.checkbox-cell+td,.data-table th.checkbox-cell+th{padding-left:8px}.data-table td.actions-cell,.data-table th.actions-cell{text-align:right;white-space:nowrap}.data-table td.actions-cell a.link,.data-table th.actions-cell a.link{position:relative;z-index:1;cursor:pointer}.data-table td.actions-cell a.link+a.link,.data-table th.actions-cell a.link+a.link{margin-left:15px}.data-table td.actions-cell a.icon-only,.data-table th.actions-cell a.icon-only{width:18px;height:18px;display:inline-block;vertical-align:middle;font-size:18px;line-height:18px;text-align:center;font-size:0}.data-table td.actions-cell a.icon-only i,.data-table th.actions-cell a.icon-only i{font-size:18px;vertical-align:middle}.data-table .sortable-cell{cursor:pointer;position:relative}.data-table .sortable-cell.numeric-cell:before,.data-table .sortable-cell:not(.numeric-cell):after{content:'';display:inline-block;vertical-align:top;width:16px;height:16px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23000000'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200h24v24H0V0z'%20fill%3D'none'%2F%3E%3Cpath%20d%3D'M20%2012l-1.41-1.41L13%2016.17V4h-2v12.17l-5.58-5.59L4%2012l8%208%208-8z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");background-size:100% auto;background-position:center;background-repeat:no-repeat;font-size:0;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:rotate(0);transform:rotate(0);opacity:0}html:not(.ios):not(.android) .data-table .sortable-cell:not(.sortable-active):hover:after,html:not(.ios):not(.android) .data-table .sortable-cell:not(.sortable-active):hover:before{opacity:.54}.data-table .sortable-cell.sortable-active:after,.data-table .sortable-cell.sortable-active:before{opacity:.87}.data-table .sortable-cell.sortable-desc:after,.data-table .sortable-cell.sortable-desc:before{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.data-table .sortable-cell:not(.numeric-cell):after{margin-left:5px}.data-table .sortable-cell.numeric-cell:before{margin-right:5px}.card .data-table .card-footer,.card .data-table .card-header,.data-table.card .card-footer,.data-table.card .card-header{padding-left:15px;padding-right:8px}.card .data-table .card-header,.data-table.card .card-header{height:64px}.card .data-table .card-content,.data-table.card .card-content{overflow-x:auto}.data-table .data-table-title{font-size:17px;font-weight:500}html.ios-gt-8 .data-table .data-table-title{font-weight:600}.data-table .data-table-actions,.data-table .data-table-links{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.data-table .data-table-actions a.link,.data-table .data-table-links a.link{cursor:pointer}.data-table .data-table-actions a.link+a.link,.data-table .data-table-links a.link+a.link{margin-left:15px}.data-table .data-table-actions{margin-left:auto;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.data-table .data-table-actions a.link{min-width:0;cursor:pointer}.data-table .data-table-actions a.link.icon-only{width:44px;height:44px;line-height:1}.data-table .data-table-actions i.f7-icons,.data-table .data-table-actions i.icon{font-size:22px}.data-table .data-table-header,.data-table .data-table-header-selected{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;width:100%}.data-table .card-header>.data-table-header,.data-table .card-header>.data-table-header-selected{padding-left:15px;padding-right:8px;margin-left:-15px;margin-right:-8px;height:100%;padding-top:10px;padding-bottom:10px}.data-table .data-table-header-selected{display:none;background:rgba(0,122,255,.1)}.data-table.data-table-has-checked .data-table-header{display:none}.data-table.data-table-has-checked .data-table-header-selected{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.data-table .data-table-title-selected{color:#007aff;font-size:14px}@media (max-width:480px) and (orientation:portrait){.data-table.data-table-collapsible thead{display:none}.data-table.data-table-collapsible tbody,.data-table.data-table-collapsible td,.data-table.data-table-collapsible tr{display:block}.data-table.data-table-collapsible tr{position:relative}.data-table.data-table-collapsible tr:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#c8c7cc;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .data-table.data-table-collapsible tr:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .data-table.data-table-collapsible tr:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.data-table.data-table-collapsible tr:hover{background-color:inherit}.data-table.data-table-collapsible td{text-align:left;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-line-pack:center;-webkit-align-content:center;align-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.data-table.data-table-collapsible td:before{display:none}.data-table.data-table-collapsible td:not(.checkbox-cell){font-size:17px;line-height:17px}.data-table.data-table-collapsible td:not(.checkbox-cell):before{width:40%;display:block;content:attr(data-collapsible-title);position:relative;height:auto;background:0 0;-webkit-transform:none!important;transform:none!important;color:#8e8e93;font-weight:500;font-size:12px;margin-right:16px;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}html.ios-gt-8 .data-table.data-table-collapsible td:not(.checkbox-cell):before{font-weight:600}.data-table.data-table-collapsible td.checkbox-cell{position:absolute;left:0;top:0}.data-table.data-table-collapsible td.checkbox-cell+td{padding-left:16px}.data-table.data-table-collapsible td.checkbox-cell~td{margin-left:32px}}.data-table .tablet-landscape-only,.data-table .tablet-only{display:none}@media (min-width:768px){.data-table .tablet-only{display:table-cell}}@media (min-width:768px) and (orientation:landscape){.data-table .tablet-landscape-only{display:table-cell}} \ No newline at end of file diff --git a/bower_components/framework7/dist/css/framework7.ios.rtl.css b/bower_components/framework7/dist/css/framework7.ios.rtl.css new file mode 100644 index 00000000..e12b453f --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.ios.rtl.css @@ -0,0 +1,718 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * iOS Theme + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +/*============= + Framework 7 RTL Additions +=============*/ +html { + direction: rtl; +} +/* === Lists === */ +.list-block ul ul { + padding-left: 0; + padding-right: 45px; +} +.list-block .item-content { + padding-left: 0; + padding-right: 15px; +} +.list-block .item-inner { + padding-right: 0; + padding-left: 15px; +} +.list-block .item-after { + margin-left: 0; + margin-right: 5px; +} +.list-block .item-media i + i, +.list-block .item-media i + img { + margin-left: 0; + margin-right: 5px; +} +.list-block .item-media + .item-inner { + margin-left: 0; + margin-right: 15px; +} +.list-block .item-link .item-inner { + padding-right: 0; + padding-left: 35px; + background-position: 15px center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E"); +} +.list-block.media-list .item-link .item-inner, +.list-block li.media-item .item-link .item-inner { + padding-right: 0; + padding-left: 15px; +} +.list-block.media-list .item-link .item-title-row, +.list-block li.media-item .item-link .item-title-row { + padding-right: 0; + padding-left: 20px; + background-position: center left; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E"); +} +.list-block .sortable-handler { + right: auto; + left: 0; +} +.list-block.sortable-opened .item-inner, +.list-block.sortable-opened .item-link .item-inner { + padding-right: 0; + padding-left: 35px; +} +.list-block.sortable-opened .item-link .item-inner, +.list-block.sortable-opened .item-link .item-title-row { + background-image: none; +} +.list-block .swipeout-actions-left, +.list-block .swipeout-actions-right { + direction: ltr; +} +/* === Toolbars === */ +.navbar a.link i + span, +.toolbar a.link i + span, +.navbar a.link i + i, +.toolbar a.link i + i, +.navbar a.link span + i, +.toolbar a.link span + i, +.navbar a.link span + span, +.toolbar a.link span + span { + margin-left: 0; + margin-right: 7px; +} +.navbar .left a + a, +.navbar .right a + a { + margin-left: 0; + margin-right: 15px; +} +.navbar .left { + margin-right: 0px; + margin-left: 10px; +} +.navbar .right { + margin-left: 0px; + margin-right: 10px; +} +.navbar .right:first-child { + right: auto; + left: 8px; +} +/* === Forms === */ +.list-block input[type="text"], +.list-block input[type="password"], +.list-block input[type="email"], +.list-block input[type="tel"], +.list-block input[type="url"], +.list-block input[type="date"], +.list-block input[type="datetime-local"], +.list-block input[type="number"], +.list-block select, +.list-block textarea { + padding-left: 0; + padding-right: 5px; +} +.buttons-row .button:first-child { + border-radius: 0 5px 5px 0; + border-left: none; +} +.buttons-row .button:last-child { + border-radius: 5px 0 0 5px; + border-left-width: 1px; + border-left-style: solid; +} +.buttons-row .button.button-round:first-child { + border-radius: 0 27px 27px 0; +} +.buttons-row .button.button-round:last-child { + border-radius: 27px 0 0 27px; +} +.label-switch input[type="checkbox"] + .checkbox:before { + left: auto; + right: 2px; +} +.label-switch input[type="checkbox"] + .checkbox:after { + right: 2px; + left: auto; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.label-switch input[type="checkbox"]:checked + .checkbox:after { + left: auto; + -webkit-transform: translateX(-20px); + transform: translateX(-20px); +} +.range-slider { + padding-left: 0; + padding-right: 0; + margin-left: 0; + padding-right: 3px; + padding-left: 3px; + margin-right: -1px; +} +.range-slider input[type="range"]:after { + left: auto; + right: -5px; +} +.range-slider input[type="range"]::-webkit-slider-thumb:after { + left: auto; + right: 0; +} +.range-slider input[type="range"]::-webkit-slider-thumb:before { + right: auto; + left: 100%; +} +label.label-radio input[type="checkbox"] ~ .item-inner, +label.label-radio input[type="radio"] ~ .item-inner { + padding-left: 35px; + padding-right: 0; +} +label.label-radio input[type="checkbox"]:checked ~ .item-inner, +label.label-radio input[type="radio"]:checked ~ .item-inner { + background-position: 15px center; +} +/* === Search Bar === */ +.searchbar input[type="search"] { + background-position: right center; + background-position: -webkit-calc(100% - 8px) center; + background-position: calc(100% - 8px) center; +} +.searchbar .searchbar-clear { + right: auto; + left: 0; +} +.searchbar.searchbar-active .searchbar-cancel { + margin-left: 0; + margin-right: 8px; +} +/* === Message Bar === */ +.messagebar .link + textarea { + margin-left: 0; + margin-right: 8px; +} +.messagebar textarea + .link { + margin-left: 0; + margin-right: 8px; +} +/* === Modals === */ +.modal-button:first-child { + border-radius: 0 0 7px 0; + border-right: none; +} +.modal-button:last-child { + border-right: 1px solid #b5b5b5; + border-radius: 0 0 0 7px; +} +.modal-button:first-child:last-child { + border-radius: 0 0 7px 7px; +} +/* === Content Block === */ +.content-block-inner { + margin-left: 0; + margin-right: -15px; +} +/* === Pages === */ +.page-from-right-to-center:before, +.page-from-center-to-right:before, +.page-fake-shadow { + right: auto; + left: 100%; + background: -webkit-linear-gradient(right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); + background: linear-gradient(to left, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0.01) 50%, rgba(0, 0, 0, 0.2) 100%); +} +.page-on-left { + -webkit-transform: translate3d(20%, 0, 0); + transform: translate3d(20%, 0, 0); +} +.page-on-right { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); +} +@-webkit-keyframes pageFromRightToCenter { + from { + -webkit-transform: translate3d(-100%, 0, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + } +} +@-webkit-keyframes pageFromCenterToRight { + from { + -webkit-transform: translate3d(0, 0, 0); + } + to { + -webkit-transform: translate3d(-100%, 0, 0); + } +} +@keyframes pageFromRightToCenter { + from { + transform: translate3d(-100%, 0, 0); + } + to { + transform: translate3d(0, 0, 0); + } +} +@keyframes pageFromCenterToRight { + from { + transform: translate3d(0, 0, 0); + } + to { + transform: translate3d(-100%, 0, 0); + } +} +@-webkit-keyframes pageFromCenterToLeft { + from { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + } + to { + opacity: 0.9; + -webkit-transform: translate3d(20%, 0, 0); + } +} +@-webkit-keyframes pageFromLeftToCenter { + from { + opacity: 0.9; + -webkit-transform: translate3d(20%, 0, 0); + } + to { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + } +} +@keyframes pageFromCenterToLeft { + from { + opacity: 1; + transform: translate3d(0, 0, 0); + } + to { + opacity: 0.9; + transform: translate3d(20%, 0, 0); + } +} +@keyframes pageFromLeftToCenter { + from { + opacity: 0.9; + transform: translate3d(20%, 0, 0); + } + to { + opacity: 1; + transform: translate3d(0, 0, 0); + } +} +/* === Messages === */ +.message-received { + -ms-flex-item-align: end; + -webkit-align-self: flex-end; + align-self: flex-end; + -webkit-box-align: end; + -ms-flex-align: end; + -webkit-align-items: flex-end; + align-items: flex-end; +} +.message-sent { + -ms-flex-item-align: start; + -webkit-align-self: flex-start; + align-self: flex-start; + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +/* === Chips === */ +.chip-media + .chip-label { + margin-left: 0px; + margin-right: 4px; +} +.chip-delete { + margin-right: 0; + margin-left: -6px; +} +/* === Back Icons === */ +i.icon.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-gray, +i.icon-back.theme-gray, +.theme-gray i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-gray, +i.icon-forward.theme-gray, +.theme-gray i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-gray, +i.icon-next.theme-gray, +.theme-gray i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-gray, +i.icon-prev.theme-gray, +.theme-gray i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-white, +i.icon-back.theme-white, +.theme-white i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-white, +i.icon-forward.theme-white, +.theme-white i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-white, +i.icon-next.theme-white, +.theme-white i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-white, +i.icon-prev.theme-white, +.theme-white i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-black, +i.icon-back.theme-black, +.theme-black i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-black, +i.icon-forward.theme-black, +.theme-black i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-black, +i.icon-next.theme-black, +.theme-black i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-black, +i.icon-prev.theme-black, +.theme-black i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-lightblue, +i.icon-back.theme-lightblue, +.theme-lightblue i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-lightblue, +i.icon-forward.theme-lightblue, +.theme-lightblue i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-lightblue, +i.icon-next.theme-lightblue, +.theme-lightblue i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-lightblue, +i.icon-prev.theme-lightblue, +.theme-lightblue i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-yellow, +i.icon-back.theme-yellow, +.theme-yellow i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-yellow, +i.icon-forward.theme-yellow, +.theme-yellow i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-yellow, +i.icon-next.theme-yellow, +.theme-yellow i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-yellow, +i.icon-prev.theme-yellow, +.theme-yellow i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-orange, +i.icon-back.theme-orange, +.theme-orange i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-orange, +i.icon-forward.theme-orange, +.theme-orange i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-orange, +i.icon-next.theme-orange, +.theme-orange i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-orange, +i.icon-prev.theme-orange, +.theme-orange i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-pink, +i.icon-back.theme-pink, +.theme-pink i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-pink, +i.icon-forward.theme-pink, +.theme-pink i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-pink, +i.icon-next.theme-pink, +.theme-pink i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-pink, +i.icon-prev.theme-pink, +.theme-pink i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-blue, +i.icon-back.theme-blue, +.theme-blue i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-blue, +i.icon-forward.theme-blue, +.theme-blue i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-blue, +i.icon-next.theme-blue, +.theme-blue i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-blue, +i.icon-prev.theme-blue, +.theme-blue i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-green, +i.icon-back.theme-green, +.theme-green i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-green, +i.icon-forward.theme-green, +.theme-green i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-green, +i.icon-next.theme-green, +.theme-green i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-green, +i.icon-prev.theme-green, +.theme-green i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-red, +i.icon-back.theme-red, +.theme-red i.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-red, +i.icon-forward.theme-red, +.theme-red i.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-red, +i.icon-next.theme-red, +.theme-red i.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-red, +i.icon-prev.theme-red, +.theme-red i.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} +/* === Accordion === */ +.list-block .accordion-toggle .item-inner { + padding-right: 0; + padding-left: 35px; + background-position: 15px center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E"); +} +.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner, +.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) > .item-link .item-inner, +.list-block.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row, +.list-block.media-list .accordion-item-expanded > .item-link .item-title-row, +.list-block .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row, +.list-block .accordion-item-expanded.media-item > .item-link .item-title-row { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20transform%3D'translate(70%2C%2030)%20rotate(90)'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E"); + background-size: 20px 20px; +} +.list-block .accordion-item ul { + padding-right: 0; +} +/* === Timeline === */ +.timeline-sides .timeline-item { + margin-right: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: calc(50% - (30px + 10px) / 2 - 50px); + margin-left: 0; +} +.timeline-sides .timeline-item .timeline-item-date { + text-align: left; +} +.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-left: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: calc(50% - (30px + 10px) / 2 - 50px); + margin-right: 0; +} +.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date { + text-align: right; +} +.timeline-sides .timeline-item-left { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-left: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: calc(50% - (30px + 10px) / 2 - 50px); + margin-right: 0; +} +.timeline-sides .timeline-item-left .timeline-item-date { + text-align: right; +} +.timeline-sides .timeline-item-right { + margin-right: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: calc(50% - (30px + 10px) / 2 - 50px); + margin-left: 0; +} +.timeline-sides .timeline-item-right .timeline-item-date { + text-align: left; +} +@media (min-width: 768px) { + .tablet-sides .timeline-item { + margin-right: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: calc(50% - (30px + 10px) / 2 - 50px); + margin-left: 0; + } + .tablet-sides .timeline-item .timeline-item-date { + text-align: left; + } + .tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-left: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: calc(50% - (30px + 10px) / 2 - 50px); + margin-right: 0; + } + .tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date { + text-align: right; + } + .tablet-sides .timeline-item-left { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-left: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-left: calc(50% - (30px + 10px) / 2 - 50px); + margin-right: 0; + } + .tablet-sides .timeline-item-left .timeline-item-date { + text-align: right; + } + .tablet-sides .timeline-item-right { + margin-right: -moz-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (30px + 10px) / 2 - 50px); + margin-right: calc(50% - (30px + 10px) / 2 - 50px); + margin-left: 0; + } + .tablet-sides .timeline-item-right .timeline-item-date { + text-align: left; + } +} +.timeline-horizontal .timeline-item-date { + text-align: right; +} +.timeline-horizontal .timeline-month:last-child .timeline-item:last-child:after { + content: ''; + position: absolute; + right: 0; + top: 0; + left: auto; + bottom: auto; + width: 1px; + height: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 100% 50%; + transform-origin: 100% 50%; +} +html.pixel-ratio-2 .timeline-horizontal .timeline-month:last-child .timeline-item:last-child:after { + -webkit-transform: scaleX(0.5); + transform: scaleX(0.5); +} +html.pixel-ratio-3 .timeline-horizontal .timeline-month:last-child .timeline-item:last-child:after { + -webkit-transform: scaleX(0.33); + transform: scaleX(0.33); +} +.timeline-year:last-child:after { + content: ''; + position: absolute; + right: 0; + top: 0; + left: auto; + bottom: auto; + width: 1px; + height: 100%; + background-color: #c4c4c4; + display: block; + z-index: 15; + -webkit-transform-origin: 100% 50%; + transform-origin: 100% 50%; +} +html.pixel-ratio-2 .timeline-year:last-child:after { + -webkit-transform: scaleX(0.5); + transform: scaleX(0.5); +} +html.pixel-ratio-3 .timeline-year:last-child:after { + -webkit-transform: scaleX(0.33); + transform: scaleX(0.33); +} diff --git a/bower_components/framework7/dist/css/framework7.ios.rtl.min.css b/bower_components/framework7/dist/css/framework7.ios.rtl.min.css new file mode 100644 index 00000000..2fe8bb31 --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.ios.rtl.min.css @@ -0,0 +1,15 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +html{direction:rtl}.list-block ul ul{padding-left:0;padding-right:45px}.list-block .item-content{padding-left:0;padding-right:15px}.list-block .item-inner{padding-right:0;padding-left:15px}.list-block .item-after{margin-left:0;margin-right:5px}.list-block .item-media i+i,.list-block .item-media i+img{margin-left:0;margin-right:5px}.list-block .item-media+.item-inner{margin-left:0;margin-right:15px}.list-block .item-link .item-inner{padding-right:0;padding-left:35px;background-position:15px center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E")}.list-block li.media-item .item-link .item-inner,.list-block.media-list .item-link .item-inner{padding-right:0;padding-left:15px}.list-block li.media-item .item-link .item-title-row,.list-block.media-list .item-link .item-title-row{padding-right:0;padding-left:20px;background-position:center left;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E")}.list-block .sortable-handler{right:auto;left:0}.list-block.sortable-opened .item-inner,.list-block.sortable-opened .item-link .item-inner{padding-right:0;padding-left:35px}.list-block.sortable-opened .item-link .item-inner,.list-block.sortable-opened .item-link .item-title-row{background-image:none}.list-block .swipeout-actions-left,.list-block .swipeout-actions-right{direction:ltr}.navbar a.link i+i,.navbar a.link i+span,.navbar a.link span+i,.navbar a.link span+span,.toolbar a.link i+i,.toolbar a.link i+span,.toolbar a.link span+i,.toolbar a.link span+span{margin-left:0;margin-right:7px}.navbar .left a+a,.navbar .right a+a{margin-left:0;margin-right:15px}.navbar .left{margin-right:0;margin-left:10px}.navbar .right{margin-left:0;margin-right:10px}.navbar .right:first-child{right:auto;left:8px}.list-block input[type=date],.list-block input[type=datetime-local],.list-block input[type=email],.list-block input[type=number],.list-block input[type=password],.list-block input[type=tel],.list-block input[type=text],.list-block input[type=url],.list-block select,.list-block textarea{padding-left:0;padding-right:5px}.buttons-row .button:first-child{border-radius:0 5px 5px 0;border-left:none}.buttons-row .button:last-child{border-radius:5px 0 0 5px;border-left-width:1px;border-left-style:solid}.buttons-row .button.button-round:first-child{border-radius:0 27px 27px 0}.buttons-row .button.button-round:last-child{border-radius:27px 0 0 27px}.label-switch input[type=checkbox]+.checkbox:before{left:auto;right:2px}.label-switch input[type=checkbox]+.checkbox:after{right:2px;left:auto;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.label-switch input[type=checkbox]:checked+.checkbox:after{left:auto;-webkit-transform:translateX(-20px);transform:translateX(-20px)}.range-slider{padding-left:0;padding-right:0;margin-left:0;padding-right:3px;padding-left:3px;margin-right:-1px}.range-slider input[type=range]:after{left:auto;right:-5px}.range-slider input[type=range]::-webkit-slider-thumb:after{left:auto;right:0}.range-slider input[type=range]::-webkit-slider-thumb:before{right:auto;left:100%}label.label-radio input[type=checkbox]~.item-inner,label.label-radio input[type=radio]~.item-inner{padding-left:35px;padding-right:0}label.label-radio input[type=checkbox]:checked~.item-inner,label.label-radio input[type=radio]:checked~.item-inner{background-position:15px center}.searchbar input[type=search]{background-position:right center;background-position:-webkit-calc(100% - 8px) center;background-position:calc(100% - 8px) center}.searchbar .searchbar-clear{right:auto;left:0}.searchbar.searchbar-active .searchbar-cancel{margin-left:0;margin-right:8px}.messagebar .link+textarea{margin-left:0;margin-right:8px}.messagebar textarea+.link{margin-left:0;margin-right:8px}.modal-button:first-child{border-radius:0 0 7px 0;border-right:none}.modal-button:last-child{border-right:1px solid #b5b5b5;border-radius:0 0 0 7px}.modal-button:first-child:last-child{border-radius:0 0 7px 7px}.content-block-inner{margin-left:0;margin-right:-15px}.page-fake-shadow,.page-from-center-to-right:before,.page-from-right-to-center:before{right:auto;left:100%;background:-webkit-linear-gradient(right,rgba(0,0,0,0) 0,rgba(0,0,0,0) 10%,rgba(0,0,0,.01) 50%,rgba(0,0,0,.2) 100%);background:linear-gradient(to left,rgba(0,0,0,0) 0,rgba(0,0,0,0) 10%,rgba(0,0,0,.01) 50%,rgba(0,0,0,.2) 100%)}.page-on-left{-webkit-transform:translate3d(20%,0,0);transform:translate3d(20%,0,0)}.page-on-right{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}@-webkit-keyframes pageFromRightToCenter{from{-webkit-transform:translate3d(-100%,0,0)}to{-webkit-transform:translate3d(0,0,0)}}@-webkit-keyframes pageFromCenterToRight{from{-webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-100%,0,0)}}@keyframes pageFromRightToCenter{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes pageFromCenterToRight{from{transform:translate3d(0,0,0)}to{transform:translate3d(-100%,0,0)}}@-webkit-keyframes pageFromCenterToLeft{from{opacity:1;-webkit-transform:translate3d(0,0,0)}to{opacity:.9;-webkit-transform:translate3d(20%,0,0)}}@-webkit-keyframes pageFromLeftToCenter{from{opacity:.9;-webkit-transform:translate3d(20%,0,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0)}}@keyframes pageFromCenterToLeft{from{opacity:1;transform:translate3d(0,0,0)}to{opacity:.9;transform:translate3d(20%,0,0)}}@keyframes pageFromLeftToCenter{from{opacity:.9;transform:translate3d(20%,0,0)}to{opacity:1;transform:translate3d(0,0,0)}}.message-received{-ms-flex-item-align:end;-webkit-align-self:flex-end;align-self:flex-end;-webkit-box-align:end;-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}.message-sent{-ms-flex-item-align:start;-webkit-align-self:flex-start;align-self:flex-start;-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.chip-media+.chip-label{margin-left:0;margin-right:4px}.chip-delete{margin-right:0;margin-left:-6px}i.icon.icon-back{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-forward{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}i.icon.icon-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-gray i.icon-back,i.icon-back.color-gray,i.icon-back.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E")}.theme-gray i.icon-forward,i.icon-forward.color-gray,i.icon-forward.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%238e8e93'%2F%3E%3C%2Fsvg%3E")}.theme-gray i.icon-next,i.icon-next.color-gray,i.icon-next.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-gray i.icon-prev,i.icon-prev.color-gray,i.icon-prev.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%238e8e93'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-white i.icon-back,i.icon-back.color-white,i.icon-back.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.theme-white i.icon-forward,i.icon-forward.color-white,i.icon-forward.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.theme-white i.icon-next,i.icon-next.color-white,i.icon-next.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-white i.icon-prev,i.icon-prev.color-white,i.icon-prev.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffffff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-black i.icon-back,i.icon-back.color-black,i.icon-back.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.theme-black i.icon-forward,i.icon-forward.color-black,i.icon-forward.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.theme-black i.icon-next,i.icon-next.color-black,i.icon-next.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-black i.icon-prev,i.icon-prev.color-black,i.icon-prev.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23000000'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-lightblue i.icon-back,i.icon-back.color-lightblue,i.icon-back.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E")}.theme-lightblue i.icon-forward,i.icon-forward.color-lightblue,i.icon-forward.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%235ac8fa'%2F%3E%3C%2Fsvg%3E")}.theme-lightblue i.icon-next,i.icon-next.color-lightblue,i.icon-next.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-lightblue i.icon-prev,i.icon-prev.color-lightblue,i.icon-prev.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%235ac8fa'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-yellow i.icon-back,i.icon-back.color-yellow,i.icon-back.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E")}.theme-yellow i.icon-forward,i.icon-forward.color-yellow,i.icon-forward.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ffcc00'%2F%3E%3C%2Fsvg%3E")}.theme-yellow i.icon-next,i.icon-next.color-yellow,i.icon-next.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-yellow i.icon-prev,i.icon-prev.color-yellow,i.icon-prev.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ffcc00'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-orange i.icon-back,i.icon-back.color-orange,i.icon-back.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E")}.theme-orange i.icon-forward,i.icon-forward.color-orange,i.icon-forward.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff9500'%2F%3E%3C%2Fsvg%3E")}.theme-orange i.icon-next,i.icon-next.color-orange,i.icon-next.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-orange i.icon-prev,i.icon-prev.color-orange,i.icon-prev.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff9500'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-pink i.icon-back,i.icon-back.color-pink,i.icon-back.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E")}.theme-pink i.icon-forward,i.icon-forward.color-pink,i.icon-forward.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff2d55'%2F%3E%3C%2Fsvg%3E")}.theme-pink i.icon-next,i.icon-next.color-pink,i.icon-next.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-pink i.icon-prev,i.icon-prev.color-pink,i.icon-prev.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff2d55'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-blue i.icon-back,i.icon-back.color-blue,i.icon-back.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E")}.theme-blue i.icon-forward,i.icon-forward.color-blue,i.icon-forward.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E")}.theme-blue i.icon-next,i.icon-next.color-blue,i.icon-next.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-blue i.icon-prev,i.icon-prev.color-blue,i.icon-prev.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23007aff'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-green i.icon-back,i.icon-back.color-green,i.icon-back.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E")}.theme-green i.icon-forward,i.icon-forward.color-green,i.icon-forward.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%234cd964'%2F%3E%3C%2Fsvg%3E")}.theme-green i.icon-next,i.icon-next.color-green,i.icon-next.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-green i.icon-prev,i.icon-prev.color-green,i.icon-prev.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%234cd964'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-red i.icon-back,i.icon-back.color-red,i.icon-back.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M2%2C20l-2-2l8-8L0%2C2l2-2l10%2C10L2%2C20z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E")}.theme-red i.icon-forward,i.icon-forward.color-red,i.icon-forward.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2012%2020'%3E%3Cpath%20d%3D'M10%2C0l2%2C2l-8%2C8l8%2C8l-2%2C2L0%2C10L10%2C0z'%20fill%3D'%23ff3b30'%2F%3E%3C%2Fsvg%3E")}.theme-red i.icon-next,i.icon-next.color-red,i.icon-next.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M14%2C1.6v11.8L2.2%2C7.6L14%2C1.6%20M15%2C0L0%2C7.6L15%2C15V0L15%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.theme-red i.icon-prev,i.icon-prev.color-red,i.icon-prev.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2015%2015'%3E%3Cg%3E%3Cpath%20fill%3D'%23ff3b30'%20d%3D'M1%2C1.6l11.8%2C5.8L1%2C13.4V1.6%20M0%2C0v15l15-7.6L0%2C0L0%2C0z'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}.list-block .accordion-toggle .item-inner{padding-right:0;padding-left:35px;background-position:15px center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E")}.list-block .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row,.list-block .accordion-item-expanded.media-item>.item-link .item-title-row,.list-block.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row,.list-block.media-list .accordion-item-expanded>.item-link .item-title-row,.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner,.list-block:not(.media-list) .accordion-item-expanded:not(.media-item)>.item-link .item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20transform%3D'translate(70%2C%2030)%20rotate(90)'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E");background-size:20px 20px}.list-block .accordion-item ul{padding-right:0}.timeline-sides .timeline-item{margin-right:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:calc(50% - (30px + 10px)/ 2 - 50px);margin-left:0}.timeline-sides .timeline-item .timeline-item-date{text-align:left}.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n){-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-left:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:calc(50% - (30px + 10px)/ 2 - 50px);margin-right:0}.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date{text-align:right}.timeline-sides .timeline-item-left{-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-left:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:calc(50% - (30px + 10px)/ 2 - 50px);margin-right:0}.timeline-sides .timeline-item-left .timeline-item-date{text-align:right}.timeline-sides .timeline-item-right{margin-right:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:calc(50% - (30px + 10px)/ 2 - 50px);margin-left:0}.timeline-sides .timeline-item-right .timeline-item-date{text-align:left}@media (min-width:768px){.tablet-sides .timeline-item{margin-right:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:calc(50% - (30px + 10px)/ 2 - 50px);margin-left:0}.tablet-sides .timeline-item .timeline-item-date{text-align:left}.tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n){-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-left:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:calc(50% - (30px + 10px)/ 2 - 50px);margin-right:0}.tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date{text-align:right}.tablet-sides .timeline-item-left{-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-left:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-left:calc(50% - (30px + 10px)/ 2 - 50px);margin-right:0}.tablet-sides .timeline-item-left .timeline-item-date{text-align:right}.tablet-sides .timeline-item-right{margin-right:-moz-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (30px + 10px)/ 2 - 50px);margin-right:calc(50% - (30px + 10px)/ 2 - 50px);margin-left:0}.tablet-sides .timeline-item-right .timeline-item-date{text-align:left}}.timeline-horizontal .timeline-item-date{text-align:right}.timeline-horizontal .timeline-month:last-child .timeline-item:last-child:after{content:'';position:absolute;right:0;top:0;left:auto;bottom:auto;width:1px;height:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}html.pixel-ratio-2 .timeline-horizontal .timeline-month:last-child .timeline-item:last-child:after{-webkit-transform:scaleX(.5);transform:scaleX(.5)}html.pixel-ratio-3 .timeline-horizontal .timeline-month:last-child .timeline-item:last-child:after{-webkit-transform:scaleX(.33);transform:scaleX(.33)}.timeline-year:last-child:after{content:'';position:absolute;right:0;top:0;left:auto;bottom:auto;width:1px;height:100%;background-color:#c4c4c4;display:block;z-index:15;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}html.pixel-ratio-2 .timeline-year:last-child:after{-webkit-transform:scaleX(.5);transform:scaleX(.5)}html.pixel-ratio-3 .timeline-year:last-child:after{-webkit-transform:scaleX(.33);transform:scaleX(.33)} \ No newline at end of file diff --git a/bower_components/framework7/dist/css/framework7.material.colors.css b/bower_components/framework7/dist/css/framework7.material.colors.css new file mode 100644 index 00000000..a1cf8d2a --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.material.colors.css @@ -0,0 +1,8982 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * Google Material Theme + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +/*========================== +Framework7 Layouts Themes +==========================*/ +/* === Dark layout === */ +.layout-dark .page, +.layout-dark .login-screen-content, +.page.layout-dark, +.layout-dark .panel, +.panel.layout-dark { + background-color: #222; + color: rgba(255, 255, 255, 0.87); +} +.layout-dark .content-block-title { + color: rgba(255, 255, 255, 0.87); +} +.layout-dark .content-block-inner:before { + background-color: #393939; +} +.layout-dark .content-block-inner:after { + background-color: #393939; +} +.layout-dark .popover .list-block ul { + background: none; +} +.layout-dark .card { + background: #1c1c1c; +} +.layout-dark .card-header:after { + background-color: #393939; +} +.layout-dark .card-footer { + color: #bbb; +} +.layout-dark .card-footer:before { + background-color: #393939; +} +.layout-dark .list-block ul:before, +.list-block.layout-dark ul:before { + background-color: #393939; +} +.layout-dark .list-block ul:after, +.list-block.layout-dark ul:after { + background-color: #393939; +} +.layout-dark .list-block.inset ul, +.list-block.layout-dark.inset ul { + background: #1c1c1c; +} +.layout-dark .list-block.notifications > ul, +.list-block.layout-dark.notifications > ul { + background: none; +} +.layout-dark li.sorting { + background-color: rgba(34, 34, 34, 0.8); +} +.layout-dark .swipeout-actions-left a, +.layout-dark .swipeout-actions-right a { + background-color: #444; +} +.layout-dark .item-inner:after, +.layout-dark .list-block ul ul li:last-child .item-inner:after { + background-color: #393939; +} +.layout-dark .item-after, +.layout-dark .item-text { + color: rgba(255, 255, 255, 0.7); +} +.layout-dark .list-block-label { + color: #bbb; +} +.layout-dark .item-divider, +.layout-dark .list-group-title { + background: #1a1a1a; + color: #bbb; +} +.layout-dark .item-divider:before, +.layout-dark .list-group-title:before { + background-color: #393939; +} +.layout-dark .contacts-block .list-group-title { + background: none; +} +.layout-dark .autocomplete-dropdown { + background: #1c1c1c; +} +.layout-dark .autocomplete-dropdown .list-block { + color: rgba(255, 255, 255, 0.54); +} +.layout-dark .autocomplete-dropdown .list-block b { + color: rgba(255, 255, 255, 0.87); +} +html:not(.watch-active-state) .layout-dark .item-link:active, +html:not(.watch-active-state) .layout-dark label.label-checkbox:active, +html:not(.watch-active-state) .layout-dark label.label-radio:active, +.layout-dark .item-link.active-state, +.layout-dark label.label-checkbox.active-state, +.layout-dark label.label-radio.active-state { + background-color: rgba(255, 255, 255, 0.05); +} +.layout-dark .list-block input[type="text"], +.layout-dark .list-block input[type="password"], +.layout-dark .list-block input[type="search"], +.layout-dark .list-block input[type="email"], +.layout-dark .list-block input[type="tel"], +.layout-dark .list-block input[type="url"], +.layout-dark .list-block input[type="date"], +.layout-dark .list-block input[type="datetime-local"], +.layout-dark .list-block input[type="time"], +.layout-dark .list-block input[type="number"], +.layout-dark .list-block select, +.layout-dark .list-block textarea { + color: #fff; +} +.layout-dark .list-block input[type="text"]::-webkit-input-placeholder, +.layout-dark .list-block input[type="password"]::-webkit-input-placeholder, +.layout-dark .list-block input[type="search"]::-webkit-input-placeholder, +.layout-dark .list-block input[type="email"]::-webkit-input-placeholder, +.layout-dark .list-block input[type="tel"]::-webkit-input-placeholder, +.layout-dark .list-block input[type="url"]::-webkit-input-placeholder, +.layout-dark .list-block input[type="date"]::-webkit-input-placeholder, +.layout-dark .list-block input[type="datetime-local"]::-webkit-input-placeholder, +.layout-dark .list-block input[type="time"]::-webkit-input-placeholder, +.layout-dark .list-block input[type="number"]::-webkit-input-placeholder, +.layout-dark .list-block select::-webkit-input-placeholder, +.layout-dark .list-block textarea::-webkit-input-placeholder { + color: rgba(255, 255, 255, 0.35); +} +.layout-dark .label-switch .checkbox { + background: rgba(255, 255, 255, 0.3); +} +.layout-dark .item-inner:not(.focus-state) .label, +.layout-dark .item-inner:not(.focus-state) .floating-label { + color: rgba(255, 255, 255, 0.7); +} +.layout-dark .item-inner:not(.focus-state):not(.not-empty-state) .item-input-field:after, +.layout-dark .item-inner:not(.focus-state):not(.not-empty-state) .input-field:after { + background-color: rgba(255, 255, 255, 0.12); +} +.layout-dark label.label-checkbox i.icon-form-checkbox { + border-color: rgba(255, 255, 255, 0.7); +} +.layout-dark label.label-radio i.icon-form-radio { + border-color: rgba(255, 255, 255, 0.7); +} +.layout-dark .item-link.list-button:after, +.layout-dark .list-button:after { + background-color: #393939; +} +.layout-dark .page-content .ripple-wave { + background: rgba(255, 255, 255, 0.3); +} +html:not(.watch-active-state) .layout-dark .button:not(.button-fill):active, +.layout-dark .button:not(.button-fill).active-state { + background: rgba(255, 255, 255, 0.1); +} +.layout-dark .chip { + background: rgba(255, 255, 255, 0.87); +} +.layout-dark .timeline-item-inner { + background: #1c1c1c; +} +.layout-dark .timeline-item-divider { + background: rgba(255, 255, 255, 0.3); +} +.layout-dark .content-block-inner .timeline-item-inner { + border-color: #393939; +} +.layout-dark .timeline-item-time { + color: rgba(255, 255, 255, 0.7); +} +.layout-dark .data-table tbody tr.data-table-row-selected { + background: rgba(255, 255, 255, 0.05); +} +.layout-dark .data-table tbody td:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #393939; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .layout-dark .data-table tbody td:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .layout-dark .data-table tbody td:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +html:not(.ios):not(.android) .layout-dark .data-table tbody tr:hover { + background: rgba(255, 255, 255, 0.05); +} +.layout-dark .data-table thead th:not(.sortable-active), +.layout-dark .data-table thead td:not(.sortable-active) { + color: rgba(255, 255, 255, 0.5); +} +.layout-dark .data-table th.actions-cell a.link, +.layout-dark .data-table td.actions-cell a.link { + color: rgba(255, 255, 255, 0.5); +} +.layout-dark .data-table .sortable-cell:not(.numeric-cell):after, +.layout-dark .data-table .sortable-cell.numeric-cell:before { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23ffffff'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200h24v24H0V0z'%20fill%3D'none'%2F%3E%3Cpath%20d%3D'M20%2012l-1.41-1.41L13%2016.17V4h-2v12.17l-5.58-5.59L4%2012l8%208%208-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +.layout-dark .data-table .data-table-actions a.link { + color: rgba(255, 255, 255, 0.5); +} +@media (max-width: 480px) and (orientation: portrait) { + .layout-dark .data-table.data-table-collapsible tr:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #393939; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; + } + html.pixel-ratio-2 .layout-dark .data-table.data-table-collapsible tr:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + } + html.pixel-ratio-3 .layout-dark .data-table.data-table-collapsible tr:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); + } + .layout-dark .data-table.data-table-collapsible tr:hover { + background-color: inherit; + } + .layout-dark .data-table.data-table-collapsible td:not(.checkbox-cell):before { + color: rgba(255, 255, 255, 0.5); + } +} +/*========================== +Framework7 Color Themes +==========================*/ +.theme-red .button:not(.button-fill) { + color: #f44336; +} +.theme-red .navbar .button:not(.button-fill), +.theme-red.navbar .button:not(.button-fill), +.theme-red .toolbar .button:not(.button-fill), +.theme-red.toolbar .button:not(.button-fill), +.theme-red .subnavbar .button:not(.button-fill), +.theme-red.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-red .button.button-fill { + background: #f44336; + color: #fff; +} +html:not(.watch-active-state) .theme-red .button.button-fill:active, +.theme-red .button.button-fill.active-state { + background: #D32F2F; +} +.progressbar.theme-red, +.theme-red .progressbar { + background-color: rgba(244, 67, 54, 0.5); +} +.progressbar.theme-red span, +.theme-red .progressbar span { + background-color: #f44336; +} +.progressbar-infinite.theme-red, +.theme-red .progressbar-infinite { + background-color: rgba(244, 67, 54, 0.5); +} +.progressbar-infinite.theme-red:after, +.theme-red .progressbar-infinite:after, +.progressbar-infinite.theme-red:before, +.theme-red .progressbar-infinite:before { + background-color: #f44336; +} +.color-red i.icon, +i.icon.color-red { + color: #f44336; +} +i.icon-next.color-red, +i.icon-next.theme-red { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23f44336'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-red, +i.icon-prev.theme-red { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23f44336'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-red, +i.icon-back.theme-red { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-red, +i.icon-forward.theme-red { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-red, +i.icon-bars.theme-red { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E"); +} +.theme-red a, +.theme-red .card a { + color: #f44336; +} +.theme-red .navbar, +.navbar.theme-red, +.theme-red .toolbar, +.toolbar.theme-red, +.theme-red .subnavbar, +.subnavbar.theme-red, +.theme-red .searchbar, +.searchbar.theme-red { + background-color: #f44336; +} +.theme-red .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-red input[type="checkbox"]:checked + .checkbox { + background-color: rgba(244, 67, 54, 0.5); +} +.theme-red .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-red input[type="checkbox"]:checked + .checkbox:after { + background-color: #f44336; +} +.theme-red label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-red i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-red label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-red input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-red label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-red input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-red label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-red input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-red label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-red input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-red label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-red input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-red label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-red input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #f44336; + background-color: #f44336; +} +.theme-red label.label-radio i.icon-form-radio:after, +label.label-radio.theme-red i.icon-form-radio:after { + background-color: #f44336; +} +.theme-red label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-red input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-red label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-red input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-red label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-red input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-red label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-red input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-red label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-red input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-red label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-red input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #f44336; +} +.theme-red label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-red input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-red label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-red input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-red label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-red input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-red label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-red input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-red label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-red input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-red label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-red input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #f44336; +} +.theme-red .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-red input[type="checkbox"]:checked ~ i { + border-color: #f44336; + background-color: #f44336; +} +.theme-red .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-red input[type="radio"]:checked ~ i { + border-color: #f44336; +} +.theme-red .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-red input[type="radio"]:checked ~ i:after { + background-color: #f44336; +} +.theme-red .form-checkbox .ripple-wave, +.theme-red .form-radio .ripple-wave { + background: rgba(244, 67, 54, 0.5); +} +.theme-red .focus-state .label, +.theme-red .focus-state .floating-label { + color: #f44336; +} +.theme-red .item-input-field.focus-state:after, +.theme-red .input-field.focus-state:after, +.theme-red .item-input-field.not-empty-state:after, +.theme-red .input-field.not-empty-state:after { + background: #f44336; +} +.theme-red .picker-calendar-day.picker-calendar-day-today span { + color: #f44336; +} +.theme-red .picker-calendar-day.picker-calendar-day-selected span { + background-color: #f44336; + color: #fff; +} +.theme-red .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #f44336; +} +.theme-red .picker-header { + background-color: #f44336; +} +.theme-red .modal-button { + color: #f44336; +} +.theme-red .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-red .timeline-item-date { + background-color: #f44336; +} +.theme-red .timeline-year-title, +.theme-red .timeline-month-title { + background-color: #f44336; +} +.theme-red .statusbar-overlay { + background-color: #B71C1C; +} +.theme-red .data-table .data-table-header-selected, +.data-table.theme-red .data-table-header-selected { + background: rgba(244, 67, 54, 0.1); +} +.theme-red .data-table .data-table-title-selected, +.data-table.theme-red .data-table-title-selected { + color: #f44336; +} +.swiper-pagination.color-red .swiper-pagination-bullet-active, +.theme-red .swiper-pagination .swiper-pagination-bullet-active { + background-color: #f44336; +} +.swiper-pagination.color-red .swiper-pagination-progressbar, +.theme-red .swiper-pagination .swiper-pagination-progressbar { + background-color: #f44336; +} +.swiper-pagination.swiper-pagination-progress.bg-red { + background-color: rgba(244, 67, 54, 0.25); +} +.swiper-button-next.color-red, +.swiper-container-rtl .swiper-button-prev.color-red, +.theme-red .swiper-button-next, +.theme-red .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-red, +.swiper-container-rtl .swiper-button-next.color-red, +.theme-red .swiper-button-prev, +.theme-red .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E"); +} +.theme-red .floating-button, +.theme-red .speed-dial-buttons a, +.floating-button.theme-red, +.speed-dial-buttons a.theme-red { + color: #fff; + background: #f44336; +} +html:not(.watch-active-state) .theme-red .floating-button:active, +html:not(.watch-active-state) .theme-red .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-red:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-red:active, +.theme-red .floating-button.active-state, +.theme-red .speed-dial-buttons a.active-state, +.floating-button.theme-red.active-state, +.speed-dial-buttons a.theme-red.active-state { + background: #D32F2F; +} +.theme-red .floating-button i, +.theme-red .speed-dial-buttons a i, +.floating-button.theme-red i, +.speed-dial-buttons a.theme-red i { + color: inherit; +} +.theme-red .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-red input[type="range"]::-webkit-slider-thumb:before { + background-color: #f44336; +} +.theme-red .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-red input[type="range"]::-webkit-slider-thumb { + background-color: #f44336; +} +.theme-red .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-red input[type="range"]::-ms-thumb { + background-color: #f44336; +} +.theme-red .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-red input[type="range"]::-ms-fill-lower { + background-color: #f44336; +} +.theme-red .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-red input[type="range"]::-moz-range-thumb { + background-color: #f44336; +} +.badge.theme-red { + background-color: #f44336; + color: #fff; +} +.theme-pink .button:not(.button-fill) { + color: #e91e63; +} +.theme-pink .navbar .button:not(.button-fill), +.theme-pink.navbar .button:not(.button-fill), +.theme-pink .toolbar .button:not(.button-fill), +.theme-pink.toolbar .button:not(.button-fill), +.theme-pink .subnavbar .button:not(.button-fill), +.theme-pink.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-pink .button.button-fill { + background: #e91e63; + color: #fff; +} +html:not(.watch-active-state) .theme-pink .button.button-fill:active, +.theme-pink .button.button-fill.active-state { + background: #C2185B; +} +.progressbar.theme-pink, +.theme-pink .progressbar { + background-color: rgba(233, 30, 99, 0.5); +} +.progressbar.theme-pink span, +.theme-pink .progressbar span { + background-color: #e91e63; +} +.progressbar-infinite.theme-pink, +.theme-pink .progressbar-infinite { + background-color: rgba(233, 30, 99, 0.5); +} +.progressbar-infinite.theme-pink:after, +.theme-pink .progressbar-infinite:after, +.progressbar-infinite.theme-pink:before, +.theme-pink .progressbar-infinite:before { + background-color: #e91e63; +} +.color-pink i.icon, +i.icon.color-pink { + color: #e91e63; +} +i.icon-next.color-pink, +i.icon-next.theme-pink { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23e91e63'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-pink, +i.icon-prev.theme-pink { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23e91e63'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-pink, +i.icon-back.theme-pink { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-pink, +i.icon-forward.theme-pink { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-pink, +i.icon-bars.theme-pink { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E"); +} +.theme-pink a, +.theme-pink .card a { + color: #e91e63; +} +.theme-pink .navbar, +.navbar.theme-pink, +.theme-pink .toolbar, +.toolbar.theme-pink, +.theme-pink .subnavbar, +.subnavbar.theme-pink, +.theme-pink .searchbar, +.searchbar.theme-pink { + background-color: #e91e63; +} +.theme-pink .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-pink input[type="checkbox"]:checked + .checkbox { + background-color: rgba(233, 30, 99, 0.5); +} +.theme-pink .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-pink input[type="checkbox"]:checked + .checkbox:after { + background-color: #e91e63; +} +.theme-pink label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-pink i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-pink label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-pink input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-pink label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-pink input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-pink label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-pink input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-pink label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-pink input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-pink label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-pink input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-pink label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-pink input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #e91e63; + background-color: #e91e63; +} +.theme-pink label.label-radio i.icon-form-radio:after, +label.label-radio.theme-pink i.icon-form-radio:after { + background-color: #e91e63; +} +.theme-pink label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-pink input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-pink label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-pink input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-pink label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-pink input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-pink label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-pink input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-pink label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-pink input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-pink label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-pink input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #e91e63; +} +.theme-pink label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-pink input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-pink label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-pink input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-pink label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-pink input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-pink label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-pink input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-pink label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-pink input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-pink label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-pink input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #e91e63; +} +.theme-pink .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-pink input[type="checkbox"]:checked ~ i { + border-color: #e91e63; + background-color: #e91e63; +} +.theme-pink .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-pink input[type="radio"]:checked ~ i { + border-color: #e91e63; +} +.theme-pink .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-pink input[type="radio"]:checked ~ i:after { + background-color: #e91e63; +} +.theme-pink .form-checkbox .ripple-wave, +.theme-pink .form-radio .ripple-wave { + background: rgba(233, 30, 99, 0.5); +} +.theme-pink .focus-state .label, +.theme-pink .focus-state .floating-label { + color: #e91e63; +} +.theme-pink .item-input-field.focus-state:after, +.theme-pink .input-field.focus-state:after, +.theme-pink .item-input-field.not-empty-state:after, +.theme-pink .input-field.not-empty-state:after { + background: #e91e63; +} +.theme-pink .picker-calendar-day.picker-calendar-day-today span { + color: #e91e63; +} +.theme-pink .picker-calendar-day.picker-calendar-day-selected span { + background-color: #e91e63; + color: #fff; +} +.theme-pink .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #e91e63; +} +.theme-pink .picker-header { + background-color: #e91e63; +} +.theme-pink .modal-button { + color: #e91e63; +} +.theme-pink .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-pink .timeline-item-date { + background-color: #e91e63; +} +.theme-pink .timeline-year-title, +.theme-pink .timeline-month-title { + background-color: #e91e63; +} +.theme-pink .statusbar-overlay { + background-color: #880E4F; +} +.theme-pink .data-table .data-table-header-selected, +.data-table.theme-pink .data-table-header-selected { + background: rgba(233, 30, 99, 0.1); +} +.theme-pink .data-table .data-table-title-selected, +.data-table.theme-pink .data-table-title-selected { + color: #e91e63; +} +.swiper-pagination.color-pink .swiper-pagination-bullet-active, +.theme-pink .swiper-pagination .swiper-pagination-bullet-active { + background-color: #e91e63; +} +.swiper-pagination.color-pink .swiper-pagination-progressbar, +.theme-pink .swiper-pagination .swiper-pagination-progressbar { + background-color: #e91e63; +} +.swiper-pagination.swiper-pagination-progress.bg-pink { + background-color: rgba(233, 30, 99, 0.25); +} +.swiper-button-next.color-pink, +.swiper-container-rtl .swiper-button-prev.color-pink, +.theme-pink .swiper-button-next, +.theme-pink .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-pink, +.swiper-container-rtl .swiper-button-next.color-pink, +.theme-pink .swiper-button-prev, +.theme-pink .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E"); +} +.theme-pink .floating-button, +.theme-pink .speed-dial-buttons a, +.floating-button.theme-pink, +.speed-dial-buttons a.theme-pink { + color: #fff; + background: #e91e63; +} +html:not(.watch-active-state) .theme-pink .floating-button:active, +html:not(.watch-active-state) .theme-pink .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-pink:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-pink:active, +.theme-pink .floating-button.active-state, +.theme-pink .speed-dial-buttons a.active-state, +.floating-button.theme-pink.active-state, +.speed-dial-buttons a.theme-pink.active-state { + background: #C2185B; +} +.theme-pink .floating-button i, +.theme-pink .speed-dial-buttons a i, +.floating-button.theme-pink i, +.speed-dial-buttons a.theme-pink i { + color: inherit; +} +.theme-pink .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-pink input[type="range"]::-webkit-slider-thumb:before { + background-color: #e91e63; +} +.theme-pink .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-pink input[type="range"]::-webkit-slider-thumb { + background-color: #e91e63; +} +.theme-pink .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-pink input[type="range"]::-ms-thumb { + background-color: #e91e63; +} +.theme-pink .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-pink input[type="range"]::-ms-fill-lower { + background-color: #e91e63; +} +.theme-pink .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-pink input[type="range"]::-moz-range-thumb { + background-color: #e91e63; +} +.badge.theme-pink { + background-color: #e91e63; + color: #fff; +} +.theme-purple .button:not(.button-fill) { + color: #9c27b0; +} +.theme-purple .navbar .button:not(.button-fill), +.theme-purple.navbar .button:not(.button-fill), +.theme-purple .toolbar .button:not(.button-fill), +.theme-purple.toolbar .button:not(.button-fill), +.theme-purple .subnavbar .button:not(.button-fill), +.theme-purple.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-purple .button.button-fill { + background: #9c27b0; + color: #fff; +} +html:not(.watch-active-state) .theme-purple .button.button-fill:active, +.theme-purple .button.button-fill.active-state { + background: #7B1FA2; +} +.progressbar.theme-purple, +.theme-purple .progressbar { + background-color: rgba(156, 39, 176, 0.5); +} +.progressbar.theme-purple span, +.theme-purple .progressbar span { + background-color: #9c27b0; +} +.progressbar-infinite.theme-purple, +.theme-purple .progressbar-infinite { + background-color: rgba(156, 39, 176, 0.5); +} +.progressbar-infinite.theme-purple:after, +.theme-purple .progressbar-infinite:after, +.progressbar-infinite.theme-purple:before, +.theme-purple .progressbar-infinite:before { + background-color: #9c27b0; +} +.color-purple i.icon, +i.icon.color-purple { + color: #9c27b0; +} +i.icon-next.color-purple, +i.icon-next.theme-purple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239c27b0'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-purple, +i.icon-prev.theme-purple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239c27b0'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-purple, +i.icon-back.theme-purple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-purple, +i.icon-forward.theme-purple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-purple, +i.icon-bars.theme-purple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E"); +} +.theme-purple a, +.theme-purple .card a { + color: #9c27b0; +} +.theme-purple .navbar, +.navbar.theme-purple, +.theme-purple .toolbar, +.toolbar.theme-purple, +.theme-purple .subnavbar, +.subnavbar.theme-purple, +.theme-purple .searchbar, +.searchbar.theme-purple { + background-color: #9c27b0; +} +.theme-purple .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-purple input[type="checkbox"]:checked + .checkbox { + background-color: rgba(156, 39, 176, 0.5); +} +.theme-purple .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-purple input[type="checkbox"]:checked + .checkbox:after { + background-color: #9c27b0; +} +.theme-purple label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-purple i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-purple label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-purple input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-purple label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-purple input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-purple label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-purple input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-purple label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-purple input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-purple label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-purple input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-purple label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-purple input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #9c27b0; + background-color: #9c27b0; +} +.theme-purple label.label-radio i.icon-form-radio:after, +label.label-radio.theme-purple i.icon-form-radio:after { + background-color: #9c27b0; +} +.theme-purple label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-purple input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-purple label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-purple input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-purple label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-purple input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-purple label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-purple input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-purple label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-purple input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-purple label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-purple input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #9c27b0; +} +.theme-purple label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-purple input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-purple label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-purple input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-purple label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-purple input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-purple label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-purple input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-purple label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-purple input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-purple label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-purple input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #9c27b0; +} +.theme-purple .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-purple input[type="checkbox"]:checked ~ i { + border-color: #9c27b0; + background-color: #9c27b0; +} +.theme-purple .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-purple input[type="radio"]:checked ~ i { + border-color: #9c27b0; +} +.theme-purple .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-purple input[type="radio"]:checked ~ i:after { + background-color: #9c27b0; +} +.theme-purple .form-checkbox .ripple-wave, +.theme-purple .form-radio .ripple-wave { + background: rgba(156, 39, 176, 0.5); +} +.theme-purple .focus-state .label, +.theme-purple .focus-state .floating-label { + color: #9c27b0; +} +.theme-purple .item-input-field.focus-state:after, +.theme-purple .input-field.focus-state:after, +.theme-purple .item-input-field.not-empty-state:after, +.theme-purple .input-field.not-empty-state:after { + background: #9c27b0; +} +.theme-purple .picker-calendar-day.picker-calendar-day-today span { + color: #9c27b0; +} +.theme-purple .picker-calendar-day.picker-calendar-day-selected span { + background-color: #9c27b0; + color: #fff; +} +.theme-purple .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #9c27b0; +} +.theme-purple .picker-header { + background-color: #9c27b0; +} +.theme-purple .modal-button { + color: #9c27b0; +} +.theme-purple .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-purple .timeline-item-date { + background-color: #9c27b0; +} +.theme-purple .timeline-year-title, +.theme-purple .timeline-month-title { + background-color: #9c27b0; +} +.theme-purple .statusbar-overlay { + background-color: #4A148C; +} +.theme-purple .data-table .data-table-header-selected, +.data-table.theme-purple .data-table-header-selected { + background: rgba(156, 39, 176, 0.1); +} +.theme-purple .data-table .data-table-title-selected, +.data-table.theme-purple .data-table-title-selected { + color: #9c27b0; +} +.swiper-pagination.color-purple .swiper-pagination-bullet-active, +.theme-purple .swiper-pagination .swiper-pagination-bullet-active { + background-color: #9c27b0; +} +.swiper-pagination.color-purple .swiper-pagination-progressbar, +.theme-purple .swiper-pagination .swiper-pagination-progressbar { + background-color: #9c27b0; +} +.swiper-pagination.swiper-pagination-progress.bg-purple { + background-color: rgba(156, 39, 176, 0.25); +} +.swiper-button-next.color-purple, +.swiper-container-rtl .swiper-button-prev.color-purple, +.theme-purple .swiper-button-next, +.theme-purple .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-purple, +.swiper-container-rtl .swiper-button-next.color-purple, +.theme-purple .swiper-button-prev, +.theme-purple .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E"); +} +.theme-purple .floating-button, +.theme-purple .speed-dial-buttons a, +.floating-button.theme-purple, +.speed-dial-buttons a.theme-purple { + color: #fff; + background: #9c27b0; +} +html:not(.watch-active-state) .theme-purple .floating-button:active, +html:not(.watch-active-state) .theme-purple .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-purple:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-purple:active, +.theme-purple .floating-button.active-state, +.theme-purple .speed-dial-buttons a.active-state, +.floating-button.theme-purple.active-state, +.speed-dial-buttons a.theme-purple.active-state { + background: #7B1FA2; +} +.theme-purple .floating-button i, +.theme-purple .speed-dial-buttons a i, +.floating-button.theme-purple i, +.speed-dial-buttons a.theme-purple i { + color: inherit; +} +.theme-purple .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-purple input[type="range"]::-webkit-slider-thumb:before { + background-color: #9c27b0; +} +.theme-purple .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-purple input[type="range"]::-webkit-slider-thumb { + background-color: #9c27b0; +} +.theme-purple .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-purple input[type="range"]::-ms-thumb { + background-color: #9c27b0; +} +.theme-purple .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-purple input[type="range"]::-ms-fill-lower { + background-color: #9c27b0; +} +.theme-purple .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-purple input[type="range"]::-moz-range-thumb { + background-color: #9c27b0; +} +.badge.theme-purple { + background-color: #9c27b0; + color: #fff; +} +.theme-deeppurple .button:not(.button-fill) { + color: #673ab7; +} +.theme-deeppurple .navbar .button:not(.button-fill), +.theme-deeppurple.navbar .button:not(.button-fill), +.theme-deeppurple .toolbar .button:not(.button-fill), +.theme-deeppurple.toolbar .button:not(.button-fill), +.theme-deeppurple .subnavbar .button:not(.button-fill), +.theme-deeppurple.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-deeppurple .button.button-fill { + background: #673ab7; + color: #fff; +} +html:not(.watch-active-state) .theme-deeppurple .button.button-fill:active, +.theme-deeppurple .button.button-fill.active-state { + background: #512DA8; +} +.progressbar.theme-deeppurple, +.theme-deeppurple .progressbar { + background-color: rgba(103, 58, 183, 0.5); +} +.progressbar.theme-deeppurple span, +.theme-deeppurple .progressbar span { + background-color: #673ab7; +} +.progressbar-infinite.theme-deeppurple, +.theme-deeppurple .progressbar-infinite { + background-color: rgba(103, 58, 183, 0.5); +} +.progressbar-infinite.theme-deeppurple:after, +.theme-deeppurple .progressbar-infinite:after, +.progressbar-infinite.theme-deeppurple:before, +.theme-deeppurple .progressbar-infinite:before { + background-color: #673ab7; +} +.color-deeppurple i.icon, +i.icon.color-deeppurple { + color: #673ab7; +} +i.icon-next.color-deeppurple, +i.icon-next.theme-deeppurple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23673ab7'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-deeppurple, +i.icon-prev.theme-deeppurple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23673ab7'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-deeppurple, +i.icon-back.theme-deeppurple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-deeppurple, +i.icon-forward.theme-deeppurple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-deeppurple, +i.icon-bars.theme-deeppurple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E"); +} +.theme-deeppurple a, +.theme-deeppurple .card a { + color: #673ab7; +} +.theme-deeppurple .navbar, +.navbar.theme-deeppurple, +.theme-deeppurple .toolbar, +.toolbar.theme-deeppurple, +.theme-deeppurple .subnavbar, +.subnavbar.theme-deeppurple, +.theme-deeppurple .searchbar, +.searchbar.theme-deeppurple { + background-color: #673ab7; +} +.theme-deeppurple .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-deeppurple input[type="checkbox"]:checked + .checkbox { + background-color: rgba(103, 58, 183, 0.5); +} +.theme-deeppurple .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-deeppurple input[type="checkbox"]:checked + .checkbox:after { + background-color: #673ab7; +} +.theme-deeppurple label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-deeppurple i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-deeppurple label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-deeppurple input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-deeppurple label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-deeppurple input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-deeppurple label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-deeppurple input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-deeppurple label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-deeppurple input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-deeppurple label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-deeppurple input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-deeppurple label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-deeppurple input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #673ab7; + background-color: #673ab7; +} +.theme-deeppurple label.label-radio i.icon-form-radio:after, +label.label-radio.theme-deeppurple i.icon-form-radio:after { + background-color: #673ab7; +} +.theme-deeppurple label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-deeppurple input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-deeppurple label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-deeppurple input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-deeppurple label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-deeppurple input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-deeppurple label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-deeppurple input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-deeppurple label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-deeppurple input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-deeppurple label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-deeppurple input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #673ab7; +} +.theme-deeppurple label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-deeppurple input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-deeppurple label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-deeppurple input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-deeppurple label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-deeppurple input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-deeppurple label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-deeppurple input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-deeppurple label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-deeppurple input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-deeppurple label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-deeppurple input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #673ab7; +} +.theme-deeppurple .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-deeppurple input[type="checkbox"]:checked ~ i { + border-color: #673ab7; + background-color: #673ab7; +} +.theme-deeppurple .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-deeppurple input[type="radio"]:checked ~ i { + border-color: #673ab7; +} +.theme-deeppurple .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-deeppurple input[type="radio"]:checked ~ i:after { + background-color: #673ab7; +} +.theme-deeppurple .form-checkbox .ripple-wave, +.theme-deeppurple .form-radio .ripple-wave { + background: rgba(103, 58, 183, 0.5); +} +.theme-deeppurple .focus-state .label, +.theme-deeppurple .focus-state .floating-label { + color: #673ab7; +} +.theme-deeppurple .item-input-field.focus-state:after, +.theme-deeppurple .input-field.focus-state:after, +.theme-deeppurple .item-input-field.not-empty-state:after, +.theme-deeppurple .input-field.not-empty-state:after { + background: #673ab7; +} +.theme-deeppurple .picker-calendar-day.picker-calendar-day-today span { + color: #673ab7; +} +.theme-deeppurple .picker-calendar-day.picker-calendar-day-selected span { + background-color: #673ab7; + color: #fff; +} +.theme-deeppurple .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #673ab7; +} +.theme-deeppurple .picker-header { + background-color: #673ab7; +} +.theme-deeppurple .modal-button { + color: #673ab7; +} +.theme-deeppurple .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-deeppurple .timeline-item-date { + background-color: #673ab7; +} +.theme-deeppurple .timeline-year-title, +.theme-deeppurple .timeline-month-title { + background-color: #673ab7; +} +.theme-deeppurple .statusbar-overlay { + background-color: #311B92; +} +.theme-deeppurple .data-table .data-table-header-selected, +.data-table.theme-deeppurple .data-table-header-selected { + background: rgba(103, 58, 183, 0.1); +} +.theme-deeppurple .data-table .data-table-title-selected, +.data-table.theme-deeppurple .data-table-title-selected { + color: #673ab7; +} +.swiper-pagination.color-deeppurple .swiper-pagination-bullet-active, +.theme-deeppurple .swiper-pagination .swiper-pagination-bullet-active { + background-color: #673ab7; +} +.swiper-pagination.color-deeppurple .swiper-pagination-progressbar, +.theme-deeppurple .swiper-pagination .swiper-pagination-progressbar { + background-color: #673ab7; +} +.swiper-pagination.swiper-pagination-progress.bg-deeppurple { + background-color: rgba(103, 58, 183, 0.25); +} +.swiper-button-next.color-deeppurple, +.swiper-container-rtl .swiper-button-prev.color-deeppurple, +.theme-deeppurple .swiper-button-next, +.theme-deeppurple .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-deeppurple, +.swiper-container-rtl .swiper-button-next.color-deeppurple, +.theme-deeppurple .swiper-button-prev, +.theme-deeppurple .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E"); +} +.theme-deeppurple .floating-button, +.theme-deeppurple .speed-dial-buttons a, +.floating-button.theme-deeppurple, +.speed-dial-buttons a.theme-deeppurple { + color: #fff; + background: #673ab7; +} +html:not(.watch-active-state) .theme-deeppurple .floating-button:active, +html:not(.watch-active-state) .theme-deeppurple .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-deeppurple:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-deeppurple:active, +.theme-deeppurple .floating-button.active-state, +.theme-deeppurple .speed-dial-buttons a.active-state, +.floating-button.theme-deeppurple.active-state, +.speed-dial-buttons a.theme-deeppurple.active-state { + background: #512DA8; +} +.theme-deeppurple .floating-button i, +.theme-deeppurple .speed-dial-buttons a i, +.floating-button.theme-deeppurple i, +.speed-dial-buttons a.theme-deeppurple i { + color: inherit; +} +.theme-deeppurple .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-deeppurple input[type="range"]::-webkit-slider-thumb:before { + background-color: #673ab7; +} +.theme-deeppurple .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-deeppurple input[type="range"]::-webkit-slider-thumb { + background-color: #673ab7; +} +.theme-deeppurple .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-deeppurple input[type="range"]::-ms-thumb { + background-color: #673ab7; +} +.theme-deeppurple .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-deeppurple input[type="range"]::-ms-fill-lower { + background-color: #673ab7; +} +.theme-deeppurple .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-deeppurple input[type="range"]::-moz-range-thumb { + background-color: #673ab7; +} +.badge.theme-deeppurple { + background-color: #673ab7; + color: #fff; +} +.theme-indigo .button:not(.button-fill) { + color: #3f51b5; +} +.theme-indigo .navbar .button:not(.button-fill), +.theme-indigo.navbar .button:not(.button-fill), +.theme-indigo .toolbar .button:not(.button-fill), +.theme-indigo.toolbar .button:not(.button-fill), +.theme-indigo .subnavbar .button:not(.button-fill), +.theme-indigo.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-indigo .button.button-fill { + background: #3f51b5; + color: #fff; +} +html:not(.watch-active-state) .theme-indigo .button.button-fill:active, +.theme-indigo .button.button-fill.active-state { + background: #303F9F; +} +.progressbar.theme-indigo, +.theme-indigo .progressbar { + background-color: rgba(63, 81, 181, 0.5); +} +.progressbar.theme-indigo span, +.theme-indigo .progressbar span { + background-color: #3f51b5; +} +.progressbar-infinite.theme-indigo, +.theme-indigo .progressbar-infinite { + background-color: rgba(63, 81, 181, 0.5); +} +.progressbar-infinite.theme-indigo:after, +.theme-indigo .progressbar-infinite:after, +.progressbar-infinite.theme-indigo:before, +.theme-indigo .progressbar-infinite:before { + background-color: #3f51b5; +} +.color-indigo i.icon, +i.icon.color-indigo { + color: #3f51b5; +} +i.icon-next.color-indigo, +i.icon-next.theme-indigo { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%233f51b5'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-indigo, +i.icon-prev.theme-indigo { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%233f51b5'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-indigo, +i.icon-back.theme-indigo { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-indigo, +i.icon-forward.theme-indigo { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-indigo, +i.icon-bars.theme-indigo { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E"); +} +.theme-indigo a, +.theme-indigo .card a { + color: #3f51b5; +} +.theme-indigo .navbar, +.navbar.theme-indigo, +.theme-indigo .toolbar, +.toolbar.theme-indigo, +.theme-indigo .subnavbar, +.subnavbar.theme-indigo, +.theme-indigo .searchbar, +.searchbar.theme-indigo { + background-color: #3f51b5; +} +.theme-indigo .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-indigo input[type="checkbox"]:checked + .checkbox { + background-color: rgba(63, 81, 181, 0.5); +} +.theme-indigo .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-indigo input[type="checkbox"]:checked + .checkbox:after { + background-color: #3f51b5; +} +.theme-indigo label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-indigo i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-indigo label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-indigo input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-indigo label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-indigo input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-indigo label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-indigo input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-indigo label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-indigo input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-indigo label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-indigo input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-indigo label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-indigo input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #3f51b5; + background-color: #3f51b5; +} +.theme-indigo label.label-radio i.icon-form-radio:after, +label.label-radio.theme-indigo i.icon-form-radio:after { + background-color: #3f51b5; +} +.theme-indigo label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-indigo input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-indigo label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-indigo input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-indigo label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-indigo input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-indigo label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-indigo input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-indigo label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-indigo input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-indigo label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-indigo input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #3f51b5; +} +.theme-indigo label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-indigo input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-indigo label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-indigo input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-indigo label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-indigo input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-indigo label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-indigo input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-indigo label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-indigo input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-indigo label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-indigo input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #3f51b5; +} +.theme-indigo .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-indigo input[type="checkbox"]:checked ~ i { + border-color: #3f51b5; + background-color: #3f51b5; +} +.theme-indigo .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-indigo input[type="radio"]:checked ~ i { + border-color: #3f51b5; +} +.theme-indigo .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-indigo input[type="radio"]:checked ~ i:after { + background-color: #3f51b5; +} +.theme-indigo .form-checkbox .ripple-wave, +.theme-indigo .form-radio .ripple-wave { + background: rgba(63, 81, 181, 0.5); +} +.theme-indigo .focus-state .label, +.theme-indigo .focus-state .floating-label { + color: #3f51b5; +} +.theme-indigo .item-input-field.focus-state:after, +.theme-indigo .input-field.focus-state:after, +.theme-indigo .item-input-field.not-empty-state:after, +.theme-indigo .input-field.not-empty-state:after { + background: #3f51b5; +} +.theme-indigo .picker-calendar-day.picker-calendar-day-today span { + color: #3f51b5; +} +.theme-indigo .picker-calendar-day.picker-calendar-day-selected span { + background-color: #3f51b5; + color: #fff; +} +.theme-indigo .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #3f51b5; +} +.theme-indigo .picker-header { + background-color: #3f51b5; +} +.theme-indigo .modal-button { + color: #3f51b5; +} +.theme-indigo .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-indigo .timeline-item-date { + background-color: #3f51b5; +} +.theme-indigo .timeline-year-title, +.theme-indigo .timeline-month-title { + background-color: #3f51b5; +} +.theme-indigo .statusbar-overlay { + background-color: #1A237E; +} +.theme-indigo .data-table .data-table-header-selected, +.data-table.theme-indigo .data-table-header-selected { + background: rgba(63, 81, 181, 0.1); +} +.theme-indigo .data-table .data-table-title-selected, +.data-table.theme-indigo .data-table-title-selected { + color: #3f51b5; +} +.swiper-pagination.color-indigo .swiper-pagination-bullet-active, +.theme-indigo .swiper-pagination .swiper-pagination-bullet-active { + background-color: #3f51b5; +} +.swiper-pagination.color-indigo .swiper-pagination-progressbar, +.theme-indigo .swiper-pagination .swiper-pagination-progressbar { + background-color: #3f51b5; +} +.swiper-pagination.swiper-pagination-progress.bg-indigo { + background-color: rgba(63, 81, 181, 0.25); +} +.swiper-button-next.color-indigo, +.swiper-container-rtl .swiper-button-prev.color-indigo, +.theme-indigo .swiper-button-next, +.theme-indigo .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-indigo, +.swiper-container-rtl .swiper-button-next.color-indigo, +.theme-indigo .swiper-button-prev, +.theme-indigo .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E"); +} +.theme-indigo .floating-button, +.theme-indigo .speed-dial-buttons a, +.floating-button.theme-indigo, +.speed-dial-buttons a.theme-indigo { + color: #fff; + background: #3f51b5; +} +html:not(.watch-active-state) .theme-indigo .floating-button:active, +html:not(.watch-active-state) .theme-indigo .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-indigo:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-indigo:active, +.theme-indigo .floating-button.active-state, +.theme-indigo .speed-dial-buttons a.active-state, +.floating-button.theme-indigo.active-state, +.speed-dial-buttons a.theme-indigo.active-state { + background: #303F9F; +} +.theme-indigo .floating-button i, +.theme-indigo .speed-dial-buttons a i, +.floating-button.theme-indigo i, +.speed-dial-buttons a.theme-indigo i { + color: inherit; +} +.theme-indigo .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-indigo input[type="range"]::-webkit-slider-thumb:before { + background-color: #3f51b5; +} +.theme-indigo .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-indigo input[type="range"]::-webkit-slider-thumb { + background-color: #3f51b5; +} +.theme-indigo .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-indigo input[type="range"]::-ms-thumb { + background-color: #3f51b5; +} +.theme-indigo .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-indigo input[type="range"]::-ms-fill-lower { + background-color: #3f51b5; +} +.theme-indigo .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-indigo input[type="range"]::-moz-range-thumb { + background-color: #3f51b5; +} +.badge.theme-indigo { + background-color: #3f51b5; + color: #fff; +} +.theme-blue .button:not(.button-fill) { + color: #2196f3; +} +.theme-blue .navbar .button:not(.button-fill), +.theme-blue.navbar .button:not(.button-fill), +.theme-blue .toolbar .button:not(.button-fill), +.theme-blue.toolbar .button:not(.button-fill), +.theme-blue .subnavbar .button:not(.button-fill), +.theme-blue.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-blue .button.button-fill { + background: #2196f3; + color: #fff; +} +html:not(.watch-active-state) .theme-blue .button.button-fill:active, +.theme-blue .button.button-fill.active-state { + background: #1976D2; +} +.progressbar.theme-blue, +.theme-blue .progressbar { + background-color: rgba(33, 150, 243, 0.5); +} +.progressbar.theme-blue span, +.theme-blue .progressbar span { + background-color: #2196f3; +} +.progressbar-infinite.theme-blue, +.theme-blue .progressbar-infinite { + background-color: rgba(33, 150, 243, 0.5); +} +.progressbar-infinite.theme-blue:after, +.theme-blue .progressbar-infinite:after, +.progressbar-infinite.theme-blue:before, +.theme-blue .progressbar-infinite:before { + background-color: #2196f3; +} +.color-blue i.icon, +i.icon.color-blue { + color: #2196f3; +} +i.icon-next.color-blue, +i.icon-next.theme-blue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%232196f3'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-blue, +i.icon-prev.theme-blue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%232196f3'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-blue, +i.icon-back.theme-blue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-blue, +i.icon-forward.theme-blue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-blue, +i.icon-bars.theme-blue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E"); +} +.theme-blue a, +.theme-blue .card a { + color: #2196f3; +} +.theme-blue .navbar, +.navbar.theme-blue, +.theme-blue .toolbar, +.toolbar.theme-blue, +.theme-blue .subnavbar, +.subnavbar.theme-blue, +.theme-blue .searchbar, +.searchbar.theme-blue { + background-color: #2196f3; +} +.theme-blue .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-blue input[type="checkbox"]:checked + .checkbox { + background-color: rgba(33, 150, 243, 0.5); +} +.theme-blue .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-blue input[type="checkbox"]:checked + .checkbox:after { + background-color: #2196f3; +} +.theme-blue label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-blue i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-blue label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-blue input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-blue label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-blue input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-blue label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-blue input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-blue label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-blue input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-blue label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-blue input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-blue label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-blue input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #2196f3; + background-color: #2196f3; +} +.theme-blue label.label-radio i.icon-form-radio:after, +label.label-radio.theme-blue i.icon-form-radio:after { + background-color: #2196f3; +} +.theme-blue label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-blue input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-blue label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-blue input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-blue label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-blue input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-blue label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-blue input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-blue label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-blue input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-blue label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-blue input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #2196f3; +} +.theme-blue label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-blue input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-blue label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-blue input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-blue label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-blue input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-blue label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-blue input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-blue label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-blue input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-blue label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-blue input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #2196f3; +} +.theme-blue .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-blue input[type="checkbox"]:checked ~ i { + border-color: #2196f3; + background-color: #2196f3; +} +.theme-blue .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-blue input[type="radio"]:checked ~ i { + border-color: #2196f3; +} +.theme-blue .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-blue input[type="radio"]:checked ~ i:after { + background-color: #2196f3; +} +.theme-blue .form-checkbox .ripple-wave, +.theme-blue .form-radio .ripple-wave { + background: rgba(33, 150, 243, 0.5); +} +.theme-blue .focus-state .label, +.theme-blue .focus-state .floating-label { + color: #2196f3; +} +.theme-blue .item-input-field.focus-state:after, +.theme-blue .input-field.focus-state:after, +.theme-blue .item-input-field.not-empty-state:after, +.theme-blue .input-field.not-empty-state:after { + background: #2196f3; +} +.theme-blue .picker-calendar-day.picker-calendar-day-today span { + color: #2196f3; +} +.theme-blue .picker-calendar-day.picker-calendar-day-selected span { + background-color: #2196f3; + color: #fff; +} +.theme-blue .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #2196f3; +} +.theme-blue .picker-header { + background-color: #2196f3; +} +.theme-blue .modal-button { + color: #2196f3; +} +.theme-blue .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-blue .timeline-item-date { + background-color: #2196f3; +} +.theme-blue .timeline-year-title, +.theme-blue .timeline-month-title { + background-color: #2196f3; +} +.theme-blue .statusbar-overlay { + background-color: #0D47A1; +} +.theme-blue .data-table .data-table-header-selected, +.data-table.theme-blue .data-table-header-selected { + background: rgba(33, 150, 243, 0.1); +} +.theme-blue .data-table .data-table-title-selected, +.data-table.theme-blue .data-table-title-selected { + color: #2196f3; +} +.swiper-pagination.color-blue .swiper-pagination-bullet-active, +.theme-blue .swiper-pagination .swiper-pagination-bullet-active { + background-color: #2196f3; +} +.swiper-pagination.color-blue .swiper-pagination-progressbar, +.theme-blue .swiper-pagination .swiper-pagination-progressbar { + background-color: #2196f3; +} +.swiper-pagination.swiper-pagination-progress.bg-blue { + background-color: rgba(33, 150, 243, 0.25); +} +.swiper-button-next.color-blue, +.swiper-container-rtl .swiper-button-prev.color-blue, +.theme-blue .swiper-button-next, +.theme-blue .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-blue, +.swiper-container-rtl .swiper-button-next.color-blue, +.theme-blue .swiper-button-prev, +.theme-blue .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E"); +} +.theme-blue .floating-button, +.theme-blue .speed-dial-buttons a, +.floating-button.theme-blue, +.speed-dial-buttons a.theme-blue { + color: #fff; + background: #2196f3; +} +html:not(.watch-active-state) .theme-blue .floating-button:active, +html:not(.watch-active-state) .theme-blue .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-blue:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-blue:active, +.theme-blue .floating-button.active-state, +.theme-blue .speed-dial-buttons a.active-state, +.floating-button.theme-blue.active-state, +.speed-dial-buttons a.theme-blue.active-state { + background: #1976D2; +} +.theme-blue .floating-button i, +.theme-blue .speed-dial-buttons a i, +.floating-button.theme-blue i, +.speed-dial-buttons a.theme-blue i { + color: inherit; +} +.theme-blue .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-blue input[type="range"]::-webkit-slider-thumb:before { + background-color: #2196f3; +} +.theme-blue .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-blue input[type="range"]::-webkit-slider-thumb { + background-color: #2196f3; +} +.theme-blue .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-blue input[type="range"]::-ms-thumb { + background-color: #2196f3; +} +.theme-blue .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-blue input[type="range"]::-ms-fill-lower { + background-color: #2196f3; +} +.theme-blue .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-blue input[type="range"]::-moz-range-thumb { + background-color: #2196f3; +} +.badge.theme-blue { + background-color: #2196f3; + color: #fff; +} +.theme-lightblue .button:not(.button-fill) { + color: #03a9f4; +} +.theme-lightblue .navbar .button:not(.button-fill), +.theme-lightblue.navbar .button:not(.button-fill), +.theme-lightblue .toolbar .button:not(.button-fill), +.theme-lightblue.toolbar .button:not(.button-fill), +.theme-lightblue .subnavbar .button:not(.button-fill), +.theme-lightblue.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-lightblue .button.button-fill { + background: #03a9f4; + color: #fff; +} +html:not(.watch-active-state) .theme-lightblue .button.button-fill:active, +.theme-lightblue .button.button-fill.active-state { + background: #0288D1; +} +.progressbar.theme-lightblue, +.theme-lightblue .progressbar { + background-color: rgba(3, 169, 244, 0.5); +} +.progressbar.theme-lightblue span, +.theme-lightblue .progressbar span { + background-color: #03a9f4; +} +.progressbar-infinite.theme-lightblue, +.theme-lightblue .progressbar-infinite { + background-color: rgba(3, 169, 244, 0.5); +} +.progressbar-infinite.theme-lightblue:after, +.theme-lightblue .progressbar-infinite:after, +.progressbar-infinite.theme-lightblue:before, +.theme-lightblue .progressbar-infinite:before { + background-color: #03a9f4; +} +.color-lightblue i.icon, +i.icon.color-lightblue { + color: #03a9f4; +} +i.icon-next.color-lightblue, +i.icon-next.theme-lightblue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2303a9f4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-lightblue, +i.icon-prev.theme-lightblue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2303a9f4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-lightblue, +i.icon-back.theme-lightblue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-lightblue, +i.icon-forward.theme-lightblue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-lightblue, +i.icon-bars.theme-lightblue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E"); +} +.theme-lightblue a, +.theme-lightblue .card a { + color: #03a9f4; +} +.theme-lightblue .navbar, +.navbar.theme-lightblue, +.theme-lightblue .toolbar, +.toolbar.theme-lightblue, +.theme-lightblue .subnavbar, +.subnavbar.theme-lightblue, +.theme-lightblue .searchbar, +.searchbar.theme-lightblue { + background-color: #03a9f4; +} +.theme-lightblue .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-lightblue input[type="checkbox"]:checked + .checkbox { + background-color: rgba(3, 169, 244, 0.5); +} +.theme-lightblue .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-lightblue input[type="checkbox"]:checked + .checkbox:after { + background-color: #03a9f4; +} +.theme-lightblue label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-lightblue i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-lightblue label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-lightblue input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-lightblue label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-lightblue input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-lightblue label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-lightblue input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-lightblue label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-lightblue input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-lightblue label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-lightblue input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-lightblue label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-lightblue input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #03a9f4; + background-color: #03a9f4; +} +.theme-lightblue label.label-radio i.icon-form-radio:after, +label.label-radio.theme-lightblue i.icon-form-radio:after { + background-color: #03a9f4; +} +.theme-lightblue label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-lightblue input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-lightblue label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-lightblue input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-lightblue label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-lightblue input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-lightblue label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-lightblue input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-lightblue label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-lightblue input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-lightblue label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-lightblue input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #03a9f4; +} +.theme-lightblue label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-lightblue input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-lightblue label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-lightblue input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-lightblue label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-lightblue input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-lightblue label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-lightblue input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-lightblue label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-lightblue input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-lightblue label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-lightblue input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #03a9f4; +} +.theme-lightblue .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-lightblue input[type="checkbox"]:checked ~ i { + border-color: #03a9f4; + background-color: #03a9f4; +} +.theme-lightblue .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-lightblue input[type="radio"]:checked ~ i { + border-color: #03a9f4; +} +.theme-lightblue .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-lightblue input[type="radio"]:checked ~ i:after { + background-color: #03a9f4; +} +.theme-lightblue .form-checkbox .ripple-wave, +.theme-lightblue .form-radio .ripple-wave { + background: rgba(3, 169, 244, 0.5); +} +.theme-lightblue .focus-state .label, +.theme-lightblue .focus-state .floating-label { + color: #03a9f4; +} +.theme-lightblue .item-input-field.focus-state:after, +.theme-lightblue .input-field.focus-state:after, +.theme-lightblue .item-input-field.not-empty-state:after, +.theme-lightblue .input-field.not-empty-state:after { + background: #03a9f4; +} +.theme-lightblue .picker-calendar-day.picker-calendar-day-today span { + color: #03a9f4; +} +.theme-lightblue .picker-calendar-day.picker-calendar-day-selected span { + background-color: #03a9f4; + color: #fff; +} +.theme-lightblue .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #03a9f4; +} +.theme-lightblue .picker-header { + background-color: #03a9f4; +} +.theme-lightblue .modal-button { + color: #03a9f4; +} +.theme-lightblue .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-lightblue .timeline-item-date { + background-color: #03a9f4; +} +.theme-lightblue .timeline-year-title, +.theme-lightblue .timeline-month-title { + background-color: #03a9f4; +} +.theme-lightblue .statusbar-overlay { + background-color: #01579B; +} +.theme-lightblue .data-table .data-table-header-selected, +.data-table.theme-lightblue .data-table-header-selected { + background: rgba(3, 169, 244, 0.1); +} +.theme-lightblue .data-table .data-table-title-selected, +.data-table.theme-lightblue .data-table-title-selected { + color: #03a9f4; +} +.swiper-pagination.color-lightblue .swiper-pagination-bullet-active, +.theme-lightblue .swiper-pagination .swiper-pagination-bullet-active { + background-color: #03a9f4; +} +.swiper-pagination.color-lightblue .swiper-pagination-progressbar, +.theme-lightblue .swiper-pagination .swiper-pagination-progressbar { + background-color: #03a9f4; +} +.swiper-pagination.swiper-pagination-progress.bg-lightblue { + background-color: rgba(3, 169, 244, 0.25); +} +.swiper-button-next.color-lightblue, +.swiper-container-rtl .swiper-button-prev.color-lightblue, +.theme-lightblue .swiper-button-next, +.theme-lightblue .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-lightblue, +.swiper-container-rtl .swiper-button-next.color-lightblue, +.theme-lightblue .swiper-button-prev, +.theme-lightblue .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E"); +} +.theme-lightblue .floating-button, +.theme-lightblue .speed-dial-buttons a, +.floating-button.theme-lightblue, +.speed-dial-buttons a.theme-lightblue { + color: #fff; + background: #03a9f4; +} +html:not(.watch-active-state) .theme-lightblue .floating-button:active, +html:not(.watch-active-state) .theme-lightblue .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-lightblue:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-lightblue:active, +.theme-lightblue .floating-button.active-state, +.theme-lightblue .speed-dial-buttons a.active-state, +.floating-button.theme-lightblue.active-state, +.speed-dial-buttons a.theme-lightblue.active-state { + background: #0288D1; +} +.theme-lightblue .floating-button i, +.theme-lightblue .speed-dial-buttons a i, +.floating-button.theme-lightblue i, +.speed-dial-buttons a.theme-lightblue i { + color: inherit; +} +.theme-lightblue .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-lightblue input[type="range"]::-webkit-slider-thumb:before { + background-color: #03a9f4; +} +.theme-lightblue .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-lightblue input[type="range"]::-webkit-slider-thumb { + background-color: #03a9f4; +} +.theme-lightblue .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-lightblue input[type="range"]::-ms-thumb { + background-color: #03a9f4; +} +.theme-lightblue .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-lightblue input[type="range"]::-ms-fill-lower { + background-color: #03a9f4; +} +.theme-lightblue .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-lightblue input[type="range"]::-moz-range-thumb { + background-color: #03a9f4; +} +.badge.theme-lightblue { + background-color: #03a9f4; + color: #fff; +} +.theme-cyan .button:not(.button-fill) { + color: #00bcd4; +} +.theme-cyan .navbar .button:not(.button-fill), +.theme-cyan.navbar .button:not(.button-fill), +.theme-cyan .toolbar .button:not(.button-fill), +.theme-cyan.toolbar .button:not(.button-fill), +.theme-cyan .subnavbar .button:not(.button-fill), +.theme-cyan.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-cyan .button.button-fill { + background: #00bcd4; + color: #fff; +} +html:not(.watch-active-state) .theme-cyan .button.button-fill:active, +.theme-cyan .button.button-fill.active-state { + background: #0097A7; +} +.progressbar.theme-cyan, +.theme-cyan .progressbar { + background-color: rgba(0, 188, 212, 0.5); +} +.progressbar.theme-cyan span, +.theme-cyan .progressbar span { + background-color: #00bcd4; +} +.progressbar-infinite.theme-cyan, +.theme-cyan .progressbar-infinite { + background-color: rgba(0, 188, 212, 0.5); +} +.progressbar-infinite.theme-cyan:after, +.theme-cyan .progressbar-infinite:after, +.progressbar-infinite.theme-cyan:before, +.theme-cyan .progressbar-infinite:before { + background-color: #00bcd4; +} +.color-cyan i.icon, +i.icon.color-cyan { + color: #00bcd4; +} +i.icon-next.color-cyan, +i.icon-next.theme-cyan { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2300bcd4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-cyan, +i.icon-prev.theme-cyan { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2300bcd4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-cyan, +i.icon-back.theme-cyan { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-cyan, +i.icon-forward.theme-cyan { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-cyan, +i.icon-bars.theme-cyan { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E"); +} +.theme-cyan a, +.theme-cyan .card a { + color: #00bcd4; +} +.theme-cyan .navbar, +.navbar.theme-cyan, +.theme-cyan .toolbar, +.toolbar.theme-cyan, +.theme-cyan .subnavbar, +.subnavbar.theme-cyan, +.theme-cyan .searchbar, +.searchbar.theme-cyan { + background-color: #00bcd4; +} +.theme-cyan .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-cyan input[type="checkbox"]:checked + .checkbox { + background-color: rgba(0, 188, 212, 0.5); +} +.theme-cyan .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-cyan input[type="checkbox"]:checked + .checkbox:after { + background-color: #00bcd4; +} +.theme-cyan label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-cyan i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-cyan label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-cyan input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-cyan label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-cyan input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-cyan label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-cyan input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-cyan label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-cyan input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-cyan label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-cyan input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-cyan label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-cyan input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #00bcd4; + background-color: #00bcd4; +} +.theme-cyan label.label-radio i.icon-form-radio:after, +label.label-radio.theme-cyan i.icon-form-radio:after { + background-color: #00bcd4; +} +.theme-cyan label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-cyan input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-cyan label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-cyan input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-cyan label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-cyan input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-cyan label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-cyan input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-cyan label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-cyan input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-cyan label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-cyan input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #00bcd4; +} +.theme-cyan label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-cyan input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-cyan label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-cyan input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-cyan label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-cyan input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-cyan label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-cyan input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-cyan label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-cyan input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-cyan label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-cyan input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #00bcd4; +} +.theme-cyan .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-cyan input[type="checkbox"]:checked ~ i { + border-color: #00bcd4; + background-color: #00bcd4; +} +.theme-cyan .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-cyan input[type="radio"]:checked ~ i { + border-color: #00bcd4; +} +.theme-cyan .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-cyan input[type="radio"]:checked ~ i:after { + background-color: #00bcd4; +} +.theme-cyan .form-checkbox .ripple-wave, +.theme-cyan .form-radio .ripple-wave { + background: rgba(0, 188, 212, 0.5); +} +.theme-cyan .focus-state .label, +.theme-cyan .focus-state .floating-label { + color: #00bcd4; +} +.theme-cyan .item-input-field.focus-state:after, +.theme-cyan .input-field.focus-state:after, +.theme-cyan .item-input-field.not-empty-state:after, +.theme-cyan .input-field.not-empty-state:after { + background: #00bcd4; +} +.theme-cyan .picker-calendar-day.picker-calendar-day-today span { + color: #00bcd4; +} +.theme-cyan .picker-calendar-day.picker-calendar-day-selected span { + background-color: #00bcd4; + color: #fff; +} +.theme-cyan .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #00bcd4; +} +.theme-cyan .picker-header { + background-color: #00bcd4; +} +.theme-cyan .modal-button { + color: #00bcd4; +} +.theme-cyan .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-cyan .timeline-item-date { + background-color: #00bcd4; +} +.theme-cyan .timeline-year-title, +.theme-cyan .timeline-month-title { + background-color: #00bcd4; +} +.theme-cyan .statusbar-overlay { + background-color: #006064; +} +.theme-cyan .data-table .data-table-header-selected, +.data-table.theme-cyan .data-table-header-selected { + background: rgba(0, 188, 212, 0.1); +} +.theme-cyan .data-table .data-table-title-selected, +.data-table.theme-cyan .data-table-title-selected { + color: #00bcd4; +} +.swiper-pagination.color-cyan .swiper-pagination-bullet-active, +.theme-cyan .swiper-pagination .swiper-pagination-bullet-active { + background-color: #00bcd4; +} +.swiper-pagination.color-cyan .swiper-pagination-progressbar, +.theme-cyan .swiper-pagination .swiper-pagination-progressbar { + background-color: #00bcd4; +} +.swiper-pagination.swiper-pagination-progress.bg-cyan { + background-color: rgba(0, 188, 212, 0.25); +} +.swiper-button-next.color-cyan, +.swiper-container-rtl .swiper-button-prev.color-cyan, +.theme-cyan .swiper-button-next, +.theme-cyan .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-cyan, +.swiper-container-rtl .swiper-button-next.color-cyan, +.theme-cyan .swiper-button-prev, +.theme-cyan .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E"); +} +.theme-cyan .floating-button, +.theme-cyan .speed-dial-buttons a, +.floating-button.theme-cyan, +.speed-dial-buttons a.theme-cyan { + color: #fff; + background: #00bcd4; +} +html:not(.watch-active-state) .theme-cyan .floating-button:active, +html:not(.watch-active-state) .theme-cyan .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-cyan:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-cyan:active, +.theme-cyan .floating-button.active-state, +.theme-cyan .speed-dial-buttons a.active-state, +.floating-button.theme-cyan.active-state, +.speed-dial-buttons a.theme-cyan.active-state { + background: #0097A7; +} +.theme-cyan .floating-button i, +.theme-cyan .speed-dial-buttons a i, +.floating-button.theme-cyan i, +.speed-dial-buttons a.theme-cyan i { + color: inherit; +} +.theme-cyan .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-cyan input[type="range"]::-webkit-slider-thumb:before { + background-color: #00bcd4; +} +.theme-cyan .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-cyan input[type="range"]::-webkit-slider-thumb { + background-color: #00bcd4; +} +.theme-cyan .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-cyan input[type="range"]::-ms-thumb { + background-color: #00bcd4; +} +.theme-cyan .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-cyan input[type="range"]::-ms-fill-lower { + background-color: #00bcd4; +} +.theme-cyan .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-cyan input[type="range"]::-moz-range-thumb { + background-color: #00bcd4; +} +.badge.theme-cyan { + background-color: #00bcd4; + color: #fff; +} +.theme-teal .button:not(.button-fill) { + color: #009688; +} +.theme-teal .navbar .button:not(.button-fill), +.theme-teal.navbar .button:not(.button-fill), +.theme-teal .toolbar .button:not(.button-fill), +.theme-teal.toolbar .button:not(.button-fill), +.theme-teal .subnavbar .button:not(.button-fill), +.theme-teal.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-teal .button.button-fill { + background: #009688; + color: #fff; +} +html:not(.watch-active-state) .theme-teal .button.button-fill:active, +.theme-teal .button.button-fill.active-state { + background: #00897B; +} +.progressbar.theme-teal, +.theme-teal .progressbar { + background-color: rgba(0, 150, 136, 0.5); +} +.progressbar.theme-teal span, +.theme-teal .progressbar span { + background-color: #009688; +} +.progressbar-infinite.theme-teal, +.theme-teal .progressbar-infinite { + background-color: rgba(0, 150, 136, 0.5); +} +.progressbar-infinite.theme-teal:after, +.theme-teal .progressbar-infinite:after, +.progressbar-infinite.theme-teal:before, +.theme-teal .progressbar-infinite:before { + background-color: #009688; +} +.color-teal i.icon, +i.icon.color-teal { + color: #009688; +} +i.icon-next.color-teal, +i.icon-next.theme-teal { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23009688'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-teal, +i.icon-prev.theme-teal { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23009688'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-teal, +i.icon-back.theme-teal { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-teal, +i.icon-forward.theme-teal { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-teal, +i.icon-bars.theme-teal { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E"); +} +.theme-teal a, +.theme-teal .card a { + color: #009688; +} +.theme-teal .navbar, +.navbar.theme-teal, +.theme-teal .toolbar, +.toolbar.theme-teal, +.theme-teal .subnavbar, +.subnavbar.theme-teal, +.theme-teal .searchbar, +.searchbar.theme-teal { + background-color: #009688; +} +.theme-teal .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-teal input[type="checkbox"]:checked + .checkbox { + background-color: rgba(0, 150, 136, 0.5); +} +.theme-teal .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-teal input[type="checkbox"]:checked + .checkbox:after { + background-color: #009688; +} +.theme-teal label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-teal i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-teal label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-teal input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-teal label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-teal input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-teal label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-teal input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-teal label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-teal input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-teal label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-teal input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-teal label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-teal input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #009688; + background-color: #009688; +} +.theme-teal label.label-radio i.icon-form-radio:after, +label.label-radio.theme-teal i.icon-form-radio:after { + background-color: #009688; +} +.theme-teal label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-teal input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-teal label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-teal input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-teal label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-teal input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-teal label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-teal input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-teal label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-teal input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-teal label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-teal input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #009688; +} +.theme-teal label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-teal input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-teal label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-teal input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-teal label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-teal input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-teal label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-teal input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-teal label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-teal input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-teal label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-teal input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #009688; +} +.theme-teal .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-teal input[type="checkbox"]:checked ~ i { + border-color: #009688; + background-color: #009688; +} +.theme-teal .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-teal input[type="radio"]:checked ~ i { + border-color: #009688; +} +.theme-teal .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-teal input[type="radio"]:checked ~ i:after { + background-color: #009688; +} +.theme-teal .form-checkbox .ripple-wave, +.theme-teal .form-radio .ripple-wave { + background: rgba(0, 150, 136, 0.5); +} +.theme-teal .focus-state .label, +.theme-teal .focus-state .floating-label { + color: #009688; +} +.theme-teal .item-input-field.focus-state:after, +.theme-teal .input-field.focus-state:after, +.theme-teal .item-input-field.not-empty-state:after, +.theme-teal .input-field.not-empty-state:after { + background: #009688; +} +.theme-teal .picker-calendar-day.picker-calendar-day-today span { + color: #009688; +} +.theme-teal .picker-calendar-day.picker-calendar-day-selected span { + background-color: #009688; + color: #fff; +} +.theme-teal .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #009688; +} +.theme-teal .picker-header { + background-color: #009688; +} +.theme-teal .modal-button { + color: #009688; +} +.theme-teal .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-teal .timeline-item-date { + background-color: #009688; +} +.theme-teal .timeline-year-title, +.theme-teal .timeline-month-title { + background-color: #009688; +} +.theme-teal .statusbar-overlay { + background-color: #004D40; +} +.theme-teal .data-table .data-table-header-selected, +.data-table.theme-teal .data-table-header-selected { + background: rgba(0, 150, 136, 0.1); +} +.theme-teal .data-table .data-table-title-selected, +.data-table.theme-teal .data-table-title-selected { + color: #009688; +} +.swiper-pagination.color-teal .swiper-pagination-bullet-active, +.theme-teal .swiper-pagination .swiper-pagination-bullet-active { + background-color: #009688; +} +.swiper-pagination.color-teal .swiper-pagination-progressbar, +.theme-teal .swiper-pagination .swiper-pagination-progressbar { + background-color: #009688; +} +.swiper-pagination.swiper-pagination-progress.bg-teal { + background-color: rgba(0, 150, 136, 0.25); +} +.swiper-button-next.color-teal, +.swiper-container-rtl .swiper-button-prev.color-teal, +.theme-teal .swiper-button-next, +.theme-teal .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-teal, +.swiper-container-rtl .swiper-button-next.color-teal, +.theme-teal .swiper-button-prev, +.theme-teal .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E"); +} +.theme-teal .floating-button, +.theme-teal .speed-dial-buttons a, +.floating-button.theme-teal, +.speed-dial-buttons a.theme-teal { + color: #fff; + background: #009688; +} +html:not(.watch-active-state) .theme-teal .floating-button:active, +html:not(.watch-active-state) .theme-teal .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-teal:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-teal:active, +.theme-teal .floating-button.active-state, +.theme-teal .speed-dial-buttons a.active-state, +.floating-button.theme-teal.active-state, +.speed-dial-buttons a.theme-teal.active-state { + background: #00897B; +} +.theme-teal .floating-button i, +.theme-teal .speed-dial-buttons a i, +.floating-button.theme-teal i, +.speed-dial-buttons a.theme-teal i { + color: inherit; +} +.theme-teal .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-teal input[type="range"]::-webkit-slider-thumb:before { + background-color: #009688; +} +.theme-teal .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-teal input[type="range"]::-webkit-slider-thumb { + background-color: #009688; +} +.theme-teal .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-teal input[type="range"]::-ms-thumb { + background-color: #009688; +} +.theme-teal .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-teal input[type="range"]::-ms-fill-lower { + background-color: #009688; +} +.theme-teal .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-teal input[type="range"]::-moz-range-thumb { + background-color: #009688; +} +.badge.theme-teal { + background-color: #009688; + color: #fff; +} +.theme-green .button:not(.button-fill) { + color: #4caf50; +} +.theme-green .navbar .button:not(.button-fill), +.theme-green.navbar .button:not(.button-fill), +.theme-green .toolbar .button:not(.button-fill), +.theme-green.toolbar .button:not(.button-fill), +.theme-green .subnavbar .button:not(.button-fill), +.theme-green.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-green .button.button-fill { + background: #4caf50; + color: #fff; +} +html:not(.watch-active-state) .theme-green .button.button-fill:active, +.theme-green .button.button-fill.active-state { + background: #388E3C; +} +.progressbar.theme-green, +.theme-green .progressbar { + background-color: rgba(76, 175, 80, 0.5); +} +.progressbar.theme-green span, +.theme-green .progressbar span { + background-color: #4caf50; +} +.progressbar-infinite.theme-green, +.theme-green .progressbar-infinite { + background-color: rgba(76, 175, 80, 0.5); +} +.progressbar-infinite.theme-green:after, +.theme-green .progressbar-infinite:after, +.progressbar-infinite.theme-green:before, +.theme-green .progressbar-infinite:before { + background-color: #4caf50; +} +.color-green i.icon, +i.icon.color-green { + color: #4caf50; +} +i.icon-next.color-green, +i.icon-next.theme-green { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%234caf50'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-green, +i.icon-prev.theme-green { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%234caf50'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-green, +i.icon-back.theme-green { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-green, +i.icon-forward.theme-green { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-green, +i.icon-bars.theme-green { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E"); +} +.theme-green a, +.theme-green .card a { + color: #4caf50; +} +.theme-green .navbar, +.navbar.theme-green, +.theme-green .toolbar, +.toolbar.theme-green, +.theme-green .subnavbar, +.subnavbar.theme-green, +.theme-green .searchbar, +.searchbar.theme-green { + background-color: #4caf50; +} +.theme-green .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-green input[type="checkbox"]:checked + .checkbox { + background-color: rgba(76, 175, 80, 0.5); +} +.theme-green .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-green input[type="checkbox"]:checked + .checkbox:after { + background-color: #4caf50; +} +.theme-green label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-green i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-green label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-green input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-green label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-green input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-green label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-green input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-green label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-green input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-green label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-green input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-green label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-green input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #4caf50; + background-color: #4caf50; +} +.theme-green label.label-radio i.icon-form-radio:after, +label.label-radio.theme-green i.icon-form-radio:after { + background-color: #4caf50; +} +.theme-green label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-green input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-green label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-green input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-green label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-green input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-green label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-green input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-green label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-green input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-green label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-green input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #4caf50; +} +.theme-green label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-green input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-green label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-green input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-green label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-green input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-green label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-green input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-green label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-green input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-green label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-green input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #4caf50; +} +.theme-green .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-green input[type="checkbox"]:checked ~ i { + border-color: #4caf50; + background-color: #4caf50; +} +.theme-green .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-green input[type="radio"]:checked ~ i { + border-color: #4caf50; +} +.theme-green .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-green input[type="radio"]:checked ~ i:after { + background-color: #4caf50; +} +.theme-green .form-checkbox .ripple-wave, +.theme-green .form-radio .ripple-wave { + background: rgba(76, 175, 80, 0.5); +} +.theme-green .focus-state .label, +.theme-green .focus-state .floating-label { + color: #4caf50; +} +.theme-green .item-input-field.focus-state:after, +.theme-green .input-field.focus-state:after, +.theme-green .item-input-field.not-empty-state:after, +.theme-green .input-field.not-empty-state:after { + background: #4caf50; +} +.theme-green .picker-calendar-day.picker-calendar-day-today span { + color: #4caf50; +} +.theme-green .picker-calendar-day.picker-calendar-day-selected span { + background-color: #4caf50; + color: #fff; +} +.theme-green .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #4caf50; +} +.theme-green .picker-header { + background-color: #4caf50; +} +.theme-green .modal-button { + color: #4caf50; +} +.theme-green .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-green .timeline-item-date { + background-color: #4caf50; +} +.theme-green .timeline-year-title, +.theme-green .timeline-month-title { + background-color: #4caf50; +} +.theme-green .statusbar-overlay { + background-color: #1B5E20; +} +.theme-green .data-table .data-table-header-selected, +.data-table.theme-green .data-table-header-selected { + background: rgba(76, 175, 80, 0.1); +} +.theme-green .data-table .data-table-title-selected, +.data-table.theme-green .data-table-title-selected { + color: #4caf50; +} +.swiper-pagination.color-green .swiper-pagination-bullet-active, +.theme-green .swiper-pagination .swiper-pagination-bullet-active { + background-color: #4caf50; +} +.swiper-pagination.color-green .swiper-pagination-progressbar, +.theme-green .swiper-pagination .swiper-pagination-progressbar { + background-color: #4caf50; +} +.swiper-pagination.swiper-pagination-progress.bg-green { + background-color: rgba(76, 175, 80, 0.25); +} +.swiper-button-next.color-green, +.swiper-container-rtl .swiper-button-prev.color-green, +.theme-green .swiper-button-next, +.theme-green .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-green, +.swiper-container-rtl .swiper-button-next.color-green, +.theme-green .swiper-button-prev, +.theme-green .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E"); +} +.theme-green .floating-button, +.theme-green .speed-dial-buttons a, +.floating-button.theme-green, +.speed-dial-buttons a.theme-green { + color: #fff; + background: #4caf50; +} +html:not(.watch-active-state) .theme-green .floating-button:active, +html:not(.watch-active-state) .theme-green .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-green:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-green:active, +.theme-green .floating-button.active-state, +.theme-green .speed-dial-buttons a.active-state, +.floating-button.theme-green.active-state, +.speed-dial-buttons a.theme-green.active-state { + background: #388E3C; +} +.theme-green .floating-button i, +.theme-green .speed-dial-buttons a i, +.floating-button.theme-green i, +.speed-dial-buttons a.theme-green i { + color: inherit; +} +.theme-green .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-green input[type="range"]::-webkit-slider-thumb:before { + background-color: #4caf50; +} +.theme-green .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-green input[type="range"]::-webkit-slider-thumb { + background-color: #4caf50; +} +.theme-green .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-green input[type="range"]::-ms-thumb { + background-color: #4caf50; +} +.theme-green .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-green input[type="range"]::-ms-fill-lower { + background-color: #4caf50; +} +.theme-green .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-green input[type="range"]::-moz-range-thumb { + background-color: #4caf50; +} +.badge.theme-green { + background-color: #4caf50; + color: #fff; +} +.theme-lightgreen .button:not(.button-fill) { + color: #8bc34a; +} +.theme-lightgreen .navbar .button:not(.button-fill), +.theme-lightgreen.navbar .button:not(.button-fill), +.theme-lightgreen .toolbar .button:not(.button-fill), +.theme-lightgreen.toolbar .button:not(.button-fill), +.theme-lightgreen .subnavbar .button:not(.button-fill), +.theme-lightgreen.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-lightgreen .button.button-fill { + background: #8bc34a; + color: #fff; +} +html:not(.watch-active-state) .theme-lightgreen .button.button-fill:active, +.theme-lightgreen .button.button-fill.active-state { + background: #689F38; +} +.progressbar.theme-lightgreen, +.theme-lightgreen .progressbar { + background-color: rgba(139, 195, 74, 0.5); +} +.progressbar.theme-lightgreen span, +.theme-lightgreen .progressbar span { + background-color: #8bc34a; +} +.progressbar-infinite.theme-lightgreen, +.theme-lightgreen .progressbar-infinite { + background-color: rgba(139, 195, 74, 0.5); +} +.progressbar-infinite.theme-lightgreen:after, +.theme-lightgreen .progressbar-infinite:after, +.progressbar-infinite.theme-lightgreen:before, +.theme-lightgreen .progressbar-infinite:before { + background-color: #8bc34a; +} +.color-lightgreen i.icon, +i.icon.color-lightgreen { + color: #8bc34a; +} +i.icon-next.color-lightgreen, +i.icon-next.theme-lightgreen { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%238bc34a'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-lightgreen, +i.icon-prev.theme-lightgreen { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%238bc34a'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-lightgreen, +i.icon-back.theme-lightgreen { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-lightgreen, +i.icon-forward.theme-lightgreen { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-lightgreen, +i.icon-bars.theme-lightgreen { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E"); +} +.theme-lightgreen a, +.theme-lightgreen .card a { + color: #8bc34a; +} +.theme-lightgreen .navbar, +.navbar.theme-lightgreen, +.theme-lightgreen .toolbar, +.toolbar.theme-lightgreen, +.theme-lightgreen .subnavbar, +.subnavbar.theme-lightgreen, +.theme-lightgreen .searchbar, +.searchbar.theme-lightgreen { + background-color: #8bc34a; +} +.theme-lightgreen .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-lightgreen input[type="checkbox"]:checked + .checkbox { + background-color: rgba(139, 195, 74, 0.5); +} +.theme-lightgreen .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-lightgreen input[type="checkbox"]:checked + .checkbox:after { + background-color: #8bc34a; +} +.theme-lightgreen label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-lightgreen i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-lightgreen label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-lightgreen input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-lightgreen label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-lightgreen input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-lightgreen label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-lightgreen input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-lightgreen label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-lightgreen input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-lightgreen label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-lightgreen input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-lightgreen label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-lightgreen input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #8bc34a; + background-color: #8bc34a; +} +.theme-lightgreen label.label-radio i.icon-form-radio:after, +label.label-radio.theme-lightgreen i.icon-form-radio:after { + background-color: #8bc34a; +} +.theme-lightgreen label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-lightgreen input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-lightgreen label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-lightgreen input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-lightgreen label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-lightgreen input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-lightgreen label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-lightgreen input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-lightgreen label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-lightgreen input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-lightgreen label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-lightgreen input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #8bc34a; +} +.theme-lightgreen label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-lightgreen input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-lightgreen label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-lightgreen input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-lightgreen label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-lightgreen input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-lightgreen label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-lightgreen input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-lightgreen label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-lightgreen input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-lightgreen label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-lightgreen input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #8bc34a; +} +.theme-lightgreen .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-lightgreen input[type="checkbox"]:checked ~ i { + border-color: #8bc34a; + background-color: #8bc34a; +} +.theme-lightgreen .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-lightgreen input[type="radio"]:checked ~ i { + border-color: #8bc34a; +} +.theme-lightgreen .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-lightgreen input[type="radio"]:checked ~ i:after { + background-color: #8bc34a; +} +.theme-lightgreen .form-checkbox .ripple-wave, +.theme-lightgreen .form-radio .ripple-wave { + background: rgba(139, 195, 74, 0.5); +} +.theme-lightgreen .focus-state .label, +.theme-lightgreen .focus-state .floating-label { + color: #8bc34a; +} +.theme-lightgreen .item-input-field.focus-state:after, +.theme-lightgreen .input-field.focus-state:after, +.theme-lightgreen .item-input-field.not-empty-state:after, +.theme-lightgreen .input-field.not-empty-state:after { + background: #8bc34a; +} +.theme-lightgreen .picker-calendar-day.picker-calendar-day-today span { + color: #8bc34a; +} +.theme-lightgreen .picker-calendar-day.picker-calendar-day-selected span { + background-color: #8bc34a; + color: #fff; +} +.theme-lightgreen .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #8bc34a; +} +.theme-lightgreen .picker-header { + background-color: #8bc34a; +} +.theme-lightgreen .modal-button { + color: #8bc34a; +} +.theme-lightgreen .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-lightgreen .timeline-item-date { + background-color: #8bc34a; +} +.theme-lightgreen .timeline-year-title, +.theme-lightgreen .timeline-month-title { + background-color: #8bc34a; +} +.theme-lightgreen .statusbar-overlay { + background-color: #33691E; +} +.theme-lightgreen .data-table .data-table-header-selected, +.data-table.theme-lightgreen .data-table-header-selected { + background: rgba(139, 195, 74, 0.1); +} +.theme-lightgreen .data-table .data-table-title-selected, +.data-table.theme-lightgreen .data-table-title-selected { + color: #8bc34a; +} +.swiper-pagination.color-lightgreen .swiper-pagination-bullet-active, +.theme-lightgreen .swiper-pagination .swiper-pagination-bullet-active { + background-color: #8bc34a; +} +.swiper-pagination.color-lightgreen .swiper-pagination-progressbar, +.theme-lightgreen .swiper-pagination .swiper-pagination-progressbar { + background-color: #8bc34a; +} +.swiper-pagination.swiper-pagination-progress.bg-lightgreen { + background-color: rgba(139, 195, 74, 0.25); +} +.swiper-button-next.color-lightgreen, +.swiper-container-rtl .swiper-button-prev.color-lightgreen, +.theme-lightgreen .swiper-button-next, +.theme-lightgreen .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-lightgreen, +.swiper-container-rtl .swiper-button-next.color-lightgreen, +.theme-lightgreen .swiper-button-prev, +.theme-lightgreen .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E"); +} +.theme-lightgreen .floating-button, +.theme-lightgreen .speed-dial-buttons a, +.floating-button.theme-lightgreen, +.speed-dial-buttons a.theme-lightgreen { + color: #fff; + background: #8bc34a; +} +html:not(.watch-active-state) .theme-lightgreen .floating-button:active, +html:not(.watch-active-state) .theme-lightgreen .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-lightgreen:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-lightgreen:active, +.theme-lightgreen .floating-button.active-state, +.theme-lightgreen .speed-dial-buttons a.active-state, +.floating-button.theme-lightgreen.active-state, +.speed-dial-buttons a.theme-lightgreen.active-state { + background: #689F38; +} +.theme-lightgreen .floating-button i, +.theme-lightgreen .speed-dial-buttons a i, +.floating-button.theme-lightgreen i, +.speed-dial-buttons a.theme-lightgreen i { + color: inherit; +} +.theme-lightgreen .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-lightgreen input[type="range"]::-webkit-slider-thumb:before { + background-color: #8bc34a; +} +.theme-lightgreen .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-lightgreen input[type="range"]::-webkit-slider-thumb { + background-color: #8bc34a; +} +.theme-lightgreen .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-lightgreen input[type="range"]::-ms-thumb { + background-color: #8bc34a; +} +.theme-lightgreen .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-lightgreen input[type="range"]::-ms-fill-lower { + background-color: #8bc34a; +} +.theme-lightgreen .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-lightgreen input[type="range"]::-moz-range-thumb { + background-color: #8bc34a; +} +.badge.theme-lightgreen { + background-color: #8bc34a; + color: #fff; +} +.theme-lime .button:not(.button-fill) { + color: #cddc39; +} +.theme-lime .navbar .button:not(.button-fill), +.theme-lime.navbar .button:not(.button-fill), +.theme-lime .toolbar .button:not(.button-fill), +.theme-lime.toolbar .button:not(.button-fill), +.theme-lime .subnavbar .button:not(.button-fill), +.theme-lime.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-lime .button.button-fill { + background: #cddc39; + color: #fff; +} +html:not(.watch-active-state) .theme-lime .button.button-fill:active, +.theme-lime .button.button-fill.active-state { + background: #AFB42B; +} +.progressbar.theme-lime, +.theme-lime .progressbar { + background-color: rgba(205, 220, 57, 0.5); +} +.progressbar.theme-lime span, +.theme-lime .progressbar span { + background-color: #cddc39; +} +.progressbar-infinite.theme-lime, +.theme-lime .progressbar-infinite { + background-color: rgba(205, 220, 57, 0.5); +} +.progressbar-infinite.theme-lime:after, +.theme-lime .progressbar-infinite:after, +.progressbar-infinite.theme-lime:before, +.theme-lime .progressbar-infinite:before { + background-color: #cddc39; +} +.color-lime i.icon, +i.icon.color-lime { + color: #cddc39; +} +i.icon-next.color-lime, +i.icon-next.theme-lime { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23cddc39'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-lime, +i.icon-prev.theme-lime { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23cddc39'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-lime, +i.icon-back.theme-lime { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-lime, +i.icon-forward.theme-lime { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-lime, +i.icon-bars.theme-lime { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E"); +} +.theme-lime a, +.theme-lime .card a { + color: #cddc39; +} +.theme-lime .navbar, +.navbar.theme-lime, +.theme-lime .toolbar, +.toolbar.theme-lime, +.theme-lime .subnavbar, +.subnavbar.theme-lime, +.theme-lime .searchbar, +.searchbar.theme-lime { + background-color: #cddc39; +} +.theme-lime .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-lime input[type="checkbox"]:checked + .checkbox { + background-color: rgba(205, 220, 57, 0.5); +} +.theme-lime .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-lime input[type="checkbox"]:checked + .checkbox:after { + background-color: #cddc39; +} +.theme-lime label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-lime i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-lime label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-lime input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-lime label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-lime input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-lime label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-lime input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-lime label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-lime input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-lime label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-lime input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-lime label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-lime input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #cddc39; + background-color: #cddc39; +} +.theme-lime label.label-radio i.icon-form-radio:after, +label.label-radio.theme-lime i.icon-form-radio:after { + background-color: #cddc39; +} +.theme-lime label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-lime input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-lime label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-lime input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-lime label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-lime input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-lime label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-lime input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-lime label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-lime input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-lime label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-lime input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #cddc39; +} +.theme-lime label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-lime input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-lime label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-lime input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-lime label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-lime input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-lime label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-lime input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-lime label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-lime input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-lime label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-lime input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #cddc39; +} +.theme-lime .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-lime input[type="checkbox"]:checked ~ i { + border-color: #cddc39; + background-color: #cddc39; +} +.theme-lime .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-lime input[type="radio"]:checked ~ i { + border-color: #cddc39; +} +.theme-lime .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-lime input[type="radio"]:checked ~ i:after { + background-color: #cddc39; +} +.theme-lime .form-checkbox .ripple-wave, +.theme-lime .form-radio .ripple-wave { + background: rgba(205, 220, 57, 0.5); +} +.theme-lime .focus-state .label, +.theme-lime .focus-state .floating-label { + color: #cddc39; +} +.theme-lime .item-input-field.focus-state:after, +.theme-lime .input-field.focus-state:after, +.theme-lime .item-input-field.not-empty-state:after, +.theme-lime .input-field.not-empty-state:after { + background: #cddc39; +} +.theme-lime .picker-calendar-day.picker-calendar-day-today span { + color: #cddc39; +} +.theme-lime .picker-calendar-day.picker-calendar-day-selected span { + background-color: #cddc39; + color: #fff; +} +.theme-lime .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #cddc39; +} +.theme-lime .picker-header { + background-color: #cddc39; +} +.theme-lime .modal-button { + color: #cddc39; +} +.theme-lime .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-lime .timeline-item-date { + background-color: #cddc39; +} +.theme-lime .timeline-year-title, +.theme-lime .timeline-month-title { + background-color: #cddc39; +} +.theme-lime .statusbar-overlay { + background-color: #827717; +} +.theme-lime .data-table .data-table-header-selected, +.data-table.theme-lime .data-table-header-selected { + background: rgba(205, 220, 57, 0.1); +} +.theme-lime .data-table .data-table-title-selected, +.data-table.theme-lime .data-table-title-selected { + color: #cddc39; +} +.swiper-pagination.color-lime .swiper-pagination-bullet-active, +.theme-lime .swiper-pagination .swiper-pagination-bullet-active { + background-color: #cddc39; +} +.swiper-pagination.color-lime .swiper-pagination-progressbar, +.theme-lime .swiper-pagination .swiper-pagination-progressbar { + background-color: #cddc39; +} +.swiper-pagination.swiper-pagination-progress.bg-lime { + background-color: rgba(205, 220, 57, 0.25); +} +.swiper-button-next.color-lime, +.swiper-container-rtl .swiper-button-prev.color-lime, +.theme-lime .swiper-button-next, +.theme-lime .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-lime, +.swiper-container-rtl .swiper-button-next.color-lime, +.theme-lime .swiper-button-prev, +.theme-lime .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E"); +} +.theme-lime .floating-button, +.theme-lime .speed-dial-buttons a, +.floating-button.theme-lime, +.speed-dial-buttons a.theme-lime { + color: #fff; + background: #cddc39; +} +html:not(.watch-active-state) .theme-lime .floating-button:active, +html:not(.watch-active-state) .theme-lime .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-lime:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-lime:active, +.theme-lime .floating-button.active-state, +.theme-lime .speed-dial-buttons a.active-state, +.floating-button.theme-lime.active-state, +.speed-dial-buttons a.theme-lime.active-state { + background: #AFB42B; +} +.theme-lime .floating-button i, +.theme-lime .speed-dial-buttons a i, +.floating-button.theme-lime i, +.speed-dial-buttons a.theme-lime i { + color: inherit; +} +.theme-lime .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-lime input[type="range"]::-webkit-slider-thumb:before { + background-color: #cddc39; +} +.theme-lime .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-lime input[type="range"]::-webkit-slider-thumb { + background-color: #cddc39; +} +.theme-lime .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-lime input[type="range"]::-ms-thumb { + background-color: #cddc39; +} +.theme-lime .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-lime input[type="range"]::-ms-fill-lower { + background-color: #cddc39; +} +.theme-lime .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-lime input[type="range"]::-moz-range-thumb { + background-color: #cddc39; +} +.badge.theme-lime { + background-color: #cddc39; + color: #fff; +} +.theme-yellow .button:not(.button-fill) { + color: #ffeb3b; +} +.theme-yellow .navbar .button:not(.button-fill), +.theme-yellow.navbar .button:not(.button-fill), +.theme-yellow .toolbar .button:not(.button-fill), +.theme-yellow.toolbar .button:not(.button-fill), +.theme-yellow .subnavbar .button:not(.button-fill), +.theme-yellow.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-yellow .button.button-fill { + background: #ffeb3b; + color: #fff; +} +html:not(.watch-active-state) .theme-yellow .button.button-fill:active, +.theme-yellow .button.button-fill.active-state { + background: #FBC02D; +} +.progressbar.theme-yellow, +.theme-yellow .progressbar { + background-color: rgba(255, 235, 59, 0.5); +} +.progressbar.theme-yellow span, +.theme-yellow .progressbar span { + background-color: #ffeb3b; +} +.progressbar-infinite.theme-yellow, +.theme-yellow .progressbar-infinite { + background-color: rgba(255, 235, 59, 0.5); +} +.progressbar-infinite.theme-yellow:after, +.theme-yellow .progressbar-infinite:after, +.progressbar-infinite.theme-yellow:before, +.theme-yellow .progressbar-infinite:before { + background-color: #ffeb3b; +} +.color-yellow i.icon, +i.icon.color-yellow { + color: #ffeb3b; +} +i.icon-next.color-yellow, +i.icon-next.theme-yellow { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffeb3b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-yellow, +i.icon-prev.theme-yellow { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffeb3b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-yellow, +i.icon-back.theme-yellow { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-yellow, +i.icon-forward.theme-yellow { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-yellow, +i.icon-bars.theme-yellow { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E"); +} +.theme-yellow a, +.theme-yellow .card a { + color: #ffeb3b; +} +.theme-yellow .navbar, +.navbar.theme-yellow, +.theme-yellow .toolbar, +.toolbar.theme-yellow, +.theme-yellow .subnavbar, +.subnavbar.theme-yellow, +.theme-yellow .searchbar, +.searchbar.theme-yellow { + background-color: #ffeb3b; +} +.theme-yellow .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-yellow input[type="checkbox"]:checked + .checkbox { + background-color: rgba(255, 235, 59, 0.5); +} +.theme-yellow .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-yellow input[type="checkbox"]:checked + .checkbox:after { + background-color: #ffeb3b; +} +.theme-yellow label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-yellow i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-yellow label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-yellow input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-yellow label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-yellow input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-yellow label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-yellow input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-yellow label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-yellow input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-yellow label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-yellow input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-yellow label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-yellow input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #ffeb3b; + background-color: #ffeb3b; +} +.theme-yellow label.label-radio i.icon-form-radio:after, +label.label-radio.theme-yellow i.icon-form-radio:after { + background-color: #ffeb3b; +} +.theme-yellow label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-yellow input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-yellow label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-yellow input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-yellow label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-yellow input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-yellow label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-yellow input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-yellow label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-yellow input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-yellow label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-yellow input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #ffeb3b; +} +.theme-yellow label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-yellow input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-yellow label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-yellow input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-yellow label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-yellow input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-yellow label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-yellow input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-yellow label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-yellow input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-yellow label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-yellow input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #ffeb3b; +} +.theme-yellow .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-yellow input[type="checkbox"]:checked ~ i { + border-color: #ffeb3b; + background-color: #ffeb3b; +} +.theme-yellow .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-yellow input[type="radio"]:checked ~ i { + border-color: #ffeb3b; +} +.theme-yellow .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-yellow input[type="radio"]:checked ~ i:after { + background-color: #ffeb3b; +} +.theme-yellow .form-checkbox .ripple-wave, +.theme-yellow .form-radio .ripple-wave { + background: rgba(255, 235, 59, 0.5); +} +.theme-yellow .focus-state .label, +.theme-yellow .focus-state .floating-label { + color: #ffeb3b; +} +.theme-yellow .item-input-field.focus-state:after, +.theme-yellow .input-field.focus-state:after, +.theme-yellow .item-input-field.not-empty-state:after, +.theme-yellow .input-field.not-empty-state:after { + background: #ffeb3b; +} +.theme-yellow .picker-calendar-day.picker-calendar-day-today span { + color: #ffeb3b; +} +.theme-yellow .picker-calendar-day.picker-calendar-day-selected span { + background-color: #ffeb3b; + color: #fff; +} +.theme-yellow .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #ffeb3b; +} +.theme-yellow .picker-header { + background-color: #ffeb3b; +} +.theme-yellow .modal-button { + color: #ffeb3b; +} +.theme-yellow .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-yellow .timeline-item-date { + background-color: #ffeb3b; +} +.theme-yellow .timeline-year-title, +.theme-yellow .timeline-month-title { + background-color: #ffeb3b; +} +.theme-yellow .statusbar-overlay { + background-color: #F57F17; +} +.theme-yellow .data-table .data-table-header-selected, +.data-table.theme-yellow .data-table-header-selected { + background: rgba(255, 235, 59, 0.1); +} +.theme-yellow .data-table .data-table-title-selected, +.data-table.theme-yellow .data-table-title-selected { + color: #ffeb3b; +} +.swiper-pagination.color-yellow .swiper-pagination-bullet-active, +.theme-yellow .swiper-pagination .swiper-pagination-bullet-active { + background-color: #ffeb3b; +} +.swiper-pagination.color-yellow .swiper-pagination-progressbar, +.theme-yellow .swiper-pagination .swiper-pagination-progressbar { + background-color: #ffeb3b; +} +.swiper-pagination.swiper-pagination-progress.bg-yellow { + background-color: rgba(255, 235, 59, 0.25); +} +.swiper-button-next.color-yellow, +.swiper-container-rtl .swiper-button-prev.color-yellow, +.theme-yellow .swiper-button-next, +.theme-yellow .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-yellow, +.swiper-container-rtl .swiper-button-next.color-yellow, +.theme-yellow .swiper-button-prev, +.theme-yellow .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E"); +} +.theme-yellow .floating-button, +.theme-yellow .speed-dial-buttons a, +.floating-button.theme-yellow, +.speed-dial-buttons a.theme-yellow { + color: #fff; + background: #ffeb3b; +} +html:not(.watch-active-state) .theme-yellow .floating-button:active, +html:not(.watch-active-state) .theme-yellow .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-yellow:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-yellow:active, +.theme-yellow .floating-button.active-state, +.theme-yellow .speed-dial-buttons a.active-state, +.floating-button.theme-yellow.active-state, +.speed-dial-buttons a.theme-yellow.active-state { + background: #FBC02D; +} +.theme-yellow .floating-button i, +.theme-yellow .speed-dial-buttons a i, +.floating-button.theme-yellow i, +.speed-dial-buttons a.theme-yellow i { + color: inherit; +} +.theme-yellow .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-yellow input[type="range"]::-webkit-slider-thumb:before { + background-color: #ffeb3b; +} +.theme-yellow .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-yellow input[type="range"]::-webkit-slider-thumb { + background-color: #ffeb3b; +} +.theme-yellow .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-yellow input[type="range"]::-ms-thumb { + background-color: #ffeb3b; +} +.theme-yellow .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-yellow input[type="range"]::-ms-fill-lower { + background-color: #ffeb3b; +} +.theme-yellow .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-yellow input[type="range"]::-moz-range-thumb { + background-color: #ffeb3b; +} +.badge.theme-yellow { + background-color: #ffeb3b; + color: #fff; +} +.theme-amber .button:not(.button-fill) { + color: #ffc107; +} +.theme-amber .navbar .button:not(.button-fill), +.theme-amber.navbar .button:not(.button-fill), +.theme-amber .toolbar .button:not(.button-fill), +.theme-amber.toolbar .button:not(.button-fill), +.theme-amber .subnavbar .button:not(.button-fill), +.theme-amber.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-amber .button.button-fill { + background: #ffc107; + color: #fff; +} +html:not(.watch-active-state) .theme-amber .button.button-fill:active, +.theme-amber .button.button-fill.active-state { + background: #FFA000; +} +.progressbar.theme-amber, +.theme-amber .progressbar { + background-color: rgba(255, 193, 7, 0.5); +} +.progressbar.theme-amber span, +.theme-amber .progressbar span { + background-color: #ffc107; +} +.progressbar-infinite.theme-amber, +.theme-amber .progressbar-infinite { + background-color: rgba(255, 193, 7, 0.5); +} +.progressbar-infinite.theme-amber:after, +.theme-amber .progressbar-infinite:after, +.progressbar-infinite.theme-amber:before, +.theme-amber .progressbar-infinite:before { + background-color: #ffc107; +} +.color-amber i.icon, +i.icon.color-amber { + color: #ffc107; +} +i.icon-next.color-amber, +i.icon-next.theme-amber { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffc107'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-amber, +i.icon-prev.theme-amber { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffc107'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-amber, +i.icon-back.theme-amber { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-amber, +i.icon-forward.theme-amber { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-amber, +i.icon-bars.theme-amber { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E"); +} +.theme-amber a, +.theme-amber .card a { + color: #ffc107; +} +.theme-amber .navbar, +.navbar.theme-amber, +.theme-amber .toolbar, +.toolbar.theme-amber, +.theme-amber .subnavbar, +.subnavbar.theme-amber, +.theme-amber .searchbar, +.searchbar.theme-amber { + background-color: #ffc107; +} +.theme-amber .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-amber input[type="checkbox"]:checked + .checkbox { + background-color: rgba(255, 193, 7, 0.5); +} +.theme-amber .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-amber input[type="checkbox"]:checked + .checkbox:after { + background-color: #ffc107; +} +.theme-amber label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-amber i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-amber label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-amber input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-amber label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-amber input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-amber label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-amber input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-amber label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-amber input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-amber label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-amber input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-amber label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-amber input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #ffc107; + background-color: #ffc107; +} +.theme-amber label.label-radio i.icon-form-radio:after, +label.label-radio.theme-amber i.icon-form-radio:after { + background-color: #ffc107; +} +.theme-amber label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-amber input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-amber label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-amber input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-amber label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-amber input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-amber label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-amber input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-amber label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-amber input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-amber label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-amber input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #ffc107; +} +.theme-amber label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-amber input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-amber label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-amber input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-amber label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-amber input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-amber label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-amber input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-amber label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-amber input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-amber label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-amber input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #ffc107; +} +.theme-amber .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-amber input[type="checkbox"]:checked ~ i { + border-color: #ffc107; + background-color: #ffc107; +} +.theme-amber .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-amber input[type="radio"]:checked ~ i { + border-color: #ffc107; +} +.theme-amber .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-amber input[type="radio"]:checked ~ i:after { + background-color: #ffc107; +} +.theme-amber .form-checkbox .ripple-wave, +.theme-amber .form-radio .ripple-wave { + background: rgba(255, 193, 7, 0.5); +} +.theme-amber .focus-state .label, +.theme-amber .focus-state .floating-label { + color: #ffc107; +} +.theme-amber .item-input-field.focus-state:after, +.theme-amber .input-field.focus-state:after, +.theme-amber .item-input-field.not-empty-state:after, +.theme-amber .input-field.not-empty-state:after { + background: #ffc107; +} +.theme-amber .picker-calendar-day.picker-calendar-day-today span { + color: #ffc107; +} +.theme-amber .picker-calendar-day.picker-calendar-day-selected span { + background-color: #ffc107; + color: #fff; +} +.theme-amber .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #ffc107; +} +.theme-amber .picker-header { + background-color: #ffc107; +} +.theme-amber .modal-button { + color: #ffc107; +} +.theme-amber .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-amber .timeline-item-date { + background-color: #ffc107; +} +.theme-amber .timeline-year-title, +.theme-amber .timeline-month-title { + background-color: #ffc107; +} +.theme-amber .statusbar-overlay { + background-color: #FF6F00; +} +.theme-amber .data-table .data-table-header-selected, +.data-table.theme-amber .data-table-header-selected { + background: rgba(255, 193, 7, 0.1); +} +.theme-amber .data-table .data-table-title-selected, +.data-table.theme-amber .data-table-title-selected { + color: #ffc107; +} +.swiper-pagination.color-amber .swiper-pagination-bullet-active, +.theme-amber .swiper-pagination .swiper-pagination-bullet-active { + background-color: #ffc107; +} +.swiper-pagination.color-amber .swiper-pagination-progressbar, +.theme-amber .swiper-pagination .swiper-pagination-progressbar { + background-color: #ffc107; +} +.swiper-pagination.swiper-pagination-progress.bg-amber { + background-color: rgba(255, 193, 7, 0.25); +} +.swiper-button-next.color-amber, +.swiper-container-rtl .swiper-button-prev.color-amber, +.theme-amber .swiper-button-next, +.theme-amber .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-amber, +.swiper-container-rtl .swiper-button-next.color-amber, +.theme-amber .swiper-button-prev, +.theme-amber .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E"); +} +.theme-amber .floating-button, +.theme-amber .speed-dial-buttons a, +.floating-button.theme-amber, +.speed-dial-buttons a.theme-amber { + color: #fff; + background: #ffc107; +} +html:not(.watch-active-state) .theme-amber .floating-button:active, +html:not(.watch-active-state) .theme-amber .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-amber:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-amber:active, +.theme-amber .floating-button.active-state, +.theme-amber .speed-dial-buttons a.active-state, +.floating-button.theme-amber.active-state, +.speed-dial-buttons a.theme-amber.active-state { + background: #FFA000; +} +.theme-amber .floating-button i, +.theme-amber .speed-dial-buttons a i, +.floating-button.theme-amber i, +.speed-dial-buttons a.theme-amber i { + color: inherit; +} +.theme-amber .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-amber input[type="range"]::-webkit-slider-thumb:before { + background-color: #ffc107; +} +.theme-amber .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-amber input[type="range"]::-webkit-slider-thumb { + background-color: #ffc107; +} +.theme-amber .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-amber input[type="range"]::-ms-thumb { + background-color: #ffc107; +} +.theme-amber .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-amber input[type="range"]::-ms-fill-lower { + background-color: #ffc107; +} +.theme-amber .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-amber input[type="range"]::-moz-range-thumb { + background-color: #ffc107; +} +.badge.theme-amber { + background-color: #ffc107; + color: #fff; +} +.theme-orange .button:not(.button-fill) { + color: #ff9800; +} +.theme-orange .navbar .button:not(.button-fill), +.theme-orange.navbar .button:not(.button-fill), +.theme-orange .toolbar .button:not(.button-fill), +.theme-orange.toolbar .button:not(.button-fill), +.theme-orange .subnavbar .button:not(.button-fill), +.theme-orange.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-orange .button.button-fill { + background: #ff9800; + color: #fff; +} +html:not(.watch-active-state) .theme-orange .button.button-fill:active, +.theme-orange .button.button-fill.active-state { + background: #F57C00; +} +.progressbar.theme-orange, +.theme-orange .progressbar { + background-color: rgba(255, 152, 0, 0.5); +} +.progressbar.theme-orange span, +.theme-orange .progressbar span { + background-color: #ff9800; +} +.progressbar-infinite.theme-orange, +.theme-orange .progressbar-infinite { + background-color: rgba(255, 152, 0, 0.5); +} +.progressbar-infinite.theme-orange:after, +.theme-orange .progressbar-infinite:after, +.progressbar-infinite.theme-orange:before, +.theme-orange .progressbar-infinite:before { + background-color: #ff9800; +} +.color-orange i.icon, +i.icon.color-orange { + color: #ff9800; +} +i.icon-next.color-orange, +i.icon-next.theme-orange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff9800'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-orange, +i.icon-prev.theme-orange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff9800'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-orange, +i.icon-back.theme-orange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-orange, +i.icon-forward.theme-orange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-orange, +i.icon-bars.theme-orange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E"); +} +.theme-orange a, +.theme-orange .card a { + color: #ff9800; +} +.theme-orange .navbar, +.navbar.theme-orange, +.theme-orange .toolbar, +.toolbar.theme-orange, +.theme-orange .subnavbar, +.subnavbar.theme-orange, +.theme-orange .searchbar, +.searchbar.theme-orange { + background-color: #ff9800; +} +.theme-orange .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-orange input[type="checkbox"]:checked + .checkbox { + background-color: rgba(255, 152, 0, 0.5); +} +.theme-orange .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-orange input[type="checkbox"]:checked + .checkbox:after { + background-color: #ff9800; +} +.theme-orange label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-orange i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-orange label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-orange input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-orange label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-orange input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-orange label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-orange input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-orange label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-orange input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-orange label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-orange input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-orange label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-orange input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #ff9800; + background-color: #ff9800; +} +.theme-orange label.label-radio i.icon-form-radio:after, +label.label-radio.theme-orange i.icon-form-radio:after { + background-color: #ff9800; +} +.theme-orange label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-orange input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-orange label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-orange input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-orange label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-orange input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-orange label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-orange input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-orange label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-orange input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-orange label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-orange input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #ff9800; +} +.theme-orange label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-orange input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-orange label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-orange input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-orange label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-orange input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-orange label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-orange input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-orange label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-orange input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-orange label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-orange input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #ff9800; +} +.theme-orange .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-orange input[type="checkbox"]:checked ~ i { + border-color: #ff9800; + background-color: #ff9800; +} +.theme-orange .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-orange input[type="radio"]:checked ~ i { + border-color: #ff9800; +} +.theme-orange .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-orange input[type="radio"]:checked ~ i:after { + background-color: #ff9800; +} +.theme-orange .form-checkbox .ripple-wave, +.theme-orange .form-radio .ripple-wave { + background: rgba(255, 152, 0, 0.5); +} +.theme-orange .focus-state .label, +.theme-orange .focus-state .floating-label { + color: #ff9800; +} +.theme-orange .item-input-field.focus-state:after, +.theme-orange .input-field.focus-state:after, +.theme-orange .item-input-field.not-empty-state:after, +.theme-orange .input-field.not-empty-state:after { + background: #ff9800; +} +.theme-orange .picker-calendar-day.picker-calendar-day-today span { + color: #ff9800; +} +.theme-orange .picker-calendar-day.picker-calendar-day-selected span { + background-color: #ff9800; + color: #fff; +} +.theme-orange .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #ff9800; +} +.theme-orange .picker-header { + background-color: #ff9800; +} +.theme-orange .modal-button { + color: #ff9800; +} +.theme-orange .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-orange .timeline-item-date { + background-color: #ff9800; +} +.theme-orange .timeline-year-title, +.theme-orange .timeline-month-title { + background-color: #ff9800; +} +.theme-orange .statusbar-overlay { + background-color: #E65100; +} +.theme-orange .data-table .data-table-header-selected, +.data-table.theme-orange .data-table-header-selected { + background: rgba(255, 152, 0, 0.1); +} +.theme-orange .data-table .data-table-title-selected, +.data-table.theme-orange .data-table-title-selected { + color: #ff9800; +} +.swiper-pagination.color-orange .swiper-pagination-bullet-active, +.theme-orange .swiper-pagination .swiper-pagination-bullet-active { + background-color: #ff9800; +} +.swiper-pagination.color-orange .swiper-pagination-progressbar, +.theme-orange .swiper-pagination .swiper-pagination-progressbar { + background-color: #ff9800; +} +.swiper-pagination.swiper-pagination-progress.bg-orange { + background-color: rgba(255, 152, 0, 0.25); +} +.swiper-button-next.color-orange, +.swiper-container-rtl .swiper-button-prev.color-orange, +.theme-orange .swiper-button-next, +.theme-orange .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-orange, +.swiper-container-rtl .swiper-button-next.color-orange, +.theme-orange .swiper-button-prev, +.theme-orange .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E"); +} +.theme-orange .floating-button, +.theme-orange .speed-dial-buttons a, +.floating-button.theme-orange, +.speed-dial-buttons a.theme-orange { + color: #fff; + background: #ff9800; +} +html:not(.watch-active-state) .theme-orange .floating-button:active, +html:not(.watch-active-state) .theme-orange .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-orange:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-orange:active, +.theme-orange .floating-button.active-state, +.theme-orange .speed-dial-buttons a.active-state, +.floating-button.theme-orange.active-state, +.speed-dial-buttons a.theme-orange.active-state { + background: #F57C00; +} +.theme-orange .floating-button i, +.theme-orange .speed-dial-buttons a i, +.floating-button.theme-orange i, +.speed-dial-buttons a.theme-orange i { + color: inherit; +} +.theme-orange .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-orange input[type="range"]::-webkit-slider-thumb:before { + background-color: #ff9800; +} +.theme-orange .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-orange input[type="range"]::-webkit-slider-thumb { + background-color: #ff9800; +} +.theme-orange .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-orange input[type="range"]::-ms-thumb { + background-color: #ff9800; +} +.theme-orange .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-orange input[type="range"]::-ms-fill-lower { + background-color: #ff9800; +} +.theme-orange .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-orange input[type="range"]::-moz-range-thumb { + background-color: #ff9800; +} +.badge.theme-orange { + background-color: #ff9800; + color: #fff; +} +.theme-deeporange .button:not(.button-fill) { + color: #ff5722; +} +.theme-deeporange .navbar .button:not(.button-fill), +.theme-deeporange.navbar .button:not(.button-fill), +.theme-deeporange .toolbar .button:not(.button-fill), +.theme-deeporange.toolbar .button:not(.button-fill), +.theme-deeporange .subnavbar .button:not(.button-fill), +.theme-deeporange.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-deeporange .button.button-fill { + background: #ff5722; + color: #fff; +} +html:not(.watch-active-state) .theme-deeporange .button.button-fill:active, +.theme-deeporange .button.button-fill.active-state { + background: #E64A19; +} +.progressbar.theme-deeporange, +.theme-deeporange .progressbar { + background-color: rgba(255, 87, 34, 0.5); +} +.progressbar.theme-deeporange span, +.theme-deeporange .progressbar span { + background-color: #ff5722; +} +.progressbar-infinite.theme-deeporange, +.theme-deeporange .progressbar-infinite { + background-color: rgba(255, 87, 34, 0.5); +} +.progressbar-infinite.theme-deeporange:after, +.theme-deeporange .progressbar-infinite:after, +.progressbar-infinite.theme-deeporange:before, +.theme-deeporange .progressbar-infinite:before { + background-color: #ff5722; +} +.color-deeporange i.icon, +i.icon.color-deeporange { + color: #ff5722; +} +i.icon-next.color-deeporange, +i.icon-next.theme-deeporange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff5722'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-deeporange, +i.icon-prev.theme-deeporange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff5722'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-deeporange, +i.icon-back.theme-deeporange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-deeporange, +i.icon-forward.theme-deeporange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-deeporange, +i.icon-bars.theme-deeporange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E"); +} +.theme-deeporange a, +.theme-deeporange .card a { + color: #ff5722; +} +.theme-deeporange .navbar, +.navbar.theme-deeporange, +.theme-deeporange .toolbar, +.toolbar.theme-deeporange, +.theme-deeporange .subnavbar, +.subnavbar.theme-deeporange, +.theme-deeporange .searchbar, +.searchbar.theme-deeporange { + background-color: #ff5722; +} +.theme-deeporange .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-deeporange input[type="checkbox"]:checked + .checkbox { + background-color: rgba(255, 87, 34, 0.5); +} +.theme-deeporange .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-deeporange input[type="checkbox"]:checked + .checkbox:after { + background-color: #ff5722; +} +.theme-deeporange label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-deeporange i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-deeporange label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-deeporange input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-deeporange label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-deeporange input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-deeporange label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-deeporange input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-deeporange label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-deeporange input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-deeporange label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-deeporange input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-deeporange label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-deeporange input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #ff5722; + background-color: #ff5722; +} +.theme-deeporange label.label-radio i.icon-form-radio:after, +label.label-radio.theme-deeporange i.icon-form-radio:after { + background-color: #ff5722; +} +.theme-deeporange label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-deeporange input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-deeporange label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-deeporange input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-deeporange label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-deeporange input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-deeporange label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-deeporange input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-deeporange label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-deeporange input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-deeporange label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-deeporange input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #ff5722; +} +.theme-deeporange label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-deeporange input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-deeporange label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-deeporange input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-deeporange label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-deeporange input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-deeporange label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-deeporange input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-deeporange label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-deeporange input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-deeporange label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-deeporange input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #ff5722; +} +.theme-deeporange .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-deeporange input[type="checkbox"]:checked ~ i { + border-color: #ff5722; + background-color: #ff5722; +} +.theme-deeporange .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-deeporange input[type="radio"]:checked ~ i { + border-color: #ff5722; +} +.theme-deeporange .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-deeporange input[type="radio"]:checked ~ i:after { + background-color: #ff5722; +} +.theme-deeporange .form-checkbox .ripple-wave, +.theme-deeporange .form-radio .ripple-wave { + background: rgba(255, 87, 34, 0.5); +} +.theme-deeporange .focus-state .label, +.theme-deeporange .focus-state .floating-label { + color: #ff5722; +} +.theme-deeporange .item-input-field.focus-state:after, +.theme-deeporange .input-field.focus-state:after, +.theme-deeporange .item-input-field.not-empty-state:after, +.theme-deeporange .input-field.not-empty-state:after { + background: #ff5722; +} +.theme-deeporange .picker-calendar-day.picker-calendar-day-today span { + color: #ff5722; +} +.theme-deeporange .picker-calendar-day.picker-calendar-day-selected span { + background-color: #ff5722; + color: #fff; +} +.theme-deeporange .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #ff5722; +} +.theme-deeporange .picker-header { + background-color: #ff5722; +} +.theme-deeporange .modal-button { + color: #ff5722; +} +.theme-deeporange .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-deeporange .timeline-item-date { + background-color: #ff5722; +} +.theme-deeporange .timeline-year-title, +.theme-deeporange .timeline-month-title { + background-color: #ff5722; +} +.theme-deeporange .statusbar-overlay { + background-color: #BF360C; +} +.theme-deeporange .data-table .data-table-header-selected, +.data-table.theme-deeporange .data-table-header-selected { + background: rgba(255, 87, 34, 0.1); +} +.theme-deeporange .data-table .data-table-title-selected, +.data-table.theme-deeporange .data-table-title-selected { + color: #ff5722; +} +.swiper-pagination.color-deeporange .swiper-pagination-bullet-active, +.theme-deeporange .swiper-pagination .swiper-pagination-bullet-active { + background-color: #ff5722; +} +.swiper-pagination.color-deeporange .swiper-pagination-progressbar, +.theme-deeporange .swiper-pagination .swiper-pagination-progressbar { + background-color: #ff5722; +} +.swiper-pagination.swiper-pagination-progress.bg-deeporange { + background-color: rgba(255, 87, 34, 0.25); +} +.swiper-button-next.color-deeporange, +.swiper-container-rtl .swiper-button-prev.color-deeporange, +.theme-deeporange .swiper-button-next, +.theme-deeporange .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-deeporange, +.swiper-container-rtl .swiper-button-next.color-deeporange, +.theme-deeporange .swiper-button-prev, +.theme-deeporange .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E"); +} +.theme-deeporange .floating-button, +.theme-deeporange .speed-dial-buttons a, +.floating-button.theme-deeporange, +.speed-dial-buttons a.theme-deeporange { + color: #fff; + background: #ff5722; +} +html:not(.watch-active-state) .theme-deeporange .floating-button:active, +html:not(.watch-active-state) .theme-deeporange .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-deeporange:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-deeporange:active, +.theme-deeporange .floating-button.active-state, +.theme-deeporange .speed-dial-buttons a.active-state, +.floating-button.theme-deeporange.active-state, +.speed-dial-buttons a.theme-deeporange.active-state { + background: #E64A19; +} +.theme-deeporange .floating-button i, +.theme-deeporange .speed-dial-buttons a i, +.floating-button.theme-deeporange i, +.speed-dial-buttons a.theme-deeporange i { + color: inherit; +} +.theme-deeporange .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-deeporange input[type="range"]::-webkit-slider-thumb:before { + background-color: #ff5722; +} +.theme-deeporange .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-deeporange input[type="range"]::-webkit-slider-thumb { + background-color: #ff5722; +} +.theme-deeporange .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-deeporange input[type="range"]::-ms-thumb { + background-color: #ff5722; +} +.theme-deeporange .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-deeporange input[type="range"]::-ms-fill-lower { + background-color: #ff5722; +} +.theme-deeporange .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-deeporange input[type="range"]::-moz-range-thumb { + background-color: #ff5722; +} +.badge.theme-deeporange { + background-color: #ff5722; + color: #fff; +} +.theme-brown .button:not(.button-fill) { + color: #795548; +} +.theme-brown .navbar .button:not(.button-fill), +.theme-brown.navbar .button:not(.button-fill), +.theme-brown .toolbar .button:not(.button-fill), +.theme-brown.toolbar .button:not(.button-fill), +.theme-brown .subnavbar .button:not(.button-fill), +.theme-brown.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-brown .button.button-fill { + background: #795548; + color: #fff; +} +html:not(.watch-active-state) .theme-brown .button.button-fill:active, +.theme-brown .button.button-fill.active-state { + background: #5D4037; +} +.progressbar.theme-brown, +.theme-brown .progressbar { + background-color: rgba(121, 85, 72, 0.5); +} +.progressbar.theme-brown span, +.theme-brown .progressbar span { + background-color: #795548; +} +.progressbar-infinite.theme-brown, +.theme-brown .progressbar-infinite { + background-color: rgba(121, 85, 72, 0.5); +} +.progressbar-infinite.theme-brown:after, +.theme-brown .progressbar-infinite:after, +.progressbar-infinite.theme-brown:before, +.theme-brown .progressbar-infinite:before { + background-color: #795548; +} +.color-brown i.icon, +i.icon.color-brown { + color: #795548; +} +i.icon-next.color-brown, +i.icon-next.theme-brown { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23795548'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-brown, +i.icon-prev.theme-brown { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23795548'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-brown, +i.icon-back.theme-brown { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-brown, +i.icon-forward.theme-brown { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-brown, +i.icon-bars.theme-brown { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E"); +} +.theme-brown a, +.theme-brown .card a { + color: #795548; +} +.theme-brown .navbar, +.navbar.theme-brown, +.theme-brown .toolbar, +.toolbar.theme-brown, +.theme-brown .subnavbar, +.subnavbar.theme-brown, +.theme-brown .searchbar, +.searchbar.theme-brown { + background-color: #795548; +} +.theme-brown .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-brown input[type="checkbox"]:checked + .checkbox { + background-color: rgba(121, 85, 72, 0.5); +} +.theme-brown .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-brown input[type="checkbox"]:checked + .checkbox:after { + background-color: #795548; +} +.theme-brown label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-brown i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-brown label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-brown input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-brown label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-brown input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-brown label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-brown input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-brown label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-brown input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-brown label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-brown input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-brown label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-brown input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #795548; + background-color: #795548; +} +.theme-brown label.label-radio i.icon-form-radio:after, +label.label-radio.theme-brown i.icon-form-radio:after { + background-color: #795548; +} +.theme-brown label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-brown input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-brown label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-brown input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-brown label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-brown input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-brown label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-brown input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-brown label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-brown input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-brown label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-brown input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #795548; +} +.theme-brown label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-brown input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-brown label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-brown input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-brown label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-brown input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-brown label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-brown input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-brown label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-brown input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-brown label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-brown input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #795548; +} +.theme-brown .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-brown input[type="checkbox"]:checked ~ i { + border-color: #795548; + background-color: #795548; +} +.theme-brown .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-brown input[type="radio"]:checked ~ i { + border-color: #795548; +} +.theme-brown .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-brown input[type="radio"]:checked ~ i:after { + background-color: #795548; +} +.theme-brown .form-checkbox .ripple-wave, +.theme-brown .form-radio .ripple-wave { + background: rgba(121, 85, 72, 0.5); +} +.theme-brown .focus-state .label, +.theme-brown .focus-state .floating-label { + color: #795548; +} +.theme-brown .item-input-field.focus-state:after, +.theme-brown .input-field.focus-state:after, +.theme-brown .item-input-field.not-empty-state:after, +.theme-brown .input-field.not-empty-state:after { + background: #795548; +} +.theme-brown .picker-calendar-day.picker-calendar-day-today span { + color: #795548; +} +.theme-brown .picker-calendar-day.picker-calendar-day-selected span { + background-color: #795548; + color: #fff; +} +.theme-brown .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #795548; +} +.theme-brown .picker-header { + background-color: #795548; +} +.theme-brown .modal-button { + color: #795548; +} +.theme-brown .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-brown .timeline-item-date { + background-color: #795548; +} +.theme-brown .timeline-year-title, +.theme-brown .timeline-month-title { + background-color: #795548; +} +.theme-brown .statusbar-overlay { + background-color: #3E2723; +} +.theme-brown .data-table .data-table-header-selected, +.data-table.theme-brown .data-table-header-selected { + background: rgba(121, 85, 72, 0.1); +} +.theme-brown .data-table .data-table-title-selected, +.data-table.theme-brown .data-table-title-selected { + color: #795548; +} +.swiper-pagination.color-brown .swiper-pagination-bullet-active, +.theme-brown .swiper-pagination .swiper-pagination-bullet-active { + background-color: #795548; +} +.swiper-pagination.color-brown .swiper-pagination-progressbar, +.theme-brown .swiper-pagination .swiper-pagination-progressbar { + background-color: #795548; +} +.swiper-pagination.swiper-pagination-progress.bg-brown { + background-color: rgba(121, 85, 72, 0.25); +} +.swiper-button-next.color-brown, +.swiper-container-rtl .swiper-button-prev.color-brown, +.theme-brown .swiper-button-next, +.theme-brown .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-brown, +.swiper-container-rtl .swiper-button-next.color-brown, +.theme-brown .swiper-button-prev, +.theme-brown .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E"); +} +.theme-brown .floating-button, +.theme-brown .speed-dial-buttons a, +.floating-button.theme-brown, +.speed-dial-buttons a.theme-brown { + color: #fff; + background: #795548; +} +html:not(.watch-active-state) .theme-brown .floating-button:active, +html:not(.watch-active-state) .theme-brown .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-brown:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-brown:active, +.theme-brown .floating-button.active-state, +.theme-brown .speed-dial-buttons a.active-state, +.floating-button.theme-brown.active-state, +.speed-dial-buttons a.theme-brown.active-state { + background: #5D4037; +} +.theme-brown .floating-button i, +.theme-brown .speed-dial-buttons a i, +.floating-button.theme-brown i, +.speed-dial-buttons a.theme-brown i { + color: inherit; +} +.theme-brown .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-brown input[type="range"]::-webkit-slider-thumb:before { + background-color: #795548; +} +.theme-brown .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-brown input[type="range"]::-webkit-slider-thumb { + background-color: #795548; +} +.theme-brown .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-brown input[type="range"]::-ms-thumb { + background-color: #795548; +} +.theme-brown .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-brown input[type="range"]::-ms-fill-lower { + background-color: #795548; +} +.theme-brown .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-brown input[type="range"]::-moz-range-thumb { + background-color: #795548; +} +.badge.theme-brown { + background-color: #795548; + color: #fff; +} +.theme-gray .button:not(.button-fill) { + color: #9e9e9e; +} +.theme-gray .navbar .button:not(.button-fill), +.theme-gray.navbar .button:not(.button-fill), +.theme-gray .toolbar .button:not(.button-fill), +.theme-gray.toolbar .button:not(.button-fill), +.theme-gray .subnavbar .button:not(.button-fill), +.theme-gray.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-gray .button.button-fill { + background: #9e9e9e; + color: #fff; +} +html:not(.watch-active-state) .theme-gray .button.button-fill:active, +.theme-gray .button.button-fill.active-state { + background: #616161; +} +.progressbar.theme-gray, +.theme-gray .progressbar { + background-color: rgba(158, 158, 158, 0.5); +} +.progressbar.theme-gray span, +.theme-gray .progressbar span { + background-color: #9e9e9e; +} +.progressbar-infinite.theme-gray, +.theme-gray .progressbar-infinite { + background-color: rgba(158, 158, 158, 0.5); +} +.progressbar-infinite.theme-gray:after, +.theme-gray .progressbar-infinite:after, +.progressbar-infinite.theme-gray:before, +.theme-gray .progressbar-infinite:before { + background-color: #9e9e9e; +} +.color-gray i.icon, +i.icon.color-gray { + color: #9e9e9e; +} +i.icon-next.color-gray, +i.icon-next.theme-gray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239e9e9e'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-gray, +i.icon-prev.theme-gray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239e9e9e'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-gray, +i.icon-back.theme-gray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-gray, +i.icon-forward.theme-gray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-gray, +i.icon-bars.theme-gray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E"); +} +.theme-gray a, +.theme-gray .card a { + color: #9e9e9e; +} +.theme-gray .navbar, +.navbar.theme-gray, +.theme-gray .toolbar, +.toolbar.theme-gray, +.theme-gray .subnavbar, +.subnavbar.theme-gray, +.theme-gray .searchbar, +.searchbar.theme-gray { + background-color: #9e9e9e; +} +.theme-gray .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-gray input[type="checkbox"]:checked + .checkbox { + background-color: rgba(158, 158, 158, 0.5); +} +.theme-gray .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-gray input[type="checkbox"]:checked + .checkbox:after { + background-color: #9e9e9e; +} +.theme-gray label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-gray i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-gray label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-gray input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-gray label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-gray input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-gray label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-gray input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-gray label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-gray input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-gray label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-gray input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-gray label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-gray input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #9e9e9e; + background-color: #9e9e9e; +} +.theme-gray label.label-radio i.icon-form-radio:after, +label.label-radio.theme-gray i.icon-form-radio:after { + background-color: #9e9e9e; +} +.theme-gray label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-gray input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-gray label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-gray input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-gray label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-gray input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-gray label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-gray input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-gray label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-gray input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-gray label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-gray input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #9e9e9e; +} +.theme-gray label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-gray input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-gray label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-gray input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-gray label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-gray input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-gray label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-gray input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-gray label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-gray input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-gray label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-gray input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #9e9e9e; +} +.theme-gray .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-gray input[type="checkbox"]:checked ~ i { + border-color: #9e9e9e; + background-color: #9e9e9e; +} +.theme-gray .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-gray input[type="radio"]:checked ~ i { + border-color: #9e9e9e; +} +.theme-gray .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-gray input[type="radio"]:checked ~ i:after { + background-color: #9e9e9e; +} +.theme-gray .form-checkbox .ripple-wave, +.theme-gray .form-radio .ripple-wave { + background: rgba(158, 158, 158, 0.5); +} +.theme-gray .focus-state .label, +.theme-gray .focus-state .floating-label { + color: #9e9e9e; +} +.theme-gray .item-input-field.focus-state:after, +.theme-gray .input-field.focus-state:after, +.theme-gray .item-input-field.not-empty-state:after, +.theme-gray .input-field.not-empty-state:after { + background: #9e9e9e; +} +.theme-gray .picker-calendar-day.picker-calendar-day-today span { + color: #9e9e9e; +} +.theme-gray .picker-calendar-day.picker-calendar-day-selected span { + background-color: #9e9e9e; + color: #fff; +} +.theme-gray .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #9e9e9e; +} +.theme-gray .picker-header { + background-color: #9e9e9e; +} +.theme-gray .modal-button { + color: #9e9e9e; +} +.theme-gray .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-gray .timeline-item-date { + background-color: #9e9e9e; +} +.theme-gray .timeline-year-title, +.theme-gray .timeline-month-title { + background-color: #9e9e9e; +} +.theme-gray .statusbar-overlay { + background-color: #212121; +} +.theme-gray .data-table .data-table-header-selected, +.data-table.theme-gray .data-table-header-selected { + background: rgba(158, 158, 158, 0.1); +} +.theme-gray .data-table .data-table-title-selected, +.data-table.theme-gray .data-table-title-selected { + color: #9e9e9e; +} +.swiper-pagination.color-gray .swiper-pagination-bullet-active, +.theme-gray .swiper-pagination .swiper-pagination-bullet-active { + background-color: #9e9e9e; +} +.swiper-pagination.color-gray .swiper-pagination-progressbar, +.theme-gray .swiper-pagination .swiper-pagination-progressbar { + background-color: #9e9e9e; +} +.swiper-pagination.swiper-pagination-progress.bg-gray { + background-color: rgba(158, 158, 158, 0.25); +} +.swiper-button-next.color-gray, +.swiper-container-rtl .swiper-button-prev.color-gray, +.theme-gray .swiper-button-next, +.theme-gray .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-gray, +.swiper-container-rtl .swiper-button-next.color-gray, +.theme-gray .swiper-button-prev, +.theme-gray .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E"); +} +.theme-gray .floating-button, +.theme-gray .speed-dial-buttons a, +.floating-button.theme-gray, +.speed-dial-buttons a.theme-gray { + color: #fff; + background: #9e9e9e; +} +html:not(.watch-active-state) .theme-gray .floating-button:active, +html:not(.watch-active-state) .theme-gray .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-gray:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-gray:active, +.theme-gray .floating-button.active-state, +.theme-gray .speed-dial-buttons a.active-state, +.floating-button.theme-gray.active-state, +.speed-dial-buttons a.theme-gray.active-state { + background: #616161; +} +.theme-gray .floating-button i, +.theme-gray .speed-dial-buttons a i, +.floating-button.theme-gray i, +.speed-dial-buttons a.theme-gray i { + color: inherit; +} +.theme-gray .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-gray input[type="range"]::-webkit-slider-thumb:before { + background-color: #9e9e9e; +} +.theme-gray .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-gray input[type="range"]::-webkit-slider-thumb { + background-color: #9e9e9e; +} +.theme-gray .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-gray input[type="range"]::-ms-thumb { + background-color: #9e9e9e; +} +.theme-gray .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-gray input[type="range"]::-ms-fill-lower { + background-color: #9e9e9e; +} +.theme-gray .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-gray input[type="range"]::-moz-range-thumb { + background-color: #9e9e9e; +} +.badge.theme-gray { + background-color: #9e9e9e; + color: #fff; +} +.theme-bluegray .button:not(.button-fill) { + color: #607d8b; +} +.theme-bluegray .navbar .button:not(.button-fill), +.theme-bluegray.navbar .button:not(.button-fill), +.theme-bluegray .toolbar .button:not(.button-fill), +.theme-bluegray.toolbar .button:not(.button-fill), +.theme-bluegray .subnavbar .button:not(.button-fill), +.theme-bluegray.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-bluegray .button.button-fill { + background: #607d8b; + color: #fff; +} +html:not(.watch-active-state) .theme-bluegray .button.button-fill:active, +.theme-bluegray .button.button-fill.active-state { + background: #455A64; +} +.progressbar.theme-bluegray, +.theme-bluegray .progressbar { + background-color: rgba(96, 125, 139, 0.5); +} +.progressbar.theme-bluegray span, +.theme-bluegray .progressbar span { + background-color: #607d8b; +} +.progressbar-infinite.theme-bluegray, +.theme-bluegray .progressbar-infinite { + background-color: rgba(96, 125, 139, 0.5); +} +.progressbar-infinite.theme-bluegray:after, +.theme-bluegray .progressbar-infinite:after, +.progressbar-infinite.theme-bluegray:before, +.theme-bluegray .progressbar-infinite:before { + background-color: #607d8b; +} +.color-bluegray i.icon, +i.icon.color-bluegray { + color: #607d8b; +} +i.icon-next.color-bluegray, +i.icon-next.theme-bluegray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23607d8b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-bluegray, +i.icon-prev.theme-bluegray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23607d8b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-bluegray, +i.icon-back.theme-bluegray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-bluegray, +i.icon-forward.theme-bluegray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-bluegray, +i.icon-bars.theme-bluegray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E"); +} +.theme-bluegray a, +.theme-bluegray .card a { + color: #607d8b; +} +.theme-bluegray .navbar, +.navbar.theme-bluegray, +.theme-bluegray .toolbar, +.toolbar.theme-bluegray, +.theme-bluegray .subnavbar, +.subnavbar.theme-bluegray, +.theme-bluegray .searchbar, +.searchbar.theme-bluegray { + background-color: #607d8b; +} +.theme-bluegray .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-bluegray input[type="checkbox"]:checked + .checkbox { + background-color: rgba(96, 125, 139, 0.5); +} +.theme-bluegray .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-bluegray input[type="checkbox"]:checked + .checkbox:after { + background-color: #607d8b; +} +.theme-bluegray label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-bluegray i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-bluegray label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-bluegray input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-bluegray label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-bluegray input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-bluegray label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-bluegray input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-bluegray label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-bluegray input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-bluegray label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-bluegray input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-bluegray label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-bluegray input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #607d8b; + background-color: #607d8b; +} +.theme-bluegray label.label-radio i.icon-form-radio:after, +label.label-radio.theme-bluegray i.icon-form-radio:after { + background-color: #607d8b; +} +.theme-bluegray label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-bluegray input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-bluegray label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-bluegray input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-bluegray label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-bluegray input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-bluegray label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-bluegray input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-bluegray label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-bluegray input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-bluegray label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-bluegray input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #607d8b; +} +.theme-bluegray label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-bluegray input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-bluegray label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-bluegray input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-bluegray label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-bluegray input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-bluegray label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-bluegray input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-bluegray label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-bluegray input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-bluegray label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-bluegray input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #607d8b; +} +.theme-bluegray .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-bluegray input[type="checkbox"]:checked ~ i { + border-color: #607d8b; + background-color: #607d8b; +} +.theme-bluegray .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-bluegray input[type="radio"]:checked ~ i { + border-color: #607d8b; +} +.theme-bluegray .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-bluegray input[type="radio"]:checked ~ i:after { + background-color: #607d8b; +} +.theme-bluegray .form-checkbox .ripple-wave, +.theme-bluegray .form-radio .ripple-wave { + background: rgba(96, 125, 139, 0.5); +} +.theme-bluegray .focus-state .label, +.theme-bluegray .focus-state .floating-label { + color: #607d8b; +} +.theme-bluegray .item-input-field.focus-state:after, +.theme-bluegray .input-field.focus-state:after, +.theme-bluegray .item-input-field.not-empty-state:after, +.theme-bluegray .input-field.not-empty-state:after { + background: #607d8b; +} +.theme-bluegray .picker-calendar-day.picker-calendar-day-today span { + color: #607d8b; +} +.theme-bluegray .picker-calendar-day.picker-calendar-day-selected span { + background-color: #607d8b; + color: #fff; +} +.theme-bluegray .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #607d8b; +} +.theme-bluegray .picker-header { + background-color: #607d8b; +} +.theme-bluegray .modal-button { + color: #607d8b; +} +.theme-bluegray .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-bluegray .timeline-item-date { + background-color: #607d8b; +} +.theme-bluegray .timeline-year-title, +.theme-bluegray .timeline-month-title { + background-color: #607d8b; +} +.theme-bluegray .statusbar-overlay { + background-color: #263238; +} +.theme-bluegray .data-table .data-table-header-selected, +.data-table.theme-bluegray .data-table-header-selected { + background: rgba(96, 125, 139, 0.1); +} +.theme-bluegray .data-table .data-table-title-selected, +.data-table.theme-bluegray .data-table-title-selected { + color: #607d8b; +} +.swiper-pagination.color-bluegray .swiper-pagination-bullet-active, +.theme-bluegray .swiper-pagination .swiper-pagination-bullet-active { + background-color: #607d8b; +} +.swiper-pagination.color-bluegray .swiper-pagination-progressbar, +.theme-bluegray .swiper-pagination .swiper-pagination-progressbar { + background-color: #607d8b; +} +.swiper-pagination.swiper-pagination-progress.bg-bluegray { + background-color: rgba(96, 125, 139, 0.25); +} +.swiper-button-next.color-bluegray, +.swiper-container-rtl .swiper-button-prev.color-bluegray, +.theme-bluegray .swiper-button-next, +.theme-bluegray .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-bluegray, +.swiper-container-rtl .swiper-button-next.color-bluegray, +.theme-bluegray .swiper-button-prev, +.theme-bluegray .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E"); +} +.theme-bluegray .floating-button, +.theme-bluegray .speed-dial-buttons a, +.floating-button.theme-bluegray, +.speed-dial-buttons a.theme-bluegray { + color: #fff; + background: #607d8b; +} +html:not(.watch-active-state) .theme-bluegray .floating-button:active, +html:not(.watch-active-state) .theme-bluegray .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-bluegray:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-bluegray:active, +.theme-bluegray .floating-button.active-state, +.theme-bluegray .speed-dial-buttons a.active-state, +.floating-button.theme-bluegray.active-state, +.speed-dial-buttons a.theme-bluegray.active-state { + background: #455A64; +} +.theme-bluegray .floating-button i, +.theme-bluegray .speed-dial-buttons a i, +.floating-button.theme-bluegray i, +.speed-dial-buttons a.theme-bluegray i { + color: inherit; +} +.theme-bluegray .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-bluegray input[type="range"]::-webkit-slider-thumb:before { + background-color: #607d8b; +} +.theme-bluegray .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-bluegray input[type="range"]::-webkit-slider-thumb { + background-color: #607d8b; +} +.theme-bluegray .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-bluegray input[type="range"]::-ms-thumb { + background-color: #607d8b; +} +.theme-bluegray .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-bluegray input[type="range"]::-ms-fill-lower { + background-color: #607d8b; +} +.theme-bluegray .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-bluegray input[type="range"]::-moz-range-thumb { + background-color: #607d8b; +} +.badge.theme-bluegray { + background-color: #607d8b; + color: #fff; +} +.theme-white .button:not(.button-fill) { + color: #ffffff; +} +.theme-white .navbar .button:not(.button-fill), +.theme-white.navbar .button:not(.button-fill), +.theme-white .toolbar .button:not(.button-fill), +.theme-white.toolbar .button:not(.button-fill), +.theme-white .subnavbar .button:not(.button-fill), +.theme-white.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-white .button.button-fill { + background: #ffffff; + color: #fff; +} +html:not(.watch-active-state) .theme-white .button.button-fill:active, +.theme-white .button.button-fill.active-state { + background: rgba(0, 0, 0, 0.1); +} +.progressbar.theme-white, +.theme-white .progressbar { + background-color: rgba(255, 255, 255, 0.5); +} +.progressbar.theme-white span, +.theme-white .progressbar span { + background-color: #ffffff; +} +.progressbar-infinite.theme-white, +.theme-white .progressbar-infinite { + background-color: rgba(255, 255, 255, 0.5); +} +.progressbar-infinite.theme-white:after, +.theme-white .progressbar-infinite:after, +.progressbar-infinite.theme-white:before, +.theme-white .progressbar-infinite:before { + background-color: #ffffff; +} +.color-white i.icon, +i.icon.color-white { + color: #ffffff; +} +i.icon-next.color-white, +i.icon-next.theme-white { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-white, +i.icon-prev.theme-white { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-white, +i.icon-back.theme-white { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-white, +i.icon-forward.theme-white { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-white, +i.icon-bars.theme-white { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +.theme-white a, +.theme-white .card a { + color: #ffffff; +} +.theme-white .navbar, +.navbar.theme-white, +.theme-white .toolbar, +.toolbar.theme-white, +.theme-white .subnavbar, +.subnavbar.theme-white, +.theme-white .searchbar, +.searchbar.theme-white { + background-color: #ffffff; +} +.theme-white .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-white input[type="checkbox"]:checked + .checkbox { + background-color: rgba(255, 255, 255, 0.5); +} +.theme-white .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-white input[type="checkbox"]:checked + .checkbox:after { + background-color: #ffffff; +} +.theme-white label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-white i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-white label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-white input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-white label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-white input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-white label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-white input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-white label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-white input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-white label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-white input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-white label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-white input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #ffffff; + background-color: #ffffff; +} +.theme-white label.label-radio i.icon-form-radio:after, +label.label-radio.theme-white i.icon-form-radio:after { + background-color: #ffffff; +} +.theme-white label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-white input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-white label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-white input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-white label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-white input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-white label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-white input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-white label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-white input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-white label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-white input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #ffffff; +} +.theme-white label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-white input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-white label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-white input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-white label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-white input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-white label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-white input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-white label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-white input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-white label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-white input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #ffffff; +} +.theme-white .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-white input[type="checkbox"]:checked ~ i { + border-color: #ffffff; + background-color: #ffffff; +} +.theme-white .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-white input[type="radio"]:checked ~ i { + border-color: #ffffff; +} +.theme-white .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-white input[type="radio"]:checked ~ i:after { + background-color: #ffffff; +} +.theme-white .form-checkbox .ripple-wave, +.theme-white .form-radio .ripple-wave { + background: rgba(255, 255, 255, 0.5); +} +.theme-white .focus-state .label, +.theme-white .focus-state .floating-label { + color: #ffffff; +} +.theme-white .item-input-field.focus-state:after, +.theme-white .input-field.focus-state:after, +.theme-white .item-input-field.not-empty-state:after, +.theme-white .input-field.not-empty-state:after { + background: #ffffff; +} +.theme-white .picker-calendar-day.picker-calendar-day-today span { + color: #ffffff; +} +.theme-white .picker-calendar-day.picker-calendar-day-selected span { + background-color: #ffffff; + color: #fff; +} +.theme-white .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #ffffff; +} +.theme-white .picker-header { + background-color: #ffffff; +} +.theme-white .modal-button { + color: #ffffff; +} +.theme-white .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-white .timeline-item-date { + background-color: #ffffff; +} +.theme-white .timeline-year-title, +.theme-white .timeline-month-title { + background-color: #ffffff; +} +.theme-white .statusbar-overlay { + background-color: #ffffff; +} +.theme-white .data-table .data-table-header-selected, +.data-table.theme-white .data-table-header-selected { + background: rgba(255, 255, 255, 0.1); +} +.theme-white .data-table .data-table-title-selected, +.data-table.theme-white .data-table-title-selected { + color: #ffffff; +} +.swiper-pagination.color-white .swiper-pagination-bullet-active, +.theme-white .swiper-pagination .swiper-pagination-bullet-active { + background-color: #ffffff; +} +.swiper-pagination.color-white .swiper-pagination-progressbar, +.theme-white .swiper-pagination .swiper-pagination-progressbar { + background-color: #ffffff; +} +.swiper-pagination.swiper-pagination-progress.bg-white { + background-color: rgba(255, 255, 255, 0.25); +} +.swiper-button-next.color-white, +.swiper-container-rtl .swiper-button-prev.color-white, +.theme-white .swiper-button-next, +.theme-white .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-white, +.swiper-container-rtl .swiper-button-next.color-white, +.theme-white .swiper-button-prev, +.theme-white .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +.theme-white .floating-button, +.theme-white .speed-dial-buttons a, +.floating-button.theme-white, +.speed-dial-buttons a.theme-white { + color: #fff; + background: #ffffff; +} +html:not(.watch-active-state) .theme-white .floating-button:active, +html:not(.watch-active-state) .theme-white .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-white:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-white:active, +.theme-white .floating-button.active-state, +.theme-white .speed-dial-buttons a.active-state, +.floating-button.theme-white.active-state, +.speed-dial-buttons a.theme-white.active-state { + background: rgba(0, 0, 0, 0.1); +} +.theme-white .floating-button i, +.theme-white .speed-dial-buttons a i, +.floating-button.theme-white i, +.speed-dial-buttons a.theme-white i { + color: inherit; +} +.theme-white .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-white input[type="range"]::-webkit-slider-thumb:before { + background-color: #ffffff; +} +.theme-white .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-white input[type="range"]::-webkit-slider-thumb { + background-color: #ffffff; +} +.theme-white .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-white input[type="range"]::-ms-thumb { + background-color: #ffffff; +} +.theme-white .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-white input[type="range"]::-ms-fill-lower { + background-color: #ffffff; +} +.theme-white .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-white input[type="range"]::-moz-range-thumb { + background-color: #ffffff; +} +.badge.theme-white { + background-color: #ffffff; + color: #fff; +} +.theme-black .button:not(.button-fill) { + color: #000000; +} +.theme-black .navbar .button:not(.button-fill), +.theme-black.navbar .button:not(.button-fill), +.theme-black .toolbar .button:not(.button-fill), +.theme-black.toolbar .button:not(.button-fill), +.theme-black .subnavbar .button:not(.button-fill), +.theme-black.subnavbar .button:not(.button-fill) { + color: #fff; +} +.theme-black .button.button-fill { + background: #000000; + color: #fff; +} +html:not(.watch-active-state) .theme-black .button.button-fill:active, +.theme-black .button.button-fill.active-state { + background: #333; +} +.progressbar.theme-black, +.theme-black .progressbar { + background-color: rgba(0, 0, 0, 0.5); +} +.progressbar.theme-black span, +.theme-black .progressbar span { + background-color: #000000; +} +.progressbar-infinite.theme-black, +.theme-black .progressbar-infinite { + background-color: rgba(0, 0, 0, 0.5); +} +.progressbar-infinite.theme-black:after, +.theme-black .progressbar-infinite:after, +.progressbar-infinite.theme-black:before, +.theme-black .progressbar-infinite:before { + background-color: #000000; +} +.color-black i.icon, +i.icon.color-black { + color: #000000; +} +i.icon-next.color-black, +i.icon-next.theme-black { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23000000'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-black, +i.icon-prev.theme-black { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23000000'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-black, +i.icon-back.theme-black { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-black, +i.icon-forward.theme-black { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-bars.color-black, +i.icon-bars.theme-black { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +.theme-black a, +.theme-black .card a { + color: #000000; +} +.theme-black .navbar, +.navbar.theme-black, +.theme-black .toolbar, +.toolbar.theme-black, +.theme-black .subnavbar, +.subnavbar.theme-black, +.theme-black .searchbar, +.searchbar.theme-black { + background-color: #000000; +} +.theme-black .label-switch input[type="checkbox"]:checked + .checkbox, +.label-switch.theme-black input[type="checkbox"]:checked + .checkbox { + background-color: rgba(0, 0, 0, 0.5); +} +.theme-black .label-switch input[type="checkbox"]:checked + .checkbox:after, +.label-switch.theme-black input[type="checkbox"]:checked + .checkbox:after { + background-color: #000000; +} +.theme-black label.label-checkbox i.icon-form-checkbox:after, +label.label-checkbox.theme-black i.icon-form-checkbox:after { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); +} +.theme-black label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-black input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +.theme-black label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox.theme-black input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.theme-black label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-black input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +.theme-black label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox.theme-black input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +.theme-black label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-black input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +.theme-black label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox.theme-black input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox { + border-color: #000000; + background-color: #000000; +} +.theme-black label.label-radio i.icon-form-radio:after, +label.label-radio.theme-black i.icon-form-radio:after { + background-color: #000000; +} +.theme-black label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-black input[type="checkbox"]:checked + .item-media i.icon-form-radio, +.theme-black label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio.theme-black input[type="radio"]:checked + .item-media i.icon-form-radio, +.theme-black label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-black input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +.theme-black label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio.theme-black input[type="radio"]:checked ~ .item-after i.icon-form-radio, +.theme-black label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-black input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +.theme-black label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio.theme-black input[type="radio"]:checked ~ .item-inner i.icon-form-radio { + border-color: #000000; +} +.theme-black label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-black input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +.theme-black label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio.theme-black input[type="radio"]:checked + .item-media i.icon-form-radio:after, +.theme-black label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-black input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +.theme-black label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio.theme-black input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +.theme-black label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-black input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +.theme-black label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio.theme-black input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after { + background-color: #000000; +} +.theme-black .form-checkbox input[type="checkbox"]:checked ~ i, +.form-checkbox.theme-black input[type="checkbox"]:checked ~ i { + border-color: #000000; + background-color: #000000; +} +.theme-black .form-radio input[type="radio"]:checked ~ i, +.form-radio.theme-black input[type="radio"]:checked ~ i { + border-color: #000000; +} +.theme-black .form-radio input[type="radio"]:checked ~ i:after, +.form-radio.theme-black input[type="radio"]:checked ~ i:after { + background-color: #000000; +} +.theme-black .form-checkbox .ripple-wave, +.theme-black .form-radio .ripple-wave { + background: rgba(0, 0, 0, 0.5); +} +.theme-black .focus-state .label, +.theme-black .focus-state .floating-label { + color: #000000; +} +.theme-black .item-input-field.focus-state:after, +.theme-black .input-field.focus-state:after, +.theme-black .item-input-field.not-empty-state:after, +.theme-black .input-field.not-empty-state:after { + background: #000000; +} +.theme-black .picker-calendar-day.picker-calendar-day-today span { + color: #000000; +} +.theme-black .picker-calendar-day.picker-calendar-day-selected span { + background-color: #000000; + color: #fff; +} +.theme-black .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: #000000; +} +.theme-black .picker-header { + background-color: #000000; +} +.theme-black .modal-button { + color: #000000; +} +.theme-black .timeline-horizontal .timeline-item-date, +.timeline-horizontal.theme-black .timeline-item-date { + background-color: #000000; +} +.theme-black .timeline-year-title, +.theme-black .timeline-month-title { + background-color: #000000; +} +.theme-black .statusbar-overlay { + background-color: #000000; +} +.theme-black .data-table .data-table-header-selected, +.data-table.theme-black .data-table-header-selected { + background: rgba(0, 0, 0, 0.1); +} +.theme-black .data-table .data-table-title-selected, +.data-table.theme-black .data-table-title-selected { + color: #000000; +} +.swiper-pagination.color-black .swiper-pagination-bullet-active, +.theme-black .swiper-pagination .swiper-pagination-bullet-active { + background-color: #000000; +} +.swiper-pagination.color-black .swiper-pagination-progressbar, +.theme-black .swiper-pagination .swiper-pagination-progressbar { + background-color: #000000; +} +.swiper-pagination.swiper-pagination-progress.bg-black { + background-color: rgba(0, 0, 0, 0.25); +} +.swiper-button-next.color-black, +.swiper-container-rtl .swiper-button-prev.color-black, +.theme-black .swiper-button-next, +.theme-black .swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +.swiper-button-prev.color-black, +.swiper-container-rtl .swiper-button-next.color-black, +.theme-black .swiper-button-prev, +.theme-black .swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +.theme-black .floating-button, +.theme-black .speed-dial-buttons a, +.floating-button.theme-black, +.speed-dial-buttons a.theme-black { + color: #fff; + background: #000000; +} +html:not(.watch-active-state) .theme-black .floating-button:active, +html:not(.watch-active-state) .theme-black .speed-dial-buttons a:active, +html:not(.watch-active-state) .floating-button.theme-black:active, +html:not(.watch-active-state) .speed-dial-buttons a.theme-black:active, +.theme-black .floating-button.active-state, +.theme-black .speed-dial-buttons a.active-state, +.floating-button.theme-black.active-state, +.speed-dial-buttons a.theme-black.active-state { + background: #333; +} +.theme-black .floating-button i, +.theme-black .speed-dial-buttons a i, +.floating-button.theme-black i, +.speed-dial-buttons a.theme-black i { + color: inherit; +} +.theme-black .range-slider input[type="range"]::-webkit-slider-thumb:before, +.range-slider.theme-black input[type="range"]::-webkit-slider-thumb:before { + background-color: #000000; +} +.theme-black .range-slider input[type="range"]::-webkit-slider-thumb, +.range-slider.theme-black input[type="range"]::-webkit-slider-thumb { + background-color: #000000; +} +.theme-black .range-slider input[type="range"]::-ms-thumb, +.range-slider.theme-black input[type="range"]::-ms-thumb { + background-color: #000000; +} +.theme-black .range-slider input[type="range"]::-ms-fill-lower, +.range-slider.theme-black input[type="range"]::-ms-fill-lower { + background-color: #000000; +} +.theme-black .range-slider input[type="range"]::-moz-range-thumb, +.range-slider.theme-black input[type="range"]::-moz-range-thumb { + background-color: #000000; +} +.badge.theme-black { + background-color: #000000; + color: #fff; +} +/*========================== +Framework7 Color + Bg + Border +==========================*/ +.color-red { + color: #f44336; +} +.list-block .item-link.list-button.color-red, +.list-button.color-red, +.list-block .item-link.color-red, +.tabbar a.active.color-red, +a.color-red { + color: #f44336; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-red, +.label-switch.color-red input[type="checkbox"]:checked + .checkbox { + background-color: #f44336; +} +.button.color-red:not(.button-fill), +.color-red.buttons-row .button:not(.button-fill) { + color: #f44336 !important; +} +.button.button-fill.bg-red, +.button.button-fill.color-red { + background: #f44336 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-red:active, +html:not(.watch-active-state) .button.button-fill.color-red:active, +.button.button-fill.bg-red.active-state, +.button.button-fill.color-red.active-state { + background: #D32F2F !important; +} +.progressbar.color-red, +.progressbar.bg-red { + background-color: rgba(244, 67, 54, 0.5); +} +.progressbar.color-red span, +.progressbar.bg-red span { + background-color: #f44336; +} +.progressbar-infinite.color-red, +.progressbar-infinite.bg-red { + background-color: rgba(244, 67, 54, 0.5); +} +.progressbar-infinite.color-red:after, +.progressbar-infinite.bg-red:after, +.progressbar-infinite.color-red:before, +.progressbar-infinite.bg-red:before { + background-color: #f44336; +} +.color-red i.icon, +i.icon.color-red { + color: #f44336; +} +.preloader.color-red svg circle, +.preloader.preloader-red svg circle { + stroke: #f44336; +} +.preloader.color-red .preloader-inner-gap, +.preloader.preloader-red .preloader-inner-gap, +.preloader.color-red .preloader-inner-half-circle, +.preloader.preloader-red .preloader-inner-half-circle { + border-color: #f44336; +} +.bg-red, +a.bg-red, +.list-block .swipeout-actions-left a.bg-red, +.list-block .swipeout-actions-right a.bg-red { + background-color: #f44336; +} +html:not(.watch-active-state) .list-block .bg-red .item-link:active, +html:not(.watch-active-state) .list-block a.bg-red .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-red .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-red .item-link:active, +html:not(.watch-active-state) .list-block.bg-red .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-red .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-red .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-red .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-red:active, +html:not(.watch-active-state) .list-block .item-linka.bg-red:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-red:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-red:active, +.list-block .bg-red .item-link.active-state, +.list-block a.bg-red .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-red .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-red .item-link.active-state, +.list-block.bg-red .item-link.active-state, +.list-blocka.bg-red .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-red .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-red .item-link.active-state, +.list-block .item-link.bg-red.active-state, +.list-block .item-linka.bg-red.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-red.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-red.active-state { + background: #D32F2F; +} +.border-red { + border-color: #f44336; +} +.list-block .border-red.item-inner:after, +.list-block ul.border-red:after, +.border-red:after, +.list-block .border-red.item-inner:before, +.list-block ul.border-red:before, +.border-red:before { + background-color: #f44336; +} +.floating-button.color-red, +.speed-dial-buttons a.color-red, +.floating-button.bg-red, +.speed-dial-buttons a.bg-red { + color: #fff; + background: #f44336; +} +html:not(.watch-active-state) .floating-button.color-red:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-red:active, +html:not(.watch-active-state) .floating-button.bg-red:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-red:active, +.floating-button.color-red.active-state, +.speed-dial-buttons a.color-red.active-state, +.floating-button.bg-red.active-state, +.speed-dial-buttons a.bg-red.active-state { + background: #D32F2F; +} +.floating-button.color-red i, +.speed-dial-buttons a.color-red i, +.floating-button.bg-red i, +.speed-dial-buttons a.bg-red i { + color: inherit; +} +.ripple-red .ripple-wave { + background-color: rgba(244, 67, 54, 0.3); +} +.range-slider.color-red input[type="range"]::-webkit-slider-thumb:before { + background-color: #f44336; +} +.range-slider.color-red input[type="range"]::-webkit-slider-thumb { + background-color: #f44336; +} +.range-slider.color-red input[type="range"]::-ms-thumb { + background-color: #f44336; +} +.range-slider.color-red input[type="range"]::-ms-fill-lower { + background-color: #f44336; +} +.range-slider.color-red input[type="range"]::-moz-range-thumb { + background-color: #f44336; +} +.badge.color-red { + background-color: #f44336; + color: #fff; +} +.color-pink { + color: #e91e63; +} +.list-block .item-link.list-button.color-pink, +.list-button.color-pink, +.list-block .item-link.color-pink, +.tabbar a.active.color-pink, +a.color-pink { + color: #e91e63; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-pink, +.label-switch.color-pink input[type="checkbox"]:checked + .checkbox { + background-color: #e91e63; +} +.button.color-pink:not(.button-fill), +.color-pink.buttons-row .button:not(.button-fill) { + color: #e91e63 !important; +} +.button.button-fill.bg-pink, +.button.button-fill.color-pink { + background: #e91e63 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-pink:active, +html:not(.watch-active-state) .button.button-fill.color-pink:active, +.button.button-fill.bg-pink.active-state, +.button.button-fill.color-pink.active-state { + background: #C2185B !important; +} +.progressbar.color-pink, +.progressbar.bg-pink { + background-color: rgba(233, 30, 99, 0.5); +} +.progressbar.color-pink span, +.progressbar.bg-pink span { + background-color: #e91e63; +} +.progressbar-infinite.color-pink, +.progressbar-infinite.bg-pink { + background-color: rgba(233, 30, 99, 0.5); +} +.progressbar-infinite.color-pink:after, +.progressbar-infinite.bg-pink:after, +.progressbar-infinite.color-pink:before, +.progressbar-infinite.bg-pink:before { + background-color: #e91e63; +} +.color-pink i.icon, +i.icon.color-pink { + color: #e91e63; +} +.preloader.color-pink svg circle, +.preloader.preloader-pink svg circle { + stroke: #e91e63; +} +.preloader.color-pink .preloader-inner-gap, +.preloader.preloader-pink .preloader-inner-gap, +.preloader.color-pink .preloader-inner-half-circle, +.preloader.preloader-pink .preloader-inner-half-circle { + border-color: #e91e63; +} +.bg-pink, +a.bg-pink, +.list-block .swipeout-actions-left a.bg-pink, +.list-block .swipeout-actions-right a.bg-pink { + background-color: #e91e63; +} +html:not(.watch-active-state) .list-block .bg-pink .item-link:active, +html:not(.watch-active-state) .list-block a.bg-pink .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-pink .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-pink .item-link:active, +html:not(.watch-active-state) .list-block.bg-pink .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-pink .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-pink .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-pink .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-pink:active, +html:not(.watch-active-state) .list-block .item-linka.bg-pink:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-pink:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-pink:active, +.list-block .bg-pink .item-link.active-state, +.list-block a.bg-pink .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-pink .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-pink .item-link.active-state, +.list-block.bg-pink .item-link.active-state, +.list-blocka.bg-pink .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-pink .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-pink .item-link.active-state, +.list-block .item-link.bg-pink.active-state, +.list-block .item-linka.bg-pink.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-pink.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-pink.active-state { + background: #C2185B; +} +.border-pink { + border-color: #e91e63; +} +.list-block .border-pink.item-inner:after, +.list-block ul.border-pink:after, +.border-pink:after, +.list-block .border-pink.item-inner:before, +.list-block ul.border-pink:before, +.border-pink:before { + background-color: #e91e63; +} +.floating-button.color-pink, +.speed-dial-buttons a.color-pink, +.floating-button.bg-pink, +.speed-dial-buttons a.bg-pink { + color: #fff; + background: #e91e63; +} +html:not(.watch-active-state) .floating-button.color-pink:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-pink:active, +html:not(.watch-active-state) .floating-button.bg-pink:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-pink:active, +.floating-button.color-pink.active-state, +.speed-dial-buttons a.color-pink.active-state, +.floating-button.bg-pink.active-state, +.speed-dial-buttons a.bg-pink.active-state { + background: #C2185B; +} +.floating-button.color-pink i, +.speed-dial-buttons a.color-pink i, +.floating-button.bg-pink i, +.speed-dial-buttons a.bg-pink i { + color: inherit; +} +.ripple-pink .ripple-wave { + background-color: rgba(233, 30, 99, 0.3); +} +.range-slider.color-pink input[type="range"]::-webkit-slider-thumb:before { + background-color: #e91e63; +} +.range-slider.color-pink input[type="range"]::-webkit-slider-thumb { + background-color: #e91e63; +} +.range-slider.color-pink input[type="range"]::-ms-thumb { + background-color: #e91e63; +} +.range-slider.color-pink input[type="range"]::-ms-fill-lower { + background-color: #e91e63; +} +.range-slider.color-pink input[type="range"]::-moz-range-thumb { + background-color: #e91e63; +} +.badge.color-pink { + background-color: #e91e63; + color: #fff; +} +.color-purple { + color: #9c27b0; +} +.list-block .item-link.list-button.color-purple, +.list-button.color-purple, +.list-block .item-link.color-purple, +.tabbar a.active.color-purple, +a.color-purple { + color: #9c27b0; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-purple, +.label-switch.color-purple input[type="checkbox"]:checked + .checkbox { + background-color: #9c27b0; +} +.button.color-purple:not(.button-fill), +.color-purple.buttons-row .button:not(.button-fill) { + color: #9c27b0 !important; +} +.button.button-fill.bg-purple, +.button.button-fill.color-purple { + background: #9c27b0 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-purple:active, +html:not(.watch-active-state) .button.button-fill.color-purple:active, +.button.button-fill.bg-purple.active-state, +.button.button-fill.color-purple.active-state { + background: #7B1FA2 !important; +} +.progressbar.color-purple, +.progressbar.bg-purple { + background-color: rgba(156, 39, 176, 0.5); +} +.progressbar.color-purple span, +.progressbar.bg-purple span { + background-color: #9c27b0; +} +.progressbar-infinite.color-purple, +.progressbar-infinite.bg-purple { + background-color: rgba(156, 39, 176, 0.5); +} +.progressbar-infinite.color-purple:after, +.progressbar-infinite.bg-purple:after, +.progressbar-infinite.color-purple:before, +.progressbar-infinite.bg-purple:before { + background-color: #9c27b0; +} +.color-purple i.icon, +i.icon.color-purple { + color: #9c27b0; +} +.preloader.color-purple svg circle, +.preloader.preloader-purple svg circle { + stroke: #9c27b0; +} +.preloader.color-purple .preloader-inner-gap, +.preloader.preloader-purple .preloader-inner-gap, +.preloader.color-purple .preloader-inner-half-circle, +.preloader.preloader-purple .preloader-inner-half-circle { + border-color: #9c27b0; +} +.bg-purple, +a.bg-purple, +.list-block .swipeout-actions-left a.bg-purple, +.list-block .swipeout-actions-right a.bg-purple { + background-color: #9c27b0; +} +html:not(.watch-active-state) .list-block .bg-purple .item-link:active, +html:not(.watch-active-state) .list-block a.bg-purple .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-purple .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-purple .item-link:active, +html:not(.watch-active-state) .list-block.bg-purple .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-purple .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-purple .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-purple .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-purple:active, +html:not(.watch-active-state) .list-block .item-linka.bg-purple:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-purple:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-purple:active, +.list-block .bg-purple .item-link.active-state, +.list-block a.bg-purple .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-purple .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-purple .item-link.active-state, +.list-block.bg-purple .item-link.active-state, +.list-blocka.bg-purple .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-purple .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-purple .item-link.active-state, +.list-block .item-link.bg-purple.active-state, +.list-block .item-linka.bg-purple.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-purple.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-purple.active-state { + background: #7B1FA2; +} +.border-purple { + border-color: #9c27b0; +} +.list-block .border-purple.item-inner:after, +.list-block ul.border-purple:after, +.border-purple:after, +.list-block .border-purple.item-inner:before, +.list-block ul.border-purple:before, +.border-purple:before { + background-color: #9c27b0; +} +.floating-button.color-purple, +.speed-dial-buttons a.color-purple, +.floating-button.bg-purple, +.speed-dial-buttons a.bg-purple { + color: #fff; + background: #9c27b0; +} +html:not(.watch-active-state) .floating-button.color-purple:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-purple:active, +html:not(.watch-active-state) .floating-button.bg-purple:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-purple:active, +.floating-button.color-purple.active-state, +.speed-dial-buttons a.color-purple.active-state, +.floating-button.bg-purple.active-state, +.speed-dial-buttons a.bg-purple.active-state { + background: #7B1FA2; +} +.floating-button.color-purple i, +.speed-dial-buttons a.color-purple i, +.floating-button.bg-purple i, +.speed-dial-buttons a.bg-purple i { + color: inherit; +} +.ripple-purple .ripple-wave { + background-color: rgba(156, 39, 176, 0.3); +} +.range-slider.color-purple input[type="range"]::-webkit-slider-thumb:before { + background-color: #9c27b0; +} +.range-slider.color-purple input[type="range"]::-webkit-slider-thumb { + background-color: #9c27b0; +} +.range-slider.color-purple input[type="range"]::-ms-thumb { + background-color: #9c27b0; +} +.range-slider.color-purple input[type="range"]::-ms-fill-lower { + background-color: #9c27b0; +} +.range-slider.color-purple input[type="range"]::-moz-range-thumb { + background-color: #9c27b0; +} +.badge.color-purple { + background-color: #9c27b0; + color: #fff; +} +.color-deeppurple { + color: #673ab7; +} +.list-block .item-link.list-button.color-deeppurple, +.list-button.color-deeppurple, +.list-block .item-link.color-deeppurple, +.tabbar a.active.color-deeppurple, +a.color-deeppurple { + color: #673ab7; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-deeppurple, +.label-switch.color-deeppurple input[type="checkbox"]:checked + .checkbox { + background-color: #673ab7; +} +.button.color-deeppurple:not(.button-fill), +.color-deeppurple.buttons-row .button:not(.button-fill) { + color: #673ab7 !important; +} +.button.button-fill.bg-deeppurple, +.button.button-fill.color-deeppurple { + background: #673ab7 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-deeppurple:active, +html:not(.watch-active-state) .button.button-fill.color-deeppurple:active, +.button.button-fill.bg-deeppurple.active-state, +.button.button-fill.color-deeppurple.active-state { + background: #512DA8 !important; +} +.progressbar.color-deeppurple, +.progressbar.bg-deeppurple { + background-color: rgba(103, 58, 183, 0.5); +} +.progressbar.color-deeppurple span, +.progressbar.bg-deeppurple span { + background-color: #673ab7; +} +.progressbar-infinite.color-deeppurple, +.progressbar-infinite.bg-deeppurple { + background-color: rgba(103, 58, 183, 0.5); +} +.progressbar-infinite.color-deeppurple:after, +.progressbar-infinite.bg-deeppurple:after, +.progressbar-infinite.color-deeppurple:before, +.progressbar-infinite.bg-deeppurple:before { + background-color: #673ab7; +} +.color-deeppurple i.icon, +i.icon.color-deeppurple { + color: #673ab7; +} +.preloader.color-deeppurple svg circle, +.preloader.preloader-deeppurple svg circle { + stroke: #673ab7; +} +.preloader.color-deeppurple .preloader-inner-gap, +.preloader.preloader-deeppurple .preloader-inner-gap, +.preloader.color-deeppurple .preloader-inner-half-circle, +.preloader.preloader-deeppurple .preloader-inner-half-circle { + border-color: #673ab7; +} +.bg-deeppurple, +a.bg-deeppurple, +.list-block .swipeout-actions-left a.bg-deeppurple, +.list-block .swipeout-actions-right a.bg-deeppurple { + background-color: #673ab7; +} +html:not(.watch-active-state) .list-block .bg-deeppurple .item-link:active, +html:not(.watch-active-state) .list-block a.bg-deeppurple .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-deeppurple .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-deeppurple .item-link:active, +html:not(.watch-active-state) .list-block.bg-deeppurple .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-deeppurple .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-deeppurple .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-deeppurple .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-deeppurple:active, +html:not(.watch-active-state) .list-block .item-linka.bg-deeppurple:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-deeppurple:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-deeppurple:active, +.list-block .bg-deeppurple .item-link.active-state, +.list-block a.bg-deeppurple .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-deeppurple .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-deeppurple .item-link.active-state, +.list-block.bg-deeppurple .item-link.active-state, +.list-blocka.bg-deeppurple .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-deeppurple .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-deeppurple .item-link.active-state, +.list-block .item-link.bg-deeppurple.active-state, +.list-block .item-linka.bg-deeppurple.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-deeppurple.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-deeppurple.active-state { + background: #512DA8; +} +.border-deeppurple { + border-color: #673ab7; +} +.list-block .border-deeppurple.item-inner:after, +.list-block ul.border-deeppurple:after, +.border-deeppurple:after, +.list-block .border-deeppurple.item-inner:before, +.list-block ul.border-deeppurple:before, +.border-deeppurple:before { + background-color: #673ab7; +} +.floating-button.color-deeppurple, +.speed-dial-buttons a.color-deeppurple, +.floating-button.bg-deeppurple, +.speed-dial-buttons a.bg-deeppurple { + color: #fff; + background: #673ab7; +} +html:not(.watch-active-state) .floating-button.color-deeppurple:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-deeppurple:active, +html:not(.watch-active-state) .floating-button.bg-deeppurple:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-deeppurple:active, +.floating-button.color-deeppurple.active-state, +.speed-dial-buttons a.color-deeppurple.active-state, +.floating-button.bg-deeppurple.active-state, +.speed-dial-buttons a.bg-deeppurple.active-state { + background: #512DA8; +} +.floating-button.color-deeppurple i, +.speed-dial-buttons a.color-deeppurple i, +.floating-button.bg-deeppurple i, +.speed-dial-buttons a.bg-deeppurple i { + color: inherit; +} +.ripple-deeppurple .ripple-wave { + background-color: rgba(103, 58, 183, 0.3); +} +.range-slider.color-deeppurple input[type="range"]::-webkit-slider-thumb:before { + background-color: #673ab7; +} +.range-slider.color-deeppurple input[type="range"]::-webkit-slider-thumb { + background-color: #673ab7; +} +.range-slider.color-deeppurple input[type="range"]::-ms-thumb { + background-color: #673ab7; +} +.range-slider.color-deeppurple input[type="range"]::-ms-fill-lower { + background-color: #673ab7; +} +.range-slider.color-deeppurple input[type="range"]::-moz-range-thumb { + background-color: #673ab7; +} +.badge.color-deeppurple { + background-color: #673ab7; + color: #fff; +} +.color-indigo { + color: #3f51b5; +} +.list-block .item-link.list-button.color-indigo, +.list-button.color-indigo, +.list-block .item-link.color-indigo, +.tabbar a.active.color-indigo, +a.color-indigo { + color: #3f51b5; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-indigo, +.label-switch.color-indigo input[type="checkbox"]:checked + .checkbox { + background-color: #3f51b5; +} +.button.color-indigo:not(.button-fill), +.color-indigo.buttons-row .button:not(.button-fill) { + color: #3f51b5 !important; +} +.button.button-fill.bg-indigo, +.button.button-fill.color-indigo { + background: #3f51b5 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-indigo:active, +html:not(.watch-active-state) .button.button-fill.color-indigo:active, +.button.button-fill.bg-indigo.active-state, +.button.button-fill.color-indigo.active-state { + background: #303F9F !important; +} +.progressbar.color-indigo, +.progressbar.bg-indigo { + background-color: rgba(63, 81, 181, 0.5); +} +.progressbar.color-indigo span, +.progressbar.bg-indigo span { + background-color: #3f51b5; +} +.progressbar-infinite.color-indigo, +.progressbar-infinite.bg-indigo { + background-color: rgba(63, 81, 181, 0.5); +} +.progressbar-infinite.color-indigo:after, +.progressbar-infinite.bg-indigo:after, +.progressbar-infinite.color-indigo:before, +.progressbar-infinite.bg-indigo:before { + background-color: #3f51b5; +} +.color-indigo i.icon, +i.icon.color-indigo { + color: #3f51b5; +} +.preloader.color-indigo svg circle, +.preloader.preloader-indigo svg circle { + stroke: #3f51b5; +} +.preloader.color-indigo .preloader-inner-gap, +.preloader.preloader-indigo .preloader-inner-gap, +.preloader.color-indigo .preloader-inner-half-circle, +.preloader.preloader-indigo .preloader-inner-half-circle { + border-color: #3f51b5; +} +.bg-indigo, +a.bg-indigo, +.list-block .swipeout-actions-left a.bg-indigo, +.list-block .swipeout-actions-right a.bg-indigo { + background-color: #3f51b5; +} +html:not(.watch-active-state) .list-block .bg-indigo .item-link:active, +html:not(.watch-active-state) .list-block a.bg-indigo .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-indigo .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-indigo .item-link:active, +html:not(.watch-active-state) .list-block.bg-indigo .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-indigo .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-indigo .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-indigo .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-indigo:active, +html:not(.watch-active-state) .list-block .item-linka.bg-indigo:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-indigo:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-indigo:active, +.list-block .bg-indigo .item-link.active-state, +.list-block a.bg-indigo .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-indigo .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-indigo .item-link.active-state, +.list-block.bg-indigo .item-link.active-state, +.list-blocka.bg-indigo .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-indigo .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-indigo .item-link.active-state, +.list-block .item-link.bg-indigo.active-state, +.list-block .item-linka.bg-indigo.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-indigo.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-indigo.active-state { + background: #303F9F; +} +.border-indigo { + border-color: #3f51b5; +} +.list-block .border-indigo.item-inner:after, +.list-block ul.border-indigo:after, +.border-indigo:after, +.list-block .border-indigo.item-inner:before, +.list-block ul.border-indigo:before, +.border-indigo:before { + background-color: #3f51b5; +} +.floating-button.color-indigo, +.speed-dial-buttons a.color-indigo, +.floating-button.bg-indigo, +.speed-dial-buttons a.bg-indigo { + color: #fff; + background: #3f51b5; +} +html:not(.watch-active-state) .floating-button.color-indigo:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-indigo:active, +html:not(.watch-active-state) .floating-button.bg-indigo:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-indigo:active, +.floating-button.color-indigo.active-state, +.speed-dial-buttons a.color-indigo.active-state, +.floating-button.bg-indigo.active-state, +.speed-dial-buttons a.bg-indigo.active-state { + background: #303F9F; +} +.floating-button.color-indigo i, +.speed-dial-buttons a.color-indigo i, +.floating-button.bg-indigo i, +.speed-dial-buttons a.bg-indigo i { + color: inherit; +} +.ripple-indigo .ripple-wave { + background-color: rgba(63, 81, 181, 0.3); +} +.range-slider.color-indigo input[type="range"]::-webkit-slider-thumb:before { + background-color: #3f51b5; +} +.range-slider.color-indigo input[type="range"]::-webkit-slider-thumb { + background-color: #3f51b5; +} +.range-slider.color-indigo input[type="range"]::-ms-thumb { + background-color: #3f51b5; +} +.range-slider.color-indigo input[type="range"]::-ms-fill-lower { + background-color: #3f51b5; +} +.range-slider.color-indigo input[type="range"]::-moz-range-thumb { + background-color: #3f51b5; +} +.badge.color-indigo { + background-color: #3f51b5; + color: #fff; +} +.color-blue { + color: #2196f3; +} +.list-block .item-link.list-button.color-blue, +.list-button.color-blue, +.list-block .item-link.color-blue, +.tabbar a.active.color-blue, +a.color-blue { + color: #2196f3; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-blue, +.label-switch.color-blue input[type="checkbox"]:checked + .checkbox { + background-color: #2196f3; +} +.button.color-blue:not(.button-fill), +.color-blue.buttons-row .button:not(.button-fill) { + color: #2196f3 !important; +} +.button.button-fill.bg-blue, +.button.button-fill.color-blue { + background: #2196f3 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-blue:active, +html:not(.watch-active-state) .button.button-fill.color-blue:active, +.button.button-fill.bg-blue.active-state, +.button.button-fill.color-blue.active-state { + background: #1976D2 !important; +} +.progressbar.color-blue, +.progressbar.bg-blue { + background-color: rgba(33, 150, 243, 0.5); +} +.progressbar.color-blue span, +.progressbar.bg-blue span { + background-color: #2196f3; +} +.progressbar-infinite.color-blue, +.progressbar-infinite.bg-blue { + background-color: rgba(33, 150, 243, 0.5); +} +.progressbar-infinite.color-blue:after, +.progressbar-infinite.bg-blue:after, +.progressbar-infinite.color-blue:before, +.progressbar-infinite.bg-blue:before { + background-color: #2196f3; +} +.color-blue i.icon, +i.icon.color-blue { + color: #2196f3; +} +.preloader.color-blue svg circle, +.preloader.preloader-blue svg circle { + stroke: #2196f3; +} +.preloader.color-blue .preloader-inner-gap, +.preloader.preloader-blue .preloader-inner-gap, +.preloader.color-blue .preloader-inner-half-circle, +.preloader.preloader-blue .preloader-inner-half-circle { + border-color: #2196f3; +} +.bg-blue, +a.bg-blue, +.list-block .swipeout-actions-left a.bg-blue, +.list-block .swipeout-actions-right a.bg-blue { + background-color: #2196f3; +} +html:not(.watch-active-state) .list-block .bg-blue .item-link:active, +html:not(.watch-active-state) .list-block a.bg-blue .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-blue .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-blue .item-link:active, +html:not(.watch-active-state) .list-block.bg-blue .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-blue .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-blue .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-blue .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-blue:active, +html:not(.watch-active-state) .list-block .item-linka.bg-blue:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-blue:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-blue:active, +.list-block .bg-blue .item-link.active-state, +.list-block a.bg-blue .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-blue .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-blue .item-link.active-state, +.list-block.bg-blue .item-link.active-state, +.list-blocka.bg-blue .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-blue .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-blue .item-link.active-state, +.list-block .item-link.bg-blue.active-state, +.list-block .item-linka.bg-blue.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-blue.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-blue.active-state { + background: #1976D2; +} +.border-blue { + border-color: #2196f3; +} +.list-block .border-blue.item-inner:after, +.list-block ul.border-blue:after, +.border-blue:after, +.list-block .border-blue.item-inner:before, +.list-block ul.border-blue:before, +.border-blue:before { + background-color: #2196f3; +} +.floating-button.color-blue, +.speed-dial-buttons a.color-blue, +.floating-button.bg-blue, +.speed-dial-buttons a.bg-blue { + color: #fff; + background: #2196f3; +} +html:not(.watch-active-state) .floating-button.color-blue:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-blue:active, +html:not(.watch-active-state) .floating-button.bg-blue:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-blue:active, +.floating-button.color-blue.active-state, +.speed-dial-buttons a.color-blue.active-state, +.floating-button.bg-blue.active-state, +.speed-dial-buttons a.bg-blue.active-state { + background: #1976D2; +} +.floating-button.color-blue i, +.speed-dial-buttons a.color-blue i, +.floating-button.bg-blue i, +.speed-dial-buttons a.bg-blue i { + color: inherit; +} +.ripple-blue .ripple-wave { + background-color: rgba(33, 150, 243, 0.3); +} +.range-slider.color-blue input[type="range"]::-webkit-slider-thumb:before { + background-color: #2196f3; +} +.range-slider.color-blue input[type="range"]::-webkit-slider-thumb { + background-color: #2196f3; +} +.range-slider.color-blue input[type="range"]::-ms-thumb { + background-color: #2196f3; +} +.range-slider.color-blue input[type="range"]::-ms-fill-lower { + background-color: #2196f3; +} +.range-slider.color-blue input[type="range"]::-moz-range-thumb { + background-color: #2196f3; +} +.badge.color-blue { + background-color: #2196f3; + color: #fff; +} +.color-lightblue { + color: #03a9f4; +} +.list-block .item-link.list-button.color-lightblue, +.list-button.color-lightblue, +.list-block .item-link.color-lightblue, +.tabbar a.active.color-lightblue, +a.color-lightblue { + color: #03a9f4; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-lightblue, +.label-switch.color-lightblue input[type="checkbox"]:checked + .checkbox { + background-color: #03a9f4; +} +.button.color-lightblue:not(.button-fill), +.color-lightblue.buttons-row .button:not(.button-fill) { + color: #03a9f4 !important; +} +.button.button-fill.bg-lightblue, +.button.button-fill.color-lightblue { + background: #03a9f4 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-lightblue:active, +html:not(.watch-active-state) .button.button-fill.color-lightblue:active, +.button.button-fill.bg-lightblue.active-state, +.button.button-fill.color-lightblue.active-state { + background: #0288D1 !important; +} +.progressbar.color-lightblue, +.progressbar.bg-lightblue { + background-color: rgba(3, 169, 244, 0.5); +} +.progressbar.color-lightblue span, +.progressbar.bg-lightblue span { + background-color: #03a9f4; +} +.progressbar-infinite.color-lightblue, +.progressbar-infinite.bg-lightblue { + background-color: rgba(3, 169, 244, 0.5); +} +.progressbar-infinite.color-lightblue:after, +.progressbar-infinite.bg-lightblue:after, +.progressbar-infinite.color-lightblue:before, +.progressbar-infinite.bg-lightblue:before { + background-color: #03a9f4; +} +.color-lightblue i.icon, +i.icon.color-lightblue { + color: #03a9f4; +} +.preloader.color-lightblue svg circle, +.preloader.preloader-lightblue svg circle { + stroke: #03a9f4; +} +.preloader.color-lightblue .preloader-inner-gap, +.preloader.preloader-lightblue .preloader-inner-gap, +.preloader.color-lightblue .preloader-inner-half-circle, +.preloader.preloader-lightblue .preloader-inner-half-circle { + border-color: #03a9f4; +} +.bg-lightblue, +a.bg-lightblue, +.list-block .swipeout-actions-left a.bg-lightblue, +.list-block .swipeout-actions-right a.bg-lightblue { + background-color: #03a9f4; +} +html:not(.watch-active-state) .list-block .bg-lightblue .item-link:active, +html:not(.watch-active-state) .list-block a.bg-lightblue .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-lightblue .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-lightblue .item-link:active, +html:not(.watch-active-state) .list-block.bg-lightblue .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-lightblue .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-lightblue .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-lightblue .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-lightblue:active, +html:not(.watch-active-state) .list-block .item-linka.bg-lightblue:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-lightblue:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-lightblue:active, +.list-block .bg-lightblue .item-link.active-state, +.list-block a.bg-lightblue .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-lightblue .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-lightblue .item-link.active-state, +.list-block.bg-lightblue .item-link.active-state, +.list-blocka.bg-lightblue .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-lightblue .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-lightblue .item-link.active-state, +.list-block .item-link.bg-lightblue.active-state, +.list-block .item-linka.bg-lightblue.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-lightblue.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-lightblue.active-state { + background: #0288D1; +} +.border-lightblue { + border-color: #03a9f4; +} +.list-block .border-lightblue.item-inner:after, +.list-block ul.border-lightblue:after, +.border-lightblue:after, +.list-block .border-lightblue.item-inner:before, +.list-block ul.border-lightblue:before, +.border-lightblue:before { + background-color: #03a9f4; +} +.floating-button.color-lightblue, +.speed-dial-buttons a.color-lightblue, +.floating-button.bg-lightblue, +.speed-dial-buttons a.bg-lightblue { + color: #fff; + background: #03a9f4; +} +html:not(.watch-active-state) .floating-button.color-lightblue:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-lightblue:active, +html:not(.watch-active-state) .floating-button.bg-lightblue:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-lightblue:active, +.floating-button.color-lightblue.active-state, +.speed-dial-buttons a.color-lightblue.active-state, +.floating-button.bg-lightblue.active-state, +.speed-dial-buttons a.bg-lightblue.active-state { + background: #0288D1; +} +.floating-button.color-lightblue i, +.speed-dial-buttons a.color-lightblue i, +.floating-button.bg-lightblue i, +.speed-dial-buttons a.bg-lightblue i { + color: inherit; +} +.ripple-lightblue .ripple-wave { + background-color: rgba(3, 169, 244, 0.3); +} +.range-slider.color-lightblue input[type="range"]::-webkit-slider-thumb:before { + background-color: #03a9f4; +} +.range-slider.color-lightblue input[type="range"]::-webkit-slider-thumb { + background-color: #03a9f4; +} +.range-slider.color-lightblue input[type="range"]::-ms-thumb { + background-color: #03a9f4; +} +.range-slider.color-lightblue input[type="range"]::-ms-fill-lower { + background-color: #03a9f4; +} +.range-slider.color-lightblue input[type="range"]::-moz-range-thumb { + background-color: #03a9f4; +} +.badge.color-lightblue { + background-color: #03a9f4; + color: #fff; +} +.color-cyan { + color: #00bcd4; +} +.list-block .item-link.list-button.color-cyan, +.list-button.color-cyan, +.list-block .item-link.color-cyan, +.tabbar a.active.color-cyan, +a.color-cyan { + color: #00bcd4; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-cyan, +.label-switch.color-cyan input[type="checkbox"]:checked + .checkbox { + background-color: #00bcd4; +} +.button.color-cyan:not(.button-fill), +.color-cyan.buttons-row .button:not(.button-fill) { + color: #00bcd4 !important; +} +.button.button-fill.bg-cyan, +.button.button-fill.color-cyan { + background: #00bcd4 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-cyan:active, +html:not(.watch-active-state) .button.button-fill.color-cyan:active, +.button.button-fill.bg-cyan.active-state, +.button.button-fill.color-cyan.active-state { + background: #0097A7 !important; +} +.progressbar.color-cyan, +.progressbar.bg-cyan { + background-color: rgba(0, 188, 212, 0.5); +} +.progressbar.color-cyan span, +.progressbar.bg-cyan span { + background-color: #00bcd4; +} +.progressbar-infinite.color-cyan, +.progressbar-infinite.bg-cyan { + background-color: rgba(0, 188, 212, 0.5); +} +.progressbar-infinite.color-cyan:after, +.progressbar-infinite.bg-cyan:after, +.progressbar-infinite.color-cyan:before, +.progressbar-infinite.bg-cyan:before { + background-color: #00bcd4; +} +.color-cyan i.icon, +i.icon.color-cyan { + color: #00bcd4; +} +.preloader.color-cyan svg circle, +.preloader.preloader-cyan svg circle { + stroke: #00bcd4; +} +.preloader.color-cyan .preloader-inner-gap, +.preloader.preloader-cyan .preloader-inner-gap, +.preloader.color-cyan .preloader-inner-half-circle, +.preloader.preloader-cyan .preloader-inner-half-circle { + border-color: #00bcd4; +} +.bg-cyan, +a.bg-cyan, +.list-block .swipeout-actions-left a.bg-cyan, +.list-block .swipeout-actions-right a.bg-cyan { + background-color: #00bcd4; +} +html:not(.watch-active-state) .list-block .bg-cyan .item-link:active, +html:not(.watch-active-state) .list-block a.bg-cyan .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-cyan .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-cyan .item-link:active, +html:not(.watch-active-state) .list-block.bg-cyan .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-cyan .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-cyan .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-cyan .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-cyan:active, +html:not(.watch-active-state) .list-block .item-linka.bg-cyan:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-cyan:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-cyan:active, +.list-block .bg-cyan .item-link.active-state, +.list-block a.bg-cyan .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-cyan .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-cyan .item-link.active-state, +.list-block.bg-cyan .item-link.active-state, +.list-blocka.bg-cyan .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-cyan .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-cyan .item-link.active-state, +.list-block .item-link.bg-cyan.active-state, +.list-block .item-linka.bg-cyan.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-cyan.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-cyan.active-state { + background: #0097A7; +} +.border-cyan { + border-color: #00bcd4; +} +.list-block .border-cyan.item-inner:after, +.list-block ul.border-cyan:after, +.border-cyan:after, +.list-block .border-cyan.item-inner:before, +.list-block ul.border-cyan:before, +.border-cyan:before { + background-color: #00bcd4; +} +.floating-button.color-cyan, +.speed-dial-buttons a.color-cyan, +.floating-button.bg-cyan, +.speed-dial-buttons a.bg-cyan { + color: #fff; + background: #00bcd4; +} +html:not(.watch-active-state) .floating-button.color-cyan:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-cyan:active, +html:not(.watch-active-state) .floating-button.bg-cyan:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-cyan:active, +.floating-button.color-cyan.active-state, +.speed-dial-buttons a.color-cyan.active-state, +.floating-button.bg-cyan.active-state, +.speed-dial-buttons a.bg-cyan.active-state { + background: #0097A7; +} +.floating-button.color-cyan i, +.speed-dial-buttons a.color-cyan i, +.floating-button.bg-cyan i, +.speed-dial-buttons a.bg-cyan i { + color: inherit; +} +.ripple-cyan .ripple-wave { + background-color: rgba(0, 188, 212, 0.3); +} +.range-slider.color-cyan input[type="range"]::-webkit-slider-thumb:before { + background-color: #00bcd4; +} +.range-slider.color-cyan input[type="range"]::-webkit-slider-thumb { + background-color: #00bcd4; +} +.range-slider.color-cyan input[type="range"]::-ms-thumb { + background-color: #00bcd4; +} +.range-slider.color-cyan input[type="range"]::-ms-fill-lower { + background-color: #00bcd4; +} +.range-slider.color-cyan input[type="range"]::-moz-range-thumb { + background-color: #00bcd4; +} +.badge.color-cyan { + background-color: #00bcd4; + color: #fff; +} +.color-teal { + color: #009688; +} +.list-block .item-link.list-button.color-teal, +.list-button.color-teal, +.list-block .item-link.color-teal, +.tabbar a.active.color-teal, +a.color-teal { + color: #009688; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-teal, +.label-switch.color-teal input[type="checkbox"]:checked + .checkbox { + background-color: #009688; +} +.button.color-teal:not(.button-fill), +.color-teal.buttons-row .button:not(.button-fill) { + color: #009688 !important; +} +.button.button-fill.bg-teal, +.button.button-fill.color-teal { + background: #009688 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-teal:active, +html:not(.watch-active-state) .button.button-fill.color-teal:active, +.button.button-fill.bg-teal.active-state, +.button.button-fill.color-teal.active-state { + background: #00897B !important; +} +.progressbar.color-teal, +.progressbar.bg-teal { + background-color: rgba(0, 150, 136, 0.5); +} +.progressbar.color-teal span, +.progressbar.bg-teal span { + background-color: #009688; +} +.progressbar-infinite.color-teal, +.progressbar-infinite.bg-teal { + background-color: rgba(0, 150, 136, 0.5); +} +.progressbar-infinite.color-teal:after, +.progressbar-infinite.bg-teal:after, +.progressbar-infinite.color-teal:before, +.progressbar-infinite.bg-teal:before { + background-color: #009688; +} +.color-teal i.icon, +i.icon.color-teal { + color: #009688; +} +.preloader.color-teal svg circle, +.preloader.preloader-teal svg circle { + stroke: #009688; +} +.preloader.color-teal .preloader-inner-gap, +.preloader.preloader-teal .preloader-inner-gap, +.preloader.color-teal .preloader-inner-half-circle, +.preloader.preloader-teal .preloader-inner-half-circle { + border-color: #009688; +} +.bg-teal, +a.bg-teal, +.list-block .swipeout-actions-left a.bg-teal, +.list-block .swipeout-actions-right a.bg-teal { + background-color: #009688; +} +html:not(.watch-active-state) .list-block .bg-teal .item-link:active, +html:not(.watch-active-state) .list-block a.bg-teal .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-teal .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-teal .item-link:active, +html:not(.watch-active-state) .list-block.bg-teal .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-teal .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-teal .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-teal .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-teal:active, +html:not(.watch-active-state) .list-block .item-linka.bg-teal:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-teal:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-teal:active, +.list-block .bg-teal .item-link.active-state, +.list-block a.bg-teal .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-teal .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-teal .item-link.active-state, +.list-block.bg-teal .item-link.active-state, +.list-blocka.bg-teal .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-teal .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-teal .item-link.active-state, +.list-block .item-link.bg-teal.active-state, +.list-block .item-linka.bg-teal.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-teal.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-teal.active-state { + background: #00897B; +} +.border-teal { + border-color: #009688; +} +.list-block .border-teal.item-inner:after, +.list-block ul.border-teal:after, +.border-teal:after, +.list-block .border-teal.item-inner:before, +.list-block ul.border-teal:before, +.border-teal:before { + background-color: #009688; +} +.floating-button.color-teal, +.speed-dial-buttons a.color-teal, +.floating-button.bg-teal, +.speed-dial-buttons a.bg-teal { + color: #fff; + background: #009688; +} +html:not(.watch-active-state) .floating-button.color-teal:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-teal:active, +html:not(.watch-active-state) .floating-button.bg-teal:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-teal:active, +.floating-button.color-teal.active-state, +.speed-dial-buttons a.color-teal.active-state, +.floating-button.bg-teal.active-state, +.speed-dial-buttons a.bg-teal.active-state { + background: #00897B; +} +.floating-button.color-teal i, +.speed-dial-buttons a.color-teal i, +.floating-button.bg-teal i, +.speed-dial-buttons a.bg-teal i { + color: inherit; +} +.ripple-teal .ripple-wave { + background-color: rgba(0, 150, 136, 0.3); +} +.range-slider.color-teal input[type="range"]::-webkit-slider-thumb:before { + background-color: #009688; +} +.range-slider.color-teal input[type="range"]::-webkit-slider-thumb { + background-color: #009688; +} +.range-slider.color-teal input[type="range"]::-ms-thumb { + background-color: #009688; +} +.range-slider.color-teal input[type="range"]::-ms-fill-lower { + background-color: #009688; +} +.range-slider.color-teal input[type="range"]::-moz-range-thumb { + background-color: #009688; +} +.badge.color-teal { + background-color: #009688; + color: #fff; +} +.color-green { + color: #4caf50; +} +.list-block .item-link.list-button.color-green, +.list-button.color-green, +.list-block .item-link.color-green, +.tabbar a.active.color-green, +a.color-green { + color: #4caf50; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-green, +.label-switch.color-green input[type="checkbox"]:checked + .checkbox { + background-color: #4caf50; +} +.button.color-green:not(.button-fill), +.color-green.buttons-row .button:not(.button-fill) { + color: #4caf50 !important; +} +.button.button-fill.bg-green, +.button.button-fill.color-green { + background: #4caf50 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-green:active, +html:not(.watch-active-state) .button.button-fill.color-green:active, +.button.button-fill.bg-green.active-state, +.button.button-fill.color-green.active-state { + background: #388E3C !important; +} +.progressbar.color-green, +.progressbar.bg-green { + background-color: rgba(76, 175, 80, 0.5); +} +.progressbar.color-green span, +.progressbar.bg-green span { + background-color: #4caf50; +} +.progressbar-infinite.color-green, +.progressbar-infinite.bg-green { + background-color: rgba(76, 175, 80, 0.5); +} +.progressbar-infinite.color-green:after, +.progressbar-infinite.bg-green:after, +.progressbar-infinite.color-green:before, +.progressbar-infinite.bg-green:before { + background-color: #4caf50; +} +.color-green i.icon, +i.icon.color-green { + color: #4caf50; +} +.preloader.color-green svg circle, +.preloader.preloader-green svg circle { + stroke: #4caf50; +} +.preloader.color-green .preloader-inner-gap, +.preloader.preloader-green .preloader-inner-gap, +.preloader.color-green .preloader-inner-half-circle, +.preloader.preloader-green .preloader-inner-half-circle { + border-color: #4caf50; +} +.bg-green, +a.bg-green, +.list-block .swipeout-actions-left a.bg-green, +.list-block .swipeout-actions-right a.bg-green { + background-color: #4caf50; +} +html:not(.watch-active-state) .list-block .bg-green .item-link:active, +html:not(.watch-active-state) .list-block a.bg-green .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-green .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-green .item-link:active, +html:not(.watch-active-state) .list-block.bg-green .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-green .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-green .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-green .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-green:active, +html:not(.watch-active-state) .list-block .item-linka.bg-green:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-green:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-green:active, +.list-block .bg-green .item-link.active-state, +.list-block a.bg-green .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-green .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-green .item-link.active-state, +.list-block.bg-green .item-link.active-state, +.list-blocka.bg-green .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-green .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-green .item-link.active-state, +.list-block .item-link.bg-green.active-state, +.list-block .item-linka.bg-green.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-green.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-green.active-state { + background: #388E3C; +} +.border-green { + border-color: #4caf50; +} +.list-block .border-green.item-inner:after, +.list-block ul.border-green:after, +.border-green:after, +.list-block .border-green.item-inner:before, +.list-block ul.border-green:before, +.border-green:before { + background-color: #4caf50; +} +.floating-button.color-green, +.speed-dial-buttons a.color-green, +.floating-button.bg-green, +.speed-dial-buttons a.bg-green { + color: #fff; + background: #4caf50; +} +html:not(.watch-active-state) .floating-button.color-green:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-green:active, +html:not(.watch-active-state) .floating-button.bg-green:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-green:active, +.floating-button.color-green.active-state, +.speed-dial-buttons a.color-green.active-state, +.floating-button.bg-green.active-state, +.speed-dial-buttons a.bg-green.active-state { + background: #388E3C; +} +.floating-button.color-green i, +.speed-dial-buttons a.color-green i, +.floating-button.bg-green i, +.speed-dial-buttons a.bg-green i { + color: inherit; +} +.ripple-green .ripple-wave { + background-color: rgba(76, 175, 80, 0.3); +} +.range-slider.color-green input[type="range"]::-webkit-slider-thumb:before { + background-color: #4caf50; +} +.range-slider.color-green input[type="range"]::-webkit-slider-thumb { + background-color: #4caf50; +} +.range-slider.color-green input[type="range"]::-ms-thumb { + background-color: #4caf50; +} +.range-slider.color-green input[type="range"]::-ms-fill-lower { + background-color: #4caf50; +} +.range-slider.color-green input[type="range"]::-moz-range-thumb { + background-color: #4caf50; +} +.badge.color-green { + background-color: #4caf50; + color: #fff; +} +.color-lightgreen { + color: #8bc34a; +} +.list-block .item-link.list-button.color-lightgreen, +.list-button.color-lightgreen, +.list-block .item-link.color-lightgreen, +.tabbar a.active.color-lightgreen, +a.color-lightgreen { + color: #8bc34a; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-lightgreen, +.label-switch.color-lightgreen input[type="checkbox"]:checked + .checkbox { + background-color: #8bc34a; +} +.button.color-lightgreen:not(.button-fill), +.color-lightgreen.buttons-row .button:not(.button-fill) { + color: #8bc34a !important; +} +.button.button-fill.bg-lightgreen, +.button.button-fill.color-lightgreen { + background: #8bc34a !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-lightgreen:active, +html:not(.watch-active-state) .button.button-fill.color-lightgreen:active, +.button.button-fill.bg-lightgreen.active-state, +.button.button-fill.color-lightgreen.active-state { + background: #689F38 !important; +} +.progressbar.color-lightgreen, +.progressbar.bg-lightgreen { + background-color: rgba(139, 195, 74, 0.5); +} +.progressbar.color-lightgreen span, +.progressbar.bg-lightgreen span { + background-color: #8bc34a; +} +.progressbar-infinite.color-lightgreen, +.progressbar-infinite.bg-lightgreen { + background-color: rgba(139, 195, 74, 0.5); +} +.progressbar-infinite.color-lightgreen:after, +.progressbar-infinite.bg-lightgreen:after, +.progressbar-infinite.color-lightgreen:before, +.progressbar-infinite.bg-lightgreen:before { + background-color: #8bc34a; +} +.color-lightgreen i.icon, +i.icon.color-lightgreen { + color: #8bc34a; +} +.preloader.color-lightgreen svg circle, +.preloader.preloader-lightgreen svg circle { + stroke: #8bc34a; +} +.preloader.color-lightgreen .preloader-inner-gap, +.preloader.preloader-lightgreen .preloader-inner-gap, +.preloader.color-lightgreen .preloader-inner-half-circle, +.preloader.preloader-lightgreen .preloader-inner-half-circle { + border-color: #8bc34a; +} +.bg-lightgreen, +a.bg-lightgreen, +.list-block .swipeout-actions-left a.bg-lightgreen, +.list-block .swipeout-actions-right a.bg-lightgreen { + background-color: #8bc34a; +} +html:not(.watch-active-state) .list-block .bg-lightgreen .item-link:active, +html:not(.watch-active-state) .list-block a.bg-lightgreen .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-lightgreen .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-lightgreen .item-link:active, +html:not(.watch-active-state) .list-block.bg-lightgreen .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-lightgreen .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-lightgreen .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-lightgreen .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-lightgreen:active, +html:not(.watch-active-state) .list-block .item-linka.bg-lightgreen:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-lightgreen:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-lightgreen:active, +.list-block .bg-lightgreen .item-link.active-state, +.list-block a.bg-lightgreen .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-lightgreen .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-lightgreen .item-link.active-state, +.list-block.bg-lightgreen .item-link.active-state, +.list-blocka.bg-lightgreen .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-lightgreen .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-lightgreen .item-link.active-state, +.list-block .item-link.bg-lightgreen.active-state, +.list-block .item-linka.bg-lightgreen.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-lightgreen.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-lightgreen.active-state { + background: #689F38; +} +.border-lightgreen { + border-color: #8bc34a; +} +.list-block .border-lightgreen.item-inner:after, +.list-block ul.border-lightgreen:after, +.border-lightgreen:after, +.list-block .border-lightgreen.item-inner:before, +.list-block ul.border-lightgreen:before, +.border-lightgreen:before { + background-color: #8bc34a; +} +.floating-button.color-lightgreen, +.speed-dial-buttons a.color-lightgreen, +.floating-button.bg-lightgreen, +.speed-dial-buttons a.bg-lightgreen { + color: #fff; + background: #8bc34a; +} +html:not(.watch-active-state) .floating-button.color-lightgreen:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-lightgreen:active, +html:not(.watch-active-state) .floating-button.bg-lightgreen:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-lightgreen:active, +.floating-button.color-lightgreen.active-state, +.speed-dial-buttons a.color-lightgreen.active-state, +.floating-button.bg-lightgreen.active-state, +.speed-dial-buttons a.bg-lightgreen.active-state { + background: #689F38; +} +.floating-button.color-lightgreen i, +.speed-dial-buttons a.color-lightgreen i, +.floating-button.bg-lightgreen i, +.speed-dial-buttons a.bg-lightgreen i { + color: inherit; +} +.ripple-lightgreen .ripple-wave { + background-color: rgba(139, 195, 74, 0.3); +} +.range-slider.color-lightgreen input[type="range"]::-webkit-slider-thumb:before { + background-color: #8bc34a; +} +.range-slider.color-lightgreen input[type="range"]::-webkit-slider-thumb { + background-color: #8bc34a; +} +.range-slider.color-lightgreen input[type="range"]::-ms-thumb { + background-color: #8bc34a; +} +.range-slider.color-lightgreen input[type="range"]::-ms-fill-lower { + background-color: #8bc34a; +} +.range-slider.color-lightgreen input[type="range"]::-moz-range-thumb { + background-color: #8bc34a; +} +.badge.color-lightgreen { + background-color: #8bc34a; + color: #fff; +} +.color-lime { + color: #cddc39; +} +.list-block .item-link.list-button.color-lime, +.list-button.color-lime, +.list-block .item-link.color-lime, +.tabbar a.active.color-lime, +a.color-lime { + color: #cddc39; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-lime, +.label-switch.color-lime input[type="checkbox"]:checked + .checkbox { + background-color: #cddc39; +} +.button.color-lime:not(.button-fill), +.color-lime.buttons-row .button:not(.button-fill) { + color: #cddc39 !important; +} +.button.button-fill.bg-lime, +.button.button-fill.color-lime { + background: #cddc39 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-lime:active, +html:not(.watch-active-state) .button.button-fill.color-lime:active, +.button.button-fill.bg-lime.active-state, +.button.button-fill.color-lime.active-state { + background: #AFB42B !important; +} +.progressbar.color-lime, +.progressbar.bg-lime { + background-color: rgba(205, 220, 57, 0.5); +} +.progressbar.color-lime span, +.progressbar.bg-lime span { + background-color: #cddc39; +} +.progressbar-infinite.color-lime, +.progressbar-infinite.bg-lime { + background-color: rgba(205, 220, 57, 0.5); +} +.progressbar-infinite.color-lime:after, +.progressbar-infinite.bg-lime:after, +.progressbar-infinite.color-lime:before, +.progressbar-infinite.bg-lime:before { + background-color: #cddc39; +} +.color-lime i.icon, +i.icon.color-lime { + color: #cddc39; +} +.preloader.color-lime svg circle, +.preloader.preloader-lime svg circle { + stroke: #cddc39; +} +.preloader.color-lime .preloader-inner-gap, +.preloader.preloader-lime .preloader-inner-gap, +.preloader.color-lime .preloader-inner-half-circle, +.preloader.preloader-lime .preloader-inner-half-circle { + border-color: #cddc39; +} +.bg-lime, +a.bg-lime, +.list-block .swipeout-actions-left a.bg-lime, +.list-block .swipeout-actions-right a.bg-lime { + background-color: #cddc39; +} +html:not(.watch-active-state) .list-block .bg-lime .item-link:active, +html:not(.watch-active-state) .list-block a.bg-lime .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-lime .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-lime .item-link:active, +html:not(.watch-active-state) .list-block.bg-lime .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-lime .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-lime .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-lime .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-lime:active, +html:not(.watch-active-state) .list-block .item-linka.bg-lime:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-lime:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-lime:active, +.list-block .bg-lime .item-link.active-state, +.list-block a.bg-lime .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-lime .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-lime .item-link.active-state, +.list-block.bg-lime .item-link.active-state, +.list-blocka.bg-lime .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-lime .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-lime .item-link.active-state, +.list-block .item-link.bg-lime.active-state, +.list-block .item-linka.bg-lime.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-lime.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-lime.active-state { + background: #AFB42B; +} +.border-lime { + border-color: #cddc39; +} +.list-block .border-lime.item-inner:after, +.list-block ul.border-lime:after, +.border-lime:after, +.list-block .border-lime.item-inner:before, +.list-block ul.border-lime:before, +.border-lime:before { + background-color: #cddc39; +} +.floating-button.color-lime, +.speed-dial-buttons a.color-lime, +.floating-button.bg-lime, +.speed-dial-buttons a.bg-lime { + color: #fff; + background: #cddc39; +} +html:not(.watch-active-state) .floating-button.color-lime:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-lime:active, +html:not(.watch-active-state) .floating-button.bg-lime:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-lime:active, +.floating-button.color-lime.active-state, +.speed-dial-buttons a.color-lime.active-state, +.floating-button.bg-lime.active-state, +.speed-dial-buttons a.bg-lime.active-state { + background: #AFB42B; +} +.floating-button.color-lime i, +.speed-dial-buttons a.color-lime i, +.floating-button.bg-lime i, +.speed-dial-buttons a.bg-lime i { + color: inherit; +} +.ripple-lime .ripple-wave { + background-color: rgba(205, 220, 57, 0.3); +} +.range-slider.color-lime input[type="range"]::-webkit-slider-thumb:before { + background-color: #cddc39; +} +.range-slider.color-lime input[type="range"]::-webkit-slider-thumb { + background-color: #cddc39; +} +.range-slider.color-lime input[type="range"]::-ms-thumb { + background-color: #cddc39; +} +.range-slider.color-lime input[type="range"]::-ms-fill-lower { + background-color: #cddc39; +} +.range-slider.color-lime input[type="range"]::-moz-range-thumb { + background-color: #cddc39; +} +.badge.color-lime { + background-color: #cddc39; + color: #fff; +} +.color-yellow { + color: #ffeb3b; +} +.list-block .item-link.list-button.color-yellow, +.list-button.color-yellow, +.list-block .item-link.color-yellow, +.tabbar a.active.color-yellow, +a.color-yellow { + color: #ffeb3b; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-yellow, +.label-switch.color-yellow input[type="checkbox"]:checked + .checkbox { + background-color: #ffeb3b; +} +.button.color-yellow:not(.button-fill), +.color-yellow.buttons-row .button:not(.button-fill) { + color: #ffeb3b !important; +} +.button.button-fill.bg-yellow, +.button.button-fill.color-yellow { + background: #ffeb3b !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-yellow:active, +html:not(.watch-active-state) .button.button-fill.color-yellow:active, +.button.button-fill.bg-yellow.active-state, +.button.button-fill.color-yellow.active-state { + background: #FBC02D !important; +} +.progressbar.color-yellow, +.progressbar.bg-yellow { + background-color: rgba(255, 235, 59, 0.5); +} +.progressbar.color-yellow span, +.progressbar.bg-yellow span { + background-color: #ffeb3b; +} +.progressbar-infinite.color-yellow, +.progressbar-infinite.bg-yellow { + background-color: rgba(255, 235, 59, 0.5); +} +.progressbar-infinite.color-yellow:after, +.progressbar-infinite.bg-yellow:after, +.progressbar-infinite.color-yellow:before, +.progressbar-infinite.bg-yellow:before { + background-color: #ffeb3b; +} +.color-yellow i.icon, +i.icon.color-yellow { + color: #ffeb3b; +} +.preloader.color-yellow svg circle, +.preloader.preloader-yellow svg circle { + stroke: #ffeb3b; +} +.preloader.color-yellow .preloader-inner-gap, +.preloader.preloader-yellow .preloader-inner-gap, +.preloader.color-yellow .preloader-inner-half-circle, +.preloader.preloader-yellow .preloader-inner-half-circle { + border-color: #ffeb3b; +} +.bg-yellow, +a.bg-yellow, +.list-block .swipeout-actions-left a.bg-yellow, +.list-block .swipeout-actions-right a.bg-yellow { + background-color: #ffeb3b; +} +html:not(.watch-active-state) .list-block .bg-yellow .item-link:active, +html:not(.watch-active-state) .list-block a.bg-yellow .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-yellow .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-yellow .item-link:active, +html:not(.watch-active-state) .list-block.bg-yellow .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-yellow .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-yellow .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-yellow .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-yellow:active, +html:not(.watch-active-state) .list-block .item-linka.bg-yellow:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-yellow:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-yellow:active, +.list-block .bg-yellow .item-link.active-state, +.list-block a.bg-yellow .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-yellow .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-yellow .item-link.active-state, +.list-block.bg-yellow .item-link.active-state, +.list-blocka.bg-yellow .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-yellow .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-yellow .item-link.active-state, +.list-block .item-link.bg-yellow.active-state, +.list-block .item-linka.bg-yellow.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-yellow.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-yellow.active-state { + background: #FBC02D; +} +.border-yellow { + border-color: #ffeb3b; +} +.list-block .border-yellow.item-inner:after, +.list-block ul.border-yellow:after, +.border-yellow:after, +.list-block .border-yellow.item-inner:before, +.list-block ul.border-yellow:before, +.border-yellow:before { + background-color: #ffeb3b; +} +.floating-button.color-yellow, +.speed-dial-buttons a.color-yellow, +.floating-button.bg-yellow, +.speed-dial-buttons a.bg-yellow { + color: #fff; + background: #ffeb3b; +} +html:not(.watch-active-state) .floating-button.color-yellow:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-yellow:active, +html:not(.watch-active-state) .floating-button.bg-yellow:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-yellow:active, +.floating-button.color-yellow.active-state, +.speed-dial-buttons a.color-yellow.active-state, +.floating-button.bg-yellow.active-state, +.speed-dial-buttons a.bg-yellow.active-state { + background: #FBC02D; +} +.floating-button.color-yellow i, +.speed-dial-buttons a.color-yellow i, +.floating-button.bg-yellow i, +.speed-dial-buttons a.bg-yellow i { + color: inherit; +} +.ripple-yellow .ripple-wave { + background-color: rgba(255, 235, 59, 0.3); +} +.range-slider.color-yellow input[type="range"]::-webkit-slider-thumb:before { + background-color: #ffeb3b; +} +.range-slider.color-yellow input[type="range"]::-webkit-slider-thumb { + background-color: #ffeb3b; +} +.range-slider.color-yellow input[type="range"]::-ms-thumb { + background-color: #ffeb3b; +} +.range-slider.color-yellow input[type="range"]::-ms-fill-lower { + background-color: #ffeb3b; +} +.range-slider.color-yellow input[type="range"]::-moz-range-thumb { + background-color: #ffeb3b; +} +.badge.color-yellow { + background-color: #ffeb3b; + color: #fff; +} +.color-amber { + color: #ffc107; +} +.list-block .item-link.list-button.color-amber, +.list-button.color-amber, +.list-block .item-link.color-amber, +.tabbar a.active.color-amber, +a.color-amber { + color: #ffc107; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-amber, +.label-switch.color-amber input[type="checkbox"]:checked + .checkbox { + background-color: #ffc107; +} +.button.color-amber:not(.button-fill), +.color-amber.buttons-row .button:not(.button-fill) { + color: #ffc107 !important; +} +.button.button-fill.bg-amber, +.button.button-fill.color-amber { + background: #ffc107 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-amber:active, +html:not(.watch-active-state) .button.button-fill.color-amber:active, +.button.button-fill.bg-amber.active-state, +.button.button-fill.color-amber.active-state { + background: #FFA000 !important; +} +.progressbar.color-amber, +.progressbar.bg-amber { + background-color: rgba(255, 193, 7, 0.5); +} +.progressbar.color-amber span, +.progressbar.bg-amber span { + background-color: #ffc107; +} +.progressbar-infinite.color-amber, +.progressbar-infinite.bg-amber { + background-color: rgba(255, 193, 7, 0.5); +} +.progressbar-infinite.color-amber:after, +.progressbar-infinite.bg-amber:after, +.progressbar-infinite.color-amber:before, +.progressbar-infinite.bg-amber:before { + background-color: #ffc107; +} +.color-amber i.icon, +i.icon.color-amber { + color: #ffc107; +} +.preloader.color-amber svg circle, +.preloader.preloader-amber svg circle { + stroke: #ffc107; +} +.preloader.color-amber .preloader-inner-gap, +.preloader.preloader-amber .preloader-inner-gap, +.preloader.color-amber .preloader-inner-half-circle, +.preloader.preloader-amber .preloader-inner-half-circle { + border-color: #ffc107; +} +.bg-amber, +a.bg-amber, +.list-block .swipeout-actions-left a.bg-amber, +.list-block .swipeout-actions-right a.bg-amber { + background-color: #ffc107; +} +html:not(.watch-active-state) .list-block .bg-amber .item-link:active, +html:not(.watch-active-state) .list-block a.bg-amber .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-amber .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-amber .item-link:active, +html:not(.watch-active-state) .list-block.bg-amber .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-amber .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-amber .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-amber .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-amber:active, +html:not(.watch-active-state) .list-block .item-linka.bg-amber:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-amber:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-amber:active, +.list-block .bg-amber .item-link.active-state, +.list-block a.bg-amber .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-amber .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-amber .item-link.active-state, +.list-block.bg-amber .item-link.active-state, +.list-blocka.bg-amber .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-amber .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-amber .item-link.active-state, +.list-block .item-link.bg-amber.active-state, +.list-block .item-linka.bg-amber.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-amber.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-amber.active-state { + background: #FFA000; +} +.border-amber { + border-color: #ffc107; +} +.list-block .border-amber.item-inner:after, +.list-block ul.border-amber:after, +.border-amber:after, +.list-block .border-amber.item-inner:before, +.list-block ul.border-amber:before, +.border-amber:before { + background-color: #ffc107; +} +.floating-button.color-amber, +.speed-dial-buttons a.color-amber, +.floating-button.bg-amber, +.speed-dial-buttons a.bg-amber { + color: #fff; + background: #ffc107; +} +html:not(.watch-active-state) .floating-button.color-amber:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-amber:active, +html:not(.watch-active-state) .floating-button.bg-amber:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-amber:active, +.floating-button.color-amber.active-state, +.speed-dial-buttons a.color-amber.active-state, +.floating-button.bg-amber.active-state, +.speed-dial-buttons a.bg-amber.active-state { + background: #FFA000; +} +.floating-button.color-amber i, +.speed-dial-buttons a.color-amber i, +.floating-button.bg-amber i, +.speed-dial-buttons a.bg-amber i { + color: inherit; +} +.ripple-amber .ripple-wave { + background-color: rgba(255, 193, 7, 0.3); +} +.range-slider.color-amber input[type="range"]::-webkit-slider-thumb:before { + background-color: #ffc107; +} +.range-slider.color-amber input[type="range"]::-webkit-slider-thumb { + background-color: #ffc107; +} +.range-slider.color-amber input[type="range"]::-ms-thumb { + background-color: #ffc107; +} +.range-slider.color-amber input[type="range"]::-ms-fill-lower { + background-color: #ffc107; +} +.range-slider.color-amber input[type="range"]::-moz-range-thumb { + background-color: #ffc107; +} +.badge.color-amber { + background-color: #ffc107; + color: #fff; +} +.color-orange { + color: #ff9800; +} +.list-block .item-link.list-button.color-orange, +.list-button.color-orange, +.list-block .item-link.color-orange, +.tabbar a.active.color-orange, +a.color-orange { + color: #ff9800; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-orange, +.label-switch.color-orange input[type="checkbox"]:checked + .checkbox { + background-color: #ff9800; +} +.button.color-orange:not(.button-fill), +.color-orange.buttons-row .button:not(.button-fill) { + color: #ff9800 !important; +} +.button.button-fill.bg-orange, +.button.button-fill.color-orange { + background: #ff9800 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-orange:active, +html:not(.watch-active-state) .button.button-fill.color-orange:active, +.button.button-fill.bg-orange.active-state, +.button.button-fill.color-orange.active-state { + background: #F57C00 !important; +} +.progressbar.color-orange, +.progressbar.bg-orange { + background-color: rgba(255, 152, 0, 0.5); +} +.progressbar.color-orange span, +.progressbar.bg-orange span { + background-color: #ff9800; +} +.progressbar-infinite.color-orange, +.progressbar-infinite.bg-orange { + background-color: rgba(255, 152, 0, 0.5); +} +.progressbar-infinite.color-orange:after, +.progressbar-infinite.bg-orange:after, +.progressbar-infinite.color-orange:before, +.progressbar-infinite.bg-orange:before { + background-color: #ff9800; +} +.color-orange i.icon, +i.icon.color-orange { + color: #ff9800; +} +.preloader.color-orange svg circle, +.preloader.preloader-orange svg circle { + stroke: #ff9800; +} +.preloader.color-orange .preloader-inner-gap, +.preloader.preloader-orange .preloader-inner-gap, +.preloader.color-orange .preloader-inner-half-circle, +.preloader.preloader-orange .preloader-inner-half-circle { + border-color: #ff9800; +} +.bg-orange, +a.bg-orange, +.list-block .swipeout-actions-left a.bg-orange, +.list-block .swipeout-actions-right a.bg-orange { + background-color: #ff9800; +} +html:not(.watch-active-state) .list-block .bg-orange .item-link:active, +html:not(.watch-active-state) .list-block a.bg-orange .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-orange .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-orange .item-link:active, +html:not(.watch-active-state) .list-block.bg-orange .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-orange .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-orange .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-orange .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-orange:active, +html:not(.watch-active-state) .list-block .item-linka.bg-orange:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-orange:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-orange:active, +.list-block .bg-orange .item-link.active-state, +.list-block a.bg-orange .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-orange .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-orange .item-link.active-state, +.list-block.bg-orange .item-link.active-state, +.list-blocka.bg-orange .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-orange .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-orange .item-link.active-state, +.list-block .item-link.bg-orange.active-state, +.list-block .item-linka.bg-orange.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-orange.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-orange.active-state { + background: #F57C00; +} +.border-orange { + border-color: #ff9800; +} +.list-block .border-orange.item-inner:after, +.list-block ul.border-orange:after, +.border-orange:after, +.list-block .border-orange.item-inner:before, +.list-block ul.border-orange:before, +.border-orange:before { + background-color: #ff9800; +} +.floating-button.color-orange, +.speed-dial-buttons a.color-orange, +.floating-button.bg-orange, +.speed-dial-buttons a.bg-orange { + color: #fff; + background: #ff9800; +} +html:not(.watch-active-state) .floating-button.color-orange:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-orange:active, +html:not(.watch-active-state) .floating-button.bg-orange:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-orange:active, +.floating-button.color-orange.active-state, +.speed-dial-buttons a.color-orange.active-state, +.floating-button.bg-orange.active-state, +.speed-dial-buttons a.bg-orange.active-state { + background: #F57C00; +} +.floating-button.color-orange i, +.speed-dial-buttons a.color-orange i, +.floating-button.bg-orange i, +.speed-dial-buttons a.bg-orange i { + color: inherit; +} +.ripple-orange .ripple-wave { + background-color: rgba(255, 152, 0, 0.3); +} +.range-slider.color-orange input[type="range"]::-webkit-slider-thumb:before { + background-color: #ff9800; +} +.range-slider.color-orange input[type="range"]::-webkit-slider-thumb { + background-color: #ff9800; +} +.range-slider.color-orange input[type="range"]::-ms-thumb { + background-color: #ff9800; +} +.range-slider.color-orange input[type="range"]::-ms-fill-lower { + background-color: #ff9800; +} +.range-slider.color-orange input[type="range"]::-moz-range-thumb { + background-color: #ff9800; +} +.badge.color-orange { + background-color: #ff9800; + color: #fff; +} +.color-deeporange { + color: #ff5722; +} +.list-block .item-link.list-button.color-deeporange, +.list-button.color-deeporange, +.list-block .item-link.color-deeporange, +.tabbar a.active.color-deeporange, +a.color-deeporange { + color: #ff5722; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-deeporange, +.label-switch.color-deeporange input[type="checkbox"]:checked + .checkbox { + background-color: #ff5722; +} +.button.color-deeporange:not(.button-fill), +.color-deeporange.buttons-row .button:not(.button-fill) { + color: #ff5722 !important; +} +.button.button-fill.bg-deeporange, +.button.button-fill.color-deeporange { + background: #ff5722 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-deeporange:active, +html:not(.watch-active-state) .button.button-fill.color-deeporange:active, +.button.button-fill.bg-deeporange.active-state, +.button.button-fill.color-deeporange.active-state { + background: #E64A19 !important; +} +.progressbar.color-deeporange, +.progressbar.bg-deeporange { + background-color: rgba(255, 87, 34, 0.5); +} +.progressbar.color-deeporange span, +.progressbar.bg-deeporange span { + background-color: #ff5722; +} +.progressbar-infinite.color-deeporange, +.progressbar-infinite.bg-deeporange { + background-color: rgba(255, 87, 34, 0.5); +} +.progressbar-infinite.color-deeporange:after, +.progressbar-infinite.bg-deeporange:after, +.progressbar-infinite.color-deeporange:before, +.progressbar-infinite.bg-deeporange:before { + background-color: #ff5722; +} +.color-deeporange i.icon, +i.icon.color-deeporange { + color: #ff5722; +} +.preloader.color-deeporange svg circle, +.preloader.preloader-deeporange svg circle { + stroke: #ff5722; +} +.preloader.color-deeporange .preloader-inner-gap, +.preloader.preloader-deeporange .preloader-inner-gap, +.preloader.color-deeporange .preloader-inner-half-circle, +.preloader.preloader-deeporange .preloader-inner-half-circle { + border-color: #ff5722; +} +.bg-deeporange, +a.bg-deeporange, +.list-block .swipeout-actions-left a.bg-deeporange, +.list-block .swipeout-actions-right a.bg-deeporange { + background-color: #ff5722; +} +html:not(.watch-active-state) .list-block .bg-deeporange .item-link:active, +html:not(.watch-active-state) .list-block a.bg-deeporange .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-deeporange .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-deeporange .item-link:active, +html:not(.watch-active-state) .list-block.bg-deeporange .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-deeporange .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-deeporange .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-deeporange .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-deeporange:active, +html:not(.watch-active-state) .list-block .item-linka.bg-deeporange:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-deeporange:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-deeporange:active, +.list-block .bg-deeporange .item-link.active-state, +.list-block a.bg-deeporange .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-deeporange .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-deeporange .item-link.active-state, +.list-block.bg-deeporange .item-link.active-state, +.list-blocka.bg-deeporange .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-deeporange .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-deeporange .item-link.active-state, +.list-block .item-link.bg-deeporange.active-state, +.list-block .item-linka.bg-deeporange.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-deeporange.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-deeporange.active-state { + background: #E64A19; +} +.border-deeporange { + border-color: #ff5722; +} +.list-block .border-deeporange.item-inner:after, +.list-block ul.border-deeporange:after, +.border-deeporange:after, +.list-block .border-deeporange.item-inner:before, +.list-block ul.border-deeporange:before, +.border-deeporange:before { + background-color: #ff5722; +} +.floating-button.color-deeporange, +.speed-dial-buttons a.color-deeporange, +.floating-button.bg-deeporange, +.speed-dial-buttons a.bg-deeporange { + color: #fff; + background: #ff5722; +} +html:not(.watch-active-state) .floating-button.color-deeporange:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-deeporange:active, +html:not(.watch-active-state) .floating-button.bg-deeporange:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-deeporange:active, +.floating-button.color-deeporange.active-state, +.speed-dial-buttons a.color-deeporange.active-state, +.floating-button.bg-deeporange.active-state, +.speed-dial-buttons a.bg-deeporange.active-state { + background: #E64A19; +} +.floating-button.color-deeporange i, +.speed-dial-buttons a.color-deeporange i, +.floating-button.bg-deeporange i, +.speed-dial-buttons a.bg-deeporange i { + color: inherit; +} +.ripple-deeporange .ripple-wave { + background-color: rgba(255, 87, 34, 0.3); +} +.range-slider.color-deeporange input[type="range"]::-webkit-slider-thumb:before { + background-color: #ff5722; +} +.range-slider.color-deeporange input[type="range"]::-webkit-slider-thumb { + background-color: #ff5722; +} +.range-slider.color-deeporange input[type="range"]::-ms-thumb { + background-color: #ff5722; +} +.range-slider.color-deeporange input[type="range"]::-ms-fill-lower { + background-color: #ff5722; +} +.range-slider.color-deeporange input[type="range"]::-moz-range-thumb { + background-color: #ff5722; +} +.badge.color-deeporange { + background-color: #ff5722; + color: #fff; +} +.color-brown { + color: #795548; +} +.list-block .item-link.list-button.color-brown, +.list-button.color-brown, +.list-block .item-link.color-brown, +.tabbar a.active.color-brown, +a.color-brown { + color: #795548; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-brown, +.label-switch.color-brown input[type="checkbox"]:checked + .checkbox { + background-color: #795548; +} +.button.color-brown:not(.button-fill), +.color-brown.buttons-row .button:not(.button-fill) { + color: #795548 !important; +} +.button.button-fill.bg-brown, +.button.button-fill.color-brown { + background: #795548 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-brown:active, +html:not(.watch-active-state) .button.button-fill.color-brown:active, +.button.button-fill.bg-brown.active-state, +.button.button-fill.color-brown.active-state { + background: #5D4037 !important; +} +.progressbar.color-brown, +.progressbar.bg-brown { + background-color: rgba(121, 85, 72, 0.5); +} +.progressbar.color-brown span, +.progressbar.bg-brown span { + background-color: #795548; +} +.progressbar-infinite.color-brown, +.progressbar-infinite.bg-brown { + background-color: rgba(121, 85, 72, 0.5); +} +.progressbar-infinite.color-brown:after, +.progressbar-infinite.bg-brown:after, +.progressbar-infinite.color-brown:before, +.progressbar-infinite.bg-brown:before { + background-color: #795548; +} +.color-brown i.icon, +i.icon.color-brown { + color: #795548; +} +.preloader.color-brown svg circle, +.preloader.preloader-brown svg circle { + stroke: #795548; +} +.preloader.color-brown .preloader-inner-gap, +.preloader.preloader-brown .preloader-inner-gap, +.preloader.color-brown .preloader-inner-half-circle, +.preloader.preloader-brown .preloader-inner-half-circle { + border-color: #795548; +} +.bg-brown, +a.bg-brown, +.list-block .swipeout-actions-left a.bg-brown, +.list-block .swipeout-actions-right a.bg-brown { + background-color: #795548; +} +html:not(.watch-active-state) .list-block .bg-brown .item-link:active, +html:not(.watch-active-state) .list-block a.bg-brown .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-brown .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-brown .item-link:active, +html:not(.watch-active-state) .list-block.bg-brown .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-brown .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-brown .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-brown .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-brown:active, +html:not(.watch-active-state) .list-block .item-linka.bg-brown:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-brown:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-brown:active, +.list-block .bg-brown .item-link.active-state, +.list-block a.bg-brown .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-brown .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-brown .item-link.active-state, +.list-block.bg-brown .item-link.active-state, +.list-blocka.bg-brown .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-brown .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-brown .item-link.active-state, +.list-block .item-link.bg-brown.active-state, +.list-block .item-linka.bg-brown.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-brown.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-brown.active-state { + background: #5D4037; +} +.border-brown { + border-color: #795548; +} +.list-block .border-brown.item-inner:after, +.list-block ul.border-brown:after, +.border-brown:after, +.list-block .border-brown.item-inner:before, +.list-block ul.border-brown:before, +.border-brown:before { + background-color: #795548; +} +.floating-button.color-brown, +.speed-dial-buttons a.color-brown, +.floating-button.bg-brown, +.speed-dial-buttons a.bg-brown { + color: #fff; + background: #795548; +} +html:not(.watch-active-state) .floating-button.color-brown:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-brown:active, +html:not(.watch-active-state) .floating-button.bg-brown:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-brown:active, +.floating-button.color-brown.active-state, +.speed-dial-buttons a.color-brown.active-state, +.floating-button.bg-brown.active-state, +.speed-dial-buttons a.bg-brown.active-state { + background: #5D4037; +} +.floating-button.color-brown i, +.speed-dial-buttons a.color-brown i, +.floating-button.bg-brown i, +.speed-dial-buttons a.bg-brown i { + color: inherit; +} +.ripple-brown .ripple-wave { + background-color: rgba(121, 85, 72, 0.3); +} +.range-slider.color-brown input[type="range"]::-webkit-slider-thumb:before { + background-color: #795548; +} +.range-slider.color-brown input[type="range"]::-webkit-slider-thumb { + background-color: #795548; +} +.range-slider.color-brown input[type="range"]::-ms-thumb { + background-color: #795548; +} +.range-slider.color-brown input[type="range"]::-ms-fill-lower { + background-color: #795548; +} +.range-slider.color-brown input[type="range"]::-moz-range-thumb { + background-color: #795548; +} +.badge.color-brown { + background-color: #795548; + color: #fff; +} +.color-gray { + color: #9e9e9e; +} +.list-block .item-link.list-button.color-gray, +.list-button.color-gray, +.list-block .item-link.color-gray, +.tabbar a.active.color-gray, +a.color-gray { + color: #9e9e9e; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-gray, +.label-switch.color-gray input[type="checkbox"]:checked + .checkbox { + background-color: #9e9e9e; +} +.button.color-gray:not(.button-fill), +.color-gray.buttons-row .button:not(.button-fill) { + color: #9e9e9e !important; +} +.button.button-fill.bg-gray, +.button.button-fill.color-gray { + background: #9e9e9e !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-gray:active, +html:not(.watch-active-state) .button.button-fill.color-gray:active, +.button.button-fill.bg-gray.active-state, +.button.button-fill.color-gray.active-state { + background: #616161 !important; +} +.progressbar.color-gray, +.progressbar.bg-gray { + background-color: rgba(158, 158, 158, 0.5); +} +.progressbar.color-gray span, +.progressbar.bg-gray span { + background-color: #9e9e9e; +} +.progressbar-infinite.color-gray, +.progressbar-infinite.bg-gray { + background-color: rgba(158, 158, 158, 0.5); +} +.progressbar-infinite.color-gray:after, +.progressbar-infinite.bg-gray:after, +.progressbar-infinite.color-gray:before, +.progressbar-infinite.bg-gray:before { + background-color: #9e9e9e; +} +.color-gray i.icon, +i.icon.color-gray { + color: #9e9e9e; +} +.preloader.color-gray svg circle, +.preloader.preloader-gray svg circle { + stroke: #9e9e9e; +} +.preloader.color-gray .preloader-inner-gap, +.preloader.preloader-gray .preloader-inner-gap, +.preloader.color-gray .preloader-inner-half-circle, +.preloader.preloader-gray .preloader-inner-half-circle { + border-color: #9e9e9e; +} +.bg-gray, +a.bg-gray, +.list-block .swipeout-actions-left a.bg-gray, +.list-block .swipeout-actions-right a.bg-gray { + background-color: #9e9e9e; +} +html:not(.watch-active-state) .list-block .bg-gray .item-link:active, +html:not(.watch-active-state) .list-block a.bg-gray .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-gray .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-gray .item-link:active, +html:not(.watch-active-state) .list-block.bg-gray .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-gray .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-gray .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-gray .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-gray:active, +html:not(.watch-active-state) .list-block .item-linka.bg-gray:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-gray:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-gray:active, +.list-block .bg-gray .item-link.active-state, +.list-block a.bg-gray .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-gray .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-gray .item-link.active-state, +.list-block.bg-gray .item-link.active-state, +.list-blocka.bg-gray .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-gray .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-gray .item-link.active-state, +.list-block .item-link.bg-gray.active-state, +.list-block .item-linka.bg-gray.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-gray.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-gray.active-state { + background: #616161; +} +.border-gray { + border-color: #9e9e9e; +} +.list-block .border-gray.item-inner:after, +.list-block ul.border-gray:after, +.border-gray:after, +.list-block .border-gray.item-inner:before, +.list-block ul.border-gray:before, +.border-gray:before { + background-color: #9e9e9e; +} +.floating-button.color-gray, +.speed-dial-buttons a.color-gray, +.floating-button.bg-gray, +.speed-dial-buttons a.bg-gray { + color: #fff; + background: #9e9e9e; +} +html:not(.watch-active-state) .floating-button.color-gray:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-gray:active, +html:not(.watch-active-state) .floating-button.bg-gray:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-gray:active, +.floating-button.color-gray.active-state, +.speed-dial-buttons a.color-gray.active-state, +.floating-button.bg-gray.active-state, +.speed-dial-buttons a.bg-gray.active-state { + background: #616161; +} +.floating-button.color-gray i, +.speed-dial-buttons a.color-gray i, +.floating-button.bg-gray i, +.speed-dial-buttons a.bg-gray i { + color: inherit; +} +.ripple-gray .ripple-wave { + background-color: rgba(158, 158, 158, 0.3); +} +.range-slider.color-gray input[type="range"]::-webkit-slider-thumb:before { + background-color: #9e9e9e; +} +.range-slider.color-gray input[type="range"]::-webkit-slider-thumb { + background-color: #9e9e9e; +} +.range-slider.color-gray input[type="range"]::-ms-thumb { + background-color: #9e9e9e; +} +.range-slider.color-gray input[type="range"]::-ms-fill-lower { + background-color: #9e9e9e; +} +.range-slider.color-gray input[type="range"]::-moz-range-thumb { + background-color: #9e9e9e; +} +.badge.color-gray { + background-color: #9e9e9e; + color: #fff; +} +.color-bluegray { + color: #607d8b; +} +.list-block .item-link.list-button.color-bluegray, +.list-button.color-bluegray, +.list-block .item-link.color-bluegray, +.tabbar a.active.color-bluegray, +a.color-bluegray { + color: #607d8b; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-bluegray, +.label-switch.color-bluegray input[type="checkbox"]:checked + .checkbox { + background-color: #607d8b; +} +.button.color-bluegray:not(.button-fill), +.color-bluegray.buttons-row .button:not(.button-fill) { + color: #607d8b !important; +} +.button.button-fill.bg-bluegray, +.button.button-fill.color-bluegray { + background: #607d8b !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-bluegray:active, +html:not(.watch-active-state) .button.button-fill.color-bluegray:active, +.button.button-fill.bg-bluegray.active-state, +.button.button-fill.color-bluegray.active-state { + background: #455A64 !important; +} +.progressbar.color-bluegray, +.progressbar.bg-bluegray { + background-color: rgba(96, 125, 139, 0.5); +} +.progressbar.color-bluegray span, +.progressbar.bg-bluegray span { + background-color: #607d8b; +} +.progressbar-infinite.color-bluegray, +.progressbar-infinite.bg-bluegray { + background-color: rgba(96, 125, 139, 0.5); +} +.progressbar-infinite.color-bluegray:after, +.progressbar-infinite.bg-bluegray:after, +.progressbar-infinite.color-bluegray:before, +.progressbar-infinite.bg-bluegray:before { + background-color: #607d8b; +} +.color-bluegray i.icon, +i.icon.color-bluegray { + color: #607d8b; +} +.preloader.color-bluegray svg circle, +.preloader.preloader-bluegray svg circle { + stroke: #607d8b; +} +.preloader.color-bluegray .preloader-inner-gap, +.preloader.preloader-bluegray .preloader-inner-gap, +.preloader.color-bluegray .preloader-inner-half-circle, +.preloader.preloader-bluegray .preloader-inner-half-circle { + border-color: #607d8b; +} +.bg-bluegray, +a.bg-bluegray, +.list-block .swipeout-actions-left a.bg-bluegray, +.list-block .swipeout-actions-right a.bg-bluegray { + background-color: #607d8b; +} +html:not(.watch-active-state) .list-block .bg-bluegray .item-link:active, +html:not(.watch-active-state) .list-block a.bg-bluegray .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-bluegray .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-bluegray .item-link:active, +html:not(.watch-active-state) .list-block.bg-bluegray .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-bluegray .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-bluegray .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-bluegray .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-bluegray:active, +html:not(.watch-active-state) .list-block .item-linka.bg-bluegray:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-bluegray:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-bluegray:active, +.list-block .bg-bluegray .item-link.active-state, +.list-block a.bg-bluegray .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-bluegray .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-bluegray .item-link.active-state, +.list-block.bg-bluegray .item-link.active-state, +.list-blocka.bg-bluegray .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-bluegray .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-bluegray .item-link.active-state, +.list-block .item-link.bg-bluegray.active-state, +.list-block .item-linka.bg-bluegray.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-bluegray.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-bluegray.active-state { + background: #455A64; +} +.border-bluegray { + border-color: #607d8b; +} +.list-block .border-bluegray.item-inner:after, +.list-block ul.border-bluegray:after, +.border-bluegray:after, +.list-block .border-bluegray.item-inner:before, +.list-block ul.border-bluegray:before, +.border-bluegray:before { + background-color: #607d8b; +} +.floating-button.color-bluegray, +.speed-dial-buttons a.color-bluegray, +.floating-button.bg-bluegray, +.speed-dial-buttons a.bg-bluegray { + color: #fff; + background: #607d8b; +} +html:not(.watch-active-state) .floating-button.color-bluegray:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-bluegray:active, +html:not(.watch-active-state) .floating-button.bg-bluegray:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-bluegray:active, +.floating-button.color-bluegray.active-state, +.speed-dial-buttons a.color-bluegray.active-state, +.floating-button.bg-bluegray.active-state, +.speed-dial-buttons a.bg-bluegray.active-state { + background: #455A64; +} +.floating-button.color-bluegray i, +.speed-dial-buttons a.color-bluegray i, +.floating-button.bg-bluegray i, +.speed-dial-buttons a.bg-bluegray i { + color: inherit; +} +.ripple-bluegray .ripple-wave { + background-color: rgba(96, 125, 139, 0.3); +} +.range-slider.color-bluegray input[type="range"]::-webkit-slider-thumb:before { + background-color: #607d8b; +} +.range-slider.color-bluegray input[type="range"]::-webkit-slider-thumb { + background-color: #607d8b; +} +.range-slider.color-bluegray input[type="range"]::-ms-thumb { + background-color: #607d8b; +} +.range-slider.color-bluegray input[type="range"]::-ms-fill-lower { + background-color: #607d8b; +} +.range-slider.color-bluegray input[type="range"]::-moz-range-thumb { + background-color: #607d8b; +} +.badge.color-bluegray { + background-color: #607d8b; + color: #fff; +} +.color-white { + color: #ffffff; +} +.list-block .item-link.list-button.color-white, +.list-button.color-white, +.list-block .item-link.color-white, +.tabbar a.active.color-white, +a.color-white { + color: #ffffff; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-white, +.label-switch.color-white input[type="checkbox"]:checked + .checkbox { + background-color: #ffffff; +} +.button.color-white:not(.button-fill), +.color-white.buttons-row .button:not(.button-fill) { + color: #ffffff !important; +} +.button.button-fill.bg-white, +.button.button-fill.color-white { + background: #ffffff !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-white:active, +html:not(.watch-active-state) .button.button-fill.color-white:active, +.button.button-fill.bg-white.active-state, +.button.button-fill.color-white.active-state { + background: rgba(0, 0, 0, 0.1) !important; +} +.progressbar.color-white, +.progressbar.bg-white { + background-color: rgba(255, 255, 255, 0.5); +} +.progressbar.color-white span, +.progressbar.bg-white span { + background-color: #ffffff; +} +.progressbar-infinite.color-white, +.progressbar-infinite.bg-white { + background-color: rgba(255, 255, 255, 0.5); +} +.progressbar-infinite.color-white:after, +.progressbar-infinite.bg-white:after, +.progressbar-infinite.color-white:before, +.progressbar-infinite.bg-white:before { + background-color: #ffffff; +} +.color-white i.icon, +i.icon.color-white { + color: #ffffff; +} +.preloader.color-white svg circle, +.preloader.preloader-white svg circle { + stroke: #ffffff; +} +.preloader.color-white .preloader-inner-gap, +.preloader.preloader-white .preloader-inner-gap, +.preloader.color-white .preloader-inner-half-circle, +.preloader.preloader-white .preloader-inner-half-circle { + border-color: #ffffff; +} +.bg-white, +a.bg-white, +.list-block .swipeout-actions-left a.bg-white, +.list-block .swipeout-actions-right a.bg-white { + background-color: #ffffff; +} +html:not(.watch-active-state) .list-block .bg-white .item-link:active, +html:not(.watch-active-state) .list-block a.bg-white .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-white .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-white .item-link:active, +html:not(.watch-active-state) .list-block.bg-white .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-white .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-white .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-white .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-white:active, +html:not(.watch-active-state) .list-block .item-linka.bg-white:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-white:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-white:active, +.list-block .bg-white .item-link.active-state, +.list-block a.bg-white .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-white .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-white .item-link.active-state, +.list-block.bg-white .item-link.active-state, +.list-blocka.bg-white .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-white .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-white .item-link.active-state, +.list-block .item-link.bg-white.active-state, +.list-block .item-linka.bg-white.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-white.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-white.active-state { + background: rgba(0, 0, 0, 0.1); +} +.border-white { + border-color: #ffffff; +} +.list-block .border-white.item-inner:after, +.list-block ul.border-white:after, +.border-white:after, +.list-block .border-white.item-inner:before, +.list-block ul.border-white:before, +.border-white:before { + background-color: #ffffff; +} +.floating-button.color-white, +.speed-dial-buttons a.color-white, +.floating-button.bg-white, +.speed-dial-buttons a.bg-white { + color: #fff; + background: #ffffff; +} +html:not(.watch-active-state) .floating-button.color-white:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-white:active, +html:not(.watch-active-state) .floating-button.bg-white:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-white:active, +.floating-button.color-white.active-state, +.speed-dial-buttons a.color-white.active-state, +.floating-button.bg-white.active-state, +.speed-dial-buttons a.bg-white.active-state { + background: rgba(0, 0, 0, 0.1); +} +.floating-button.color-white i, +.speed-dial-buttons a.color-white i, +.floating-button.bg-white i, +.speed-dial-buttons a.bg-white i { + color: inherit; +} +.ripple-white .ripple-wave { + background-color: rgba(255, 255, 255, 0.3); +} +.range-slider.color-white input[type="range"]::-webkit-slider-thumb:before { + background-color: #ffffff; +} +.range-slider.color-white input[type="range"]::-webkit-slider-thumb { + background-color: #ffffff; +} +.range-slider.color-white input[type="range"]::-ms-thumb { + background-color: #ffffff; +} +.range-slider.color-white input[type="range"]::-ms-fill-lower { + background-color: #ffffff; +} +.range-slider.color-white input[type="range"]::-moz-range-thumb { + background-color: #ffffff; +} +.badge.color-white { + background-color: #ffffff; + color: #fff; +} +.color-black { + color: #000000; +} +.list-block .item-link.list-button.color-black, +.list-button.color-black, +.list-block .item-link.color-black, +.tabbar a.active.color-black, +a.color-black { + color: #000000; +} +.label-switch input[type="checkbox"]:checked + .checkbox.color-black, +.label-switch.color-black input[type="checkbox"]:checked + .checkbox { + background-color: #000000; +} +.button.color-black:not(.button-fill), +.color-black.buttons-row .button:not(.button-fill) { + color: #000000 !important; +} +.button.button-fill.bg-black, +.button.button-fill.color-black { + background: #000000 !important; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill.bg-black:active, +html:not(.watch-active-state) .button.button-fill.color-black:active, +.button.button-fill.bg-black.active-state, +.button.button-fill.color-black.active-state { + background: #333 !important; +} +.progressbar.color-black, +.progressbar.bg-black { + background-color: rgba(0, 0, 0, 0.5); +} +.progressbar.color-black span, +.progressbar.bg-black span { + background-color: #000000; +} +.progressbar-infinite.color-black, +.progressbar-infinite.bg-black { + background-color: rgba(0, 0, 0, 0.5); +} +.progressbar-infinite.color-black:after, +.progressbar-infinite.bg-black:after, +.progressbar-infinite.color-black:before, +.progressbar-infinite.bg-black:before { + background-color: #000000; +} +.color-black i.icon, +i.icon.color-black { + color: #000000; +} +.preloader.color-black svg circle, +.preloader.preloader-black svg circle { + stroke: #000000; +} +.preloader.color-black .preloader-inner-gap, +.preloader.preloader-black .preloader-inner-gap, +.preloader.color-black .preloader-inner-half-circle, +.preloader.preloader-black .preloader-inner-half-circle { + border-color: #000000; +} +.bg-black, +a.bg-black, +.list-block .swipeout-actions-left a.bg-black, +.list-block .swipeout-actions-right a.bg-black { + background-color: #000000; +} +html:not(.watch-active-state) .list-block .bg-black .item-link:active, +html:not(.watch-active-state) .list-block a.bg-black .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-black .item-link:active, +html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-black .item-link:active, +html:not(.watch-active-state) .list-block.bg-black .item-link:active, +html:not(.watch-active-state) .list-blocka.bg-black .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-black .item-link:active, +html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-black .item-link:active, +html:not(.watch-active-state) .list-block .item-link.bg-black:active, +html:not(.watch-active-state) .list-block .item-linka.bg-black:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-black:active, +html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-black:active, +.list-block .bg-black .item-link.active-state, +.list-block a.bg-black .item-link.active-state, +.list-block .list-block .swipeout-actions-left a.bg-black .item-link.active-state, +.list-block .list-block .swipeout-actions-right a.bg-black .item-link.active-state, +.list-block.bg-black .item-link.active-state, +.list-blocka.bg-black .item-link.active-state, +.list-block.list-block .swipeout-actions-left a.bg-black .item-link.active-state, +.list-block.list-block .swipeout-actions-right a.bg-black .item-link.active-state, +.list-block .item-link.bg-black.active-state, +.list-block .item-linka.bg-black.active-state, +.list-block .item-link.list-block .swipeout-actions-left a.bg-black.active-state, +.list-block .item-link.list-block .swipeout-actions-right a.bg-black.active-state { + background: #333; +} +.border-black { + border-color: #000000; +} +.list-block .border-black.item-inner:after, +.list-block ul.border-black:after, +.border-black:after, +.list-block .border-black.item-inner:before, +.list-block ul.border-black:before, +.border-black:before { + background-color: #000000; +} +.floating-button.color-black, +.speed-dial-buttons a.color-black, +.floating-button.bg-black, +.speed-dial-buttons a.bg-black { + color: #fff; + background: #000000; +} +html:not(.watch-active-state) .floating-button.color-black:active, +html:not(.watch-active-state) .speed-dial-buttons a.color-black:active, +html:not(.watch-active-state) .floating-button.bg-black:active, +html:not(.watch-active-state) .speed-dial-buttons a.bg-black:active, +.floating-button.color-black.active-state, +.speed-dial-buttons a.color-black.active-state, +.floating-button.bg-black.active-state, +.speed-dial-buttons a.bg-black.active-state { + background: #333; +} +.floating-button.color-black i, +.speed-dial-buttons a.color-black i, +.floating-button.bg-black i, +.speed-dial-buttons a.bg-black i { + color: inherit; +} +.ripple-black .ripple-wave { + background-color: rgba(0, 0, 0, 0.3); +} +.range-slider.color-black input[type="range"]::-webkit-slider-thumb:before { + background-color: #000000; +} +.range-slider.color-black input[type="range"]::-webkit-slider-thumb { + background-color: #000000; +} +.range-slider.color-black input[type="range"]::-ms-thumb { + background-color: #000000; +} +.range-slider.color-black input[type="range"]::-ms-fill-lower { + background-color: #000000; +} +.range-slider.color-black input[type="range"]::-moz-range-thumb { + background-color: #000000; +} +.badge.color-black { + background-color: #000000; + color: #fff; +} diff --git a/bower_components/framework7/dist/css/framework7.material.colors.min.css b/bower_components/framework7/dist/css/framework7.material.colors.min.css new file mode 100644 index 00000000..c6b11a61 --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.material.colors.min.css @@ -0,0 +1,15 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +.layout-dark .login-screen-content,.layout-dark .page,.layout-dark .panel,.page.layout-dark,.panel.layout-dark{background-color:#222;color:rgba(255,255,255,.87)}.layout-dark .content-block-title{color:rgba(255,255,255,.87)}.layout-dark .content-block-inner:before{background-color:#393939}.layout-dark .content-block-inner:after{background-color:#393939}.layout-dark .popover .list-block ul{background:0 0}.layout-dark .card{background:#1c1c1c}.layout-dark .card-header:after{background-color:#393939}.layout-dark .card-footer{color:#bbb}.layout-dark .card-footer:before{background-color:#393939}.layout-dark .list-block ul:before,.list-block.layout-dark ul:before{background-color:#393939}.layout-dark .list-block ul:after,.list-block.layout-dark ul:after{background-color:#393939}.layout-dark .list-block.inset ul,.list-block.layout-dark.inset ul{background:#1c1c1c}.layout-dark .list-block.notifications>ul,.list-block.layout-dark.notifications>ul{background:0 0}.layout-dark li.sorting{background-color:rgba(34,34,34,.8)}.layout-dark .swipeout-actions-left a,.layout-dark .swipeout-actions-right a{background-color:#444}.layout-dark .item-inner:after,.layout-dark .list-block ul ul li:last-child .item-inner:after{background-color:#393939}.layout-dark .item-after,.layout-dark .item-text{color:rgba(255,255,255,.7)}.layout-dark .list-block-label{color:#bbb}.layout-dark .item-divider,.layout-dark .list-group-title{background:#1a1a1a;color:#bbb}.layout-dark .item-divider:before,.layout-dark .list-group-title:before{background-color:#393939}.layout-dark .contacts-block .list-group-title{background:0 0}.layout-dark .autocomplete-dropdown{background:#1c1c1c}.layout-dark .autocomplete-dropdown .list-block{color:rgba(255,255,255,.54)}.layout-dark .autocomplete-dropdown .list-block b{color:rgba(255,255,255,.87)}.layout-dark .item-link.active-state,.layout-dark label.label-checkbox.active-state,.layout-dark label.label-radio.active-state,html:not(.watch-active-state) .layout-dark .item-link:active,html:not(.watch-active-state) .layout-dark label.label-checkbox:active,html:not(.watch-active-state) .layout-dark label.label-radio:active{background-color:rgba(255,255,255,.05)}.layout-dark .list-block input[type=date],.layout-dark .list-block input[type=datetime-local],.layout-dark .list-block input[type=email],.layout-dark .list-block input[type=number],.layout-dark .list-block input[type=password],.layout-dark .list-block input[type=search],.layout-dark .list-block input[type=tel],.layout-dark .list-block input[type=text],.layout-dark .list-block input[type=time],.layout-dark .list-block input[type=url],.layout-dark .list-block select,.layout-dark .list-block textarea{color:#fff}.layout-dark .list-block input[type=date]::-webkit-input-placeholder,.layout-dark .list-block input[type=datetime-local]::-webkit-input-placeholder,.layout-dark .list-block input[type=email]::-webkit-input-placeholder,.layout-dark .list-block input[type=number]::-webkit-input-placeholder,.layout-dark .list-block input[type=password]::-webkit-input-placeholder,.layout-dark .list-block input[type=search]::-webkit-input-placeholder,.layout-dark .list-block input[type=tel]::-webkit-input-placeholder,.layout-dark .list-block input[type=text]::-webkit-input-placeholder,.layout-dark .list-block input[type=time]::-webkit-input-placeholder,.layout-dark .list-block input[type=url]::-webkit-input-placeholder,.layout-dark .list-block select::-webkit-input-placeholder,.layout-dark .list-block textarea::-webkit-input-placeholder{color:rgba(255,255,255,.35)}.layout-dark .label-switch .checkbox{background:rgba(255,255,255,.3)}.layout-dark .item-inner:not(.focus-state) .floating-label,.layout-dark .item-inner:not(.focus-state) .label{color:rgba(255,255,255,.7)}.layout-dark .item-inner:not(.focus-state):not(.not-empty-state) .input-field:after,.layout-dark .item-inner:not(.focus-state):not(.not-empty-state) .item-input-field:after{background-color:rgba(255,255,255,.12)}.layout-dark label.label-checkbox i.icon-form-checkbox{border-color:rgba(255,255,255,.7)}.layout-dark label.label-radio i.icon-form-radio{border-color:rgba(255,255,255,.7)}.layout-dark .item-link.list-button:after,.layout-dark .list-button:after{background-color:#393939}.layout-dark .page-content .ripple-wave{background:rgba(255,255,255,.3)}.layout-dark .button:not(.button-fill).active-state,html:not(.watch-active-state) .layout-dark .button:not(.button-fill):active{background:rgba(255,255,255,.1)}.layout-dark .chip{background:rgba(255,255,255,.87)}.layout-dark .timeline-item-inner{background:#1c1c1c}.layout-dark .timeline-item-divider{background:rgba(255,255,255,.3)}.layout-dark .content-block-inner .timeline-item-inner{border-color:#393939}.layout-dark .timeline-item-time{color:rgba(255,255,255,.7)}.layout-dark .data-table tbody tr.data-table-row-selected{background:rgba(255,255,255,.05)}.layout-dark .data-table tbody td:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#393939;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .layout-dark .data-table tbody td:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .layout-dark .data-table tbody td:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}html:not(.ios):not(.android) .layout-dark .data-table tbody tr:hover{background:rgba(255,255,255,.05)}.layout-dark .data-table thead td:not(.sortable-active),.layout-dark .data-table thead th:not(.sortable-active){color:rgba(255,255,255,.5)}.layout-dark .data-table td.actions-cell a.link,.layout-dark .data-table th.actions-cell a.link{color:rgba(255,255,255,.5)}.layout-dark .data-table .sortable-cell.numeric-cell:before,.layout-dark .data-table .sortable-cell:not(.numeric-cell):after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23ffffff'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200h24v24H0V0z'%20fill%3D'none'%2F%3E%3Cpath%20d%3D'M20%2012l-1.41-1.41L13%2016.17V4h-2v12.17l-5.58-5.59L4%2012l8%208%208-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.layout-dark .data-table .data-table-actions a.link{color:rgba(255,255,255,.5)}@media (max-width:480px) and (orientation:portrait){.layout-dark .data-table.data-table-collapsible tr:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#393939;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .layout-dark .data-table.data-table-collapsible tr:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .layout-dark .data-table.data-table-collapsible tr:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.layout-dark .data-table.data-table-collapsible tr:hover{background-color:inherit}.layout-dark .data-table.data-table-collapsible td:not(.checkbox-cell):before{color:rgba(255,255,255,.5)}}.theme-red .button:not(.button-fill){color:#f44336}.theme-red .navbar .button:not(.button-fill),.theme-red .subnavbar .button:not(.button-fill),.theme-red .toolbar .button:not(.button-fill),.theme-red.navbar .button:not(.button-fill),.theme-red.subnavbar .button:not(.button-fill),.theme-red.toolbar .button:not(.button-fill){color:#fff}.theme-red .button.button-fill{background:#f44336;color:#fff}.theme-red .button.button-fill.active-state,html:not(.watch-active-state) .theme-red .button.button-fill:active{background:#d32f2f}.progressbar.theme-red,.theme-red .progressbar{background-color:rgba(244,67,54,.5)}.progressbar.theme-red span,.theme-red .progressbar span{background-color:#f44336}.progressbar-infinite.theme-red,.theme-red .progressbar-infinite{background-color:rgba(244,67,54,.5)}.progressbar-infinite.theme-red:after,.progressbar-infinite.theme-red:before,.theme-red .progressbar-infinite:after,.theme-red .progressbar-infinite:before{background-color:#f44336}.color-red i.icon,i.icon.color-red{color:#f44336}i.icon-next.color-red,i.icon-next.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23f44336'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-red,i.icon-prev.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23f44336'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-red,i.icon-back.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-red,i.icon-forward.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-red,i.icon-bars.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E")}.theme-red .card a,.theme-red a{color:#f44336}.navbar.theme-red,.searchbar.theme-red,.subnavbar.theme-red,.theme-red .navbar,.theme-red .searchbar,.theme-red .subnavbar,.theme-red .toolbar,.toolbar.theme-red{background-color:#f44336}.label-switch.theme-red input[type=checkbox]:checked+.checkbox,.theme-red .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(244,67,54,.5)}.label-switch.theme-red input[type=checkbox]:checked+.checkbox:after,.theme-red .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#f44336}.theme-red label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-red i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-red label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-red label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-red label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-red label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-red label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-red label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-red input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-red input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-red input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-red input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-red input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-red input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#f44336;background-color:#f44336}.theme-red label.label-radio i.icon-form-radio:after,label.label-radio.theme-red i.icon-form-radio:after{background-color:#f44336}.theme-red label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-red label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-red label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-red label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-red label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-red label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-red input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-red input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-red input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-red input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-red input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-red input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#f44336}.theme-red label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-red label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-red label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-red label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-red label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-red label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-red input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-red input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-red input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-red input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-red input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-red input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#f44336}.form-checkbox.theme-red input[type=checkbox]:checked~i,.theme-red .form-checkbox input[type=checkbox]:checked~i{border-color:#f44336;background-color:#f44336}.form-radio.theme-red input[type=radio]:checked~i,.theme-red .form-radio input[type=radio]:checked~i{border-color:#f44336}.form-radio.theme-red input[type=radio]:checked~i:after,.theme-red .form-radio input[type=radio]:checked~i:after{background-color:#f44336}.theme-red .form-checkbox .ripple-wave,.theme-red .form-radio .ripple-wave{background:rgba(244,67,54,.5)}.theme-red .focus-state .floating-label,.theme-red .focus-state .label{color:#f44336}.theme-red .input-field.focus-state:after,.theme-red .input-field.not-empty-state:after,.theme-red .item-input-field.focus-state:after,.theme-red .item-input-field.not-empty-state:after{background:#f44336}.theme-red .picker-calendar-day.picker-calendar-day-today span{color:#f44336}.theme-red .picker-calendar-day.picker-calendar-day-selected span{background-color:#f44336;color:#fff}.theme-red .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#f44336}.theme-red .picker-header{background-color:#f44336}.theme-red .modal-button{color:#f44336}.theme-red .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-red .timeline-item-date{background-color:#f44336}.theme-red .timeline-month-title,.theme-red .timeline-year-title{background-color:#f44336}.theme-red .statusbar-overlay{background-color:#b71c1c}.data-table.theme-red .data-table-header-selected,.theme-red .data-table .data-table-header-selected{background:rgba(244,67,54,.1)}.data-table.theme-red .data-table-title-selected,.theme-red .data-table .data-table-title-selected{color:#f44336}.swiper-pagination.color-red .swiper-pagination-bullet-active,.theme-red .swiper-pagination .swiper-pagination-bullet-active{background-color:#f44336}.swiper-pagination.color-red .swiper-pagination-progressbar,.theme-red .swiper-pagination .swiper-pagination-progressbar{background-color:#f44336}.swiper-pagination.swiper-pagination-progress.bg-red{background-color:rgba(244,67,54,.25)}.swiper-button-next.color-red,.swiper-container-rtl .swiper-button-prev.color-red,.theme-red .swiper-button-next,.theme-red .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-red,.swiper-container-rtl .swiper-button-next.color-red,.theme-red .swiper-button-prev,.theme-red .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-red,.speed-dial-buttons a.theme-red,.theme-red .floating-button,.theme-red .speed-dial-buttons a{color:#fff;background:#f44336}.floating-button.theme-red.active-state,.speed-dial-buttons a.theme-red.active-state,.theme-red .floating-button.active-state,.theme-red .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-red:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-red:active,html:not(.watch-active-state) .theme-red .floating-button:active,html:not(.watch-active-state) .theme-red .speed-dial-buttons a:active{background:#d32f2f}.floating-button.theme-red i,.speed-dial-buttons a.theme-red i,.theme-red .floating-button i,.theme-red .speed-dial-buttons a i{color:inherit}.range-slider.theme-red input[type=range]::-webkit-slider-thumb:before,.theme-red .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#f44336}.range-slider.theme-red input[type=range]::-webkit-slider-thumb,.theme-red .range-slider input[type=range]::-webkit-slider-thumb{background-color:#f44336}.range-slider.theme-red input[type=range]::-ms-thumb,.theme-red .range-slider input[type=range]::-ms-thumb{background-color:#f44336}.range-slider.theme-red input[type=range]::-ms-fill-lower,.theme-red .range-slider input[type=range]::-ms-fill-lower{background-color:#f44336}.range-slider.theme-red input[type=range]::-moz-range-thumb,.theme-red .range-slider input[type=range]::-moz-range-thumb{background-color:#f44336}.badge.theme-red{background-color:#f44336;color:#fff}.theme-pink .button:not(.button-fill){color:#e91e63}.theme-pink .navbar .button:not(.button-fill),.theme-pink .subnavbar .button:not(.button-fill),.theme-pink .toolbar .button:not(.button-fill),.theme-pink.navbar .button:not(.button-fill),.theme-pink.subnavbar .button:not(.button-fill),.theme-pink.toolbar .button:not(.button-fill){color:#fff}.theme-pink .button.button-fill{background:#e91e63;color:#fff}.theme-pink .button.button-fill.active-state,html:not(.watch-active-state) .theme-pink .button.button-fill:active{background:#c2185b}.progressbar.theme-pink,.theme-pink .progressbar{background-color:rgba(233,30,99,.5)}.progressbar.theme-pink span,.theme-pink .progressbar span{background-color:#e91e63}.progressbar-infinite.theme-pink,.theme-pink .progressbar-infinite{background-color:rgba(233,30,99,.5)}.progressbar-infinite.theme-pink:after,.progressbar-infinite.theme-pink:before,.theme-pink .progressbar-infinite:after,.theme-pink .progressbar-infinite:before{background-color:#e91e63}.color-pink i.icon,i.icon.color-pink{color:#e91e63}i.icon-next.color-pink,i.icon-next.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23e91e63'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-pink,i.icon-prev.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23e91e63'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-pink,i.icon-back.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-pink,i.icon-forward.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-pink,i.icon-bars.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E")}.theme-pink .card a,.theme-pink a{color:#e91e63}.navbar.theme-pink,.searchbar.theme-pink,.subnavbar.theme-pink,.theme-pink .navbar,.theme-pink .searchbar,.theme-pink .subnavbar,.theme-pink .toolbar,.toolbar.theme-pink{background-color:#e91e63}.label-switch.theme-pink input[type=checkbox]:checked+.checkbox,.theme-pink .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(233,30,99,.5)}.label-switch.theme-pink input[type=checkbox]:checked+.checkbox:after,.theme-pink .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#e91e63}.theme-pink label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-pink i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-pink label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-pink label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-pink label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-pink label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-pink label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-pink label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-pink input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-pink input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-pink input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-pink input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-pink input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-pink input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#e91e63;background-color:#e91e63}.theme-pink label.label-radio i.icon-form-radio:after,label.label-radio.theme-pink i.icon-form-radio:after{background-color:#e91e63}.theme-pink label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-pink label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-pink label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-pink label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-pink label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-pink label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-pink input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-pink input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-pink input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-pink input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-pink input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-pink input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#e91e63}.theme-pink label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-pink label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-pink label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-pink label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-pink label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-pink label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-pink input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-pink input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-pink input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-pink input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-pink input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-pink input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#e91e63}.form-checkbox.theme-pink input[type=checkbox]:checked~i,.theme-pink .form-checkbox input[type=checkbox]:checked~i{border-color:#e91e63;background-color:#e91e63}.form-radio.theme-pink input[type=radio]:checked~i,.theme-pink .form-radio input[type=radio]:checked~i{border-color:#e91e63}.form-radio.theme-pink input[type=radio]:checked~i:after,.theme-pink .form-radio input[type=radio]:checked~i:after{background-color:#e91e63}.theme-pink .form-checkbox .ripple-wave,.theme-pink .form-radio .ripple-wave{background:rgba(233,30,99,.5)}.theme-pink .focus-state .floating-label,.theme-pink .focus-state .label{color:#e91e63}.theme-pink .input-field.focus-state:after,.theme-pink .input-field.not-empty-state:after,.theme-pink .item-input-field.focus-state:after,.theme-pink .item-input-field.not-empty-state:after{background:#e91e63}.theme-pink .picker-calendar-day.picker-calendar-day-today span{color:#e91e63}.theme-pink .picker-calendar-day.picker-calendar-day-selected span{background-color:#e91e63;color:#fff}.theme-pink .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#e91e63}.theme-pink .picker-header{background-color:#e91e63}.theme-pink .modal-button{color:#e91e63}.theme-pink .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-pink .timeline-item-date{background-color:#e91e63}.theme-pink .timeline-month-title,.theme-pink .timeline-year-title{background-color:#e91e63}.theme-pink .statusbar-overlay{background-color:#880e4f}.data-table.theme-pink .data-table-header-selected,.theme-pink .data-table .data-table-header-selected{background:rgba(233,30,99,.1)}.data-table.theme-pink .data-table-title-selected,.theme-pink .data-table .data-table-title-selected{color:#e91e63}.swiper-pagination.color-pink .swiper-pagination-bullet-active,.theme-pink .swiper-pagination .swiper-pagination-bullet-active{background-color:#e91e63}.swiper-pagination.color-pink .swiper-pagination-progressbar,.theme-pink .swiper-pagination .swiper-pagination-progressbar{background-color:#e91e63}.swiper-pagination.swiper-pagination-progress.bg-pink{background-color:rgba(233,30,99,.25)}.swiper-button-next.color-pink,.swiper-container-rtl .swiper-button-prev.color-pink,.theme-pink .swiper-button-next,.theme-pink .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-pink,.swiper-container-rtl .swiper-button-next.color-pink,.theme-pink .swiper-button-prev,.theme-pink .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-pink,.speed-dial-buttons a.theme-pink,.theme-pink .floating-button,.theme-pink .speed-dial-buttons a{color:#fff;background:#e91e63}.floating-button.theme-pink.active-state,.speed-dial-buttons a.theme-pink.active-state,.theme-pink .floating-button.active-state,.theme-pink .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-pink:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-pink:active,html:not(.watch-active-state) .theme-pink .floating-button:active,html:not(.watch-active-state) .theme-pink .speed-dial-buttons a:active{background:#c2185b}.floating-button.theme-pink i,.speed-dial-buttons a.theme-pink i,.theme-pink .floating-button i,.theme-pink .speed-dial-buttons a i{color:inherit}.range-slider.theme-pink input[type=range]::-webkit-slider-thumb:before,.theme-pink .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#e91e63}.range-slider.theme-pink input[type=range]::-webkit-slider-thumb,.theme-pink .range-slider input[type=range]::-webkit-slider-thumb{background-color:#e91e63}.range-slider.theme-pink input[type=range]::-ms-thumb,.theme-pink .range-slider input[type=range]::-ms-thumb{background-color:#e91e63}.range-slider.theme-pink input[type=range]::-ms-fill-lower,.theme-pink .range-slider input[type=range]::-ms-fill-lower{background-color:#e91e63}.range-slider.theme-pink input[type=range]::-moz-range-thumb,.theme-pink .range-slider input[type=range]::-moz-range-thumb{background-color:#e91e63}.badge.theme-pink{background-color:#e91e63;color:#fff}.theme-purple .button:not(.button-fill){color:#9c27b0}.theme-purple .navbar .button:not(.button-fill),.theme-purple .subnavbar .button:not(.button-fill),.theme-purple .toolbar .button:not(.button-fill),.theme-purple.navbar .button:not(.button-fill),.theme-purple.subnavbar .button:not(.button-fill),.theme-purple.toolbar .button:not(.button-fill){color:#fff}.theme-purple .button.button-fill{background:#9c27b0;color:#fff}.theme-purple .button.button-fill.active-state,html:not(.watch-active-state) .theme-purple .button.button-fill:active{background:#7b1fa2}.progressbar.theme-purple,.theme-purple .progressbar{background-color:rgba(156,39,176,.5)}.progressbar.theme-purple span,.theme-purple .progressbar span{background-color:#9c27b0}.progressbar-infinite.theme-purple,.theme-purple .progressbar-infinite{background-color:rgba(156,39,176,.5)}.progressbar-infinite.theme-purple:after,.progressbar-infinite.theme-purple:before,.theme-purple .progressbar-infinite:after,.theme-purple .progressbar-infinite:before{background-color:#9c27b0}.color-purple i.icon,i.icon.color-purple{color:#9c27b0}i.icon-next.color-purple,i.icon-next.theme-purple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239c27b0'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-purple,i.icon-prev.theme-purple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239c27b0'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-purple,i.icon-back.theme-purple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-purple,i.icon-forward.theme-purple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-purple,i.icon-bars.theme-purple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E")}.theme-purple .card a,.theme-purple a{color:#9c27b0}.navbar.theme-purple,.searchbar.theme-purple,.subnavbar.theme-purple,.theme-purple .navbar,.theme-purple .searchbar,.theme-purple .subnavbar,.theme-purple .toolbar,.toolbar.theme-purple{background-color:#9c27b0}.label-switch.theme-purple input[type=checkbox]:checked+.checkbox,.theme-purple .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(156,39,176,.5)}.label-switch.theme-purple input[type=checkbox]:checked+.checkbox:after,.theme-purple .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#9c27b0}.theme-purple label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-purple i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-purple label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-purple label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-purple label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-purple label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-purple label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-purple label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-purple input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-purple input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-purple input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-purple input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-purple input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-purple input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#9c27b0;background-color:#9c27b0}.theme-purple label.label-radio i.icon-form-radio:after,label.label-radio.theme-purple i.icon-form-radio:after{background-color:#9c27b0}.theme-purple label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-purple label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-purple label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-purple label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-purple label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-purple label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-purple input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-purple input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-purple input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-purple input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-purple input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-purple input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#9c27b0}.theme-purple label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-purple label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-purple label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-purple label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-purple label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-purple label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-purple input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-purple input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-purple input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-purple input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-purple input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-purple input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#9c27b0}.form-checkbox.theme-purple input[type=checkbox]:checked~i,.theme-purple .form-checkbox input[type=checkbox]:checked~i{border-color:#9c27b0;background-color:#9c27b0}.form-radio.theme-purple input[type=radio]:checked~i,.theme-purple .form-radio input[type=radio]:checked~i{border-color:#9c27b0}.form-radio.theme-purple input[type=radio]:checked~i:after,.theme-purple .form-radio input[type=radio]:checked~i:after{background-color:#9c27b0}.theme-purple .form-checkbox .ripple-wave,.theme-purple .form-radio .ripple-wave{background:rgba(156,39,176,.5)}.theme-purple .focus-state .floating-label,.theme-purple .focus-state .label{color:#9c27b0}.theme-purple .input-field.focus-state:after,.theme-purple .input-field.not-empty-state:after,.theme-purple .item-input-field.focus-state:after,.theme-purple .item-input-field.not-empty-state:after{background:#9c27b0}.theme-purple .picker-calendar-day.picker-calendar-day-today span{color:#9c27b0}.theme-purple .picker-calendar-day.picker-calendar-day-selected span{background-color:#9c27b0;color:#fff}.theme-purple .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#9c27b0}.theme-purple .picker-header{background-color:#9c27b0}.theme-purple .modal-button{color:#9c27b0}.theme-purple .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-purple .timeline-item-date{background-color:#9c27b0}.theme-purple .timeline-month-title,.theme-purple .timeline-year-title{background-color:#9c27b0}.theme-purple .statusbar-overlay{background-color:#4a148c}.data-table.theme-purple .data-table-header-selected,.theme-purple .data-table .data-table-header-selected{background:rgba(156,39,176,.1)}.data-table.theme-purple .data-table-title-selected,.theme-purple .data-table .data-table-title-selected{color:#9c27b0}.swiper-pagination.color-purple .swiper-pagination-bullet-active,.theme-purple .swiper-pagination .swiper-pagination-bullet-active{background-color:#9c27b0}.swiper-pagination.color-purple .swiper-pagination-progressbar,.theme-purple .swiper-pagination .swiper-pagination-progressbar{background-color:#9c27b0}.swiper-pagination.swiper-pagination-progress.bg-purple{background-color:rgba(156,39,176,.25)}.swiper-button-next.color-purple,.swiper-container-rtl .swiper-button-prev.color-purple,.theme-purple .swiper-button-next,.theme-purple .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-purple,.swiper-container-rtl .swiper-button-next.color-purple,.theme-purple .swiper-button-prev,.theme-purple .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-purple,.speed-dial-buttons a.theme-purple,.theme-purple .floating-button,.theme-purple .speed-dial-buttons a{color:#fff;background:#9c27b0}.floating-button.theme-purple.active-state,.speed-dial-buttons a.theme-purple.active-state,.theme-purple .floating-button.active-state,.theme-purple .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-purple:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-purple:active,html:not(.watch-active-state) .theme-purple .floating-button:active,html:not(.watch-active-state) .theme-purple .speed-dial-buttons a:active{background:#7b1fa2}.floating-button.theme-purple i,.speed-dial-buttons a.theme-purple i,.theme-purple .floating-button i,.theme-purple .speed-dial-buttons a i{color:inherit}.range-slider.theme-purple input[type=range]::-webkit-slider-thumb:before,.theme-purple .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#9c27b0}.range-slider.theme-purple input[type=range]::-webkit-slider-thumb,.theme-purple .range-slider input[type=range]::-webkit-slider-thumb{background-color:#9c27b0}.range-slider.theme-purple input[type=range]::-ms-thumb,.theme-purple .range-slider input[type=range]::-ms-thumb{background-color:#9c27b0}.range-slider.theme-purple input[type=range]::-ms-fill-lower,.theme-purple .range-slider input[type=range]::-ms-fill-lower{background-color:#9c27b0}.range-slider.theme-purple input[type=range]::-moz-range-thumb,.theme-purple .range-slider input[type=range]::-moz-range-thumb{background-color:#9c27b0}.badge.theme-purple{background-color:#9c27b0;color:#fff}.theme-deeppurple .button:not(.button-fill){color:#673ab7}.theme-deeppurple .navbar .button:not(.button-fill),.theme-deeppurple .subnavbar .button:not(.button-fill),.theme-deeppurple .toolbar .button:not(.button-fill),.theme-deeppurple.navbar .button:not(.button-fill),.theme-deeppurple.subnavbar .button:not(.button-fill),.theme-deeppurple.toolbar .button:not(.button-fill){color:#fff}.theme-deeppurple .button.button-fill{background:#673ab7;color:#fff}.theme-deeppurple .button.button-fill.active-state,html:not(.watch-active-state) .theme-deeppurple .button.button-fill:active{background:#512da8}.progressbar.theme-deeppurple,.theme-deeppurple .progressbar{background-color:rgba(103,58,183,.5)}.progressbar.theme-deeppurple span,.theme-deeppurple .progressbar span{background-color:#673ab7}.progressbar-infinite.theme-deeppurple,.theme-deeppurple .progressbar-infinite{background-color:rgba(103,58,183,.5)}.progressbar-infinite.theme-deeppurple:after,.progressbar-infinite.theme-deeppurple:before,.theme-deeppurple .progressbar-infinite:after,.theme-deeppurple .progressbar-infinite:before{background-color:#673ab7}.color-deeppurple i.icon,i.icon.color-deeppurple{color:#673ab7}i.icon-next.color-deeppurple,i.icon-next.theme-deeppurple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23673ab7'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-deeppurple,i.icon-prev.theme-deeppurple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23673ab7'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-deeppurple,i.icon-back.theme-deeppurple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-deeppurple,i.icon-forward.theme-deeppurple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-deeppurple,i.icon-bars.theme-deeppurple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E")}.theme-deeppurple .card a,.theme-deeppurple a{color:#673ab7}.navbar.theme-deeppurple,.searchbar.theme-deeppurple,.subnavbar.theme-deeppurple,.theme-deeppurple .navbar,.theme-deeppurple .searchbar,.theme-deeppurple .subnavbar,.theme-deeppurple .toolbar,.toolbar.theme-deeppurple{background-color:#673ab7}.label-switch.theme-deeppurple input[type=checkbox]:checked+.checkbox,.theme-deeppurple .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(103,58,183,.5)}.label-switch.theme-deeppurple input[type=checkbox]:checked+.checkbox:after,.theme-deeppurple .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#673ab7}.theme-deeppurple label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-deeppurple i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-deeppurple label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-deeppurple label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-deeppurple label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-deeppurple label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-deeppurple label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-deeppurple label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-deeppurple input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-deeppurple input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-deeppurple input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-deeppurple input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-deeppurple input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-deeppurple input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#673ab7;background-color:#673ab7}.theme-deeppurple label.label-radio i.icon-form-radio:after,label.label-radio.theme-deeppurple i.icon-form-radio:after{background-color:#673ab7}.theme-deeppurple label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-deeppurple label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-deeppurple label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-deeppurple label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-deeppurple label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-deeppurple label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-deeppurple input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-deeppurple input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-deeppurple input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-deeppurple input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-deeppurple input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-deeppurple input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#673ab7}.theme-deeppurple label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-deeppurple label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-deeppurple label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-deeppurple label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-deeppurple label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-deeppurple label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-deeppurple input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-deeppurple input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-deeppurple input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-deeppurple input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-deeppurple input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-deeppurple input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#673ab7}.form-checkbox.theme-deeppurple input[type=checkbox]:checked~i,.theme-deeppurple .form-checkbox input[type=checkbox]:checked~i{border-color:#673ab7;background-color:#673ab7}.form-radio.theme-deeppurple input[type=radio]:checked~i,.theme-deeppurple .form-radio input[type=radio]:checked~i{border-color:#673ab7}.form-radio.theme-deeppurple input[type=radio]:checked~i:after,.theme-deeppurple .form-radio input[type=radio]:checked~i:after{background-color:#673ab7}.theme-deeppurple .form-checkbox .ripple-wave,.theme-deeppurple .form-radio .ripple-wave{background:rgba(103,58,183,.5)}.theme-deeppurple .focus-state .floating-label,.theme-deeppurple .focus-state .label{color:#673ab7}.theme-deeppurple .input-field.focus-state:after,.theme-deeppurple .input-field.not-empty-state:after,.theme-deeppurple .item-input-field.focus-state:after,.theme-deeppurple .item-input-field.not-empty-state:after{background:#673ab7}.theme-deeppurple .picker-calendar-day.picker-calendar-day-today span{color:#673ab7}.theme-deeppurple .picker-calendar-day.picker-calendar-day-selected span{background-color:#673ab7;color:#fff}.theme-deeppurple .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#673ab7}.theme-deeppurple .picker-header{background-color:#673ab7}.theme-deeppurple .modal-button{color:#673ab7}.theme-deeppurple .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-deeppurple .timeline-item-date{background-color:#673ab7}.theme-deeppurple .timeline-month-title,.theme-deeppurple .timeline-year-title{background-color:#673ab7}.theme-deeppurple .statusbar-overlay{background-color:#311b92}.data-table.theme-deeppurple .data-table-header-selected,.theme-deeppurple .data-table .data-table-header-selected{background:rgba(103,58,183,.1)}.data-table.theme-deeppurple .data-table-title-selected,.theme-deeppurple .data-table .data-table-title-selected{color:#673ab7}.swiper-pagination.color-deeppurple .swiper-pagination-bullet-active,.theme-deeppurple .swiper-pagination .swiper-pagination-bullet-active{background-color:#673ab7}.swiper-pagination.color-deeppurple .swiper-pagination-progressbar,.theme-deeppurple .swiper-pagination .swiper-pagination-progressbar{background-color:#673ab7}.swiper-pagination.swiper-pagination-progress.bg-deeppurple{background-color:rgba(103,58,183,.25)}.swiper-button-next.color-deeppurple,.swiper-container-rtl .swiper-button-prev.color-deeppurple,.theme-deeppurple .swiper-button-next,.theme-deeppurple .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-deeppurple,.swiper-container-rtl .swiper-button-next.color-deeppurple,.theme-deeppurple .swiper-button-prev,.theme-deeppurple .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-deeppurple,.speed-dial-buttons a.theme-deeppurple,.theme-deeppurple .floating-button,.theme-deeppurple .speed-dial-buttons a{color:#fff;background:#673ab7}.floating-button.theme-deeppurple.active-state,.speed-dial-buttons a.theme-deeppurple.active-state,.theme-deeppurple .floating-button.active-state,.theme-deeppurple .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-deeppurple:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-deeppurple:active,html:not(.watch-active-state) .theme-deeppurple .floating-button:active,html:not(.watch-active-state) .theme-deeppurple .speed-dial-buttons a:active{background:#512da8}.floating-button.theme-deeppurple i,.speed-dial-buttons a.theme-deeppurple i,.theme-deeppurple .floating-button i,.theme-deeppurple .speed-dial-buttons a i{color:inherit}.range-slider.theme-deeppurple input[type=range]::-webkit-slider-thumb:before,.theme-deeppurple .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#673ab7}.range-slider.theme-deeppurple input[type=range]::-webkit-slider-thumb,.theme-deeppurple .range-slider input[type=range]::-webkit-slider-thumb{background-color:#673ab7}.range-slider.theme-deeppurple input[type=range]::-ms-thumb,.theme-deeppurple .range-slider input[type=range]::-ms-thumb{background-color:#673ab7}.range-slider.theme-deeppurple input[type=range]::-ms-fill-lower,.theme-deeppurple .range-slider input[type=range]::-ms-fill-lower{background-color:#673ab7}.range-slider.theme-deeppurple input[type=range]::-moz-range-thumb,.theme-deeppurple .range-slider input[type=range]::-moz-range-thumb{background-color:#673ab7}.badge.theme-deeppurple{background-color:#673ab7;color:#fff}.theme-indigo .button:not(.button-fill){color:#3f51b5}.theme-indigo .navbar .button:not(.button-fill),.theme-indigo .subnavbar .button:not(.button-fill),.theme-indigo .toolbar .button:not(.button-fill),.theme-indigo.navbar .button:not(.button-fill),.theme-indigo.subnavbar .button:not(.button-fill),.theme-indigo.toolbar .button:not(.button-fill){color:#fff}.theme-indigo .button.button-fill{background:#3f51b5;color:#fff}.theme-indigo .button.button-fill.active-state,html:not(.watch-active-state) .theme-indigo .button.button-fill:active{background:#303f9f}.progressbar.theme-indigo,.theme-indigo .progressbar{background-color:rgba(63,81,181,.5)}.progressbar.theme-indigo span,.theme-indigo .progressbar span{background-color:#3f51b5}.progressbar-infinite.theme-indigo,.theme-indigo .progressbar-infinite{background-color:rgba(63,81,181,.5)}.progressbar-infinite.theme-indigo:after,.progressbar-infinite.theme-indigo:before,.theme-indigo .progressbar-infinite:after,.theme-indigo .progressbar-infinite:before{background-color:#3f51b5}.color-indigo i.icon,i.icon.color-indigo{color:#3f51b5}i.icon-next.color-indigo,i.icon-next.theme-indigo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%233f51b5'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-indigo,i.icon-prev.theme-indigo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%233f51b5'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-indigo,i.icon-back.theme-indigo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-indigo,i.icon-forward.theme-indigo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-indigo,i.icon-bars.theme-indigo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E")}.theme-indigo .card a,.theme-indigo a{color:#3f51b5}.navbar.theme-indigo,.searchbar.theme-indigo,.subnavbar.theme-indigo,.theme-indigo .navbar,.theme-indigo .searchbar,.theme-indigo .subnavbar,.theme-indigo .toolbar,.toolbar.theme-indigo{background-color:#3f51b5}.label-switch.theme-indigo input[type=checkbox]:checked+.checkbox,.theme-indigo .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(63,81,181,.5)}.label-switch.theme-indigo input[type=checkbox]:checked+.checkbox:after,.theme-indigo .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#3f51b5}.theme-indigo label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-indigo i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-indigo label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-indigo label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-indigo label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-indigo label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-indigo label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-indigo label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-indigo input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-indigo input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-indigo input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-indigo input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-indigo input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-indigo input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#3f51b5;background-color:#3f51b5}.theme-indigo label.label-radio i.icon-form-radio:after,label.label-radio.theme-indigo i.icon-form-radio:after{background-color:#3f51b5}.theme-indigo label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-indigo label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-indigo label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-indigo label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-indigo label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-indigo label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-indigo input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-indigo input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-indigo input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-indigo input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-indigo input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-indigo input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#3f51b5}.theme-indigo label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-indigo label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-indigo label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-indigo label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-indigo label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-indigo label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-indigo input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-indigo input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-indigo input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-indigo input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-indigo input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-indigo input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#3f51b5}.form-checkbox.theme-indigo input[type=checkbox]:checked~i,.theme-indigo .form-checkbox input[type=checkbox]:checked~i{border-color:#3f51b5;background-color:#3f51b5}.form-radio.theme-indigo input[type=radio]:checked~i,.theme-indigo .form-radio input[type=radio]:checked~i{border-color:#3f51b5}.form-radio.theme-indigo input[type=radio]:checked~i:after,.theme-indigo .form-radio input[type=radio]:checked~i:after{background-color:#3f51b5}.theme-indigo .form-checkbox .ripple-wave,.theme-indigo .form-radio .ripple-wave{background:rgba(63,81,181,.5)}.theme-indigo .focus-state .floating-label,.theme-indigo .focus-state .label{color:#3f51b5}.theme-indigo .input-field.focus-state:after,.theme-indigo .input-field.not-empty-state:after,.theme-indigo .item-input-field.focus-state:after,.theme-indigo .item-input-field.not-empty-state:after{background:#3f51b5}.theme-indigo .picker-calendar-day.picker-calendar-day-today span{color:#3f51b5}.theme-indigo .picker-calendar-day.picker-calendar-day-selected span{background-color:#3f51b5;color:#fff}.theme-indigo .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#3f51b5}.theme-indigo .picker-header{background-color:#3f51b5}.theme-indigo .modal-button{color:#3f51b5}.theme-indigo .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-indigo .timeline-item-date{background-color:#3f51b5}.theme-indigo .timeline-month-title,.theme-indigo .timeline-year-title{background-color:#3f51b5}.theme-indigo .statusbar-overlay{background-color:#1a237e}.data-table.theme-indigo .data-table-header-selected,.theme-indigo .data-table .data-table-header-selected{background:rgba(63,81,181,.1)}.data-table.theme-indigo .data-table-title-selected,.theme-indigo .data-table .data-table-title-selected{color:#3f51b5}.swiper-pagination.color-indigo .swiper-pagination-bullet-active,.theme-indigo .swiper-pagination .swiper-pagination-bullet-active{background-color:#3f51b5}.swiper-pagination.color-indigo .swiper-pagination-progressbar,.theme-indigo .swiper-pagination .swiper-pagination-progressbar{background-color:#3f51b5}.swiper-pagination.swiper-pagination-progress.bg-indigo{background-color:rgba(63,81,181,.25)}.swiper-button-next.color-indigo,.swiper-container-rtl .swiper-button-prev.color-indigo,.theme-indigo .swiper-button-next,.theme-indigo .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-indigo,.swiper-container-rtl .swiper-button-next.color-indigo,.theme-indigo .swiper-button-prev,.theme-indigo .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-indigo,.speed-dial-buttons a.theme-indigo,.theme-indigo .floating-button,.theme-indigo .speed-dial-buttons a{color:#fff;background:#3f51b5}.floating-button.theme-indigo.active-state,.speed-dial-buttons a.theme-indigo.active-state,.theme-indigo .floating-button.active-state,.theme-indigo .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-indigo:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-indigo:active,html:not(.watch-active-state) .theme-indigo .floating-button:active,html:not(.watch-active-state) .theme-indigo .speed-dial-buttons a:active{background:#303f9f}.floating-button.theme-indigo i,.speed-dial-buttons a.theme-indigo i,.theme-indigo .floating-button i,.theme-indigo .speed-dial-buttons a i{color:inherit}.range-slider.theme-indigo input[type=range]::-webkit-slider-thumb:before,.theme-indigo .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#3f51b5}.range-slider.theme-indigo input[type=range]::-webkit-slider-thumb,.theme-indigo .range-slider input[type=range]::-webkit-slider-thumb{background-color:#3f51b5}.range-slider.theme-indigo input[type=range]::-ms-thumb,.theme-indigo .range-slider input[type=range]::-ms-thumb{background-color:#3f51b5}.range-slider.theme-indigo input[type=range]::-ms-fill-lower,.theme-indigo .range-slider input[type=range]::-ms-fill-lower{background-color:#3f51b5}.range-slider.theme-indigo input[type=range]::-moz-range-thumb,.theme-indigo .range-slider input[type=range]::-moz-range-thumb{background-color:#3f51b5}.badge.theme-indigo{background-color:#3f51b5;color:#fff}.theme-blue .button:not(.button-fill){color:#2196f3}.theme-blue .navbar .button:not(.button-fill),.theme-blue .subnavbar .button:not(.button-fill),.theme-blue .toolbar .button:not(.button-fill),.theme-blue.navbar .button:not(.button-fill),.theme-blue.subnavbar .button:not(.button-fill),.theme-blue.toolbar .button:not(.button-fill){color:#fff}.theme-blue .button.button-fill{background:#2196f3;color:#fff}.theme-blue .button.button-fill.active-state,html:not(.watch-active-state) .theme-blue .button.button-fill:active{background:#1976d2}.progressbar.theme-blue,.theme-blue .progressbar{background-color:rgba(33,150,243,.5)}.progressbar.theme-blue span,.theme-blue .progressbar span{background-color:#2196f3}.progressbar-infinite.theme-blue,.theme-blue .progressbar-infinite{background-color:rgba(33,150,243,.5)}.progressbar-infinite.theme-blue:after,.progressbar-infinite.theme-blue:before,.theme-blue .progressbar-infinite:after,.theme-blue .progressbar-infinite:before{background-color:#2196f3}.color-blue i.icon,i.icon.color-blue{color:#2196f3}i.icon-next.color-blue,i.icon-next.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%232196f3'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-blue,i.icon-prev.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%232196f3'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-blue,i.icon-back.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-blue,i.icon-forward.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-blue,i.icon-bars.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E")}.theme-blue .card a,.theme-blue a{color:#2196f3}.navbar.theme-blue,.searchbar.theme-blue,.subnavbar.theme-blue,.theme-blue .navbar,.theme-blue .searchbar,.theme-blue .subnavbar,.theme-blue .toolbar,.toolbar.theme-blue{background-color:#2196f3}.label-switch.theme-blue input[type=checkbox]:checked+.checkbox,.theme-blue .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(33,150,243,.5)}.label-switch.theme-blue input[type=checkbox]:checked+.checkbox:after,.theme-blue .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#2196f3}.theme-blue label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-blue i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-blue label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-blue label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-blue label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-blue label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-blue label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-blue label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-blue input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-blue input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-blue input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-blue input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-blue input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-blue input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#2196f3;background-color:#2196f3}.theme-blue label.label-radio i.icon-form-radio:after,label.label-radio.theme-blue i.icon-form-radio:after{background-color:#2196f3}.theme-blue label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-blue label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-blue label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-blue label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-blue label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-blue label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-blue input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-blue input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-blue input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-blue input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-blue input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-blue input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#2196f3}.theme-blue label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-blue label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-blue label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-blue label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-blue label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-blue label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-blue input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-blue input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-blue input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-blue input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-blue input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-blue input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#2196f3}.form-checkbox.theme-blue input[type=checkbox]:checked~i,.theme-blue .form-checkbox input[type=checkbox]:checked~i{border-color:#2196f3;background-color:#2196f3}.form-radio.theme-blue input[type=radio]:checked~i,.theme-blue .form-radio input[type=radio]:checked~i{border-color:#2196f3}.form-radio.theme-blue input[type=radio]:checked~i:after,.theme-blue .form-radio input[type=radio]:checked~i:after{background-color:#2196f3}.theme-blue .form-checkbox .ripple-wave,.theme-blue .form-radio .ripple-wave{background:rgba(33,150,243,.5)}.theme-blue .focus-state .floating-label,.theme-blue .focus-state .label{color:#2196f3}.theme-blue .input-field.focus-state:after,.theme-blue .input-field.not-empty-state:after,.theme-blue .item-input-field.focus-state:after,.theme-blue .item-input-field.not-empty-state:after{background:#2196f3}.theme-blue .picker-calendar-day.picker-calendar-day-today span{color:#2196f3}.theme-blue .picker-calendar-day.picker-calendar-day-selected span{background-color:#2196f3;color:#fff}.theme-blue .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#2196f3}.theme-blue .picker-header{background-color:#2196f3}.theme-blue .modal-button{color:#2196f3}.theme-blue .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-blue .timeline-item-date{background-color:#2196f3}.theme-blue .timeline-month-title,.theme-blue .timeline-year-title{background-color:#2196f3}.theme-blue .statusbar-overlay{background-color:#0d47a1}.data-table.theme-blue .data-table-header-selected,.theme-blue .data-table .data-table-header-selected{background:rgba(33,150,243,.1)}.data-table.theme-blue .data-table-title-selected,.theme-blue .data-table .data-table-title-selected{color:#2196f3}.swiper-pagination.color-blue .swiper-pagination-bullet-active,.theme-blue .swiper-pagination .swiper-pagination-bullet-active{background-color:#2196f3}.swiper-pagination.color-blue .swiper-pagination-progressbar,.theme-blue .swiper-pagination .swiper-pagination-progressbar{background-color:#2196f3}.swiper-pagination.swiper-pagination-progress.bg-blue{background-color:rgba(33,150,243,.25)}.swiper-button-next.color-blue,.swiper-container-rtl .swiper-button-prev.color-blue,.theme-blue .swiper-button-next,.theme-blue .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-blue,.swiper-container-rtl .swiper-button-next.color-blue,.theme-blue .swiper-button-prev,.theme-blue .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-blue,.speed-dial-buttons a.theme-blue,.theme-blue .floating-button,.theme-blue .speed-dial-buttons a{color:#fff;background:#2196f3}.floating-button.theme-blue.active-state,.speed-dial-buttons a.theme-blue.active-state,.theme-blue .floating-button.active-state,.theme-blue .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-blue:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-blue:active,html:not(.watch-active-state) .theme-blue .floating-button:active,html:not(.watch-active-state) .theme-blue .speed-dial-buttons a:active{background:#1976d2}.floating-button.theme-blue i,.speed-dial-buttons a.theme-blue i,.theme-blue .floating-button i,.theme-blue .speed-dial-buttons a i{color:inherit}.range-slider.theme-blue input[type=range]::-webkit-slider-thumb:before,.theme-blue .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#2196f3}.range-slider.theme-blue input[type=range]::-webkit-slider-thumb,.theme-blue .range-slider input[type=range]::-webkit-slider-thumb{background-color:#2196f3}.range-slider.theme-blue input[type=range]::-ms-thumb,.theme-blue .range-slider input[type=range]::-ms-thumb{background-color:#2196f3}.range-slider.theme-blue input[type=range]::-ms-fill-lower,.theme-blue .range-slider input[type=range]::-ms-fill-lower{background-color:#2196f3}.range-slider.theme-blue input[type=range]::-moz-range-thumb,.theme-blue .range-slider input[type=range]::-moz-range-thumb{background-color:#2196f3}.badge.theme-blue{background-color:#2196f3;color:#fff}.theme-lightblue .button:not(.button-fill){color:#03a9f4}.theme-lightblue .navbar .button:not(.button-fill),.theme-lightblue .subnavbar .button:not(.button-fill),.theme-lightblue .toolbar .button:not(.button-fill),.theme-lightblue.navbar .button:not(.button-fill),.theme-lightblue.subnavbar .button:not(.button-fill),.theme-lightblue.toolbar .button:not(.button-fill){color:#fff}.theme-lightblue .button.button-fill{background:#03a9f4;color:#fff}.theme-lightblue .button.button-fill.active-state,html:not(.watch-active-state) .theme-lightblue .button.button-fill:active{background:#0288d1}.progressbar.theme-lightblue,.theme-lightblue .progressbar{background-color:rgba(3,169,244,.5)}.progressbar.theme-lightblue span,.theme-lightblue .progressbar span{background-color:#03a9f4}.progressbar-infinite.theme-lightblue,.theme-lightblue .progressbar-infinite{background-color:rgba(3,169,244,.5)}.progressbar-infinite.theme-lightblue:after,.progressbar-infinite.theme-lightblue:before,.theme-lightblue .progressbar-infinite:after,.theme-lightblue .progressbar-infinite:before{background-color:#03a9f4}.color-lightblue i.icon,i.icon.color-lightblue{color:#03a9f4}i.icon-next.color-lightblue,i.icon-next.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2303a9f4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-lightblue,i.icon-prev.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2303a9f4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-lightblue,i.icon-back.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-lightblue,i.icon-forward.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-lightblue,i.icon-bars.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E")}.theme-lightblue .card a,.theme-lightblue a{color:#03a9f4}.navbar.theme-lightblue,.searchbar.theme-lightblue,.subnavbar.theme-lightblue,.theme-lightblue .navbar,.theme-lightblue .searchbar,.theme-lightblue .subnavbar,.theme-lightblue .toolbar,.toolbar.theme-lightblue{background-color:#03a9f4}.label-switch.theme-lightblue input[type=checkbox]:checked+.checkbox,.theme-lightblue .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(3,169,244,.5)}.label-switch.theme-lightblue input[type=checkbox]:checked+.checkbox:after,.theme-lightblue .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#03a9f4}.theme-lightblue label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-lightblue i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-lightblue label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-lightblue label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-lightblue label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-lightblue label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-lightblue label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-lightblue label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-lightblue input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-lightblue input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-lightblue input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-lightblue input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-lightblue input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-lightblue input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#03a9f4;background-color:#03a9f4}.theme-lightblue label.label-radio i.icon-form-radio:after,label.label-radio.theme-lightblue i.icon-form-radio:after{background-color:#03a9f4}.theme-lightblue label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-lightblue label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-lightblue label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-lightblue label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-lightblue label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-lightblue label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-lightblue input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-lightblue input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-lightblue input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-lightblue input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-lightblue input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-lightblue input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#03a9f4}.theme-lightblue label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-lightblue label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-lightblue label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-lightblue label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-lightblue label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-lightblue label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-lightblue input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-lightblue input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-lightblue input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-lightblue input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-lightblue input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-lightblue input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#03a9f4}.form-checkbox.theme-lightblue input[type=checkbox]:checked~i,.theme-lightblue .form-checkbox input[type=checkbox]:checked~i{border-color:#03a9f4;background-color:#03a9f4}.form-radio.theme-lightblue input[type=radio]:checked~i,.theme-lightblue .form-radio input[type=radio]:checked~i{border-color:#03a9f4}.form-radio.theme-lightblue input[type=radio]:checked~i:after,.theme-lightblue .form-radio input[type=radio]:checked~i:after{background-color:#03a9f4}.theme-lightblue .form-checkbox .ripple-wave,.theme-lightblue .form-radio .ripple-wave{background:rgba(3,169,244,.5)}.theme-lightblue .focus-state .floating-label,.theme-lightblue .focus-state .label{color:#03a9f4}.theme-lightblue .input-field.focus-state:after,.theme-lightblue .input-field.not-empty-state:after,.theme-lightblue .item-input-field.focus-state:after,.theme-lightblue .item-input-field.not-empty-state:after{background:#03a9f4}.theme-lightblue .picker-calendar-day.picker-calendar-day-today span{color:#03a9f4}.theme-lightblue .picker-calendar-day.picker-calendar-day-selected span{background-color:#03a9f4;color:#fff}.theme-lightblue .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#03a9f4}.theme-lightblue .picker-header{background-color:#03a9f4}.theme-lightblue .modal-button{color:#03a9f4}.theme-lightblue .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-lightblue .timeline-item-date{background-color:#03a9f4}.theme-lightblue .timeline-month-title,.theme-lightblue .timeline-year-title{background-color:#03a9f4}.theme-lightblue .statusbar-overlay{background-color:#01579b}.data-table.theme-lightblue .data-table-header-selected,.theme-lightblue .data-table .data-table-header-selected{background:rgba(3,169,244,.1)}.data-table.theme-lightblue .data-table-title-selected,.theme-lightblue .data-table .data-table-title-selected{color:#03a9f4}.swiper-pagination.color-lightblue .swiper-pagination-bullet-active,.theme-lightblue .swiper-pagination .swiper-pagination-bullet-active{background-color:#03a9f4}.swiper-pagination.color-lightblue .swiper-pagination-progressbar,.theme-lightblue .swiper-pagination .swiper-pagination-progressbar{background-color:#03a9f4}.swiper-pagination.swiper-pagination-progress.bg-lightblue{background-color:rgba(3,169,244,.25)}.swiper-button-next.color-lightblue,.swiper-container-rtl .swiper-button-prev.color-lightblue,.theme-lightblue .swiper-button-next,.theme-lightblue .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-lightblue,.swiper-container-rtl .swiper-button-next.color-lightblue,.theme-lightblue .swiper-button-prev,.theme-lightblue .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-lightblue,.speed-dial-buttons a.theme-lightblue,.theme-lightblue .floating-button,.theme-lightblue .speed-dial-buttons a{color:#fff;background:#03a9f4}.floating-button.theme-lightblue.active-state,.speed-dial-buttons a.theme-lightblue.active-state,.theme-lightblue .floating-button.active-state,.theme-lightblue .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-lightblue:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-lightblue:active,html:not(.watch-active-state) .theme-lightblue .floating-button:active,html:not(.watch-active-state) .theme-lightblue .speed-dial-buttons a:active{background:#0288d1}.floating-button.theme-lightblue i,.speed-dial-buttons a.theme-lightblue i,.theme-lightblue .floating-button i,.theme-lightblue .speed-dial-buttons a i{color:inherit}.range-slider.theme-lightblue input[type=range]::-webkit-slider-thumb:before,.theme-lightblue .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#03a9f4}.range-slider.theme-lightblue input[type=range]::-webkit-slider-thumb,.theme-lightblue .range-slider input[type=range]::-webkit-slider-thumb{background-color:#03a9f4}.range-slider.theme-lightblue input[type=range]::-ms-thumb,.theme-lightblue .range-slider input[type=range]::-ms-thumb{background-color:#03a9f4}.range-slider.theme-lightblue input[type=range]::-ms-fill-lower,.theme-lightblue .range-slider input[type=range]::-ms-fill-lower{background-color:#03a9f4}.range-slider.theme-lightblue input[type=range]::-moz-range-thumb,.theme-lightblue .range-slider input[type=range]::-moz-range-thumb{background-color:#03a9f4}.badge.theme-lightblue{background-color:#03a9f4;color:#fff}.theme-cyan .button:not(.button-fill){color:#00bcd4}.theme-cyan .navbar .button:not(.button-fill),.theme-cyan .subnavbar .button:not(.button-fill),.theme-cyan .toolbar .button:not(.button-fill),.theme-cyan.navbar .button:not(.button-fill),.theme-cyan.subnavbar .button:not(.button-fill),.theme-cyan.toolbar .button:not(.button-fill){color:#fff}.theme-cyan .button.button-fill{background:#00bcd4;color:#fff}.theme-cyan .button.button-fill.active-state,html:not(.watch-active-state) .theme-cyan .button.button-fill:active{background:#0097a7}.progressbar.theme-cyan,.theme-cyan .progressbar{background-color:rgba(0,188,212,.5)}.progressbar.theme-cyan span,.theme-cyan .progressbar span{background-color:#00bcd4}.progressbar-infinite.theme-cyan,.theme-cyan .progressbar-infinite{background-color:rgba(0,188,212,.5)}.progressbar-infinite.theme-cyan:after,.progressbar-infinite.theme-cyan:before,.theme-cyan .progressbar-infinite:after,.theme-cyan .progressbar-infinite:before{background-color:#00bcd4}.color-cyan i.icon,i.icon.color-cyan{color:#00bcd4}i.icon-next.color-cyan,i.icon-next.theme-cyan{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2300bcd4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-cyan,i.icon-prev.theme-cyan{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2300bcd4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-cyan,i.icon-back.theme-cyan{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-cyan,i.icon-forward.theme-cyan{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-cyan,i.icon-bars.theme-cyan{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E")}.theme-cyan .card a,.theme-cyan a{color:#00bcd4}.navbar.theme-cyan,.searchbar.theme-cyan,.subnavbar.theme-cyan,.theme-cyan .navbar,.theme-cyan .searchbar,.theme-cyan .subnavbar,.theme-cyan .toolbar,.toolbar.theme-cyan{background-color:#00bcd4}.label-switch.theme-cyan input[type=checkbox]:checked+.checkbox,.theme-cyan .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(0,188,212,.5)}.label-switch.theme-cyan input[type=checkbox]:checked+.checkbox:after,.theme-cyan .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#00bcd4}.theme-cyan label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-cyan i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-cyan label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-cyan label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-cyan label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-cyan label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-cyan label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-cyan label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-cyan input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-cyan input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-cyan input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-cyan input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-cyan input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-cyan input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#00bcd4;background-color:#00bcd4}.theme-cyan label.label-radio i.icon-form-radio:after,label.label-radio.theme-cyan i.icon-form-radio:after{background-color:#00bcd4}.theme-cyan label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-cyan label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-cyan label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-cyan label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-cyan label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-cyan label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-cyan input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-cyan input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-cyan input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-cyan input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-cyan input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-cyan input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#00bcd4}.theme-cyan label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-cyan label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-cyan label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-cyan label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-cyan label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-cyan label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-cyan input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-cyan input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-cyan input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-cyan input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-cyan input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-cyan input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#00bcd4}.form-checkbox.theme-cyan input[type=checkbox]:checked~i,.theme-cyan .form-checkbox input[type=checkbox]:checked~i{border-color:#00bcd4;background-color:#00bcd4}.form-radio.theme-cyan input[type=radio]:checked~i,.theme-cyan .form-radio input[type=radio]:checked~i{border-color:#00bcd4}.form-radio.theme-cyan input[type=radio]:checked~i:after,.theme-cyan .form-radio input[type=radio]:checked~i:after{background-color:#00bcd4}.theme-cyan .form-checkbox .ripple-wave,.theme-cyan .form-radio .ripple-wave{background:rgba(0,188,212,.5)}.theme-cyan .focus-state .floating-label,.theme-cyan .focus-state .label{color:#00bcd4}.theme-cyan .input-field.focus-state:after,.theme-cyan .input-field.not-empty-state:after,.theme-cyan .item-input-field.focus-state:after,.theme-cyan .item-input-field.not-empty-state:after{background:#00bcd4}.theme-cyan .picker-calendar-day.picker-calendar-day-today span{color:#00bcd4}.theme-cyan .picker-calendar-day.picker-calendar-day-selected span{background-color:#00bcd4;color:#fff}.theme-cyan .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#00bcd4}.theme-cyan .picker-header{background-color:#00bcd4}.theme-cyan .modal-button{color:#00bcd4}.theme-cyan .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-cyan .timeline-item-date{background-color:#00bcd4}.theme-cyan .timeline-month-title,.theme-cyan .timeline-year-title{background-color:#00bcd4}.theme-cyan .statusbar-overlay{background-color:#006064}.data-table.theme-cyan .data-table-header-selected,.theme-cyan .data-table .data-table-header-selected{background:rgba(0,188,212,.1)}.data-table.theme-cyan .data-table-title-selected,.theme-cyan .data-table .data-table-title-selected{color:#00bcd4}.swiper-pagination.color-cyan .swiper-pagination-bullet-active,.theme-cyan .swiper-pagination .swiper-pagination-bullet-active{background-color:#00bcd4}.swiper-pagination.color-cyan .swiper-pagination-progressbar,.theme-cyan .swiper-pagination .swiper-pagination-progressbar{background-color:#00bcd4}.swiper-pagination.swiper-pagination-progress.bg-cyan{background-color:rgba(0,188,212,.25)}.swiper-button-next.color-cyan,.swiper-container-rtl .swiper-button-prev.color-cyan,.theme-cyan .swiper-button-next,.theme-cyan .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-cyan,.swiper-container-rtl .swiper-button-next.color-cyan,.theme-cyan .swiper-button-prev,.theme-cyan .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-cyan,.speed-dial-buttons a.theme-cyan,.theme-cyan .floating-button,.theme-cyan .speed-dial-buttons a{color:#fff;background:#00bcd4}.floating-button.theme-cyan.active-state,.speed-dial-buttons a.theme-cyan.active-state,.theme-cyan .floating-button.active-state,.theme-cyan .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-cyan:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-cyan:active,html:not(.watch-active-state) .theme-cyan .floating-button:active,html:not(.watch-active-state) .theme-cyan .speed-dial-buttons a:active{background:#0097a7}.floating-button.theme-cyan i,.speed-dial-buttons a.theme-cyan i,.theme-cyan .floating-button i,.theme-cyan .speed-dial-buttons a i{color:inherit}.range-slider.theme-cyan input[type=range]::-webkit-slider-thumb:before,.theme-cyan .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#00bcd4}.range-slider.theme-cyan input[type=range]::-webkit-slider-thumb,.theme-cyan .range-slider input[type=range]::-webkit-slider-thumb{background-color:#00bcd4}.range-slider.theme-cyan input[type=range]::-ms-thumb,.theme-cyan .range-slider input[type=range]::-ms-thumb{background-color:#00bcd4}.range-slider.theme-cyan input[type=range]::-ms-fill-lower,.theme-cyan .range-slider input[type=range]::-ms-fill-lower{background-color:#00bcd4}.range-slider.theme-cyan input[type=range]::-moz-range-thumb,.theme-cyan .range-slider input[type=range]::-moz-range-thumb{background-color:#00bcd4}.badge.theme-cyan{background-color:#00bcd4;color:#fff}.theme-teal .button:not(.button-fill){color:#009688}.theme-teal .navbar .button:not(.button-fill),.theme-teal .subnavbar .button:not(.button-fill),.theme-teal .toolbar .button:not(.button-fill),.theme-teal.navbar .button:not(.button-fill),.theme-teal.subnavbar .button:not(.button-fill),.theme-teal.toolbar .button:not(.button-fill){color:#fff}.theme-teal .button.button-fill{background:#009688;color:#fff}.theme-teal .button.button-fill.active-state,html:not(.watch-active-state) .theme-teal .button.button-fill:active{background:#00897b}.progressbar.theme-teal,.theme-teal .progressbar{background-color:rgba(0,150,136,.5)}.progressbar.theme-teal span,.theme-teal .progressbar span{background-color:#009688}.progressbar-infinite.theme-teal,.theme-teal .progressbar-infinite{background-color:rgba(0,150,136,.5)}.progressbar-infinite.theme-teal:after,.progressbar-infinite.theme-teal:before,.theme-teal .progressbar-infinite:after,.theme-teal .progressbar-infinite:before{background-color:#009688}.color-teal i.icon,i.icon.color-teal{color:#009688}i.icon-next.color-teal,i.icon-next.theme-teal{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23009688'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-teal,i.icon-prev.theme-teal{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23009688'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-teal,i.icon-back.theme-teal{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-teal,i.icon-forward.theme-teal{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-teal,i.icon-bars.theme-teal{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E")}.theme-teal .card a,.theme-teal a{color:#009688}.navbar.theme-teal,.searchbar.theme-teal,.subnavbar.theme-teal,.theme-teal .navbar,.theme-teal .searchbar,.theme-teal .subnavbar,.theme-teal .toolbar,.toolbar.theme-teal{background-color:#009688}.label-switch.theme-teal input[type=checkbox]:checked+.checkbox,.theme-teal .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(0,150,136,.5)}.label-switch.theme-teal input[type=checkbox]:checked+.checkbox:after,.theme-teal .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#009688}.theme-teal label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-teal i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-teal label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-teal label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-teal label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-teal label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-teal label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-teal label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-teal input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-teal input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-teal input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-teal input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-teal input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-teal input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#009688;background-color:#009688}.theme-teal label.label-radio i.icon-form-radio:after,label.label-radio.theme-teal i.icon-form-radio:after{background-color:#009688}.theme-teal label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-teal label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-teal label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-teal label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-teal label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-teal label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-teal input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-teal input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-teal input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-teal input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-teal input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-teal input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#009688}.theme-teal label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-teal label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-teal label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-teal label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-teal label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-teal label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-teal input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-teal input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-teal input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-teal input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-teal input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-teal input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#009688}.form-checkbox.theme-teal input[type=checkbox]:checked~i,.theme-teal .form-checkbox input[type=checkbox]:checked~i{border-color:#009688;background-color:#009688}.form-radio.theme-teal input[type=radio]:checked~i,.theme-teal .form-radio input[type=radio]:checked~i{border-color:#009688}.form-radio.theme-teal input[type=radio]:checked~i:after,.theme-teal .form-radio input[type=radio]:checked~i:after{background-color:#009688}.theme-teal .form-checkbox .ripple-wave,.theme-teal .form-radio .ripple-wave{background:rgba(0,150,136,.5)}.theme-teal .focus-state .floating-label,.theme-teal .focus-state .label{color:#009688}.theme-teal .input-field.focus-state:after,.theme-teal .input-field.not-empty-state:after,.theme-teal .item-input-field.focus-state:after,.theme-teal .item-input-field.not-empty-state:after{background:#009688}.theme-teal .picker-calendar-day.picker-calendar-day-today span{color:#009688}.theme-teal .picker-calendar-day.picker-calendar-day-selected span{background-color:#009688;color:#fff}.theme-teal .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#009688}.theme-teal .picker-header{background-color:#009688}.theme-teal .modal-button{color:#009688}.theme-teal .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-teal .timeline-item-date{background-color:#009688}.theme-teal .timeline-month-title,.theme-teal .timeline-year-title{background-color:#009688}.theme-teal .statusbar-overlay{background-color:#004d40}.data-table.theme-teal .data-table-header-selected,.theme-teal .data-table .data-table-header-selected{background:rgba(0,150,136,.1)}.data-table.theme-teal .data-table-title-selected,.theme-teal .data-table .data-table-title-selected{color:#009688}.swiper-pagination.color-teal .swiper-pagination-bullet-active,.theme-teal .swiper-pagination .swiper-pagination-bullet-active{background-color:#009688}.swiper-pagination.color-teal .swiper-pagination-progressbar,.theme-teal .swiper-pagination .swiper-pagination-progressbar{background-color:#009688}.swiper-pagination.swiper-pagination-progress.bg-teal{background-color:rgba(0,150,136,.25)}.swiper-button-next.color-teal,.swiper-container-rtl .swiper-button-prev.color-teal,.theme-teal .swiper-button-next,.theme-teal .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-teal,.swiper-container-rtl .swiper-button-next.color-teal,.theme-teal .swiper-button-prev,.theme-teal .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-teal,.speed-dial-buttons a.theme-teal,.theme-teal .floating-button,.theme-teal .speed-dial-buttons a{color:#fff;background:#009688}.floating-button.theme-teal.active-state,.speed-dial-buttons a.theme-teal.active-state,.theme-teal .floating-button.active-state,.theme-teal .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-teal:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-teal:active,html:not(.watch-active-state) .theme-teal .floating-button:active,html:not(.watch-active-state) .theme-teal .speed-dial-buttons a:active{background:#00897b}.floating-button.theme-teal i,.speed-dial-buttons a.theme-teal i,.theme-teal .floating-button i,.theme-teal .speed-dial-buttons a i{color:inherit}.range-slider.theme-teal input[type=range]::-webkit-slider-thumb:before,.theme-teal .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#009688}.range-slider.theme-teal input[type=range]::-webkit-slider-thumb,.theme-teal .range-slider input[type=range]::-webkit-slider-thumb{background-color:#009688}.range-slider.theme-teal input[type=range]::-ms-thumb,.theme-teal .range-slider input[type=range]::-ms-thumb{background-color:#009688}.range-slider.theme-teal input[type=range]::-ms-fill-lower,.theme-teal .range-slider input[type=range]::-ms-fill-lower{background-color:#009688}.range-slider.theme-teal input[type=range]::-moz-range-thumb,.theme-teal .range-slider input[type=range]::-moz-range-thumb{background-color:#009688}.badge.theme-teal{background-color:#009688;color:#fff}.theme-green .button:not(.button-fill){color:#4caf50}.theme-green .navbar .button:not(.button-fill),.theme-green .subnavbar .button:not(.button-fill),.theme-green .toolbar .button:not(.button-fill),.theme-green.navbar .button:not(.button-fill),.theme-green.subnavbar .button:not(.button-fill),.theme-green.toolbar .button:not(.button-fill){color:#fff}.theme-green .button.button-fill{background:#4caf50;color:#fff}.theme-green .button.button-fill.active-state,html:not(.watch-active-state) .theme-green .button.button-fill:active{background:#388e3c}.progressbar.theme-green,.theme-green .progressbar{background-color:rgba(76,175,80,.5)}.progressbar.theme-green span,.theme-green .progressbar span{background-color:#4caf50}.progressbar-infinite.theme-green,.theme-green .progressbar-infinite{background-color:rgba(76,175,80,.5)}.progressbar-infinite.theme-green:after,.progressbar-infinite.theme-green:before,.theme-green .progressbar-infinite:after,.theme-green .progressbar-infinite:before{background-color:#4caf50}.color-green i.icon,i.icon.color-green{color:#4caf50}i.icon-next.color-green,i.icon-next.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%234caf50'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-green,i.icon-prev.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%234caf50'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-green,i.icon-back.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-green,i.icon-forward.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-green,i.icon-bars.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E")}.theme-green .card a,.theme-green a{color:#4caf50}.navbar.theme-green,.searchbar.theme-green,.subnavbar.theme-green,.theme-green .navbar,.theme-green .searchbar,.theme-green .subnavbar,.theme-green .toolbar,.toolbar.theme-green{background-color:#4caf50}.label-switch.theme-green input[type=checkbox]:checked+.checkbox,.theme-green .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(76,175,80,.5)}.label-switch.theme-green input[type=checkbox]:checked+.checkbox:after,.theme-green .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#4caf50}.theme-green label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-green i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-green label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-green label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-green label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-green label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-green label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-green label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-green input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-green input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-green input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-green input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-green input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-green input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#4caf50;background-color:#4caf50}.theme-green label.label-radio i.icon-form-radio:after,label.label-radio.theme-green i.icon-form-radio:after{background-color:#4caf50}.theme-green label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-green label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-green label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-green label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-green label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-green label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-green input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-green input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-green input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-green input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-green input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-green input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#4caf50}.theme-green label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-green label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-green label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-green label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-green label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-green label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-green input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-green input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-green input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-green input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-green input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-green input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#4caf50}.form-checkbox.theme-green input[type=checkbox]:checked~i,.theme-green .form-checkbox input[type=checkbox]:checked~i{border-color:#4caf50;background-color:#4caf50}.form-radio.theme-green input[type=radio]:checked~i,.theme-green .form-radio input[type=radio]:checked~i{border-color:#4caf50}.form-radio.theme-green input[type=radio]:checked~i:after,.theme-green .form-radio input[type=radio]:checked~i:after{background-color:#4caf50}.theme-green .form-checkbox .ripple-wave,.theme-green .form-radio .ripple-wave{background:rgba(76,175,80,.5)}.theme-green .focus-state .floating-label,.theme-green .focus-state .label{color:#4caf50}.theme-green .input-field.focus-state:after,.theme-green .input-field.not-empty-state:after,.theme-green .item-input-field.focus-state:after,.theme-green .item-input-field.not-empty-state:after{background:#4caf50}.theme-green .picker-calendar-day.picker-calendar-day-today span{color:#4caf50}.theme-green .picker-calendar-day.picker-calendar-day-selected span{background-color:#4caf50;color:#fff}.theme-green .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#4caf50}.theme-green .picker-header{background-color:#4caf50}.theme-green .modal-button{color:#4caf50}.theme-green .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-green .timeline-item-date{background-color:#4caf50}.theme-green .timeline-month-title,.theme-green .timeline-year-title{background-color:#4caf50}.theme-green .statusbar-overlay{background-color:#1b5e20}.data-table.theme-green .data-table-header-selected,.theme-green .data-table .data-table-header-selected{background:rgba(76,175,80,.1)}.data-table.theme-green .data-table-title-selected,.theme-green .data-table .data-table-title-selected{color:#4caf50}.swiper-pagination.color-green .swiper-pagination-bullet-active,.theme-green .swiper-pagination .swiper-pagination-bullet-active{background-color:#4caf50}.swiper-pagination.color-green .swiper-pagination-progressbar,.theme-green .swiper-pagination .swiper-pagination-progressbar{background-color:#4caf50}.swiper-pagination.swiper-pagination-progress.bg-green{background-color:rgba(76,175,80,.25)}.swiper-button-next.color-green,.swiper-container-rtl .swiper-button-prev.color-green,.theme-green .swiper-button-next,.theme-green .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-green,.swiper-container-rtl .swiper-button-next.color-green,.theme-green .swiper-button-prev,.theme-green .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-green,.speed-dial-buttons a.theme-green,.theme-green .floating-button,.theme-green .speed-dial-buttons a{color:#fff;background:#4caf50}.floating-button.theme-green.active-state,.speed-dial-buttons a.theme-green.active-state,.theme-green .floating-button.active-state,.theme-green .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-green:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-green:active,html:not(.watch-active-state) .theme-green .floating-button:active,html:not(.watch-active-state) .theme-green .speed-dial-buttons a:active{background:#388e3c}.floating-button.theme-green i,.speed-dial-buttons a.theme-green i,.theme-green .floating-button i,.theme-green .speed-dial-buttons a i{color:inherit}.range-slider.theme-green input[type=range]::-webkit-slider-thumb:before,.theme-green .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#4caf50}.range-slider.theme-green input[type=range]::-webkit-slider-thumb,.theme-green .range-slider input[type=range]::-webkit-slider-thumb{background-color:#4caf50}.range-slider.theme-green input[type=range]::-ms-thumb,.theme-green .range-slider input[type=range]::-ms-thumb{background-color:#4caf50}.range-slider.theme-green input[type=range]::-ms-fill-lower,.theme-green .range-slider input[type=range]::-ms-fill-lower{background-color:#4caf50}.range-slider.theme-green input[type=range]::-moz-range-thumb,.theme-green .range-slider input[type=range]::-moz-range-thumb{background-color:#4caf50}.badge.theme-green{background-color:#4caf50;color:#fff}.theme-lightgreen .button:not(.button-fill){color:#8bc34a}.theme-lightgreen .navbar .button:not(.button-fill),.theme-lightgreen .subnavbar .button:not(.button-fill),.theme-lightgreen .toolbar .button:not(.button-fill),.theme-lightgreen.navbar .button:not(.button-fill),.theme-lightgreen.subnavbar .button:not(.button-fill),.theme-lightgreen.toolbar .button:not(.button-fill){color:#fff}.theme-lightgreen .button.button-fill{background:#8bc34a;color:#fff}.theme-lightgreen .button.button-fill.active-state,html:not(.watch-active-state) .theme-lightgreen .button.button-fill:active{background:#689f38}.progressbar.theme-lightgreen,.theme-lightgreen .progressbar{background-color:rgba(139,195,74,.5)}.progressbar.theme-lightgreen span,.theme-lightgreen .progressbar span{background-color:#8bc34a}.progressbar-infinite.theme-lightgreen,.theme-lightgreen .progressbar-infinite{background-color:rgba(139,195,74,.5)}.progressbar-infinite.theme-lightgreen:after,.progressbar-infinite.theme-lightgreen:before,.theme-lightgreen .progressbar-infinite:after,.theme-lightgreen .progressbar-infinite:before{background-color:#8bc34a}.color-lightgreen i.icon,i.icon.color-lightgreen{color:#8bc34a}i.icon-next.color-lightgreen,i.icon-next.theme-lightgreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%238bc34a'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-lightgreen,i.icon-prev.theme-lightgreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%238bc34a'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-lightgreen,i.icon-back.theme-lightgreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-lightgreen,i.icon-forward.theme-lightgreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-lightgreen,i.icon-bars.theme-lightgreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E")}.theme-lightgreen .card a,.theme-lightgreen a{color:#8bc34a}.navbar.theme-lightgreen,.searchbar.theme-lightgreen,.subnavbar.theme-lightgreen,.theme-lightgreen .navbar,.theme-lightgreen .searchbar,.theme-lightgreen .subnavbar,.theme-lightgreen .toolbar,.toolbar.theme-lightgreen{background-color:#8bc34a}.label-switch.theme-lightgreen input[type=checkbox]:checked+.checkbox,.theme-lightgreen .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(139,195,74,.5)}.label-switch.theme-lightgreen input[type=checkbox]:checked+.checkbox:after,.theme-lightgreen .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#8bc34a}.theme-lightgreen label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-lightgreen i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-lightgreen label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-lightgreen label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-lightgreen label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-lightgreen label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-lightgreen label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-lightgreen label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-lightgreen input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-lightgreen input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-lightgreen input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-lightgreen input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-lightgreen input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-lightgreen input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#8bc34a;background-color:#8bc34a}.theme-lightgreen label.label-radio i.icon-form-radio:after,label.label-radio.theme-lightgreen i.icon-form-radio:after{background-color:#8bc34a}.theme-lightgreen label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-lightgreen label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-lightgreen label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-lightgreen label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-lightgreen label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-lightgreen label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-lightgreen input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-lightgreen input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-lightgreen input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-lightgreen input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-lightgreen input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-lightgreen input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#8bc34a}.theme-lightgreen label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-lightgreen label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-lightgreen label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-lightgreen label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-lightgreen label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-lightgreen label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-lightgreen input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-lightgreen input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-lightgreen input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-lightgreen input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-lightgreen input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-lightgreen input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#8bc34a}.form-checkbox.theme-lightgreen input[type=checkbox]:checked~i,.theme-lightgreen .form-checkbox input[type=checkbox]:checked~i{border-color:#8bc34a;background-color:#8bc34a}.form-radio.theme-lightgreen input[type=radio]:checked~i,.theme-lightgreen .form-radio input[type=radio]:checked~i{border-color:#8bc34a}.form-radio.theme-lightgreen input[type=radio]:checked~i:after,.theme-lightgreen .form-radio input[type=radio]:checked~i:after{background-color:#8bc34a}.theme-lightgreen .form-checkbox .ripple-wave,.theme-lightgreen .form-radio .ripple-wave{background:rgba(139,195,74,.5)}.theme-lightgreen .focus-state .floating-label,.theme-lightgreen .focus-state .label{color:#8bc34a}.theme-lightgreen .input-field.focus-state:after,.theme-lightgreen .input-field.not-empty-state:after,.theme-lightgreen .item-input-field.focus-state:after,.theme-lightgreen .item-input-field.not-empty-state:after{background:#8bc34a}.theme-lightgreen .picker-calendar-day.picker-calendar-day-today span{color:#8bc34a}.theme-lightgreen .picker-calendar-day.picker-calendar-day-selected span{background-color:#8bc34a;color:#fff}.theme-lightgreen .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#8bc34a}.theme-lightgreen .picker-header{background-color:#8bc34a}.theme-lightgreen .modal-button{color:#8bc34a}.theme-lightgreen .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-lightgreen .timeline-item-date{background-color:#8bc34a}.theme-lightgreen .timeline-month-title,.theme-lightgreen .timeline-year-title{background-color:#8bc34a}.theme-lightgreen .statusbar-overlay{background-color:#33691e}.data-table.theme-lightgreen .data-table-header-selected,.theme-lightgreen .data-table .data-table-header-selected{background:rgba(139,195,74,.1)}.data-table.theme-lightgreen .data-table-title-selected,.theme-lightgreen .data-table .data-table-title-selected{color:#8bc34a}.swiper-pagination.color-lightgreen .swiper-pagination-bullet-active,.theme-lightgreen .swiper-pagination .swiper-pagination-bullet-active{background-color:#8bc34a}.swiper-pagination.color-lightgreen .swiper-pagination-progressbar,.theme-lightgreen .swiper-pagination .swiper-pagination-progressbar{background-color:#8bc34a}.swiper-pagination.swiper-pagination-progress.bg-lightgreen{background-color:rgba(139,195,74,.25)}.swiper-button-next.color-lightgreen,.swiper-container-rtl .swiper-button-prev.color-lightgreen,.theme-lightgreen .swiper-button-next,.theme-lightgreen .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-lightgreen,.swiper-container-rtl .swiper-button-next.color-lightgreen,.theme-lightgreen .swiper-button-prev,.theme-lightgreen .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-lightgreen,.speed-dial-buttons a.theme-lightgreen,.theme-lightgreen .floating-button,.theme-lightgreen .speed-dial-buttons a{color:#fff;background:#8bc34a}.floating-button.theme-lightgreen.active-state,.speed-dial-buttons a.theme-lightgreen.active-state,.theme-lightgreen .floating-button.active-state,.theme-lightgreen .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-lightgreen:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-lightgreen:active,html:not(.watch-active-state) .theme-lightgreen .floating-button:active,html:not(.watch-active-state) .theme-lightgreen .speed-dial-buttons a:active{background:#689f38}.floating-button.theme-lightgreen i,.speed-dial-buttons a.theme-lightgreen i,.theme-lightgreen .floating-button i,.theme-lightgreen .speed-dial-buttons a i{color:inherit}.range-slider.theme-lightgreen input[type=range]::-webkit-slider-thumb:before,.theme-lightgreen .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#8bc34a}.range-slider.theme-lightgreen input[type=range]::-webkit-slider-thumb,.theme-lightgreen .range-slider input[type=range]::-webkit-slider-thumb{background-color:#8bc34a}.range-slider.theme-lightgreen input[type=range]::-ms-thumb,.theme-lightgreen .range-slider input[type=range]::-ms-thumb{background-color:#8bc34a}.range-slider.theme-lightgreen input[type=range]::-ms-fill-lower,.theme-lightgreen .range-slider input[type=range]::-ms-fill-lower{background-color:#8bc34a}.range-slider.theme-lightgreen input[type=range]::-moz-range-thumb,.theme-lightgreen .range-slider input[type=range]::-moz-range-thumb{background-color:#8bc34a}.badge.theme-lightgreen{background-color:#8bc34a;color:#fff}.theme-lime .button:not(.button-fill){color:#cddc39}.theme-lime .navbar .button:not(.button-fill),.theme-lime .subnavbar .button:not(.button-fill),.theme-lime .toolbar .button:not(.button-fill),.theme-lime.navbar .button:not(.button-fill),.theme-lime.subnavbar .button:not(.button-fill),.theme-lime.toolbar .button:not(.button-fill){color:#fff}.theme-lime .button.button-fill{background:#cddc39;color:#fff}.theme-lime .button.button-fill.active-state,html:not(.watch-active-state) .theme-lime .button.button-fill:active{background:#afb42b}.progressbar.theme-lime,.theme-lime .progressbar{background-color:rgba(205,220,57,.5)}.progressbar.theme-lime span,.theme-lime .progressbar span{background-color:#cddc39}.progressbar-infinite.theme-lime,.theme-lime .progressbar-infinite{background-color:rgba(205,220,57,.5)}.progressbar-infinite.theme-lime:after,.progressbar-infinite.theme-lime:before,.theme-lime .progressbar-infinite:after,.theme-lime .progressbar-infinite:before{background-color:#cddc39}.color-lime i.icon,i.icon.color-lime{color:#cddc39}i.icon-next.color-lime,i.icon-next.theme-lime{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23cddc39'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-lime,i.icon-prev.theme-lime{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23cddc39'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-lime,i.icon-back.theme-lime{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-lime,i.icon-forward.theme-lime{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-lime,i.icon-bars.theme-lime{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E")}.theme-lime .card a,.theme-lime a{color:#cddc39}.navbar.theme-lime,.searchbar.theme-lime,.subnavbar.theme-lime,.theme-lime .navbar,.theme-lime .searchbar,.theme-lime .subnavbar,.theme-lime .toolbar,.toolbar.theme-lime{background-color:#cddc39}.label-switch.theme-lime input[type=checkbox]:checked+.checkbox,.theme-lime .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(205,220,57,.5)}.label-switch.theme-lime input[type=checkbox]:checked+.checkbox:after,.theme-lime .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#cddc39}.theme-lime label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-lime i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-lime label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-lime label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-lime label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-lime label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-lime label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-lime label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-lime input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-lime input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-lime input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-lime input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-lime input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-lime input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#cddc39;background-color:#cddc39}.theme-lime label.label-radio i.icon-form-radio:after,label.label-radio.theme-lime i.icon-form-radio:after{background-color:#cddc39}.theme-lime label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-lime label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-lime label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-lime label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-lime label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-lime label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-lime input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-lime input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-lime input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-lime input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-lime input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-lime input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#cddc39}.theme-lime label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-lime label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-lime label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-lime label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-lime label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-lime label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-lime input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-lime input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-lime input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-lime input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-lime input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-lime input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#cddc39}.form-checkbox.theme-lime input[type=checkbox]:checked~i,.theme-lime .form-checkbox input[type=checkbox]:checked~i{border-color:#cddc39;background-color:#cddc39}.form-radio.theme-lime input[type=radio]:checked~i,.theme-lime .form-radio input[type=radio]:checked~i{border-color:#cddc39}.form-radio.theme-lime input[type=radio]:checked~i:after,.theme-lime .form-radio input[type=radio]:checked~i:after{background-color:#cddc39}.theme-lime .form-checkbox .ripple-wave,.theme-lime .form-radio .ripple-wave{background:rgba(205,220,57,.5)}.theme-lime .focus-state .floating-label,.theme-lime .focus-state .label{color:#cddc39}.theme-lime .input-field.focus-state:after,.theme-lime .input-field.not-empty-state:after,.theme-lime .item-input-field.focus-state:after,.theme-lime .item-input-field.not-empty-state:after{background:#cddc39}.theme-lime .picker-calendar-day.picker-calendar-day-today span{color:#cddc39}.theme-lime .picker-calendar-day.picker-calendar-day-selected span{background-color:#cddc39;color:#fff}.theme-lime .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#cddc39}.theme-lime .picker-header{background-color:#cddc39}.theme-lime .modal-button{color:#cddc39}.theme-lime .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-lime .timeline-item-date{background-color:#cddc39}.theme-lime .timeline-month-title,.theme-lime .timeline-year-title{background-color:#cddc39}.theme-lime .statusbar-overlay{background-color:#827717}.data-table.theme-lime .data-table-header-selected,.theme-lime .data-table .data-table-header-selected{background:rgba(205,220,57,.1)}.data-table.theme-lime .data-table-title-selected,.theme-lime .data-table .data-table-title-selected{color:#cddc39}.swiper-pagination.color-lime .swiper-pagination-bullet-active,.theme-lime .swiper-pagination .swiper-pagination-bullet-active{background-color:#cddc39}.swiper-pagination.color-lime .swiper-pagination-progressbar,.theme-lime .swiper-pagination .swiper-pagination-progressbar{background-color:#cddc39}.swiper-pagination.swiper-pagination-progress.bg-lime{background-color:rgba(205,220,57,.25)}.swiper-button-next.color-lime,.swiper-container-rtl .swiper-button-prev.color-lime,.theme-lime .swiper-button-next,.theme-lime .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-lime,.swiper-container-rtl .swiper-button-next.color-lime,.theme-lime .swiper-button-prev,.theme-lime .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-lime,.speed-dial-buttons a.theme-lime,.theme-lime .floating-button,.theme-lime .speed-dial-buttons a{color:#fff;background:#cddc39}.floating-button.theme-lime.active-state,.speed-dial-buttons a.theme-lime.active-state,.theme-lime .floating-button.active-state,.theme-lime .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-lime:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-lime:active,html:not(.watch-active-state) .theme-lime .floating-button:active,html:not(.watch-active-state) .theme-lime .speed-dial-buttons a:active{background:#afb42b}.floating-button.theme-lime i,.speed-dial-buttons a.theme-lime i,.theme-lime .floating-button i,.theme-lime .speed-dial-buttons a i{color:inherit}.range-slider.theme-lime input[type=range]::-webkit-slider-thumb:before,.theme-lime .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#cddc39}.range-slider.theme-lime input[type=range]::-webkit-slider-thumb,.theme-lime .range-slider input[type=range]::-webkit-slider-thumb{background-color:#cddc39}.range-slider.theme-lime input[type=range]::-ms-thumb,.theme-lime .range-slider input[type=range]::-ms-thumb{background-color:#cddc39}.range-slider.theme-lime input[type=range]::-ms-fill-lower,.theme-lime .range-slider input[type=range]::-ms-fill-lower{background-color:#cddc39}.range-slider.theme-lime input[type=range]::-moz-range-thumb,.theme-lime .range-slider input[type=range]::-moz-range-thumb{background-color:#cddc39}.badge.theme-lime{background-color:#cddc39;color:#fff}.theme-yellow .button:not(.button-fill){color:#ffeb3b}.theme-yellow .navbar .button:not(.button-fill),.theme-yellow .subnavbar .button:not(.button-fill),.theme-yellow .toolbar .button:not(.button-fill),.theme-yellow.navbar .button:not(.button-fill),.theme-yellow.subnavbar .button:not(.button-fill),.theme-yellow.toolbar .button:not(.button-fill){color:#fff}.theme-yellow .button.button-fill{background:#ffeb3b;color:#fff}.theme-yellow .button.button-fill.active-state,html:not(.watch-active-state) .theme-yellow .button.button-fill:active{background:#fbc02d}.progressbar.theme-yellow,.theme-yellow .progressbar{background-color:rgba(255,235,59,.5)}.progressbar.theme-yellow span,.theme-yellow .progressbar span{background-color:#ffeb3b}.progressbar-infinite.theme-yellow,.theme-yellow .progressbar-infinite{background-color:rgba(255,235,59,.5)}.progressbar-infinite.theme-yellow:after,.progressbar-infinite.theme-yellow:before,.theme-yellow .progressbar-infinite:after,.theme-yellow .progressbar-infinite:before{background-color:#ffeb3b}.color-yellow i.icon,i.icon.color-yellow{color:#ffeb3b}i.icon-next.color-yellow,i.icon-next.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffeb3b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-yellow,i.icon-prev.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffeb3b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-yellow,i.icon-back.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-yellow,i.icon-forward.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-yellow,i.icon-bars.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E")}.theme-yellow .card a,.theme-yellow a{color:#ffeb3b}.navbar.theme-yellow,.searchbar.theme-yellow,.subnavbar.theme-yellow,.theme-yellow .navbar,.theme-yellow .searchbar,.theme-yellow .subnavbar,.theme-yellow .toolbar,.toolbar.theme-yellow{background-color:#ffeb3b}.label-switch.theme-yellow input[type=checkbox]:checked+.checkbox,.theme-yellow .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(255,235,59,.5)}.label-switch.theme-yellow input[type=checkbox]:checked+.checkbox:after,.theme-yellow .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#ffeb3b}.theme-yellow label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-yellow i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-yellow label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-yellow label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-yellow label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-yellow label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-yellow label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-yellow label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-yellow input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-yellow input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-yellow input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-yellow input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-yellow input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-yellow input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#ffeb3b;background-color:#ffeb3b}.theme-yellow label.label-radio i.icon-form-radio:after,label.label-radio.theme-yellow i.icon-form-radio:after{background-color:#ffeb3b}.theme-yellow label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-yellow label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-yellow label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-yellow label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-yellow label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-yellow label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-yellow input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-yellow input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-yellow input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-yellow input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-yellow input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-yellow input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#ffeb3b}.theme-yellow label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-yellow label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-yellow label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-yellow label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-yellow label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-yellow label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-yellow input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-yellow input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-yellow input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-yellow input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-yellow input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-yellow input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#ffeb3b}.form-checkbox.theme-yellow input[type=checkbox]:checked~i,.theme-yellow .form-checkbox input[type=checkbox]:checked~i{border-color:#ffeb3b;background-color:#ffeb3b}.form-radio.theme-yellow input[type=radio]:checked~i,.theme-yellow .form-radio input[type=radio]:checked~i{border-color:#ffeb3b}.form-radio.theme-yellow input[type=radio]:checked~i:after,.theme-yellow .form-radio input[type=radio]:checked~i:after{background-color:#ffeb3b}.theme-yellow .form-checkbox .ripple-wave,.theme-yellow .form-radio .ripple-wave{background:rgba(255,235,59,.5)}.theme-yellow .focus-state .floating-label,.theme-yellow .focus-state .label{color:#ffeb3b}.theme-yellow .input-field.focus-state:after,.theme-yellow .input-field.not-empty-state:after,.theme-yellow .item-input-field.focus-state:after,.theme-yellow .item-input-field.not-empty-state:after{background:#ffeb3b}.theme-yellow .picker-calendar-day.picker-calendar-day-today span{color:#ffeb3b}.theme-yellow .picker-calendar-day.picker-calendar-day-selected span{background-color:#ffeb3b;color:#fff}.theme-yellow .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#ffeb3b}.theme-yellow .picker-header{background-color:#ffeb3b}.theme-yellow .modal-button{color:#ffeb3b}.theme-yellow .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-yellow .timeline-item-date{background-color:#ffeb3b}.theme-yellow .timeline-month-title,.theme-yellow .timeline-year-title{background-color:#ffeb3b}.theme-yellow .statusbar-overlay{background-color:#f57f17}.data-table.theme-yellow .data-table-header-selected,.theme-yellow .data-table .data-table-header-selected{background:rgba(255,235,59,.1)}.data-table.theme-yellow .data-table-title-selected,.theme-yellow .data-table .data-table-title-selected{color:#ffeb3b}.swiper-pagination.color-yellow .swiper-pagination-bullet-active,.theme-yellow .swiper-pagination .swiper-pagination-bullet-active{background-color:#ffeb3b}.swiper-pagination.color-yellow .swiper-pagination-progressbar,.theme-yellow .swiper-pagination .swiper-pagination-progressbar{background-color:#ffeb3b}.swiper-pagination.swiper-pagination-progress.bg-yellow{background-color:rgba(255,235,59,.25)}.swiper-button-next.color-yellow,.swiper-container-rtl .swiper-button-prev.color-yellow,.theme-yellow .swiper-button-next,.theme-yellow .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-yellow,.swiper-container-rtl .swiper-button-next.color-yellow,.theme-yellow .swiper-button-prev,.theme-yellow .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-yellow,.speed-dial-buttons a.theme-yellow,.theme-yellow .floating-button,.theme-yellow .speed-dial-buttons a{color:#fff;background:#ffeb3b}.floating-button.theme-yellow.active-state,.speed-dial-buttons a.theme-yellow.active-state,.theme-yellow .floating-button.active-state,.theme-yellow .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-yellow:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-yellow:active,html:not(.watch-active-state) .theme-yellow .floating-button:active,html:not(.watch-active-state) .theme-yellow .speed-dial-buttons a:active{background:#fbc02d}.floating-button.theme-yellow i,.speed-dial-buttons a.theme-yellow i,.theme-yellow .floating-button i,.theme-yellow .speed-dial-buttons a i{color:inherit}.range-slider.theme-yellow input[type=range]::-webkit-slider-thumb:before,.theme-yellow .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#ffeb3b}.range-slider.theme-yellow input[type=range]::-webkit-slider-thumb,.theme-yellow .range-slider input[type=range]::-webkit-slider-thumb{background-color:#ffeb3b}.range-slider.theme-yellow input[type=range]::-ms-thumb,.theme-yellow .range-slider input[type=range]::-ms-thumb{background-color:#ffeb3b}.range-slider.theme-yellow input[type=range]::-ms-fill-lower,.theme-yellow .range-slider input[type=range]::-ms-fill-lower{background-color:#ffeb3b}.range-slider.theme-yellow input[type=range]::-moz-range-thumb,.theme-yellow .range-slider input[type=range]::-moz-range-thumb{background-color:#ffeb3b}.badge.theme-yellow{background-color:#ffeb3b;color:#fff}.theme-amber .button:not(.button-fill){color:#ffc107}.theme-amber .navbar .button:not(.button-fill),.theme-amber .subnavbar .button:not(.button-fill),.theme-amber .toolbar .button:not(.button-fill),.theme-amber.navbar .button:not(.button-fill),.theme-amber.subnavbar .button:not(.button-fill),.theme-amber.toolbar .button:not(.button-fill){color:#fff}.theme-amber .button.button-fill{background:#ffc107;color:#fff}.theme-amber .button.button-fill.active-state,html:not(.watch-active-state) .theme-amber .button.button-fill:active{background:#ffa000}.progressbar.theme-amber,.theme-amber .progressbar{background-color:rgba(255,193,7,.5)}.progressbar.theme-amber span,.theme-amber .progressbar span{background-color:#ffc107}.progressbar-infinite.theme-amber,.theme-amber .progressbar-infinite{background-color:rgba(255,193,7,.5)}.progressbar-infinite.theme-amber:after,.progressbar-infinite.theme-amber:before,.theme-amber .progressbar-infinite:after,.theme-amber .progressbar-infinite:before{background-color:#ffc107}.color-amber i.icon,i.icon.color-amber{color:#ffc107}i.icon-next.color-amber,i.icon-next.theme-amber{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffc107'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-amber,i.icon-prev.theme-amber{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffc107'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-amber,i.icon-back.theme-amber{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-amber,i.icon-forward.theme-amber{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-amber,i.icon-bars.theme-amber{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E")}.theme-amber .card a,.theme-amber a{color:#ffc107}.navbar.theme-amber,.searchbar.theme-amber,.subnavbar.theme-amber,.theme-amber .navbar,.theme-amber .searchbar,.theme-amber .subnavbar,.theme-amber .toolbar,.toolbar.theme-amber{background-color:#ffc107}.label-switch.theme-amber input[type=checkbox]:checked+.checkbox,.theme-amber .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(255,193,7,.5)}.label-switch.theme-amber input[type=checkbox]:checked+.checkbox:after,.theme-amber .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#ffc107}.theme-amber label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-amber i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-amber label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-amber label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-amber label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-amber label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-amber label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-amber label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-amber input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-amber input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-amber input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-amber input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-amber input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-amber input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#ffc107;background-color:#ffc107}.theme-amber label.label-radio i.icon-form-radio:after,label.label-radio.theme-amber i.icon-form-radio:after{background-color:#ffc107}.theme-amber label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-amber label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-amber label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-amber label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-amber label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-amber label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-amber input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-amber input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-amber input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-amber input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-amber input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-amber input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#ffc107}.theme-amber label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-amber label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-amber label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-amber label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-amber label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-amber label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-amber input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-amber input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-amber input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-amber input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-amber input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-amber input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#ffc107}.form-checkbox.theme-amber input[type=checkbox]:checked~i,.theme-amber .form-checkbox input[type=checkbox]:checked~i{border-color:#ffc107;background-color:#ffc107}.form-radio.theme-amber input[type=radio]:checked~i,.theme-amber .form-radio input[type=radio]:checked~i{border-color:#ffc107}.form-radio.theme-amber input[type=radio]:checked~i:after,.theme-amber .form-radio input[type=radio]:checked~i:after{background-color:#ffc107}.theme-amber .form-checkbox .ripple-wave,.theme-amber .form-radio .ripple-wave{background:rgba(255,193,7,.5)}.theme-amber .focus-state .floating-label,.theme-amber .focus-state .label{color:#ffc107}.theme-amber .input-field.focus-state:after,.theme-amber .input-field.not-empty-state:after,.theme-amber .item-input-field.focus-state:after,.theme-amber .item-input-field.not-empty-state:after{background:#ffc107}.theme-amber .picker-calendar-day.picker-calendar-day-today span{color:#ffc107}.theme-amber .picker-calendar-day.picker-calendar-day-selected span{background-color:#ffc107;color:#fff}.theme-amber .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#ffc107}.theme-amber .picker-header{background-color:#ffc107}.theme-amber .modal-button{color:#ffc107}.theme-amber .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-amber .timeline-item-date{background-color:#ffc107}.theme-amber .timeline-month-title,.theme-amber .timeline-year-title{background-color:#ffc107}.theme-amber .statusbar-overlay{background-color:#ff6f00}.data-table.theme-amber .data-table-header-selected,.theme-amber .data-table .data-table-header-selected{background:rgba(255,193,7,.1)}.data-table.theme-amber .data-table-title-selected,.theme-amber .data-table .data-table-title-selected{color:#ffc107}.swiper-pagination.color-amber .swiper-pagination-bullet-active,.theme-amber .swiper-pagination .swiper-pagination-bullet-active{background-color:#ffc107}.swiper-pagination.color-amber .swiper-pagination-progressbar,.theme-amber .swiper-pagination .swiper-pagination-progressbar{background-color:#ffc107}.swiper-pagination.swiper-pagination-progress.bg-amber{background-color:rgba(255,193,7,.25)}.swiper-button-next.color-amber,.swiper-container-rtl .swiper-button-prev.color-amber,.theme-amber .swiper-button-next,.theme-amber .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-amber,.swiper-container-rtl .swiper-button-next.color-amber,.theme-amber .swiper-button-prev,.theme-amber .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-amber,.speed-dial-buttons a.theme-amber,.theme-amber .floating-button,.theme-amber .speed-dial-buttons a{color:#fff;background:#ffc107}.floating-button.theme-amber.active-state,.speed-dial-buttons a.theme-amber.active-state,.theme-amber .floating-button.active-state,.theme-amber .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-amber:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-amber:active,html:not(.watch-active-state) .theme-amber .floating-button:active,html:not(.watch-active-state) .theme-amber .speed-dial-buttons a:active{background:#ffa000}.floating-button.theme-amber i,.speed-dial-buttons a.theme-amber i,.theme-amber .floating-button i,.theme-amber .speed-dial-buttons a i{color:inherit}.range-slider.theme-amber input[type=range]::-webkit-slider-thumb:before,.theme-amber .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#ffc107}.range-slider.theme-amber input[type=range]::-webkit-slider-thumb,.theme-amber .range-slider input[type=range]::-webkit-slider-thumb{background-color:#ffc107}.range-slider.theme-amber input[type=range]::-ms-thumb,.theme-amber .range-slider input[type=range]::-ms-thumb{background-color:#ffc107}.range-slider.theme-amber input[type=range]::-ms-fill-lower,.theme-amber .range-slider input[type=range]::-ms-fill-lower{background-color:#ffc107}.range-slider.theme-amber input[type=range]::-moz-range-thumb,.theme-amber .range-slider input[type=range]::-moz-range-thumb{background-color:#ffc107}.badge.theme-amber{background-color:#ffc107;color:#fff}.theme-orange .button:not(.button-fill){color:#ff9800}.theme-orange .navbar .button:not(.button-fill),.theme-orange .subnavbar .button:not(.button-fill),.theme-orange .toolbar .button:not(.button-fill),.theme-orange.navbar .button:not(.button-fill),.theme-orange.subnavbar .button:not(.button-fill),.theme-orange.toolbar .button:not(.button-fill){color:#fff}.theme-orange .button.button-fill{background:#ff9800;color:#fff}.theme-orange .button.button-fill.active-state,html:not(.watch-active-state) .theme-orange .button.button-fill:active{background:#f57c00}.progressbar.theme-orange,.theme-orange .progressbar{background-color:rgba(255,152,0,.5)}.progressbar.theme-orange span,.theme-orange .progressbar span{background-color:#ff9800}.progressbar-infinite.theme-orange,.theme-orange .progressbar-infinite{background-color:rgba(255,152,0,.5)}.progressbar-infinite.theme-orange:after,.progressbar-infinite.theme-orange:before,.theme-orange .progressbar-infinite:after,.theme-orange .progressbar-infinite:before{background-color:#ff9800}.color-orange i.icon,i.icon.color-orange{color:#ff9800}i.icon-next.color-orange,i.icon-next.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff9800'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-orange,i.icon-prev.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff9800'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-orange,i.icon-back.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-orange,i.icon-forward.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-orange,i.icon-bars.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E")}.theme-orange .card a,.theme-orange a{color:#ff9800}.navbar.theme-orange,.searchbar.theme-orange,.subnavbar.theme-orange,.theme-orange .navbar,.theme-orange .searchbar,.theme-orange .subnavbar,.theme-orange .toolbar,.toolbar.theme-orange{background-color:#ff9800}.label-switch.theme-orange input[type=checkbox]:checked+.checkbox,.theme-orange .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(255,152,0,.5)}.label-switch.theme-orange input[type=checkbox]:checked+.checkbox:after,.theme-orange .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#ff9800}.theme-orange label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-orange i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-orange label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-orange label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-orange label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-orange label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-orange label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-orange label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-orange input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-orange input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-orange input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-orange input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-orange input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-orange input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#ff9800;background-color:#ff9800}.theme-orange label.label-radio i.icon-form-radio:after,label.label-radio.theme-orange i.icon-form-radio:after{background-color:#ff9800}.theme-orange label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-orange label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-orange label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-orange label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-orange label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-orange label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-orange input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-orange input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-orange input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-orange input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-orange input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-orange input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#ff9800}.theme-orange label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-orange label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-orange label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-orange label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-orange label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-orange label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-orange input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-orange input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-orange input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-orange input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-orange input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-orange input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#ff9800}.form-checkbox.theme-orange input[type=checkbox]:checked~i,.theme-orange .form-checkbox input[type=checkbox]:checked~i{border-color:#ff9800;background-color:#ff9800}.form-radio.theme-orange input[type=radio]:checked~i,.theme-orange .form-radio input[type=radio]:checked~i{border-color:#ff9800}.form-radio.theme-orange input[type=radio]:checked~i:after,.theme-orange .form-radio input[type=radio]:checked~i:after{background-color:#ff9800}.theme-orange .form-checkbox .ripple-wave,.theme-orange .form-radio .ripple-wave{background:rgba(255,152,0,.5)}.theme-orange .focus-state .floating-label,.theme-orange .focus-state .label{color:#ff9800}.theme-orange .input-field.focus-state:after,.theme-orange .input-field.not-empty-state:after,.theme-orange .item-input-field.focus-state:after,.theme-orange .item-input-field.not-empty-state:after{background:#ff9800}.theme-orange .picker-calendar-day.picker-calendar-day-today span{color:#ff9800}.theme-orange .picker-calendar-day.picker-calendar-day-selected span{background-color:#ff9800;color:#fff}.theme-orange .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#ff9800}.theme-orange .picker-header{background-color:#ff9800}.theme-orange .modal-button{color:#ff9800}.theme-orange .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-orange .timeline-item-date{background-color:#ff9800}.theme-orange .timeline-month-title,.theme-orange .timeline-year-title{background-color:#ff9800}.theme-orange .statusbar-overlay{background-color:#e65100}.data-table.theme-orange .data-table-header-selected,.theme-orange .data-table .data-table-header-selected{background:rgba(255,152,0,.1)}.data-table.theme-orange .data-table-title-selected,.theme-orange .data-table .data-table-title-selected{color:#ff9800}.swiper-pagination.color-orange .swiper-pagination-bullet-active,.theme-orange .swiper-pagination .swiper-pagination-bullet-active{background-color:#ff9800}.swiper-pagination.color-orange .swiper-pagination-progressbar,.theme-orange .swiper-pagination .swiper-pagination-progressbar{background-color:#ff9800}.swiper-pagination.swiper-pagination-progress.bg-orange{background-color:rgba(255,152,0,.25)}.swiper-button-next.color-orange,.swiper-container-rtl .swiper-button-prev.color-orange,.theme-orange .swiper-button-next,.theme-orange .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-orange,.swiper-container-rtl .swiper-button-next.color-orange,.theme-orange .swiper-button-prev,.theme-orange .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-orange,.speed-dial-buttons a.theme-orange,.theme-orange .floating-button,.theme-orange .speed-dial-buttons a{color:#fff;background:#ff9800}.floating-button.theme-orange.active-state,.speed-dial-buttons a.theme-orange.active-state,.theme-orange .floating-button.active-state,.theme-orange .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-orange:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-orange:active,html:not(.watch-active-state) .theme-orange .floating-button:active,html:not(.watch-active-state) .theme-orange .speed-dial-buttons a:active{background:#f57c00}.floating-button.theme-orange i,.speed-dial-buttons a.theme-orange i,.theme-orange .floating-button i,.theme-orange .speed-dial-buttons a i{color:inherit}.range-slider.theme-orange input[type=range]::-webkit-slider-thumb:before,.theme-orange .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#ff9800}.range-slider.theme-orange input[type=range]::-webkit-slider-thumb,.theme-orange .range-slider input[type=range]::-webkit-slider-thumb{background-color:#ff9800}.range-slider.theme-orange input[type=range]::-ms-thumb,.theme-orange .range-slider input[type=range]::-ms-thumb{background-color:#ff9800}.range-slider.theme-orange input[type=range]::-ms-fill-lower,.theme-orange .range-slider input[type=range]::-ms-fill-lower{background-color:#ff9800}.range-slider.theme-orange input[type=range]::-moz-range-thumb,.theme-orange .range-slider input[type=range]::-moz-range-thumb{background-color:#ff9800}.badge.theme-orange{background-color:#ff9800;color:#fff}.theme-deeporange .button:not(.button-fill){color:#ff5722}.theme-deeporange .navbar .button:not(.button-fill),.theme-deeporange .subnavbar .button:not(.button-fill),.theme-deeporange .toolbar .button:not(.button-fill),.theme-deeporange.navbar .button:not(.button-fill),.theme-deeporange.subnavbar .button:not(.button-fill),.theme-deeporange.toolbar .button:not(.button-fill){color:#fff}.theme-deeporange .button.button-fill{background:#ff5722;color:#fff}.theme-deeporange .button.button-fill.active-state,html:not(.watch-active-state) .theme-deeporange .button.button-fill:active{background:#e64a19}.progressbar.theme-deeporange,.theme-deeporange .progressbar{background-color:rgba(255,87,34,.5)}.progressbar.theme-deeporange span,.theme-deeporange .progressbar span{background-color:#ff5722}.progressbar-infinite.theme-deeporange,.theme-deeporange .progressbar-infinite{background-color:rgba(255,87,34,.5)}.progressbar-infinite.theme-deeporange:after,.progressbar-infinite.theme-deeporange:before,.theme-deeporange .progressbar-infinite:after,.theme-deeporange .progressbar-infinite:before{background-color:#ff5722}.color-deeporange i.icon,i.icon.color-deeporange{color:#ff5722}i.icon-next.color-deeporange,i.icon-next.theme-deeporange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff5722'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-deeporange,i.icon-prev.theme-deeporange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff5722'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-deeporange,i.icon-back.theme-deeporange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-deeporange,i.icon-forward.theme-deeporange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-deeporange,i.icon-bars.theme-deeporange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E")}.theme-deeporange .card a,.theme-deeporange a{color:#ff5722}.navbar.theme-deeporange,.searchbar.theme-deeporange,.subnavbar.theme-deeporange,.theme-deeporange .navbar,.theme-deeporange .searchbar,.theme-deeporange .subnavbar,.theme-deeporange .toolbar,.toolbar.theme-deeporange{background-color:#ff5722}.label-switch.theme-deeporange input[type=checkbox]:checked+.checkbox,.theme-deeporange .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(255,87,34,.5)}.label-switch.theme-deeporange input[type=checkbox]:checked+.checkbox:after,.theme-deeporange .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#ff5722}.theme-deeporange label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-deeporange i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-deeporange label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-deeporange label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-deeporange label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-deeporange label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-deeporange label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-deeporange label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-deeporange input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-deeporange input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-deeporange input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-deeporange input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-deeporange input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-deeporange input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#ff5722;background-color:#ff5722}.theme-deeporange label.label-radio i.icon-form-radio:after,label.label-radio.theme-deeporange i.icon-form-radio:after{background-color:#ff5722}.theme-deeporange label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-deeporange label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-deeporange label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-deeporange label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-deeporange label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-deeporange label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-deeporange input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-deeporange input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-deeporange input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-deeporange input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-deeporange input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-deeporange input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#ff5722}.theme-deeporange label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-deeporange label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-deeporange label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-deeporange label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-deeporange label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-deeporange label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-deeporange input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-deeporange input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-deeporange input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-deeporange input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-deeporange input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-deeporange input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#ff5722}.form-checkbox.theme-deeporange input[type=checkbox]:checked~i,.theme-deeporange .form-checkbox input[type=checkbox]:checked~i{border-color:#ff5722;background-color:#ff5722}.form-radio.theme-deeporange input[type=radio]:checked~i,.theme-deeporange .form-radio input[type=radio]:checked~i{border-color:#ff5722}.form-radio.theme-deeporange input[type=radio]:checked~i:after,.theme-deeporange .form-radio input[type=radio]:checked~i:after{background-color:#ff5722}.theme-deeporange .form-checkbox .ripple-wave,.theme-deeporange .form-radio .ripple-wave{background:rgba(255,87,34,.5)}.theme-deeporange .focus-state .floating-label,.theme-deeporange .focus-state .label{color:#ff5722}.theme-deeporange .input-field.focus-state:after,.theme-deeporange .input-field.not-empty-state:after,.theme-deeporange .item-input-field.focus-state:after,.theme-deeporange .item-input-field.not-empty-state:after{background:#ff5722}.theme-deeporange .picker-calendar-day.picker-calendar-day-today span{color:#ff5722}.theme-deeporange .picker-calendar-day.picker-calendar-day-selected span{background-color:#ff5722;color:#fff}.theme-deeporange .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#ff5722}.theme-deeporange .picker-header{background-color:#ff5722}.theme-deeporange .modal-button{color:#ff5722}.theme-deeporange .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-deeporange .timeline-item-date{background-color:#ff5722}.theme-deeporange .timeline-month-title,.theme-deeporange .timeline-year-title{background-color:#ff5722}.theme-deeporange .statusbar-overlay{background-color:#bf360c}.data-table.theme-deeporange .data-table-header-selected,.theme-deeporange .data-table .data-table-header-selected{background:rgba(255,87,34,.1)}.data-table.theme-deeporange .data-table-title-selected,.theme-deeporange .data-table .data-table-title-selected{color:#ff5722}.swiper-pagination.color-deeporange .swiper-pagination-bullet-active,.theme-deeporange .swiper-pagination .swiper-pagination-bullet-active{background-color:#ff5722}.swiper-pagination.color-deeporange .swiper-pagination-progressbar,.theme-deeporange .swiper-pagination .swiper-pagination-progressbar{background-color:#ff5722}.swiper-pagination.swiper-pagination-progress.bg-deeporange{background-color:rgba(255,87,34,.25)}.swiper-button-next.color-deeporange,.swiper-container-rtl .swiper-button-prev.color-deeporange,.theme-deeporange .swiper-button-next,.theme-deeporange .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-deeporange,.swiper-container-rtl .swiper-button-next.color-deeporange,.theme-deeporange .swiper-button-prev,.theme-deeporange .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-deeporange,.speed-dial-buttons a.theme-deeporange,.theme-deeporange .floating-button,.theme-deeporange .speed-dial-buttons a{color:#fff;background:#ff5722}.floating-button.theme-deeporange.active-state,.speed-dial-buttons a.theme-deeporange.active-state,.theme-deeporange .floating-button.active-state,.theme-deeporange .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-deeporange:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-deeporange:active,html:not(.watch-active-state) .theme-deeporange .floating-button:active,html:not(.watch-active-state) .theme-deeporange .speed-dial-buttons a:active{background:#e64a19}.floating-button.theme-deeporange i,.speed-dial-buttons a.theme-deeporange i,.theme-deeporange .floating-button i,.theme-deeporange .speed-dial-buttons a i{color:inherit}.range-slider.theme-deeporange input[type=range]::-webkit-slider-thumb:before,.theme-deeporange .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#ff5722}.range-slider.theme-deeporange input[type=range]::-webkit-slider-thumb,.theme-deeporange .range-slider input[type=range]::-webkit-slider-thumb{background-color:#ff5722}.range-slider.theme-deeporange input[type=range]::-ms-thumb,.theme-deeporange .range-slider input[type=range]::-ms-thumb{background-color:#ff5722}.range-slider.theme-deeporange input[type=range]::-ms-fill-lower,.theme-deeporange .range-slider input[type=range]::-ms-fill-lower{background-color:#ff5722}.range-slider.theme-deeporange input[type=range]::-moz-range-thumb,.theme-deeporange .range-slider input[type=range]::-moz-range-thumb{background-color:#ff5722}.badge.theme-deeporange{background-color:#ff5722;color:#fff}.theme-brown .button:not(.button-fill){color:#795548}.theme-brown .navbar .button:not(.button-fill),.theme-brown .subnavbar .button:not(.button-fill),.theme-brown .toolbar .button:not(.button-fill),.theme-brown.navbar .button:not(.button-fill),.theme-brown.subnavbar .button:not(.button-fill),.theme-brown.toolbar .button:not(.button-fill){color:#fff}.theme-brown .button.button-fill{background:#795548;color:#fff}.theme-brown .button.button-fill.active-state,html:not(.watch-active-state) .theme-brown .button.button-fill:active{background:#5d4037}.progressbar.theme-brown,.theme-brown .progressbar{background-color:rgba(121,85,72,.5)}.progressbar.theme-brown span,.theme-brown .progressbar span{background-color:#795548}.progressbar-infinite.theme-brown,.theme-brown .progressbar-infinite{background-color:rgba(121,85,72,.5)}.progressbar-infinite.theme-brown:after,.progressbar-infinite.theme-brown:before,.theme-brown .progressbar-infinite:after,.theme-brown .progressbar-infinite:before{background-color:#795548}.color-brown i.icon,i.icon.color-brown{color:#795548}i.icon-next.color-brown,i.icon-next.theme-brown{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23795548'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-brown,i.icon-prev.theme-brown{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23795548'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-brown,i.icon-back.theme-brown{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-brown,i.icon-forward.theme-brown{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-brown,i.icon-bars.theme-brown{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E")}.theme-brown .card a,.theme-brown a{color:#795548}.navbar.theme-brown,.searchbar.theme-brown,.subnavbar.theme-brown,.theme-brown .navbar,.theme-brown .searchbar,.theme-brown .subnavbar,.theme-brown .toolbar,.toolbar.theme-brown{background-color:#795548}.label-switch.theme-brown input[type=checkbox]:checked+.checkbox,.theme-brown .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(121,85,72,.5)}.label-switch.theme-brown input[type=checkbox]:checked+.checkbox:after,.theme-brown .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#795548}.theme-brown label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-brown i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-brown label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-brown label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-brown label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-brown label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-brown label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-brown label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-brown input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-brown input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-brown input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-brown input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-brown input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-brown input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#795548;background-color:#795548}.theme-brown label.label-radio i.icon-form-radio:after,label.label-radio.theme-brown i.icon-form-radio:after{background-color:#795548}.theme-brown label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-brown label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-brown label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-brown label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-brown label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-brown label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-brown input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-brown input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-brown input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-brown input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-brown input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-brown input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#795548}.theme-brown label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-brown label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-brown label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-brown label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-brown label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-brown label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-brown input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-brown input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-brown input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-brown input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-brown input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-brown input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#795548}.form-checkbox.theme-brown input[type=checkbox]:checked~i,.theme-brown .form-checkbox input[type=checkbox]:checked~i{border-color:#795548;background-color:#795548}.form-radio.theme-brown input[type=radio]:checked~i,.theme-brown .form-radio input[type=radio]:checked~i{border-color:#795548}.form-radio.theme-brown input[type=radio]:checked~i:after,.theme-brown .form-radio input[type=radio]:checked~i:after{background-color:#795548}.theme-brown .form-checkbox .ripple-wave,.theme-brown .form-radio .ripple-wave{background:rgba(121,85,72,.5)}.theme-brown .focus-state .floating-label,.theme-brown .focus-state .label{color:#795548}.theme-brown .input-field.focus-state:after,.theme-brown .input-field.not-empty-state:after,.theme-brown .item-input-field.focus-state:after,.theme-brown .item-input-field.not-empty-state:after{background:#795548}.theme-brown .picker-calendar-day.picker-calendar-day-today span{color:#795548}.theme-brown .picker-calendar-day.picker-calendar-day-selected span{background-color:#795548;color:#fff}.theme-brown .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#795548}.theme-brown .picker-header{background-color:#795548}.theme-brown .modal-button{color:#795548}.theme-brown .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-brown .timeline-item-date{background-color:#795548}.theme-brown .timeline-month-title,.theme-brown .timeline-year-title{background-color:#795548}.theme-brown .statusbar-overlay{background-color:#3e2723}.data-table.theme-brown .data-table-header-selected,.theme-brown .data-table .data-table-header-selected{background:rgba(121,85,72,.1)}.data-table.theme-brown .data-table-title-selected,.theme-brown .data-table .data-table-title-selected{color:#795548}.swiper-pagination.color-brown .swiper-pagination-bullet-active,.theme-brown .swiper-pagination .swiper-pagination-bullet-active{background-color:#795548}.swiper-pagination.color-brown .swiper-pagination-progressbar,.theme-brown .swiper-pagination .swiper-pagination-progressbar{background-color:#795548}.swiper-pagination.swiper-pagination-progress.bg-brown{background-color:rgba(121,85,72,.25)}.swiper-button-next.color-brown,.swiper-container-rtl .swiper-button-prev.color-brown,.theme-brown .swiper-button-next,.theme-brown .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-brown,.swiper-container-rtl .swiper-button-next.color-brown,.theme-brown .swiper-button-prev,.theme-brown .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-brown,.speed-dial-buttons a.theme-brown,.theme-brown .floating-button,.theme-brown .speed-dial-buttons a{color:#fff;background:#795548}.floating-button.theme-brown.active-state,.speed-dial-buttons a.theme-brown.active-state,.theme-brown .floating-button.active-state,.theme-brown .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-brown:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-brown:active,html:not(.watch-active-state) .theme-brown .floating-button:active,html:not(.watch-active-state) .theme-brown .speed-dial-buttons a:active{background:#5d4037}.floating-button.theme-brown i,.speed-dial-buttons a.theme-brown i,.theme-brown .floating-button i,.theme-brown .speed-dial-buttons a i{color:inherit}.range-slider.theme-brown input[type=range]::-webkit-slider-thumb:before,.theme-brown .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#795548}.range-slider.theme-brown input[type=range]::-webkit-slider-thumb,.theme-brown .range-slider input[type=range]::-webkit-slider-thumb{background-color:#795548}.range-slider.theme-brown input[type=range]::-ms-thumb,.theme-brown .range-slider input[type=range]::-ms-thumb{background-color:#795548}.range-slider.theme-brown input[type=range]::-ms-fill-lower,.theme-brown .range-slider input[type=range]::-ms-fill-lower{background-color:#795548}.range-slider.theme-brown input[type=range]::-moz-range-thumb,.theme-brown .range-slider input[type=range]::-moz-range-thumb{background-color:#795548}.badge.theme-brown{background-color:#795548;color:#fff}.theme-gray .button:not(.button-fill){color:#9e9e9e}.theme-gray .navbar .button:not(.button-fill),.theme-gray .subnavbar .button:not(.button-fill),.theme-gray .toolbar .button:not(.button-fill),.theme-gray.navbar .button:not(.button-fill),.theme-gray.subnavbar .button:not(.button-fill),.theme-gray.toolbar .button:not(.button-fill){color:#fff}.theme-gray .button.button-fill{background:#9e9e9e;color:#fff}.theme-gray .button.button-fill.active-state,html:not(.watch-active-state) .theme-gray .button.button-fill:active{background:#616161}.progressbar.theme-gray,.theme-gray .progressbar{background-color:rgba(158,158,158,.5)}.progressbar.theme-gray span,.theme-gray .progressbar span{background-color:#9e9e9e}.progressbar-infinite.theme-gray,.theme-gray .progressbar-infinite{background-color:rgba(158,158,158,.5)}.progressbar-infinite.theme-gray:after,.progressbar-infinite.theme-gray:before,.theme-gray .progressbar-infinite:after,.theme-gray .progressbar-infinite:before{background-color:#9e9e9e}.color-gray i.icon,i.icon.color-gray{color:#9e9e9e}i.icon-next.color-gray,i.icon-next.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239e9e9e'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-gray,i.icon-prev.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239e9e9e'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-gray,i.icon-back.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-gray,i.icon-forward.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-gray,i.icon-bars.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E")}.theme-gray .card a,.theme-gray a{color:#9e9e9e}.navbar.theme-gray,.searchbar.theme-gray,.subnavbar.theme-gray,.theme-gray .navbar,.theme-gray .searchbar,.theme-gray .subnavbar,.theme-gray .toolbar,.toolbar.theme-gray{background-color:#9e9e9e}.label-switch.theme-gray input[type=checkbox]:checked+.checkbox,.theme-gray .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(158,158,158,.5)}.label-switch.theme-gray input[type=checkbox]:checked+.checkbox:after,.theme-gray .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#9e9e9e}.theme-gray label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-gray i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-gray label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-gray label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-gray label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-gray label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-gray label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-gray label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-gray input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-gray input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-gray input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-gray input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-gray input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-gray input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#9e9e9e;background-color:#9e9e9e}.theme-gray label.label-radio i.icon-form-radio:after,label.label-radio.theme-gray i.icon-form-radio:after{background-color:#9e9e9e}.theme-gray label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-gray label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-gray label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-gray label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-gray label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-gray label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-gray input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-gray input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-gray input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-gray input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-gray input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-gray input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#9e9e9e}.theme-gray label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-gray label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-gray label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-gray label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-gray label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-gray label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-gray input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-gray input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-gray input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-gray input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-gray input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-gray input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#9e9e9e}.form-checkbox.theme-gray input[type=checkbox]:checked~i,.theme-gray .form-checkbox input[type=checkbox]:checked~i{border-color:#9e9e9e;background-color:#9e9e9e}.form-radio.theme-gray input[type=radio]:checked~i,.theme-gray .form-radio input[type=radio]:checked~i{border-color:#9e9e9e}.form-radio.theme-gray input[type=radio]:checked~i:after,.theme-gray .form-radio input[type=radio]:checked~i:after{background-color:#9e9e9e}.theme-gray .form-checkbox .ripple-wave,.theme-gray .form-radio .ripple-wave{background:rgba(158,158,158,.5)}.theme-gray .focus-state .floating-label,.theme-gray .focus-state .label{color:#9e9e9e}.theme-gray .input-field.focus-state:after,.theme-gray .input-field.not-empty-state:after,.theme-gray .item-input-field.focus-state:after,.theme-gray .item-input-field.not-empty-state:after{background:#9e9e9e}.theme-gray .picker-calendar-day.picker-calendar-day-today span{color:#9e9e9e}.theme-gray .picker-calendar-day.picker-calendar-day-selected span{background-color:#9e9e9e;color:#fff}.theme-gray .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#9e9e9e}.theme-gray .picker-header{background-color:#9e9e9e}.theme-gray .modal-button{color:#9e9e9e}.theme-gray .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-gray .timeline-item-date{background-color:#9e9e9e}.theme-gray .timeline-month-title,.theme-gray .timeline-year-title{background-color:#9e9e9e}.theme-gray .statusbar-overlay{background-color:#212121}.data-table.theme-gray .data-table-header-selected,.theme-gray .data-table .data-table-header-selected{background:rgba(158,158,158,.1)}.data-table.theme-gray .data-table-title-selected,.theme-gray .data-table .data-table-title-selected{color:#9e9e9e}.swiper-pagination.color-gray .swiper-pagination-bullet-active,.theme-gray .swiper-pagination .swiper-pagination-bullet-active{background-color:#9e9e9e}.swiper-pagination.color-gray .swiper-pagination-progressbar,.theme-gray .swiper-pagination .swiper-pagination-progressbar{background-color:#9e9e9e}.swiper-pagination.swiper-pagination-progress.bg-gray{background-color:rgba(158,158,158,.25)}.swiper-button-next.color-gray,.swiper-container-rtl .swiper-button-prev.color-gray,.theme-gray .swiper-button-next,.theme-gray .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-gray,.swiper-container-rtl .swiper-button-next.color-gray,.theme-gray .swiper-button-prev,.theme-gray .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-gray,.speed-dial-buttons a.theme-gray,.theme-gray .floating-button,.theme-gray .speed-dial-buttons a{color:#fff;background:#9e9e9e}.floating-button.theme-gray.active-state,.speed-dial-buttons a.theme-gray.active-state,.theme-gray .floating-button.active-state,.theme-gray .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-gray:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-gray:active,html:not(.watch-active-state) .theme-gray .floating-button:active,html:not(.watch-active-state) .theme-gray .speed-dial-buttons a:active{background:#616161}.floating-button.theme-gray i,.speed-dial-buttons a.theme-gray i,.theme-gray .floating-button i,.theme-gray .speed-dial-buttons a i{color:inherit}.range-slider.theme-gray input[type=range]::-webkit-slider-thumb:before,.theme-gray .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#9e9e9e}.range-slider.theme-gray input[type=range]::-webkit-slider-thumb,.theme-gray .range-slider input[type=range]::-webkit-slider-thumb{background-color:#9e9e9e}.range-slider.theme-gray input[type=range]::-ms-thumb,.theme-gray .range-slider input[type=range]::-ms-thumb{background-color:#9e9e9e}.range-slider.theme-gray input[type=range]::-ms-fill-lower,.theme-gray .range-slider input[type=range]::-ms-fill-lower{background-color:#9e9e9e}.range-slider.theme-gray input[type=range]::-moz-range-thumb,.theme-gray .range-slider input[type=range]::-moz-range-thumb{background-color:#9e9e9e}.badge.theme-gray{background-color:#9e9e9e;color:#fff}.theme-bluegray .button:not(.button-fill){color:#607d8b}.theme-bluegray .navbar .button:not(.button-fill),.theme-bluegray .subnavbar .button:not(.button-fill),.theme-bluegray .toolbar .button:not(.button-fill),.theme-bluegray.navbar .button:not(.button-fill),.theme-bluegray.subnavbar .button:not(.button-fill),.theme-bluegray.toolbar .button:not(.button-fill){color:#fff}.theme-bluegray .button.button-fill{background:#607d8b;color:#fff}.theme-bluegray .button.button-fill.active-state,html:not(.watch-active-state) .theme-bluegray .button.button-fill:active{background:#455a64}.progressbar.theme-bluegray,.theme-bluegray .progressbar{background-color:rgba(96,125,139,.5)}.progressbar.theme-bluegray span,.theme-bluegray .progressbar span{background-color:#607d8b}.progressbar-infinite.theme-bluegray,.theme-bluegray .progressbar-infinite{background-color:rgba(96,125,139,.5)}.progressbar-infinite.theme-bluegray:after,.progressbar-infinite.theme-bluegray:before,.theme-bluegray .progressbar-infinite:after,.theme-bluegray .progressbar-infinite:before{background-color:#607d8b}.color-bluegray i.icon,i.icon.color-bluegray{color:#607d8b}i.icon-next.color-bluegray,i.icon-next.theme-bluegray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23607d8b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-bluegray,i.icon-prev.theme-bluegray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23607d8b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-bluegray,i.icon-back.theme-bluegray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-bluegray,i.icon-forward.theme-bluegray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-bluegray,i.icon-bars.theme-bluegray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E")}.theme-bluegray .card a,.theme-bluegray a{color:#607d8b}.navbar.theme-bluegray,.searchbar.theme-bluegray,.subnavbar.theme-bluegray,.theme-bluegray .navbar,.theme-bluegray .searchbar,.theme-bluegray .subnavbar,.theme-bluegray .toolbar,.toolbar.theme-bluegray{background-color:#607d8b}.label-switch.theme-bluegray input[type=checkbox]:checked+.checkbox,.theme-bluegray .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(96,125,139,.5)}.label-switch.theme-bluegray input[type=checkbox]:checked+.checkbox:after,.theme-bluegray .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#607d8b}.theme-bluegray label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-bluegray i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-bluegray label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-bluegray label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-bluegray label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-bluegray label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-bluegray label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-bluegray label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-bluegray input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-bluegray input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-bluegray input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-bluegray input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-bluegray input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-bluegray input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#607d8b;background-color:#607d8b}.theme-bluegray label.label-radio i.icon-form-radio:after,label.label-radio.theme-bluegray i.icon-form-radio:after{background-color:#607d8b}.theme-bluegray label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-bluegray label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-bluegray label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-bluegray label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-bluegray label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-bluegray label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-bluegray input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-bluegray input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-bluegray input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-bluegray input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-bluegray input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-bluegray input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#607d8b}.theme-bluegray label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-bluegray label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-bluegray label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-bluegray label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-bluegray label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-bluegray label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-bluegray input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-bluegray input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-bluegray input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-bluegray input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-bluegray input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-bluegray input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#607d8b}.form-checkbox.theme-bluegray input[type=checkbox]:checked~i,.theme-bluegray .form-checkbox input[type=checkbox]:checked~i{border-color:#607d8b;background-color:#607d8b}.form-radio.theme-bluegray input[type=radio]:checked~i,.theme-bluegray .form-radio input[type=radio]:checked~i{border-color:#607d8b}.form-radio.theme-bluegray input[type=radio]:checked~i:after,.theme-bluegray .form-radio input[type=radio]:checked~i:after{background-color:#607d8b}.theme-bluegray .form-checkbox .ripple-wave,.theme-bluegray .form-radio .ripple-wave{background:rgba(96,125,139,.5)}.theme-bluegray .focus-state .floating-label,.theme-bluegray .focus-state .label{color:#607d8b}.theme-bluegray .input-field.focus-state:after,.theme-bluegray .input-field.not-empty-state:after,.theme-bluegray .item-input-field.focus-state:after,.theme-bluegray .item-input-field.not-empty-state:after{background:#607d8b}.theme-bluegray .picker-calendar-day.picker-calendar-day-today span{color:#607d8b}.theme-bluegray .picker-calendar-day.picker-calendar-day-selected span{background-color:#607d8b;color:#fff}.theme-bluegray .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#607d8b}.theme-bluegray .picker-header{background-color:#607d8b}.theme-bluegray .modal-button{color:#607d8b}.theme-bluegray .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-bluegray .timeline-item-date{background-color:#607d8b}.theme-bluegray .timeline-month-title,.theme-bluegray .timeline-year-title{background-color:#607d8b}.theme-bluegray .statusbar-overlay{background-color:#263238}.data-table.theme-bluegray .data-table-header-selected,.theme-bluegray .data-table .data-table-header-selected{background:rgba(96,125,139,.1)}.data-table.theme-bluegray .data-table-title-selected,.theme-bluegray .data-table .data-table-title-selected{color:#607d8b}.swiper-pagination.color-bluegray .swiper-pagination-bullet-active,.theme-bluegray .swiper-pagination .swiper-pagination-bullet-active{background-color:#607d8b}.swiper-pagination.color-bluegray .swiper-pagination-progressbar,.theme-bluegray .swiper-pagination .swiper-pagination-progressbar{background-color:#607d8b}.swiper-pagination.swiper-pagination-progress.bg-bluegray{background-color:rgba(96,125,139,.25)}.swiper-button-next.color-bluegray,.swiper-container-rtl .swiper-button-prev.color-bluegray,.theme-bluegray .swiper-button-next,.theme-bluegray .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-bluegray,.swiper-container-rtl .swiper-button-next.color-bluegray,.theme-bluegray .swiper-button-prev,.theme-bluegray .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-bluegray,.speed-dial-buttons a.theme-bluegray,.theme-bluegray .floating-button,.theme-bluegray .speed-dial-buttons a{color:#fff;background:#607d8b}.floating-button.theme-bluegray.active-state,.speed-dial-buttons a.theme-bluegray.active-state,.theme-bluegray .floating-button.active-state,.theme-bluegray .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-bluegray:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-bluegray:active,html:not(.watch-active-state) .theme-bluegray .floating-button:active,html:not(.watch-active-state) .theme-bluegray .speed-dial-buttons a:active{background:#455a64}.floating-button.theme-bluegray i,.speed-dial-buttons a.theme-bluegray i,.theme-bluegray .floating-button i,.theme-bluegray .speed-dial-buttons a i{color:inherit}.range-slider.theme-bluegray input[type=range]::-webkit-slider-thumb:before,.theme-bluegray .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#607d8b}.range-slider.theme-bluegray input[type=range]::-webkit-slider-thumb,.theme-bluegray .range-slider input[type=range]::-webkit-slider-thumb{background-color:#607d8b}.range-slider.theme-bluegray input[type=range]::-ms-thumb,.theme-bluegray .range-slider input[type=range]::-ms-thumb{background-color:#607d8b}.range-slider.theme-bluegray input[type=range]::-ms-fill-lower,.theme-bluegray .range-slider input[type=range]::-ms-fill-lower{background-color:#607d8b}.range-slider.theme-bluegray input[type=range]::-moz-range-thumb,.theme-bluegray .range-slider input[type=range]::-moz-range-thumb{background-color:#607d8b}.badge.theme-bluegray{background-color:#607d8b;color:#fff}.theme-white .button:not(.button-fill){color:#fff}.theme-white .navbar .button:not(.button-fill),.theme-white .subnavbar .button:not(.button-fill),.theme-white .toolbar .button:not(.button-fill),.theme-white.navbar .button:not(.button-fill),.theme-white.subnavbar .button:not(.button-fill),.theme-white.toolbar .button:not(.button-fill){color:#fff}.theme-white .button.button-fill{background:#fff;color:#fff}.theme-white .button.button-fill.active-state,html:not(.watch-active-state) .theme-white .button.button-fill:active{background:rgba(0,0,0,.1)}.progressbar.theme-white,.theme-white .progressbar{background-color:rgba(255,255,255,.5)}.progressbar.theme-white span,.theme-white .progressbar span{background-color:#fff}.progressbar-infinite.theme-white,.theme-white .progressbar-infinite{background-color:rgba(255,255,255,.5)}.progressbar-infinite.theme-white:after,.progressbar-infinite.theme-white:before,.theme-white .progressbar-infinite:after,.theme-white .progressbar-infinite:before{background-color:#fff}.color-white i.icon,i.icon.color-white{color:#fff}i.icon-next.color-white,i.icon-next.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-white,i.icon-prev.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-white,i.icon-back.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-white,i.icon-forward.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-white,i.icon-bars.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.theme-white .card a,.theme-white a{color:#fff}.navbar.theme-white,.searchbar.theme-white,.subnavbar.theme-white,.theme-white .navbar,.theme-white .searchbar,.theme-white .subnavbar,.theme-white .toolbar,.toolbar.theme-white{background-color:#fff}.label-switch.theme-white input[type=checkbox]:checked+.checkbox,.theme-white .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(255,255,255,.5)}.label-switch.theme-white input[type=checkbox]:checked+.checkbox:after,.theme-white .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#fff}.theme-white label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-white i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-white label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-white label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-white label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-white label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-white label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-white label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-white input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-white input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-white input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-white input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-white input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-white input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#fff;background-color:#fff}.theme-white label.label-radio i.icon-form-radio:after,label.label-radio.theme-white i.icon-form-radio:after{background-color:#fff}.theme-white label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-white label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-white label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-white label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-white label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-white label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-white input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-white input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-white input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-white input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-white input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-white input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#fff}.theme-white label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-white label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-white label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-white label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-white label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-white label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-white input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-white input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-white input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-white input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-white input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-white input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#fff}.form-checkbox.theme-white input[type=checkbox]:checked~i,.theme-white .form-checkbox input[type=checkbox]:checked~i{border-color:#fff;background-color:#fff}.form-radio.theme-white input[type=radio]:checked~i,.theme-white .form-radio input[type=radio]:checked~i{border-color:#fff}.form-radio.theme-white input[type=radio]:checked~i:after,.theme-white .form-radio input[type=radio]:checked~i:after{background-color:#fff}.theme-white .form-checkbox .ripple-wave,.theme-white .form-radio .ripple-wave{background:rgba(255,255,255,.5)}.theme-white .focus-state .floating-label,.theme-white .focus-state .label{color:#fff}.theme-white .input-field.focus-state:after,.theme-white .input-field.not-empty-state:after,.theme-white .item-input-field.focus-state:after,.theme-white .item-input-field.not-empty-state:after{background:#fff}.theme-white .picker-calendar-day.picker-calendar-day-today span{color:#fff}.theme-white .picker-calendar-day.picker-calendar-day-selected span{background-color:#fff;color:#fff}.theme-white .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#fff}.theme-white .picker-header{background-color:#fff}.theme-white .modal-button{color:#fff}.theme-white .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-white .timeline-item-date{background-color:#fff}.theme-white .timeline-month-title,.theme-white .timeline-year-title{background-color:#fff}.theme-white .statusbar-overlay{background-color:#fff}.data-table.theme-white .data-table-header-selected,.theme-white .data-table .data-table-header-selected{background:rgba(255,255,255,.1)}.data-table.theme-white .data-table-title-selected,.theme-white .data-table .data-table-title-selected{color:#fff}.swiper-pagination.color-white .swiper-pagination-bullet-active,.theme-white .swiper-pagination .swiper-pagination-bullet-active{background-color:#fff}.swiper-pagination.color-white .swiper-pagination-progressbar,.theme-white .swiper-pagination .swiper-pagination-progressbar{background-color:#fff}.swiper-pagination.swiper-pagination-progress.bg-white{background-color:rgba(255,255,255,.25)}.swiper-button-next.color-white,.swiper-container-rtl .swiper-button-prev.color-white,.theme-white .swiper-button-next,.theme-white .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-white,.swiper-container-rtl .swiper-button-next.color-white,.theme-white .swiper-button-prev,.theme-white .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-white,.speed-dial-buttons a.theme-white,.theme-white .floating-button,.theme-white .speed-dial-buttons a{color:#fff;background:#fff}.floating-button.theme-white.active-state,.speed-dial-buttons a.theme-white.active-state,.theme-white .floating-button.active-state,.theme-white .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-white:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-white:active,html:not(.watch-active-state) .theme-white .floating-button:active,html:not(.watch-active-state) .theme-white .speed-dial-buttons a:active{background:rgba(0,0,0,.1)}.floating-button.theme-white i,.speed-dial-buttons a.theme-white i,.theme-white .floating-button i,.theme-white .speed-dial-buttons a i{color:inherit}.range-slider.theme-white input[type=range]::-webkit-slider-thumb:before,.theme-white .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#fff}.range-slider.theme-white input[type=range]::-webkit-slider-thumb,.theme-white .range-slider input[type=range]::-webkit-slider-thumb{background-color:#fff}.range-slider.theme-white input[type=range]::-ms-thumb,.theme-white .range-slider input[type=range]::-ms-thumb{background-color:#fff}.range-slider.theme-white input[type=range]::-ms-fill-lower,.theme-white .range-slider input[type=range]::-ms-fill-lower{background-color:#fff}.range-slider.theme-white input[type=range]::-moz-range-thumb,.theme-white .range-slider input[type=range]::-moz-range-thumb{background-color:#fff}.badge.theme-white{background-color:#fff;color:#fff}.theme-black .button:not(.button-fill){color:#000}.theme-black .navbar .button:not(.button-fill),.theme-black .subnavbar .button:not(.button-fill),.theme-black .toolbar .button:not(.button-fill),.theme-black.navbar .button:not(.button-fill),.theme-black.subnavbar .button:not(.button-fill),.theme-black.toolbar .button:not(.button-fill){color:#fff}.theme-black .button.button-fill{background:#000;color:#fff}.theme-black .button.button-fill.active-state,html:not(.watch-active-state) .theme-black .button.button-fill:active{background:#333}.progressbar.theme-black,.theme-black .progressbar{background-color:rgba(0,0,0,.5)}.progressbar.theme-black span,.theme-black .progressbar span{background-color:#000}.progressbar-infinite.theme-black,.theme-black .progressbar-infinite{background-color:rgba(0,0,0,.5)}.progressbar-infinite.theme-black:after,.progressbar-infinite.theme-black:before,.theme-black .progressbar-infinite:after,.theme-black .progressbar-infinite:before{background-color:#000}.color-black i.icon,i.icon.color-black{color:#000}i.icon-next.color-black,i.icon-next.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23000000'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-black,i.icon-prev.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23000000'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-black,i.icon-back.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-black,i.icon-forward.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}i.icon-bars.color-black,i.icon-bars.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.theme-black .card a,.theme-black a{color:#000}.navbar.theme-black,.searchbar.theme-black,.subnavbar.theme-black,.theme-black .navbar,.theme-black .searchbar,.theme-black .subnavbar,.theme-black .toolbar,.toolbar.theme-black{background-color:#000}.label-switch.theme-black input[type=checkbox]:checked+.checkbox,.theme-black .label-switch input[type=checkbox]:checked+.checkbox{background-color:rgba(0,0,0,.5)}.label-switch.theme-black input[type=checkbox]:checked+.checkbox:after,.theme-black .label-switch input[type=checkbox]:checked+.checkbox:after{background-color:#000}.theme-black label.label-checkbox i.icon-form-checkbox:after,label.label-checkbox.theme-black i.icon-form-checkbox:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E")}.theme-black label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,.theme-black label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,.theme-black label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,.theme-black label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,.theme-black label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,.theme-black label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-black input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-black input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-black input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox.theme-black input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox.theme-black input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox.theme-black input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#000;background-color:#000}.theme-black label.label-radio i.icon-form-radio:after,label.label-radio.theme-black i.icon-form-radio:after{background-color:#000}.theme-black label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,.theme-black label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,.theme-black label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,.theme-black label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,.theme-black label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,.theme-black label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-black input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio.theme-black input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio.theme-black input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio.theme-black input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio.theme-black input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio.theme-black input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#000}.theme-black label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,.theme-black label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,.theme-black label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,.theme-black label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,.theme-black label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,.theme-black label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-black input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-black input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-black input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio.theme-black input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio.theme-black input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio.theme-black input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#000}.form-checkbox.theme-black input[type=checkbox]:checked~i,.theme-black .form-checkbox input[type=checkbox]:checked~i{border-color:#000;background-color:#000}.form-radio.theme-black input[type=radio]:checked~i,.theme-black .form-radio input[type=radio]:checked~i{border-color:#000}.form-radio.theme-black input[type=radio]:checked~i:after,.theme-black .form-radio input[type=radio]:checked~i:after{background-color:#000}.theme-black .form-checkbox .ripple-wave,.theme-black .form-radio .ripple-wave{background:rgba(0,0,0,.5)}.theme-black .focus-state .floating-label,.theme-black .focus-state .label{color:#000}.theme-black .input-field.focus-state:after,.theme-black .input-field.not-empty-state:after,.theme-black .item-input-field.focus-state:after,.theme-black .item-input-field.not-empty-state:after{background:#000}.theme-black .picker-calendar-day.picker-calendar-day-today span{color:#000}.theme-black .picker-calendar-day.picker-calendar-day-selected span{background-color:#000;color:#fff}.theme-black .picker-calendar-day.picker-calendar-day-has-events span:after{background-color:#000}.theme-black .picker-header{background-color:#000}.theme-black .modal-button{color:#000}.theme-black .timeline-horizontal .timeline-item-date,.timeline-horizontal.theme-black .timeline-item-date{background-color:#000}.theme-black .timeline-month-title,.theme-black .timeline-year-title{background-color:#000}.theme-black .statusbar-overlay{background-color:#000}.data-table.theme-black .data-table-header-selected,.theme-black .data-table .data-table-header-selected{background:rgba(0,0,0,.1)}.data-table.theme-black .data-table-title-selected,.theme-black .data-table .data-table-title-selected{color:#000}.swiper-pagination.color-black .swiper-pagination-bullet-active,.theme-black .swiper-pagination .swiper-pagination-bullet-active{background-color:#000}.swiper-pagination.color-black .swiper-pagination-progressbar,.theme-black .swiper-pagination .swiper-pagination-progressbar{background-color:#000}.swiper-pagination.swiper-pagination-progress.bg-black{background-color:rgba(0,0,0,.25)}.swiper-button-next.color-black,.swiper-container-rtl .swiper-button-prev.color-black,.theme-black .swiper-button-next,.theme-black .swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.color-black,.swiper-container-rtl .swiper-button-next.color-black,.theme-black .swiper-button-prev,.theme-black .swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.floating-button.theme-black,.speed-dial-buttons a.theme-black,.theme-black .floating-button,.theme-black .speed-dial-buttons a{color:#fff;background:#000}.floating-button.theme-black.active-state,.speed-dial-buttons a.theme-black.active-state,.theme-black .floating-button.active-state,.theme-black .speed-dial-buttons a.active-state,html:not(.watch-active-state) .floating-button.theme-black:active,html:not(.watch-active-state) .speed-dial-buttons a.theme-black:active,html:not(.watch-active-state) .theme-black .floating-button:active,html:not(.watch-active-state) .theme-black .speed-dial-buttons a:active{background:#333}.floating-button.theme-black i,.speed-dial-buttons a.theme-black i,.theme-black .floating-button i,.theme-black .speed-dial-buttons a i{color:inherit}.range-slider.theme-black input[type=range]::-webkit-slider-thumb:before,.theme-black .range-slider input[type=range]::-webkit-slider-thumb:before{background-color:#000}.range-slider.theme-black input[type=range]::-webkit-slider-thumb,.theme-black .range-slider input[type=range]::-webkit-slider-thumb{background-color:#000}.range-slider.theme-black input[type=range]::-ms-thumb,.theme-black .range-slider input[type=range]::-ms-thumb{background-color:#000}.range-slider.theme-black input[type=range]::-ms-fill-lower,.theme-black .range-slider input[type=range]::-ms-fill-lower{background-color:#000}.range-slider.theme-black input[type=range]::-moz-range-thumb,.theme-black .range-slider input[type=range]::-moz-range-thumb{background-color:#000}.badge.theme-black{background-color:#000;color:#fff}.color-red{color:#f44336}.list-block .item-link.color-red,.list-block .item-link.list-button.color-red,.list-button.color-red,.tabbar a.active.color-red,a.color-red{color:#f44336}.label-switch input[type=checkbox]:checked+.checkbox.color-red,.label-switch.color-red input[type=checkbox]:checked+.checkbox{background-color:#f44336}.button.color-red:not(.button-fill),.color-red.buttons-row .button:not(.button-fill){color:#f44336!important}.button.button-fill.bg-red,.button.button-fill.color-red{background:#f44336!important;color:#fff}.button.button-fill.bg-red.active-state,.button.button-fill.color-red.active-state,html:not(.watch-active-state) .button.button-fill.bg-red:active,html:not(.watch-active-state) .button.button-fill.color-red:active{background:#d32f2f!important}.progressbar.bg-red,.progressbar.color-red{background-color:rgba(244,67,54,.5)}.progressbar.bg-red span,.progressbar.color-red span{background-color:#f44336}.progressbar-infinite.bg-red,.progressbar-infinite.color-red{background-color:rgba(244,67,54,.5)}.progressbar-infinite.bg-red:after,.progressbar-infinite.bg-red:before,.progressbar-infinite.color-red:after,.progressbar-infinite.color-red:before{background-color:#f44336}.color-red i.icon,i.icon.color-red{color:#f44336}.preloader.color-red svg circle,.preloader.preloader-red svg circle{stroke:#f44336}.preloader.color-red .preloader-inner-gap,.preloader.color-red .preloader-inner-half-circle,.preloader.preloader-red .preloader-inner-gap,.preloader.preloader-red .preloader-inner-half-circle{border-color:#f44336}.bg-red,.list-block .swipeout-actions-left a.bg-red,.list-block .swipeout-actions-right a.bg-red,a.bg-red{background-color:#f44336}.list-block .bg-red .item-link.active-state,.list-block .item-link.bg-red.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-red.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-red.active-state,.list-block .item-linka.bg-red.active-state,.list-block .list-block .swipeout-actions-left a.bg-red .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-red .item-link.active-state,.list-block a.bg-red .item-link.active-state,.list-block.bg-red .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-red .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-red .item-link.active-state,.list-blocka.bg-red .item-link.active-state,html:not(.watch-active-state) .list-block .bg-red .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-red:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-red:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-red:active,html:not(.watch-active-state) .list-block .item-linka.bg-red:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-red .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-red .item-link:active,html:not(.watch-active-state) .list-block a.bg-red .item-link:active,html:not(.watch-active-state) .list-block.bg-red .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-red .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-red .item-link:active,html:not(.watch-active-state) .list-blocka.bg-red .item-link:active{background:#d32f2f}.border-red{border-color:#f44336}.border-red:after,.border-red:before,.list-block .border-red.item-inner:after,.list-block .border-red.item-inner:before,.list-block ul.border-red:after,.list-block ul.border-red:before{background-color:#f44336}.floating-button.bg-red,.floating-button.color-red,.speed-dial-buttons a.bg-red,.speed-dial-buttons a.color-red{color:#fff;background:#f44336}.floating-button.bg-red.active-state,.floating-button.color-red.active-state,.speed-dial-buttons a.bg-red.active-state,.speed-dial-buttons a.color-red.active-state,html:not(.watch-active-state) .floating-button.bg-red:active,html:not(.watch-active-state) .floating-button.color-red:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-red:active,html:not(.watch-active-state) .speed-dial-buttons a.color-red:active{background:#d32f2f}.floating-button.bg-red i,.floating-button.color-red i,.speed-dial-buttons a.bg-red i,.speed-dial-buttons a.color-red i{color:inherit}.ripple-red .ripple-wave{background-color:rgba(244,67,54,.3)}.range-slider.color-red input[type=range]::-webkit-slider-thumb:before{background-color:#f44336}.range-slider.color-red input[type=range]::-webkit-slider-thumb{background-color:#f44336}.range-slider.color-red input[type=range]::-ms-thumb{background-color:#f44336}.range-slider.color-red input[type=range]::-ms-fill-lower{background-color:#f44336}.range-slider.color-red input[type=range]::-moz-range-thumb{background-color:#f44336}.badge.color-red{background-color:#f44336;color:#fff}.color-pink{color:#e91e63}.list-block .item-link.color-pink,.list-block .item-link.list-button.color-pink,.list-button.color-pink,.tabbar a.active.color-pink,a.color-pink{color:#e91e63}.label-switch input[type=checkbox]:checked+.checkbox.color-pink,.label-switch.color-pink input[type=checkbox]:checked+.checkbox{background-color:#e91e63}.button.color-pink:not(.button-fill),.color-pink.buttons-row .button:not(.button-fill){color:#e91e63!important}.button.button-fill.bg-pink,.button.button-fill.color-pink{background:#e91e63!important;color:#fff}.button.button-fill.bg-pink.active-state,.button.button-fill.color-pink.active-state,html:not(.watch-active-state) .button.button-fill.bg-pink:active,html:not(.watch-active-state) .button.button-fill.color-pink:active{background:#c2185b!important}.progressbar.bg-pink,.progressbar.color-pink{background-color:rgba(233,30,99,.5)}.progressbar.bg-pink span,.progressbar.color-pink span{background-color:#e91e63}.progressbar-infinite.bg-pink,.progressbar-infinite.color-pink{background-color:rgba(233,30,99,.5)}.progressbar-infinite.bg-pink:after,.progressbar-infinite.bg-pink:before,.progressbar-infinite.color-pink:after,.progressbar-infinite.color-pink:before{background-color:#e91e63}.color-pink i.icon,i.icon.color-pink{color:#e91e63}.preloader.color-pink svg circle,.preloader.preloader-pink svg circle{stroke:#e91e63}.preloader.color-pink .preloader-inner-gap,.preloader.color-pink .preloader-inner-half-circle,.preloader.preloader-pink .preloader-inner-gap,.preloader.preloader-pink .preloader-inner-half-circle{border-color:#e91e63}.bg-pink,.list-block .swipeout-actions-left a.bg-pink,.list-block .swipeout-actions-right a.bg-pink,a.bg-pink{background-color:#e91e63}.list-block .bg-pink .item-link.active-state,.list-block .item-link.bg-pink.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-pink.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-pink.active-state,.list-block .item-linka.bg-pink.active-state,.list-block .list-block .swipeout-actions-left a.bg-pink .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-pink .item-link.active-state,.list-block a.bg-pink .item-link.active-state,.list-block.bg-pink .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-pink .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-pink .item-link.active-state,.list-blocka.bg-pink .item-link.active-state,html:not(.watch-active-state) .list-block .bg-pink .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-pink:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-pink:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-pink:active,html:not(.watch-active-state) .list-block .item-linka.bg-pink:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-pink .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-pink .item-link:active,html:not(.watch-active-state) .list-block a.bg-pink .item-link:active,html:not(.watch-active-state) .list-block.bg-pink .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-pink .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-pink .item-link:active,html:not(.watch-active-state) .list-blocka.bg-pink .item-link:active{background:#c2185b}.border-pink{border-color:#e91e63}.border-pink:after,.border-pink:before,.list-block .border-pink.item-inner:after,.list-block .border-pink.item-inner:before,.list-block ul.border-pink:after,.list-block ul.border-pink:before{background-color:#e91e63}.floating-button.bg-pink,.floating-button.color-pink,.speed-dial-buttons a.bg-pink,.speed-dial-buttons a.color-pink{color:#fff;background:#e91e63}.floating-button.bg-pink.active-state,.floating-button.color-pink.active-state,.speed-dial-buttons a.bg-pink.active-state,.speed-dial-buttons a.color-pink.active-state,html:not(.watch-active-state) .floating-button.bg-pink:active,html:not(.watch-active-state) .floating-button.color-pink:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-pink:active,html:not(.watch-active-state) .speed-dial-buttons a.color-pink:active{background:#c2185b}.floating-button.bg-pink i,.floating-button.color-pink i,.speed-dial-buttons a.bg-pink i,.speed-dial-buttons a.color-pink i{color:inherit}.ripple-pink .ripple-wave{background-color:rgba(233,30,99,.3)}.range-slider.color-pink input[type=range]::-webkit-slider-thumb:before{background-color:#e91e63}.range-slider.color-pink input[type=range]::-webkit-slider-thumb{background-color:#e91e63}.range-slider.color-pink input[type=range]::-ms-thumb{background-color:#e91e63}.range-slider.color-pink input[type=range]::-ms-fill-lower{background-color:#e91e63}.range-slider.color-pink input[type=range]::-moz-range-thumb{background-color:#e91e63}.badge.color-pink{background-color:#e91e63;color:#fff}.color-purple{color:#9c27b0}.list-block .item-link.color-purple,.list-block .item-link.list-button.color-purple,.list-button.color-purple,.tabbar a.active.color-purple,a.color-purple{color:#9c27b0}.label-switch input[type=checkbox]:checked+.checkbox.color-purple,.label-switch.color-purple input[type=checkbox]:checked+.checkbox{background-color:#9c27b0}.button.color-purple:not(.button-fill),.color-purple.buttons-row .button:not(.button-fill){color:#9c27b0!important}.button.button-fill.bg-purple,.button.button-fill.color-purple{background:#9c27b0!important;color:#fff}.button.button-fill.bg-purple.active-state,.button.button-fill.color-purple.active-state,html:not(.watch-active-state) .button.button-fill.bg-purple:active,html:not(.watch-active-state) .button.button-fill.color-purple:active{background:#7b1fa2!important}.progressbar.bg-purple,.progressbar.color-purple{background-color:rgba(156,39,176,.5)}.progressbar.bg-purple span,.progressbar.color-purple span{background-color:#9c27b0}.progressbar-infinite.bg-purple,.progressbar-infinite.color-purple{background-color:rgba(156,39,176,.5)}.progressbar-infinite.bg-purple:after,.progressbar-infinite.bg-purple:before,.progressbar-infinite.color-purple:after,.progressbar-infinite.color-purple:before{background-color:#9c27b0}.color-purple i.icon,i.icon.color-purple{color:#9c27b0}.preloader.color-purple svg circle,.preloader.preloader-purple svg circle{stroke:#9c27b0}.preloader.color-purple .preloader-inner-gap,.preloader.color-purple .preloader-inner-half-circle,.preloader.preloader-purple .preloader-inner-gap,.preloader.preloader-purple .preloader-inner-half-circle{border-color:#9c27b0}.bg-purple,.list-block .swipeout-actions-left a.bg-purple,.list-block .swipeout-actions-right a.bg-purple,a.bg-purple{background-color:#9c27b0}.list-block .bg-purple .item-link.active-state,.list-block .item-link.bg-purple.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-purple.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-purple.active-state,.list-block .item-linka.bg-purple.active-state,.list-block .list-block .swipeout-actions-left a.bg-purple .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-purple .item-link.active-state,.list-block a.bg-purple .item-link.active-state,.list-block.bg-purple .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-purple .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-purple .item-link.active-state,.list-blocka.bg-purple .item-link.active-state,html:not(.watch-active-state) .list-block .bg-purple .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-purple:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-purple:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-purple:active,html:not(.watch-active-state) .list-block .item-linka.bg-purple:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-purple .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-purple .item-link:active,html:not(.watch-active-state) .list-block a.bg-purple .item-link:active,html:not(.watch-active-state) .list-block.bg-purple .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-purple .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-purple .item-link:active,html:not(.watch-active-state) .list-blocka.bg-purple .item-link:active{background:#7b1fa2}.border-purple{border-color:#9c27b0}.border-purple:after,.border-purple:before,.list-block .border-purple.item-inner:after,.list-block .border-purple.item-inner:before,.list-block ul.border-purple:after,.list-block ul.border-purple:before{background-color:#9c27b0}.floating-button.bg-purple,.floating-button.color-purple,.speed-dial-buttons a.bg-purple,.speed-dial-buttons a.color-purple{color:#fff;background:#9c27b0}.floating-button.bg-purple.active-state,.floating-button.color-purple.active-state,.speed-dial-buttons a.bg-purple.active-state,.speed-dial-buttons a.color-purple.active-state,html:not(.watch-active-state) .floating-button.bg-purple:active,html:not(.watch-active-state) .floating-button.color-purple:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-purple:active,html:not(.watch-active-state) .speed-dial-buttons a.color-purple:active{background:#7b1fa2}.floating-button.bg-purple i,.floating-button.color-purple i,.speed-dial-buttons a.bg-purple i,.speed-dial-buttons a.color-purple i{color:inherit}.ripple-purple .ripple-wave{background-color:rgba(156,39,176,.3)}.range-slider.color-purple input[type=range]::-webkit-slider-thumb:before{background-color:#9c27b0}.range-slider.color-purple input[type=range]::-webkit-slider-thumb{background-color:#9c27b0}.range-slider.color-purple input[type=range]::-ms-thumb{background-color:#9c27b0}.range-slider.color-purple input[type=range]::-ms-fill-lower{background-color:#9c27b0}.range-slider.color-purple input[type=range]::-moz-range-thumb{background-color:#9c27b0}.badge.color-purple{background-color:#9c27b0;color:#fff}.color-deeppurple{color:#673ab7}.list-block .item-link.color-deeppurple,.list-block .item-link.list-button.color-deeppurple,.list-button.color-deeppurple,.tabbar a.active.color-deeppurple,a.color-deeppurple{color:#673ab7}.label-switch input[type=checkbox]:checked+.checkbox.color-deeppurple,.label-switch.color-deeppurple input[type=checkbox]:checked+.checkbox{background-color:#673ab7}.button.color-deeppurple:not(.button-fill),.color-deeppurple.buttons-row .button:not(.button-fill){color:#673ab7!important}.button.button-fill.bg-deeppurple,.button.button-fill.color-deeppurple{background:#673ab7!important;color:#fff}.button.button-fill.bg-deeppurple.active-state,.button.button-fill.color-deeppurple.active-state,html:not(.watch-active-state) .button.button-fill.bg-deeppurple:active,html:not(.watch-active-state) .button.button-fill.color-deeppurple:active{background:#512da8!important}.progressbar.bg-deeppurple,.progressbar.color-deeppurple{background-color:rgba(103,58,183,.5)}.progressbar.bg-deeppurple span,.progressbar.color-deeppurple span{background-color:#673ab7}.progressbar-infinite.bg-deeppurple,.progressbar-infinite.color-deeppurple{background-color:rgba(103,58,183,.5)}.progressbar-infinite.bg-deeppurple:after,.progressbar-infinite.bg-deeppurple:before,.progressbar-infinite.color-deeppurple:after,.progressbar-infinite.color-deeppurple:before{background-color:#673ab7}.color-deeppurple i.icon,i.icon.color-deeppurple{color:#673ab7}.preloader.color-deeppurple svg circle,.preloader.preloader-deeppurple svg circle{stroke:#673ab7}.preloader.color-deeppurple .preloader-inner-gap,.preloader.color-deeppurple .preloader-inner-half-circle,.preloader.preloader-deeppurple .preloader-inner-gap,.preloader.preloader-deeppurple .preloader-inner-half-circle{border-color:#673ab7}.bg-deeppurple,.list-block .swipeout-actions-left a.bg-deeppurple,.list-block .swipeout-actions-right a.bg-deeppurple,a.bg-deeppurple{background-color:#673ab7}.list-block .bg-deeppurple .item-link.active-state,.list-block .item-link.bg-deeppurple.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-deeppurple.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-deeppurple.active-state,.list-block .item-linka.bg-deeppurple.active-state,.list-block .list-block .swipeout-actions-left a.bg-deeppurple .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-deeppurple .item-link.active-state,.list-block a.bg-deeppurple .item-link.active-state,.list-block.bg-deeppurple .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-deeppurple .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-deeppurple .item-link.active-state,.list-blocka.bg-deeppurple .item-link.active-state,html:not(.watch-active-state) .list-block .bg-deeppurple .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-deeppurple:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-deeppurple:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-deeppurple:active,html:not(.watch-active-state) .list-block .item-linka.bg-deeppurple:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-deeppurple .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-deeppurple .item-link:active,html:not(.watch-active-state) .list-block a.bg-deeppurple .item-link:active,html:not(.watch-active-state) .list-block.bg-deeppurple .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-deeppurple .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-deeppurple .item-link:active,html:not(.watch-active-state) .list-blocka.bg-deeppurple .item-link:active{background:#512da8}.border-deeppurple{border-color:#673ab7}.border-deeppurple:after,.border-deeppurple:before,.list-block .border-deeppurple.item-inner:after,.list-block .border-deeppurple.item-inner:before,.list-block ul.border-deeppurple:after,.list-block ul.border-deeppurple:before{background-color:#673ab7}.floating-button.bg-deeppurple,.floating-button.color-deeppurple,.speed-dial-buttons a.bg-deeppurple,.speed-dial-buttons a.color-deeppurple{color:#fff;background:#673ab7}.floating-button.bg-deeppurple.active-state,.floating-button.color-deeppurple.active-state,.speed-dial-buttons a.bg-deeppurple.active-state,.speed-dial-buttons a.color-deeppurple.active-state,html:not(.watch-active-state) .floating-button.bg-deeppurple:active,html:not(.watch-active-state) .floating-button.color-deeppurple:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-deeppurple:active,html:not(.watch-active-state) .speed-dial-buttons a.color-deeppurple:active{background:#512da8}.floating-button.bg-deeppurple i,.floating-button.color-deeppurple i,.speed-dial-buttons a.bg-deeppurple i,.speed-dial-buttons a.color-deeppurple i{color:inherit}.ripple-deeppurple .ripple-wave{background-color:rgba(103,58,183,.3)}.range-slider.color-deeppurple input[type=range]::-webkit-slider-thumb:before{background-color:#673ab7}.range-slider.color-deeppurple input[type=range]::-webkit-slider-thumb{background-color:#673ab7}.range-slider.color-deeppurple input[type=range]::-ms-thumb{background-color:#673ab7}.range-slider.color-deeppurple input[type=range]::-ms-fill-lower{background-color:#673ab7}.range-slider.color-deeppurple input[type=range]::-moz-range-thumb{background-color:#673ab7}.badge.color-deeppurple{background-color:#673ab7;color:#fff}.color-indigo{color:#3f51b5}.list-block .item-link.color-indigo,.list-block .item-link.list-button.color-indigo,.list-button.color-indigo,.tabbar a.active.color-indigo,a.color-indigo{color:#3f51b5}.label-switch input[type=checkbox]:checked+.checkbox.color-indigo,.label-switch.color-indigo input[type=checkbox]:checked+.checkbox{background-color:#3f51b5}.button.color-indigo:not(.button-fill),.color-indigo.buttons-row .button:not(.button-fill){color:#3f51b5!important}.button.button-fill.bg-indigo,.button.button-fill.color-indigo{background:#3f51b5!important;color:#fff}.button.button-fill.bg-indigo.active-state,.button.button-fill.color-indigo.active-state,html:not(.watch-active-state) .button.button-fill.bg-indigo:active,html:not(.watch-active-state) .button.button-fill.color-indigo:active{background:#303f9f!important}.progressbar.bg-indigo,.progressbar.color-indigo{background-color:rgba(63,81,181,.5)}.progressbar.bg-indigo span,.progressbar.color-indigo span{background-color:#3f51b5}.progressbar-infinite.bg-indigo,.progressbar-infinite.color-indigo{background-color:rgba(63,81,181,.5)}.progressbar-infinite.bg-indigo:after,.progressbar-infinite.bg-indigo:before,.progressbar-infinite.color-indigo:after,.progressbar-infinite.color-indigo:before{background-color:#3f51b5}.color-indigo i.icon,i.icon.color-indigo{color:#3f51b5}.preloader.color-indigo svg circle,.preloader.preloader-indigo svg circle{stroke:#3f51b5}.preloader.color-indigo .preloader-inner-gap,.preloader.color-indigo .preloader-inner-half-circle,.preloader.preloader-indigo .preloader-inner-gap,.preloader.preloader-indigo .preloader-inner-half-circle{border-color:#3f51b5}.bg-indigo,.list-block .swipeout-actions-left a.bg-indigo,.list-block .swipeout-actions-right a.bg-indigo,a.bg-indigo{background-color:#3f51b5}.list-block .bg-indigo .item-link.active-state,.list-block .item-link.bg-indigo.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-indigo.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-indigo.active-state,.list-block .item-linka.bg-indigo.active-state,.list-block .list-block .swipeout-actions-left a.bg-indigo .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-indigo .item-link.active-state,.list-block a.bg-indigo .item-link.active-state,.list-block.bg-indigo .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-indigo .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-indigo .item-link.active-state,.list-blocka.bg-indigo .item-link.active-state,html:not(.watch-active-state) .list-block .bg-indigo .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-indigo:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-indigo:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-indigo:active,html:not(.watch-active-state) .list-block .item-linka.bg-indigo:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-indigo .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-indigo .item-link:active,html:not(.watch-active-state) .list-block a.bg-indigo .item-link:active,html:not(.watch-active-state) .list-block.bg-indigo .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-indigo .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-indigo .item-link:active,html:not(.watch-active-state) .list-blocka.bg-indigo .item-link:active{background:#303f9f}.border-indigo{border-color:#3f51b5}.border-indigo:after,.border-indigo:before,.list-block .border-indigo.item-inner:after,.list-block .border-indigo.item-inner:before,.list-block ul.border-indigo:after,.list-block ul.border-indigo:before{background-color:#3f51b5}.floating-button.bg-indigo,.floating-button.color-indigo,.speed-dial-buttons a.bg-indigo,.speed-dial-buttons a.color-indigo{color:#fff;background:#3f51b5}.floating-button.bg-indigo.active-state,.floating-button.color-indigo.active-state,.speed-dial-buttons a.bg-indigo.active-state,.speed-dial-buttons a.color-indigo.active-state,html:not(.watch-active-state) .floating-button.bg-indigo:active,html:not(.watch-active-state) .floating-button.color-indigo:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-indigo:active,html:not(.watch-active-state) .speed-dial-buttons a.color-indigo:active{background:#303f9f}.floating-button.bg-indigo i,.floating-button.color-indigo i,.speed-dial-buttons a.bg-indigo i,.speed-dial-buttons a.color-indigo i{color:inherit}.ripple-indigo .ripple-wave{background-color:rgba(63,81,181,.3)}.range-slider.color-indigo input[type=range]::-webkit-slider-thumb:before{background-color:#3f51b5}.range-slider.color-indigo input[type=range]::-webkit-slider-thumb{background-color:#3f51b5}.range-slider.color-indigo input[type=range]::-ms-thumb{background-color:#3f51b5}.range-slider.color-indigo input[type=range]::-ms-fill-lower{background-color:#3f51b5}.range-slider.color-indigo input[type=range]::-moz-range-thumb{background-color:#3f51b5}.badge.color-indigo{background-color:#3f51b5;color:#fff}.color-blue{color:#2196f3}.list-block .item-link.color-blue,.list-block .item-link.list-button.color-blue,.list-button.color-blue,.tabbar a.active.color-blue,a.color-blue{color:#2196f3}.label-switch input[type=checkbox]:checked+.checkbox.color-blue,.label-switch.color-blue input[type=checkbox]:checked+.checkbox{background-color:#2196f3}.button.color-blue:not(.button-fill),.color-blue.buttons-row .button:not(.button-fill){color:#2196f3!important}.button.button-fill.bg-blue,.button.button-fill.color-blue{background:#2196f3!important;color:#fff}.button.button-fill.bg-blue.active-state,.button.button-fill.color-blue.active-state,html:not(.watch-active-state) .button.button-fill.bg-blue:active,html:not(.watch-active-state) .button.button-fill.color-blue:active{background:#1976d2!important}.progressbar.bg-blue,.progressbar.color-blue{background-color:rgba(33,150,243,.5)}.progressbar.bg-blue span,.progressbar.color-blue span{background-color:#2196f3}.progressbar-infinite.bg-blue,.progressbar-infinite.color-blue{background-color:rgba(33,150,243,.5)}.progressbar-infinite.bg-blue:after,.progressbar-infinite.bg-blue:before,.progressbar-infinite.color-blue:after,.progressbar-infinite.color-blue:before{background-color:#2196f3}.color-blue i.icon,i.icon.color-blue{color:#2196f3}.preloader.color-blue svg circle,.preloader.preloader-blue svg circle{stroke:#2196f3}.preloader.color-blue .preloader-inner-gap,.preloader.color-blue .preloader-inner-half-circle,.preloader.preloader-blue .preloader-inner-gap,.preloader.preloader-blue .preloader-inner-half-circle{border-color:#2196f3}.bg-blue,.list-block .swipeout-actions-left a.bg-blue,.list-block .swipeout-actions-right a.bg-blue,a.bg-blue{background-color:#2196f3}.list-block .bg-blue .item-link.active-state,.list-block .item-link.bg-blue.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-blue.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-blue.active-state,.list-block .item-linka.bg-blue.active-state,.list-block .list-block .swipeout-actions-left a.bg-blue .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-blue .item-link.active-state,.list-block a.bg-blue .item-link.active-state,.list-block.bg-blue .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-blue .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-blue .item-link.active-state,.list-blocka.bg-blue .item-link.active-state,html:not(.watch-active-state) .list-block .bg-blue .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-blue:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-blue:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-blue:active,html:not(.watch-active-state) .list-block .item-linka.bg-blue:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-blue .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-blue .item-link:active,html:not(.watch-active-state) .list-block a.bg-blue .item-link:active,html:not(.watch-active-state) .list-block.bg-blue .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-blue .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-blue .item-link:active,html:not(.watch-active-state) .list-blocka.bg-blue .item-link:active{background:#1976d2}.border-blue{border-color:#2196f3}.border-blue:after,.border-blue:before,.list-block .border-blue.item-inner:after,.list-block .border-blue.item-inner:before,.list-block ul.border-blue:after,.list-block ul.border-blue:before{background-color:#2196f3}.floating-button.bg-blue,.floating-button.color-blue,.speed-dial-buttons a.bg-blue,.speed-dial-buttons a.color-blue{color:#fff;background:#2196f3}.floating-button.bg-blue.active-state,.floating-button.color-blue.active-state,.speed-dial-buttons a.bg-blue.active-state,.speed-dial-buttons a.color-blue.active-state,html:not(.watch-active-state) .floating-button.bg-blue:active,html:not(.watch-active-state) .floating-button.color-blue:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-blue:active,html:not(.watch-active-state) .speed-dial-buttons a.color-blue:active{background:#1976d2}.floating-button.bg-blue i,.floating-button.color-blue i,.speed-dial-buttons a.bg-blue i,.speed-dial-buttons a.color-blue i{color:inherit}.ripple-blue .ripple-wave{background-color:rgba(33,150,243,.3)}.range-slider.color-blue input[type=range]::-webkit-slider-thumb:before{background-color:#2196f3}.range-slider.color-blue input[type=range]::-webkit-slider-thumb{background-color:#2196f3}.range-slider.color-blue input[type=range]::-ms-thumb{background-color:#2196f3}.range-slider.color-blue input[type=range]::-ms-fill-lower{background-color:#2196f3}.range-slider.color-blue input[type=range]::-moz-range-thumb{background-color:#2196f3}.badge.color-blue{background-color:#2196f3;color:#fff}.color-lightblue{color:#03a9f4}.list-block .item-link.color-lightblue,.list-block .item-link.list-button.color-lightblue,.list-button.color-lightblue,.tabbar a.active.color-lightblue,a.color-lightblue{color:#03a9f4}.label-switch input[type=checkbox]:checked+.checkbox.color-lightblue,.label-switch.color-lightblue input[type=checkbox]:checked+.checkbox{background-color:#03a9f4}.button.color-lightblue:not(.button-fill),.color-lightblue.buttons-row .button:not(.button-fill){color:#03a9f4!important}.button.button-fill.bg-lightblue,.button.button-fill.color-lightblue{background:#03a9f4!important;color:#fff}.button.button-fill.bg-lightblue.active-state,.button.button-fill.color-lightblue.active-state,html:not(.watch-active-state) .button.button-fill.bg-lightblue:active,html:not(.watch-active-state) .button.button-fill.color-lightblue:active{background:#0288d1!important}.progressbar.bg-lightblue,.progressbar.color-lightblue{background-color:rgba(3,169,244,.5)}.progressbar.bg-lightblue span,.progressbar.color-lightblue span{background-color:#03a9f4}.progressbar-infinite.bg-lightblue,.progressbar-infinite.color-lightblue{background-color:rgba(3,169,244,.5)}.progressbar-infinite.bg-lightblue:after,.progressbar-infinite.bg-lightblue:before,.progressbar-infinite.color-lightblue:after,.progressbar-infinite.color-lightblue:before{background-color:#03a9f4}.color-lightblue i.icon,i.icon.color-lightblue{color:#03a9f4}.preloader.color-lightblue svg circle,.preloader.preloader-lightblue svg circle{stroke:#03a9f4}.preloader.color-lightblue .preloader-inner-gap,.preloader.color-lightblue .preloader-inner-half-circle,.preloader.preloader-lightblue .preloader-inner-gap,.preloader.preloader-lightblue .preloader-inner-half-circle{border-color:#03a9f4}.bg-lightblue,.list-block .swipeout-actions-left a.bg-lightblue,.list-block .swipeout-actions-right a.bg-lightblue,a.bg-lightblue{background-color:#03a9f4}.list-block .bg-lightblue .item-link.active-state,.list-block .item-link.bg-lightblue.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-lightblue.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-lightblue.active-state,.list-block .item-linka.bg-lightblue.active-state,.list-block .list-block .swipeout-actions-left a.bg-lightblue .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-lightblue .item-link.active-state,.list-block a.bg-lightblue .item-link.active-state,.list-block.bg-lightblue .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-lightblue .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-lightblue .item-link.active-state,.list-blocka.bg-lightblue .item-link.active-state,html:not(.watch-active-state) .list-block .bg-lightblue .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-lightblue:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-lightblue:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-lightblue:active,html:not(.watch-active-state) .list-block .item-linka.bg-lightblue:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-lightblue .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-lightblue .item-link:active,html:not(.watch-active-state) .list-block a.bg-lightblue .item-link:active,html:not(.watch-active-state) .list-block.bg-lightblue .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-lightblue .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-lightblue .item-link:active,html:not(.watch-active-state) .list-blocka.bg-lightblue .item-link:active{background:#0288d1}.border-lightblue{border-color:#03a9f4}.border-lightblue:after,.border-lightblue:before,.list-block .border-lightblue.item-inner:after,.list-block .border-lightblue.item-inner:before,.list-block ul.border-lightblue:after,.list-block ul.border-lightblue:before{background-color:#03a9f4}.floating-button.bg-lightblue,.floating-button.color-lightblue,.speed-dial-buttons a.bg-lightblue,.speed-dial-buttons a.color-lightblue{color:#fff;background:#03a9f4}.floating-button.bg-lightblue.active-state,.floating-button.color-lightblue.active-state,.speed-dial-buttons a.bg-lightblue.active-state,.speed-dial-buttons a.color-lightblue.active-state,html:not(.watch-active-state) .floating-button.bg-lightblue:active,html:not(.watch-active-state) .floating-button.color-lightblue:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-lightblue:active,html:not(.watch-active-state) .speed-dial-buttons a.color-lightblue:active{background:#0288d1}.floating-button.bg-lightblue i,.floating-button.color-lightblue i,.speed-dial-buttons a.bg-lightblue i,.speed-dial-buttons a.color-lightblue i{color:inherit}.ripple-lightblue .ripple-wave{background-color:rgba(3,169,244,.3)}.range-slider.color-lightblue input[type=range]::-webkit-slider-thumb:before{background-color:#03a9f4}.range-slider.color-lightblue input[type=range]::-webkit-slider-thumb{background-color:#03a9f4}.range-slider.color-lightblue input[type=range]::-ms-thumb{background-color:#03a9f4}.range-slider.color-lightblue input[type=range]::-ms-fill-lower{background-color:#03a9f4}.range-slider.color-lightblue input[type=range]::-moz-range-thumb{background-color:#03a9f4}.badge.color-lightblue{background-color:#03a9f4;color:#fff}.color-cyan{color:#00bcd4}.list-block .item-link.color-cyan,.list-block .item-link.list-button.color-cyan,.list-button.color-cyan,.tabbar a.active.color-cyan,a.color-cyan{color:#00bcd4}.label-switch input[type=checkbox]:checked+.checkbox.color-cyan,.label-switch.color-cyan input[type=checkbox]:checked+.checkbox{background-color:#00bcd4}.button.color-cyan:not(.button-fill),.color-cyan.buttons-row .button:not(.button-fill){color:#00bcd4!important}.button.button-fill.bg-cyan,.button.button-fill.color-cyan{background:#00bcd4!important;color:#fff}.button.button-fill.bg-cyan.active-state,.button.button-fill.color-cyan.active-state,html:not(.watch-active-state) .button.button-fill.bg-cyan:active,html:not(.watch-active-state) .button.button-fill.color-cyan:active{background:#0097a7!important}.progressbar.bg-cyan,.progressbar.color-cyan{background-color:rgba(0,188,212,.5)}.progressbar.bg-cyan span,.progressbar.color-cyan span{background-color:#00bcd4}.progressbar-infinite.bg-cyan,.progressbar-infinite.color-cyan{background-color:rgba(0,188,212,.5)}.progressbar-infinite.bg-cyan:after,.progressbar-infinite.bg-cyan:before,.progressbar-infinite.color-cyan:after,.progressbar-infinite.color-cyan:before{background-color:#00bcd4}.color-cyan i.icon,i.icon.color-cyan{color:#00bcd4}.preloader.color-cyan svg circle,.preloader.preloader-cyan svg circle{stroke:#00bcd4}.preloader.color-cyan .preloader-inner-gap,.preloader.color-cyan .preloader-inner-half-circle,.preloader.preloader-cyan .preloader-inner-gap,.preloader.preloader-cyan .preloader-inner-half-circle{border-color:#00bcd4}.bg-cyan,.list-block .swipeout-actions-left a.bg-cyan,.list-block .swipeout-actions-right a.bg-cyan,a.bg-cyan{background-color:#00bcd4}.list-block .bg-cyan .item-link.active-state,.list-block .item-link.bg-cyan.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-cyan.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-cyan.active-state,.list-block .item-linka.bg-cyan.active-state,.list-block .list-block .swipeout-actions-left a.bg-cyan .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-cyan .item-link.active-state,.list-block a.bg-cyan .item-link.active-state,.list-block.bg-cyan .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-cyan .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-cyan .item-link.active-state,.list-blocka.bg-cyan .item-link.active-state,html:not(.watch-active-state) .list-block .bg-cyan .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-cyan:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-cyan:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-cyan:active,html:not(.watch-active-state) .list-block .item-linka.bg-cyan:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-cyan .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-cyan .item-link:active,html:not(.watch-active-state) .list-block a.bg-cyan .item-link:active,html:not(.watch-active-state) .list-block.bg-cyan .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-cyan .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-cyan .item-link:active,html:not(.watch-active-state) .list-blocka.bg-cyan .item-link:active{background:#0097a7}.border-cyan{border-color:#00bcd4}.border-cyan:after,.border-cyan:before,.list-block .border-cyan.item-inner:after,.list-block .border-cyan.item-inner:before,.list-block ul.border-cyan:after,.list-block ul.border-cyan:before{background-color:#00bcd4}.floating-button.bg-cyan,.floating-button.color-cyan,.speed-dial-buttons a.bg-cyan,.speed-dial-buttons a.color-cyan{color:#fff;background:#00bcd4}.floating-button.bg-cyan.active-state,.floating-button.color-cyan.active-state,.speed-dial-buttons a.bg-cyan.active-state,.speed-dial-buttons a.color-cyan.active-state,html:not(.watch-active-state) .floating-button.bg-cyan:active,html:not(.watch-active-state) .floating-button.color-cyan:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-cyan:active,html:not(.watch-active-state) .speed-dial-buttons a.color-cyan:active{background:#0097a7}.floating-button.bg-cyan i,.floating-button.color-cyan i,.speed-dial-buttons a.bg-cyan i,.speed-dial-buttons a.color-cyan i{color:inherit}.ripple-cyan .ripple-wave{background-color:rgba(0,188,212,.3)}.range-slider.color-cyan input[type=range]::-webkit-slider-thumb:before{background-color:#00bcd4}.range-slider.color-cyan input[type=range]::-webkit-slider-thumb{background-color:#00bcd4}.range-slider.color-cyan input[type=range]::-ms-thumb{background-color:#00bcd4}.range-slider.color-cyan input[type=range]::-ms-fill-lower{background-color:#00bcd4}.range-slider.color-cyan input[type=range]::-moz-range-thumb{background-color:#00bcd4}.badge.color-cyan{background-color:#00bcd4;color:#fff}.color-teal{color:#009688}.list-block .item-link.color-teal,.list-block .item-link.list-button.color-teal,.list-button.color-teal,.tabbar a.active.color-teal,a.color-teal{color:#009688}.label-switch input[type=checkbox]:checked+.checkbox.color-teal,.label-switch.color-teal input[type=checkbox]:checked+.checkbox{background-color:#009688}.button.color-teal:not(.button-fill),.color-teal.buttons-row .button:not(.button-fill){color:#009688!important}.button.button-fill.bg-teal,.button.button-fill.color-teal{background:#009688!important;color:#fff}.button.button-fill.bg-teal.active-state,.button.button-fill.color-teal.active-state,html:not(.watch-active-state) .button.button-fill.bg-teal:active,html:not(.watch-active-state) .button.button-fill.color-teal:active{background:#00897b!important}.progressbar.bg-teal,.progressbar.color-teal{background-color:rgba(0,150,136,.5)}.progressbar.bg-teal span,.progressbar.color-teal span{background-color:#009688}.progressbar-infinite.bg-teal,.progressbar-infinite.color-teal{background-color:rgba(0,150,136,.5)}.progressbar-infinite.bg-teal:after,.progressbar-infinite.bg-teal:before,.progressbar-infinite.color-teal:after,.progressbar-infinite.color-teal:before{background-color:#009688}.color-teal i.icon,i.icon.color-teal{color:#009688}.preloader.color-teal svg circle,.preloader.preloader-teal svg circle{stroke:#009688}.preloader.color-teal .preloader-inner-gap,.preloader.color-teal .preloader-inner-half-circle,.preloader.preloader-teal .preloader-inner-gap,.preloader.preloader-teal .preloader-inner-half-circle{border-color:#009688}.bg-teal,.list-block .swipeout-actions-left a.bg-teal,.list-block .swipeout-actions-right a.bg-teal,a.bg-teal{background-color:#009688}.list-block .bg-teal .item-link.active-state,.list-block .item-link.bg-teal.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-teal.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-teal.active-state,.list-block .item-linka.bg-teal.active-state,.list-block .list-block .swipeout-actions-left a.bg-teal .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-teal .item-link.active-state,.list-block a.bg-teal .item-link.active-state,.list-block.bg-teal .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-teal .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-teal .item-link.active-state,.list-blocka.bg-teal .item-link.active-state,html:not(.watch-active-state) .list-block .bg-teal .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-teal:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-teal:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-teal:active,html:not(.watch-active-state) .list-block .item-linka.bg-teal:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-teal .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-teal .item-link:active,html:not(.watch-active-state) .list-block a.bg-teal .item-link:active,html:not(.watch-active-state) .list-block.bg-teal .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-teal .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-teal .item-link:active,html:not(.watch-active-state) .list-blocka.bg-teal .item-link:active{background:#00897b}.border-teal{border-color:#009688}.border-teal:after,.border-teal:before,.list-block .border-teal.item-inner:after,.list-block .border-teal.item-inner:before,.list-block ul.border-teal:after,.list-block ul.border-teal:before{background-color:#009688}.floating-button.bg-teal,.floating-button.color-teal,.speed-dial-buttons a.bg-teal,.speed-dial-buttons a.color-teal{color:#fff;background:#009688}.floating-button.bg-teal.active-state,.floating-button.color-teal.active-state,.speed-dial-buttons a.bg-teal.active-state,.speed-dial-buttons a.color-teal.active-state,html:not(.watch-active-state) .floating-button.bg-teal:active,html:not(.watch-active-state) .floating-button.color-teal:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-teal:active,html:not(.watch-active-state) .speed-dial-buttons a.color-teal:active{background:#00897b}.floating-button.bg-teal i,.floating-button.color-teal i,.speed-dial-buttons a.bg-teal i,.speed-dial-buttons a.color-teal i{color:inherit}.ripple-teal .ripple-wave{background-color:rgba(0,150,136,.3)}.range-slider.color-teal input[type=range]::-webkit-slider-thumb:before{background-color:#009688}.range-slider.color-teal input[type=range]::-webkit-slider-thumb{background-color:#009688}.range-slider.color-teal input[type=range]::-ms-thumb{background-color:#009688}.range-slider.color-teal input[type=range]::-ms-fill-lower{background-color:#009688}.range-slider.color-teal input[type=range]::-moz-range-thumb{background-color:#009688}.badge.color-teal{background-color:#009688;color:#fff}.color-green{color:#4caf50}.list-block .item-link.color-green,.list-block .item-link.list-button.color-green,.list-button.color-green,.tabbar a.active.color-green,a.color-green{color:#4caf50}.label-switch input[type=checkbox]:checked+.checkbox.color-green,.label-switch.color-green input[type=checkbox]:checked+.checkbox{background-color:#4caf50}.button.color-green:not(.button-fill),.color-green.buttons-row .button:not(.button-fill){color:#4caf50!important}.button.button-fill.bg-green,.button.button-fill.color-green{background:#4caf50!important;color:#fff}.button.button-fill.bg-green.active-state,.button.button-fill.color-green.active-state,html:not(.watch-active-state) .button.button-fill.bg-green:active,html:not(.watch-active-state) .button.button-fill.color-green:active{background:#388e3c!important}.progressbar.bg-green,.progressbar.color-green{background-color:rgba(76,175,80,.5)}.progressbar.bg-green span,.progressbar.color-green span{background-color:#4caf50}.progressbar-infinite.bg-green,.progressbar-infinite.color-green{background-color:rgba(76,175,80,.5)}.progressbar-infinite.bg-green:after,.progressbar-infinite.bg-green:before,.progressbar-infinite.color-green:after,.progressbar-infinite.color-green:before{background-color:#4caf50}.color-green i.icon,i.icon.color-green{color:#4caf50}.preloader.color-green svg circle,.preloader.preloader-green svg circle{stroke:#4caf50}.preloader.color-green .preloader-inner-gap,.preloader.color-green .preloader-inner-half-circle,.preloader.preloader-green .preloader-inner-gap,.preloader.preloader-green .preloader-inner-half-circle{border-color:#4caf50}.bg-green,.list-block .swipeout-actions-left a.bg-green,.list-block .swipeout-actions-right a.bg-green,a.bg-green{background-color:#4caf50}.list-block .bg-green .item-link.active-state,.list-block .item-link.bg-green.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-green.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-green.active-state,.list-block .item-linka.bg-green.active-state,.list-block .list-block .swipeout-actions-left a.bg-green .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-green .item-link.active-state,.list-block a.bg-green .item-link.active-state,.list-block.bg-green .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-green .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-green .item-link.active-state,.list-blocka.bg-green .item-link.active-state,html:not(.watch-active-state) .list-block .bg-green .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-green:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-green:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-green:active,html:not(.watch-active-state) .list-block .item-linka.bg-green:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-green .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-green .item-link:active,html:not(.watch-active-state) .list-block a.bg-green .item-link:active,html:not(.watch-active-state) .list-block.bg-green .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-green .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-green .item-link:active,html:not(.watch-active-state) .list-blocka.bg-green .item-link:active{background:#388e3c}.border-green{border-color:#4caf50}.border-green:after,.border-green:before,.list-block .border-green.item-inner:after,.list-block .border-green.item-inner:before,.list-block ul.border-green:after,.list-block ul.border-green:before{background-color:#4caf50}.floating-button.bg-green,.floating-button.color-green,.speed-dial-buttons a.bg-green,.speed-dial-buttons a.color-green{color:#fff;background:#4caf50}.floating-button.bg-green.active-state,.floating-button.color-green.active-state,.speed-dial-buttons a.bg-green.active-state,.speed-dial-buttons a.color-green.active-state,html:not(.watch-active-state) .floating-button.bg-green:active,html:not(.watch-active-state) .floating-button.color-green:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-green:active,html:not(.watch-active-state) .speed-dial-buttons a.color-green:active{background:#388e3c}.floating-button.bg-green i,.floating-button.color-green i,.speed-dial-buttons a.bg-green i,.speed-dial-buttons a.color-green i{color:inherit}.ripple-green .ripple-wave{background-color:rgba(76,175,80,.3)}.range-slider.color-green input[type=range]::-webkit-slider-thumb:before{background-color:#4caf50}.range-slider.color-green input[type=range]::-webkit-slider-thumb{background-color:#4caf50}.range-slider.color-green input[type=range]::-ms-thumb{background-color:#4caf50}.range-slider.color-green input[type=range]::-ms-fill-lower{background-color:#4caf50}.range-slider.color-green input[type=range]::-moz-range-thumb{background-color:#4caf50}.badge.color-green{background-color:#4caf50;color:#fff}.color-lightgreen{color:#8bc34a}.list-block .item-link.color-lightgreen,.list-block .item-link.list-button.color-lightgreen,.list-button.color-lightgreen,.tabbar a.active.color-lightgreen,a.color-lightgreen{color:#8bc34a}.label-switch input[type=checkbox]:checked+.checkbox.color-lightgreen,.label-switch.color-lightgreen input[type=checkbox]:checked+.checkbox{background-color:#8bc34a}.button.color-lightgreen:not(.button-fill),.color-lightgreen.buttons-row .button:not(.button-fill){color:#8bc34a!important}.button.button-fill.bg-lightgreen,.button.button-fill.color-lightgreen{background:#8bc34a!important;color:#fff}.button.button-fill.bg-lightgreen.active-state,.button.button-fill.color-lightgreen.active-state,html:not(.watch-active-state) .button.button-fill.bg-lightgreen:active,html:not(.watch-active-state) .button.button-fill.color-lightgreen:active{background:#689f38!important}.progressbar.bg-lightgreen,.progressbar.color-lightgreen{background-color:rgba(139,195,74,.5)}.progressbar.bg-lightgreen span,.progressbar.color-lightgreen span{background-color:#8bc34a}.progressbar-infinite.bg-lightgreen,.progressbar-infinite.color-lightgreen{background-color:rgba(139,195,74,.5)}.progressbar-infinite.bg-lightgreen:after,.progressbar-infinite.bg-lightgreen:before,.progressbar-infinite.color-lightgreen:after,.progressbar-infinite.color-lightgreen:before{background-color:#8bc34a}.color-lightgreen i.icon,i.icon.color-lightgreen{color:#8bc34a}.preloader.color-lightgreen svg circle,.preloader.preloader-lightgreen svg circle{stroke:#8bc34a}.preloader.color-lightgreen .preloader-inner-gap,.preloader.color-lightgreen .preloader-inner-half-circle,.preloader.preloader-lightgreen .preloader-inner-gap,.preloader.preloader-lightgreen .preloader-inner-half-circle{border-color:#8bc34a}.bg-lightgreen,.list-block .swipeout-actions-left a.bg-lightgreen,.list-block .swipeout-actions-right a.bg-lightgreen,a.bg-lightgreen{background-color:#8bc34a}.list-block .bg-lightgreen .item-link.active-state,.list-block .item-link.bg-lightgreen.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-lightgreen.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-lightgreen.active-state,.list-block .item-linka.bg-lightgreen.active-state,.list-block .list-block .swipeout-actions-left a.bg-lightgreen .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-lightgreen .item-link.active-state,.list-block a.bg-lightgreen .item-link.active-state,.list-block.bg-lightgreen .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-lightgreen .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-lightgreen .item-link.active-state,.list-blocka.bg-lightgreen .item-link.active-state,html:not(.watch-active-state) .list-block .bg-lightgreen .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-lightgreen:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-lightgreen:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-lightgreen:active,html:not(.watch-active-state) .list-block .item-linka.bg-lightgreen:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-lightgreen .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-lightgreen .item-link:active,html:not(.watch-active-state) .list-block a.bg-lightgreen .item-link:active,html:not(.watch-active-state) .list-block.bg-lightgreen .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-lightgreen .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-lightgreen .item-link:active,html:not(.watch-active-state) .list-blocka.bg-lightgreen .item-link:active{background:#689f38}.border-lightgreen{border-color:#8bc34a}.border-lightgreen:after,.border-lightgreen:before,.list-block .border-lightgreen.item-inner:after,.list-block .border-lightgreen.item-inner:before,.list-block ul.border-lightgreen:after,.list-block ul.border-lightgreen:before{background-color:#8bc34a}.floating-button.bg-lightgreen,.floating-button.color-lightgreen,.speed-dial-buttons a.bg-lightgreen,.speed-dial-buttons a.color-lightgreen{color:#fff;background:#8bc34a}.floating-button.bg-lightgreen.active-state,.floating-button.color-lightgreen.active-state,.speed-dial-buttons a.bg-lightgreen.active-state,.speed-dial-buttons a.color-lightgreen.active-state,html:not(.watch-active-state) .floating-button.bg-lightgreen:active,html:not(.watch-active-state) .floating-button.color-lightgreen:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-lightgreen:active,html:not(.watch-active-state) .speed-dial-buttons a.color-lightgreen:active{background:#689f38}.floating-button.bg-lightgreen i,.floating-button.color-lightgreen i,.speed-dial-buttons a.bg-lightgreen i,.speed-dial-buttons a.color-lightgreen i{color:inherit}.ripple-lightgreen .ripple-wave{background-color:rgba(139,195,74,.3)}.range-slider.color-lightgreen input[type=range]::-webkit-slider-thumb:before{background-color:#8bc34a}.range-slider.color-lightgreen input[type=range]::-webkit-slider-thumb{background-color:#8bc34a}.range-slider.color-lightgreen input[type=range]::-ms-thumb{background-color:#8bc34a}.range-slider.color-lightgreen input[type=range]::-ms-fill-lower{background-color:#8bc34a}.range-slider.color-lightgreen input[type=range]::-moz-range-thumb{background-color:#8bc34a}.badge.color-lightgreen{background-color:#8bc34a;color:#fff}.color-lime{color:#cddc39}.list-block .item-link.color-lime,.list-block .item-link.list-button.color-lime,.list-button.color-lime,.tabbar a.active.color-lime,a.color-lime{color:#cddc39}.label-switch input[type=checkbox]:checked+.checkbox.color-lime,.label-switch.color-lime input[type=checkbox]:checked+.checkbox{background-color:#cddc39}.button.color-lime:not(.button-fill),.color-lime.buttons-row .button:not(.button-fill){color:#cddc39!important}.button.button-fill.bg-lime,.button.button-fill.color-lime{background:#cddc39!important;color:#fff}.button.button-fill.bg-lime.active-state,.button.button-fill.color-lime.active-state,html:not(.watch-active-state) .button.button-fill.bg-lime:active,html:not(.watch-active-state) .button.button-fill.color-lime:active{background:#afb42b!important}.progressbar.bg-lime,.progressbar.color-lime{background-color:rgba(205,220,57,.5)}.progressbar.bg-lime span,.progressbar.color-lime span{background-color:#cddc39}.progressbar-infinite.bg-lime,.progressbar-infinite.color-lime{background-color:rgba(205,220,57,.5)}.progressbar-infinite.bg-lime:after,.progressbar-infinite.bg-lime:before,.progressbar-infinite.color-lime:after,.progressbar-infinite.color-lime:before{background-color:#cddc39}.color-lime i.icon,i.icon.color-lime{color:#cddc39}.preloader.color-lime svg circle,.preloader.preloader-lime svg circle{stroke:#cddc39}.preloader.color-lime .preloader-inner-gap,.preloader.color-lime .preloader-inner-half-circle,.preloader.preloader-lime .preloader-inner-gap,.preloader.preloader-lime .preloader-inner-half-circle{border-color:#cddc39}.bg-lime,.list-block .swipeout-actions-left a.bg-lime,.list-block .swipeout-actions-right a.bg-lime,a.bg-lime{background-color:#cddc39}.list-block .bg-lime .item-link.active-state,.list-block .item-link.bg-lime.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-lime.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-lime.active-state,.list-block .item-linka.bg-lime.active-state,.list-block .list-block .swipeout-actions-left a.bg-lime .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-lime .item-link.active-state,.list-block a.bg-lime .item-link.active-state,.list-block.bg-lime .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-lime .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-lime .item-link.active-state,.list-blocka.bg-lime .item-link.active-state,html:not(.watch-active-state) .list-block .bg-lime .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-lime:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-lime:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-lime:active,html:not(.watch-active-state) .list-block .item-linka.bg-lime:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-lime .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-lime .item-link:active,html:not(.watch-active-state) .list-block a.bg-lime .item-link:active,html:not(.watch-active-state) .list-block.bg-lime .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-lime .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-lime .item-link:active,html:not(.watch-active-state) .list-blocka.bg-lime .item-link:active{background:#afb42b}.border-lime{border-color:#cddc39}.border-lime:after,.border-lime:before,.list-block .border-lime.item-inner:after,.list-block .border-lime.item-inner:before,.list-block ul.border-lime:after,.list-block ul.border-lime:before{background-color:#cddc39}.floating-button.bg-lime,.floating-button.color-lime,.speed-dial-buttons a.bg-lime,.speed-dial-buttons a.color-lime{color:#fff;background:#cddc39}.floating-button.bg-lime.active-state,.floating-button.color-lime.active-state,.speed-dial-buttons a.bg-lime.active-state,.speed-dial-buttons a.color-lime.active-state,html:not(.watch-active-state) .floating-button.bg-lime:active,html:not(.watch-active-state) .floating-button.color-lime:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-lime:active,html:not(.watch-active-state) .speed-dial-buttons a.color-lime:active{background:#afb42b}.floating-button.bg-lime i,.floating-button.color-lime i,.speed-dial-buttons a.bg-lime i,.speed-dial-buttons a.color-lime i{color:inherit}.ripple-lime .ripple-wave{background-color:rgba(205,220,57,.3)}.range-slider.color-lime input[type=range]::-webkit-slider-thumb:before{background-color:#cddc39}.range-slider.color-lime input[type=range]::-webkit-slider-thumb{background-color:#cddc39}.range-slider.color-lime input[type=range]::-ms-thumb{background-color:#cddc39}.range-slider.color-lime input[type=range]::-ms-fill-lower{background-color:#cddc39}.range-slider.color-lime input[type=range]::-moz-range-thumb{background-color:#cddc39}.badge.color-lime{background-color:#cddc39;color:#fff}.color-yellow{color:#ffeb3b}.list-block .item-link.color-yellow,.list-block .item-link.list-button.color-yellow,.list-button.color-yellow,.tabbar a.active.color-yellow,a.color-yellow{color:#ffeb3b}.label-switch input[type=checkbox]:checked+.checkbox.color-yellow,.label-switch.color-yellow input[type=checkbox]:checked+.checkbox{background-color:#ffeb3b}.button.color-yellow:not(.button-fill),.color-yellow.buttons-row .button:not(.button-fill){color:#ffeb3b!important}.button.button-fill.bg-yellow,.button.button-fill.color-yellow{background:#ffeb3b!important;color:#fff}.button.button-fill.bg-yellow.active-state,.button.button-fill.color-yellow.active-state,html:not(.watch-active-state) .button.button-fill.bg-yellow:active,html:not(.watch-active-state) .button.button-fill.color-yellow:active{background:#fbc02d!important}.progressbar.bg-yellow,.progressbar.color-yellow{background-color:rgba(255,235,59,.5)}.progressbar.bg-yellow span,.progressbar.color-yellow span{background-color:#ffeb3b}.progressbar-infinite.bg-yellow,.progressbar-infinite.color-yellow{background-color:rgba(255,235,59,.5)}.progressbar-infinite.bg-yellow:after,.progressbar-infinite.bg-yellow:before,.progressbar-infinite.color-yellow:after,.progressbar-infinite.color-yellow:before{background-color:#ffeb3b}.color-yellow i.icon,i.icon.color-yellow{color:#ffeb3b}.preloader.color-yellow svg circle,.preloader.preloader-yellow svg circle{stroke:#ffeb3b}.preloader.color-yellow .preloader-inner-gap,.preloader.color-yellow .preloader-inner-half-circle,.preloader.preloader-yellow .preloader-inner-gap,.preloader.preloader-yellow .preloader-inner-half-circle{border-color:#ffeb3b}.bg-yellow,.list-block .swipeout-actions-left a.bg-yellow,.list-block .swipeout-actions-right a.bg-yellow,a.bg-yellow{background-color:#ffeb3b}.list-block .bg-yellow .item-link.active-state,.list-block .item-link.bg-yellow.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-yellow.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-yellow.active-state,.list-block .item-linka.bg-yellow.active-state,.list-block .list-block .swipeout-actions-left a.bg-yellow .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-yellow .item-link.active-state,.list-block a.bg-yellow .item-link.active-state,.list-block.bg-yellow .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-yellow .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-yellow .item-link.active-state,.list-blocka.bg-yellow .item-link.active-state,html:not(.watch-active-state) .list-block .bg-yellow .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-yellow:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-yellow:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-yellow:active,html:not(.watch-active-state) .list-block .item-linka.bg-yellow:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-yellow .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-yellow .item-link:active,html:not(.watch-active-state) .list-block a.bg-yellow .item-link:active,html:not(.watch-active-state) .list-block.bg-yellow .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-yellow .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-yellow .item-link:active,html:not(.watch-active-state) .list-blocka.bg-yellow .item-link:active{background:#fbc02d}.border-yellow{border-color:#ffeb3b}.border-yellow:after,.border-yellow:before,.list-block .border-yellow.item-inner:after,.list-block .border-yellow.item-inner:before,.list-block ul.border-yellow:after,.list-block ul.border-yellow:before{background-color:#ffeb3b}.floating-button.bg-yellow,.floating-button.color-yellow,.speed-dial-buttons a.bg-yellow,.speed-dial-buttons a.color-yellow{color:#fff;background:#ffeb3b}.floating-button.bg-yellow.active-state,.floating-button.color-yellow.active-state,.speed-dial-buttons a.bg-yellow.active-state,.speed-dial-buttons a.color-yellow.active-state,html:not(.watch-active-state) .floating-button.bg-yellow:active,html:not(.watch-active-state) .floating-button.color-yellow:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-yellow:active,html:not(.watch-active-state) .speed-dial-buttons a.color-yellow:active{background:#fbc02d}.floating-button.bg-yellow i,.floating-button.color-yellow i,.speed-dial-buttons a.bg-yellow i,.speed-dial-buttons a.color-yellow i{color:inherit}.ripple-yellow .ripple-wave{background-color:rgba(255,235,59,.3)}.range-slider.color-yellow input[type=range]::-webkit-slider-thumb:before{background-color:#ffeb3b}.range-slider.color-yellow input[type=range]::-webkit-slider-thumb{background-color:#ffeb3b}.range-slider.color-yellow input[type=range]::-ms-thumb{background-color:#ffeb3b}.range-slider.color-yellow input[type=range]::-ms-fill-lower{background-color:#ffeb3b}.range-slider.color-yellow input[type=range]::-moz-range-thumb{background-color:#ffeb3b}.badge.color-yellow{background-color:#ffeb3b;color:#fff}.color-amber{color:#ffc107}.list-block .item-link.color-amber,.list-block .item-link.list-button.color-amber,.list-button.color-amber,.tabbar a.active.color-amber,a.color-amber{color:#ffc107}.label-switch input[type=checkbox]:checked+.checkbox.color-amber,.label-switch.color-amber input[type=checkbox]:checked+.checkbox{background-color:#ffc107}.button.color-amber:not(.button-fill),.color-amber.buttons-row .button:not(.button-fill){color:#ffc107!important}.button.button-fill.bg-amber,.button.button-fill.color-amber{background:#ffc107!important;color:#fff}.button.button-fill.bg-amber.active-state,.button.button-fill.color-amber.active-state,html:not(.watch-active-state) .button.button-fill.bg-amber:active,html:not(.watch-active-state) .button.button-fill.color-amber:active{background:#ffa000!important}.progressbar.bg-amber,.progressbar.color-amber{background-color:rgba(255,193,7,.5)}.progressbar.bg-amber span,.progressbar.color-amber span{background-color:#ffc107}.progressbar-infinite.bg-amber,.progressbar-infinite.color-amber{background-color:rgba(255,193,7,.5)}.progressbar-infinite.bg-amber:after,.progressbar-infinite.bg-amber:before,.progressbar-infinite.color-amber:after,.progressbar-infinite.color-amber:before{background-color:#ffc107}.color-amber i.icon,i.icon.color-amber{color:#ffc107}.preloader.color-amber svg circle,.preloader.preloader-amber svg circle{stroke:#ffc107}.preloader.color-amber .preloader-inner-gap,.preloader.color-amber .preloader-inner-half-circle,.preloader.preloader-amber .preloader-inner-gap,.preloader.preloader-amber .preloader-inner-half-circle{border-color:#ffc107}.bg-amber,.list-block .swipeout-actions-left a.bg-amber,.list-block .swipeout-actions-right a.bg-amber,a.bg-amber{background-color:#ffc107}.list-block .bg-amber .item-link.active-state,.list-block .item-link.bg-amber.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-amber.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-amber.active-state,.list-block .item-linka.bg-amber.active-state,.list-block .list-block .swipeout-actions-left a.bg-amber .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-amber .item-link.active-state,.list-block a.bg-amber .item-link.active-state,.list-block.bg-amber .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-amber .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-amber .item-link.active-state,.list-blocka.bg-amber .item-link.active-state,html:not(.watch-active-state) .list-block .bg-amber .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-amber:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-amber:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-amber:active,html:not(.watch-active-state) .list-block .item-linka.bg-amber:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-amber .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-amber .item-link:active,html:not(.watch-active-state) .list-block a.bg-amber .item-link:active,html:not(.watch-active-state) .list-block.bg-amber .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-amber .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-amber .item-link:active,html:not(.watch-active-state) .list-blocka.bg-amber .item-link:active{background:#ffa000}.border-amber{border-color:#ffc107}.border-amber:after,.border-amber:before,.list-block .border-amber.item-inner:after,.list-block .border-amber.item-inner:before,.list-block ul.border-amber:after,.list-block ul.border-amber:before{background-color:#ffc107}.floating-button.bg-amber,.floating-button.color-amber,.speed-dial-buttons a.bg-amber,.speed-dial-buttons a.color-amber{color:#fff;background:#ffc107}.floating-button.bg-amber.active-state,.floating-button.color-amber.active-state,.speed-dial-buttons a.bg-amber.active-state,.speed-dial-buttons a.color-amber.active-state,html:not(.watch-active-state) .floating-button.bg-amber:active,html:not(.watch-active-state) .floating-button.color-amber:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-amber:active,html:not(.watch-active-state) .speed-dial-buttons a.color-amber:active{background:#ffa000}.floating-button.bg-amber i,.floating-button.color-amber i,.speed-dial-buttons a.bg-amber i,.speed-dial-buttons a.color-amber i{color:inherit}.ripple-amber .ripple-wave{background-color:rgba(255,193,7,.3)}.range-slider.color-amber input[type=range]::-webkit-slider-thumb:before{background-color:#ffc107}.range-slider.color-amber input[type=range]::-webkit-slider-thumb{background-color:#ffc107}.range-slider.color-amber input[type=range]::-ms-thumb{background-color:#ffc107}.range-slider.color-amber input[type=range]::-ms-fill-lower{background-color:#ffc107}.range-slider.color-amber input[type=range]::-moz-range-thumb{background-color:#ffc107}.badge.color-amber{background-color:#ffc107;color:#fff}.color-orange{color:#ff9800}.list-block .item-link.color-orange,.list-block .item-link.list-button.color-orange,.list-button.color-orange,.tabbar a.active.color-orange,a.color-orange{color:#ff9800}.label-switch input[type=checkbox]:checked+.checkbox.color-orange,.label-switch.color-orange input[type=checkbox]:checked+.checkbox{background-color:#ff9800}.button.color-orange:not(.button-fill),.color-orange.buttons-row .button:not(.button-fill){color:#ff9800!important}.button.button-fill.bg-orange,.button.button-fill.color-orange{background:#ff9800!important;color:#fff}.button.button-fill.bg-orange.active-state,.button.button-fill.color-orange.active-state,html:not(.watch-active-state) .button.button-fill.bg-orange:active,html:not(.watch-active-state) .button.button-fill.color-orange:active{background:#f57c00!important}.progressbar.bg-orange,.progressbar.color-orange{background-color:rgba(255,152,0,.5)}.progressbar.bg-orange span,.progressbar.color-orange span{background-color:#ff9800}.progressbar-infinite.bg-orange,.progressbar-infinite.color-orange{background-color:rgba(255,152,0,.5)}.progressbar-infinite.bg-orange:after,.progressbar-infinite.bg-orange:before,.progressbar-infinite.color-orange:after,.progressbar-infinite.color-orange:before{background-color:#ff9800}.color-orange i.icon,i.icon.color-orange{color:#ff9800}.preloader.color-orange svg circle,.preloader.preloader-orange svg circle{stroke:#ff9800}.preloader.color-orange .preloader-inner-gap,.preloader.color-orange .preloader-inner-half-circle,.preloader.preloader-orange .preloader-inner-gap,.preloader.preloader-orange .preloader-inner-half-circle{border-color:#ff9800}.bg-orange,.list-block .swipeout-actions-left a.bg-orange,.list-block .swipeout-actions-right a.bg-orange,a.bg-orange{background-color:#ff9800}.list-block .bg-orange .item-link.active-state,.list-block .item-link.bg-orange.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-orange.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-orange.active-state,.list-block .item-linka.bg-orange.active-state,.list-block .list-block .swipeout-actions-left a.bg-orange .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-orange .item-link.active-state,.list-block a.bg-orange .item-link.active-state,.list-block.bg-orange .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-orange .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-orange .item-link.active-state,.list-blocka.bg-orange .item-link.active-state,html:not(.watch-active-state) .list-block .bg-orange .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-orange:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-orange:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-orange:active,html:not(.watch-active-state) .list-block .item-linka.bg-orange:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-orange .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-orange .item-link:active,html:not(.watch-active-state) .list-block a.bg-orange .item-link:active,html:not(.watch-active-state) .list-block.bg-orange .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-orange .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-orange .item-link:active,html:not(.watch-active-state) .list-blocka.bg-orange .item-link:active{background:#f57c00}.border-orange{border-color:#ff9800}.border-orange:after,.border-orange:before,.list-block .border-orange.item-inner:after,.list-block .border-orange.item-inner:before,.list-block ul.border-orange:after,.list-block ul.border-orange:before{background-color:#ff9800}.floating-button.bg-orange,.floating-button.color-orange,.speed-dial-buttons a.bg-orange,.speed-dial-buttons a.color-orange{color:#fff;background:#ff9800}.floating-button.bg-orange.active-state,.floating-button.color-orange.active-state,.speed-dial-buttons a.bg-orange.active-state,.speed-dial-buttons a.color-orange.active-state,html:not(.watch-active-state) .floating-button.bg-orange:active,html:not(.watch-active-state) .floating-button.color-orange:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-orange:active,html:not(.watch-active-state) .speed-dial-buttons a.color-orange:active{background:#f57c00}.floating-button.bg-orange i,.floating-button.color-orange i,.speed-dial-buttons a.bg-orange i,.speed-dial-buttons a.color-orange i{color:inherit}.ripple-orange .ripple-wave{background-color:rgba(255,152,0,.3)}.range-slider.color-orange input[type=range]::-webkit-slider-thumb:before{background-color:#ff9800}.range-slider.color-orange input[type=range]::-webkit-slider-thumb{background-color:#ff9800}.range-slider.color-orange input[type=range]::-ms-thumb{background-color:#ff9800}.range-slider.color-orange input[type=range]::-ms-fill-lower{background-color:#ff9800}.range-slider.color-orange input[type=range]::-moz-range-thumb{background-color:#ff9800}.badge.color-orange{background-color:#ff9800;color:#fff}.color-deeporange{color:#ff5722}.list-block .item-link.color-deeporange,.list-block .item-link.list-button.color-deeporange,.list-button.color-deeporange,.tabbar a.active.color-deeporange,a.color-deeporange{color:#ff5722}.label-switch input[type=checkbox]:checked+.checkbox.color-deeporange,.label-switch.color-deeporange input[type=checkbox]:checked+.checkbox{background-color:#ff5722}.button.color-deeporange:not(.button-fill),.color-deeporange.buttons-row .button:not(.button-fill){color:#ff5722!important}.button.button-fill.bg-deeporange,.button.button-fill.color-deeporange{background:#ff5722!important;color:#fff}.button.button-fill.bg-deeporange.active-state,.button.button-fill.color-deeporange.active-state,html:not(.watch-active-state) .button.button-fill.bg-deeporange:active,html:not(.watch-active-state) .button.button-fill.color-deeporange:active{background:#e64a19!important}.progressbar.bg-deeporange,.progressbar.color-deeporange{background-color:rgba(255,87,34,.5)}.progressbar.bg-deeporange span,.progressbar.color-deeporange span{background-color:#ff5722}.progressbar-infinite.bg-deeporange,.progressbar-infinite.color-deeporange{background-color:rgba(255,87,34,.5)}.progressbar-infinite.bg-deeporange:after,.progressbar-infinite.bg-deeporange:before,.progressbar-infinite.color-deeporange:after,.progressbar-infinite.color-deeporange:before{background-color:#ff5722}.color-deeporange i.icon,i.icon.color-deeporange{color:#ff5722}.preloader.color-deeporange svg circle,.preloader.preloader-deeporange svg circle{stroke:#ff5722}.preloader.color-deeporange .preloader-inner-gap,.preloader.color-deeporange .preloader-inner-half-circle,.preloader.preloader-deeporange .preloader-inner-gap,.preloader.preloader-deeporange .preloader-inner-half-circle{border-color:#ff5722}.bg-deeporange,.list-block .swipeout-actions-left a.bg-deeporange,.list-block .swipeout-actions-right a.bg-deeporange,a.bg-deeporange{background-color:#ff5722}.list-block .bg-deeporange .item-link.active-state,.list-block .item-link.bg-deeporange.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-deeporange.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-deeporange.active-state,.list-block .item-linka.bg-deeporange.active-state,.list-block .list-block .swipeout-actions-left a.bg-deeporange .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-deeporange .item-link.active-state,.list-block a.bg-deeporange .item-link.active-state,.list-block.bg-deeporange .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-deeporange .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-deeporange .item-link.active-state,.list-blocka.bg-deeporange .item-link.active-state,html:not(.watch-active-state) .list-block .bg-deeporange .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-deeporange:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-deeporange:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-deeporange:active,html:not(.watch-active-state) .list-block .item-linka.bg-deeporange:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-deeporange .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-deeporange .item-link:active,html:not(.watch-active-state) .list-block a.bg-deeporange .item-link:active,html:not(.watch-active-state) .list-block.bg-deeporange .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-deeporange .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-deeporange .item-link:active,html:not(.watch-active-state) .list-blocka.bg-deeporange .item-link:active{background:#e64a19}.border-deeporange{border-color:#ff5722}.border-deeporange:after,.border-deeporange:before,.list-block .border-deeporange.item-inner:after,.list-block .border-deeporange.item-inner:before,.list-block ul.border-deeporange:after,.list-block ul.border-deeporange:before{background-color:#ff5722}.floating-button.bg-deeporange,.floating-button.color-deeporange,.speed-dial-buttons a.bg-deeporange,.speed-dial-buttons a.color-deeporange{color:#fff;background:#ff5722}.floating-button.bg-deeporange.active-state,.floating-button.color-deeporange.active-state,.speed-dial-buttons a.bg-deeporange.active-state,.speed-dial-buttons a.color-deeporange.active-state,html:not(.watch-active-state) .floating-button.bg-deeporange:active,html:not(.watch-active-state) .floating-button.color-deeporange:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-deeporange:active,html:not(.watch-active-state) .speed-dial-buttons a.color-deeporange:active{background:#e64a19}.floating-button.bg-deeporange i,.floating-button.color-deeporange i,.speed-dial-buttons a.bg-deeporange i,.speed-dial-buttons a.color-deeporange i{color:inherit}.ripple-deeporange .ripple-wave{background-color:rgba(255,87,34,.3)}.range-slider.color-deeporange input[type=range]::-webkit-slider-thumb:before{background-color:#ff5722}.range-slider.color-deeporange input[type=range]::-webkit-slider-thumb{background-color:#ff5722}.range-slider.color-deeporange input[type=range]::-ms-thumb{background-color:#ff5722}.range-slider.color-deeporange input[type=range]::-ms-fill-lower{background-color:#ff5722}.range-slider.color-deeporange input[type=range]::-moz-range-thumb{background-color:#ff5722}.badge.color-deeporange{background-color:#ff5722;color:#fff}.color-brown{color:#795548}.list-block .item-link.color-brown,.list-block .item-link.list-button.color-brown,.list-button.color-brown,.tabbar a.active.color-brown,a.color-brown{color:#795548}.label-switch input[type=checkbox]:checked+.checkbox.color-brown,.label-switch.color-brown input[type=checkbox]:checked+.checkbox{background-color:#795548}.button.color-brown:not(.button-fill),.color-brown.buttons-row .button:not(.button-fill){color:#795548!important}.button.button-fill.bg-brown,.button.button-fill.color-brown{background:#795548!important;color:#fff}.button.button-fill.bg-brown.active-state,.button.button-fill.color-brown.active-state,html:not(.watch-active-state) .button.button-fill.bg-brown:active,html:not(.watch-active-state) .button.button-fill.color-brown:active{background:#5d4037!important}.progressbar.bg-brown,.progressbar.color-brown{background-color:rgba(121,85,72,.5)}.progressbar.bg-brown span,.progressbar.color-brown span{background-color:#795548}.progressbar-infinite.bg-brown,.progressbar-infinite.color-brown{background-color:rgba(121,85,72,.5)}.progressbar-infinite.bg-brown:after,.progressbar-infinite.bg-brown:before,.progressbar-infinite.color-brown:after,.progressbar-infinite.color-brown:before{background-color:#795548}.color-brown i.icon,i.icon.color-brown{color:#795548}.preloader.color-brown svg circle,.preloader.preloader-brown svg circle{stroke:#795548}.preloader.color-brown .preloader-inner-gap,.preloader.color-brown .preloader-inner-half-circle,.preloader.preloader-brown .preloader-inner-gap,.preloader.preloader-brown .preloader-inner-half-circle{border-color:#795548}.bg-brown,.list-block .swipeout-actions-left a.bg-brown,.list-block .swipeout-actions-right a.bg-brown,a.bg-brown{background-color:#795548}.list-block .bg-brown .item-link.active-state,.list-block .item-link.bg-brown.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-brown.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-brown.active-state,.list-block .item-linka.bg-brown.active-state,.list-block .list-block .swipeout-actions-left a.bg-brown .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-brown .item-link.active-state,.list-block a.bg-brown .item-link.active-state,.list-block.bg-brown .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-brown .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-brown .item-link.active-state,.list-blocka.bg-brown .item-link.active-state,html:not(.watch-active-state) .list-block .bg-brown .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-brown:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-brown:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-brown:active,html:not(.watch-active-state) .list-block .item-linka.bg-brown:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-brown .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-brown .item-link:active,html:not(.watch-active-state) .list-block a.bg-brown .item-link:active,html:not(.watch-active-state) .list-block.bg-brown .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-brown .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-brown .item-link:active,html:not(.watch-active-state) .list-blocka.bg-brown .item-link:active{background:#5d4037}.border-brown{border-color:#795548}.border-brown:after,.border-brown:before,.list-block .border-brown.item-inner:after,.list-block .border-brown.item-inner:before,.list-block ul.border-brown:after,.list-block ul.border-brown:before{background-color:#795548}.floating-button.bg-brown,.floating-button.color-brown,.speed-dial-buttons a.bg-brown,.speed-dial-buttons a.color-brown{color:#fff;background:#795548}.floating-button.bg-brown.active-state,.floating-button.color-brown.active-state,.speed-dial-buttons a.bg-brown.active-state,.speed-dial-buttons a.color-brown.active-state,html:not(.watch-active-state) .floating-button.bg-brown:active,html:not(.watch-active-state) .floating-button.color-brown:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-brown:active,html:not(.watch-active-state) .speed-dial-buttons a.color-brown:active{background:#5d4037}.floating-button.bg-brown i,.floating-button.color-brown i,.speed-dial-buttons a.bg-brown i,.speed-dial-buttons a.color-brown i{color:inherit}.ripple-brown .ripple-wave{background-color:rgba(121,85,72,.3)}.range-slider.color-brown input[type=range]::-webkit-slider-thumb:before{background-color:#795548}.range-slider.color-brown input[type=range]::-webkit-slider-thumb{background-color:#795548}.range-slider.color-brown input[type=range]::-ms-thumb{background-color:#795548}.range-slider.color-brown input[type=range]::-ms-fill-lower{background-color:#795548}.range-slider.color-brown input[type=range]::-moz-range-thumb{background-color:#795548}.badge.color-brown{background-color:#795548;color:#fff}.color-gray{color:#9e9e9e}.list-block .item-link.color-gray,.list-block .item-link.list-button.color-gray,.list-button.color-gray,.tabbar a.active.color-gray,a.color-gray{color:#9e9e9e}.label-switch input[type=checkbox]:checked+.checkbox.color-gray,.label-switch.color-gray input[type=checkbox]:checked+.checkbox{background-color:#9e9e9e}.button.color-gray:not(.button-fill),.color-gray.buttons-row .button:not(.button-fill){color:#9e9e9e!important}.button.button-fill.bg-gray,.button.button-fill.color-gray{background:#9e9e9e!important;color:#fff}.button.button-fill.bg-gray.active-state,.button.button-fill.color-gray.active-state,html:not(.watch-active-state) .button.button-fill.bg-gray:active,html:not(.watch-active-state) .button.button-fill.color-gray:active{background:#616161!important}.progressbar.bg-gray,.progressbar.color-gray{background-color:rgba(158,158,158,.5)}.progressbar.bg-gray span,.progressbar.color-gray span{background-color:#9e9e9e}.progressbar-infinite.bg-gray,.progressbar-infinite.color-gray{background-color:rgba(158,158,158,.5)}.progressbar-infinite.bg-gray:after,.progressbar-infinite.bg-gray:before,.progressbar-infinite.color-gray:after,.progressbar-infinite.color-gray:before{background-color:#9e9e9e}.color-gray i.icon,i.icon.color-gray{color:#9e9e9e}.preloader.color-gray svg circle,.preloader.preloader-gray svg circle{stroke:#9e9e9e}.preloader.color-gray .preloader-inner-gap,.preloader.color-gray .preloader-inner-half-circle,.preloader.preloader-gray .preloader-inner-gap,.preloader.preloader-gray .preloader-inner-half-circle{border-color:#9e9e9e}.bg-gray,.list-block .swipeout-actions-left a.bg-gray,.list-block .swipeout-actions-right a.bg-gray,a.bg-gray{background-color:#9e9e9e}.list-block .bg-gray .item-link.active-state,.list-block .item-link.bg-gray.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-gray.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-gray.active-state,.list-block .item-linka.bg-gray.active-state,.list-block .list-block .swipeout-actions-left a.bg-gray .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-gray .item-link.active-state,.list-block a.bg-gray .item-link.active-state,.list-block.bg-gray .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-gray .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-gray .item-link.active-state,.list-blocka.bg-gray .item-link.active-state,html:not(.watch-active-state) .list-block .bg-gray .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-gray:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-gray:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-gray:active,html:not(.watch-active-state) .list-block .item-linka.bg-gray:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-gray .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-gray .item-link:active,html:not(.watch-active-state) .list-block a.bg-gray .item-link:active,html:not(.watch-active-state) .list-block.bg-gray .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-gray .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-gray .item-link:active,html:not(.watch-active-state) .list-blocka.bg-gray .item-link:active{background:#616161}.border-gray{border-color:#9e9e9e}.border-gray:after,.border-gray:before,.list-block .border-gray.item-inner:after,.list-block .border-gray.item-inner:before,.list-block ul.border-gray:after,.list-block ul.border-gray:before{background-color:#9e9e9e}.floating-button.bg-gray,.floating-button.color-gray,.speed-dial-buttons a.bg-gray,.speed-dial-buttons a.color-gray{color:#fff;background:#9e9e9e}.floating-button.bg-gray.active-state,.floating-button.color-gray.active-state,.speed-dial-buttons a.bg-gray.active-state,.speed-dial-buttons a.color-gray.active-state,html:not(.watch-active-state) .floating-button.bg-gray:active,html:not(.watch-active-state) .floating-button.color-gray:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-gray:active,html:not(.watch-active-state) .speed-dial-buttons a.color-gray:active{background:#616161}.floating-button.bg-gray i,.floating-button.color-gray i,.speed-dial-buttons a.bg-gray i,.speed-dial-buttons a.color-gray i{color:inherit}.ripple-gray .ripple-wave{background-color:rgba(158,158,158,.3)}.range-slider.color-gray input[type=range]::-webkit-slider-thumb:before{background-color:#9e9e9e}.range-slider.color-gray input[type=range]::-webkit-slider-thumb{background-color:#9e9e9e}.range-slider.color-gray input[type=range]::-ms-thumb{background-color:#9e9e9e}.range-slider.color-gray input[type=range]::-ms-fill-lower{background-color:#9e9e9e}.range-slider.color-gray input[type=range]::-moz-range-thumb{background-color:#9e9e9e}.badge.color-gray{background-color:#9e9e9e;color:#fff}.color-bluegray{color:#607d8b}.list-block .item-link.color-bluegray,.list-block .item-link.list-button.color-bluegray,.list-button.color-bluegray,.tabbar a.active.color-bluegray,a.color-bluegray{color:#607d8b}.label-switch input[type=checkbox]:checked+.checkbox.color-bluegray,.label-switch.color-bluegray input[type=checkbox]:checked+.checkbox{background-color:#607d8b}.button.color-bluegray:not(.button-fill),.color-bluegray.buttons-row .button:not(.button-fill){color:#607d8b!important}.button.button-fill.bg-bluegray,.button.button-fill.color-bluegray{background:#607d8b!important;color:#fff}.button.button-fill.bg-bluegray.active-state,.button.button-fill.color-bluegray.active-state,html:not(.watch-active-state) .button.button-fill.bg-bluegray:active,html:not(.watch-active-state) .button.button-fill.color-bluegray:active{background:#455a64!important}.progressbar.bg-bluegray,.progressbar.color-bluegray{background-color:rgba(96,125,139,.5)}.progressbar.bg-bluegray span,.progressbar.color-bluegray span{background-color:#607d8b}.progressbar-infinite.bg-bluegray,.progressbar-infinite.color-bluegray{background-color:rgba(96,125,139,.5)}.progressbar-infinite.bg-bluegray:after,.progressbar-infinite.bg-bluegray:before,.progressbar-infinite.color-bluegray:after,.progressbar-infinite.color-bluegray:before{background-color:#607d8b}.color-bluegray i.icon,i.icon.color-bluegray{color:#607d8b}.preloader.color-bluegray svg circle,.preloader.preloader-bluegray svg circle{stroke:#607d8b}.preloader.color-bluegray .preloader-inner-gap,.preloader.color-bluegray .preloader-inner-half-circle,.preloader.preloader-bluegray .preloader-inner-gap,.preloader.preloader-bluegray .preloader-inner-half-circle{border-color:#607d8b}.bg-bluegray,.list-block .swipeout-actions-left a.bg-bluegray,.list-block .swipeout-actions-right a.bg-bluegray,a.bg-bluegray{background-color:#607d8b}.list-block .bg-bluegray .item-link.active-state,.list-block .item-link.bg-bluegray.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-bluegray.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-bluegray.active-state,.list-block .item-linka.bg-bluegray.active-state,.list-block .list-block .swipeout-actions-left a.bg-bluegray .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-bluegray .item-link.active-state,.list-block a.bg-bluegray .item-link.active-state,.list-block.bg-bluegray .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-bluegray .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-bluegray .item-link.active-state,.list-blocka.bg-bluegray .item-link.active-state,html:not(.watch-active-state) .list-block .bg-bluegray .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-bluegray:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-bluegray:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-bluegray:active,html:not(.watch-active-state) .list-block .item-linka.bg-bluegray:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-bluegray .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-bluegray .item-link:active,html:not(.watch-active-state) .list-block a.bg-bluegray .item-link:active,html:not(.watch-active-state) .list-block.bg-bluegray .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-bluegray .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-bluegray .item-link:active,html:not(.watch-active-state) .list-blocka.bg-bluegray .item-link:active{background:#455a64}.border-bluegray{border-color:#607d8b}.border-bluegray:after,.border-bluegray:before,.list-block .border-bluegray.item-inner:after,.list-block .border-bluegray.item-inner:before,.list-block ul.border-bluegray:after,.list-block ul.border-bluegray:before{background-color:#607d8b}.floating-button.bg-bluegray,.floating-button.color-bluegray,.speed-dial-buttons a.bg-bluegray,.speed-dial-buttons a.color-bluegray{color:#fff;background:#607d8b}.floating-button.bg-bluegray.active-state,.floating-button.color-bluegray.active-state,.speed-dial-buttons a.bg-bluegray.active-state,.speed-dial-buttons a.color-bluegray.active-state,html:not(.watch-active-state) .floating-button.bg-bluegray:active,html:not(.watch-active-state) .floating-button.color-bluegray:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-bluegray:active,html:not(.watch-active-state) .speed-dial-buttons a.color-bluegray:active{background:#455a64}.floating-button.bg-bluegray i,.floating-button.color-bluegray i,.speed-dial-buttons a.bg-bluegray i,.speed-dial-buttons a.color-bluegray i{color:inherit}.ripple-bluegray .ripple-wave{background-color:rgba(96,125,139,.3)}.range-slider.color-bluegray input[type=range]::-webkit-slider-thumb:before{background-color:#607d8b}.range-slider.color-bluegray input[type=range]::-webkit-slider-thumb{background-color:#607d8b}.range-slider.color-bluegray input[type=range]::-ms-thumb{background-color:#607d8b}.range-slider.color-bluegray input[type=range]::-ms-fill-lower{background-color:#607d8b}.range-slider.color-bluegray input[type=range]::-moz-range-thumb{background-color:#607d8b}.badge.color-bluegray{background-color:#607d8b;color:#fff}.color-white{color:#fff}.list-block .item-link.color-white,.list-block .item-link.list-button.color-white,.list-button.color-white,.tabbar a.active.color-white,a.color-white{color:#fff}.label-switch input[type=checkbox]:checked+.checkbox.color-white,.label-switch.color-white input[type=checkbox]:checked+.checkbox{background-color:#fff}.button.color-white:not(.button-fill),.color-white.buttons-row .button:not(.button-fill){color:#fff!important}.button.button-fill.bg-white,.button.button-fill.color-white{background:#fff!important;color:#fff}.button.button-fill.bg-white.active-state,.button.button-fill.color-white.active-state,html:not(.watch-active-state) .button.button-fill.bg-white:active,html:not(.watch-active-state) .button.button-fill.color-white:active{background:rgba(0,0,0,.1)!important}.progressbar.bg-white,.progressbar.color-white{background-color:rgba(255,255,255,.5)}.progressbar.bg-white span,.progressbar.color-white span{background-color:#fff}.progressbar-infinite.bg-white,.progressbar-infinite.color-white{background-color:rgba(255,255,255,.5)}.progressbar-infinite.bg-white:after,.progressbar-infinite.bg-white:before,.progressbar-infinite.color-white:after,.progressbar-infinite.color-white:before{background-color:#fff}.color-white i.icon,i.icon.color-white{color:#fff}.preloader.color-white svg circle,.preloader.preloader-white svg circle{stroke:#fff}.preloader.color-white .preloader-inner-gap,.preloader.color-white .preloader-inner-half-circle,.preloader.preloader-white .preloader-inner-gap,.preloader.preloader-white .preloader-inner-half-circle{border-color:#fff}.bg-white,.list-block .swipeout-actions-left a.bg-white,.list-block .swipeout-actions-right a.bg-white,a.bg-white{background-color:#fff}.list-block .bg-white .item-link.active-state,.list-block .item-link.bg-white.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-white.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-white.active-state,.list-block .item-linka.bg-white.active-state,.list-block .list-block .swipeout-actions-left a.bg-white .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-white .item-link.active-state,.list-block a.bg-white .item-link.active-state,.list-block.bg-white .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-white .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-white .item-link.active-state,.list-blocka.bg-white .item-link.active-state,html:not(.watch-active-state) .list-block .bg-white .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-white:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-white:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-white:active,html:not(.watch-active-state) .list-block .item-linka.bg-white:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-white .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-white .item-link:active,html:not(.watch-active-state) .list-block a.bg-white .item-link:active,html:not(.watch-active-state) .list-block.bg-white .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-white .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-white .item-link:active,html:not(.watch-active-state) .list-blocka.bg-white .item-link:active{background:rgba(0,0,0,.1)}.border-white{border-color:#fff}.border-white:after,.border-white:before,.list-block .border-white.item-inner:after,.list-block .border-white.item-inner:before,.list-block ul.border-white:after,.list-block ul.border-white:before{background-color:#fff}.floating-button.bg-white,.floating-button.color-white,.speed-dial-buttons a.bg-white,.speed-dial-buttons a.color-white{color:#fff;background:#fff}.floating-button.bg-white.active-state,.floating-button.color-white.active-state,.speed-dial-buttons a.bg-white.active-state,.speed-dial-buttons a.color-white.active-state,html:not(.watch-active-state) .floating-button.bg-white:active,html:not(.watch-active-state) .floating-button.color-white:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-white:active,html:not(.watch-active-state) .speed-dial-buttons a.color-white:active{background:rgba(0,0,0,.1)}.floating-button.bg-white i,.floating-button.color-white i,.speed-dial-buttons a.bg-white i,.speed-dial-buttons a.color-white i{color:inherit}.ripple-white .ripple-wave{background-color:rgba(255,255,255,.3)}.range-slider.color-white input[type=range]::-webkit-slider-thumb:before{background-color:#fff}.range-slider.color-white input[type=range]::-webkit-slider-thumb{background-color:#fff}.range-slider.color-white input[type=range]::-ms-thumb{background-color:#fff}.range-slider.color-white input[type=range]::-ms-fill-lower{background-color:#fff}.range-slider.color-white input[type=range]::-moz-range-thumb{background-color:#fff}.badge.color-white{background-color:#fff;color:#fff}.color-black{color:#000}.list-block .item-link.color-black,.list-block .item-link.list-button.color-black,.list-button.color-black,.tabbar a.active.color-black,a.color-black{color:#000}.label-switch input[type=checkbox]:checked+.checkbox.color-black,.label-switch.color-black input[type=checkbox]:checked+.checkbox{background-color:#000}.button.color-black:not(.button-fill),.color-black.buttons-row .button:not(.button-fill){color:#000!important}.button.button-fill.bg-black,.button.button-fill.color-black{background:#000!important;color:#fff}.button.button-fill.bg-black.active-state,.button.button-fill.color-black.active-state,html:not(.watch-active-state) .button.button-fill.bg-black:active,html:not(.watch-active-state) .button.button-fill.color-black:active{background:#333!important}.progressbar.bg-black,.progressbar.color-black{background-color:rgba(0,0,0,.5)}.progressbar.bg-black span,.progressbar.color-black span{background-color:#000}.progressbar-infinite.bg-black,.progressbar-infinite.color-black{background-color:rgba(0,0,0,.5)}.progressbar-infinite.bg-black:after,.progressbar-infinite.bg-black:before,.progressbar-infinite.color-black:after,.progressbar-infinite.color-black:before{background-color:#000}.color-black i.icon,i.icon.color-black{color:#000}.preloader.color-black svg circle,.preloader.preloader-black svg circle{stroke:#000}.preloader.color-black .preloader-inner-gap,.preloader.color-black .preloader-inner-half-circle,.preloader.preloader-black .preloader-inner-gap,.preloader.preloader-black .preloader-inner-half-circle{border-color:#000}.bg-black,.list-block .swipeout-actions-left a.bg-black,.list-block .swipeout-actions-right a.bg-black,a.bg-black{background-color:#000}.list-block .bg-black .item-link.active-state,.list-block .item-link.bg-black.active-state,.list-block .item-link.list-block .swipeout-actions-left a.bg-black.active-state,.list-block .item-link.list-block .swipeout-actions-right a.bg-black.active-state,.list-block .item-linka.bg-black.active-state,.list-block .list-block .swipeout-actions-left a.bg-black .item-link.active-state,.list-block .list-block .swipeout-actions-right a.bg-black .item-link.active-state,.list-block a.bg-black .item-link.active-state,.list-block.bg-black .item-link.active-state,.list-block.list-block .swipeout-actions-left a.bg-black .item-link.active-state,.list-block.list-block .swipeout-actions-right a.bg-black .item-link.active-state,.list-blocka.bg-black .item-link.active-state,html:not(.watch-active-state) .list-block .bg-black .item-link:active,html:not(.watch-active-state) .list-block .item-link.bg-black:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-left a.bg-black:active,html:not(.watch-active-state) .list-block .item-link.list-block .swipeout-actions-right a.bg-black:active,html:not(.watch-active-state) .list-block .item-linka.bg-black:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-left a.bg-black .item-link:active,html:not(.watch-active-state) .list-block .list-block .swipeout-actions-right a.bg-black .item-link:active,html:not(.watch-active-state) .list-block a.bg-black .item-link:active,html:not(.watch-active-state) .list-block.bg-black .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-left a.bg-black .item-link:active,html:not(.watch-active-state) .list-block.list-block .swipeout-actions-right a.bg-black .item-link:active,html:not(.watch-active-state) .list-blocka.bg-black .item-link:active{background:#333}.border-black{border-color:#000}.border-black:after,.border-black:before,.list-block .border-black.item-inner:after,.list-block .border-black.item-inner:before,.list-block ul.border-black:after,.list-block ul.border-black:before{background-color:#000}.floating-button.bg-black,.floating-button.color-black,.speed-dial-buttons a.bg-black,.speed-dial-buttons a.color-black{color:#fff;background:#000}.floating-button.bg-black.active-state,.floating-button.color-black.active-state,.speed-dial-buttons a.bg-black.active-state,.speed-dial-buttons a.color-black.active-state,html:not(.watch-active-state) .floating-button.bg-black:active,html:not(.watch-active-state) .floating-button.color-black:active,html:not(.watch-active-state) .speed-dial-buttons a.bg-black:active,html:not(.watch-active-state) .speed-dial-buttons a.color-black:active{background:#333}.floating-button.bg-black i,.floating-button.color-black i,.speed-dial-buttons a.bg-black i,.speed-dial-buttons a.color-black i{color:inherit}.ripple-black .ripple-wave{background-color:rgba(0,0,0,.3)}.range-slider.color-black input[type=range]::-webkit-slider-thumb:before{background-color:#000}.range-slider.color-black input[type=range]::-webkit-slider-thumb{background-color:#000}.range-slider.color-black input[type=range]::-ms-thumb{background-color:#000}.range-slider.color-black input[type=range]::-ms-fill-lower{background-color:#000}.range-slider.color-black input[type=range]::-moz-range-thumb{background-color:#000}.badge.color-black{background-color:#000;color:#fff} \ No newline at end of file diff --git a/bower_components/framework7/dist/css/framework7.material.css b/bower_components/framework7/dist/css/framework7.material.css new file mode 100644 index 00000000..894cce1d --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.material.css @@ -0,0 +1,8643 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * Google Material Theme + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +html, +body, +.framework7-root { + position: relative; + height: 100%; + width: 100%; + overflow-x: hidden; +} +body { + font-family: Roboto, Noto, Helvetica, Arial, sans-serif; + margin: 0; + padding: 0; + color: #212121; + font-size: 14px; + line-height: 1.5; + width: 100%; + -webkit-text-size-adjust: 100%; + background: #fff; + overflow: hidden; +} +.framework7-root { + overflow: hidden; +} +* { + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-touch-callout: none; +} +a, +input, +textarea, +select { + outline: 0; +} +a { + text-decoration: none; + color: #2196f3; +} +p { + margin: 1em 0; +} +/* === Grid === */ +.row { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.row > [class*="col-"] { + box-sizing: border-box; +} +.row .col-auto { + width: 100%; +} +.row .col-100 { + width: 100%; + width: -webkit-calc((100% - 16px*0) / 1); + width: calc((100% - 16px*0) / 1); +} +.row.no-gutter .col-100 { + width: 100%; +} +.row .col-95 { + width: 95%; + width: -webkit-calc((100% - 16px*0.05263157894736836) / 1.0526315789473684); + width: calc((100% - 16px*0.05263157894736836) / 1.0526315789473684); +} +.row.no-gutter .col-95 { + width: 95%; +} +.row .col-90 { + width: 90%; + width: -webkit-calc((100% - 16px*0.11111111111111116) / 1.1111111111111112); + width: calc((100% - 16px*0.11111111111111116) / 1.1111111111111112); +} +.row.no-gutter .col-90 { + width: 90%; +} +.row .col-85 { + width: 85%; + width: -webkit-calc((100% - 16px*0.17647058823529416) / 1.1764705882352942); + width: calc((100% - 16px*0.17647058823529416) / 1.1764705882352942); +} +.row.no-gutter .col-85 { + width: 85%; +} +.row .col-80 { + width: 80%; + width: -webkit-calc((100% - 16px*0.25) / 1.25); + width: calc((100% - 16px*0.25) / 1.25); +} +.row.no-gutter .col-80 { + width: 80%; +} +.row .col-75 { + width: 75%; + width: -webkit-calc((100% - 16px*0.33333333333333326) / 1.3333333333333333); + width: calc((100% - 16px*0.33333333333333326) / 1.3333333333333333); +} +.row.no-gutter .col-75 { + width: 75%; +} +.row .col-70 { + width: 70%; + width: -webkit-calc((100% - 16px*0.4285714285714286) / 1.4285714285714286); + width: calc((100% - 16px*0.4285714285714286) / 1.4285714285714286); +} +.row.no-gutter .col-70 { + width: 70%; +} +.row .col-66 { + width: 66.66666666666666%; + width: -webkit-calc((100% - 16px*0.5000000000000002) / 1.5000000000000002); + width: calc((100% - 16px*0.5000000000000002) / 1.5000000000000002); +} +.row.no-gutter .col-66 { + width: 66.66666666666666%; +} +.row .col-65 { + width: 65%; + width: -webkit-calc((100% - 16px*0.5384615384615385) / 1.5384615384615385); + width: calc((100% - 16px*0.5384615384615385) / 1.5384615384615385); +} +.row.no-gutter .col-65 { + width: 65%; +} +.row .col-60 { + width: 60%; + width: -webkit-calc((100% - 16px*0.6666666666666667) / 1.6666666666666667); + width: calc((100% - 16px*0.6666666666666667) / 1.6666666666666667); +} +.row.no-gutter .col-60 { + width: 60%; +} +.row .col-55 { + width: 55%; + width: -webkit-calc((100% - 16px*0.8181818181818181) / 1.8181818181818181); + width: calc((100% - 16px*0.8181818181818181) / 1.8181818181818181); +} +.row.no-gutter .col-55 { + width: 55%; +} +.row .col-50 { + width: 50%; + width: -webkit-calc((100% - 16px*1) / 2); + width: calc((100% - 16px*1) / 2); +} +.row.no-gutter .col-50 { + width: 50%; +} +.row .col-45 { + width: 45%; + width: -webkit-calc((100% - 16px*1.2222222222222223) / 2.2222222222222223); + width: calc((100% - 16px*1.2222222222222223) / 2.2222222222222223); +} +.row.no-gutter .col-45 { + width: 45%; +} +.row .col-40 { + width: 40%; + width: -webkit-calc((100% - 16px*1.5) / 2.5); + width: calc((100% - 16px*1.5) / 2.5); +} +.row.no-gutter .col-40 { + width: 40%; +} +.row .col-35 { + width: 35%; + width: -webkit-calc((100% - 16px*1.8571428571428572) / 2.857142857142857); + width: calc((100% - 16px*1.8571428571428572) / 2.857142857142857); +} +.row.no-gutter .col-35 { + width: 35%; +} +.row .col-33 { + width: 33.333333333333336%; + width: -webkit-calc((100% - 16px*2) / 3); + width: calc((100% - 16px*2) / 3); +} +.row.no-gutter .col-33 { + width: 33.333333333333336%; +} +.row .col-30 { + width: 30%; + width: -webkit-calc((100% - 16px*2.3333333333333335) / 3.3333333333333335); + width: calc((100% - 16px*2.3333333333333335) / 3.3333333333333335); +} +.row.no-gutter .col-30 { + width: 30%; +} +.row .col-25 { + width: 25%; + width: -webkit-calc((100% - 16px*3) / 4); + width: calc((100% - 16px*3) / 4); +} +.row.no-gutter .col-25 { + width: 25%; +} +.row .col-20 { + width: 20%; + width: -webkit-calc((100% - 16px*4) / 5); + width: calc((100% - 16px*4) / 5); +} +.row.no-gutter .col-20 { + width: 20%; +} +.row .col-15 { + width: 15%; + width: -webkit-calc((100% - 16px*5.666666666666667) / 6.666666666666667); + width: calc((100% - 16px*5.666666666666667) / 6.666666666666667); +} +.row.no-gutter .col-15 { + width: 15%; +} +.row .col-10 { + width: 10%; + width: -webkit-calc((100% - 16px*9) / 10); + width: calc((100% - 16px*9) / 10); +} +.row.no-gutter .col-10 { + width: 10%; +} +.row .col-5 { + width: 5%; + width: -webkit-calc((100% - 16px*19) / 20); + width: calc((100% - 16px*19) / 20); +} +.row.no-gutter .col-5 { + width: 5%; +} +.row .col-auto:nth-last-child(1), +.row .col-auto:nth-last-child(1) ~ .col-auto { + width: 100%; + width: -webkit-calc((100% - 16px*0) / 1); + width: calc((100% - 16px*0) / 1); +} +.row.no-gutter .col-auto:nth-last-child(1), +.row.no-gutter .col-auto:nth-last-child(1) ~ .col-auto { + width: 100%; +} +.row .col-auto:nth-last-child(2), +.row .col-auto:nth-last-child(2) ~ .col-auto { + width: 50%; + width: -webkit-calc((100% - 16px*1) / 2); + width: calc((100% - 16px*1) / 2); +} +.row.no-gutter .col-auto:nth-last-child(2), +.row.no-gutter .col-auto:nth-last-child(2) ~ .col-auto { + width: 50%; +} +.row .col-auto:nth-last-child(3), +.row .col-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; + width: -webkit-calc((100% - 16px*2) / 3); + width: calc((100% - 16px*2) / 3); +} +.row.no-gutter .col-auto:nth-last-child(3), +.row.no-gutter .col-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; +} +.row .col-auto:nth-last-child(4), +.row .col-auto:nth-last-child(4) ~ .col-auto { + width: 25%; + width: -webkit-calc((100% - 16px*3) / 4); + width: calc((100% - 16px*3) / 4); +} +.row.no-gutter .col-auto:nth-last-child(4), +.row.no-gutter .col-auto:nth-last-child(4) ~ .col-auto { + width: 25%; +} +.row .col-auto:nth-last-child(5), +.row .col-auto:nth-last-child(5) ~ .col-auto { + width: 20%; + width: -webkit-calc((100% - 16px*4) / 5); + width: calc((100% - 16px*4) / 5); +} +.row.no-gutter .col-auto:nth-last-child(5), +.row.no-gutter .col-auto:nth-last-child(5) ~ .col-auto { + width: 20%; +} +.row .col-auto:nth-last-child(6), +.row .col-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; + width: -webkit-calc((100% - 16px*5) / 6); + width: calc((100% - 16px*5) / 6); +} +.row.no-gutter .col-auto:nth-last-child(6), +.row.no-gutter .col-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; +} +.row .col-auto:nth-last-child(7), +.row .col-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; + width: -webkit-calc((100% - 16px*6) / 7); + width: calc((100% - 16px*6) / 7); +} +.row.no-gutter .col-auto:nth-last-child(7), +.row.no-gutter .col-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; +} +.row .col-auto:nth-last-child(8), +.row .col-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; + width: -webkit-calc((100% - 16px*7) / 8); + width: calc((100% - 16px*7) / 8); +} +.row.no-gutter .col-auto:nth-last-child(8), +.row.no-gutter .col-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; +} +.row .col-auto:nth-last-child(9), +.row .col-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; + width: -webkit-calc((100% - 16px*8) / 9); + width: calc((100% - 16px*8) / 9); +} +.row.no-gutter .col-auto:nth-last-child(9), +.row.no-gutter .col-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; +} +.row .col-auto:nth-last-child(10), +.row .col-auto:nth-last-child(10) ~ .col-auto { + width: 10%; + width: -webkit-calc((100% - 16px*9) / 10); + width: calc((100% - 16px*9) / 10); +} +.row.no-gutter .col-auto:nth-last-child(10), +.row.no-gutter .col-auto:nth-last-child(10) ~ .col-auto { + width: 10%; +} +.row .col-auto:nth-last-child(11), +.row .col-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; + width: -webkit-calc((100% - 16px*10) / 11); + width: calc((100% - 16px*10) / 11); +} +.row.no-gutter .col-auto:nth-last-child(11), +.row.no-gutter .col-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; +} +.row .col-auto:nth-last-child(12), +.row .col-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; + width: -webkit-calc((100% - 16px*11) / 12); + width: calc((100% - 16px*11) / 12); +} +.row.no-gutter .col-auto:nth-last-child(12), +.row.no-gutter .col-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; +} +.row .col-auto:nth-last-child(13), +.row .col-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; + width: -webkit-calc((100% - 16px*12) / 13); + width: calc((100% - 16px*12) / 13); +} +.row.no-gutter .col-auto:nth-last-child(13), +.row.no-gutter .col-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; +} +.row .col-auto:nth-last-child(14), +.row .col-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; + width: -webkit-calc((100% - 16px*13) / 14); + width: calc((100% - 16px*13) / 14); +} +.row.no-gutter .col-auto:nth-last-child(14), +.row.no-gutter .col-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; +} +.row .col-auto:nth-last-child(15), +.row .col-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; + width: -webkit-calc((100% - 16px*14) / 15); + width: calc((100% - 16px*14) / 15); +} +.row.no-gutter .col-auto:nth-last-child(15), +.row.no-gutter .col-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; +} +.row .col-auto:nth-last-child(16), +.row .col-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; + width: -webkit-calc((100% - 16px*15) / 16); + width: calc((100% - 16px*15) / 16); +} +.row.no-gutter .col-auto:nth-last-child(16), +.row.no-gutter .col-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; +} +.row .col-auto:nth-last-child(17), +.row .col-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; + width: -webkit-calc((100% - 16px*16) / 17); + width: calc((100% - 16px*16) / 17); +} +.row.no-gutter .col-auto:nth-last-child(17), +.row.no-gutter .col-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; +} +.row .col-auto:nth-last-child(18), +.row .col-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; + width: -webkit-calc((100% - 16px*17) / 18); + width: calc((100% - 16px*17) / 18); +} +.row.no-gutter .col-auto:nth-last-child(18), +.row.no-gutter .col-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; +} +.row .col-auto:nth-last-child(19), +.row .col-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; + width: -webkit-calc((100% - 16px*18) / 19); + width: calc((100% - 16px*18) / 19); +} +.row.no-gutter .col-auto:nth-last-child(19), +.row.no-gutter .col-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; +} +.row .col-auto:nth-last-child(20), +.row .col-auto:nth-last-child(20) ~ .col-auto { + width: 5%; + width: -webkit-calc((100% - 16px*19) / 20); + width: calc((100% - 16px*19) / 20); +} +.row.no-gutter .col-auto:nth-last-child(20), +.row.no-gutter .col-auto:nth-last-child(20) ~ .col-auto { + width: 5%; +} +.row .col-auto:nth-last-child(21), +.row .col-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; + width: -webkit-calc((100% - 16px*20) / 21); + width: calc((100% - 16px*20) / 21); +} +.row.no-gutter .col-auto:nth-last-child(21), +.row.no-gutter .col-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; +} +@media all and (min-width: 768px) { + .row .tablet-100 { + width: 100%; + width: -webkit-calc((100% - 16px*0) / 1); + width: calc((100% - 16px*0) / 1); + } + .row.no-gutter .tablet-100 { + width: 100%; + } + .row .tablet-95 { + width: 95%; + width: -webkit-calc((100% - 16px*0.05263157894736836) / 1.0526315789473684); + width: calc((100% - 16px*0.05263157894736836) / 1.0526315789473684); + } + .row.no-gutter .tablet-95 { + width: 95%; + } + .row .tablet-90 { + width: 90%; + width: -webkit-calc((100% - 16px*0.11111111111111116) / 1.1111111111111112); + width: calc((100% - 16px*0.11111111111111116) / 1.1111111111111112); + } + .row.no-gutter .tablet-90 { + width: 90%; + } + .row .tablet-85 { + width: 85%; + width: -webkit-calc((100% - 16px*0.17647058823529416) / 1.1764705882352942); + width: calc((100% - 16px*0.17647058823529416) / 1.1764705882352942); + } + .row.no-gutter .tablet-85 { + width: 85%; + } + .row .tablet-80 { + width: 80%; + width: -webkit-calc((100% - 16px*0.25) / 1.25); + width: calc((100% - 16px*0.25) / 1.25); + } + .row.no-gutter .tablet-80 { + width: 80%; + } + .row .tablet-75 { + width: 75%; + width: -webkit-calc((100% - 16px*0.33333333333333326) / 1.3333333333333333); + width: calc((100% - 16px*0.33333333333333326) / 1.3333333333333333); + } + .row.no-gutter .tablet-75 { + width: 75%; + } + .row .tablet-70 { + width: 70%; + width: -webkit-calc((100% - 16px*0.4285714285714286) / 1.4285714285714286); + width: calc((100% - 16px*0.4285714285714286) / 1.4285714285714286); + } + .row.no-gutter .tablet-70 { + width: 70%; + } + .row .tablet-66 { + width: 66.66666666666666%; + width: -webkit-calc((100% - 16px*0.5000000000000002) / 1.5000000000000002); + width: calc((100% - 16px*0.5000000000000002) / 1.5000000000000002); + } + .row.no-gutter .tablet-66 { + width: 66.66666666666666%; + } + .row .tablet-65 { + width: 65%; + width: -webkit-calc((100% - 16px*0.5384615384615385) / 1.5384615384615385); + width: calc((100% - 16px*0.5384615384615385) / 1.5384615384615385); + } + .row.no-gutter .tablet-65 { + width: 65%; + } + .row .tablet-60 { + width: 60%; + width: -webkit-calc((100% - 16px*0.6666666666666667) / 1.6666666666666667); + width: calc((100% - 16px*0.6666666666666667) / 1.6666666666666667); + } + .row.no-gutter .tablet-60 { + width: 60%; + } + .row .tablet-55 { + width: 55%; + width: -webkit-calc((100% - 16px*0.8181818181818181) / 1.8181818181818181); + width: calc((100% - 16px*0.8181818181818181) / 1.8181818181818181); + } + .row.no-gutter .tablet-55 { + width: 55%; + } + .row .tablet-50 { + width: 50%; + width: -webkit-calc((100% - 16px*1) / 2); + width: calc((100% - 16px*1) / 2); + } + .row.no-gutter .tablet-50 { + width: 50%; + } + .row .tablet-45 { + width: 45%; + width: -webkit-calc((100% - 16px*1.2222222222222223) / 2.2222222222222223); + width: calc((100% - 16px*1.2222222222222223) / 2.2222222222222223); + } + .row.no-gutter .tablet-45 { + width: 45%; + } + .row .tablet-40 { + width: 40%; + width: -webkit-calc((100% - 16px*1.5) / 2.5); + width: calc((100% - 16px*1.5) / 2.5); + } + .row.no-gutter .tablet-40 { + width: 40%; + } + .row .tablet-35 { + width: 35%; + width: -webkit-calc((100% - 16px*1.8571428571428572) / 2.857142857142857); + width: calc((100% - 16px*1.8571428571428572) / 2.857142857142857); + } + .row.no-gutter .tablet-35 { + width: 35%; + } + .row .tablet-33 { + width: 33.333333333333336%; + width: -webkit-calc((100% - 16px*2) / 3); + width: calc((100% - 16px*2) / 3); + } + .row.no-gutter .tablet-33 { + width: 33.333333333333336%; + } + .row .tablet-30 { + width: 30%; + width: -webkit-calc((100% - 16px*2.3333333333333335) / 3.3333333333333335); + width: calc((100% - 16px*2.3333333333333335) / 3.3333333333333335); + } + .row.no-gutter .tablet-30 { + width: 30%; + } + .row .tablet-25 { + width: 25%; + width: -webkit-calc((100% - 16px*3) / 4); + width: calc((100% - 16px*3) / 4); + } + .row.no-gutter .tablet-25 { + width: 25%; + } + .row .tablet-20 { + width: 20%; + width: -webkit-calc((100% - 16px*4) / 5); + width: calc((100% - 16px*4) / 5); + } + .row.no-gutter .tablet-20 { + width: 20%; + } + .row .tablet-15 { + width: 15%; + width: -webkit-calc((100% - 16px*5.666666666666667) / 6.666666666666667); + width: calc((100% - 16px*5.666666666666667) / 6.666666666666667); + } + .row.no-gutter .tablet-15 { + width: 15%; + } + .row .tablet-10 { + width: 10%; + width: -webkit-calc((100% - 16px*9) / 10); + width: calc((100% - 16px*9) / 10); + } + .row.no-gutter .tablet-10 { + width: 10%; + } + .row .tablet-5 { + width: 5%; + width: -webkit-calc((100% - 16px*19) / 20); + width: calc((100% - 16px*19) / 20); + } + .row.no-gutter .tablet-5 { + width: 5%; + } + .row .tablet-auto:nth-last-child(1), + .row .tablet-auto:nth-last-child(1) ~ .col-auto { + width: 100%; + width: -webkit-calc((100% - 16px*0) / 1); + width: calc((100% - 16px*0) / 1); + } + .row.no-gutter .tablet-auto:nth-last-child(1), + .row.no-gutter .tablet-auto:nth-last-child(1) ~ .tablet-auto { + width: 100%; + } + .row .tablet-auto:nth-last-child(2), + .row .tablet-auto:nth-last-child(2) ~ .col-auto { + width: 50%; + width: -webkit-calc((100% - 16px*1) / 2); + width: calc((100% - 16px*1) / 2); + } + .row.no-gutter .tablet-auto:nth-last-child(2), + .row.no-gutter .tablet-auto:nth-last-child(2) ~ .tablet-auto { + width: 50%; + } + .row .tablet-auto:nth-last-child(3), + .row .tablet-auto:nth-last-child(3) ~ .col-auto { + width: 33.33333333%; + width: -webkit-calc((100% - 16px*2) / 3); + width: calc((100% - 16px*2) / 3); + } + .row.no-gutter .tablet-auto:nth-last-child(3), + .row.no-gutter .tablet-auto:nth-last-child(3) ~ .tablet-auto { + width: 33.33333333%; + } + .row .tablet-auto:nth-last-child(4), + .row .tablet-auto:nth-last-child(4) ~ .col-auto { + width: 25%; + width: -webkit-calc((100% - 16px*3) / 4); + width: calc((100% - 16px*3) / 4); + } + .row.no-gutter .tablet-auto:nth-last-child(4), + .row.no-gutter .tablet-auto:nth-last-child(4) ~ .tablet-auto { + width: 25%; + } + .row .tablet-auto:nth-last-child(5), + .row .tablet-auto:nth-last-child(5) ~ .col-auto { + width: 20%; + width: -webkit-calc((100% - 16px*4) / 5); + width: calc((100% - 16px*4) / 5); + } + .row.no-gutter .tablet-auto:nth-last-child(5), + .row.no-gutter .tablet-auto:nth-last-child(5) ~ .tablet-auto { + width: 20%; + } + .row .tablet-auto:nth-last-child(6), + .row .tablet-auto:nth-last-child(6) ~ .col-auto { + width: 16.66666667%; + width: -webkit-calc((100% - 16px*5) / 6); + width: calc((100% - 16px*5) / 6); + } + .row.no-gutter .tablet-auto:nth-last-child(6), + .row.no-gutter .tablet-auto:nth-last-child(6) ~ .tablet-auto { + width: 16.66666667%; + } + .row .tablet-auto:nth-last-child(7), + .row .tablet-auto:nth-last-child(7) ~ .col-auto { + width: 14.28571429%; + width: -webkit-calc((100% - 16px*6) / 7); + width: calc((100% - 16px*6) / 7); + } + .row.no-gutter .tablet-auto:nth-last-child(7), + .row.no-gutter .tablet-auto:nth-last-child(7) ~ .tablet-auto { + width: 14.28571429%; + } + .row .tablet-auto:nth-last-child(8), + .row .tablet-auto:nth-last-child(8) ~ .col-auto { + width: 12.5%; + width: -webkit-calc((100% - 16px*7) / 8); + width: calc((100% - 16px*7) / 8); + } + .row.no-gutter .tablet-auto:nth-last-child(8), + .row.no-gutter .tablet-auto:nth-last-child(8) ~ .tablet-auto { + width: 12.5%; + } + .row .tablet-auto:nth-last-child(9), + .row .tablet-auto:nth-last-child(9) ~ .col-auto { + width: 11.11111111%; + width: -webkit-calc((100% - 16px*8) / 9); + width: calc((100% - 16px*8) / 9); + } + .row.no-gutter .tablet-auto:nth-last-child(9), + .row.no-gutter .tablet-auto:nth-last-child(9) ~ .tablet-auto { + width: 11.11111111%; + } + .row .tablet-auto:nth-last-child(10), + .row .tablet-auto:nth-last-child(10) ~ .col-auto { + width: 10%; + width: -webkit-calc((100% - 16px*9) / 10); + width: calc((100% - 16px*9) / 10); + } + .row.no-gutter .tablet-auto:nth-last-child(10), + .row.no-gutter .tablet-auto:nth-last-child(10) ~ .tablet-auto { + width: 10%; + } + .row .tablet-auto:nth-last-child(11), + .row .tablet-auto:nth-last-child(11) ~ .col-auto { + width: 9.09090909%; + width: -webkit-calc((100% - 16px*10) / 11); + width: calc((100% - 16px*10) / 11); + } + .row.no-gutter .tablet-auto:nth-last-child(11), + .row.no-gutter .tablet-auto:nth-last-child(11) ~ .tablet-auto { + width: 9.09090909%; + } + .row .tablet-auto:nth-last-child(12), + .row .tablet-auto:nth-last-child(12) ~ .col-auto { + width: 8.33333333%; + width: -webkit-calc((100% - 16px*11) / 12); + width: calc((100% - 16px*11) / 12); + } + .row.no-gutter .tablet-auto:nth-last-child(12), + .row.no-gutter .tablet-auto:nth-last-child(12) ~ .tablet-auto { + width: 8.33333333%; + } + .row .tablet-auto:nth-last-child(13), + .row .tablet-auto:nth-last-child(13) ~ .col-auto { + width: 7.69230769%; + width: -webkit-calc((100% - 16px*12) / 13); + width: calc((100% - 16px*12) / 13); + } + .row.no-gutter .tablet-auto:nth-last-child(13), + .row.no-gutter .tablet-auto:nth-last-child(13) ~ .tablet-auto { + width: 7.69230769%; + } + .row .tablet-auto:nth-last-child(14), + .row .tablet-auto:nth-last-child(14) ~ .col-auto { + width: 7.14285714%; + width: -webkit-calc((100% - 16px*13) / 14); + width: calc((100% - 16px*13) / 14); + } + .row.no-gutter .tablet-auto:nth-last-child(14), + .row.no-gutter .tablet-auto:nth-last-child(14) ~ .tablet-auto { + width: 7.14285714%; + } + .row .tablet-auto:nth-last-child(15), + .row .tablet-auto:nth-last-child(15) ~ .col-auto { + width: 6.66666667%; + width: -webkit-calc((100% - 16px*14) / 15); + width: calc((100% - 16px*14) / 15); + } + .row.no-gutter .tablet-auto:nth-last-child(15), + .row.no-gutter .tablet-auto:nth-last-child(15) ~ .tablet-auto { + width: 6.66666667%; + } + .row .tablet-auto:nth-last-child(16), + .row .tablet-auto:nth-last-child(16) ~ .col-auto { + width: 6.25%; + width: -webkit-calc((100% - 16px*15) / 16); + width: calc((100% - 16px*15) / 16); + } + .row.no-gutter .tablet-auto:nth-last-child(16), + .row.no-gutter .tablet-auto:nth-last-child(16) ~ .tablet-auto { + width: 6.25%; + } + .row .tablet-auto:nth-last-child(17), + .row .tablet-auto:nth-last-child(17) ~ .col-auto { + width: 5.88235294%; + width: -webkit-calc((100% - 16px*16) / 17); + width: calc((100% - 16px*16) / 17); + } + .row.no-gutter .tablet-auto:nth-last-child(17), + .row.no-gutter .tablet-auto:nth-last-child(17) ~ .tablet-auto { + width: 5.88235294%; + } + .row .tablet-auto:nth-last-child(18), + .row .tablet-auto:nth-last-child(18) ~ .col-auto { + width: 5.55555556%; + width: -webkit-calc((100% - 16px*17) / 18); + width: calc((100% - 16px*17) / 18); + } + .row.no-gutter .tablet-auto:nth-last-child(18), + .row.no-gutter .tablet-auto:nth-last-child(18) ~ .tablet-auto { + width: 5.55555556%; + } + .row .tablet-auto:nth-last-child(19), + .row .tablet-auto:nth-last-child(19) ~ .col-auto { + width: 5.26315789%; + width: -webkit-calc((100% - 16px*18) / 19); + width: calc((100% - 16px*18) / 19); + } + .row.no-gutter .tablet-auto:nth-last-child(19), + .row.no-gutter .tablet-auto:nth-last-child(19) ~ .tablet-auto { + width: 5.26315789%; + } + .row .tablet-auto:nth-last-child(20), + .row .tablet-auto:nth-last-child(20) ~ .col-auto { + width: 5%; + width: -webkit-calc((100% - 16px*19) / 20); + width: calc((100% - 16px*19) / 20); + } + .row.no-gutter .tablet-auto:nth-last-child(20), + .row.no-gutter .tablet-auto:nth-last-child(20) ~ .tablet-auto { + width: 5%; + } + .row .tablet-auto:nth-last-child(21), + .row .tablet-auto:nth-last-child(21) ~ .col-auto { + width: 4.76190476%; + width: -webkit-calc((100% - 16px*20) / 21); + width: calc((100% - 16px*20) / 21); + } + .row.no-gutter .tablet-auto:nth-last-child(21), + .row.no-gutter .tablet-auto:nth-last-child(21) ~ .tablet-auto { + width: 4.76190476%; + } +} +/* === Views === */ +.views, +.view { + position: relative; + height: 100%; + z-index: 5000; +} +.views { + overflow: auto; + -webkit-overflow-scrolling: touch; +} +.view { + width: 100%; + overflow: hidden; + box-sizing: border-box; +} +/* === Pages === */ +.pages { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; +} +.page { + box-sizing: border-box; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: #fff; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.page.cached { + display: none; +} +.page-on-left { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.page-on-right { + opacity: 0; + pointer-events: none; + -webkit-transform: translate3d(0, 56px, 0); + transform: translate3d(0, 56px, 0); +} +.page-content { + overflow: auto; + -webkit-overflow-scrolling: touch; + box-sizing: border-box; + height: 100%; + position: relative; + z-index: 1; +} +.page-transitioning { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.page-from-right-to-center { + pointer-events: none; + -webkit-animation: pageFromRightToCenter 300ms forwards; + animation: pageFromRightToCenter 300ms forwards; +} +.page-from-center-to-right { + pointer-events: none; + -webkit-animation: pageFromCenterToRight 300ms forwards; + animation: pageFromCenterToRight 300ms forwards; +} +@-webkit-keyframes pageFromRightToCenter { + from { + opacity: 0; + -webkit-transform: translate3d(0, 56px, 0); + } + to { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + } +} +@keyframes pageFromRightToCenter { + from { + opacity: 0; + transform: translate3d(0, 56px, 0); + } + to { + opacity: 1; + transform: translate3d(0, 0, 0); + } +} +@-webkit-keyframes pageFromCenterToRight { + from { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 56px, 0); + } +} +@keyframes pageFromCenterToRight { + from { + opacity: 1; + transform: translate3d(0, 0, 0); + } + to { + opacity: 0; + transform: translate3d(0, 56px, 0); + } +} +.page-from-center-to-left { + -webkit-animation: pageFromCenterToLeft 300ms forwards; + animation: pageFromCenterToLeft 300ms forwards; +} +.page-from-left-to-center { + -webkit-animation: pageFromLeftToCenter 300ms forwards; + animation: pageFromLeftToCenter 300ms forwards; +} +@-webkit-keyframes pageFromCenterToLeft { + from { + opacity: 1; + } + to { + opacity: 1; + } +} +@keyframes pageFromCenterToLeft { + from { + opacity: 1; + } + to { + opacity: 1; + } +} +@-webkit-keyframes pageFromLeftToCenter { + from { + opacity: 1; + } + to { + opacity: 1; + } +} +@keyframes pageFromLeftToCenter { + from { + opacity: 1; + } + to { + opacity: 1; + } +} +/* === Toolbars === */ +.navbar-inner, +.toolbar-inner { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + box-sizing: border-box; + overflow: hidden; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.navbar-inner { + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; +} +.toolbar-inner { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} +.navbar-inner.cached { + display: none; +} +.navbar, +.toolbar { + width: 100%; + box-sizing: border-box; + position: relative; + margin: 0; + z-index: 500; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + color: #fff; +} +.navbar b, +.toolbar b { + font-weight: 500; +} +.navbar ~ .toolbar { + z-index: 499; +} +.navbar, +.toolbar, +.subnavbar { + background: #2196f3; +} +.navbar a.link, +.toolbar a.link, +.subnavbar a.link { + text-decoration: none; + position: relative; + color: #fff; + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + padding: 0 16px; + min-width: 48px; +} +.navbar a.link:before, +.toolbar a.link:before, +.subnavbar a.link:before { + content: ''; + width: 152%; + height: 152%; + position: absolute; + left: -26%; + top: -26%; + background-image: -webkit-radial-gradient(center, circle cover, rgba(255, 255, 255, 0.15) 66%, rgba(255, 255, 255, 0) 66%); + background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 66%, rgba(255, 255, 255, 0) 66%); + background-repeat: no-repeat; + background-position: center; + background-size: 100% 100%; + opacity: 0; + pointer-events: none; + -webkit-transition-duration: 600ms; + transition-duration: 600ms; +} +html:not(.watch-active-state) .navbar a.link:active:before, +html:not(.watch-active-state) .toolbar a.link:active:before, +html:not(.watch-active-state) .subnavbar a.link:active:before, +.navbar a.link.active-state:before, +.toolbar a.link.active-state:before, +.subnavbar a.link.active-state:before { + opacity: 1; + -webkit-transition-duration: 150ms; + transition-duration: 150ms; +} +.navbar a.link i + span, +.toolbar a.link i + span, +.subnavbar a.link i + span, +.navbar a.link i + i, +.toolbar a.link i + i, +.subnavbar a.link i + i, +.navbar a.link span + i, +.toolbar a.link span + i, +.subnavbar a.link span + i, +.navbar a.link span + span, +.toolbar a.link span + span, +.subnavbar a.link span + span { + margin-left: 8px; +} +.navbar a.icon-only, +.toolbar a.icon-only, +.subnavbar a.icon-only { + min-width: 0; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; +} +.navbar i.icon, +.toolbar i.icon, +.subnavbar i.icon { + display: block; +} +.navbar .center, +.subnavbar .center { + font-size: 20px; + font-weight: 500; + text-align: center; + margin: 0 16px; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + line-height: 56px; + display: inline-block; + text-align: left; +} +.navbar .left, +.subnavbar .left, +.navbar .right, +.subnavbar .right { + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.navbar .right, +.subnavbar .right { + margin-left: auto; +} +.navbar .right:first-child, +.subnavbar .right:first-child { + position: absolute; + right: 16px; + height: 100%; +} +.navbar { + left: 0; + top: 0; + height: 56px; + font-size: 20px; +} +.navbar a.link { + line-height: 56px; + height: 56px; +} +.popup .navbar { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.subnavbar { + height: 48px; + width: 100%; + position: absolute; + left: 0; + top: 100%; + z-index: 20; + box-sizing: border-box; + padding: 0 16px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + overflow: hidden; +} +.subnavbar a.link { + line-height: 48px; + height: 48px; +} +.subnavbar .center { + line-height: 48px; +} +.subnavbar .center:first-child { + margin-left: 56px; +} +.navbar.no-border .subnavbar { + margin-top: 0; +} +.navbar-on-left .subnavbar, +.navbar-on-right .subnavbar { + pointer-events: none; +} +.navbar .subnavbar, +.page .subnavbar { + position: absolute; +} +.page > .subnavbar { + top: 0; + margin-top: 0; +} +.subnavbar > .buttons-row { + width: 100%; +} +.subnavbar .searchbar, +.subnavbar.searchbar { + position: absolute; +} +.subnavbar.searchbar, +.subnavbar .searchbar { + position: absolute; +} +.subnavbar .searchbar { + left: 0; + top: 0; +} +.toolbar { + left: 0; + bottom: 0; + height: 48px; + font-size: 14px; +} +.toolbar a.link { + line-height: 48px; + height: 48px; +} +.toolbar a { + -webkit-box-flex: 1; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + position: relative; + white-space: nowrap; + text-overflow: ellipsis; +} +.tabbar { + z-index: 5001; + overflow: hidden; + bottom: auto; + top: 0; +} +.tabbar .toolbar-inner { + padding-left: 0; + padding-right: 0; +} +.tabbar a.link { + line-height: 1.4; +} +.tabbar a.tab-link, +.tabbar a.link { + height: 100%; + width: 100%; + box-sizing: border-box; + padding-left: 0; + padding-right: 0; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -ms-flex: 1; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; + font-size: 14px; + text-transform: uppercase; +} +.tabbar i.icon { + height: 24px; +} +.tabbar a.tab-link { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + overflow: hidden; + color: rgba(255, 255, 255, 0.7); + position: relative; +} +.tabbar a.tab-link.active, +html:not(.watch-active-state) .tabbar a.tab-link:active, +.tabbar a.tab-link.active-state { + color: #ffffff; +} +.tabbar .tab-link-highlight { + position: absolute; + left: 0; + bottom: 0; + height: 3px; + background: #0a6ebd; + background: rgba(255, 255, 255, 0.5); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.tabbar-labels { + height: 72px; +} +.tabbar-labels a.tab-link, +.tabbar-labels a.link { + padding-top: 12px; + padding-bottom: 12px; + height: 100%; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} +.tabbar-labels span.tabbar-label { + line-height: 1; + display: block; + margin: 0; + margin-top: 10px; + position: relative; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + max-width: 100%; +} +.tabbar-labels.toolbar-bottom span.tabbar-label { + text-transform: none; +} +.tabbar-scrollable .toolbar-inner { + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; + overflow: auto; +} +.tabbar-scrollable .toolbar-inner::-webkit-scrollbar { + display: none !important; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + opacity: 0 !important; +} +.tabbar-scrollable a.tab-link, +.tabbar-scrollable a.link { + width: auto; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + -ms-flex: 0; + padding: 0 16px; +} +.toolbar-bottom { + bottom: 0; + top: auto; +} +.toolbar-bottom .tab-link-highlight { + bottom: auto; + top: 0; +} +.subnavbar input[type="text"], +.navbar input[type="text"], +.subnavbar input[type="password"], +.navbar input[type="password"], +.subnavbar input[type="search"], +.navbar input[type="search"], +.subnavbar input[type="email"], +.navbar input[type="email"], +.subnavbar input[type="tel"], +.navbar input[type="tel"], +.subnavbar input[type="url"], +.navbar input[type="url"] { + box-sizing: border-box; + width: 100%; + height: 32px; + display: block; + border: none; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border-radius: 0; + font-family: inherit; + color: #fff; + font-size: 16px; + font-weight: 400; + background-color: transparent; + padding: 0; + border-bottom: 1px solid #fff; +} +.subnavbar input[type="text"]::-webkit-input-placeholder, +.navbar input[type="text"]::-webkit-input-placeholder, +.subnavbar input[type="password"]::-webkit-input-placeholder, +.navbar input[type="password"]::-webkit-input-placeholder, +.subnavbar input[type="search"]::-webkit-input-placeholder, +.navbar input[type="search"]::-webkit-input-placeholder, +.subnavbar input[type="email"]::-webkit-input-placeholder, +.navbar input[type="email"]::-webkit-input-placeholder, +.subnavbar input[type="tel"]::-webkit-input-placeholder, +.navbar input[type="tel"]::-webkit-input-placeholder, +.subnavbar input[type="url"]::-webkit-input-placeholder, +.navbar input[type="url"]::-webkit-input-placeholder { + color: #ffffff; + opacity: 1; +} +/* === Relation between toolbar/navbar types and pages === */ +.page > .navbar, +.view > .navbar, +.views > .navbar, +.page > .toolbar, +.view > .toolbar, +.views > .toolbar { + position: absolute; +} +.subnavbar ~ .page-content { + padding-top: 48px; +} +.toolbar-fixed .page-content, +.tabbar-fixed .page-content { + padding-top: 48px; +} +.tabbar-labels-fixed .page-content { + padding-top: 72px; +} +.toolbar ~ .page-content { + padding-top: 48px; +} +.tabbar-labels ~ .page-content { + padding-top: 72px; +} +.toolbar-bottom ~ .page-content, +.messagebar ~ .page-content, +.toolbar-bottom ~ .pages .page-content, +.messagebar ~ .pages .page-content, +.toolbar-bottom ~ .view .page-content, +.messagebar ~ .view .page-content { + padding-top: 0; + padding-bottom: 48px; +} +.tabbar-labels.toolbar-bottom ~ .page-content, +.tabbar-labels.toolbar-bottom ~ .pages .page-content, +.tabbar-labels.toolbar-bottom ~ .page .page-content, +.tabbar-labels.toolbar-bottom ~ .view .page-content { + padding-bottom: 72px; +} +.navbar-fixed .page-content, +.navbar-through .page-content, +.navbar-fixed.pages .page-content, +.navbar-through.pages .page-content, +.navbar-fixed.view .page-content, +.navbar-through.view .page-content { + padding-top: 56px; +} +.navbar-fixed.toolbar-fixed .page-content, +.navbar-through.toolbar-fixed .page-content, +.navbar-fixed.tabbar-fixed .page-content, +.navbar-through.tabbar-fixed .page-content, +.navbar-fixed .toolbar-fixed .page-content, +.navbar-through .toolbar-fixed .page-content, +.navbar-fixed .tabbar-fixed .page-content, +.navbar-through .tabbar-fixed .page-content, +.toolbar-fixed .navbar-fixed .page-content, +.toolbar-fixed .navbar-through .page-content, +.tabbar-fixed .navbar-fixed .page-content, +.tabbar-fixed .navbar-through .page-content { + padding-top: 104px; +} +.navbar-fixed.toolbar-fixed .toolbar-bottom ~ .pages .page-content, +.navbar-through.toolbar-fixed .toolbar-bottom ~ .pages .page-content, +.navbar-fixed.tabbar-fixed .toolbar-bottom ~ .pages .page-content, +.navbar-through.tabbar-fixed .toolbar-bottom ~ .pages .page-content, +.navbar-fixed .toolbar-fixed .toolbar-bottom ~ .pages .page-content, +.navbar-through .toolbar-fixed .toolbar-bottom ~ .pages .page-content, +.navbar-fixed .tabbar-fixed .toolbar-bottom ~ .pages .page-content, +.navbar-through .tabbar-fixed .toolbar-bottom ~ .pages .page-content, +.toolbar-fixed .navbar-fixed .toolbar-bottom ~ .pages .page-content, +.toolbar-fixed .navbar-through .toolbar-bottom ~ .pages .page-content, +.tabbar-fixed .navbar-fixed .toolbar-bottom ~ .pages .page-content, +.tabbar-fixed .navbar-through .toolbar-bottom ~ .pages .page-content, +.navbar-fixed.toolbar-fixed .toolbar-bottom ~ .view .page-content, +.navbar-through.toolbar-fixed .toolbar-bottom ~ .view .page-content, +.navbar-fixed.tabbar-fixed .toolbar-bottom ~ .view .page-content, +.navbar-through.tabbar-fixed .toolbar-bottom ~ .view .page-content, +.navbar-fixed .toolbar-fixed .toolbar-bottom ~ .view .page-content, +.navbar-through .toolbar-fixed .toolbar-bottom ~ .view .page-content, +.navbar-fixed .tabbar-fixed .toolbar-bottom ~ .view .page-content, +.navbar-through .tabbar-fixed .toolbar-bottom ~ .view .page-content, +.toolbar-fixed .navbar-fixed .toolbar-bottom ~ .view .page-content, +.toolbar-fixed .navbar-through .toolbar-bottom ~ .view .page-content, +.tabbar-fixed .navbar-fixed .toolbar-bottom ~ .view .page-content, +.tabbar-fixed .navbar-through .toolbar-bottom ~ .view .page-content { + padding-top: 56px; +} +.navbar-fixed.tabbar-labels-fixed .page-content, +.navbar-through.tabbar-labels-fixed .page-content, +.navbar-fixed .tabbar-labels-fixed .page-content, +.navbar-through .tabbar-labels-fixed .page-content, +.tabbar-labels-fixed .navbar-fixed .page-content, +.tabbar-labels-fixed .navbar-through .page-content { + padding-top: 128px; +} +.navbar-fixed.tabbar-labels-fixed .toolbar-bottom ~ .pages .page-content, +.navbar-through.tabbar-labels-fixed .toolbar-bottom ~ .pages .page-content, +.navbar-fixed .tabbar-labels-fixed .toolbar-bottom ~ .pages .page-content, +.navbar-through .tabbar-labels-fixed .toolbar-bottom ~ .pages .page-content, +.tabbar-labels-fixed .navbar-fixed .toolbar-bottom ~ .pages .page-content, +.tabbar-labels-fixed .navbar-through .toolbar-bottom ~ .pages .page-content, +.navbar-fixed.tabbar-labels-fixed .toolbar-bottom ~ .view .page-content, +.navbar-through.tabbar-labels-fixed .toolbar-bottom ~ .view .page-content, +.navbar-fixed .tabbar-labels-fixed .toolbar-bottom ~ .view .page-content, +.navbar-through .tabbar-labels-fixed .toolbar-bottom ~ .view .page-content, +.tabbar-labels-fixed .navbar-fixed .toolbar-bottom ~ .view .page-content, +.tabbar-labels-fixed .navbar-through .toolbar-bottom ~ .view .page-content { + padding-top: 56px; +} +.navbar-fixed .toolbar ~ .page-content, +.navbar-through .toolbar ~ .page-content { + padding-top: 104px; +} +.navbar-fixed .messagebar ~ .page-content, +.navbar-through .messagebar ~ .page-content, +.navbar-fixed .toolbar-bottom ~ .page-content, +.navbar-through .toolbar-bottom ~ .page-content { + padding-top: 56px; +} +.navbar-fixed .tabbar-labels ~ .page-content, +.navbar-through .tabbar-labels ~ .page-content { + padding-top: 128px; +} +.navbar-fixed .tabbar-labels.toolbar-bottom ~ .page-content, +.navbar-through .tabbar-labels.toolbar-bottom ~ .page-content { + padding-top: 56px; +} +.navbar-fixed .with-subnavbar .page-content, +.navbar-through .with-subnavbar .page-content, +.navbar-fixed .page-content.with-subnavbar, +.navbar-through .page-content.with-subnavbar, +.navbar-fixed .subnavbar ~ .page-content, +.navbar-through .subnavbar ~ .page-content { + padding-top: 104px; +} +.navbar-fixed .page .subnavbar, +.navbar-through .page .subnavbar, +.navbar-fixed.page .subnavbar, +.navbar-through.page .subnavbar { + top: 56px; +} +.navbar-fixed .toolbar, +.navbar-through .toolbar { + top: 56px; +} +.navbar-fixed .messagebar, +.navbar-through .messagebar, +.navbar-fixed .toolbar-bottom, +.navbar-through .toolbar-bottom { + top: auto; +} +.navbar.navbar-hiding { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.navbar.navbar-hiding ~ .page-content .list-group-title, +.navbar.navbar-hiding ~ .pages .list-group-title, +.navbar.navbar-hiding ~ .page .list-group-title { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.navbar.navbar-hiding ~ .page-content .subnavbar, +.navbar.navbar-hiding ~ .pages .subnavbar, +.navbar.navbar-hiding ~ .page .subnavbar { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.navbar.navbar-hiding ~ .subnavbar, +.navbar.navbar-hiding ~ .toolbar { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.navbar.navbar-hidden { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); +} +.navbar.navbar-hidden ~ .page-content .list-group-title, +.navbar.navbar-hidden ~ .pages .list-group-title, +.navbar.navbar-hidden ~ .page .list-group-title { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + top: -56px; +} +.navbar.navbar-hidden ~ .page-content .subnavbar, +.navbar.navbar-hidden ~ .pages .subnavbar, +.navbar.navbar-hidden ~ .page .subnavbar { + -webkit-transform: translate3d(0, -56px, 0); + transform: translate3d(0, -56px, 0); + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.navbar.navbar-hidden ~ .subnavbar, +.navbar.navbar-hidden ~ .toolbar:not(.messagebar):not(.toolbar-bottom) { + -webkit-transform: translate3d(0, -56px, 0); + transform: translate3d(0, -56px, 0); + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.navbar.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.page.no-navbar .page-content { + padding-top: 0; +} +.page.no-navbar.with-subnavbar .page-content, +.with-subnavbar .page.no-navbar .page-content, +.page.no-navbar .page-content.with-subnavbar { + padding-top: 48px; +} +.toolbar.toolbar-hiding, +.tabbar.toolbar-hiding, +.toolbar.tabbar-hiding, +.tabbar.tabbar-hiding { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.toolbar.toolbar-hidden, +.tabbar.toolbar-hidden, +.toolbar.tabbar-hidden, +.tabbar.tabbar-hidden { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.toolbar.not-animated, +.tabbar.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.toolbar.toolbar-hidden, +.tabbar.toolbar-hidden, +.toolbar.tabbar-hidden, +.tabbar.tabbar-hidden { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); +} +.navbar ~ .toolbar.toolbar-hidden:not(.messagebar):not(.toolbar-bottom), +.navbar ~ .tabbar.toolbar-hidden:not(.messagebar):not(.toolbar-bottom), +.navbar ~ .toolbar.tabbar-hidden, +.navbar ~ .tabbar.tabbar-hidden { + -webkit-transform: translate3d(0, -104px, 0); + transform: translate3d(0, -104px, 0); +} +.navbar ~ .toolbar.tabbar-labels.toolbar-hidden, +.navbar ~ .tabbar.tabbar-labels.toolbar-hidden { + -webkit-transform: translate3d(0, -128px, 0); + transform: translate3d(0, -128px, 0); +} +.toolbar.toolbar-hidden.messagebar, +.tabbar.toolbar-hidden.messagebar, +.toolbar.toolbar-hidden.toolbar-bottom, +.tabbar.toolbar-hidden.toolbar-bottom { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.page.no-toolbar .page-content, +.page.no-tabbar .page-content { + padding-bottom: 0; +} +.navbar.no-shadow, +.toolbar.no-shadow { + box-shadow: none !important; +} +.navbar-fixed .subnavbar, +.navbar-through .subnavbar { + box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.2), 0px 4px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 1px 0px rgba(0, 0, 0, 0.12); +} +.navbar-fixed .navbar, +.navbar-through .navbar { + box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); +} +.navbar-fixed .navbar.navbar-hidden, +.navbar-through .navbar.navbar-hidden { + box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0), 0px 4px 5px 0px rgba(0, 0, 0, 0), 0px 1px 10px 0px rgba(0, 0, 0, 0) !important; +} +.toolbar-fixed .toolbar, +.tabbar-fixed .toolbar, +.tabbar-labels-fixed .toolbar { + box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); +} +.toolbar-fixed .toolbar.toolbar-hidden, +.tabbar-fixed .toolbar.toolbar-hidden, +.tabbar-labels-fixed .toolbar.toolbar-hidden { + box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0), 0px 4px 5px 0px rgba(0, 0, 0, 0), 0px 1px 10px 0px rgba(0, 0, 0, 0) !important; +} +.toolbar-fixed .toolbar-bottom, +.tabbar-fixed .toolbar-bottom, +.tabbar-labels-fixed .toolbar-bottom, +.toolbar-bottom { + box-shadow: 0px -2px 4px -1px rgba(0, 0, 0, 0.2), 0px -4px 5px 0px rgba(0, 0, 0, 0.14), 0px -1px 10px 0px rgba(0, 0, 0, 0.12); +} +.toolbar-bottom.toolbar-hidden { + box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0), 0px 4px 5px 0px rgba(0, 0, 0, 0), 0px 1px 10px 0px rgba(0, 0, 0, 0) !important; +} +.navbar-fixed.toolbar-fixed .navbar, +.navbar-through.toolbar-fixed .navbar, +.navbar-fixed .toolbar-fixed .navbar, +.navbar-through .toolbar-fixed .navbar, +.navbar-fixed.tabbar-fixed .navbar, +.navbar-through.tabbar-fixed .navbar, +.navbar-fixed .tabbar-fixed .navbar, +.navbar-through .tabbar-fixed .navbar, +.navbar-fixed.tabbar-labels-fixed .navbar, +.navbar-through.tabbar-labels-fixed .navbar, +.navbar-fixed .tabbar-labels-fixed .navbar, +.navbar-through .tabbar-labels-fixed .navbar { + box-shadow: none; +} +/* === Search Bar === */ +.searchbar { + height: 48px; + width: 100%; + background: #2196f3; + box-sizing: border-box; + padding: 0 16px; + overflow: hidden; + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + color: #fff; +} +.searchbar.no-shadow { + box-shadow: none; +} +.searchbar a { + position: relative; + color: #fff; +} +.searchbar a:before { + content: ''; + width: 152%; + height: 152%; + position: absolute; + left: -26%; + top: -26%; + background-image: -webkit-radial-gradient(center, circle cover, rgba(255, 255, 255, 0.15) 66%, rgba(255, 255, 255, 0) 66%); + background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 66%, rgba(255, 255, 255, 0) 66%); + background-repeat: no-repeat; + background-position: center; + background-size: 100% 100%; + opacity: 0; + pointer-events: none; + -webkit-transition-duration: 600ms; + transition-duration: 600ms; +} +html:not(.watch-active-state) .searchbar a:active:before, +.searchbar a.active-state:before { + opacity: 1; + -webkit-transition-duration: 150ms; + transition-duration: 150ms; +} +.searchbar .searchbar-input { + width: 100%; + height: 32px; + position: relative; + -webkit-box-flex: 1; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; +} +.searchbar input[type="search"] { + box-sizing: border-box; + width: 100%; + height: 32px; + display: block; + border: none; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border-radius: 0; + font-family: inherit; + color: #fff; + font-size: 16px; + font-weight: 400; + padding: 0; + border-bottom: 1px solid #fff; + height: 100%; + padding: 0 36px 0 24px; + background-color: transparent; + background-repeat: no-repeat; + background-position: 0 center; + opacity: 0.6; + -webkit-background-size: 24px 24px; + background-size: 24px 24px; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23FFFFFF'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M15.5%2014h-.79l-.28-.27C15.41%2012.59%2016%2011.11%2016%209.5%2016%205.91%2013.09%203%209.5%203S3%205.91%203%209.5%205.91%2016%209.5%2016c1.61%200%203.09-.59%204.23-1.57l.27.28v.79l5%204.99L20.49%2019l-4.99-5zm-6%200C7.01%2014%205%2011.99%205%209.5S7.01%205%209.5%205%2014%207.01%2014%209.5%2011.99%2014%209.5%2014z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +.searchbar input[type="search"]::-webkit-input-placeholder { + color: #ffffff; + opacity: 1; +} +.searchbar input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} +.searchbar .searchbar-clear { + position: absolute; + width: 56px; + height: 100%; + right: -16px; + top: 0; + opacity: 0; + pointer-events: none; + background-position: center; + background-repeat: no-repeat; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23fff'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); + -webkit-background-size: 24px 24px; + background-size: 24px 24px; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + cursor: pointer; +} +.searchbar .searchbar-cancel { + display: none; +} +.searchbar.searchbar-active input[type="search"] { + opacity: 1; +} +.searchbar.searchbar-active .searchbar-clear { + pointer-events: auto; + opacity: 1; +} +.searchbar.searchbar-not-empty .searchbar-clear { + pointer-events: auto; + opacity: 1; +} +.searchbar-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 100; + opacity: 0; + pointer-events: none; + background: rgba(0, 0, 0, 0.25); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.searchbar-overlay.searchbar-overlay-active { + opacity: 1; + pointer-events: auto; +} +.searchbar-not-found { + display: none; +} +.hidden-by-searchbar, +.list-block .hidden-by-searchbar, +.list-block li.hidden-by-searchbar { + display: none; +} +.page > .searchbar { + position: absolute; + width: 100%; + left: 0; + top: 0; + z-index: 200; + box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); +} +.page > .searchbar ~ .page-content { + padding-top: 48px; +} +.page > .searchbar.no-shadow { + box-shadow: none; +} +.navbar-fixed .page > .searchbar, +.navbar-through .page > .searchbar, +.navbar-fixed > .searchbar, +.navbar-through > .searchbar { + top: 56px; +} +.navbar-fixed .page > .searchbar ~ .page-content, +.navbar-through .page > .searchbar ~ .page-content, +.navbar-fixed > .searchbar ~ .page-content, +.navbar-through > .searchbar ~ .page-content { + padding-top: 104px; +} +/* === Message Bar === */ +.toolbar.messagebar { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + background: #fff; + height: 48px; + top: auto; + bottom: 0; + font-size: 16px; + overflow: hidden; +} +.toolbar.messagebar:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #d1d1d1; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .toolbar.messagebar:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .toolbar.messagebar:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.toolbar.messagebar textarea { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border: none; + background: none; + border-radius: 0; + box-shadow: none; + display: block; + padding: 3px 8px 3px; + margin: 0; + width: 100%; + height: 28px; + color: #333; + font-size: 16px; + line-height: 22px; + font-family: inherit; + resize: none; + -webkit-box-flex: 1; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; +} +.toolbar.messagebar a.link { + color: #333; + -ms-flex-item-align: flex-end; + -webkit-align-self: flex-end; + align-self: flex-end; + height: 48px; + line-height: 48px; +} +.toolbar.messagebar a.link:before { + background-image: -webkit-radial-gradient(center, circle cover, rgba(0, 0, 0, 0.1) 66%, rgba(0, 0, 0, 0) 66%); + background-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 66%, rgba(0, 0, 0, 0) 66%); +} +.toolbar.messagebar .link { + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; +} +.toolbar.messagebar ~ .page-content { + padding-bottom: 48px; +} +.page.no-toolbar .toolbar.messagebar ~ .page-content, +.page.no-tabbar .toolbar.messagebar ~ .page-content { + padding-bottom: 48px; +} +.hidden-toolbar .toolbar.messagebar { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +/* === Icons === */ +i.icon { + display: inline-block; + vertical-align: middle; + background-size: 100% auto; + background-position: center; + background-repeat: no-repeat; + font-style: normal; + position: relative; + /* Material Icons http://google.github.io/material-design-icons/ */ +} +i.icon.icon-back { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-forward { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-bars { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-camera { + width: 24px; + height: 24px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23333'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'3.2'%2F%3E%3Cpath%20d%3D'M9%202L7.17%204H4c-1.1%200-2%20.9-2%202v12c0%201.1.9%202%202%202h16c1.1%200%202-.9%202-2V6c0-1.1-.9-2-2-2h-3.17L15%202H9zm3%2015c-2.76%200-5-2.24-5-5s2.24-5%205-5%205%202.24%205%205-2.24%205-5%205z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-f7 { + width: 24px; + height: 24px; + background-image: url("../img/i-f7-material.png"); + border-radius: 3px; +} +i.icon.icon-next, +i.icon.icon-prev { + width: 24px; + height: 24px; +} +i.icon.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-plus { + width: 24px; + height: 24px; + font-size: 0; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23FFFFFF'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M19%2013h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-close { + width: 24px; + height: 24px; + font-size: 0; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23FFFFFF'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +.badge { + font-size: 10px; + display: inline-block; + color: #fff; + background: #8e8e93; + border-radius: 3px; + padding: 1px 6px; + box-sizing: border-box; + vertical-align: middle; +} +.icon .badge, +.f7-icons .badge, +.material-icons .badge, +.framework7-icons .badge { + position: absolute; + left: 100%; + margin-left: -10px; + top: -2px; + font-size: 10px; + line-height: 1.4; + padding: 1px 5px; + font-family: Roboto, Noto, Helvetica, Arial, sans-serif; +} +/* === Chips === */ +.chip { + font-size: 13px; + font-weight: normal; + color: rgba(0, 0, 0, 0.87); + background: rgba(0, 0, 0, 0.12); + display: inline-block; + height: 32px; + line-height: 32px; + border-radius: 16px; + padding: 0 12px; + box-sizing: border-box; + vertical-align: middle; + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: -webkit-inline-flex; + display: inline-flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + margin: 2px 0; +} +.chip-media { + width: 32px; + height: 32px; + margin-left: -12px; + vertical-align: top; + border-radius: 50%; + text-align: center; + line-height: 32px; + color: #fff; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + font-size: 16px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; +} +.chip-media img { + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; + border-radius: 50%; + display: block; +} +.chip-media + .chip-label { + margin-left: 8px; +} +.chip-label { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + position: relative; + -webkit-box-flex: 1; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + min-width: 0; +} +.chip-label + .chip-delete { + margin-left: 4px; +} +.chip-delete { + margin-right: -8px; + width: 24px; + height: 24px; + text-align: center; + line-height: 24px; + cursor: pointer; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23000'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M12%202C6.47%202%202%206.47%202%2012s4.47%2010%2010%2010%2010-4.47%2010-10S17.53%202%2012%202zm5%2013.59L15.59%2017%2012%2013.41%208.41%2017%207%2015.59%2010.59%2012%207%208.41%208.41%207%2012%2010.59%2015.59%207%2017%208.41%2013.41%2012%2017%2015.59z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); + background-repeat: no-repeat; + background-position: center; + background-size: 20px 20px; + opacity: 0.54; +} +html:not(.watch-active-state) .chip-delete:active, +.chip-delete.active-state { + opacity: 1; +} +/* === Content Block === */ +.content-block { + margin: 32px 0; + padding: 0 16px; + box-sizing: border-box; +} +.content-block.no-hairlines:before, +.content-block.no-hairlines ul:before, +.content-block.no-hairlines .content-block-inner:before { + display: none; +} +.content-block.no-hairlines:after, +.content-block.no-hairlines ul:after, +.content-block.no-hairlines .content-block-inner:after { + display: none; +} +.content-block-title { + position: relative; + overflow: hidden; + margin: 0; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 14px; + line-height: 1; + margin: 16px 16px 16px; + padding-top: 16px; + line-height: 16px; + font-weight: 500; + color: rgba(0, 0, 0, 0.54); +} +.content-block-title + .list-block, +.content-block-title + .content-block, +.content-block-title + .card, +.content-block-title + .timeline { + margin-top: 0px; +} +.content-block-inner { + padding: 16px 16px; + margin-left: -16px; + width: 100%; + position: relative; +} +.content-block-inner:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .content-block-inner:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .content-block-inner:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.content-block-inner:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .content-block-inner:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .content-block-inner:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.content-block-inner > p:first-child { + margin-top: 0; +} +.content-block-inner > p:last-child { + margin-bottom: 0; +} +.content-block.inset { + margin-left: 16px; + margin-right: 16px; + border-radius: 7px; +} +.content-block.inset .content-block-inner { + border-radius: 4px; +} +.content-block.inset .content-block-inner:before { + display: none; +} +.content-block.inset .content-block-inner:after { + display: none; +} +@media all and (min-width: 768px) { + .content-block.tablet-inset { + margin-left: 16px; + margin-right: 16px; + border-radius: 4px; + } + .content-block.tablet-inset .content-block-inner { + border-radius: 4px; + } + .content-block.tablet-inset .content-block-inner:before { + display: none; + } + .content-block.tablet-inset .content-block-inner:after { + display: none; + } +} +/* === Lists === */ +.list-block { + margin: 32px 0; + font-size: 16px; +} +.list-block ul { + list-style: none; + padding: 0; + margin: 0; + position: relative; +} +.list-block ul:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .list-block ul:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .list-block ul:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.list-block ul:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .list-block ul:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .list-block ul:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.list-block ul ul { + padding-left: 56px; +} +.list-block ul ul:before { + display: none; +} +.list-block ul ul:after { + display: none; +} +.list-block .align-top, +.list-block .align-top .item-content, +.list-block .align-top .item-inner { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.list-block.inset { + margin-left: 16px; + margin-right: 16px; + border-radius: 4px; +} +.list-block.inset .content-block-title { + margin-left: 0; + margin-right: 0; +} +.list-block.inset ul { + border-radius: 4px; +} +.list-block.inset ul:before { + display: none; +} +.list-block.inset ul:after { + display: none; +} +.list-block.inset li:first-child > a { + border-radius: 4px 4px 0 0; +} +.list-block.inset li:last-child > a { + border-radius: 0 0 4px 4px; +} +.list-block.inset li:first-child:last-child > a { + border-radius: 4px; +} +@media all and (min-width: 768px) { + .list-block.tablet-inset { + margin-left: 16px; + margin-right: 16px; + border-radius: 4px; + } + .list-block.tablet-inset .content-block-title { + margin-left: 0; + margin-right: 0; + } + .list-block.tablet-inset ul { + border-radius: 4px; + } + .list-block.tablet-inset ul:before { + display: none; + } + .list-block.tablet-inset ul:after { + display: none; + } + .list-block.tablet-inset li:first-child > a { + border-radius: 4px 4px 0 0; + } + .list-block.tablet-inset li:last-child > a { + border-radius: 0 0 4px 4px; + } + .list-block.tablet-inset li:first-child:last-child > a { + border-radius: 4px; + } + .list-block.tablet-inset .content-block-title { + margin-left: 0; + margin-right: 0; + } + .list-block.tablet-inset ul { + border-radius: 4px; + } + .list-block.tablet-inset ul:before { + display: none; + } + .list-block.tablet-inset ul:after { + display: none; + } + .list-block.tablet-inset li:first-child > a { + border-radius: 4px 4px 0 0; + } + .list-block.tablet-inset li:last-child > a { + border-radius: 0 0 4px 4px; + } + .list-block.tablet-inset li:first-child:last-child > a { + border-radius: 4px; + } +} +.list-block li { + box-sizing: border-box; + position: relative; +} +.list-block .item-media { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + -webkit-box-lines: single; + -moz-box-lines: single; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: none; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + box-sizing: border-box; + padding-top: 8px; + padding-bottom: 8px; + min-width: 40px; +} +.list-block .item-media i + i { + margin-left: 8px; +} +.list-block .item-media i + img { + margin-left: 8px; +} +.list-block .item-media + .item-inner { + margin-left: 16px; +} +.list-block .item-inner { + padding-right: 16px; + position: relative; + width: 100%; + padding-top: 8px; + padding-bottom: 8px; + min-height: 48px; + box-sizing: border-box; + -webkit-box-flex: 1; + -ms-flex: 1; + min-width: 0; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -ms-flex-item-align: stretch; + -webkit-align-self: stretch; + align-self: stretch; +} +.list-block .item-inner:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .list-block .item-inner:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .list-block .item-inner:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.list-block .item-title { + min-width: 0; + -webkit-box-flex: 1; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + white-space: nowrap; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; +} +.list-block .item-after { + white-space: nowrap; + color: #757575; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + margin-left: auto; + padding-left: 8px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + max-height: 28px; + font-size: 14px; +} +.list-block .smart-select .item-after, +.list-block .autocomplete-opener .item-after { + max-width: 70%; + overflow: hidden; + text-overflow: ellipsis; + position: relative; + display: block; +} +.list-block .item-actions { + margin-left: auto; + padding-left: 8px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} +.list-block .item-actions a { + min-width: 24px; + position: relative; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; +} +.list-block .item-actions a + a { + margin-left: 8px; +} +.list-block .item-after + .item-actions { + margin-left: 0; +} +.list-block .item-link, +.list-block .list-button { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + display: block; + color: inherit; + position: relative; + overflow: hidden; + z-index: 0; +} +.list-block .item-link .item-inner, +.list-block .list-button .item-inner { + padding-right: 42px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E"); + background-size: 10px 20px; + background-repeat: no-repeat; + background-position: 95% center; + background-position: -webkit-calc(100% - 16px) center; + background-position: calc(100% - 16px) center; +} +html:not(.watch-active-state) .list-block .item-link:active, +html:not(.watch-active-state) .list-block .list-button:active, +.list-block .item-link.active-state, +.list-block .list-button.active-state { + background-color: rgba(0, 0, 0, 0.1); +} +.list-block .list-button { + padding: 0 16px; + font-size: 16px; + display: block; + line-height: 48px; +} +.list-block .item-content { + box-sizing: border-box; + padding-left: 16px; + min-height: 48px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.list-block .list-block-label { + margin: 10px 0 35px; + padding: 0 16px; + font-size: 14px; + color: rgba(0, 0, 0, 0.54); +} +.list-block .swipeout { + overflow: hidden; + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; +} +.list-block .swipeout.deleting { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block .swipeout.deleting .swipeout-content { + -webkit-transform: translateX(-100%); + transform: translateX(-100%); +} +.list-block .swipeout.transitioning .swipeout-content, +.list-block .swipeout.transitioning .swipeout-actions-right a, +.list-block .swipeout.transitioning .swipeout-actions-left a, +.list-block .swipeout.transitioning .swipeout-overswipe { + -webkit-transition: 300ms; + transition: 300ms; +} +.list-block .swipeout-content { + position: relative; + z-index: 10; +} +.list-block .swipeout-overswipe { + -webkit-transition: 200ms left; + transition: 200ms left; +} +.list-block .swipeout-actions-left, +.list-block .swipeout-actions-right { + position: absolute; + top: 0; + height: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.list-block .swipeout-actions-left a, +.list-block .swipeout-actions-right a { + padding: 0 24px; + color: #fff; + background: #c7c7cc; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + position: relative; + left: 0; +} +.list-block .swipeout-actions-left a:after, +.list-block .swipeout-actions-right a:after { + content: ''; + position: absolute; + top: 0; + width: 600%; + height: 100%; + background: inherit; + z-index: -1; +} +.list-block .swipeout-actions-left a.swipeout-delete, +.list-block .swipeout-actions-right a.swipeout-delete { + background: #f44336; +} +.list-block .swipeout-actions-right { + right: 0%; + -webkit-transform: translateX(100%); + transform: translateX(100%); +} +.list-block .swipeout-actions-right a:after { + left: 100%; + margin-left: -1px; +} +.list-block .swipeout-actions-left { + left: 0%; + -webkit-transform: translateX(-100%); + transform: translateX(-100%); +} +.list-block .swipeout-actions-left a:after { + right: 100%; + margin-right: -1px; +} +.list-block .item-subtitle { + font-size: 14px; + position: relative; + overflow: hidden; + white-space: nowrap; + max-width: 100%; + text-overflow: ellipsis; +} +.list-block .item-text { + font-size: 14px; + color: #757575; + line-height: 20px; + position: relative; + overflow: hidden; + max-height: 40px; + text-overflow: ellipsis; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + display: -webkit-box; +} +.list-block.media-list .item-inner, +.list-block li.media-item .item-inner { + display: block; + padding-top: 14px; + padding-bottom: 14px; + -ms-flex-item-align: stretch; + -webkit-align-self: stretch; + align-self: stretch; +} +.list-block.media-list .item-link .item-inner, +.list-block li.media-item .item-link .item-inner { + background: none; + padding-right: 16px; +} +.list-block.media-list .item-link .item-title-row, +.list-block li.media-item .item-link .item-title-row { + padding-right: 26px; + background: no-repeat right top; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E"); + background-size: 10px 20px; +} +.list-block.media-list .item-media, +.list-block li.media-item .item-media { + padding-top: 14px; + padding-bottom: 14px; + -ms-flex-item-align: flex-start; + -webkit-align-self: flex-start; + align-self: flex-start; +} +.list-block.media-list .item-media img, +.list-block li.media-item .item-media img { + display: block; +} +.list-block.media-list .item-title-row, +.list-block li.media-item .item-title-row { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} +.list-block.media-list .item-content > .item-after, +.list-block li.media-item .item-content > .item-after { + padding-top: 14px; + padding-bottom: 14px; + -ms-flex-item-align: flex-start; + -webkit-align-self: flex-start; + align-self: flex-start; +} +.list-block .list-group ul:after, +.list-block .list-group ul:before { + z-index: 11; +} +.list-block .list-group + .list-group ul:before { + display: none; +} +.list-block .item-divider, +.list-block .list-group-title { + background: #f4f4f4; + padding: 0px 16px; + white-space: nowrap; + position: relative; + max-width: 100%; + text-overflow: ellipsis; + overflow: hidden; + color: rgba(0, 0, 0, 0.54); + height: 48px; + box-sizing: border-box; + line-height: 48px; + font-size: 14px; +} +.list-block .item-divider:before, +.list-block .list-group-title:before { + display: none; +} +.list-block .list-group-title { + position: relative; + position: -webkit-sticky; + position: -moz-sticky; + position: sticky; + top: 0px; + z-index: 10; + margin-top: 0; +} +.list-block .sortable-handler { + position: absolute; + right: 0; + top: 0; + bottom: 1px; + z-index: 10; + background-repeat: no-repeat; + background-size: 18px 12px; + background-position: center; + width: 50px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2018%2012'%20fill%3D'%23c7c7cc'%3E%3Cpath%20d%3D'M0%2C2V0h22v2H0z'%2F%3E%3Cpath%20d%3D'M0%2C7V5h22v2H0z'%2F%3E%3Cpath%20d%3D'M0%2C12v-2h22v2H0z'%2F%3E%3C%2Fsvg%3E"); + opacity: 0; + visibility: hidden; + cursor: pointer; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block.sortable .item-inner { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block.sortable-opened .sortable-handler { + visibility: visible; + opacity: 1; +} +.list-block.sortable-opened .item-inner, +.list-block.sortable-opened .item-link .item-inner { + padding-right: 50px; +} +.list-block.sortable-opened .item-link .item-inner, +.list-block.sortable-opened .item-link .item-title-row { + background-image: none; +} +.list-block.sortable-sorting li { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block li.sorting { + z-index: 50; + background: rgba(255, 255, 255, 0.8); + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.list-block li.sorting .item-inner:after { + display: none; +} +.list-block li:last-child .list-button:after { + display: none; +} +.list-block li:last-child .item-inner:after, +.list-block li:last-child li:last-child .item-inner:after { + display: none; +} +.list-block li li:last-child .item-inner:after, +.list-block li:last-child li .item-inner:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .list-block li li:last-child .item-inner:after, +html.pixel-ratio-2 .list-block li:last-child li .item-inner:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .list-block li li:last-child .item-inner:after, +html.pixel-ratio-3 .list-block li:last-child li .item-inner:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.list-block.no-hairlines:before, +.list-block.no-hairlines ul:before, +.list-block.no-hairlines .content-block-inner:before { + display: none; +} +.list-block.no-hairlines:after, +.list-block.no-hairlines ul:after, +.list-block.no-hairlines .content-block-inner:after { + display: none; +} +.list-block.no-hairlines-between .item-inner:after, +.list-block.no-hairlines-between .list-button:after, +.list-block.no-hairlines-between .item-divider:after, +.list-block.no-hairlines-between .list-group-title:after, +.list-block.no-hairlines-between .list-group-title:after { + display: none; +} +/* === Contacts === */ +.contacts-block { + margin: 0; +} +.contacts-block .list-group-title { + padding: 0 16px; + pointer-events: none; + background: none; + color: #888888; + line-height: 48px; + height: 48px; + font-size: 20px; + font-weight: 500; + overflow: visible; + width: 56px; + top: 0; +} +.contacts-block .list-group-title + li { + margin-top: -48px; +} +.contacts-block .list-group:first-child ul:before { + display: none; +} +.contacts-block .list-group:last-child ul:after { + display: none; +} +.contacts-block li:not(.list-group-title) { + padding-left: 56px; +} +/* === Forms === */ +.list-block input[type="text"], +.list-block input[type="password"], +.list-block input[type="search"], +.list-block input[type="email"], +.list-block input[type="tel"], +.list-block input[type="url"], +.list-block input[type="date"], +.list-block input[type="datetime-local"], +.list-block input[type="time"], +.list-block input[type="number"], +.list-block select, +.list-block textarea { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + box-sizing: border-box; + border: none; + background: none; + border-radius: 0 0 0 0; + box-shadow: none; + display: block; + padding: 0; + margin: 0; + width: 100%; + height: 36px; + color: #212121; + font-size: 16px; + font-family: inherit; +} +.list-block input[type="text"]::-webkit-input-placeholder, +.list-block input[type="password"]::-webkit-input-placeholder, +.list-block input[type="search"]::-webkit-input-placeholder, +.list-block input[type="email"]::-webkit-input-placeholder, +.list-block input[type="tel"]::-webkit-input-placeholder, +.list-block input[type="url"]::-webkit-input-placeholder, +.list-block input[type="date"]::-webkit-input-placeholder, +.list-block input[type="datetime-local"]::-webkit-input-placeholder, +.list-block input[type="time"]::-webkit-input-placeholder, +.list-block input[type="number"]::-webkit-input-placeholder, +.list-block select::-webkit-input-placeholder, +.list-block textarea::-webkit-input-placeholder { + color: rgba(0, 0, 0, 0.35); +} +.list-block .label, +.list-block .floating-label { + vertical-align: top; + color: rgba(0, 0, 0, 0.65); + -webkit-transition-duration: 200ms; + transition-duration: 200ms; + width: 35%; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; +} +.list-block input[type="date"], +.list-block input[type="datetime-local"] { + line-height: 44px; +} +.list-block select { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; +} +.list-block textarea { + resize: none; + line-height: 1.4; + padding-top: 8px; + padding-bottom: 7px; + height: 100px; +} +.list-block textarea.resizable { + height: 36px; +} +.list-block .item-input { + width: 100%; + -ms-flex: 1; + -webkit-box-flex: 1; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + font-size: 0; + position: relative; + margin-bottom: 4px; + min-height: 36px; +} +.list-block .input-item ul:after, +.list-block.inputs-list ul:after { + display: none; +} +.list-block .input-item .item-media, +.list-block.inputs-list .item-media { + -ms-flex-item-align: flex-end; + -webkit-align-self: flex-end; + align-self: flex-end; + min-height: 36px; + margin-bottom: 8px; + padding: 0; +} +.list-block .input-item .item-inner, +.list-block.inputs-list .item-inner { + display: block; + margin-bottom: 4px; + padding-bottom: 0; +} +.list-block .input-item .item-inner:after, +.list-block.inputs-list .item-inner:after { + display: none; +} +.list-block .input-item .label, +.list-block.inputs-list .label, +.list-block .input-item .floating-label, +.list-block.inputs-list .floating-label { + width: 100%; + font-size: 12px; +} +.list-block .input-item .floating-label, +.list-block.inputs-list .floating-label { + -webkit-transform-origin: left; + transform-origin: left; + -webkit-transform: scale(1.33333333) translateY(21px); + transform: scale(1.33333333) translateY(21px); + color: rgba(0, 0, 0, 0.35); + width: auto; + max-width: 75%; +} +.list-block .input-item .floating-label ~ .item-input input::-webkit-input-placeholder, +.list-block.inputs-list .floating-label ~ .item-input input::-webkit-input-placeholder { + color: transparent; +} +.list-block .focus-state .floating-label, +.list-block .not-empty-state .floating-label { + color: rgba(0, 0, 0, 0.65); + -webkit-transform: scale(1) translateY(0); + transform: scale(1) translateY(0); +} +.list-block .focus-state.item-inner .label { + color: #2196f3; +} +.list-block .focus-state.input-field:after, +.list-block .focus-state .item-input-field:after { + background: #2196f3; +} +.list-block .focus-state .label, +.list-block .focus-state .floating-label { + color: #2196f3; +} +.list-block .not-empty-state.item-inner .label { + color: rgba(0, 0, 0, 0.65); +} +.list-block .not-empty-state.input-field:after, +.list-block .not-empty-state .item-input-field:after { + background: rgba(0, 0, 0, 0.12); + transform: none !important; +} +.item-input-field, +.input-field { + position: relative; +} +.item-input-field:after, +.input-field:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .item-input-field:after, +html.pixel-ratio-2 .input-field:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .item-input-field:after, +html.pixel-ratio-3 .input-field:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.item-input-field:after, +.input-field:after { + -webkit-transition-duration: 200ms; + transition-duration: 200ms; +} +.item-input-field.focus-state:after, +.input-field.focus-state:after, +.item-input-field.not-empty-state:after, +.input-field.not-empty-state:after, +.focus-state .item-input-field:after, +.focus-state .input-field:after, +.not-empty-state .item-input-field:after, +.not-empty-state .input-field:after { + background: #2196f3; + -webkit-transform: scaleY(2) !important; + transform: scaleY(2) !important; +} +textarea.resizable { + overflow: hidden; +} +.label-switch { + display: inline-block; + vertical-align: middle; + width: 36px; + height: 14px; + position: relative; + cursor: pointer; + -ms-flex-item-align: center; + -webkit-align-self: center; + align-self: center; +} +.label-switch .checkbox { + width: 36px; + border-radius: 36px; + box-sizing: border-box; + height: 14px; + background: #b0afaf; + z-index: 0; + margin: 0; + padding: 0; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border: none; + cursor: pointer; + position: relative; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.label-switch .checkbox:after { + content: ' '; + height: 20px; + width: 20px; + border-radius: 20px; + background: #fff; + position: absolute; + z-index: 2; + top: -3px; + left: 0px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4); + -webkit-transform: translateX(0px); + transform: translateX(0px); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.label-switch input[type="checkbox"] { + display: none; +} +.label-switch input[type="checkbox"]:checked + .checkbox { + background: rgba(33, 150, 243, 0.5); +} +.label-switch input[type="checkbox"]:checked + .checkbox:after { + -webkit-transform: translateX(16px); + transform: translateX(16px); + background: #2196f3; +} +.item-input .label-switch { + top: 11px; +} +.button { + color: #2196f3; + text-decoration: none; + text-align: center; + display: block; + border-radius: 2px; + line-height: 36px; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + background: none; + padding: 0 10px; + margin: 0; + height: 36px; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 14px; + text-transform: uppercase; + font-family: inherit; + cursor: pointer; + min-width: 64px; + padding: 0 8px; + position: relative; + overflow: hidden; + outline: 0; + border: none; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +input[type="submit"].button, +input[type="button"].button { + width: 100%; +} +html:not(.watch-active-state) .button:active, +.button.active-state { + background: rgba(0, 0, 0, 0.1); +} +.button.button-fill { + background-color: #2196f3; + color: #fff; +} +html:not(.watch-active-state) .button.button-fill:active, +.button.button-fill.active-state { + background: #0c82df; +} +.button.button-big { + height: 48px; + line-height: 48px; + border-radius: 3px; +} +.button i.icon + span, +.button span:not(.ripple-wave) + span, +.button span:not(.ripple-wave) + i.icon, +.button i.icon + i.icon { + margin-left: 8px; +} +.navbar .button:not(.button-fill), +.toolbar .button:not(.button-fill), +.subnavbar .button:not(.button-fill), +.notifications .button:not(.button-fill) { + color: #fff; +} +html:not(.watch-active-state) .navbar .button:not(.button-fill):active, +html:not(.watch-active-state) .toolbar .button:not(.button-fill):active, +html:not(.watch-active-state) .subnavbar .button:not(.button-fill):active, +html:not(.watch-active-state) .notifications .button:not(.button-fill):active, +.navbar .button:not(.button-fill).active-state, +.toolbar .button:not(.button-fill).active-state, +.subnavbar .button:not(.button-fill).active-state, +.notifications .button:not(.button-fill).active-state { + background: rgba(255, 255, 255, 0.15); +} +.button-raised { + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); +} +html:not(.watch-active-state) .button-raised:active, +.button-raised.active-state { + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); +} +.buttons-row { + -ms-flex-item-align: center; + -webkit-align-self: center; + align-self: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-lines: single; + -moz-box-lines: single; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: none; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; +} +.buttons-row .button { + margin-left: 16px; + width: 100%; + -webkit-box-flex: 1; + -ms-flex: 1; +} +.buttons-row .button:first-child { + margin-left: 0; +} +.range-slider { + width: 100%; + position: relative; + overflow: hidden; + -ms-flex-item-align: center; + -webkit-align-self: center; + align-self: center; +} +.range-slider input[type="range"] { + position: relative; + height: 20px; + width: 100%; + margin: 0; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + background: -webkit-gradient(linear, 50% 0, 50% 100%, color-stop(0, #b9b9b9), color-stop(100%, #b9b9b9)); + background: linear-gradient(to right, #b9b9b9 0, #b9b9b9 100%); + background-position: center; + background-size: 100% 2px; + background-repeat: no-repeat; + outline: 0; + -ms-background-position-y: 500px; +} +.range-slider input[type="range"]:focus, +.range-slider input[type="range"]:active { + border: 0; + outline: 0 none; +} +.range-slider input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border: none; + outline: 0; + height: 20px; + width: 20px; + position: relative; + background: #2196f3; + border-radius: 20px; +} +.range-slider input[type="range"]::-webkit-slider-thumb:before { + position: absolute; + top: 50%; + right: 100%; + width: 2000px; + height: 2px; + margin-top: -1px; + z-index: 1; + background: #2196f3; + content: ' '; +} +.range-slider input[type="range"]::-moz-range-track { + width: 100%; + height: 2px; + background: #b7b8b7; + border: none; + outline: 0; +} +.range-slider input[type="range"]::-moz-range-thumb { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border: none; + outline: 0; + height: 20px; + width: 20px; + position: relative; + background: #2196f3; + border-radius: 20px; +} +.range-slider input[type="range"]::-ms-track { + width: 100%; + height: 2px; + cursor: pointer; + background: transparent; + border-color: transparent; + color: transparent; +} +.range-slider input[type="range"]::-ms-thumb { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border: none; + outline: 0; + height: 20px; + width: 20px; + position: relative; + background: #2196f3; + border-radius: 20px; +} +.range-slider input[type="range"]::-ms-fill-lower { + background: #2196f3; +} +.range-slider input[type="range"]::-ms-fill-upper { + background: #b7b8b7; +} +.item-input .range-slider { + top: 8px; +} +.form-checkbox { + position: relative; + display: inline-block; + vertical-align: middle; +} +label.label-checkbox, +.form-checkbox { + cursor: pointer; +} +label.label-checkbox input[type="checkbox"], +.form-checkbox input[type="checkbox"], +label.label-checkbox input[type="radio"], +.form-checkbox input[type="radio"] { + display: none; +} +label.label-checkbox i.icon-form-checkbox, +.form-checkbox i { + width: 18px; + height: 18px; + position: relative; + border-radius: 2px; + border: 2px solid #6d6d6d; + box-sizing: border-box; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + background: transparent; + display: block; +} +label.label-checkbox i.icon-form-checkbox:after, +.form-checkbox i:after { + content: ' '; + position: absolute; + width: 18px; + height: 18px; + left: -2px; + top: -2px; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + opacity: 0; + background: no-repeat center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E"); + -webkit-background-size: 100% auto; + background-size: 100% auto; +} +label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +.form-checkbox input[type="checkbox"]:checked ~ i { + border-color: #2196f3; + background-color: #2196f3; +} +label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox:after, +label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox:after, +label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox:after, +label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox:after, +label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox:after, +label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox:after, +.form-checkbox input[type="checkbox"]:checked ~ i:after { + opacity: 1; +} +.form-radio { + position: relative; + display: inline-block; + vertical-align: middle; +} +label.label-radio, +.form-radio { + cursor: pointer; +} +label.label-radio input[type="checkbox"], +.form-radio input[type="checkbox"], +label.label-radio input[type="radio"], +.form-radio input[type="radio"] { + display: none; +} +label.label-radio i.icon-form-radio, +.form-radio i { + width: 20px; + height: 20px; + position: relative; + border-radius: 20px; + border: 2px solid #6d6d6d; + box-sizing: border-box; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + display: block; +} +label.label-radio i.icon-form-radio:after, +.form-radio i:after { + content: ' '; + position: absolute; + width: 10px; + height: 10px; + left: 50%; + top: 50%; + margin-left: -5px; + margin-top: -5px; + background-color: #2196f3; + border-radius: 100%; + -webkit-transform: scale(0); + transform: scale(0); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +.form-radio input[type="radio"]:checked ~ i { + border-color: #2196f3; +} +label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio:after, +label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio:after, +label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio:after, +label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio:after, +label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio:after, +.form-radio input[type="radio"]:checked ~ i:after { + background-color: #2196f3; + -webkit-transform: scale(1); + transform: scale(1); +} +label.label-checkbox, +label.label-radio { + position: relative; + overflow: hidden; + z-index: 0; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +label.label-checkbox .item-after i.icon-form-checkbox, +label.label-radio .item-after i.icon-form-checkbox, +label.label-checkbox .item-after i.icon-form-radio, +label.label-radio .item-after i.icon-form-radio { + margin-left: 8px; + margin-right: 16px; +} +.media-list label.label-checkbox .item-media i.icon-form-checkbox, +.media-list label.label-radio .item-media i.icon-form-checkbox, +.media-item label.label-checkbox .item-media i.icon-form-checkbox, +.media-item label.label-radio .item-media i.icon-form-checkbox, +.media-list label.label-checkbox .item-media i.icon-form-radio, +.media-list label.label-radio .item-media i.icon-form-radio, +.media-item label.label-checkbox .item-media i.icon-form-radio, +.media-item label.label-radio .item-media i.icon-form-radio { + margin-top: 4px; +} +html:not(.watch-active-state) label.label-checkbox:active, +html:not(.watch-active-state) label.label-radio:active, +label.label-checkbox.active-state, +label.label-radio.active-state { + background-color: rgba(0, 0, 0, 0.1); +} +html:not(.watch-active-state) label.label-checkbox:active .item-inner:after, +html:not(.watch-active-state) label.label-radio:active .item-inner:after, +label.label-checkbox.active-state .item-inner:after, +label.label-radio.active-state .item-inner:after { + background-color: transparent; +} +.smart-select select { + display: none; +} +/* === Floating Action Button === */ +.floating-button { + position: absolute; + right: 16px; + bottom: 16px; + width: 56px; + height: 56px; + border-radius: 50%; + z-index: 1500; + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + background-color: #2196f3; + color: #fff; + overflow: hidden; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; +} +html:not(.watch-active-state) .floating-button:active, +.floating-button.active-state { + background: #0c82df; +} +.floating-button-toolbar, +.speed-dial { + position: absolute; + right: 16px; + bottom: 16px; + z-index: 1500; +} +.floating-button-toolbar .floating-button, +.speed-dial .floating-button { + right: 0; + bottom: 0; + position: relative; +} +.speed-dial .floating-button i { + position: absolute; + left: 50%; + top: 50%; + -webkit-transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(1); + transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(1); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.speed-dial .floating-button i + i { + -webkit-transform: translate3d(-50%, -50%, 0) rotate(-90deg) scale(0.5); + transform: translate3d(-50%, -50%, 0) rotate(-90deg) scale(0.5); + opacity: 0; +} +.speed-dial.speed-dial-opened .floating-button i { + -webkit-transform: translate3d(-50%, -50%, 0) rotate(90deg) scale(0.5); + transform: translate3d(-50%, -50%, 0) rotate(90deg) scale(0.5); + opacity: 0; +} +.speed-dial.speed-dial-opened .floating-button i + i { + -webkit-transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(1); + transform: translate3d(-50%, -50%, 0) rotate(0deg) scale(1); + opacity: 1; +} +.speed-dial-buttons { + position: absolute; + width: 40px; + left: 50%; + margin-left: -20px; + bottom: 100%; + margin-bottom: 16px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: reverse; + -moz-box-orient: vertical; + -moz-box-direction: reverse; + -ms-flex-direction: column-reverse; + -webkit-flex-direction: column-reverse; + flex-direction: column-reverse; + visibility: hidden; + pointer-events: none; +} +.speed-dial-buttons a { + width: 40px; + height: 40px; + opacity: 0; + color: #fff; + border-radius: 50%; + position: relative; + z-index: 1; + overflow: hidden; + background-color: #2196f3; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-transform: translate3d(0, 8px, 0) scale(0.3); + transform: translate3d(0, 8px, 0) scale(0.3); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; +} +html:not(.watch-active-state) .speed-dial-buttons a:active, +.speed-dial-buttons a.active-state { + background: #0c82df; +} +.speed-dial-buttons a + a { + margin-bottom: 16px; +} +.speed-dial-opened .speed-dial-buttons { + visibility: visible; + pointer-events: auto; +} +.speed-dial-opened .speed-dial-buttons a { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0) scaleY(1); + transform: translate3d(0, 0, 0) scaleY(1); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); +} +.speed-dial-opened .speed-dial-buttons a:nth-child(2) { + -webkit-transition-delay: 50ms; + transition-delay: 50ms; +} +.speed-dial-opened .speed-dial-buttons a:nth-child(3) { + -webkit-transition-delay: 100ms; + transition-delay: 100ms; +} +.speed-dial-opened .speed-dial-buttons a:nth-child(4) { + -webkit-transition-delay: 150ms; + transition-delay: 150ms; +} +.speed-dial-opened .speed-dial-buttons a:nth-child(5) { + -webkit-transition-delay: 200ms; + transition-delay: 200ms; +} +.speed-dial-opened .speed-dial-buttons a:nth-child(6) { + -webkit-transition-delay: 250ms; + transition-delay: 250ms; +} +.floating-button-to-popover.floating-button-to-popover { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.floating-button-to-popover.floating-button-to-popover-in { + -webkit-transition-duration: 100ms; + transition-duration: 100ms; +} +.floating-button-to-popover.floating-button-to-popover-in i { + opacity: 0; + -webkit-transition-duration: 100ms; + transition-duration: 100ms; +} +.floating-button-to-popover.floating-button-to-popover-scale { + border-radius: 0; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + box-shadow: none; +} +.floating-button-to-popover.floating-button-to-popover-out { + -webkit-transition-delay: 0ms; + transition-delay: 0ms; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.floating-button-to-popover.floating-button-to-popover-out i { + opacity: 1; + -webkit-transition-duration: 100ms; + transition-duration: 100ms; + -webkit-transition-delay: 200ms; + transition-delay: 200ms; +} +/* === Accordion === */ +.list-block .accordion-item-toggle { + cursor: pointer; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block .accordion-item-toggle .item-inner { + padding-right: 42px; + background: no-repeat -webkit-calc(100% - 15px) center; + background: no-repeat calc(100% - 15px) center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E"); + background-size: 10px 20px; +} +html:not(.watch-active-state) .list-block .accordion-item-toggle:active, +.list-block .accordion-item-toggle.active-state { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; + background-color: #d9d9d9; +} +html:not(.watch-active-state) .list-block .accordion-item-toggle:active > .item-inner:after, +.list-block .accordion-item-toggle.active-state > .item-inner:after { + background-color: transparent; +} +.list-block .accordion-item-toggle .item-inner, +.list-block .accordion-item > .item-link .item-inner { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transition-property: background-color; + transition-property: background-color; +} +.list-block .accordion-item-toggle .item-inner:after, +.list-block .accordion-item > .item-link .item-inner:after { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner, +.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) > .item-link .item-inner, +.list-block.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row, +.list-block.media-list .accordion-item-expanded > .item-link .item-title-row, +.list-block .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row, +.list-block .accordion-item-expanded.media-item > .item-link .item-title-row { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20transform%3D'translate(115%2C%2030)%20rotate(90)'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E"); + background-size: 20px 20px; +} +.list-block .accordion-item-expanded .accordion-item-toggle .item-inner:after, +.list-block .accordion-item-expanded > .item-link .item-inner:after { + background-color: transparent; +} +.list-block .accordion-item .content-block, +.list-block .accordion-item .list-block { + margin-top: 0; + margin-bottom: 0; +} +.list-block .accordion-item ul { + padding-left: 0; +} +.accordion-item-content { + position: relative; + overflow: hidden; + height: 0; + font-size: 14px; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.accordion-item-expanded > .accordion-item-content { + height: auto; +} +html.android-4 .accordion-item-content { + -webkit-transform: none; + transform: none; +} +/* === Cards === */ +.cards-list ul, +.card .list-block ul { + background: none; +} +.cards-list > ul:before, +.card .list-block > ul:before { + display: none; +} +.cards-list > ul:after, +.card .list-block > ul:after { + display: none; +} +.card { + background: #fff; + margin: 8px; + position: relative; + border-radius: 2px; + font-size: 14px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); +} +.card .list-block, +.card .content-block { + margin: 0; +} +.row:not(.no-gutter) .col > .card { + margin-left: 0; + margin-right: 0; +} +.page-content > .card:last-child { + margin-bottom: 32px; +} +.card-content { + position: relative; +} +.card-content-inner { + padding: 16px; + position: relative; +} +.card-content-inner > p:first-child { + margin-top: 0; +} +.card-content-inner > p:last-child { + margin-bottom: 0; +} +.card-content-inner > .list-block, +.card-content-inner > .content-block { + margin: -15px; +} +.card-header, +.card-footer { + min-height: 48px; + position: relative; + padding: 4px 16px; + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.card-header[valign="top"], +.card-footer[valign="top"] { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.card-header[valign="bottom"], +.card-footer[valign="bottom"] { + -webkit-box-align: end; + -ms-flex-align: end; + -webkit-align-items: flex-end; + align-items: flex-end; +} +.card-header a.link, +.card-footer a.link { + color: #2196f3; + text-decoration: none; + text-align: center; + display: block; + border-radius: 2px; + line-height: 36px; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + background: none; + padding: 0 10px; + margin: 0; + height: 36px; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 14px; + text-transform: uppercase; + font-family: inherit; + cursor: pointer; + min-width: 64px; + padding: 0 8px; + position: relative; + overflow: hidden; + outline: 0; + border: none; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-user-select: none; + user-select: none; +} +input[type="submit"].card-header a.link, +input[type="submit"].card-footer a.link, +input[type="button"].card-header a.link, +input[type="button"].card-footer a.link { + width: 100%; +} +html:not(.watch-active-state) .card-header a.link:active, +html:not(.watch-active-state) .card-footer a.link:active, +.card-header a.link.active-state, +.card-footer a.link.active-state { + background: rgba(0, 0, 0, 0.1); +} +.card-header a.link.button-fill, +.card-footer a.link.button-fill { + background-color: #2196f3; + color: #fff; +} +html:not(.watch-active-state) .card-header a.link.button-fill:active, +html:not(.watch-active-state) .card-footer a.link.button-fill:active, +.card-header a.link.button-fill.active-state, +.card-footer a.link.button-fill.active-state { + background: #0c82df; +} +.card-header a.link.button-big, +.card-footer a.link.button-big { + height: 48px; + line-height: 48px; + border-radius: 3px; +} +.card-header a.link i.icon + span, +.card-footer a.link i.icon + span, +.card-header a.link span:not(.ripple-wave) + span, +.card-footer a.link span:not(.ripple-wave) + span, +.card-header a.link span:not(.ripple-wave) + i.icon, +.card-footer a.link span:not(.ripple-wave) + i.icon, +.card-header a.link i.icon + i.icon, +.card-footer a.link i.icon + i.icon { + margin-left: 8px; +} +.navbar .card-header a.link:not(.button-fill), +.navbar .card-footer a.link:not(.button-fill), +.toolbar .card-header a.link:not(.button-fill), +.toolbar .card-footer a.link:not(.button-fill), +.subnavbar .card-header a.link:not(.button-fill), +.subnavbar .card-footer a.link:not(.button-fill), +.notifications .card-header a.link:not(.button-fill), +.notifications .card-footer a.link:not(.button-fill) { + color: #fff; +} +html:not(.watch-active-state) .navbar .card-header a.link:not(.button-fill):active, +html:not(.watch-active-state) .navbar .card-footer a.link:not(.button-fill):active, +html:not(.watch-active-state) .toolbar .card-header a.link:not(.button-fill):active, +html:not(.watch-active-state) .toolbar .card-footer a.link:not(.button-fill):active, +html:not(.watch-active-state) .subnavbar .card-header a.link:not(.button-fill):active, +html:not(.watch-active-state) .subnavbar .card-footer a.link:not(.button-fill):active, +html:not(.watch-active-state) .notifications .card-header a.link:not(.button-fill):active, +html:not(.watch-active-state) .notifications .card-footer a.link:not(.button-fill):active, +.navbar .card-header a.link:not(.button-fill).active-state, +.navbar .card-footer a.link:not(.button-fill).active-state, +.toolbar .card-header a.link:not(.button-fill).active-state, +.toolbar .card-footer a.link:not(.button-fill).active-state, +.subnavbar .card-header a.link:not(.button-fill).active-state, +.subnavbar .card-footer a.link:not(.button-fill).active-state, +.notifications .card-header a.link:not(.button-fill).active-state, +.notifications .card-footer a.link:not(.button-fill).active-state { + background: rgba(255, 255, 255, 0.15); +} +.card-header a.link i + span, +.card-footer a.link i + span, +.card-header a.link i + i, +.card-footer a.link i + i, +.card-header a.link span + i, +.card-footer a.link span + i, +.card-header a.link span + span, +.card-footer a.link span + span { + margin-left: 7px; +} +.card-header a.link i.icon, +.card-footer a.link i.icon { + display: block; +} +.card-header a.icon-only, +.card-footer a.icon-only { + min-width: 48px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + margin: 0; +} +.card-header { + border-radius: 2px 2px 0 0; + font-size: 16px; +} +.card-header:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #e1e1e1; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .card-header:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .card-header:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.card-header.no-border:after { + display: none; +} +.card-footer { + border-radius: 0 0 2px 2px; + color: #757575; +} +.card-footer:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: #e1e1e1; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .card-footer:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .card-footer:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.card-footer.no-border:before { + display: none; +} +/* === Modals === */ +.modal-overlay, +.preloader-indicator-overlay, +.popup-overlay, +.picker-modal-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.4); + z-index: 13000; + visibility: hidden; + opacity: 0; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.modal-overlay.not-animated, +.preloader-indicator-overlay.not-animated, +.popup-overlay.not-animated, +.picker-modal-overlay.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.modal-overlay.modal-overlay-visible, +.preloader-indicator-overlay.modal-overlay-visible, +.popup-overlay.modal-overlay-visible, +.picker-modal-overlay.modal-overlay-visible { + visibility: visible; + opacity: 1; +} +.popup-overlay { + z-index: 10500; +} +.picker-modal-overlay { + z-index: 12000; +} +.modal { + width: 280px; + position: absolute; + z-index: 13500; + left: 50%; + margin-left: -140px; + margin-top: 0; + top: 50%; + border-radius: 3px; + opacity: 0; + -webkit-transform: translate3d(0, 0, 0) scale(1.185); + transform: translate3d(0, 0, 0) scale(1.185); + -webkit-transition-property: -webkit-transform, opacity; + -moz-transition-property: -moz-transform, opacity; + -ms-transition-property: -ms-transform, opacity; + -o-transition-property: -o-transform, opacity; + transition-property: transform, opacity; + color: #757575; + display: none; + background: #fff; + font-size: 16px; + box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); +} +.modal.modal-in { + opacity: 1; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transform: translate3d(0, 0, 0) scale(1); + transform: translate3d(0, 0, 0) scale(1); +} +.modal.modal-out { + opacity: 0; + z-index: 13499; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; + -webkit-transform: translate3d(0, 0, 0) scale(0.815); + transform: translate3d(0, 0, 0) scale(0.815); +} +.modal-inner { + padding: 24px 24px 20px; + position: relative; +} +.modal-title { + font-weight: 500; + font-size: 20px; + color: #212121; + line-height: 1.3; +} +.modal-title + .modal-text { + margin-top: 20px; +} +.modal-text { + line-height: 1.5; +} +.modal-buttons { + height: 48px; + padding: 6px 8px; + overflow: hidden; + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: end; + -ms-flex-pack: end; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} +.modal-buttons.modal-buttons-vertical { + display: block; + height: auto; + padding: 0 0 8px 0; +} +.modal-buttons.modal-buttons-vertical .modal-button { + margin-left: 0; + text-align: right; + height: 48px; + line-height: 48px; + border-radius: 0; + padding-left: 16px; + padding-right: 16px; +} +.modal-button, +.modal-buttons .button { + color: #2196f3; + text-decoration: none; + text-align: center; + display: block; + border-radius: 2px; + line-height: 36px; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + background: none; + padding: 0 10px; + margin: 0; + height: 36px; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 14px; + text-transform: uppercase; + font-family: inherit; + cursor: pointer; + min-width: 64px; + padding: 0 8px; + position: relative; + overflow: hidden; + outline: 0; + border: none; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-user-select: none; + user-select: none; +} +input[type="submit"].modal-button, +input[type="submit"].modal-buttons .button, +input[type="button"].modal-button, +input[type="button"].modal-buttons .button { + width: 100%; +} +html:not(.watch-active-state) .modal-button:active, +html:not(.watch-active-state) .modal-buttons .button:active, +.modal-button.active-state, +.modal-buttons .button.active-state { + background: rgba(0, 0, 0, 0.1); +} +.modal-button.button-fill, +.modal-buttons .button.button-fill { + background-color: #2196f3; + color: #fff; +} +html:not(.watch-active-state) .modal-button.button-fill:active, +html:not(.watch-active-state) .modal-buttons .button.button-fill:active, +.modal-button.button-fill.active-state, +.modal-buttons .button.button-fill.active-state { + background: #0c82df; +} +.modal-button.button-big, +.modal-buttons .button.button-big { + height: 48px; + line-height: 48px; + border-radius: 3px; +} +.modal-button i.icon + span, +.modal-buttons .button i.icon + span, +.modal-button span:not(.ripple-wave) + span, +.modal-buttons .button span:not(.ripple-wave) + span, +.modal-button span:not(.ripple-wave) + i.icon, +.modal-buttons .button span:not(.ripple-wave) + i.icon, +.modal-button i.icon + i.icon, +.modal-buttons .button i.icon + i.icon { + margin-left: 8px; +} +.navbar .modal-button:not(.button-fill), +.navbar .modal-buttons .button:not(.button-fill), +.toolbar .modal-button:not(.button-fill), +.toolbar .modal-buttons .button:not(.button-fill), +.subnavbar .modal-button:not(.button-fill), +.subnavbar .modal-buttons .button:not(.button-fill), +.notifications .modal-button:not(.button-fill), +.notifications .modal-buttons .button:not(.button-fill) { + color: #fff; +} +html:not(.watch-active-state) .navbar .modal-button:not(.button-fill):active, +html:not(.watch-active-state) .navbar .modal-buttons .button:not(.button-fill):active, +html:not(.watch-active-state) .toolbar .modal-button:not(.button-fill):active, +html:not(.watch-active-state) .toolbar .modal-buttons .button:not(.button-fill):active, +html:not(.watch-active-state) .subnavbar .modal-button:not(.button-fill):active, +html:not(.watch-active-state) .subnavbar .modal-buttons .button:not(.button-fill):active, +html:not(.watch-active-state) .notifications .modal-button:not(.button-fill):active, +html:not(.watch-active-state) .notifications .modal-buttons .button:not(.button-fill):active, +.navbar .modal-button:not(.button-fill).active-state, +.navbar .modal-buttons .button:not(.button-fill).active-state, +.toolbar .modal-button:not(.button-fill).active-state, +.toolbar .modal-buttons .button:not(.button-fill).active-state, +.subnavbar .modal-button:not(.button-fill).active-state, +.subnavbar .modal-buttons .button:not(.button-fill).active-state, +.notifications .modal-button:not(.button-fill).active-state, +.notifications .modal-buttons .button:not(.button-fill).active-state { + background: rgba(255, 255, 255, 0.15); +} +.modal-button.modal-button-bold, +.modal-buttons .button.modal-button-bold { + font-weight: 700; +} +.modal-button + .modal-button, +.modal-buttons .button + .modal-button { + margin-left: 4px; +} +.modal-no-buttons .modal-buttons { + display: none; +} +.actions-modal { + position: absolute; + left: 0; + bottom: 0; + z-index: 13500; + width: 100%; + background: #fff; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + max-height: 100%; + overflow: auto; + -webkit-overflow-scrolling: touch; +} +.actions-modal.modal-in, +.actions-modal.modal-out { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.actions-modal.modal-in.not-animated, +.actions-modal.modal-out.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.actions-modal.modal-in { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.actions-modal.modal-out { + z-index: 13499; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.actions-modal-group { + position: relative; +} +.actions-modal-group:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #d2d2d6; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .actions-modal-group:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .actions-modal-group:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.actions-modal-group:last-child:after { + display: none; +} +.actions-modal-button, +.actions-modal-label { + width: 100%; + font-weight: normal; + margin: 0; + box-sizing: border-box; + display: block; + position: relative; + padding: 0 16px; +} +.actions-modal-button a, +.actions-modal-label a { + text-decoration: none; + color: inherit; + display: block; +} +.actions-modal-button b, +.actions-modal-label b { + font-weight: 500; +} +.actions-modal-button.actions-modal-button-bold, +.actions-modal-label.actions-modal-button-bold { + font-weight: 500; +} +.actions-modal-button.actions-modal-button-red, +.actions-modal-label.actions-modal-button-red { + color: #f44336; +} +.actions-modal-button.disabled, +.actions-modal-label.disabled { + opacity: 0.95; + color: #9e9e9e; +} +.actions-modal-button { + cursor: pointer; + line-height: 48px; + font-size: 16px; + color: rgba(0, 0, 0, 0.87); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.actions-modal-button a, +.actions-modal-button { + position: relative; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} +html:not(.watch-active-state) .actions-modal-button:active, +.actions-modal-button.active-state { + background: rgba(0, 0, 0, 0.1); +} +.actions-modal-label { + font-size: 16px; + color: rgba(0, 0, 0, 0.54); + min-height: 56px; + line-height: 1.3; + padding-top: 12px; + padding-bottom: 12px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +input.modal-text-input { + box-sizing: border-box; + height: 36px; + background: #fff; + margin: 0; + margin-top: 15px; + padding: 0; + border: none; + width: 100%; + font-size: 16px; + font-family: inherit; + display: block; + box-shadow: none; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + -webkit-transition-duration: 200ms; + transition-duration: 200ms; +} +input.modal-text-input::-webkit-input-placeholder { + color: rgba(0, 0, 0, 0.35); +} +input.modal-text-input + input.modal-text-input { + margin-top: 16px; +} +.popover { + width: 320px; + background: #fff; + z-index: 13500; + margin: 0; + top: 0; + opacity: 0; + left: 0; + border-radius: 3px; + position: absolute; + display: none; + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); + -webkit-transform: scale(0.85, 0.6); + transform: scale(0.85, 0.6); + -webkit-transition-property: opacity, -webkit-transform, border-radius; + -moz-transition-property: opacity, -moz-transform, border-radius; + transition-property: opacity, transform, border-radius; +} +.popover.popover-on-top { + -webkit-transform-origin: center bottom; + transform-origin: center bottom; +} +.popover.popover-on-bottom { + -webkit-transform-origin: center top; + transform-origin: center top; +} +.popover.modal-in, +.popover.modal-out { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.popover.modal-in.not-animated, +.popover.modal-out.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.popover.modal-in { + -webkit-transform: scale(1); + transform: scale(1); + opacity: 1; +} +.popover.modal-out { + -webkit-transform: scale(1); + transform: scale(1); + opacity: 0; +} +.popover .list-block { + margin: 0; +} +.popover .list-block:first-child:last-child ul:before { + display: none; +} +.popover .list-block:first-child:last-child ul:after { + display: none; +} +.popover .list-block ul { + background: none; +} +.popover .list-block ul:before { + display: none; +} +.popover .list-block:first-child ul { + border-radius: 3px 3px 0 0; +} +.popover .list-block:first-child li:first-child a { + border-radius: 3px 3px 0 0; +} +.popover .list-block:last-child ul { + border-radius: 0 0 3px 3px; +} +.popover .list-block:last-child ul:after { + display: none; +} +.popover .list-block:last-child li:last-child a { + border-radius: 0 0 3px 3px; +} +.popover .list-block:first-child:last-child li:first-child:last-child a, +.popover .list-block:first-child:last-child ul:first-child:last-child { + border-radius: 3px; +} +.popover.popover-floating-button { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: scale(0.7); + transform: scale(0.7); + border-radius: 50%; + box-shadow: none; + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); +} +.popover.popover-floating-button.modal-in { + border-radius: 0%; + -webkit-transform: scale(1); + transform: scale(1); + -webkit-transition-delay: 200ms; + transition-delay: 200ms; + -webkit-transition-duration: 200ms; + transition-duration: 200ms; +} +.popover.popover-floating-button.modal-out { + border-radius: 50%; + -webkit-transform: scale(0.7); + transform: scale(0.7); + -webkit-transition-delay: 0ms; + transition-delay: 0ms; + -webkit-transition-duration: 100ms; + transition-duration: 100ms; +} +.popover.popover-floating-button .list-block { + margin: 0; +} +.popover.popover-floating-button .list-block:first-child ul { + border-radius: 0; +} +.popover.popover-floating-button .list-block:first-child li:first-child a { + border-radius: 0; +} +.popover.popover-floating-button .list-block:last-child ul { + border-radius: 0; +} +.popover.popover-floating-button .list-block:last-child li:last-child a { + border-radius: 0; +} +.popover.popover-floating-button .list-block:first-child:last-child li:first-child:last-child a, +.popover.popover-floating-button .list-block:first-child:last-child ul:first-child:last-child { + border-radius: 0; +} +.popover-inner { + overflow: auto; + -webkit-overflow-scrolling: touch; +} +.actions-popover .list-block { + margin: 0; +} +.actions-popover-label { + padding: 8px 16px; + color: rgba(0, 0, 0, 0.54); + font-size: 16px; + line-height: 1.3; + padding-top: 12px; + padding-bottom: 12px; + position: relative; +} +.actions-popover-label:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: #d2d2d6; + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .actions-popover-label:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .actions-popover-label:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.actions-popover-label:last-child:after { + display: none; +} +.popup, +.login-screen { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 11000; + background: #fff; + box-sizing: border-box; + display: none; + overflow: auto; + -webkit-overflow-scrolling: touch; + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -ms-transition-property: -ms-transform; + -o-transition-property: -o-transform; + transition-property: transform; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.popup.modal-in, +.login-screen.modal-in, +.popup.modal-out, +.login-screen.modal-out { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.popup.modal-in.not-animated, +.login-screen.modal-in.not-animated, +.popup.modal-out.not-animated, +.login-screen.modal-out.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.popup.modal-in, +.login-screen.modal-in { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.popup.modal-out, +.login-screen.modal-out { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.login-screen.modal-in, +.login-screen.modal-out { + display: block; +} +@media all and (min-width: 630px) and (min-height: 630px) { + .popup:not(.tablet-fullscreen) { + width: 630px; + height: 630px; + left: 50%; + top: 50%; + margin-left: -315px; + margin-top: -315px; + box-shadow: 0px 20px 44px rgba(0, 0, 0, 0.5); + border-radius: 3px; + -webkit-transform: translate3d(0, 1024px, 0); + transform: translate3d(0, 1024px, 0); + } + .popup:not(.tablet-fullscreen).modal-in { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } + .popup:not(.tablet-fullscreen).modal-out { + -webkit-transform: translate3d(0, 1024px, 0); + transform: translate3d(0, 1024px, 0); + } +} +@media all and (max-width: 629px), (max-height: 629px) { + html.with-statusbar-overlay .popup { + height: -webkit-calc(100% - 24px); + height: calc(100% - 24px); + top: 24px; + } + html.with-statusbar-overlay .popup-overlay { + z-index: 9500; + } + html.with-statusbar-overlay.ios .popup { + height: -webkit-calc(100% - 20px); + height: calc(100% - 20px); + top: 20px; + } +} +html.with-statusbar-overlay .login-screen, +html.with-statusbar-overlay .popup.tablet-fullscreen { + height: -webkit-calc(100% - 24px); + height: calc(100% - 24px); + top: 24px; +} +html.with-statusbar-overlay.ios .login-screen, +html.with-statusbar-overlay.ios .popup.tablet-fullscreen { + height: -webkit-calc(100% - 20px); + height: calc(100% - 20px); + top: 20px; +} +.modal-preloader .modal-title, +.modal-preloader .modal-inner { + text-align: center; +} +.preloader-indicator-overlay { + visibility: visible; + opacity: 0; + background: none; +} +.preloader-indicator-modal { + position: absolute; + left: 50%; + top: 50%; + padding: 8px; + margin-left: -24px; + margin-top: -24px; + background: rgba(0, 0, 0, 0.8); + z-index: 13500; + border-radius: 4px; +} +.preloader-indicator-modal .preloader { + display: block; +} +.picker-modal { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 260px; + z-index: 12000; + display: none; + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -ms-transition-property: -ms-transform; + -o-transition-property: -o-transform; + transition-property: transform; + background: #fff; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.picker-modal.modal-in, +.picker-modal.modal-out { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.picker-modal.modal-in.not-animated, +.picker-modal.modal-out.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.picker-modal.modal-in { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.picker-modal.modal-out { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); +} +.picker-modal .picker-modal-inner { + height: 100%; + position: relative; +} +.picker-modal .toolbar { + position: relative; + width: 100%; + top: 0; +} +.picker-modal .toolbar + .picker-modal-inner { + height: -webkit-calc(100% - 48px); + height: -moz-calc(100% - 48px); + height: calc(100% - 48px); +} +.picker-modal .toolbar a.link { + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; +} +.picker-modal .picker-header, +.picker-modal .picker-footer { + height: 48px; +} +.picker-modal .picker-header { + background: #2196f3; +} +.picker-modal .picker-header + .toolbar .toolbar-inner { + overflow: visible; +} +.picker-modal .picker-header + .picker-footer + .toolbar + .picker-modal-inner { + height: -webkit-calc(100% - 48px * 3); + height: -moz-calc(100% - 48px * 3); + height: calc(100% - 48px * 3); +} +.picker-modal .picker-footer { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 48px; + padding: 6px 8px; + overflow: hidden; + box-sizing: border-box; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: end; + -ms-flex-pack: end; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} +.picker-modal .picker-footer.modal-buttons-vertical { + display: block; + height: auto; + padding: 0 0 8px 0; +} +.picker-modal .picker-footer.modal-buttons-vertical .modal-button { + margin-left: 0; + text-align: right; + height: 48px; + line-height: 48px; + border-radius: 0; + padding-left: 16px; + padding-right: 16px; +} +.picker-modal .picker-header + .picker-modal-inner, +.picker-modal .picker-footer + .picker-modal-inner { + height: -webkit-calc(100% - 48px); + height: -moz-calc(100% - 48px); + height: calc(100% - 48px); +} +.picker-modal .picker-header + .toolbar + .picker-modal-inner, +.picker-modal .picker-footer + .toolbar + .picker-modal-inner { + height: -webkit-calc(100% - 48px * 2); + height: -moz-calc(100% - 48px * 2); + height: calc(100% - 48px * 2); +} +.picker-modal.picker-modal-inline, +.popover .picker-modal { + display: block; + position: relative; + background: none; + z-index: inherit; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.picker-modal.picker-modal-inline .toolbar, +.popover .picker-modal .toolbar { + top: 0; +} +.popover .picker-modal { + width: auto; +} +.popover .picker-modal .toolbar:first-child, +.popover .picker-modal .picker-header:first-child { + border-radius: 2px 2px 0 0; +} +.picker-modal.smart-select-picker .list-block { + margin: 0; +} +.picker-modal.smart-select-picker .list-block ul:before { + display: none; +} +.picker-modal.smart-select-picker .list-block ul:after { + display: none; +} +/* === Panels === */ +.panel-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.2); + opacity: 0; + z-index: 5999; + display: none; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.panel-overlay.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.panel { + z-index: 1000; + display: none; + background: #fff; + box-sizing: border-box; + overflow: auto; + -webkit-overflow-scrolling: touch; + position: absolute; + width: 260px; + top: 0; + height: 100%; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.panel.not-animated { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.panel.panel-visible { + display: block; +} +.panel.panel-left { + left: 0; +} +.panel.panel-left.panel-cover { + z-index: 6000; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); +} +.panel.panel-right { + right: 0; +} +.panel.panel-right.panel-cover { + z-index: 6000; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); +} +.panel.panel-visible-by-breakpoint { + display: block; + -webkit-transform: translate3d(0, 0, 0) !important; + transform: translate3d(0, 0, 0) !important; + box-shadow: none !important; +} +.panel.panel-visible-by-breakpoint.panel-cover { + z-index: 5900; +} +body.with-panel-left-cover .panel, +body.with-panel-right-cover .panel { + box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5); +} +body.with-panel-left-cover .views, +body.with-panel-right-cover .views { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +body.with-panel-left-cover .panel-overlay, +body.with-panel-right-cover .panel-overlay { + display: block; + opacity: 1; +} +body.with-panel-left-reveal .views, +body.with-panel-right-reveal .views { + box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transition-property: -webkit-transform, box-shadow; + -moz-transition-property: -moz-transform, box-shadow; + transition-property: transform, box-shadow; +} +body.with-panel-left-reveal .panel.not-animated ~ .views, +body.with-panel-right-reveal .panel.not-animated ~ .views { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +body.with-panel-left-reveal .panel-overlay, +body.with-panel-right-reveal .panel-overlay { + background: rgba(0, 0, 0, 0); + display: block; + opacity: 0; +} +body.with-panel-left-reveal .views { + -webkit-transform: translate3d(260px, 0, 0); + transform: translate3d(260px, 0, 0); +} +body.with-panel-left-reveal .panel-overlay { + -webkit-transform: translate3d(260px, 0, 0); + transform: translate3d(260px, 0, 0); +} +body.with-panel-left-cover .panel.panel-left { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +body.with-panel-right-reveal .views { + -webkit-transform: translate3d(-260px, 0, 0); + transform: translate3d(-260px, 0, 0); +} +body.with-panel-right-reveal .panel-overlay { + -webkit-transform: translate3d(-260px, 0, 0); + transform: translate3d(-260px, 0, 0); +} +body.with-panel-right-cover .panel.panel-right { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +body.panel-closing .panel-overlay { + display: block; +} +body.panel-closing .views { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transition-property: -webkit-transform, box-shadow; + -moz-transition-property: -moz-transform, box-shadow; + transition-property: transform, box-shadow; +} +body.panel-closing .panel.not-animated ~ .views { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +/* === Images Lazy Loading === */ +.lazy-loaded.lazy-fadeIn { + -webkit-animation: lazyFadeIn 600ms; + animation: lazyFadeIn 600ms; +} +@-webkit-keyframes lazyFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes lazyFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +/* === Tabs === */ +.tabs .tab { + display: none; +} +.tabs .tab.active { + display: block; +} +.tabs-animated-wrap { + position: relative; + width: 100%; + overflow: hidden; + height: 100%; +} +.tabs-animated-wrap > .tabs { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + height: 100%; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.tabs-animated-wrap > .tabs > .tab { + width: 100%; + display: block; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; +} +.tabs-animated-wrap.not-animated > .tabs { + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.tabs-swipeable-wrap { + height: 100%; +} +.tabs-swipeable-wrap > .tabs > .tab { + display: block; +} +/* === Messages === */ +.messages-content { + background: #eee; +} +.messages { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.messages-date { + text-align: center; + font-weight: 500; + font-size: 12px; + line-height: 1; + margin: 10px 15px; +} +.messages-date span { + font-weight: 400; +} +.message { + box-sizing: border-box; + margin: 0px 8px 8px 8px; + max-width: 80%; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.message:first-child { + margin-top: 8px; +} +.message.message-pic img { + display: block; +} +.message-name, +.message-label, +.message-date, +.messages-date { + color: rgba(0, 0, 0, 0.51); +} +.message-name { + font-size: 12px; + line-height: 1; + margin-bottom: 2px; + margin-top: 7px; +} +.message-hide-name .message-name { + display: none; +} +.message-label { + font-size: 12px; + line-height: 1; + margin-top: 4px; +} +.message-hide-label .message-label { + display: none; +} +.message-avatar { + width: 48px; + height: 48px; + border-radius: 100%; + margin-top: -48px; + position: relative; + top: 1px; + background-size: cover; + opacity: 1; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.message-hide-avatar .message-avatar { + opacity: 0; +} +.message-text { + box-sizing: border-box; + border-radius: 2px; + padding: 6px 8px; + min-width: 48px; + font-size: 16px; + line-height: 1.2; + word-break: break-word; + color: #333; + min-height: 48px; + position: relative; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.message-text img { + max-width: 100%; + height: auto; +} +.message-pic .message-text { + padding: 8px; +} +.message-date { + font-size: 12px; + margin-top: 4px; +} +.message-pic img + .message-date { + margin-top: 8px; +} +.message-sent { + -ms-flex-item-align: end; + -webkit-align-self: flex-end; + align-self: flex-end; + -webkit-box-align: end; + -ms-flex-align: end; + -webkit-align-items: flex-end; + align-items: flex-end; +} +.message-sent .message-name, +.message-sent .message-label { + margin-right: 8px; +} +.message-sent .message-text { + background-color: #C8E6C9; + margin-left: auto; + border-radius: 2px 2px 0 2px; + margin-right: 8px; +} +.message-sent .message-text:before { + position: absolute; + content: ''; + border-left: 0px solid transparent; + border-right: 8px solid transparent; + border-bottom: 8px solid #C8E6C9; + left: 100%; + bottom: 0; + width: 0; + height: 0; +} +.message-sent.message-with-avatar .message-text, +.message-sent.message-with-avatar .message-name, +.message-sent.message-with-avatar .message-label { + margin-right: 56px; +} +.message-received { + -ms-flex-item-align: start; + -webkit-align-self: flex-start; + align-self: flex-start; + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.message-received .message-text { + background-color: #fff; + border-radius: 2px 2px 2px 0px; + margin-left: 8px; +} +.message-received .message-text:before { + position: absolute; + content: ''; + border-left: 8px solid transparent; + border-right: 0px solid transparent; + border-bottom: 8px solid #fff; + right: 100%; + bottom: 0; + width: 0; + height: 0; +} +.message-received .message-name, +.message-received .message-label { + margin-left: 8px; +} +.message-received.message-with-avatar .message-text, +.message-received.message-with-avatar .message-name, +.message-received.message-with-avatar .message-label { + margin-left: 56px; +} +.message-appear-from-bottom { + -webkit-animation: messageAppearFromBottom 400ms; + animation: messageAppearFromBottom 400ms; +} +.message-appear-from-top { + -webkit-animation: messageAppearFromTop 400ms; + animation: messageAppearFromTop 400ms; +} +@-webkit-keyframes messageAppearFromBottom { + from { + -webkit-transform: translate3d(0, 100%, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + } +} +@keyframes messageAppearFromBottom { + from { + transform: translate3d(0, 100%, 0); + } + to { + transform: translate3d(0, 0, 0); + } +} +@-webkit-keyframes messageAppearFromTop { + from { + -webkit-transform: translate3d(0, -100%, 0); + } + to { + -webkit-transform: translate3d(0, 0, 0); + } +} +@keyframes messageAppearFromTop { + from { + transform: translate3d(0, -100%, 0); + } + to { + transform: translate3d(0, 0, 0); + } +} +/* === Statusbar overlay === */ +html.with-statusbar-overlay .framework7-root { + padding-top: 24px; + box-sizing: border-box; +} +html.with-statusbar-overlay .framework7-root .statusbar-overlay { + display: block; +} +html.with-statusbar-overlay .framework7-root .panel { + padding-top: 24px; +} +.statusbar-overlay { + background: #0D47A1; + z-index: 10000; + position: absolute; + left: 0; + top: 0; + height: 24px; + width: 100%; + display: none; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +html.with-statusbar-overlay.ios .framework7-root { + padding-top: 20px; +} +html.with-statusbar-overlay.ios .framework7-root .panel { + padding-top: 20px; +} +html.ios .statusbar-overlay { + height: 20px; +} +/* === + Preloader + By Rudi Theunissen (https://github.com/rtheunissen/md-preloader) +=== */ +.preloader { + font-size: 0; + display: inline-block; + width: 32px; + height: 32px; + -webkit-animation: preloader-outer 3300ms linear infinite; + animation: preloader-outer 3300ms linear infinite; +} +.preloader svg { + width: 100%; + height: 100%; + -webkit-animation: preloader-inner 1320ms linear infinite; + animation: preloader-inner 1320ms linear infinite; +} +.preloader svg circle { + fill: none; + stroke: #757575; + stroke-linecap: square; + -webkit-animation: preloader-arc 1320ms cubic-bezier(0.8, 0, 0.4, 0.8) infinite; + animation: preloader-arc 1320ms cubic-bezier(0.8, 0, 0.4, 0.8) infinite; +} +@-webkit-keyframes preloader-outer { + 0% { + -webkit-transform: rotate(0); + } + 100% { + -webkit-transform: rotate(360deg); + } +} +@keyframes preloader-outer { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } +} +@-webkit-keyframes preloader-inner { + 0% { + -webkit-transform: rotate(-100.8deg); + } + 100% { + -webkit-transform: rotate(0); + } +} +@keyframes preloader-inner { + 0% { + transform: rotate(-100.8deg); + } + 100% { + transform: rotate(0); + } +} +@-webkit-keyframes preloader-arc { + 0% { + stroke-dasharray: 1 210.48670779px; + stroke-dashoffset: 0; + } + 40% { + stroke-dasharray: 151.55042961px, 210.48670779px; + stroke-dashoffset: 0; + } + 100% { + stroke-dasharray: 1 210.48670779px; + stroke-dashoffset: -151.55042961px; + } +} +@keyframes preloader-arc { + 0% { + stroke-dasharray: 1 210.48670779px; + stroke-dashoffset: 0; + } + 40% { + stroke-dasharray: 151.55042961px, 210.48670779px; + stroke-dashoffset: 0; + } + 100% { + stroke-dasharray: 1 210.48670779px; + stroke-dashoffset: -151.55042961px; + } +} +.preloader-inner { + position: relative; + display: block; + width: 100%; + height: 100%; + -webkit-animation: preloader-inner-rotate 5.25s cubic-bezier(0.35, 0, 0.25, 1) infinite; + animation: preloader-inner-rotate 5.25s cubic-bezier(0.35, 0, 0.25, 1) infinite; +} +.preloader-inner .preloader-inner-gap { + position: absolute; + width: 2px; + left: 50%; + margin-left: -1px; + top: 0; + bottom: 0; + box-sizing: border-box; + border-top: 4px solid #757575; +} +.preloader-inner .preloader-inner-left, +.preloader-inner .preloader-inner-right { + position: absolute; + top: 0; + height: 100%; + width: 50%; + overflow: hidden; +} +.preloader-inner .preloader-inner-half-circle { + position: absolute; + top: 0; + height: 100%; + width: 200%; + box-sizing: border-box; + border: 4px solid #757575; + border-bottom-color: transparent !important; + border-radius: 50%; + -webkit-animation-iteration-count: infinite; + -webkit-animation-duration: 1.3125s; + -webkit-animation-timing-function: cubic-bezier(0.35, 0, 0.25, 1); + animation-iteration-count: infinite; + animation-duration: 1.3125s; + animation-timing-function: cubic-bezier(0.35, 0, 0.25, 1); +} +.preloader-white .preloader-inner .preloader-inner-gap, +.preloader-white .preloader-inner .preloader-inner-half-circle { + border-color: #fff; +} +.preloader-inner .preloader-inner-left { + left: 0; +} +.preloader-inner .preloader-inner-left .preloader-inner-half-circle { + left: 0; + border-right-color: transparent !important; + -webkit-animation-name: preloader-left-rotate; + animation-name: preloader-left-rotate; +} +.preloader-inner .preloader-inner-right { + right: 0; +} +.preloader-inner .preloader-inner-right .preloader-inner-half-circle { + right: 0; + border-left-color: transparent !important; + -webkit-animation-name: preloader-right-rotate; + animation-name: preloader-right-rotate; +} +.color-multi .preloader-inner .preloader-inner-left .preloader-inner-half-circle { + -webkit-animation-name: preloader-left-rotate-multicolor; + animation-name: preloader-left-rotate-multicolor; +} +.color-multi .preloader-inner .preloader-inner-right .preloader-inner-half-circle { + -webkit-animation-name: preloader-right-rotate-multicolor; + animation-name: preloader-right-rotate-multicolor; +} +@-webkit-keyframes preloader-left-rotate { + 0%, + 100% { + -webkit-transform: rotate(130deg); + } + 50% { + -webkit-transform: rotate(-5deg); + } +} +@keyframes preloader-left-rotate { + 0%, + 100% { + transform: rotate(130deg); + } + 50% { + transform: rotate(-5deg); + } +} +@-webkit-keyframes preloader-right-rotate { + 0%, + 100% { + -webkit-transform: rotate(-130deg); + } + 50% { + -webkit-transform: rotate(5deg); + } +} +@keyframes preloader-right-rotate { + 0%, + 100% { + transform: rotate(-130deg); + } + 50% { + transform: rotate(5deg); + } +} +@-webkit-keyframes preloader-inner-rotate { + 12.5% { + -webkit-transform: rotate(135deg); + } + 25% { + -webkit-transform: rotate(270deg); + } + 37.5% { + -webkit-transform: rotate(405deg); + } + 50% { + -webkit-transform: rotate(540deg); + } + 62.5% { + -webkit-transform: rotate(675deg); + } + 75% { + -webkit-transform: rotate(810deg); + } + 87.5% { + -webkit-transform: rotate(945deg); + } + 100% { + -webkit-transform: rotate(1080deg); + } +} +@keyframes preloader-inner-rotate { + 12.5% { + transform: rotate(135deg); + } + 25% { + transform: rotate(270deg); + } + 37.5% { + transform: rotate(405deg); + } + 50% { + transform: rotate(540deg); + } + 62.5% { + transform: rotate(675deg); + } + 75% { + transform: rotate(810deg); + } + 87.5% { + transform: rotate(945deg); + } + 100% { + transform: rotate(1080deg); + } +} +@-webkit-keyframes preloader-left-rotate-multicolor { + 0%, + 100% { + border-left-color: #4285F4; + -webkit-transform: rotate(130deg); + } + 75% { + border-left-color: #1B9A59; + border-top-color: #1B9A59; + } + 50% { + border-left-color: #F7C223; + border-top-color: #F7C223; + -webkit-transform: rotate(-5deg); + } + 25% { + border-left-color: #DE3E35; + border-top-color: #DE3E35; + } +} +@keyframes preloader-left-rotate-multicolor { + 0%, + 100% { + border-left-color: #4285F4; + transform: rotate(130deg); + } + 75% { + border-left-color: #1B9A59; + border-top-color: #1B9A59; + } + 50% { + border-left-color: #F7C223; + border-top-color: #F7C223; + transform: rotate(-5deg); + } + 25% { + border-left-color: #DE3E35; + border-top-color: #DE3E35; + } +} +@-webkit-keyframes preloader-right-rotate-multicolor { + 0%, + 100% { + border-right-color: #4285F4; + -webkit-transform: rotate(-130deg); + } + 75% { + border-right-color: #1B9A59; + border-top-color: #1B9A59; + } + 50% { + border-right-color: #F7C223; + border-top-color: #F7C223; + -webkit-transform: rotate(5deg); + } + 25% { + border-top-color: #DE3E35; + border-right-color: #DE3E35; + } +} +@keyframes preloader-right-rotate-multicolor { + 0%, + 100% { + border-right-color: #4285F4; + transform: rotate(-130deg); + } + 75% { + border-right-color: #1B9A59; + border-top-color: #1B9A59; + } + 50% { + border-right-color: #F7C223; + border-top-color: #F7C223; + transform: rotate(5deg); + } + 25% { + border-top-color: #DE3E35; + border-right-color: #DE3E35; + } +} +/* === Progress Bar === */ +.progressbar, +.progressbar-infinite { + height: 4px; + width: 100%; + overflow: hidden; + display: block; + position: relative; + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + background: rgba(33, 150, 243, 0.5); +} +.progressbar { + display: block; + vertical-align: middle; + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; +} +.progressbar span { + content: ''; + width: 100%; + background: #2196f3; + height: 100%; + position: absolute; + left: 0; + top: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + -webkit-transition-duration: 150ms; + transition-duration: 150ms; +} +.progressbar-infinite { + z-index: 15000; +} +.progressbar-infinite:before, +.progressbar-infinite:after { + content: ''; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: #2196f3; + -webkit-transform-origin: left center; + transform-origin: left center; +} +.progressbar-infinite:before { + -webkit-animation: progressbar-infinite-1 2s linear infinite; + animation: progressbar-infinite-1 2s linear infinite; +} +.progressbar-infinite:after { + -webkit-animation: progressbar-infinite-2 2s linear infinite; + animation: progressbar-infinite-2 2s linear infinite; +} +html.with-statusbar-overlay body > .progressbar-infinite, +html.with-statusbar-overlay .framework7-root > .progressbar-infinite { + top: 24px; +} +html.with-statusbar-overlay.ios body > .progressbar-infinite, +html.with-statusbar-overlay.ios .framework7-root > .progressbar-infinite { + top: 20px; +} +.progressbar-infinite.color-multi { + background: none !important; +} +.progressbar-infinite.color-multi:before, +.progressbar-infinite.color-multi:after { + width: 100%; + animation: none; +} +.progressbar-infinite.color-multi:before { + background: none; + -webkit-animation: progressbar-infinite-multicolor-bg 3s step-end infinite; + animation: progressbar-infinite-multicolor-bg 3s step-end infinite; +} +.progressbar-infinite.color-multi:after { + background: none; + -webkit-animation: progressbar-infinite-multicolor-fill 3s linear infinite; + animation: progressbar-infinite-multicolor-fill 3s linear infinite; + -webkit-transform-origin: center center; + transform-origin: center center; +} +body > .progressbar, +.view > .progressbar, +.views > .progressbar, +.page > .progressbar, +.panel > .progressbar, +.popup > .progressbar, +.framework7-root > .progressbar, +body > .progressbar-infinite, +.view > .progressbar-infinite, +.views > .progressbar-infinite, +.page > .progressbar-infinite, +.panel > .progressbar-infinite, +.popup > .progressbar-infinite, +.framework7-root > .progressbar-infinite { + position: absolute; + left: 0; + top: 0; + z-index: 15000; + -webkit-transform-origin: center top; + transform-origin: center top; +} +.progressbar-in { + -webkit-animation: progressbar-in 300ms forwards; + animation: progressbar-in 300ms forwards; +} +.progressbar-out { + -webkit-animation: progressbar-out 300ms forwards; + animation: progressbar-out 300ms forwards; +} +html.with-statusbar-overlay body > .progressbar, +html.with-statusbar-overlay .framework7-root > .progressbar { + top: 24px; +} +html.with-statusbar-overlay.ios body > .progressbar, +html.with-statusbar-overlay.ios .framework7-root > .progressbar { + top: 20px; +} +@-webkit-keyframes progressbar-in { + from { + opacity: 0; + -webkit-transform: scaleY(0); + } + to { + opacity: 1; + -webkit-transform: scaleY(1); + } +} +@keyframes progressbar-in { + from { + opacity: 0; + transform: scaleY(0); + } + to { + opacity: 1; + transform: scaleY(1); + } +} +@-webkit-keyframes progressbar-out { + from { + opacity: 1; + -webkit-transform: scaleY(1); + } + to { + opacity: 0; + -webkit-transform: scaleY(0); + } +} +@keyframes progressbar-out { + from { + opacity: 1; + transform: scaleY(1); + } + to { + opacity: 0; + transform: scaleY(0); + } +} +@-webkit-keyframes progressbar-infinite-1 { + 0% { + -webkit-transform: translateX(-10%) scaleX(0.1); + } + 25% { + -webkit-transform: translateX(30%) scaleX(0.6); + } + 50% { + -webkit-transform: translateX(100%) scaleX(1); + } + 100% { + -webkit-transform: translateX(100%) scaleX(1); + } +} +@keyframes progressbar-infinite-1 { + 0% { + transform: translateX(-10%) scaleX(0.1); + } + 25% { + transform: translateX(30%) scaleX(0.6); + } + 50% { + transform: translateX(100%) scaleX(1); + } + 100% { + transform: translateX(100%) scaleX(1); + } +} +@-webkit-keyframes progressbar-infinite-2 { + 0% { + -webkit-transform: translateX(-100%) scaleX(1); + } + 40% { + -webkit-transform: translateX(-100%) scaleX(1); + } + 75% { + -webkit-transform: translateX(60%) scaleX(0.35); + } + 90% { + -webkit-transform: translateX(100%) scaleX(0.1); + } + 100% { + -webkit-transform: translateX(100%) scaleX(0.1); + } +} +@keyframes progressbar-infinite-2 { + 0% { + transform: translateX(-100%) scaleX(1); + } + 40% { + transform: translateX(-100%) scaleX(1); + } + 75% { + transform: translateX(60%) scaleX(0.35); + } + 90% { + transform: translateX(100%) scaleX(0.1); + } + 100% { + transform: translateX(100%) scaleX(0.1); + } +} +@-webkit-keyframes progressbar-infinite-multicolor-bg { + 0% { + background-color: #4caf50; + } + 25% { + background-color: #f44336; + } + 50% { + background-color: #2196f3; + } + 75% { + background-color: #ffeb3b; + } +} +@keyframes progressbar-infinite-multicolor-bg { + 0% { + background-color: #4caf50; + } + 25% { + background-color: #f44336; + } + 50% { + background-color: #2196f3; + } + 75% { + background-color: #ffeb3b; + } +} +@-webkit-keyframes progressbar-infinite-multicolor-fill { + 0% { + -webkit-transform: scaleX(0); + background-color: #f44336; + } + 24.9% { + -webkit-transform: scaleX(1); + background-color: #f44336; + } + 25% { + -webkit-transform: scaleX(0); + background-color: #2196f3; + } + 49.9% { + -webkit-transform: scaleX(1); + background-color: #2196f3; + } + 50% { + -webkit-transform: scaleX(0); + background-color: #ffeb3b; + } + 74.9% { + -webkit-transform: scaleX(1); + background-color: #ffeb3b; + } + 75% { + -webkit-transform: scaleX(0); + background-color: #4caf50; + } + 100% { + -webkit-transform: scaleX(1); + background-color: #4caf50; + } +} +@keyframes progressbar-infinite-multicolor-fill { + 0% { + transform: scaleX(0); + background-color: #f44336; + } + 24.9% { + transform: scaleX(1); + background-color: #f44336; + } + 25% { + transform: scaleX(0); + background-color: #2196f3; + } + 49.9% { + transform: scaleX(1); + background-color: #2196f3; + } + 50% { + transform: scaleX(0); + background-color: #ffeb3b; + } + 74.9% { + transform: scaleX(1); + background-color: #ffeb3b; + } + 75% { + transform: scaleX(0); + background-color: #4caf50; + } + 100% { + transform: scaleX(1); + background-color: #4caf50; + } +} +/* === Pull To Refresh === */ +.pull-to-refresh-layer { + position: relative; + margin-top: -48px; + left: 0; + top: 0; + width: 100%; + height: 48px; +} +.pull-to-refresh-layer .preloader { + position: absolute; + left: 50%; + top: 50%; + margin-left: -16px; + margin-top: -16px; + visibility: hidden; +} +.pull-to-refresh-layer .pull-to-refresh-arrow { + width: 24px; + height: 24px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -12px; + margin-top: -12px; + background: no-repeat center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'-80%204%2024%2024'%3E%3Cpath%20d%3D'M-69%2C8v12.2l-5.6-5.6L-76%2C16l8%2C8l8-8l-1.4-1.4l-5.6%2C5.6V8H-69z'%20fill%3D'%238c8c8c'%2F%3E%3C%2Fsvg%3E"); + z-index: 10; + -webkit-transform: rotate(0deg) translate3d(0, 0, 0); + transform: rotate(0deg) translate3d(0, 0, 0); + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.pull-to-refresh-content.pull-to-refresh-no-navbar { + margin-top: -48px; + height: -webkit-calc(100% + 48px); + height: -moz-calc(100% + 48px); + height: calc(100% + 48px); +} +.pull-to-refresh-content.pull-to-refresh-no-navbar .pull-to-refresh-layer { + margin-top: 0; +} +.pull-to-refresh-content.transitioning, +.pull-to-refresh-content.refreshing { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.pull-to-refresh-content:not(.refreshing) .pull-to-refresh-layer .preloader { + -webkit-animation: none; + animation: none; +} +.pull-to-refresh-content.refreshing { + -webkit-transform: translate3d(0, 48px, 0); + transform: translate3d(0, 48px, 0); +} +.pull-to-refresh-content.refreshing .pull-to-refresh-arrow { + visibility: hidden; + -webkit-transition-duration: 0ms; + transition-duration: 0ms; +} +.pull-to-refresh-content.refreshing .preloader { + visibility: visible; +} +.pull-to-refresh-content.pull-up .pull-to-refresh-arrow { + -webkit-transform: rotate(180deg) translate3d(0, 0, 0); + transform: rotate(180deg) translate3d(0, 0, 0); +} +/* === Infinite Scroll Preloader === */ +.infinite-scroll-preloader { + text-align: center; + padding: 8px 0; +} +/* === Autocomplete === */ +.autocomplete-page .autocomplete-found { + display: block; +} +.autocomplete-page .autocomplete-not-found { + display: none; +} +.autocomplete-page .autocomplete-values { + display: block; +} +.autocomplete-page .list-block ul:empty { + display: none; +} +.autocomplete-page .navbar .autocomplete-preloader { + margin-right: 16px; +} +.autocomplete-preloader:not(.autocomplete-preloader-visible) { + -webkit-animation: none; + animation: none; + visibility: hidden; +} +.autocomplete-dropdown { + background: #fff; + box-sizing: border-box; + position: absolute; + z-index: 500; + box-shadow: 0 2px 2px rgba(0, 0, 0, 0.25); + width: 100%; + left: 0; +} +.autocomplete-dropdown .autocomplete-dropdown-inner { + position: relative; + overflow: auto; + -webkit-overflow-scrolling: touch; + height: 100%; + z-index: 1; +} +.autocomplete-dropdown .autocomplete-preloader { + display: none; + position: absolute; + right: 16px; + bottom: 100%; + margin-bottom: 8px; + width: 20px; + height: 20px; +} +.autocomplete-dropdown .autocomplete-preloader .preloader-inner-gap, +.autocomplete-dropdown .autocomplete-preloader .preloader-inner-half-circle { + border-width: 3px; +} +.autocomplete-dropdown .autocomplete-preloader-visible { + display: block; +} +.autocomplete-dropdown .autocomplete-dropdown-placeholder { + color: #a9a9a9; +} +.autocomplete-dropdown .list-block { + margin: 0; + color: rgba(0, 0, 0, 0.54); +} +.autocomplete-dropdown .list-block ul { + background: none !important; +} +.autocomplete-dropdown .list-block ul:before { + display: none; +} +.autocomplete-dropdown .list-block ul:after { + display: none; +} +.autocomplete-dropdown .list-block b { + font-weight: normal; + color: #212121; +} +/* === Timeline === */ +.timeline { + margin: 32px 0; + padding: 0 16px; + box-sizing: border-box; +} +.content-block-inner .timeline { + padding: 0; + margin: 0; +} +.timeline-item { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; + overflow: hidden; + padding: 2px 0px 16px; + box-sizing: border-box; + position: relative; +} +.timeline-item:last-child { + padding-bottom: 2px; +} +.timeline-item-date { + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + width: 50px; + text-align: right; + box-sizing: border-box; +} +.timeline-item-date small { + font-size: 10px; +} +.timeline-item-content { + margin: 2px; + min-width: 0; + position: relative; + -webkit-box-flex: 10; + -webkit-flex-shrink: 10; + -ms-flex: 0 10 auto; + flex-shrink: 10; +} +.timeline-item-content p:first-child, +.timeline-item-content ul:first-child, +.timeline-item-content ol:first-child, +.timeline-item-content h1:first-child, +.timeline-item-content h2:first-child, +.timeline-item-content h3:first-child, +.timeline-item-content h4:first-child { + margin-top: 0; +} +.timeline-item-content p:last-child, +.timeline-item-content ul:last-child, +.timeline-item-content ol:last-child, +.timeline-item-content h1:last-child, +.timeline-item-content h2:last-child, +.timeline-item-content h3:last-child, +.timeline-item-content h4:last-child { + margin-bottom: 0; +} +.timeline-item-content .card, +.timeline-item-content.card, +.timeline-item-content .list-block, +.timeline-item-content.list-block, +.timeline-item-content .content-block, +.timeline-item-content.content-block { + margin: 0; + width: 100%; +} +.timeline-item-content .card + .card, +.timeline-item-content .list-block + .card, +.timeline-item-content .content-block + .card, +.timeline-item-content .card + .list-block, +.timeline-item-content .list-block + .list-block, +.timeline-item-content .content-block + .list-block, +.timeline-item-content .card + .content-block, +.timeline-item-content .list-block + .content-block, +.timeline-item-content .content-block + .content-block { + margin: 16px 0 0; +} +.timeline-item-inner { + border-radius: 2px; + padding: 8px 16px; + background: #fff; + box-sizing: border-box; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); +} +.timeline-item-inner .content-block { + padding: 0; + color: inherit; +} +.timeline-item-inner .content-block-inner { + padding-left: 0; + padding-right: 0; + margin: 0; +} +.timeline-item-inner .content-block-inner:before { + display: none; +} +.timeline-item-inner .content-block-inner:after { + display: none; +} +.timeline-item-inner .list-block ul:before { + display: none; +} +.timeline-item-inner .list-block ul:after { + display: none; +} +.timeline-item-inner + .timeline-item-inner { + margin-top: 16px; +} +.timeline-item-divider { + width: 1px; + margin: 0 16px; + position: relative; + width: 10px; + height: 10px; + background: #bbb; + border-radius: 50%; + margin-top: 3px; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; +} +.timeline-item-divider:after, +.timeline-item-divider:before { + content: ' '; + width: 1px; + height: 100vh; + position: absolute; + left: 50%; + background: inherit; + -webkit-transform: translate3d(-50%, 0, 0); + transform: translate3d(-50%, 0, 0); +} +.timeline-item-divider:after { + top: 100%; +} +.timeline-item-divider:before { + bottom: 100%; +} +.timeline-item:last-child .timeline-item-divider:after { + display: none; +} +.timeline-item:first-child .timeline-item-divider:before { + display: none; +} +.timeline-item-time { + color: rgba(0, 0, 0, 0.54); + margin-top: 16px; + font-size: 13px; +} +.timeline-item-time:first-child { + margin-top: 0; +} +.timeline-item-title + .timeline-item-time { + margin-top: 0; +} +.timeline-item-title { + font-size: 16px; +} +.timeline-sides .timeline-item { + margin-left: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: calc(50% - (32px + 10px) / 2 - 50px); + margin-right: 0; +} +.timeline-sides .timeline-item .timeline-item-date { + text-align: right; +} +.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-right: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: calc(50% - (32px + 10px) / 2 - 50px); + margin-left: 0; +} +.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date { + text-align: left; +} +.timeline-sides .timeline-item-left { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-right: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: calc(50% - (32px + 10px) / 2 - 50px); + margin-left: 0; +} +.timeline-sides .timeline-item-left .timeline-item-date { + text-align: left; +} +.timeline-sides .timeline-item-right { + margin-left: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: calc(50% - (32px + 10px) / 2 - 50px); + margin-right: 0; +} +.timeline-sides .timeline-item-right .timeline-item-date { + text-align: right; +} +@media (min-width: 768px) { + .tablet-sides .timeline-item { + margin-left: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: calc(50% - (32px + 10px) / 2 - 50px); + margin-right: 0; + } + .tablet-sides .timeline-item .timeline-item-date { + text-align: right; + } + .tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-right: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: calc(50% - (32px + 10px) / 2 - 50px); + margin-left: 0; + } + .tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date { + text-align: left; + } + .tablet-sides .timeline-item-left { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-right: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: calc(50% - (32px + 10px) / 2 - 50px); + margin-left: 0; + } + .tablet-sides .timeline-item-left .timeline-item-date { + text-align: left; + } + .tablet-sides .timeline-item-right { + margin-left: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: calc(50% - (32px + 10px) / 2 - 50px); + margin-right: 0; + } + .tablet-sides .timeline-item-right .timeline-item-date { + text-align: right; + } +} +.timeline-horizontal { + padding: 0; + margin: 0; + height: 100%; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + position: relative; +} +.timeline-horizontal .timeline-item { + display: block; + width: 33.33333333vw; + margin: 0; + padding: 0; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + padding-top: 34px; + padding-bottom: 12px; + position: relative; + height: 100%; +} +.timeline-horizontal .timeline-item:after { + content: ''; + position: absolute; + right: 0; + top: 0; + left: auto; + bottom: auto; + width: 1px; + height: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 100% 50%; + transform-origin: 100% 50%; +} +html.pixel-ratio-2 .timeline-horizontal .timeline-item:after { + -webkit-transform: scaleX(0.5); + transform: scaleX(0.5); +} +html.pixel-ratio-3 .timeline-horizontal .timeline-item:after { + -webkit-transform: scaleX(0.33); + transform: scaleX(0.33); +} +.timeline-horizontal .timeline-item:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .timeline-horizontal .timeline-item:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .timeline-horizontal .timeline-item:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.timeline-horizontal .timeline-item-date { + background: #2196f3; + width: auto; + text-align: left; + padding: 0px 12px; + line-height: 34px; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 34px; + color: #fff; +} +.timeline-horizontal .timeline-item-date:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .timeline-horizontal .timeline-item-date:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .timeline-horizontal .timeline-item-date:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.timeline-horizontal .timeline-item-content { + padding: 12px; + overflow: auto; + -webkit-overflow-scrolling: touch; + margin: 0; + height: -webkit-calc(100% - 12px); + height: -moz-calc(100% - 12px); + height: calc(100% - 12px); +} +.timeline-horizontal .timeline-item-divider { + display: none; +} +.timeline-horizontal.col-100 .timeline-item { + width: 100vw; +} +.timeline-horizontal.col-95 .timeline-item { + width: 95vw; +} +.timeline-horizontal.col-90 .timeline-item { + width: 90vw; +} +.timeline-horizontal.col-85 .timeline-item { + width: 85vw; +} +.timeline-horizontal.col-80 .timeline-item { + width: 80vw; +} +.timeline-horizontal.col-75 .timeline-item { + width: 75vw; +} +.timeline-horizontal.col-70 .timeline-item { + width: 70vw; +} +.timeline-horizontal.col-66 .timeline-item { + width: 66.66666666666666vw; +} +.timeline-horizontal.col-65 .timeline-item { + width: 65vw; +} +.timeline-horizontal.col-60 .timeline-item { + width: 60vw; +} +.timeline-horizontal.col-55 .timeline-item { + width: 55vw; +} +.timeline-horizontal.col-50 .timeline-item { + width: 50vw; +} +.timeline-horizontal.col-45 .timeline-item { + width: 45vw; +} +.timeline-horizontal.col-40 .timeline-item { + width: 40vw; +} +.timeline-horizontal.col-35 .timeline-item { + width: 35vw; +} +.timeline-horizontal.col-33 .timeline-item { + width: 33.333333333333336vw; +} +.timeline-horizontal.col-30 .timeline-item { + width: 30vw; +} +.timeline-horizontal.col-25 .timeline-item { + width: 25vw; +} +.timeline-horizontal.col-20 .timeline-item { + width: 20vw; +} +.timeline-horizontal.col-15 .timeline-item { + width: 15vw; +} +.timeline-horizontal.col-10 .timeline-item { + width: 10vw; +} +.timeline-horizontal.col-5 .timeline-item { + width: 5vw; +} +@media all and (min-width: 768px) { + .timeline-horizontal.tablet-100 .timeline-item { + width: 100vw; + } + .timeline-horizontal.tablet-95 .timeline-item { + width: 95vw; + } + .timeline-horizontal.tablet-90 .timeline-item { + width: 90vw; + } + .timeline-horizontal.tablet-85 .timeline-item { + width: 85vw; + } + .timeline-horizontal.tablet-80 .timeline-item { + width: 80vw; + } + .timeline-horizontal.tablet-75 .timeline-item { + width: 75vw; + } + .timeline-horizontal.tablet-70 .timeline-item { + width: 70vw; + } + .timeline-horizontal.tablet-66 .timeline-item { + width: 66.66666666666666vw; + } + .timeline-horizontal.tablet-65 .timeline-item { + width: 65vw; + } + .timeline-horizontal.tablet-60 .timeline-item { + width: 60vw; + } + .timeline-horizontal.tablet-55 .timeline-item { + width: 55vw; + } + .timeline-horizontal.tablet-50 .timeline-item { + width: 50vw; + } + .timeline-horizontal.tablet-45 .timeline-item { + width: 45vw; + } + .timeline-horizontal.tablet-40 .timeline-item { + width: 40vw; + } + .timeline-horizontal.tablet-35 .timeline-item { + width: 35vw; + } + .timeline-horizontal.tablet-33 .timeline-item { + width: 33.333333333333336vw; + } + .timeline-horizontal.tablet-30 .timeline-item { + width: 30vw; + } + .timeline-horizontal.tablet-25 .timeline-item { + width: 25vw; + } + .timeline-horizontal.tablet-20 .timeline-item { + width: 20vw; + } + .timeline-horizontal.tablet-15 .timeline-item { + width: 15vw; + } + .timeline-horizontal.tablet-10 .timeline-item { + width: 10vw; + } + .timeline-horizontal.tablet-5 .timeline-item { + width: 5vw; + } +} +.timeline-year, +.timeline-month { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + padding-top: 24px; + position: relative; + box-sizing: border-box; + height: 100%; +} +.timeline-year-title, +.timeline-month-title { + position: absolute; + left: 0; + top: 0; + width: 100%; + line-height: 24px; + height: 24px; + padding: 0 12px; + box-sizing: border-box; + background: #2196f3; + color: #fff; +} +.timeline-year-title span, +.timeline-month-title span { + display: inline-block; + position: -webkit-sticky; + position: -moz-sticky; + position: sticky; + left: 12px; +} +.timeline-year-title { + font-size: 16px; +} +.timeline-year-title span { + margin-top: 2px; +} +.timeline-month-title span { + margin-top: -2px; +} +/* === Swiper === */ +.swiper-container { + margin-left: auto; + margin-right: auto; + position: relative; + overflow: hidden; + /* Fix of Webkit flickering */ + z-index: 1; +} +.swiper-container-no-flexbox .swiper-slide { + float: left; +} +.swiper-container-vertical > .swiper-wrapper { + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.swiper-wrapper { + position: relative; + width: 100%; + height: 100%; + z-index: 1; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -o-transition-property: -o-transform; + -ms-transition-property: -ms-transform; + transition-property: transform; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +.swiper-container-android .swiper-slide, +.swiper-wrapper { + -webkit-transform: translate3d(0px, 0, 0); + -moz-transform: translate3d(0px, 0, 0); + -o-transform: translate(0px, 0px); + -ms-transform: translate3d(0px, 0, 0); + transform: translate3d(0px, 0, 0); +} +.swiper-container-multirow > .swiper-wrapper { + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -ms-flex-wrap: wrap; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; +} +.swiper-container-free-mode > .swiper-wrapper { + -webkit-transition-timing-function: ease-out; + -moz-transition-timing-function: ease-out; + -ms-transition-timing-function: ease-out; + -o-transition-timing-function: ease-out; + transition-timing-function: ease-out; + margin: 0 auto; +} +.swiper-slide { + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + width: 100%; + height: 100%; + position: relative; +} +/* Auto Height */ +.swiper-container-autoheight, +.swiper-container-autoheight .swiper-slide { + height: auto; +} +.swiper-container-autoheight .swiper-wrapper { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; + -webkit-transition-property: -webkit-transform, height; + -moz-transition-property: -moz-transform; + -o-transition-property: -o-transform; + -ms-transition-property: -ms-transform; + transition-property: transform, height; +} +/* a11y */ +.swiper-container .swiper-notification { + position: absolute; + left: 0; + top: 0; + pointer-events: none; + opacity: 0; + z-index: -1000; +} +/* IE10 Windows Phone 8 Fixes */ +.swiper-wp8-horizontal { + -ms-touch-action: pan-y; + touch-action: pan-y; +} +.swiper-wp8-vertical { + -ms-touch-action: pan-x; + touch-action: pan-x; +} +/* Arrows */ +.swiper-button-prev, +.swiper-button-next { + position: absolute; + top: 50%; + width: 27px; + height: 44px; + margin-top: -22px; + z-index: 10; + cursor: pointer; + -moz-background-size: 27px 44px; + -webkit-background-size: 27px 44px; + background-size: 27px 44px; + background-position: center; + background-repeat: no-repeat; +} +.swiper-button-prev.swiper-button-disabled, +.swiper-button-next.swiper-button-disabled { + opacity: 0.35; + cursor: auto; + pointer-events: none; +} +.swiper-button-prev, +.swiper-container-rtl .swiper-button-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); + left: 10px; + right: auto; +} +.swiper-button-next, +.swiper-container-rtl .swiper-button-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E"); + right: 10px; + left: auto; +} +/* Pagination Styles */ +.swiper-pagination { + position: absolute; + text-align: center; + -webkit-transition: 300ms; + -moz-transition: 300ms; + -o-transition: 300ms; + transition: 300ms; + -webkit-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); + -o-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + z-index: 10; +} +.swiper-pagination.swiper-pagination-hidden { + opacity: 0; +} +/* Common Styles */ +.swiper-pagination-fraction, +.swiper-pagination-custom, +.swiper-container-horizontal > .swiper-pagination-bullets { + bottom: 10px; + left: 0; + width: 100%; +} +/* Bullets */ +.swiper-pagination-bullet { + width: 8px; + height: 8px; + display: inline-block; + border-radius: 100%; + background: #000; + opacity: 0.2; +} +button.swiper-pagination-bullet { + border: none; + margin: 0; + padding: 0; + box-shadow: none; + -moz-appearance: none; + -ms-appearance: none; + -webkit-appearance: none; + appearance: none; +} +.swiper-pagination-clickable .swiper-pagination-bullet { + cursor: pointer; +} +.swiper-pagination-bullet-active { + opacity: 1; + background: #007aff; +} +.swiper-container-vertical > .swiper-pagination-bullets { + right: 10px; + top: 50%; + -webkit-transform: translate3d(0px, -50%, 0); + -moz-transform: translate3d(0px, -50%, 0); + -o-transform: translate(0px, -50%); + -ms-transform: translate3d(0px, -50%, 0); + transform: translate3d(0px, -50%, 0); +} +.swiper-container-vertical > .swiper-pagination-bullets .swiper-pagination-bullet { + margin: 5px 0; + display: block; +} +.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet { + margin: 0 5px; +} +/* Progress */ +.swiper-pagination-progress { + background: rgba(0, 0, 0, 0.25); + position: absolute; +} +.swiper-pagination-progress .swiper-pagination-progressbar { + background: #007aff; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + -webkit-transform: scale(0); + -ms-transform: scale(0); + -o-transform: scale(0); + transform: scale(0); + -webkit-transform-origin: left top; + -moz-transform-origin: left top; + -ms-transform-origin: left top; + -o-transform-origin: left top; + transform-origin: left top; +} +.swiper-container-rtl .swiper-pagination-progress .swiper-pagination-progressbar { + -webkit-transform-origin: right top; + -moz-transform-origin: right top; + -ms-transform-origin: right top; + -o-transform-origin: right top; + transform-origin: right top; +} +.swiper-container-horizontal > .swiper-pagination-progress { + width: 100%; + height: 4px; + left: 0; + top: 0; +} +.swiper-container-vertical > .swiper-pagination-progress { + width: 4px; + height: 100%; + left: 0; + top: 0; +} +/* 3D Container */ +.swiper-container-3d { + -webkit-perspective: 1200px; + -moz-perspective: 1200px; + -o-perspective: 1200px; + perspective: 1200px; +} +.swiper-container-3d .swiper-wrapper, +.swiper-container-3d .swiper-slide, +.swiper-container-3d .swiper-slide-shadow-left, +.swiper-container-3d .swiper-slide-shadow-right, +.swiper-container-3d .swiper-slide-shadow-top, +.swiper-container-3d .swiper-slide-shadow-bottom, +.swiper-container-3d .swiper-cube-shadow { + -webkit-transform-style: preserve-3d; + -moz-transform-style: preserve-3d; + -ms-transform-style: preserve-3d; + transform-style: preserve-3d; +} +.swiper-container-3d .swiper-slide-shadow-left, +.swiper-container-3d .swiper-slide-shadow-right, +.swiper-container-3d .swiper-slide-shadow-top, +.swiper-container-3d .swiper-slide-shadow-bottom { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + pointer-events: none; + z-index: 10; +} +.swiper-container-3d .swiper-slide-shadow-left { + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); + /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Opera 11.10-12.00 */ + background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 16+, IE10, Opera 12.50+ */ +} +.swiper-container-3d .swiper-slide-shadow-right { + background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); + /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Opera 11.10-12.00 */ + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 16+, IE10, Opera 12.50+ */ +} +.swiper-container-3d .swiper-slide-shadow-top { + background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); + /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Opera 11.10-12.00 */ + background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 16+, IE10, Opera 12.50+ */ +} +.swiper-container-3d .swiper-slide-shadow-bottom { + background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0))); + /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Opera 11.10-12.00 */ + background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); + /* Firefox 16+, IE10, Opera 12.50+ */ +} +/* Coverflow */ +.swiper-container-coverflow .swiper-wrapper, +.swiper-container-flip .swiper-wrapper { + /* Windows 8 IE 10 fix */ + -ms-perspective: 1200px; +} +/* Cube + Flip */ +.swiper-container-cube, +.swiper-container-flip { + overflow: visible; +} +.swiper-container-cube .swiper-slide, +.swiper-container-flip .swiper-slide { + pointer-events: none; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; + z-index: 1; +} +.swiper-container-cube .swiper-slide .swiper-slide, +.swiper-container-flip .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-container-cube .swiper-slide-active, +.swiper-container-flip .swiper-slide-active, +.swiper-container-cube .swiper-slide-active .swiper-slide-active, +.swiper-container-flip .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-container-cube .swiper-slide-shadow-top, +.swiper-container-flip .swiper-slide-shadow-top, +.swiper-container-cube .swiper-slide-shadow-bottom, +.swiper-container-flip .swiper-slide-shadow-bottom, +.swiper-container-cube .swiper-slide-shadow-left, +.swiper-container-flip .swiper-slide-shadow-left, +.swiper-container-cube .swiper-slide-shadow-right, +.swiper-container-flip .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; +} +/* Cube */ +.swiper-container-cube .swiper-slide { + visibility: hidden; + -webkit-transform-origin: 0 0; + -moz-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + width: 100%; + height: 100%; +} +.swiper-container-cube.swiper-container-rtl .swiper-slide { + -webkit-transform-origin: 100% 0; + -moz-transform-origin: 100% 0; + -ms-transform-origin: 100% 0; + transform-origin: 100% 0; +} +.swiper-container-cube .swiper-slide-active, +.swiper-container-cube .swiper-slide-next, +.swiper-container-cube .swiper-slide-prev, +.swiper-container-cube .swiper-slide-next + .swiper-slide { + pointer-events: auto; + visibility: visible; +} +.swiper-container-cube .swiper-cube-shadow { + position: absolute; + left: 0; + bottom: 0px; + width: 100%; + height: 100%; + background: #000; + opacity: 0.6; + -webkit-filter: blur(50px); + filter: blur(50px); + z-index: 0; +} +/* Fade */ +.swiper-container-fade.swiper-container-free-mode .swiper-slide { + -webkit-transition-timing-function: ease-out; + -moz-transition-timing-function: ease-out; + -ms-transition-timing-function: ease-out; + -o-transition-timing-function: ease-out; + transition-timing-function: ease-out; +} +.swiper-container-fade .swiper-slide { + pointer-events: none; + -webkit-transition-property: opacity; + -moz-transition-property: opacity; + -o-transition-property: opacity; + transition-property: opacity; +} +.swiper-container-fade .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-container-fade .swiper-slide-active, +.swiper-container-fade .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-zoom-container { + width: 100%; + height: 100%; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -moz-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -moz-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + text-align: center; +} +.swiper-zoom-container > img, +.swiper-zoom-container > svg, +.swiper-zoom-container > canvas { + max-width: 100%; + max-height: 100%; + object-fit: contain; +} +/* Scrollbar */ +.swiper-scrollbar { + border-radius: 10px; + position: relative; + -ms-touch-action: none; + background: rgba(0, 0, 0, 0.1); +} +.swiper-container-horizontal > .swiper-scrollbar { + position: absolute; + left: 1%; + bottom: 3px; + z-index: 50; + height: 5px; + width: 98%; +} +.swiper-container-vertical > .swiper-scrollbar { + position: absolute; + right: 3px; + top: 1%; + z-index: 50; + width: 5px; + height: 98%; +} +.swiper-scrollbar-drag { + height: 100%; + width: 100%; + position: relative; + background: rgba(0, 0, 0, 0.5); + border-radius: 10px; + left: 0; + top: 0; +} +.swiper-scrollbar-cursor-drag { + cursor: move; +} +/* Preloader */ +.swiper-slide .preloader { + width: 42px; + height: 42px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -21px; + margin-top: -21px; + z-index: 10; +} +/* === Photo Browser === */ +.photo-browser { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 11500; +} +body > .photo-browser, +.framework7-root > .photo-browser { + opacity: 0; + display: none; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +body > .photo-browser.photo-browser-in, +.framework7-root > .photo-browser.photo-browser-in { + display: block; + -webkit-animation: photoBrowserIn 400ms forwards; + animation: photoBrowserIn 400ms forwards; +} +body > .photo-browser.photo-browser-out, +.framework7-root > .photo-browser.photo-browser-out { + display: block; + -webkit-animation: photoBrowserOut 400ms forwards; + animation: photoBrowserOut 400ms forwards; +} +html.with-statusbar-overlay body > .photo-browser, +html.with-statusbar-overlay .framework7-root > .photo-browser { + height: -webkit-calc(100% - 24px); + height: calc(100% - 24px); + top: 24px; +} +html.with-statusbar-overlay.ios body > .photo-browser, +html.with-statusbar-overlay.ios .framework7-root > .photo-browser { + height: -webkit-calc(100% - 20px); + height: calc(100% - 20px); + top: 20px; +} +.popup > .photo-browser .navbar, +body > .photo-browser .navbar, +.framework7-root > .photo-browser .navbar, +.popup > .photo-browser .toolbar, +body > .photo-browser .toolbar, +.framework7-root > .photo-browser .toolbar { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.photo-browser .page[data-page="photo-browser-slides"] { + background: none; +} +.photo-browser-popup { + background: none; +} +.photo-browser .navbar, +.views .view[data-page="photo-browser-slides"] .navbar, +.photo-browser .toolbar, +.views .view[data-page="photo-browser-slides"] .toolbar { + background: rgba(33, 150, 243, 0.95); + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.view[data-page="photo-browser-slides"] .page[data-page="photo-browser-slides"] .navbar, +.view[data-page="photo-browser-slides"] .page[data-page="photo-browser-slides"] .toolbar { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.view[data-page="photo-browser-slides"] .page[data-page="photo-browser-slides"] .toolbar, +.photo-browser .page[data-page="photo-browser-slides"] .toolbar { + bottom: 0; + top: auto; +} +.photo-browser-exposed .navbar, +.photo-browser-exposed .toolbar { + opacity: 0; + visibility: hidden; + pointer-events: none; +} +.photo-browser-exposed .photo-browser-swiper-container { + background: #000; +} +.photo-browser-of { + margin: 0 5px; +} +.photo-browser-captions { + pointer-events: none; + position: absolute; + left: 0; + width: 100%; + bottom: 0; + z-index: 10; + opacity: 1; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.photo-browser-captions.photo-browser-captions-exposed { + opacity: 0; +} +.toolbar ~ .photo-browser-captions { + bottom: 48px; + -webkit-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); +} +.photo-browser-exposed .toolbar ~ .photo-browser-captions { + -webkit-transform: translate3d(0, 48px, 0); + transform: translate3d(0, 48px, 0); +} +.toolbar ~ .photo-browser-captions.photo-browser-captions-exposed { + -webkit-transform: translate3d(0, 0px, 0); + transform: translate3d(0, 0px, 0); +} +.photo-browser-caption { + box-sizing: border-box; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + position: absolute; + bottom: 0; + left: 0; + opacity: 0; + padding: 4px 5px; + width: 100%; + text-align: center; + background: rgba(0, 0, 0, 0.8); +} +.photo-browser-caption:empty { + display: none; +} +.photo-browser-caption.photo-browser-caption-active { + opacity: 1; +} +.photo-browser-captions-light .photo-browser-caption { + background: rgba(255, 255, 255, 0.8); +} +.photo-browser-captions-dark .photo-browser-caption { + color: #fff; +} +.photo-browser-exposed .photo-browser-caption { + color: #fff; + background: rgba(0, 0, 0, 0.8); +} +.photo-browser-swiper-container { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: hidden; + background: #fff; + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.photo-browser-swiper-wrapper { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + padding: 0; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.photo-browser-link-inactive { + opacity: 0.3; +} +.photo-browser-slide { + width: 100%; + height: 100%; + position: relative; + overflow: hidden; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + box-sizing: border-box; +} +.photo-browser-slide.transitioning { + -webkit-transition-duration: 400ms; + transition-duration: 400ms; +} +.photo-browser-slide span.swiper-zoom-container { + display: none; +} +.photo-browser-slide img { + width: auto; + height: auto; + max-width: 100%; + max-height: 100%; + display: none; +} +.photo-browser-slide.swiper-slide-active span.swiper-zoom-container, +.photo-browser-slide.swiper-slide-next span.swiper-zoom-container, +.photo-browser-slide.swiper-slide-prev span.swiper-zoom-container { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.photo-browser-slide.swiper-slide-active img, +.photo-browser-slide.swiper-slide-next img, +.photo-browser-slide.swiper-slide-prev img { + display: inline; +} +.photo-browser-slide.swiper-slide-active.photo-browser-slide-lazy .preloader, +.photo-browser-slide.swiper-slide-next.photo-browser-slide-lazy .preloader, +.photo-browser-slide.swiper-slide-prev.photo-browser-slide-lazy .preloader { + display: block; +} +.photo-browser-slide iframe { + width: 100%; + height: 100%; +} +.photo-browser-slide .preloader { + display: none; + position: absolute; + width: 42px; + height: 42px; + margin-left: -21px; + margin-top: -21px; + left: 50%; + top: 50%; +} +.photo-browser.photo-browser-dark .navbar, +.photo-browser.photo-browser-dark .toolbar { + background: rgba(30, 30, 30, 0.8); + color: #fff; +} +.photo-browser.photo-browser-dark .navbar:before, +.photo-browser.photo-browser-dark .toolbar:before { + display: none; +} +.photo-browser.photo-browser-dark .navbar:after, +.photo-browser.photo-browser-dark .toolbar:after { + display: none; +} +.photo-browser.photo-browser-dark .navbar a, +.photo-browser.photo-browser-dark .toolbar a { + color: #fff; +} +.photo-browser.photo-browser-dark .photo-browser-swiper-container { + background: #000; +} +@-webkit-keyframes photoBrowserIn { + 0% { + -webkit-transform: translate3d(0, 0, 0) scale(0.5); + opacity: 0; + } + 100% { + -webkit-transform: translate3d(0, 0, 0) scale(1); + opacity: 1; + } +} +@keyframes photoBrowserIn { + 0% { + transform: translate3d(0, 0, 0) scale(0.5); + opacity: 0; + } + 100% { + transform: translate3d(0, 0, 0) scale(1); + opacity: 1; + } +} +@-webkit-keyframes photoBrowserOut { + 0% { + -webkit-transform: translate3d(0, 0, 0) scale(1); + opacity: 1; + } + 100% { + -webkit-transform: translate3d(0, 0, 0) scale(0.5); + opacity: 0; + } +} +@keyframes photoBrowserOut { + 0% { + transform: translate3d(0, 0, 0) scale(1); + opacity: 1; + } + 100% { + transform: translate3d(0, 0, 0) scale(0.5); + opacity: 0; + } +} +/* === Columns Picker === */ +.picker-columns { + width: 100%; + height: 260px; + z-index: 11500; +} +.picker-columns.picker-modal-inline { + height: 200px; +} +@media (orientation: landscape) and (max-height: 415px) { + .picker-columns:not(.picker-modal-inline) { + height: 200px; + } +} +.popover.popover-picker-columns { + width: 280px; +} +.popover.popover-picker-columns .toolbar { + border-radius: 2px 2px 0 0; +} +.picker-items { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + padding: 0; + text-align: right; + font-size: 20px; + -webkit-mask-box-image: -webkit-linear-gradient(bottom, transparent, transparent 5%, white 20%, white 80%, transparent 95%, transparent); + -webkit-mask-box-image: linear-gradient(to top, transparent, transparent 5%, white 20%, white 80%, transparent 95%, transparent); +} +.picker-items-col { + overflow: hidden; + position: relative; + max-height: 100%; +} +.picker-items-col.picker-items-col-left { + text-align: left; +} +.picker-items-col.picker-items-col-center { + text-align: center; +} +.picker-items-col.picker-items-col-right { + text-align: right; +} +.picker-items-col.picker-items-col-divider { + color: rgba(0, 0, 0, 0.87); + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.picker-items-col-wrapper { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; +} +.picker-item { + height: 36px; + line-height: 36px; + white-space: nowrap; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + color: rgba(0, 0, 0, 0.54); + left: 0; + top: 0; + width: 100%; + box-sizing: border-box; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.picker-item span { + padding: 0 10px; +} +.picker-items-col-absolute .picker-item { + position: absolute; +} +.picker-item.picker-item-far { + pointer-events: none; +} +.picker-item.picker-selected { + color: rgba(0, 0, 0, 0.87); + -webkit-transform: translate3d(0, 0, 0) rotateX(0deg); + transform: translate3d(0, 0, 0) rotateX(0deg); +} +.picker-center-highlight { + height: 36px; + box-sizing: border-box; + position: absolute; + left: 0; + width: 100%; + top: 50%; + margin-top: -18px; + pointer-events: none; +} +.picker-center-highlight:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.15); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .picker-center-highlight:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .picker-center-highlight:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.picker-center-highlight:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.15); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 100%; + transform-origin: 50% 100%; +} +html.pixel-ratio-2 .picker-center-highlight:after { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .picker-center-highlight:after { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +.picker-3d .picker-items { + overflow: hidden; + -webkit-perspective: 1200px; + perspective: 1200px; +} +.picker-3d .picker-items-col, +.picker-3d .picker-items-col-wrapper, +.picker-3d .picker-item { + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; +} +.picker-3d .picker-items-col { + overflow: visible; +} +.picker-3d .picker-item { + -webkit-transform-origin: center center -110px; + transform-origin: center center -110px; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; +} +/* === Calendar === */ +.picker-calendar { + background: #fff; + height: 420px; + overflow: hidden; + bottom: auto; + width: 90%; + left: 50%; + top: 50%; + min-width: 300px; + max-width: 380px; + -webkit-transform: translate3d(-50%, 100%, 0); + transform: translate3d(-50%, 100%, 0); + box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); +} +@media (orientation: landscape) and (max-height: 460px) { + .picker-calendar:not(.picker-modal-inline) { + height: -webkit-calc(100% - 40px); + height: calc(100% - 40px); + } +} +.popover-picker-calendar .picker-calendar { + height: 420px; +} +.picker-calendar .picker-modal-inner { + overflow: hidden; +} +.picker-calendar.modal-in { + -webkit-transform: translate3d(-50%, -50%, 0); + transform: translate3d(-50%, -50%, 0); +} +.picker-calendar.modal-out { + -webkit-transform: translate3d(-50%, 100%, 0); + transform: translate3d(-50%, 100%, 0); +} +.picker-calendar.picker-modal-inline { + height: 300px; +} +.picker-calendar.picker-modal-inline, +.popover-picker-calendar .picker-calendar { + -webkit-transform: translate3d(0%, 0%, 0); + transform: translate3d(0%, 0%, 0); + width: auto; + max-width: none; + left: 0; + top: 0; + box-shadow: none; +} +.picker-calendar.picker-modal { + z-index: 12500; +} +.popover.popover-picker-calendar { + width: 320px; +} +.picker-calendar-selected-date { + line-height: 48px; + color: #fff; + padding: 0 24px; + font-size: 20px; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.picker-calendar-week-days { + height: 14.28571429%; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + font-size: 12px; + box-sizing: border-box; + position: relative; + color: rgba(0, 0, 0, 0.54); +} +.picker-calendar-week-days .picker-calendar-week-day { + -webkit-box-flex: 1; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + width: 14.28571429%; + width: -webkit-calc(100% / 7); + width: -moz-calc(100% / 7); + width: calc(100% / 7); + text-align: center; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.picker-calendar-week-days + .picker-calendar-months { + height: -webkit-calc(100% - 100% / 7); + height: -moz-calc(100% - 100% / 7); + height: calc(100% - 100% / 7); +} +.picker-calendar-months { + width: 100%; + height: 100%; + overflow: hidden; + position: relative; +} +.picker-calendar-months-wrapper { + position: relative; + width: 100%; + height: 100%; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; +} +.picker-calendar-month { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; +} +.picker-calendar-row { + height: 16.66666667%; + height: -webkit-calc(100% / 6); + height: -moz-calc(100% / 6); + height: calc(100% / 6); + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-flex: 1; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + width: 100%; + position: relative; +} +.picker-calendar-day { + -webkit-box-flex: 1; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + box-sizing: border-box; + width: 14.28571429%; + width: -webkit-calc(100% / 7); + width: -moz-calc(100% / 7); + width: calc(100% / 7); + text-align: center; + font-size: 12px; + cursor: pointer; +} +.picker-calendar-day.picker-calendar-day-prev, +.picker-calendar-day.picker-calendar-day-next { + color: #b8b8b8; +} +.picker-calendar-day.picker-calendar-day-disabled { + color: #d4d4d4; + cursor: auto; +} +.picker-calendar-day.picker-calendar-day-today span { + color: #2196f3; +} +.picker-calendar-day.picker-calendar-day-selected span { + background: #2196f3; + color: #fff; +} +.picker-calendar-range .picker-calendar-day.picker-calendar-day-selected span { + border-radius: 0; + width: 100%; +} +.picker-calendar-day.picker-calendar-day-has-events span:after { + content: ''; + width: 4px; + height: 4px; + border-radius: 50%; + background: #2196f3; + position: absolute; + margin-left: -2px; + left: 50%; + bottom: 2px; +} +.picker-calendar-day.picker-calendar-day-has-events.picker-calendar-day-selected span:after { + display: none; +} +.picker-calendar-day span { + display: inline-block; + border-radius: 100%; + width: 36px; + height: 36px; + line-height: 36px; + position: relative; +} +.picker-calendar-month-picker, +.picker-calendar-year-picker { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + width: 50%; + max-width: 200px; + -webkit-box-flex: 10; + -webkit-flex-shrink: 10; + -ms-flex: 0 10 auto; + flex-shrink: 10; +} +.picker-calendar-month-picker span, +.picker-calendar-year-picker span { + -webkit-box-flex: 1; + -webkit-flex-shrink: 1; + -ms-flex: 0 1 auto; + flex-shrink: 1; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + width: 100%; + text-align: center; +} +/* === Notifications === */ +.notifications { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + z-index: 20000; + color: #fff; + font-size: 14px; + margin: 0; + border: none; + display: none; + box-sizing: border-box; + max-height: 100%; + overflow: hidden; + -webkit-overflow-scrolling: touch; + -webkit-transition-duration: 450ms; + transition-duration: 450ms; + -webkit-perspective: 1200px; + perspective: 1200px; +} +.notifications.list-block > ul { + max-width: 568px; + background: #323232; + margin: 0 auto; +} +.notifications.list-block > ul:before { + display: none; +} +.notifications.list-block > ul:after { + display: none; +} +.notifications .item-content { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; + padding-left: 24px; +} +.notifications .item-title { + font-size: 14px; + font-weight: normal; + white-space: normal; + padding-top: 14px; + padding-bottom: 14px; +} +.notifications .item-inner { + padding-right: 24px; + padding-top: 0; + padding-bottom: 0; +} +.notifications .item-inner:after { + display: none; +} +.notifications .item-after { + max-height: none; + margin-left: 16px; +} +.notifications .button.close-notification { + color: #48aeff; +} +.notifications .notification-item { + margin: 0 auto; + -webkit-transition-duration: 450ms; + transition-duration: 450ms; + -webkit-transition-delay: 100ms; + transition-delay: 100ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + opacity: 1; +} +.notifications .notification-hidden { + opacity: 0; + -webkit-transition-delay: 0ms; + transition-delay: 0ms; + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +.notifications .notification-item-removing { + -webkit-transition-delay: 0ms; + transition-delay: 0ms; +} +@media (min-width: 569px) { + .notifications.list-block > ul { + border-radius: 2px; + width: auto; + min-width: 288px; + } +} +/* === Login screen === */ +.login-screen-content { + background: #fff; +} +.login-screen-content .login-screen-title, +.login-screen-content .list-block, +.login-screen-content .content-block, +.login-screen-content .list-block-label { + max-width: 480px; + margin: 24px auto; +} +.login-screen-content .list-block ul { + background: none; +} +.login-screen-content .list-block ul:before { + display: none; +} +.login-screen-content .list-block ul:after { + display: none; +} +.login-screen-content .list-block-label { + text-align: center; +} +.navbar-fixed .page .login-screen-content { + padding-top: 0; +} +.login-screen-title { + text-align: center; + font-size: 34px; +} +/* === Touch ripple === */ +.ripple, +a.floating-button, +.floating-button > a, +a.link, +a.item-link, +.button, +.modal-button, +.tab-link, +.label-radio, +.label-checkbox, +.actions-modal-button, +.speed-dial-buttons a { + -webkit-user-select: none; + user-select: none; +} +.ripple-wave { + left: 0; + top: 0; + position: absolute !important; + border-radius: 50%; + pointer-events: none; + z-index: -1; + background: rgba(0, 0, 0, 0.1); + padding: 0; + margin: 0; + font-size: 0; + -webkit-transform: translate3d(0px, 0px, 0) scale(0); + transform: translate3d(0px, 0px, 0) scale(0); + -webkit-transition-duration: 1400ms; + transition-duration: 1400ms; +} +.ripple-wave.ripple-wave-fill { + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + opacity: 0.35; +} +.ripple-wave.ripple-wave-out { + -webkit-transition-duration: 600ms; + transition-duration: 600ms; + opacity: 0; +} +.button-fill .ripple-wave, +.picker-calendar-day .ripple-wave { + z-index: 1; +} +.button-fill .ripple-wave, +.navbar .ripple-wave, +.toolbar .ripple-wave, +.subnavbar .ripple-wave, +.searchbar .ripple-wave, +.notifications .ripple-wave, +.floating-button .ripple-wave, +.speed-dial-buttons a .ripple-wave { + background: rgba(255, 255, 255, 0.3); +} +.messagebar .ripple-wave { + background: rgba(0, 0, 0, 0.1); +} +.data-table .sortable-cell .ripple-wave { + z-index: 0; +} +.form-checkbox .ripple-wave, +.form-radio .ripple-wave { + background: rgba(33, 150, 243, 0.5); + z-index: 0; +} +/* === Disabled elements === */ +.disabled, +[disabled] { + opacity: 0.55; + pointer-events: none; +} +.disabled .disabled, +.disabled [disabled], +[disabled] .disabled, +[disabled] [disabled] { + opacity: 1; +} +.data-table { + overflow-x: auto; +} +.data-table table { + width: 100%; + border: none; + padding: 0; + margin: 0; + border-collapse: collapse; + text-align: left; +} +.data-table thead { + font-size: 12px; +} +.data-table thead th, +.data-table thead td { + font-weight: 500; + height: 56px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + line-height: 16px; +} +.data-table thead th:not(.sortable-active), +.data-table thead td:not(.sortable-active) { + color: rgba(0, 0, 0, 0.54); +} +.data-table thead i.icon, +.data-table thead i.material-icons { + font-size: 16px; + width: 16px; + height: 16px; + vertical-align: top; +} +.data-table tbody { + font-size: 13px; +} +.data-table tbody tr.data-table-row-selected { + background: #f5f5f5; +} +.data-table tbody td { + height: 48px; +} +.data-table tbody td:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; +} +html.pixel-ratio-2 .data-table tbody td:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); +} +html.pixel-ratio-3 .data-table tbody td:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); +} +html:not(.ios):not(.android) .data-table tbody tr:hover { + background: #f5f5f5; +} +.data-table th, +.data-table td { + padding: 0; + position: relative; + padding-left: 28px; + padding-right: 28px; +} +.data-table th.label-cell, +.data-table td.label-cell { + padding-left: 24px; + padding-right: 24px; +} +.data-table th:first-child, +.data-table td:first-child { + padding-left: 24px; +} +.data-table th:last-child, +.data-table td:last-child { + padding-right: 24px; +} +.data-table th.numeric-cell, +.data-table td.numeric-cell { + text-align: right; +} +.data-table th.checkbox-cell, +.data-table td.checkbox-cell { + padding-left: 24px; + padding-right: 12px; + width: 18px; + overflow: visible; +} +.data-table th.checkbox-cell + td, +.data-table td.checkbox-cell + td, +.data-table th.checkbox-cell + th, +.data-table td.checkbox-cell + th { + padding-left: 12px; +} +.data-table th.actions-cell, +.data-table td.actions-cell { + text-align: right; + white-space: nowrap; +} +.data-table th.actions-cell a.link, +.data-table td.actions-cell a.link { + color: rgba(0, 0, 0, 0.54); + position: relative; + z-index: 1; + cursor: pointer; +} +.data-table th.actions-cell a.link + a.link, +.data-table td.actions-cell a.link + a.link { + margin-left: 24px; +} +.data-table th.actions-cell a.icon-only, +.data-table td.actions-cell a.icon-only { + width: 24px; + height: 24px; + display: inline-block; + vertical-align: middle; + font-size: 18px; + line-height: 24px; + text-align: center; + font-size: 0; +} +.data-table th.actions-cell a.icon-only i, +.data-table td.actions-cell a.icon-only i { + font-size: 18px; + vertical-align: middle; +} +.data-table .sortable-cell { + cursor: pointer; + position: relative; +} +.data-table .sortable-cell:not(.numeric-cell):after, +.data-table .sortable-cell.numeric-cell:before { + content: ''; + display: inline-block; + vertical-align: top; + width: 16px; + height: 16px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23000000'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200h24v24H0V0z'%20fill%3D'none'%2F%3E%3Cpath%20d%3D'M20%2012l-1.41-1.41L13%2016.17V4h-2v12.17l-5.58-5.59L4%2012l8%208%208-8z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); + background-size: 100% auto; + background-position: center; + background-repeat: no-repeat; + font-size: 0; + -webkit-transition-duration: 300ms; + transition-duration: 300ms; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 0; +} +html:not(.ios):not(.android) .data-table .sortable-cell:not(.sortable-active):hover:after, +html:not(.ios):not(.android) .data-table .sortable-cell:not(.sortable-active):hover:before { + opacity: 0.54; +} +.data-table .sortable-cell.sortable-active:after, +.data-table .sortable-cell.sortable-active:before { + opacity: 0.87; +} +.data-table .sortable-cell.sortable-desc:after, +.data-table .sortable-cell.sortable-desc:before { + -webkit-transform: rotate(180deg); + transform: rotate(180deg); +} +.data-table .sortable-cell:not(.numeric-cell):after { + margin-left: 8px; +} +.data-table .sortable-cell.numeric-cell:before { + margin-right: 8px; +} +.data-table.card .card-header, +.card .data-table .card-header, +.data-table.card .card-footer, +.card .data-table .card-footer { + padding-left: 24px; + padding-right: 14px; +} +.data-table.card .card-header, +.card .data-table .card-header { + height: 64px; +} +.data-table.card .card-footer, +.card .data-table .card-footer { + height: 56px; +} +.data-table.card .card-content, +.card .data-table .card-content { + overflow-x: auto; +} +.data-table .data-table-title { + font-size: 20px; +} +.data-table .data-table-links, +.data-table .data-table-actions { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} +.data-table .data-table-links a.link, +.data-table .data-table-actions a.link { + cursor: pointer; +} +.data-table .data-table-links a.link + a.link, +.data-table .data-table-actions a.link + a.link { + margin-left: 24px; +} +.data-table .data-table-actions { + margin-left: auto; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; +} +.data-table .data-table-actions a.link { + cursor: pointer; + min-width: 0; + color: rgba(0, 0, 0, 0.54); +} +.data-table .data-table-actions a.link.icon-only { + width: 24px; + height: 24px; + line-height: 1; + overflow: visible; +} +.data-table .data-table-actions a.link.icon-only.active-state, +html:not(.watch-active-state) .data-table .data-table-actions a.link.icon-only:active { + background: none; +} +.data-table .data-table-header, +.data-table .data-table-header-selected { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + width: 100%; +} +.data-table .card-header > .data-table-header, +.data-table .card-header > .data-table-header-selected { + padding-left: 24px; + padding-right: 14px; + margin-left: -24px; + margin-right: -14px; + height: 100%; + padding-top: 4px; + padding-bottom: 4px; +} +.data-table .data-table-header-selected { + display: none; + background: rgba(33, 150, 243, 0.1); +} +.data-table.data-table-has-checked .data-table-header { + display: none; +} +.data-table.data-table-has-checked .data-table-header-selected { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.data-table .data-table-title-selected { + color: #2196f3; + font-size: 14px; +} +@media (max-width: 480px) and (orientation: portrait) { + .data-table.data-table-collapsible thead { + display: none; + } + .data-table.data-table-collapsible tbody, + .data-table.data-table-collapsible tr, + .data-table.data-table-collapsible td { + display: block; + } + .data-table.data-table-collapsible tr { + position: relative; + } + .data-table.data-table-collapsible tr:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: rgba(0, 0, 0, 0.12); + display: block; + z-index: 15; + -webkit-transform-origin: 50% 0%; + transform-origin: 50% 0%; + } + html.pixel-ratio-2 .data-table.data-table-collapsible tr:before { + -webkit-transform: scaleY(0.5); + transform: scaleY(0.5); + } + html.pixel-ratio-3 .data-table.data-table-collapsible tr:before { + -webkit-transform: scaleY(0.33); + transform: scaleY(0.33); + } + .data-table.data-table-collapsible tr:hover { + background-color: inherit; + } + .data-table.data-table-collapsible td { + text-align: left; + padding-left: 16px; + padding-right: 16px; + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -ms-flex-line-pack: center; + -webkit-align-content: center; + align-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; + } + .data-table.data-table-collapsible td:before { + display: none; + } + .data-table.data-table-collapsible td:not(.checkbox-cell) { + font-size: 16px; + } + .data-table.data-table-collapsible td:not(.checkbox-cell):before { + width: 40%; + display: block; + content: attr(data-collapsible-title); + position: relative; + height: auto; + background: none; + -webkit-transform: none !important; + transform: none !important; + color: rgba(0, 0, 0, 0.54); + font-weight: 500; + font-size: 12px; + margin-right: 16px; + line-height: 16px; + -webkit-box-flex: 0; + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + } + .data-table.data-table-collapsible td.checkbox-cell { + position: absolute; + left: 0; + top: 0; + } + .data-table.data-table-collapsible td.checkbox-cell + td { + padding-left: 16px; + } + .data-table.data-table-collapsible td.checkbox-cell ~ td { + margin-left: 32px; + } +} +.data-table .tablet-only, +.data-table .tablet-landscape-only { + display: none; +} +@media (min-width: 768px) { + .data-table .tablet-only { + display: table-cell; + } +} +@media (min-width: 768px) and (orientation: landscape) { + .data-table .tablet-landscape-only { + display: table-cell; + } +} diff --git a/bower_components/framework7/dist/css/framework7.material.min.css b/bower_components/framework7/dist/css/framework7.material.min.css new file mode 100644 index 00000000..79ca20af --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.material.min.css @@ -0,0 +1,15 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +.framework7-root,body,html{position:relative;height:100%;width:100%;overflow-x:hidden}body{font-family:Roboto,Noto,Helvetica,Arial,sans-serif;margin:0;padding:0;color:#212121;font-size:14px;line-height:1.5;width:100%;-webkit-text-size-adjust:100%;background:#fff;overflow:hidden}.framework7-root{overflow:hidden}*{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}a,input,select,textarea{outline:0}a{text-decoration:none;color:#2196f3}p{margin:1em 0}.row{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-lines:multiple;-moz-box-lines:multiple;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.row>[class*=col-]{box-sizing:border-box}.row .col-auto{width:100%}.row .col-100{width:100%;width:-webkit-calc((100% - 16px*0)/ 1);width:calc((100% - 16px*0)/ 1)}.row.no-gutter .col-100{width:100%}.row .col-95{width:95%;width:-webkit-calc((100% - 16px*.05263157894736836)/ 1.0526315789473684);width:calc((100% - 16px*.05263157894736836)/ 1.0526315789473684)}.row.no-gutter .col-95{width:95%}.row .col-90{width:90%;width:-webkit-calc((100% - 16px*.11111111111111116)/ 1.1111111111111112);width:calc((100% - 16px*.11111111111111116)/ 1.1111111111111112)}.row.no-gutter .col-90{width:90%}.row .col-85{width:85%;width:-webkit-calc((100% - 16px*.17647058823529416)/ 1.1764705882352942);width:calc((100% - 16px*.17647058823529416)/ 1.1764705882352942)}.row.no-gutter .col-85{width:85%}.row .col-80{width:80%;width:-webkit-calc((100% - 16px*.25)/ 1.25);width:calc((100% - 16px*.25)/ 1.25)}.row.no-gutter .col-80{width:80%}.row .col-75{width:75%;width:-webkit-calc((100% - 16px*.33333333333333326)/ 1.3333333333333333);width:calc((100% - 16px*.33333333333333326)/ 1.3333333333333333)}.row.no-gutter .col-75{width:75%}.row .col-70{width:70%;width:-webkit-calc((100% - 16px*.4285714285714286)/ 1.4285714285714286);width:calc((100% - 16px*.4285714285714286)/ 1.4285714285714286)}.row.no-gutter .col-70{width:70%}.row .col-66{width:66.66666666666666%;width:-webkit-calc((100% - 16px*.5000000000000002)/ 1.5000000000000002);width:calc((100% - 16px*.5000000000000002)/ 1.5000000000000002)}.row.no-gutter .col-66{width:66.66666666666666%}.row .col-65{width:65%;width:-webkit-calc((100% - 16px*.5384615384615385)/ 1.5384615384615385);width:calc((100% - 16px*.5384615384615385)/ 1.5384615384615385)}.row.no-gutter .col-65{width:65%}.row .col-60{width:60%;width:-webkit-calc((100% - 16px*.6666666666666667)/ 1.6666666666666667);width:calc((100% - 16px*.6666666666666667)/ 1.6666666666666667)}.row.no-gutter .col-60{width:60%}.row .col-55{width:55%;width:-webkit-calc((100% - 16px*.8181818181818181)/ 1.8181818181818181);width:calc((100% - 16px*.8181818181818181)/ 1.8181818181818181)}.row.no-gutter .col-55{width:55%}.row .col-50{width:50%;width:-webkit-calc((100% - 16px*1)/ 2);width:calc((100% - 16px*1)/ 2)}.row.no-gutter .col-50{width:50%}.row .col-45{width:45%;width:-webkit-calc((100% - 16px*1.2222222222222223)/ 2.2222222222222223);width:calc((100% - 16px*1.2222222222222223)/ 2.2222222222222223)}.row.no-gutter .col-45{width:45%}.row .col-40{width:40%;width:-webkit-calc((100% - 16px*1.5)/ 2.5);width:calc((100% - 16px*1.5)/ 2.5)}.row.no-gutter .col-40{width:40%}.row .col-35{width:35%;width:-webkit-calc((100% - 16px*1.8571428571428572)/ 2.857142857142857);width:calc((100% - 16px*1.8571428571428572)/ 2.857142857142857)}.row.no-gutter .col-35{width:35%}.row .col-33{width:33.333333333333336%;width:-webkit-calc((100% - 16px*2)/ 3);width:calc((100% - 16px*2)/ 3)}.row.no-gutter .col-33{width:33.333333333333336%}.row .col-30{width:30%;width:-webkit-calc((100% - 16px*2.3333333333333335)/ 3.3333333333333335);width:calc((100% - 16px*2.3333333333333335)/ 3.3333333333333335)}.row.no-gutter .col-30{width:30%}.row .col-25{width:25%;width:-webkit-calc((100% - 16px*3)/ 4);width:calc((100% - 16px*3)/ 4)}.row.no-gutter .col-25{width:25%}.row .col-20{width:20%;width:-webkit-calc((100% - 16px*4)/ 5);width:calc((100% - 16px*4)/ 5)}.row.no-gutter .col-20{width:20%}.row .col-15{width:15%;width:-webkit-calc((100% - 16px*5.666666666666667)/ 6.666666666666667);width:calc((100% - 16px*5.666666666666667)/ 6.666666666666667)}.row.no-gutter .col-15{width:15%}.row .col-10{width:10%;width:-webkit-calc((100% - 16px*9)/ 10);width:calc((100% - 16px*9)/ 10)}.row.no-gutter .col-10{width:10%}.row .col-5{width:5%;width:-webkit-calc((100% - 16px*19)/ 20);width:calc((100% - 16px*19)/ 20)}.row.no-gutter .col-5{width:5%}.row .col-auto:nth-last-child(1),.row .col-auto:nth-last-child(1)~.col-auto{width:100%;width:-webkit-calc((100% - 16px*0)/ 1);width:calc((100% - 16px*0)/ 1)}.row.no-gutter .col-auto:nth-last-child(1),.row.no-gutter .col-auto:nth-last-child(1)~.col-auto{width:100%}.row .col-auto:nth-last-child(2),.row .col-auto:nth-last-child(2)~.col-auto{width:50%;width:-webkit-calc((100% - 16px*1)/ 2);width:calc((100% - 16px*1)/ 2)}.row.no-gutter .col-auto:nth-last-child(2),.row.no-gutter .col-auto:nth-last-child(2)~.col-auto{width:50%}.row .col-auto:nth-last-child(3),.row .col-auto:nth-last-child(3)~.col-auto{width:33.33333333%;width:-webkit-calc((100% - 16px*2)/ 3);width:calc((100% - 16px*2)/ 3)}.row.no-gutter .col-auto:nth-last-child(3),.row.no-gutter .col-auto:nth-last-child(3)~.col-auto{width:33.33333333%}.row .col-auto:nth-last-child(4),.row .col-auto:nth-last-child(4)~.col-auto{width:25%;width:-webkit-calc((100% - 16px*3)/ 4);width:calc((100% - 16px*3)/ 4)}.row.no-gutter .col-auto:nth-last-child(4),.row.no-gutter .col-auto:nth-last-child(4)~.col-auto{width:25%}.row .col-auto:nth-last-child(5),.row .col-auto:nth-last-child(5)~.col-auto{width:20%;width:-webkit-calc((100% - 16px*4)/ 5);width:calc((100% - 16px*4)/ 5)}.row.no-gutter .col-auto:nth-last-child(5),.row.no-gutter .col-auto:nth-last-child(5)~.col-auto{width:20%}.row .col-auto:nth-last-child(6),.row .col-auto:nth-last-child(6)~.col-auto{width:16.66666667%;width:-webkit-calc((100% - 16px*5)/ 6);width:calc((100% - 16px*5)/ 6)}.row.no-gutter .col-auto:nth-last-child(6),.row.no-gutter .col-auto:nth-last-child(6)~.col-auto{width:16.66666667%}.row .col-auto:nth-last-child(7),.row .col-auto:nth-last-child(7)~.col-auto{width:14.28571429%;width:-webkit-calc((100% - 16px*6)/ 7);width:calc((100% - 16px*6)/ 7)}.row.no-gutter .col-auto:nth-last-child(7),.row.no-gutter .col-auto:nth-last-child(7)~.col-auto{width:14.28571429%}.row .col-auto:nth-last-child(8),.row .col-auto:nth-last-child(8)~.col-auto{width:12.5%;width:-webkit-calc((100% - 16px*7)/ 8);width:calc((100% - 16px*7)/ 8)}.row.no-gutter .col-auto:nth-last-child(8),.row.no-gutter .col-auto:nth-last-child(8)~.col-auto{width:12.5%}.row .col-auto:nth-last-child(9),.row .col-auto:nth-last-child(9)~.col-auto{width:11.11111111%;width:-webkit-calc((100% - 16px*8)/ 9);width:calc((100% - 16px*8)/ 9)}.row.no-gutter .col-auto:nth-last-child(9),.row.no-gutter .col-auto:nth-last-child(9)~.col-auto{width:11.11111111%}.row .col-auto:nth-last-child(10),.row .col-auto:nth-last-child(10)~.col-auto{width:10%;width:-webkit-calc((100% - 16px*9)/ 10);width:calc((100% - 16px*9)/ 10)}.row.no-gutter .col-auto:nth-last-child(10),.row.no-gutter .col-auto:nth-last-child(10)~.col-auto{width:10%}.row .col-auto:nth-last-child(11),.row .col-auto:nth-last-child(11)~.col-auto{width:9.09090909%;width:-webkit-calc((100% - 16px*10)/ 11);width:calc((100% - 16px*10)/ 11)}.row.no-gutter .col-auto:nth-last-child(11),.row.no-gutter .col-auto:nth-last-child(11)~.col-auto{width:9.09090909%}.row .col-auto:nth-last-child(12),.row .col-auto:nth-last-child(12)~.col-auto{width:8.33333333%;width:-webkit-calc((100% - 16px*11)/ 12);width:calc((100% - 16px*11)/ 12)}.row.no-gutter .col-auto:nth-last-child(12),.row.no-gutter .col-auto:nth-last-child(12)~.col-auto{width:8.33333333%}.row .col-auto:nth-last-child(13),.row .col-auto:nth-last-child(13)~.col-auto{width:7.69230769%;width:-webkit-calc((100% - 16px*12)/ 13);width:calc((100% - 16px*12)/ 13)}.row.no-gutter .col-auto:nth-last-child(13),.row.no-gutter .col-auto:nth-last-child(13)~.col-auto{width:7.69230769%}.row .col-auto:nth-last-child(14),.row .col-auto:nth-last-child(14)~.col-auto{width:7.14285714%;width:-webkit-calc((100% - 16px*13)/ 14);width:calc((100% - 16px*13)/ 14)}.row.no-gutter .col-auto:nth-last-child(14),.row.no-gutter .col-auto:nth-last-child(14)~.col-auto{width:7.14285714%}.row .col-auto:nth-last-child(15),.row .col-auto:nth-last-child(15)~.col-auto{width:6.66666667%;width:-webkit-calc((100% - 16px*14)/ 15);width:calc((100% - 16px*14)/ 15)}.row.no-gutter .col-auto:nth-last-child(15),.row.no-gutter .col-auto:nth-last-child(15)~.col-auto{width:6.66666667%}.row .col-auto:nth-last-child(16),.row .col-auto:nth-last-child(16)~.col-auto{width:6.25%;width:-webkit-calc((100% - 16px*15)/ 16);width:calc((100% - 16px*15)/ 16)}.row.no-gutter .col-auto:nth-last-child(16),.row.no-gutter .col-auto:nth-last-child(16)~.col-auto{width:6.25%}.row .col-auto:nth-last-child(17),.row .col-auto:nth-last-child(17)~.col-auto{width:5.88235294%;width:-webkit-calc((100% - 16px*16)/ 17);width:calc((100% - 16px*16)/ 17)}.row.no-gutter .col-auto:nth-last-child(17),.row.no-gutter .col-auto:nth-last-child(17)~.col-auto{width:5.88235294%}.row .col-auto:nth-last-child(18),.row .col-auto:nth-last-child(18)~.col-auto{width:5.55555556%;width:-webkit-calc((100% - 16px*17)/ 18);width:calc((100% - 16px*17)/ 18)}.row.no-gutter .col-auto:nth-last-child(18),.row.no-gutter .col-auto:nth-last-child(18)~.col-auto{width:5.55555556%}.row .col-auto:nth-last-child(19),.row .col-auto:nth-last-child(19)~.col-auto{width:5.26315789%;width:-webkit-calc((100% - 16px*18)/ 19);width:calc((100% - 16px*18)/ 19)}.row.no-gutter .col-auto:nth-last-child(19),.row.no-gutter .col-auto:nth-last-child(19)~.col-auto{width:5.26315789%}.row .col-auto:nth-last-child(20),.row .col-auto:nth-last-child(20)~.col-auto{width:5%;width:-webkit-calc((100% - 16px*19)/ 20);width:calc((100% - 16px*19)/ 20)}.row.no-gutter .col-auto:nth-last-child(20),.row.no-gutter .col-auto:nth-last-child(20)~.col-auto{width:5%}.row .col-auto:nth-last-child(21),.row .col-auto:nth-last-child(21)~.col-auto{width:4.76190476%;width:-webkit-calc((100% - 16px*20)/ 21);width:calc((100% - 16px*20)/ 21)}.row.no-gutter .col-auto:nth-last-child(21),.row.no-gutter .col-auto:nth-last-child(21)~.col-auto{width:4.76190476%}@media all and (min-width:768px){.row .tablet-100{width:100%;width:-webkit-calc((100% - 16px*0)/ 1);width:calc((100% - 16px*0)/ 1)}.row.no-gutter .tablet-100{width:100%}.row .tablet-95{width:95%;width:-webkit-calc((100% - 16px*.05263157894736836)/ 1.0526315789473684);width:calc((100% - 16px*.05263157894736836)/ 1.0526315789473684)}.row.no-gutter .tablet-95{width:95%}.row .tablet-90{width:90%;width:-webkit-calc((100% - 16px*.11111111111111116)/ 1.1111111111111112);width:calc((100% - 16px*.11111111111111116)/ 1.1111111111111112)}.row.no-gutter .tablet-90{width:90%}.row .tablet-85{width:85%;width:-webkit-calc((100% - 16px*.17647058823529416)/ 1.1764705882352942);width:calc((100% - 16px*.17647058823529416)/ 1.1764705882352942)}.row.no-gutter .tablet-85{width:85%}.row .tablet-80{width:80%;width:-webkit-calc((100% - 16px*.25)/ 1.25);width:calc((100% - 16px*.25)/ 1.25)}.row.no-gutter .tablet-80{width:80%}.row .tablet-75{width:75%;width:-webkit-calc((100% - 16px*.33333333333333326)/ 1.3333333333333333);width:calc((100% - 16px*.33333333333333326)/ 1.3333333333333333)}.row.no-gutter .tablet-75{width:75%}.row .tablet-70{width:70%;width:-webkit-calc((100% - 16px*.4285714285714286)/ 1.4285714285714286);width:calc((100% - 16px*.4285714285714286)/ 1.4285714285714286)}.row.no-gutter .tablet-70{width:70%}.row .tablet-66{width:66.66666666666666%;width:-webkit-calc((100% - 16px*.5000000000000002)/ 1.5000000000000002);width:calc((100% - 16px*.5000000000000002)/ 1.5000000000000002)}.row.no-gutter .tablet-66{width:66.66666666666666%}.row .tablet-65{width:65%;width:-webkit-calc((100% - 16px*.5384615384615385)/ 1.5384615384615385);width:calc((100% - 16px*.5384615384615385)/ 1.5384615384615385)}.row.no-gutter .tablet-65{width:65%}.row .tablet-60{width:60%;width:-webkit-calc((100% - 16px*.6666666666666667)/ 1.6666666666666667);width:calc((100% - 16px*.6666666666666667)/ 1.6666666666666667)}.row.no-gutter .tablet-60{width:60%}.row .tablet-55{width:55%;width:-webkit-calc((100% - 16px*.8181818181818181)/ 1.8181818181818181);width:calc((100% - 16px*.8181818181818181)/ 1.8181818181818181)}.row.no-gutter .tablet-55{width:55%}.row .tablet-50{width:50%;width:-webkit-calc((100% - 16px*1)/ 2);width:calc((100% - 16px*1)/ 2)}.row.no-gutter .tablet-50{width:50%}.row .tablet-45{width:45%;width:-webkit-calc((100% - 16px*1.2222222222222223)/ 2.2222222222222223);width:calc((100% - 16px*1.2222222222222223)/ 2.2222222222222223)}.row.no-gutter .tablet-45{width:45%}.row .tablet-40{width:40%;width:-webkit-calc((100% - 16px*1.5)/ 2.5);width:calc((100% - 16px*1.5)/ 2.5)}.row.no-gutter .tablet-40{width:40%}.row .tablet-35{width:35%;width:-webkit-calc((100% - 16px*1.8571428571428572)/ 2.857142857142857);width:calc((100% - 16px*1.8571428571428572)/ 2.857142857142857)}.row.no-gutter .tablet-35{width:35%}.row .tablet-33{width:33.333333333333336%;width:-webkit-calc((100% - 16px*2)/ 3);width:calc((100% - 16px*2)/ 3)}.row.no-gutter .tablet-33{width:33.333333333333336%}.row .tablet-30{width:30%;width:-webkit-calc((100% - 16px*2.3333333333333335)/ 3.3333333333333335);width:calc((100% - 16px*2.3333333333333335)/ 3.3333333333333335)}.row.no-gutter .tablet-30{width:30%}.row .tablet-25{width:25%;width:-webkit-calc((100% - 16px*3)/ 4);width:calc((100% - 16px*3)/ 4)}.row.no-gutter .tablet-25{width:25%}.row .tablet-20{width:20%;width:-webkit-calc((100% - 16px*4)/ 5);width:calc((100% - 16px*4)/ 5)}.row.no-gutter .tablet-20{width:20%}.row .tablet-15{width:15%;width:-webkit-calc((100% - 16px*5.666666666666667)/ 6.666666666666667);width:calc((100% - 16px*5.666666666666667)/ 6.666666666666667)}.row.no-gutter .tablet-15{width:15%}.row .tablet-10{width:10%;width:-webkit-calc((100% - 16px*9)/ 10);width:calc((100% - 16px*9)/ 10)}.row.no-gutter .tablet-10{width:10%}.row .tablet-5{width:5%;width:-webkit-calc((100% - 16px*19)/ 20);width:calc((100% - 16px*19)/ 20)}.row.no-gutter .tablet-5{width:5%}.row .tablet-auto:nth-last-child(1),.row .tablet-auto:nth-last-child(1)~.col-auto{width:100%;width:-webkit-calc((100% - 16px*0)/ 1);width:calc((100% - 16px*0)/ 1)}.row.no-gutter .tablet-auto:nth-last-child(1),.row.no-gutter .tablet-auto:nth-last-child(1)~.tablet-auto{width:100%}.row .tablet-auto:nth-last-child(2),.row .tablet-auto:nth-last-child(2)~.col-auto{width:50%;width:-webkit-calc((100% - 16px*1)/ 2);width:calc((100% - 16px*1)/ 2)}.row.no-gutter .tablet-auto:nth-last-child(2),.row.no-gutter .tablet-auto:nth-last-child(2)~.tablet-auto{width:50%}.row .tablet-auto:nth-last-child(3),.row .tablet-auto:nth-last-child(3)~.col-auto{width:33.33333333%;width:-webkit-calc((100% - 16px*2)/ 3);width:calc((100% - 16px*2)/ 3)}.row.no-gutter .tablet-auto:nth-last-child(3),.row.no-gutter .tablet-auto:nth-last-child(3)~.tablet-auto{width:33.33333333%}.row .tablet-auto:nth-last-child(4),.row .tablet-auto:nth-last-child(4)~.col-auto{width:25%;width:-webkit-calc((100% - 16px*3)/ 4);width:calc((100% - 16px*3)/ 4)}.row.no-gutter .tablet-auto:nth-last-child(4),.row.no-gutter .tablet-auto:nth-last-child(4)~.tablet-auto{width:25%}.row .tablet-auto:nth-last-child(5),.row .tablet-auto:nth-last-child(5)~.col-auto{width:20%;width:-webkit-calc((100% - 16px*4)/ 5);width:calc((100% - 16px*4)/ 5)}.row.no-gutter .tablet-auto:nth-last-child(5),.row.no-gutter .tablet-auto:nth-last-child(5)~.tablet-auto{width:20%}.row .tablet-auto:nth-last-child(6),.row .tablet-auto:nth-last-child(6)~.col-auto{width:16.66666667%;width:-webkit-calc((100% - 16px*5)/ 6);width:calc((100% - 16px*5)/ 6)}.row.no-gutter .tablet-auto:nth-last-child(6),.row.no-gutter .tablet-auto:nth-last-child(6)~.tablet-auto{width:16.66666667%}.row .tablet-auto:nth-last-child(7),.row .tablet-auto:nth-last-child(7)~.col-auto{width:14.28571429%;width:-webkit-calc((100% - 16px*6)/ 7);width:calc((100% - 16px*6)/ 7)}.row.no-gutter .tablet-auto:nth-last-child(7),.row.no-gutter .tablet-auto:nth-last-child(7)~.tablet-auto{width:14.28571429%}.row .tablet-auto:nth-last-child(8),.row .tablet-auto:nth-last-child(8)~.col-auto{width:12.5%;width:-webkit-calc((100% - 16px*7)/ 8);width:calc((100% - 16px*7)/ 8)}.row.no-gutter .tablet-auto:nth-last-child(8),.row.no-gutter .tablet-auto:nth-last-child(8)~.tablet-auto{width:12.5%}.row .tablet-auto:nth-last-child(9),.row .tablet-auto:nth-last-child(9)~.col-auto{width:11.11111111%;width:-webkit-calc((100% - 16px*8)/ 9);width:calc((100% - 16px*8)/ 9)}.row.no-gutter .tablet-auto:nth-last-child(9),.row.no-gutter .tablet-auto:nth-last-child(9)~.tablet-auto{width:11.11111111%}.row .tablet-auto:nth-last-child(10),.row .tablet-auto:nth-last-child(10)~.col-auto{width:10%;width:-webkit-calc((100% - 16px*9)/ 10);width:calc((100% - 16px*9)/ 10)}.row.no-gutter .tablet-auto:nth-last-child(10),.row.no-gutter .tablet-auto:nth-last-child(10)~.tablet-auto{width:10%}.row .tablet-auto:nth-last-child(11),.row .tablet-auto:nth-last-child(11)~.col-auto{width:9.09090909%;width:-webkit-calc((100% - 16px*10)/ 11);width:calc((100% - 16px*10)/ 11)}.row.no-gutter .tablet-auto:nth-last-child(11),.row.no-gutter .tablet-auto:nth-last-child(11)~.tablet-auto{width:9.09090909%}.row .tablet-auto:nth-last-child(12),.row .tablet-auto:nth-last-child(12)~.col-auto{width:8.33333333%;width:-webkit-calc((100% - 16px*11)/ 12);width:calc((100% - 16px*11)/ 12)}.row.no-gutter .tablet-auto:nth-last-child(12),.row.no-gutter .tablet-auto:nth-last-child(12)~.tablet-auto{width:8.33333333%}.row .tablet-auto:nth-last-child(13),.row .tablet-auto:nth-last-child(13)~.col-auto{width:7.69230769%;width:-webkit-calc((100% - 16px*12)/ 13);width:calc((100% - 16px*12)/ 13)}.row.no-gutter .tablet-auto:nth-last-child(13),.row.no-gutter .tablet-auto:nth-last-child(13)~.tablet-auto{width:7.69230769%}.row .tablet-auto:nth-last-child(14),.row .tablet-auto:nth-last-child(14)~.col-auto{width:7.14285714%;width:-webkit-calc((100% - 16px*13)/ 14);width:calc((100% - 16px*13)/ 14)}.row.no-gutter .tablet-auto:nth-last-child(14),.row.no-gutter .tablet-auto:nth-last-child(14)~.tablet-auto{width:7.14285714%}.row .tablet-auto:nth-last-child(15),.row .tablet-auto:nth-last-child(15)~.col-auto{width:6.66666667%;width:-webkit-calc((100% - 16px*14)/ 15);width:calc((100% - 16px*14)/ 15)}.row.no-gutter .tablet-auto:nth-last-child(15),.row.no-gutter .tablet-auto:nth-last-child(15)~.tablet-auto{width:6.66666667%}.row .tablet-auto:nth-last-child(16),.row .tablet-auto:nth-last-child(16)~.col-auto{width:6.25%;width:-webkit-calc((100% - 16px*15)/ 16);width:calc((100% - 16px*15)/ 16)}.row.no-gutter .tablet-auto:nth-last-child(16),.row.no-gutter .tablet-auto:nth-last-child(16)~.tablet-auto{width:6.25%}.row .tablet-auto:nth-last-child(17),.row .tablet-auto:nth-last-child(17)~.col-auto{width:5.88235294%;width:-webkit-calc((100% - 16px*16)/ 17);width:calc((100% - 16px*16)/ 17)}.row.no-gutter .tablet-auto:nth-last-child(17),.row.no-gutter .tablet-auto:nth-last-child(17)~.tablet-auto{width:5.88235294%}.row .tablet-auto:nth-last-child(18),.row .tablet-auto:nth-last-child(18)~.col-auto{width:5.55555556%;width:-webkit-calc((100% - 16px*17)/ 18);width:calc((100% - 16px*17)/ 18)}.row.no-gutter .tablet-auto:nth-last-child(18),.row.no-gutter .tablet-auto:nth-last-child(18)~.tablet-auto{width:5.55555556%}.row .tablet-auto:nth-last-child(19),.row .tablet-auto:nth-last-child(19)~.col-auto{width:5.26315789%;width:-webkit-calc((100% - 16px*18)/ 19);width:calc((100% - 16px*18)/ 19)}.row.no-gutter .tablet-auto:nth-last-child(19),.row.no-gutter .tablet-auto:nth-last-child(19)~.tablet-auto{width:5.26315789%}.row .tablet-auto:nth-last-child(20),.row .tablet-auto:nth-last-child(20)~.col-auto{width:5%;width:-webkit-calc((100% - 16px*19)/ 20);width:calc((100% - 16px*19)/ 20)}.row.no-gutter .tablet-auto:nth-last-child(20),.row.no-gutter .tablet-auto:nth-last-child(20)~.tablet-auto{width:5%}.row .tablet-auto:nth-last-child(21),.row .tablet-auto:nth-last-child(21)~.col-auto{width:4.76190476%;width:-webkit-calc((100% - 16px*20)/ 21);width:calc((100% - 16px*20)/ 21)}.row.no-gutter .tablet-auto:nth-last-child(21),.row.no-gutter .tablet-auto:nth-last-child(21)~.tablet-auto{width:4.76190476%}}.view,.views{position:relative;height:100%;z-index:5000}.views{overflow:auto;-webkit-overflow-scrolling:touch}.view{width:100%;overflow:hidden;box-sizing:border-box}.pages{position:relative;width:100%;height:100%;overflow:hidden}.page{box-sizing:border-box;position:absolute;left:0;top:0;width:100%;height:100%;background:#fff;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.page.cached{display:none}.page-on-left{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.page-on-right{opacity:0;pointer-events:none;-webkit-transform:translate3d(0,56px,0);transform:translate3d(0,56px,0)}.page-content{overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;height:100%;position:relative;z-index:1}.page-transitioning{-webkit-transition-duration:.3s;transition-duration:.3s}.page-from-right-to-center{pointer-events:none;-webkit-animation:pageFromRightToCenter .3s forwards;animation:pageFromRightToCenter .3s forwards}.page-from-center-to-right{pointer-events:none;-webkit-animation:pageFromCenterToRight .3s forwards;animation:pageFromCenterToRight .3s forwards}@-webkit-keyframes pageFromRightToCenter{from{opacity:0;-webkit-transform:translate3d(0,56px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0)}}@keyframes pageFromRightToCenter{from{opacity:0;transform:translate3d(0,56px,0)}to{opacity:1;transform:translate3d(0,0,0)}}@-webkit-keyframes pageFromCenterToRight{from{opacity:1;-webkit-transform:translate3d(0,0,0)}to{opacity:0;-webkit-transform:translate3d(0,56px,0)}}@keyframes pageFromCenterToRight{from{opacity:1;transform:translate3d(0,0,0)}to{opacity:0;transform:translate3d(0,56px,0)}}.page-from-center-to-left{-webkit-animation:pageFromCenterToLeft .3s forwards;animation:pageFromCenterToLeft .3s forwards}.page-from-left-to-center{-webkit-animation:pageFromLeftToCenter .3s forwards;animation:pageFromLeftToCenter .3s forwards}@-webkit-keyframes pageFromCenterToLeft{from{opacity:1}to{opacity:1}}@keyframes pageFromCenterToLeft{from{opacity:1}to{opacity:1}}@-webkit-keyframes pageFromLeftToCenter{from{opacity:1}to{opacity:1}}@keyframes pageFromLeftToCenter{from{opacity:1}to{opacity:1}}.navbar-inner,.toolbar-inner{position:absolute;left:0;top:0;width:100%;height:100%;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.navbar-inner{-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.toolbar-inner{-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.navbar-inner.cached{display:none}.navbar,.toolbar{width:100%;box-sizing:border-box;position:relative;margin:0;z-index:500;-webkit-backface-visibility:hidden;backface-visibility:hidden;color:#fff}.navbar b,.toolbar b{font-weight:500}.navbar~.toolbar{z-index:499}.navbar,.subnavbar,.toolbar{background:#2196f3}.navbar a.link,.subnavbar a.link,.toolbar a.link{text-decoration:none;position:relative;color:#fff;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;padding:0 16px;min-width:48px}.navbar a.link:before,.subnavbar a.link:before,.toolbar a.link:before{content:'';width:152%;height:152%;position:absolute;left:-26%;top:-26%;background-image:-webkit-radial-gradient(center,circle cover,rgba(255,255,255,.15) 66%,rgba(255,255,255,0) 66%);background-image:radial-gradient(circle at center,rgba(255,255,255,.15) 66%,rgba(255,255,255,0) 66%);background-repeat:no-repeat;background-position:center;background-size:100% 100%;opacity:0;pointer-events:none;-webkit-transition-duration:.6s;transition-duration:.6s}.navbar a.link.active-state:before,.subnavbar a.link.active-state:before,.toolbar a.link.active-state:before,html:not(.watch-active-state) .navbar a.link:active:before,html:not(.watch-active-state) .subnavbar a.link:active:before,html:not(.watch-active-state) .toolbar a.link:active:before{opacity:1;-webkit-transition-duration:150ms;transition-duration:150ms}.navbar a.link i+i,.navbar a.link i+span,.navbar a.link span+i,.navbar a.link span+span,.subnavbar a.link i+i,.subnavbar a.link i+span,.subnavbar a.link span+i,.subnavbar a.link span+span,.toolbar a.link i+i,.toolbar a.link i+span,.toolbar a.link span+i,.toolbar a.link span+span{margin-left:8px}.navbar a.icon-only,.subnavbar a.icon-only,.toolbar a.icon-only{min-width:0;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}.navbar i.icon,.subnavbar i.icon,.toolbar i.icon{display:block}.navbar .center,.subnavbar .center{font-size:20px;font-weight:500;text-align:center;margin:0 16px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:56px;display:inline-block;text-align:left}.navbar .left,.navbar .right,.subnavbar .left,.subnavbar .right{-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.navbar .right,.subnavbar .right{margin-left:auto}.navbar .right:first-child,.subnavbar .right:first-child{position:absolute;right:16px;height:100%}.navbar{left:0;top:0;height:56px;font-size:20px}.navbar a.link{line-height:56px;height:56px}.popup .navbar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.subnavbar{height:48px;width:100%;position:absolute;left:0;top:100%;z-index:20;box-sizing:border-box;padding:0 16px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;overflow:hidden}.subnavbar a.link{line-height:48px;height:48px}.subnavbar .center{line-height:48px}.subnavbar .center:first-child{margin-left:56px}.navbar.no-border .subnavbar{margin-top:0}.navbar-on-left .subnavbar,.navbar-on-right .subnavbar{pointer-events:none}.navbar .subnavbar,.page .subnavbar{position:absolute}.page>.subnavbar{top:0;margin-top:0}.subnavbar>.buttons-row{width:100%}.subnavbar .searchbar,.subnavbar.searchbar{position:absolute}.subnavbar .searchbar,.subnavbar.searchbar{position:absolute}.subnavbar .searchbar{left:0;top:0}.toolbar{left:0;bottom:0;height:48px;font-size:14px}.toolbar a.link{line-height:48px;height:48px}.toolbar a{-webkit-box-flex:1;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;position:relative;white-space:nowrap;text-overflow:ellipsis}.tabbar{z-index:5001;overflow:hidden;bottom:auto;top:0}.tabbar .toolbar-inner{padding-left:0;padding-right:0}.tabbar a.link{line-height:1.4}.tabbar a.link,.tabbar a.tab-link{height:100%;width:100%;box-sizing:border-box;padding-left:0;padding-right:0;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-ms-flex:1;-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;font-size:14px;text-transform:uppercase}.tabbar i.icon{height:24px}.tabbar a.tab-link{-webkit-transition-duration:.3s;transition-duration:.3s;overflow:hidden;color:rgba(255,255,255,.7);position:relative}.tabbar a.tab-link.active,.tabbar a.tab-link.active-state,html:not(.watch-active-state) .tabbar a.tab-link:active{color:#fff}.tabbar .tab-link-highlight{position:absolute;left:0;bottom:0;height:3px;background:#0a6ebd;background:rgba(255,255,255,.5);-webkit-transition-duration:.3s;transition-duration:.3s}.tabbar-labels{height:72px}.tabbar-labels a.link,.tabbar-labels a.tab-link{padding-top:12px;padding-bottom:12px;height:100%;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.tabbar-labels span.tabbar-label{line-height:1;display:block;margin:0;margin-top:10px;position:relative;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100%}.tabbar-labels.toolbar-bottom span.tabbar-label{text-transform:none}.tabbar-scrollable .toolbar-inner{-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;overflow:auto}.tabbar-scrollable .toolbar-inner::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;-webkit-appearance:none;opacity:0!important}.tabbar-scrollable a.link,.tabbar-scrollable a.tab-link{width:auto;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;-ms-flex:0;padding:0 16px}.toolbar-bottom{bottom:0;top:auto}.toolbar-bottom .tab-link-highlight{bottom:auto;top:0}.navbar input[type=email],.navbar input[type=password],.navbar input[type=search],.navbar input[type=tel],.navbar input[type=text],.navbar input[type=url],.subnavbar input[type=email],.subnavbar input[type=password],.subnavbar input[type=search],.subnavbar input[type=tel],.subnavbar input[type=text],.subnavbar input[type=url]{box-sizing:border-box;width:100%;height:32px;display:block;border:none;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border-radius:0;font-family:inherit;color:#fff;font-size:16px;font-weight:400;background-color:transparent;padding:0;border-bottom:1px solid #fff}.navbar input[type=email]::-webkit-input-placeholder,.navbar input[type=password]::-webkit-input-placeholder,.navbar input[type=search]::-webkit-input-placeholder,.navbar input[type=tel]::-webkit-input-placeholder,.navbar input[type=text]::-webkit-input-placeholder,.navbar input[type=url]::-webkit-input-placeholder,.subnavbar input[type=email]::-webkit-input-placeholder,.subnavbar input[type=password]::-webkit-input-placeholder,.subnavbar input[type=search]::-webkit-input-placeholder,.subnavbar input[type=tel]::-webkit-input-placeholder,.subnavbar input[type=text]::-webkit-input-placeholder,.subnavbar input[type=url]::-webkit-input-placeholder{color:#fff;opacity:1}.page>.navbar,.page>.toolbar,.view>.navbar,.view>.toolbar,.views>.navbar,.views>.toolbar{position:absolute}.subnavbar~.page-content{padding-top:48px}.tabbar-fixed .page-content,.toolbar-fixed .page-content{padding-top:48px}.tabbar-labels-fixed .page-content{padding-top:72px}.toolbar~.page-content{padding-top:48px}.tabbar-labels~.page-content{padding-top:72px}.messagebar~.page-content,.messagebar~.pages .page-content,.messagebar~.view .page-content,.toolbar-bottom~.page-content,.toolbar-bottom~.pages .page-content,.toolbar-bottom~.view .page-content{padding-top:0;padding-bottom:48px}.tabbar-labels.toolbar-bottom~.page .page-content,.tabbar-labels.toolbar-bottom~.page-content,.tabbar-labels.toolbar-bottom~.pages .page-content,.tabbar-labels.toolbar-bottom~.view .page-content{padding-bottom:72px}.navbar-fixed .page-content,.navbar-fixed.pages .page-content,.navbar-fixed.view .page-content,.navbar-through .page-content,.navbar-through.pages .page-content,.navbar-through.view .page-content{padding-top:56px}.navbar-fixed .tabbar-fixed .page-content,.navbar-fixed .toolbar-fixed .page-content,.navbar-fixed.tabbar-fixed .page-content,.navbar-fixed.toolbar-fixed .page-content,.navbar-through .tabbar-fixed .page-content,.navbar-through .toolbar-fixed .page-content,.navbar-through.tabbar-fixed .page-content,.navbar-through.toolbar-fixed .page-content,.tabbar-fixed .navbar-fixed .page-content,.tabbar-fixed .navbar-through .page-content,.toolbar-fixed .navbar-fixed .page-content,.toolbar-fixed .navbar-through .page-content{padding-top:104px}.navbar-fixed .tabbar-fixed .toolbar-bottom~.pages .page-content,.navbar-fixed .tabbar-fixed .toolbar-bottom~.view .page-content,.navbar-fixed .toolbar-fixed .toolbar-bottom~.pages .page-content,.navbar-fixed .toolbar-fixed .toolbar-bottom~.view .page-content,.navbar-fixed.tabbar-fixed .toolbar-bottom~.pages .page-content,.navbar-fixed.tabbar-fixed .toolbar-bottom~.view .page-content,.navbar-fixed.toolbar-fixed .toolbar-bottom~.pages .page-content,.navbar-fixed.toolbar-fixed .toolbar-bottom~.view .page-content,.navbar-through .tabbar-fixed .toolbar-bottom~.pages .page-content,.navbar-through .tabbar-fixed .toolbar-bottom~.view .page-content,.navbar-through .toolbar-fixed .toolbar-bottom~.pages .page-content,.navbar-through .toolbar-fixed .toolbar-bottom~.view .page-content,.navbar-through.tabbar-fixed .toolbar-bottom~.pages .page-content,.navbar-through.tabbar-fixed .toolbar-bottom~.view .page-content,.navbar-through.toolbar-fixed .toolbar-bottom~.pages .page-content,.navbar-through.toolbar-fixed .toolbar-bottom~.view .page-content,.tabbar-fixed .navbar-fixed .toolbar-bottom~.pages .page-content,.tabbar-fixed .navbar-fixed .toolbar-bottom~.view .page-content,.tabbar-fixed .navbar-through .toolbar-bottom~.pages .page-content,.tabbar-fixed .navbar-through .toolbar-bottom~.view .page-content,.toolbar-fixed .navbar-fixed .toolbar-bottom~.pages .page-content,.toolbar-fixed .navbar-fixed .toolbar-bottom~.view .page-content,.toolbar-fixed .navbar-through .toolbar-bottom~.pages .page-content,.toolbar-fixed .navbar-through .toolbar-bottom~.view .page-content{padding-top:56px}.navbar-fixed .tabbar-labels-fixed .page-content,.navbar-fixed.tabbar-labels-fixed .page-content,.navbar-through .tabbar-labels-fixed .page-content,.navbar-through.tabbar-labels-fixed .page-content,.tabbar-labels-fixed .navbar-fixed .page-content,.tabbar-labels-fixed .navbar-through .page-content{padding-top:128px}.navbar-fixed .tabbar-labels-fixed .toolbar-bottom~.pages .page-content,.navbar-fixed .tabbar-labels-fixed .toolbar-bottom~.view .page-content,.navbar-fixed.tabbar-labels-fixed .toolbar-bottom~.pages .page-content,.navbar-fixed.tabbar-labels-fixed .toolbar-bottom~.view .page-content,.navbar-through .tabbar-labels-fixed .toolbar-bottom~.pages .page-content,.navbar-through .tabbar-labels-fixed .toolbar-bottom~.view .page-content,.navbar-through.tabbar-labels-fixed .toolbar-bottom~.pages .page-content,.navbar-through.tabbar-labels-fixed .toolbar-bottom~.view .page-content,.tabbar-labels-fixed .navbar-fixed .toolbar-bottom~.pages .page-content,.tabbar-labels-fixed .navbar-fixed .toolbar-bottom~.view .page-content,.tabbar-labels-fixed .navbar-through .toolbar-bottom~.pages .page-content,.tabbar-labels-fixed .navbar-through .toolbar-bottom~.view .page-content{padding-top:56px}.navbar-fixed .toolbar~.page-content,.navbar-through .toolbar~.page-content{padding-top:104px}.navbar-fixed .messagebar~.page-content,.navbar-fixed .toolbar-bottom~.page-content,.navbar-through .messagebar~.page-content,.navbar-through .toolbar-bottom~.page-content{padding-top:56px}.navbar-fixed .tabbar-labels~.page-content,.navbar-through .tabbar-labels~.page-content{padding-top:128px}.navbar-fixed .tabbar-labels.toolbar-bottom~.page-content,.navbar-through .tabbar-labels.toolbar-bottom~.page-content{padding-top:56px}.navbar-fixed .page-content.with-subnavbar,.navbar-fixed .subnavbar~.page-content,.navbar-fixed .with-subnavbar .page-content,.navbar-through .page-content.with-subnavbar,.navbar-through .subnavbar~.page-content,.navbar-through .with-subnavbar .page-content{padding-top:104px}.navbar-fixed .page .subnavbar,.navbar-fixed.page .subnavbar,.navbar-through .page .subnavbar,.navbar-through.page .subnavbar{top:56px}.navbar-fixed .toolbar,.navbar-through .toolbar{top:56px}.navbar-fixed .messagebar,.navbar-fixed .toolbar-bottom,.navbar-through .messagebar,.navbar-through .toolbar-bottom{top:auto}.navbar.navbar-hiding{-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.navbar.navbar-hiding~.page .list-group-title,.navbar.navbar-hiding~.page-content .list-group-title,.navbar.navbar-hiding~.pages .list-group-title{-webkit-transition-duration:.4s;transition-duration:.4s}.navbar.navbar-hiding~.page .subnavbar,.navbar.navbar-hiding~.page-content .subnavbar,.navbar.navbar-hiding~.pages .subnavbar{-webkit-transition-duration:.4s;transition-duration:.4s}.navbar.navbar-hiding~.subnavbar,.navbar.navbar-hiding~.toolbar{-webkit-transition-duration:.4s;transition-duration:.4s}.navbar.navbar-hidden{-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.navbar.navbar-hidden~.page .list-group-title,.navbar.navbar-hidden~.page-content .list-group-title,.navbar.navbar-hidden~.pages .list-group-title{-webkit-transition-duration:.4s;transition-duration:.4s;top:-56px}.navbar.navbar-hidden~.page .subnavbar,.navbar.navbar-hidden~.page-content .subnavbar,.navbar.navbar-hidden~.pages .subnavbar{-webkit-transform:translate3d(0,-56px,0);transform:translate3d(0,-56px,0);-webkit-transition-duration:.4s;transition-duration:.4s}.navbar.navbar-hidden~.subnavbar,.navbar.navbar-hidden~.toolbar:not(.messagebar):not(.toolbar-bottom){-webkit-transform:translate3d(0,-56px,0);transform:translate3d(0,-56px,0);-webkit-transition-duration:.4s;transition-duration:.4s}.navbar.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.page.no-navbar .page-content{padding-top:0}.page.no-navbar .page-content.with-subnavbar,.page.no-navbar.with-subnavbar .page-content,.with-subnavbar .page.no-navbar .page-content{padding-top:48px}.tabbar.tabbar-hiding,.tabbar.toolbar-hiding,.toolbar.tabbar-hiding,.toolbar.toolbar-hiding{-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.tabbar.tabbar-hidden,.tabbar.toolbar-hidden,.toolbar.tabbar-hidden,.toolbar.toolbar-hidden{-webkit-transition-duration:.4s;transition-duration:.4s}.tabbar.not-animated,.toolbar.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.tabbar.tabbar-hidden,.tabbar.toolbar-hidden,.toolbar.tabbar-hidden,.toolbar.toolbar-hidden{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}.navbar~.tabbar.tabbar-hidden,.navbar~.tabbar.toolbar-hidden:not(.messagebar):not(.toolbar-bottom),.navbar~.toolbar.tabbar-hidden,.navbar~.toolbar.toolbar-hidden:not(.messagebar):not(.toolbar-bottom){-webkit-transform:translate3d(0,-104px,0);transform:translate3d(0,-104px,0)}.navbar~.tabbar.tabbar-labels.toolbar-hidden,.navbar~.toolbar.tabbar-labels.toolbar-hidden{-webkit-transform:translate3d(0,-128px,0);transform:translate3d(0,-128px,0)}.tabbar.toolbar-hidden.messagebar,.tabbar.toolbar-hidden.toolbar-bottom,.toolbar.toolbar-hidden.messagebar,.toolbar.toolbar-hidden.toolbar-bottom{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.page.no-tabbar .page-content,.page.no-toolbar .page-content{padding-bottom:0}.navbar.no-shadow,.toolbar.no-shadow{box-shadow:none!important}.navbar-fixed .subnavbar,.navbar-through .subnavbar{box-shadow:0 2px 2px 0 rgba(0,0,0,.2),0 4px 4px 0 rgba(0,0,0,.14),0 1px 1px 0 rgba(0,0,0,.12)}.navbar-fixed .navbar,.navbar-through .navbar{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.navbar-fixed .navbar.navbar-hidden,.navbar-through .navbar.navbar-hidden{box-shadow:0 2px 4px -1px transparent,0 4px 5px 0 transparent,0 1px 10px 0 transparent!important}.tabbar-fixed .toolbar,.tabbar-labels-fixed .toolbar,.toolbar-fixed .toolbar{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.tabbar-fixed .toolbar.toolbar-hidden,.tabbar-labels-fixed .toolbar.toolbar-hidden,.toolbar-fixed .toolbar.toolbar-hidden{box-shadow:0 2px 4px -1px transparent,0 4px 5px 0 transparent,0 1px 10px 0 transparent!important}.tabbar-fixed .toolbar-bottom,.tabbar-labels-fixed .toolbar-bottom,.toolbar-bottom,.toolbar-fixed .toolbar-bottom{box-shadow:0 -2px 4px -1px rgba(0,0,0,.2),0 -4px 5px 0 rgba(0,0,0,.14),0 -1px 10px 0 rgba(0,0,0,.12)}.toolbar-bottom.toolbar-hidden{box-shadow:0 2px 4px -1px transparent,0 4px 5px 0 transparent,0 1px 10px 0 transparent!important}.navbar-fixed .tabbar-fixed .navbar,.navbar-fixed .tabbar-labels-fixed .navbar,.navbar-fixed .toolbar-fixed .navbar,.navbar-fixed.tabbar-fixed .navbar,.navbar-fixed.tabbar-labels-fixed .navbar,.navbar-fixed.toolbar-fixed .navbar,.navbar-through .tabbar-fixed .navbar,.navbar-through .tabbar-labels-fixed .navbar,.navbar-through .toolbar-fixed .navbar,.navbar-through.tabbar-fixed .navbar,.navbar-through.tabbar-labels-fixed .navbar,.navbar-through.toolbar-fixed .navbar{box-shadow:none}.searchbar{height:48px;width:100%;background:#2196f3;box-sizing:border-box;padding:0 16px;overflow:hidden;position:relative;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;color:#fff}.searchbar.no-shadow{box-shadow:none}.searchbar a{position:relative;color:#fff}.searchbar a:before{content:'';width:152%;height:152%;position:absolute;left:-26%;top:-26%;background-image:-webkit-radial-gradient(center,circle cover,rgba(255,255,255,.15) 66%,rgba(255,255,255,0) 66%);background-image:radial-gradient(circle at center,rgba(255,255,255,.15) 66%,rgba(255,255,255,0) 66%);background-repeat:no-repeat;background-position:center;background-size:100% 100%;opacity:0;pointer-events:none;-webkit-transition-duration:.6s;transition-duration:.6s}.searchbar a.active-state:before,html:not(.watch-active-state) .searchbar a:active:before{opacity:1;-webkit-transition-duration:150ms;transition-duration:150ms}.searchbar .searchbar-input{width:100%;height:32px;position:relative;-webkit-box-flex:1;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1}.searchbar input[type=search]{box-sizing:border-box;width:100%;height:32px;display:block;border:none;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border-radius:0;font-family:inherit;color:#fff;font-size:16px;font-weight:400;padding:0;border-bottom:1px solid #fff;height:100%;padding:0 36px 0 24px;background-color:transparent;background-repeat:no-repeat;background-position:0 center;opacity:.6;-webkit-background-size:24px 24px;background-size:24px 24px;-webkit-transition-duration:.3s;transition-duration:.3s;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23FFFFFF'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M15.5%2014h-.79l-.28-.27C15.41%2012.59%2016%2011.11%2016%209.5%2016%205.91%2013.09%203%209.5%203S3%205.91%203%209.5%205.91%2016%209.5%2016c1.61%200%203.09-.59%204.23-1.57l.27.28v.79l5%204.99L20.49%2019l-4.99-5zm-6%200C7.01%2014%205%2011.99%205%209.5S7.01%205%209.5%205%2014%207.01%2014%209.5%2011.99%2014%209.5%2014z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}.searchbar input[type=search]::-webkit-input-placeholder{color:#fff;opacity:1}.searchbar input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}.searchbar .searchbar-clear{position:absolute;width:56px;height:100%;right:-16px;top:0;opacity:0;pointer-events:none;background-position:center;background-repeat:no-repeat;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23fff'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E");-webkit-background-size:24px 24px;background-size:24px 24px;-webkit-transition-duration:.3s;transition-duration:.3s;cursor:pointer}.searchbar .searchbar-cancel{display:none}.searchbar.searchbar-active input[type=search]{opacity:1}.searchbar.searchbar-active .searchbar-clear{pointer-events:auto;opacity:1}.searchbar.searchbar-not-empty .searchbar-clear{pointer-events:auto;opacity:1}.searchbar-overlay{position:absolute;left:0;top:0;width:100%;height:100%;z-index:100;opacity:0;pointer-events:none;background:rgba(0,0,0,.25);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.searchbar-overlay.searchbar-overlay-active{opacity:1;pointer-events:auto}.searchbar-not-found{display:none}.hidden-by-searchbar,.list-block .hidden-by-searchbar,.list-block li.hidden-by-searchbar{display:none}.page>.searchbar{position:absolute;width:100%;left:0;top:0;z-index:200;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.page>.searchbar~.page-content{padding-top:48px}.page>.searchbar.no-shadow{box-shadow:none}.navbar-fixed .page>.searchbar,.navbar-fixed>.searchbar,.navbar-through .page>.searchbar,.navbar-through>.searchbar{top:56px}.navbar-fixed .page>.searchbar~.page-content,.navbar-fixed>.searchbar~.page-content,.navbar-through .page>.searchbar~.page-content,.navbar-through>.searchbar~.page-content{padding-top:104px}.toolbar.messagebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);background:#fff;height:48px;top:auto;bottom:0;font-size:16px;overflow:hidden}.toolbar.messagebar:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#d1d1d1;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .toolbar.messagebar:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .toolbar.messagebar:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.toolbar.messagebar textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:none;background:0 0;border-radius:0;box-shadow:none;display:block;padding:3px 8px 3px;margin:0;width:100%;height:28px;color:#333;font-size:16px;line-height:22px;font-family:inherit;resize:none;-webkit-box-flex:1;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1}.toolbar.messagebar a.link{color:#333;-ms-flex-item-align:flex-end;-webkit-align-self:flex-end;align-self:flex-end;height:48px;line-height:48px}.toolbar.messagebar a.link:before{background-image:-webkit-radial-gradient(center,circle cover,rgba(0,0,0,.1) 66%,rgba(0,0,0,0) 66%);background-image:radial-gradient(circle at center,rgba(0,0,0,.1) 66%,rgba(0,0,0,0) 66%)}.toolbar.messagebar .link{-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}.toolbar.messagebar~.page-content{padding-bottom:48px}.page.no-tabbar .toolbar.messagebar~.page-content,.page.no-toolbar .toolbar.messagebar~.page-content{padding-bottom:48px}.hidden-toolbar .toolbar.messagebar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:0s;transition-duration:0s}i.icon{display:inline-block;vertical-align:middle;background-size:100% auto;background-position:center;background-repeat:no-repeat;font-style:normal;position:relative}i.icon.icon-back{width:24px;height:24px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-forward{width:24px;height:24px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-bars{width:24px;height:24px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M3%2018h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-camera{width:24px;height:24px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23333'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'3.2'%2F%3E%3Cpath%20d%3D'M9%202L7.17%204H4c-1.1%200-2%20.9-2%202v12c0%201.1.9%202%202%202h16c1.1%200%202-.9%202-2V6c0-1.1-.9-2-2-2h-3.17L15%202H9zm3%2015c-2.76%200-5-2.24-5-5s2.24-5%205-5%205%202.24%205%205-2.24%205-5%205z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-f7{width:24px;height:24px;background-image:url(../img/i-f7-material.png);border-radius:3px}i.icon.icon-next,i.icon.icon-prev{width:24px;height:24px}i.icon.icon-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-plus{width:24px;height:24px;font-size:0;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23FFFFFF'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M19%2013h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-close{width:24px;height:24px;font-size:0;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23FFFFFF'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M19%206.41L17.59%205%2012%2010.59%206.41%205%205%206.41%2010.59%2012%205%2017.59%206.41%2019%2012%2013.41%2017.59%2019%2019%2017.59%2013.41%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}.badge{font-size:10px;display:inline-block;color:#fff;background:#8e8e93;border-radius:3px;padding:1px 6px;box-sizing:border-box;vertical-align:middle}.f7-icons .badge,.framework7-icons .badge,.icon .badge,.material-icons .badge{position:absolute;left:100%;margin-left:-10px;top:-2px;font-size:10px;line-height:1.4;padding:1px 5px;font-family:Roboto,Noto,Helvetica,Arial,sans-serif}.chip{font-size:13px;font-weight:400;color:rgba(0,0,0,.87);background:rgba(0,0,0,.12);display:inline-block;height:32px;line-height:32px;border-radius:16px;padding:0 12px;box-sizing:border-box;vertical-align:middle;display:-webkit-inline-box;display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;margin:2px 0}.chip-media{width:32px;height:32px;margin-left:-12px;vertical-align:top;border-radius:50%;text-align:center;line-height:32px;color:#fff;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;font-size:16px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.chip-media img{max-width:100%;max-height:100%;width:auto;height:auto;border-radius:50%;display:block}.chip-media+.chip-label{margin-left:8px}.chip-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;-webkit-box-flex:1;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;min-width:0}.chip-label+.chip-delete{margin-left:4px}.chip-delete{margin-right:-8px;width:24px;height:24px;text-align:center;line-height:24px;cursor:pointer;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23000'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M12%202C6.47%202%202%206.47%202%2012s4.47%2010%2010%2010%2010-4.47%2010-10S17.53%202%2012%202zm5%2013.59L15.59%2017%2012%2013.41%208.41%2017%207%2015.59%2010.59%2012%207%208.41%208.41%207%2012%2010.59%2015.59%207%2017%208.41%2013.41%2012%2017%2015.59z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:center;background-size:20px 20px;opacity:.54}.chip-delete.active-state,html:not(.watch-active-state) .chip-delete:active{opacity:1}.content-block{margin:32px 0;padding:0 16px;box-sizing:border-box}.content-block.no-hairlines .content-block-inner:before,.content-block.no-hairlines ul:before,.content-block.no-hairlines:before{display:none}.content-block.no-hairlines .content-block-inner:after,.content-block.no-hairlines ul:after,.content-block.no-hairlines:after{display:none}.content-block-title{position:relative;overflow:hidden;margin:0;white-space:nowrap;text-overflow:ellipsis;font-size:14px;line-height:1;margin:16px 16px 16px;padding-top:16px;line-height:16px;font-weight:500;color:rgba(0,0,0,.54)}.content-block-title+.card,.content-block-title+.content-block,.content-block-title+.list-block,.content-block-title+.timeline{margin-top:0}.content-block-inner{padding:16px 16px;margin-left:-16px;width:100%;position:relative}.content-block-inner:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .content-block-inner:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .content-block-inner:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.content-block-inner:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .content-block-inner:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .content-block-inner:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.content-block-inner>p:first-child{margin-top:0}.content-block-inner>p:last-child{margin-bottom:0}.content-block.inset{margin-left:16px;margin-right:16px;border-radius:7px}.content-block.inset .content-block-inner{border-radius:4px}.content-block.inset .content-block-inner:before{display:none}.content-block.inset .content-block-inner:after{display:none}@media all and (min-width:768px){.content-block.tablet-inset{margin-left:16px;margin-right:16px;border-radius:4px}.content-block.tablet-inset .content-block-inner{border-radius:4px}.content-block.tablet-inset .content-block-inner:before{display:none}.content-block.tablet-inset .content-block-inner:after{display:none}}.list-block{margin:32px 0;font-size:16px}.list-block ul{list-style:none;padding:0;margin:0;position:relative}.list-block ul:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .list-block ul:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .list-block ul:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.list-block ul:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .list-block ul:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .list-block ul:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.list-block ul ul{padding-left:56px}.list-block ul ul:before{display:none}.list-block ul ul:after{display:none}.list-block .align-top,.list-block .align-top .item-content,.list-block .align-top .item-inner{-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.list-block.inset{margin-left:16px;margin-right:16px;border-radius:4px}.list-block.inset .content-block-title{margin-left:0;margin-right:0}.list-block.inset ul{border-radius:4px}.list-block.inset ul:before{display:none}.list-block.inset ul:after{display:none}.list-block.inset li:first-child>a{border-radius:4px 4px 0 0}.list-block.inset li:last-child>a{border-radius:0 0 4px 4px}.list-block.inset li:first-child:last-child>a{border-radius:4px}@media all and (min-width:768px){.list-block.tablet-inset{margin-left:16px;margin-right:16px;border-radius:4px}.list-block.tablet-inset .content-block-title{margin-left:0;margin-right:0}.list-block.tablet-inset ul{border-radius:4px}.list-block.tablet-inset ul:before{display:none}.list-block.tablet-inset ul:after{display:none}.list-block.tablet-inset li:first-child>a{border-radius:4px 4px 0 0}.list-block.tablet-inset li:last-child>a{border-radius:0 0 4px 4px}.list-block.tablet-inset li:first-child:last-child>a{border-radius:4px}.list-block.tablet-inset .content-block-title{margin-left:0;margin-right:0}.list-block.tablet-inset ul{border-radius:4px}.list-block.tablet-inset ul:before{display:none}.list-block.tablet-inset ul:after{display:none}.list-block.tablet-inset li:first-child>a{border-radius:4px 4px 0 0}.list-block.tablet-inset li:last-child>a{border-radius:0 0 4px 4px}.list-block.tablet-inset li:first-child:last-child>a{border-radius:4px}}.list-block li{box-sizing:border-box;position:relative}.list-block .item-media{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;-webkit-box-lines:single;-moz-box-lines:single;-webkit-flex-wrap:nowrap;-ms-flex-wrap:none;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;padding-top:8px;padding-bottom:8px;min-width:40px}.list-block .item-media i+i{margin-left:8px}.list-block .item-media i+img{margin-left:8px}.list-block .item-media+.item-inner{margin-left:16px}.list-block .item-inner{padding-right:16px;position:relative;width:100%;padding-top:8px;padding-bottom:8px;min-height:48px;box-sizing:border-box;-webkit-box-flex:1;-ms-flex:1;min-width:0;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-ms-flex-item-align:stretch;-webkit-align-self:stretch;align-self:stretch}.list-block .item-inner:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .list-block .item-inner:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .list-block .item-inner:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.list-block .item-title{min-width:0;-webkit-box-flex:1;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;white-space:nowrap;position:relative;overflow:hidden;text-overflow:ellipsis;max-width:100%}.list-block .item-after{white-space:nowrap;color:#757575;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;margin-left:auto;padding-left:8px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;max-height:28px;font-size:14px}.list-block .autocomplete-opener .item-after,.list-block .smart-select .item-after{max-width:70%;overflow:hidden;text-overflow:ellipsis;position:relative;display:block}.list-block .item-actions{margin-left:auto;padding-left:8px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.list-block .item-actions a{min-width:24px;position:relative;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.list-block .item-actions a+a{margin-left:8px}.list-block .item-after+.item-actions{margin-left:0}.list-block .item-link,.list-block .list-button{-webkit-transition-duration:.3s;transition-duration:.3s;display:block;color:inherit;position:relative;overflow:hidden;z-index:0}.list-block .item-link .item-inner,.list-block .list-button .item-inner{padding-right:42px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E");background-size:10px 20px;background-repeat:no-repeat;background-position:95% center;background-position:-webkit-calc(100% - 16px) center;background-position:calc(100% - 16px) center}.list-block .item-link.active-state,.list-block .list-button.active-state,html:not(.watch-active-state) .list-block .item-link:active,html:not(.watch-active-state) .list-block .list-button:active{background-color:rgba(0,0,0,.1)}.list-block .list-button{padding:0 16px;font-size:16px;display:block;line-height:48px}.list-block .item-content{box-sizing:border-box;padding-left:16px;min-height:48px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.list-block .list-block-label{margin:10px 0 35px;padding:0 16px;font-size:14px;color:rgba(0,0,0,.54)}.list-block .swipeout{overflow:hidden;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.list-block .swipeout.deleting{-webkit-transition-duration:.3s;transition-duration:.3s}.list-block .swipeout.deleting .swipeout-content{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.list-block .swipeout.transitioning .swipeout-actions-left a,.list-block .swipeout.transitioning .swipeout-actions-right a,.list-block .swipeout.transitioning .swipeout-content,.list-block .swipeout.transitioning .swipeout-overswipe{-webkit-transition:.3s;transition:.3s}.list-block .swipeout-content{position:relative;z-index:10}.list-block .swipeout-overswipe{-webkit-transition:.2s left;transition:.2s left}.list-block .swipeout-actions-left,.list-block .swipeout-actions-right{position:absolute;top:0;height:100%;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.list-block .swipeout-actions-left a,.list-block .swipeout-actions-right a{padding:0 24px;color:#fff;background:#c7c7cc;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;position:relative;left:0}.list-block .swipeout-actions-left a:after,.list-block .swipeout-actions-right a:after{content:'';position:absolute;top:0;width:600%;height:100%;background:inherit;z-index:-1}.list-block .swipeout-actions-left a.swipeout-delete,.list-block .swipeout-actions-right a.swipeout-delete{background:#f44336}.list-block .swipeout-actions-right{right:0;-webkit-transform:translateX(100%);transform:translateX(100%)}.list-block .swipeout-actions-right a:after{left:100%;margin-left:-1px}.list-block .swipeout-actions-left{left:0;-webkit-transform:translateX(-100%);transform:translateX(-100%)}.list-block .swipeout-actions-left a:after{right:100%;margin-right:-1px}.list-block .item-subtitle{font-size:14px;position:relative;overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis}.list-block .item-text{font-size:14px;color:#757575;line-height:20px;position:relative;overflow:hidden;max-height:40px;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box}.list-block li.media-item .item-inner,.list-block.media-list .item-inner{display:block;padding-top:14px;padding-bottom:14px;-ms-flex-item-align:stretch;-webkit-align-self:stretch;align-self:stretch}.list-block li.media-item .item-link .item-inner,.list-block.media-list .item-link .item-inner{background:0 0;padding-right:16px}.list-block li.media-item .item-link .item-title-row,.list-block.media-list .item-link .item-title-row{padding-right:26px;background:no-repeat right top;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E");background-size:10px 20px}.list-block li.media-item .item-media,.list-block.media-list .item-media{padding-top:14px;padding-bottom:14px;-ms-flex-item-align:flex-start;-webkit-align-self:flex-start;align-self:flex-start}.list-block li.media-item .item-media img,.list-block.media-list .item-media img{display:block}.list-block li.media-item .item-title-row,.list-block.media-list .item-title-row{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.list-block li.media-item .item-content>.item-after,.list-block.media-list .item-content>.item-after{padding-top:14px;padding-bottom:14px;-ms-flex-item-align:flex-start;-webkit-align-self:flex-start;align-self:flex-start}.list-block .list-group ul:after,.list-block .list-group ul:before{z-index:11}.list-block .list-group+.list-group ul:before{display:none}.list-block .item-divider,.list-block .list-group-title{background:#f4f4f4;padding:0 16px;white-space:nowrap;position:relative;max-width:100%;text-overflow:ellipsis;overflow:hidden;color:rgba(0,0,0,.54);height:48px;box-sizing:border-box;line-height:48px;font-size:14px}.list-block .item-divider:before,.list-block .list-group-title:before{display:none}.list-block .list-group-title{position:relative;position:-webkit-sticky;position:-moz-sticky;position:sticky;top:0;z-index:10;margin-top:0}.list-block .sortable-handler{position:absolute;right:0;top:0;bottom:1px;z-index:10;background-repeat:no-repeat;background-size:18px 12px;background-position:center;width:50px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2018%2012'%20fill%3D'%23c7c7cc'%3E%3Cpath%20d%3D'M0%2C2V0h22v2H0z'%2F%3E%3Cpath%20d%3D'M0%2C7V5h22v2H0z'%2F%3E%3Cpath%20d%3D'M0%2C12v-2h22v2H0z'%2F%3E%3C%2Fsvg%3E");opacity:0;visibility:hidden;cursor:pointer;-webkit-transition-duration:.3s;transition-duration:.3s}.list-block.sortable .item-inner{-webkit-transition-duration:.3s;transition-duration:.3s}.list-block.sortable-opened .sortable-handler{visibility:visible;opacity:1}.list-block.sortable-opened .item-inner,.list-block.sortable-opened .item-link .item-inner{padding-right:50px}.list-block.sortable-opened .item-link .item-inner,.list-block.sortable-opened .item-link .item-title-row{background-image:none}.list-block.sortable-sorting li{-webkit-transition-duration:.3s;transition-duration:.3s}.list-block li.sorting{z-index:50;background:rgba(255,255,255,.8);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);-webkit-transition-duration:0s;transition-duration:0s}.list-block li.sorting .item-inner:after{display:none}.list-block li:last-child .list-button:after{display:none}.list-block li:last-child .item-inner:after,.list-block li:last-child li:last-child .item-inner:after{display:none}.list-block li li:last-child .item-inner:after,.list-block li:last-child li .item-inner:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .list-block li li:last-child .item-inner:after,html.pixel-ratio-2 .list-block li:last-child li .item-inner:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .list-block li li:last-child .item-inner:after,html.pixel-ratio-3 .list-block li:last-child li .item-inner:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.list-block.no-hairlines .content-block-inner:before,.list-block.no-hairlines ul:before,.list-block.no-hairlines:before{display:none}.list-block.no-hairlines .content-block-inner:after,.list-block.no-hairlines ul:after,.list-block.no-hairlines:after{display:none}.list-block.no-hairlines-between .item-divider:after,.list-block.no-hairlines-between .item-inner:after,.list-block.no-hairlines-between .list-button:after,.list-block.no-hairlines-between .list-group-title:after{display:none}.contacts-block{margin:0}.contacts-block .list-group-title{padding:0 16px;pointer-events:none;background:0 0;color:#888;line-height:48px;height:48px;font-size:20px;font-weight:500;overflow:visible;width:56px;top:0}.contacts-block .list-group-title+li{margin-top:-48px}.contacts-block .list-group:first-child ul:before{display:none}.contacts-block .list-group:last-child ul:after{display:none}.contacts-block li:not(.list-group-title){padding-left:56px}.list-block input[type=date],.list-block input[type=datetime-local],.list-block input[type=email],.list-block input[type=number],.list-block input[type=password],.list-block input[type=search],.list-block input[type=tel],.list-block input[type=text],.list-block input[type=time],.list-block input[type=url],.list-block select,.list-block textarea{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;box-sizing:border-box;border:none;background:0 0;border-radius:0;box-shadow:none;display:block;padding:0;margin:0;width:100%;height:36px;color:#212121;font-size:16px;font-family:inherit}.list-block input[type=date]::-webkit-input-placeholder,.list-block input[type=datetime-local]::-webkit-input-placeholder,.list-block input[type=email]::-webkit-input-placeholder,.list-block input[type=number]::-webkit-input-placeholder,.list-block input[type=password]::-webkit-input-placeholder,.list-block input[type=search]::-webkit-input-placeholder,.list-block input[type=tel]::-webkit-input-placeholder,.list-block input[type=text]::-webkit-input-placeholder,.list-block input[type=time]::-webkit-input-placeholder,.list-block input[type=url]::-webkit-input-placeholder,.list-block select::-webkit-input-placeholder,.list-block textarea::-webkit-input-placeholder{color:rgba(0,0,0,.35)}.list-block .floating-label,.list-block .label{vertical-align:top;color:rgba(0,0,0,.65);-webkit-transition-duration:.2s;transition-duration:.2s;width:35%;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}.list-block input[type=date],.list-block input[type=datetime-local]{line-height:44px}.list-block select{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none}.list-block textarea{resize:none;line-height:1.4;padding-top:8px;padding-bottom:7px;height:100px}.list-block textarea.resizable{height:36px}.list-block .item-input{width:100%;-ms-flex:1;-webkit-box-flex:1;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;font-size:0;position:relative;margin-bottom:4px;min-height:36px}.list-block .input-item ul:after,.list-block.inputs-list ul:after{display:none}.list-block .input-item .item-media,.list-block.inputs-list .item-media{-ms-flex-item-align:flex-end;-webkit-align-self:flex-end;align-self:flex-end;min-height:36px;margin-bottom:8px;padding:0}.list-block .input-item .item-inner,.list-block.inputs-list .item-inner{display:block;margin-bottom:4px;padding-bottom:0}.list-block .input-item .item-inner:after,.list-block.inputs-list .item-inner:after{display:none}.list-block .input-item .floating-label,.list-block .input-item .label,.list-block.inputs-list .floating-label,.list-block.inputs-list .label{width:100%;font-size:12px}.list-block .input-item .floating-label,.list-block.inputs-list .floating-label{-webkit-transform-origin:left;transform-origin:left;-webkit-transform:scale(1.33333333) translateY(21px);transform:scale(1.33333333) translateY(21px);color:rgba(0,0,0,.35);width:auto;max-width:75%}.list-block .input-item .floating-label~.item-input input::-webkit-input-placeholder,.list-block.inputs-list .floating-label~.item-input input::-webkit-input-placeholder{color:transparent}.list-block .focus-state .floating-label,.list-block .not-empty-state .floating-label{color:rgba(0,0,0,.65);-webkit-transform:scale(1) translateY(0);transform:scale(1) translateY(0)}.list-block .focus-state.item-inner .label{color:#2196f3}.list-block .focus-state .item-input-field:after,.list-block .focus-state.input-field:after{background:#2196f3}.list-block .focus-state .floating-label,.list-block .focus-state .label{color:#2196f3}.list-block .not-empty-state.item-inner .label{color:rgba(0,0,0,.65)}.list-block .not-empty-state .item-input-field:after,.list-block .not-empty-state.input-field:after{background:rgba(0,0,0,.12);transform:none!important}.input-field,.item-input-field{position:relative}.input-field:after,.item-input-field:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .input-field:after,html.pixel-ratio-2 .item-input-field:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .input-field:after,html.pixel-ratio-3 .item-input-field:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.input-field:after,.item-input-field:after{-webkit-transition-duration:.2s;transition-duration:.2s}.focus-state .input-field:after,.focus-state .item-input-field:after,.input-field.focus-state:after,.input-field.not-empty-state:after,.item-input-field.focus-state:after,.item-input-field.not-empty-state:after,.not-empty-state .input-field:after,.not-empty-state .item-input-field:after{background:#2196f3;-webkit-transform:scaleY(2)!important;transform:scaleY(2)!important}textarea.resizable{overflow:hidden}.label-switch{display:inline-block;vertical-align:middle;width:36px;height:14px;position:relative;cursor:pointer;-ms-flex-item-align:center;-webkit-align-self:center;align-self:center}.label-switch .checkbox{width:36px;border-radius:36px;box-sizing:border-box;height:14px;background:#b0afaf;z-index:0;margin:0;padding:0;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border:none;cursor:pointer;position:relative;-webkit-transition-duration:.3s;transition-duration:.3s}.label-switch .checkbox:after{content:' ';height:20px;width:20px;border-radius:20px;background:#fff;position:absolute;z-index:2;top:-3px;left:0;box-shadow:0 2px 5px rgba(0,0,0,.4);-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition-duration:.3s;transition-duration:.3s}.label-switch input[type=checkbox]{display:none}.label-switch input[type=checkbox]:checked+.checkbox{background:rgba(33,150,243,.5)}.label-switch input[type=checkbox]:checked+.checkbox:after{-webkit-transform:translateX(16px);transform:translateX(16px);background:#2196f3}.item-input .label-switch{top:11px}.button{color:#2196f3;text-decoration:none;text-align:center;display:block;border-radius:2px;line-height:36px;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:0 0;padding:0 10px;margin:0;height:36px;white-space:nowrap;text-overflow:ellipsis;font-size:14px;text-transform:uppercase;font-family:inherit;cursor:pointer;min-width:64px;padding:0 8px;position:relative;overflow:hidden;outline:0;border:none;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}input[type=button].button,input[type=submit].button{width:100%}.button.active-state,html:not(.watch-active-state) .button:active{background:rgba(0,0,0,.1)}.button.button-fill{background-color:#2196f3;color:#fff}.button.button-fill.active-state,html:not(.watch-active-state) .button.button-fill:active{background:#0c82df}.button.button-big{height:48px;line-height:48px;border-radius:3px}.button i.icon+i.icon,.button i.icon+span,.button span:not(.ripple-wave)+i.icon,.button span:not(.ripple-wave)+span{margin-left:8px}.navbar .button:not(.button-fill),.notifications .button:not(.button-fill),.subnavbar .button:not(.button-fill),.toolbar .button:not(.button-fill){color:#fff}.navbar .button:not(.button-fill).active-state,.notifications .button:not(.button-fill).active-state,.subnavbar .button:not(.button-fill).active-state,.toolbar .button:not(.button-fill).active-state,html:not(.watch-active-state) .navbar .button:not(.button-fill):active,html:not(.watch-active-state) .notifications .button:not(.button-fill):active,html:not(.watch-active-state) .subnavbar .button:not(.button-fill):active,html:not(.watch-active-state) .toolbar .button:not(.button-fill):active{background:rgba(255,255,255,.15)}.button-raised{box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.button-raised.active-state,html:not(.watch-active-state) .button-raised:active{box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23)}.buttons-row{-ms-flex-item-align:center;-webkit-align-self:center;align-self:center;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-lines:single;-moz-box-lines:single;-webkit-flex-wrap:nowrap;-ms-flex-wrap:none;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.buttons-row .button{margin-left:16px;width:100%;-webkit-box-flex:1;-ms-flex:1}.buttons-row .button:first-child{margin-left:0}.range-slider{width:100%;position:relative;overflow:hidden;-ms-flex-item-align:center;-webkit-align-self:center;align-self:center}.range-slider input[type=range]{position:relative;height:20px;width:100%;margin:0;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#b9b9b9),color-stop(100%,#b9b9b9));background:linear-gradient(to right,#b9b9b9 0,#b9b9b9 100%);background-position:center;background-size:100% 2px;background-repeat:no-repeat;outline:0;-ms-background-position-y:500px}.range-slider input[type=range]:active,.range-slider input[type=range]:focus{border:0;outline:0 none}.range-slider input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border:none;outline:0;height:20px;width:20px;position:relative;background:#2196f3;border-radius:20px}.range-slider input[type=range]::-webkit-slider-thumb:before{position:absolute;top:50%;right:100%;width:2000px;height:2px;margin-top:-1px;z-index:1;background:#2196f3;content:' '}.range-slider input[type=range]::-moz-range-track{width:100%;height:2px;background:#b7b8b7;border:none;outline:0}.range-slider input[type=range]::-moz-range-thumb{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border:none;outline:0;height:20px;width:20px;position:relative;background:#2196f3;border-radius:20px}.range-slider input[type=range]::-ms-track{width:100%;height:2px;cursor:pointer;background:0 0;border-color:transparent;color:transparent}.range-slider input[type=range]::-ms-thumb{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;border:none;outline:0;height:20px;width:20px;position:relative;background:#2196f3;border-radius:20px}.range-slider input[type=range]::-ms-fill-lower{background:#2196f3}.range-slider input[type=range]::-ms-fill-upper{background:#b7b8b7}.item-input .range-slider{top:8px}.form-checkbox{position:relative;display:inline-block;vertical-align:middle}.form-checkbox,label.label-checkbox{cursor:pointer}.form-checkbox input[type=checkbox],.form-checkbox input[type=radio],label.label-checkbox input[type=checkbox],label.label-checkbox input[type=radio]{display:none}.form-checkbox i,label.label-checkbox i.icon-form-checkbox{width:18px;height:18px;position:relative;border-radius:2px;border:2px solid #6d6d6d;box-sizing:border-box;-webkit-transition-duration:.3s;transition-duration:.3s;background:0 0;display:block}.form-checkbox i:after,label.label-checkbox i.icon-form-checkbox:after{content:' ';position:absolute;width:18px;height:18px;left:-2px;top:-2px;-webkit-transition-duration:.3s;transition-duration:.3s;opacity:0;background:no-repeat center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%2016.17L4.83%2012l-1.42%201.41L9%2019%2021%207l-1.41-1.41z'%2F%3E%3C%2Fsvg%3E");-webkit-background-size:100% auto;background-size:100% auto}.form-checkbox input[type=checkbox]:checked~i,label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox,label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox,label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox,label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox,label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox,label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox{border-color:#2196f3;background-color:#2196f3}.form-checkbox input[type=checkbox]:checked~i:after,label.label-checkbox input[type=checkbox]:checked+.item-media i.icon-form-checkbox:after,label.label-checkbox input[type=checkbox]:checked~.item-after i.icon-form-checkbox:after,label.label-checkbox input[type=checkbox]:checked~.item-inner i.icon-form-checkbox:after,label.label-checkbox input[type=radio]:checked+.item-media i.icon-form-checkbox:after,label.label-checkbox input[type=radio]:checked~.item-after i.icon-form-checkbox:after,label.label-checkbox input[type=radio]:checked~.item-inner i.icon-form-checkbox:after{opacity:1}.form-radio{position:relative;display:inline-block;vertical-align:middle}.form-radio,label.label-radio{cursor:pointer}.form-radio input[type=checkbox],.form-radio input[type=radio],label.label-radio input[type=checkbox],label.label-radio input[type=radio]{display:none}.form-radio i,label.label-radio i.icon-form-radio{width:20px;height:20px;position:relative;border-radius:20px;border:2px solid #6d6d6d;box-sizing:border-box;-webkit-transition-duration:.3s;transition-duration:.3s;display:block}.form-radio i:after,label.label-radio i.icon-form-radio:after{content:' ';position:absolute;width:10px;height:10px;left:50%;top:50%;margin-left:-5px;margin-top:-5px;background-color:#2196f3;border-radius:100%;-webkit-transform:scale(0);transform:scale(0);-webkit-transition-duration:.3s;transition-duration:.3s}.form-radio input[type=radio]:checked~i,label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio,label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio,label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio,label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio,label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio,label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio{border-color:#2196f3}.form-radio input[type=radio]:checked~i:after,label.label-radio input[type=checkbox]:checked+.item-media i.icon-form-radio:after,label.label-radio input[type=checkbox]:checked~.item-after i.icon-form-radio:after,label.label-radio input[type=checkbox]:checked~.item-inner i.icon-form-radio:after,label.label-radio input[type=radio]:checked+.item-media i.icon-form-radio:after,label.label-radio input[type=radio]:checked~.item-after i.icon-form-radio:after,label.label-radio input[type=radio]:checked~.item-inner i.icon-form-radio:after{background-color:#2196f3;-webkit-transform:scale(1);transform:scale(1)}label.label-checkbox,label.label-radio{position:relative;overflow:hidden;z-index:0;-webkit-transition-duration:.3s;transition-duration:.3s}label.label-checkbox .item-after i.icon-form-checkbox,label.label-checkbox .item-after i.icon-form-radio,label.label-radio .item-after i.icon-form-checkbox,label.label-radio .item-after i.icon-form-radio{margin-left:8px;margin-right:16px}.media-item label.label-checkbox .item-media i.icon-form-checkbox,.media-item label.label-checkbox .item-media i.icon-form-radio,.media-item label.label-radio .item-media i.icon-form-checkbox,.media-item label.label-radio .item-media i.icon-form-radio,.media-list label.label-checkbox .item-media i.icon-form-checkbox,.media-list label.label-checkbox .item-media i.icon-form-radio,.media-list label.label-radio .item-media i.icon-form-checkbox,.media-list label.label-radio .item-media i.icon-form-radio{margin-top:4px}html:not(.watch-active-state) label.label-checkbox:active,html:not(.watch-active-state) label.label-radio:active,label.label-checkbox.active-state,label.label-radio.active-state{background-color:rgba(0,0,0,.1)}html:not(.watch-active-state) label.label-checkbox:active .item-inner:after,html:not(.watch-active-state) label.label-radio:active .item-inner:after,label.label-checkbox.active-state .item-inner:after,label.label-radio.active-state .item-inner:after{background-color:transparent}.smart-select select{display:none}.floating-button{position:absolute;right:16px;bottom:16px;width:56px;height:56px;border-radius:50%;z-index:1500;box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);background-color:#2196f3;color:#fff;overflow:hidden;-webkit-transition-duration:.3s;transition-duration:.3s;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.floating-button.active-state,html:not(.watch-active-state) .floating-button:active{background:#0c82df}.floating-button-toolbar,.speed-dial{position:absolute;right:16px;bottom:16px;z-index:1500}.floating-button-toolbar .floating-button,.speed-dial .floating-button{right:0;bottom:0;position:relative}.speed-dial .floating-button i{position:absolute;left:50%;top:50%;-webkit-transform:translate3d(-50%,-50%,0) rotate(0) scale(1);transform:translate3d(-50%,-50%,0) rotate(0) scale(1);-webkit-transition-duration:.3s;transition-duration:.3s}.speed-dial .floating-button i+i{-webkit-transform:translate3d(-50%,-50%,0) rotate(-90deg) scale(.5);transform:translate3d(-50%,-50%,0) rotate(-90deg) scale(.5);opacity:0}.speed-dial.speed-dial-opened .floating-button i{-webkit-transform:translate3d(-50%,-50%,0) rotate(90deg) scale(.5);transform:translate3d(-50%,-50%,0) rotate(90deg) scale(.5);opacity:0}.speed-dial.speed-dial-opened .floating-button i+i{-webkit-transform:translate3d(-50%,-50%,0) rotate(0) scale(1);transform:translate3d(-50%,-50%,0) rotate(0) scale(1);opacity:1}.speed-dial-buttons{position:absolute;width:40px;left:50%;margin-left:-20px;bottom:100%;margin-bottom:16px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:reverse;-moz-box-orient:vertical;-moz-box-direction:reverse;-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;visibility:hidden;pointer-events:none}.speed-dial-buttons a{width:40px;height:40px;opacity:0;color:#fff;border-radius:50%;position:relative;z-index:1;overflow:hidden;background-color:#2196f3;-webkit-transition-duration:.3s;transition-duration:.3s;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-transform:translate3d(0,8px,0) scale(.3);transform:translate3d(0,8px,0) scale(.3);-webkit-transform-origin:center bottom;transform-origin:center bottom}.speed-dial-buttons a.active-state,html:not(.watch-active-state) .speed-dial-buttons a:active{background:#0c82df}.speed-dial-buttons a+a{margin-bottom:16px}.speed-dial-opened .speed-dial-buttons{visibility:visible;pointer-events:auto}.speed-dial-opened .speed-dial-buttons a{opacity:1;-webkit-transform:translate3d(0,0,0) scaleY(1);transform:translate3d(0,0,0) scaleY(1);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.speed-dial-opened .speed-dial-buttons a:nth-child(2){-webkit-transition-delay:50ms;transition-delay:50ms}.speed-dial-opened .speed-dial-buttons a:nth-child(3){-webkit-transition-delay:.1s;transition-delay:.1s}.speed-dial-opened .speed-dial-buttons a:nth-child(4){-webkit-transition-delay:150ms;transition-delay:150ms}.speed-dial-opened .speed-dial-buttons a:nth-child(5){-webkit-transition-delay:.2s;transition-delay:.2s}.speed-dial-opened .speed-dial-buttons a:nth-child(6){-webkit-transition-delay:250ms;transition-delay:250ms}.floating-button-to-popover.floating-button-to-popover{-webkit-transition-duration:.3s;transition-duration:.3s}.floating-button-to-popover.floating-button-to-popover-in{-webkit-transition-duration:.1s;transition-duration:.1s}.floating-button-to-popover.floating-button-to-popover-in i{opacity:0;-webkit-transition-duration:.1s;transition-duration:.1s}.floating-button-to-popover.floating-button-to-popover-scale{border-radius:0;-webkit-transition-duration:.3s;transition-duration:.3s;box-shadow:none}.floating-button-to-popover.floating-button-to-popover-out{-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:.3s;transition-duration:.3s}.floating-button-to-popover.floating-button-to-popover-out i{opacity:1;-webkit-transition-duration:.1s;transition-duration:.1s;-webkit-transition-delay:.2s;transition-delay:.2s}.list-block .accordion-item-toggle{cursor:pointer;-webkit-transition-duration:.3s;transition-duration:.3s}.list-block .accordion-item-toggle .item-inner{padding-right:42px;background:no-repeat -webkit-calc(100% - 15px) center;background:no-repeat calc(100% - 15px) center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E");background-size:10px 20px}.list-block .accordion-item-toggle.active-state,html:not(.watch-active-state) .list-block .accordion-item-toggle:active{-webkit-transition-duration:0s;transition-duration:0s;background-color:#d9d9d9}.list-block .accordion-item-toggle.active-state>.item-inner:after,html:not(.watch-active-state) .list-block .accordion-item-toggle:active>.item-inner:after{background-color:transparent}.list-block .accordion-item-toggle .item-inner,.list-block .accordion-item>.item-link .item-inner{-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:background-color;transition-property:background-color}.list-block .accordion-item-toggle .item-inner:after,.list-block .accordion-item>.item-link .item-inner:after{-webkit-transition-duration:.3s;transition-duration:.3s}.list-block .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row,.list-block .accordion-item-expanded.media-item>.item-link .item-title-row,.list-block.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row,.list-block.media-list .accordion-item-expanded>.item-link .item-title-row,.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner,.list-block:not(.media-list) .accordion-item-expanded:not(.media-item)>.item-link .item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20transform%3D'translate(115%2C%2030)%20rotate(90)'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E");background-size:20px 20px}.list-block .accordion-item-expanded .accordion-item-toggle .item-inner:after,.list-block .accordion-item-expanded>.item-link .item-inner:after{background-color:transparent}.list-block .accordion-item .content-block,.list-block .accordion-item .list-block{margin-top:0;margin-bottom:0}.list-block .accordion-item ul{padding-left:0}.accordion-item-content{position:relative;overflow:hidden;height:0;font-size:14px;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.accordion-item-expanded>.accordion-item-content{height:auto}html.android-4 .accordion-item-content{-webkit-transform:none;transform:none}.card .list-block ul,.cards-list ul{background:0 0}.card .list-block>ul:before,.cards-list>ul:before{display:none}.card .list-block>ul:after,.cards-list>ul:after{display:none}.card{background:#fff;margin:8px;position:relative;border-radius:2px;font-size:14px;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.card .content-block,.card .list-block{margin:0}.row:not(.no-gutter) .col>.card{margin-left:0;margin-right:0}.page-content>.card:last-child{margin-bottom:32px}.card-content{position:relative}.card-content-inner{padding:16px;position:relative}.card-content-inner>p:first-child{margin-top:0}.card-content-inner>p:last-child{margin-bottom:0}.card-content-inner>.content-block,.card-content-inner>.list-block{margin:-15px}.card-footer,.card-header{min-height:48px;position:relative;padding:4px 16px;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.card-footer[valign=top],.card-header[valign=top]{-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.card-footer[valign=bottom],.card-header[valign=bottom]{-webkit-box-align:end;-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}.card-footer a.link,.card-header a.link{color:#2196f3;text-decoration:none;text-align:center;display:block;border-radius:2px;line-height:36px;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:0 0;padding:0 10px;margin:0;height:36px;white-space:nowrap;text-overflow:ellipsis;font-size:14px;text-transform:uppercase;font-family:inherit;cursor:pointer;min-width:64px;padding:0 8px;position:relative;overflow:hidden;outline:0;border:none;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-user-select:none;user-select:none}input[type=button].card-footer a.link,input[type=button].card-header a.link,input[type=submit].card-footer a.link,input[type=submit].card-header a.link{width:100%}.card-footer a.link.active-state,.card-header a.link.active-state,html:not(.watch-active-state) .card-footer a.link:active,html:not(.watch-active-state) .card-header a.link:active{background:rgba(0,0,0,.1)}.card-footer a.link.button-fill,.card-header a.link.button-fill{background-color:#2196f3;color:#fff}.card-footer a.link.button-fill.active-state,.card-header a.link.button-fill.active-state,html:not(.watch-active-state) .card-footer a.link.button-fill:active,html:not(.watch-active-state) .card-header a.link.button-fill:active{background:#0c82df}.card-footer a.link.button-big,.card-header a.link.button-big{height:48px;line-height:48px;border-radius:3px}.card-footer a.link i.icon+i.icon,.card-footer a.link i.icon+span,.card-footer a.link span:not(.ripple-wave)+i.icon,.card-footer a.link span:not(.ripple-wave)+span,.card-header a.link i.icon+i.icon,.card-header a.link i.icon+span,.card-header a.link span:not(.ripple-wave)+i.icon,.card-header a.link span:not(.ripple-wave)+span{margin-left:8px}.navbar .card-footer a.link:not(.button-fill),.navbar .card-header a.link:not(.button-fill),.notifications .card-footer a.link:not(.button-fill),.notifications .card-header a.link:not(.button-fill),.subnavbar .card-footer a.link:not(.button-fill),.subnavbar .card-header a.link:not(.button-fill),.toolbar .card-footer a.link:not(.button-fill),.toolbar .card-header a.link:not(.button-fill){color:#fff}.navbar .card-footer a.link:not(.button-fill).active-state,.navbar .card-header a.link:not(.button-fill).active-state,.notifications .card-footer a.link:not(.button-fill).active-state,.notifications .card-header a.link:not(.button-fill).active-state,.subnavbar .card-footer a.link:not(.button-fill).active-state,.subnavbar .card-header a.link:not(.button-fill).active-state,.toolbar .card-footer a.link:not(.button-fill).active-state,.toolbar .card-header a.link:not(.button-fill).active-state,html:not(.watch-active-state) .navbar .card-footer a.link:not(.button-fill):active,html:not(.watch-active-state) .navbar .card-header a.link:not(.button-fill):active,html:not(.watch-active-state) .notifications .card-footer a.link:not(.button-fill):active,html:not(.watch-active-state) .notifications .card-header a.link:not(.button-fill):active,html:not(.watch-active-state) .subnavbar .card-footer a.link:not(.button-fill):active,html:not(.watch-active-state) .subnavbar .card-header a.link:not(.button-fill):active,html:not(.watch-active-state) .toolbar .card-footer a.link:not(.button-fill):active,html:not(.watch-active-state) .toolbar .card-header a.link:not(.button-fill):active{background:rgba(255,255,255,.15)}.card-footer a.link i+i,.card-footer a.link i+span,.card-footer a.link span+i,.card-footer a.link span+span,.card-header a.link i+i,.card-header a.link i+span,.card-header a.link span+i,.card-header a.link span+span{margin-left:7px}.card-footer a.link i.icon,.card-header a.link i.icon{display:block}.card-footer a.icon-only,.card-header a.icon-only{min-width:48px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;margin:0}.card-header{border-radius:2px 2px 0 0;font-size:16px}.card-header:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#e1e1e1;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .card-header:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .card-header:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.card-header.no-border:after{display:none}.card-footer{border-radius:0 0 2px 2px;color:#757575}.card-footer:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:#e1e1e1;display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .card-footer:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .card-footer:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.card-footer.no-border:before{display:none}.modal-overlay,.picker-modal-overlay,.popup-overlay,.preloader-indicator-overlay{position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.4);z-index:13000;visibility:hidden;opacity:0;-webkit-transition-duration:.4s;transition-duration:.4s}.modal-overlay.not-animated,.picker-modal-overlay.not-animated,.popup-overlay.not-animated,.preloader-indicator-overlay.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.modal-overlay.modal-overlay-visible,.picker-modal-overlay.modal-overlay-visible,.popup-overlay.modal-overlay-visible,.preloader-indicator-overlay.modal-overlay-visible{visibility:visible;opacity:1}.popup-overlay{z-index:10500}.picker-modal-overlay{z-index:12000}.modal{width:280px;position:absolute;z-index:13500;left:50%;margin-left:-140px;margin-top:0;top:50%;border-radius:3px;opacity:0;-webkit-transform:translate3d(0,0,0) scale(1.185);transform:translate3d(0,0,0) scale(1.185);-webkit-transition-property:-webkit-transform,opacity;-moz-transition-property:-moz-transform,opacity;-ms-transition-property:-ms-transform,opacity;-o-transition-property:-o-transform,opacity;transition-property:transform,opacity;color:#757575;display:none;background:#fff;font-size:16px;box-shadow:0 19px 38px rgba(0,0,0,.3),0 15px 12px rgba(0,0,0,.22)}.modal.modal-in{opacity:1;-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transform:translate3d(0,0,0) scale(1);transform:translate3d(0,0,0) scale(1)}.modal.modal-out{opacity:0;z-index:13499;-webkit-transition-duration:.4s;transition-duration:.4s;-webkit-transform:translate3d(0,0,0) scale(.815);transform:translate3d(0,0,0) scale(.815)}.modal-inner{padding:24px 24px 20px;position:relative}.modal-title{font-weight:500;font-size:20px;color:#212121;line-height:1.3}.modal-title+.modal-text{margin-top:20px}.modal-text{line-height:1.5}.modal-buttons{height:48px;padding:6px 8px;overflow:hidden;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.modal-buttons.modal-buttons-vertical{display:block;height:auto;padding:0 0 8px 0}.modal-buttons.modal-buttons-vertical .modal-button{margin-left:0;text-align:right;height:48px;line-height:48px;border-radius:0;padding-left:16px;padding-right:16px}.modal-button,.modal-buttons .button{color:#2196f3;text-decoration:none;text-align:center;display:block;border-radius:2px;line-height:36px;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:0 0;padding:0 10px;margin:0;height:36px;white-space:nowrap;text-overflow:ellipsis;font-size:14px;text-transform:uppercase;font-family:inherit;cursor:pointer;min-width:64px;padding:0 8px;position:relative;overflow:hidden;outline:0;border:none;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-user-select:none;user-select:none}input[type=button].modal-button,input[type=button].modal-buttons .button,input[type=submit].modal-button,input[type=submit].modal-buttons .button{width:100%}.modal-button.active-state,.modal-buttons .button.active-state,html:not(.watch-active-state) .modal-button:active,html:not(.watch-active-state) .modal-buttons .button:active{background:rgba(0,0,0,.1)}.modal-button.button-fill,.modal-buttons .button.button-fill{background-color:#2196f3;color:#fff}.modal-button.button-fill.active-state,.modal-buttons .button.button-fill.active-state,html:not(.watch-active-state) .modal-button.button-fill:active,html:not(.watch-active-state) .modal-buttons .button.button-fill:active{background:#0c82df}.modal-button.button-big,.modal-buttons .button.button-big{height:48px;line-height:48px;border-radius:3px}.modal-button i.icon+i.icon,.modal-button i.icon+span,.modal-button span:not(.ripple-wave)+i.icon,.modal-button span:not(.ripple-wave)+span,.modal-buttons .button i.icon+i.icon,.modal-buttons .button i.icon+span,.modal-buttons .button span:not(.ripple-wave)+i.icon,.modal-buttons .button span:not(.ripple-wave)+span{margin-left:8px}.navbar .modal-button:not(.button-fill),.navbar .modal-buttons .button:not(.button-fill),.notifications .modal-button:not(.button-fill),.notifications .modal-buttons .button:not(.button-fill),.subnavbar .modal-button:not(.button-fill),.subnavbar .modal-buttons .button:not(.button-fill),.toolbar .modal-button:not(.button-fill),.toolbar .modal-buttons .button:not(.button-fill){color:#fff}.navbar .modal-button:not(.button-fill).active-state,.navbar .modal-buttons .button:not(.button-fill).active-state,.notifications .modal-button:not(.button-fill).active-state,.notifications .modal-buttons .button:not(.button-fill).active-state,.subnavbar .modal-button:not(.button-fill).active-state,.subnavbar .modal-buttons .button:not(.button-fill).active-state,.toolbar .modal-button:not(.button-fill).active-state,.toolbar .modal-buttons .button:not(.button-fill).active-state,html:not(.watch-active-state) .navbar .modal-button:not(.button-fill):active,html:not(.watch-active-state) .navbar .modal-buttons .button:not(.button-fill):active,html:not(.watch-active-state) .notifications .modal-button:not(.button-fill):active,html:not(.watch-active-state) .notifications .modal-buttons .button:not(.button-fill):active,html:not(.watch-active-state) .subnavbar .modal-button:not(.button-fill):active,html:not(.watch-active-state) .subnavbar .modal-buttons .button:not(.button-fill):active,html:not(.watch-active-state) .toolbar .modal-button:not(.button-fill):active,html:not(.watch-active-state) .toolbar .modal-buttons .button:not(.button-fill):active{background:rgba(255,255,255,.15)}.modal-button.modal-button-bold,.modal-buttons .button.modal-button-bold{font-weight:700}.modal-button+.modal-button,.modal-buttons .button+.modal-button{margin-left:4px}.modal-no-buttons .modal-buttons{display:none}.actions-modal{position:absolute;left:0;bottom:0;z-index:13500;width:100%;background:#fff;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);max-height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.actions-modal.modal-in,.actions-modal.modal-out{-webkit-transition-duration:.3s;transition-duration:.3s}.actions-modal.modal-in.not-animated,.actions-modal.modal-out.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.actions-modal.modal-in{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.actions-modal.modal-out{z-index:13499;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.actions-modal-group{position:relative}.actions-modal-group:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#d2d2d6;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .actions-modal-group:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .actions-modal-group:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.actions-modal-group:last-child:after{display:none}.actions-modal-button,.actions-modal-label{width:100%;font-weight:400;margin:0;box-sizing:border-box;display:block;position:relative;padding:0 16px}.actions-modal-button a,.actions-modal-label a{text-decoration:none;color:inherit;display:block}.actions-modal-button b,.actions-modal-label b{font-weight:500}.actions-modal-button.actions-modal-button-bold,.actions-modal-label.actions-modal-button-bold{font-weight:500}.actions-modal-button.actions-modal-button-red,.actions-modal-label.actions-modal-button-red{color:#f44336}.actions-modal-button.disabled,.actions-modal-label.disabled{opacity:.95;color:#9e9e9e}.actions-modal-button{cursor:pointer;line-height:48px;font-size:16px;color:rgba(0,0,0,.87);-webkit-transition-duration:.3s;transition-duration:.3s}.actions-modal-button,.actions-modal-button a{position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.actions-modal-button.active-state,html:not(.watch-active-state) .actions-modal-button:active{background:rgba(0,0,0,.1)}.actions-modal-label{font-size:16px;color:rgba(0,0,0,.54);min-height:56px;line-height:1.3;padding-top:12px;padding-bottom:12px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}input.modal-text-input{box-sizing:border-box;height:36px;background:#fff;margin:0;margin-top:15px;padding:0;border:none;width:100%;font-size:16px;font-family:inherit;display:block;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;-webkit-transition-duration:.2s;transition-duration:.2s}input.modal-text-input::-webkit-input-placeholder{color:rgba(0,0,0,.35)}input.modal-text-input+input.modal-text-input{margin-top:16px}.popover{width:320px;background:#fff;z-index:13500;margin:0;top:0;opacity:0;left:0;border-radius:3px;position:absolute;display:none;box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);-webkit-transform:scale(.85,.6);transform:scale(.85,.6);-webkit-transition-property:opacity,-webkit-transform,border-radius;-moz-transition-property:opacity,-moz-transform,border-radius;transition-property:opacity,transform,border-radius}.popover.popover-on-top{-webkit-transform-origin:center bottom;transform-origin:center bottom}.popover.popover-on-bottom{-webkit-transform-origin:center top;transform-origin:center top}.popover.modal-in,.popover.modal-out{-webkit-transition-duration:.3s;transition-duration:.3s}.popover.modal-in.not-animated,.popover.modal-out.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.popover.modal-in{-webkit-transform:scale(1);transform:scale(1);opacity:1}.popover.modal-out{-webkit-transform:scale(1);transform:scale(1);opacity:0}.popover .list-block{margin:0}.popover .list-block:first-child:last-child ul:before{display:none}.popover .list-block:first-child:last-child ul:after{display:none}.popover .list-block ul{background:0 0}.popover .list-block ul:before{display:none}.popover .list-block:first-child ul{border-radius:3px 3px 0 0}.popover .list-block:first-child li:first-child a{border-radius:3px 3px 0 0}.popover .list-block:last-child ul{border-radius:0 0 3px 3px}.popover .list-block:last-child ul:after{display:none}.popover .list-block:last-child li:last-child a{border-radius:0 0 3px 3px}.popover .list-block:first-child:last-child li:first-child:last-child a,.popover .list-block:first-child:last-child ul:first-child:last-child{border-radius:3px}.popover.popover-floating-button{-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:scale(.7);transform:scale(.7);border-radius:50%;box-shadow:none;box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}.popover.popover-floating-button.modal-in{border-radius:0;-webkit-transform:scale(1);transform:scale(1);-webkit-transition-delay:.2s;transition-delay:.2s;-webkit-transition-duration:.2s;transition-duration:.2s}.popover.popover-floating-button.modal-out{border-radius:50%;-webkit-transform:scale(.7);transform:scale(.7);-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-duration:.1s;transition-duration:.1s}.popover.popover-floating-button .list-block{margin:0}.popover.popover-floating-button .list-block:first-child ul{border-radius:0}.popover.popover-floating-button .list-block:first-child li:first-child a{border-radius:0}.popover.popover-floating-button .list-block:last-child ul{border-radius:0}.popover.popover-floating-button .list-block:last-child li:last-child a{border-radius:0}.popover.popover-floating-button .list-block:first-child:last-child li:first-child:last-child a,.popover.popover-floating-button .list-block:first-child:last-child ul:first-child:last-child{border-radius:0}.popover-inner{overflow:auto;-webkit-overflow-scrolling:touch}.actions-popover .list-block{margin:0}.actions-popover-label{padding:8px 16px;color:rgba(0,0,0,.54);font-size:16px;line-height:1.3;padding-top:12px;padding-bottom:12px;position:relative}.actions-popover-label:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:#d2d2d6;display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .actions-popover-label:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .actions-popover-label:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.actions-popover-label:last-child:after{display:none}.login-screen,.popup{position:absolute;left:0;top:0;width:100%;height:100%;z-index:11000;background:#fff;box-sizing:border-box;display:none;overflow:auto;-webkit-overflow-scrolling:touch;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-ms-transition-property:-ms-transform;-o-transition-property:-o-transform;transition-property:transform;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.login-screen.modal-in,.login-screen.modal-out,.popup.modal-in,.popup.modal-out{-webkit-transition-duration:.4s;transition-duration:.4s}.login-screen.modal-in.not-animated,.login-screen.modal-out.not-animated,.popup.modal-in.not-animated,.popup.modal-out.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.login-screen.modal-in,.popup.modal-in{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.login-screen.modal-out,.popup.modal-out{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.login-screen.modal-in,.login-screen.modal-out{display:block}@media all and (min-width:630px) and (min-height:630px){.popup:not(.tablet-fullscreen){width:630px;height:630px;left:50%;top:50%;margin-left:-315px;margin-top:-315px;box-shadow:0 20px 44px rgba(0,0,0,.5);border-radius:3px;-webkit-transform:translate3d(0,1024px,0);transform:translate3d(0,1024px,0)}.popup:not(.tablet-fullscreen).modal-in{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.popup:not(.tablet-fullscreen).modal-out{-webkit-transform:translate3d(0,1024px,0);transform:translate3d(0,1024px,0)}}@media all and (max-width:629px),(max-height:629px){html.with-statusbar-overlay .popup{height:-webkit-calc(100% - 24px);height:calc(100% - 24px);top:24px}html.with-statusbar-overlay .popup-overlay{z-index:9500}html.with-statusbar-overlay.ios .popup{height:-webkit-calc(100% - 20px);height:calc(100% - 20px);top:20px}}html.with-statusbar-overlay .login-screen,html.with-statusbar-overlay .popup.tablet-fullscreen{height:-webkit-calc(100% - 24px);height:calc(100% - 24px);top:24px}html.with-statusbar-overlay.ios .login-screen,html.with-statusbar-overlay.ios .popup.tablet-fullscreen{height:-webkit-calc(100% - 20px);height:calc(100% - 20px);top:20px}.modal-preloader .modal-inner,.modal-preloader .modal-title{text-align:center}.preloader-indicator-overlay{visibility:visible;opacity:0;background:0 0}.preloader-indicator-modal{position:absolute;left:50%;top:50%;padding:8px;margin-left:-24px;margin-top:-24px;background:rgba(0,0,0,.8);z-index:13500;border-radius:4px}.preloader-indicator-modal .preloader{display:block}.picker-modal{position:absolute;left:0;bottom:0;width:100%;height:260px;z-index:12000;display:none;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-ms-transition-property:-ms-transform;-o-transition-property:-o-transform;transition-property:transform;background:#fff;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.picker-modal.modal-in,.picker-modal.modal-out{-webkit-transition-duration:.4s;transition-duration:.4s}.picker-modal.modal-in.not-animated,.picker-modal.modal-out.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.picker-modal.modal-in{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.picker-modal.modal-out{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}.picker-modal .picker-modal-inner{height:100%;position:relative}.picker-modal .toolbar{position:relative;width:100%;top:0}.picker-modal .toolbar+.picker-modal-inner{height:-webkit-calc(100% - 48px);height:-moz-calc(100% - 48px);height:calc(100% - 48px)}.picker-modal .toolbar a.link{-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}.picker-modal .picker-footer,.picker-modal .picker-header{height:48px}.picker-modal .picker-header{background:#2196f3}.picker-modal .picker-header+.toolbar .toolbar-inner{overflow:visible}.picker-modal .picker-header+.picker-footer+.toolbar+.picker-modal-inner{height:-webkit-calc(100% - 48px * 3);height:-moz-calc(100% - 48px * 3);height:calc(100% - 48px * 3)}.picker-modal .picker-footer{position:absolute;left:0;bottom:0;width:100%;height:48px;padding:6px 8px;overflow:hidden;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.picker-modal .picker-footer.modal-buttons-vertical{display:block;height:auto;padding:0 0 8px 0}.picker-modal .picker-footer.modal-buttons-vertical .modal-button{margin-left:0;text-align:right;height:48px;line-height:48px;border-radius:0;padding-left:16px;padding-right:16px}.picker-modal .picker-footer+.picker-modal-inner,.picker-modal .picker-header+.picker-modal-inner{height:-webkit-calc(100% - 48px);height:-moz-calc(100% - 48px);height:calc(100% - 48px)}.picker-modal .picker-footer+.toolbar+.picker-modal-inner,.picker-modal .picker-header+.toolbar+.picker-modal-inner{height:-webkit-calc(100% - 48px * 2);height:-moz-calc(100% - 48px * 2);height:calc(100% - 48px * 2)}.picker-modal.picker-modal-inline,.popover .picker-modal{display:block;position:relative;background:0 0;z-index:inherit;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.picker-modal.picker-modal-inline .toolbar,.popover .picker-modal .toolbar{top:0}.popover .picker-modal{width:auto}.popover .picker-modal .picker-header:first-child,.popover .picker-modal .toolbar:first-child{border-radius:2px 2px 0 0}.picker-modal.smart-select-picker .list-block{margin:0}.picker-modal.smart-select-picker .list-block ul:before{display:none}.picker-modal.smart-select-picker .list-block ul:after{display:none}.panel-overlay{position:absolute;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.2);opacity:0;z-index:5999;display:none;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:.3s;transition-duration:.3s}.panel-overlay.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.panel{z-index:1000;display:none;background:#fff;box-sizing:border-box;overflow:auto;-webkit-overflow-scrolling:touch;position:absolute;width:260px;top:0;height:100%;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition-duration:.3s;transition-duration:.3s}.panel.not-animated{-webkit-transition-duration:0s;transition-duration:0s}.panel.panel-visible{display:block}.panel.panel-left{left:0}.panel.panel-left.panel-cover{z-index:6000;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.panel.panel-right{right:0}.panel.panel-right.panel-cover{z-index:6000;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.panel.panel-visible-by-breakpoint{display:block;-webkit-transform:translate3d(0,0,0)!important;transform:translate3d(0,0,0)!important;box-shadow:none!important}.panel.panel-visible-by-breakpoint.panel-cover{z-index:5900}body.with-panel-left-cover .panel,body.with-panel-right-cover .panel{box-shadow:0 0 20px rgba(0,0,0,.5)}body.with-panel-left-cover .views,body.with-panel-right-cover .views{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}body.with-panel-left-cover .panel-overlay,body.with-panel-right-cover .panel-overlay{display:block;opacity:1}body.with-panel-left-reveal .views,body.with-panel-right-reveal .views{box-shadow:0 0 20px rgba(0,0,0,.5);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:-webkit-transform,box-shadow;-moz-transition-property:-moz-transform,box-shadow;transition-property:transform,box-shadow}body.with-panel-left-reveal .panel.not-animated~.views,body.with-panel-right-reveal .panel.not-animated~.views{-webkit-transition-duration:0s;transition-duration:0s}body.with-panel-left-reveal .panel-overlay,body.with-panel-right-reveal .panel-overlay{background:rgba(0,0,0,0);display:block;opacity:0}body.with-panel-left-reveal .views{-webkit-transform:translate3d(260px,0,0);transform:translate3d(260px,0,0)}body.with-panel-left-reveal .panel-overlay{-webkit-transform:translate3d(260px,0,0);transform:translate3d(260px,0,0)}body.with-panel-left-cover .panel.panel-left{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}body.with-panel-right-reveal .views{-webkit-transform:translate3d(-260px,0,0);transform:translate3d(-260px,0,0)}body.with-panel-right-reveal .panel-overlay{-webkit-transform:translate3d(-260px,0,0);transform:translate3d(-260px,0,0)}body.with-panel-right-cover .panel.panel-right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}body.panel-closing .panel-overlay{display:block}body.panel-closing .views{-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:-webkit-transform,box-shadow;-moz-transition-property:-moz-transform,box-shadow;transition-property:transform,box-shadow}body.panel-closing .panel.not-animated~.views{-webkit-transition-duration:0s;transition-duration:0s}.lazy-loaded.lazy-fadeIn{-webkit-animation:lazyFadeIn .6s;animation:lazyFadeIn .6s}@-webkit-keyframes lazyFadeIn{from{opacity:0}to{opacity:1}}@keyframes lazyFadeIn{from{opacity:0}to{opacity:1}}.tabs .tab{display:none}.tabs .tab.active{display:block}.tabs-animated-wrap{position:relative;width:100%;overflow:hidden;height:100%}.tabs-animated-wrap>.tabs{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;height:100%;-webkit-transition-duration:.3s;transition-duration:.3s}.tabs-animated-wrap>.tabs>.tab{width:100%;display:block;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}.tabs-animated-wrap.not-animated>.tabs{-webkit-transition-duration:0s;transition-duration:0s}.tabs-swipeable-wrap{height:100%}.tabs-swipeable-wrap>.tabs>.tab{display:block}.messages-content{background:#eee}.messages{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.messages-date{text-align:center;font-weight:500;font-size:12px;line-height:1;margin:10px 15px}.messages-date span{font-weight:400}.message{box-sizing:border-box;margin:0 8px 8px 8px;max-width:80%;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.message:first-child{margin-top:8px}.message.message-pic img{display:block}.message-date,.message-label,.message-name,.messages-date{color:rgba(0,0,0,.51)}.message-name{font-size:12px;line-height:1;margin-bottom:2px;margin-top:7px}.message-hide-name .message-name{display:none}.message-label{font-size:12px;line-height:1;margin-top:4px}.message-hide-label .message-label{display:none}.message-avatar{width:48px;height:48px;border-radius:100%;margin-top:-48px;position:relative;top:1px;background-size:cover;opacity:1;-webkit-transition-duration:.4s;transition-duration:.4s}.message-hide-avatar .message-avatar{opacity:0}.message-text{box-sizing:border-box;border-radius:2px;padding:6px 8px;min-width:48px;font-size:16px;line-height:1.2;word-break:break-word;color:#333;min-height:48px;position:relative;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.message-text img{max-width:100%;height:auto}.message-pic .message-text{padding:8px}.message-date{font-size:12px;margin-top:4px}.message-pic img+.message-date{margin-top:8px}.message-sent{-ms-flex-item-align:end;-webkit-align-self:flex-end;align-self:flex-end;-webkit-box-align:end;-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}.message-sent .message-label,.message-sent .message-name{margin-right:8px}.message-sent .message-text{background-color:#c8e6c9;margin-left:auto;border-radius:2px 2px 0 2px;margin-right:8px}.message-sent .message-text:before{position:absolute;content:'';border-left:0 solid transparent;border-right:8px solid transparent;border-bottom:8px solid #c8e6c9;left:100%;bottom:0;width:0;height:0}.message-sent.message-with-avatar .message-label,.message-sent.message-with-avatar .message-name,.message-sent.message-with-avatar .message-text{margin-right:56px}.message-received{-ms-flex-item-align:start;-webkit-align-self:flex-start;align-self:flex-start;-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.message-received .message-text{background-color:#fff;border-radius:2px 2px 2px 0;margin-left:8px}.message-received .message-text:before{position:absolute;content:'';border-left:8px solid transparent;border-right:0 solid transparent;border-bottom:8px solid #fff;right:100%;bottom:0;width:0;height:0}.message-received .message-label,.message-received .message-name{margin-left:8px}.message-received.message-with-avatar .message-label,.message-received.message-with-avatar .message-name,.message-received.message-with-avatar .message-text{margin-left:56px}.message-appear-from-bottom{-webkit-animation:messageAppearFromBottom .4s;animation:messageAppearFromBottom .4s}.message-appear-from-top{-webkit-animation:messageAppearFromTop .4s;animation:messageAppearFromTop .4s}@-webkit-keyframes messageAppearFromBottom{from{-webkit-transform:translate3d(0,100%,0)}to{-webkit-transform:translate3d(0,0,0)}}@keyframes messageAppearFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@-webkit-keyframes messageAppearFromTop{from{-webkit-transform:translate3d(0,-100%,0)}to{-webkit-transform:translate3d(0,0,0)}}@keyframes messageAppearFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}html.with-statusbar-overlay .framework7-root{padding-top:24px;box-sizing:border-box}html.with-statusbar-overlay .framework7-root .statusbar-overlay{display:block}html.with-statusbar-overlay .framework7-root .panel{padding-top:24px}.statusbar-overlay{background:#0d47a1;z-index:10000;position:absolute;left:0;top:0;height:24px;width:100%;display:none;-webkit-transition-duration:.3s;transition-duration:.3s}html.with-statusbar-overlay.ios .framework7-root{padding-top:20px}html.with-statusbar-overlay.ios .framework7-root .panel{padding-top:20px}html.ios .statusbar-overlay{height:20px}.preloader{font-size:0;display:inline-block;width:32px;height:32px;-webkit-animation:preloader-outer 3.3s linear infinite;animation:preloader-outer 3.3s linear infinite}.preloader svg{width:100%;height:100%;-webkit-animation:preloader-inner 1.32s linear infinite;animation:preloader-inner 1.32s linear infinite}.preloader svg circle{fill:none;stroke:#757575;stroke-linecap:square;-webkit-animation:preloader-arc 1.32s cubic-bezier(.8,0,.4,.8) infinite;animation:preloader-arc 1.32s cubic-bezier(.8,0,.4,.8) infinite}@-webkit-keyframes preloader-outer{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@keyframes preloader-outer{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes preloader-inner{0%{-webkit-transform:rotate(-100.8deg)}100%{-webkit-transform:rotate(0)}}@keyframes preloader-inner{0%{transform:rotate(-100.8deg)}100%{transform:rotate(0)}}@-webkit-keyframes preloader-arc{0%{stroke-dasharray:1 210.48670779px;stroke-dashoffset:0}40%{stroke-dasharray:151.55042961px,210.48670779px;stroke-dashoffset:0}100%{stroke-dasharray:1 210.48670779px;stroke-dashoffset:-151.55042961px}}@keyframes preloader-arc{0%{stroke-dasharray:1 210.48670779px;stroke-dashoffset:0}40%{stroke-dasharray:151.55042961px,210.48670779px;stroke-dashoffset:0}100%{stroke-dasharray:1 210.48670779px;stroke-dashoffset:-151.55042961px}}.preloader-inner{position:relative;display:block;width:100%;height:100%;-webkit-animation:preloader-inner-rotate 5.25s cubic-bezier(.35,0,.25,1) infinite;animation:preloader-inner-rotate 5.25s cubic-bezier(.35,0,.25,1) infinite}.preloader-inner .preloader-inner-gap{position:absolute;width:2px;left:50%;margin-left:-1px;top:0;bottom:0;box-sizing:border-box;border-top:4px solid #757575}.preloader-inner .preloader-inner-left,.preloader-inner .preloader-inner-right{position:absolute;top:0;height:100%;width:50%;overflow:hidden}.preloader-inner .preloader-inner-half-circle{position:absolute;top:0;height:100%;width:200%;box-sizing:border-box;border:4px solid #757575;border-bottom-color:transparent!important;border-radius:50%;-webkit-animation-iteration-count:infinite;-webkit-animation-duration:1.3125s;-webkit-animation-timing-function:cubic-bezier(.35,0,.25,1);animation-iteration-count:infinite;animation-duration:1.3125s;animation-timing-function:cubic-bezier(.35,0,.25,1)}.preloader-white .preloader-inner .preloader-inner-gap,.preloader-white .preloader-inner .preloader-inner-half-circle{border-color:#fff}.preloader-inner .preloader-inner-left{left:0}.preloader-inner .preloader-inner-left .preloader-inner-half-circle{left:0;border-right-color:transparent!important;-webkit-animation-name:preloader-left-rotate;animation-name:preloader-left-rotate}.preloader-inner .preloader-inner-right{right:0}.preloader-inner .preloader-inner-right .preloader-inner-half-circle{right:0;border-left-color:transparent!important;-webkit-animation-name:preloader-right-rotate;animation-name:preloader-right-rotate}.color-multi .preloader-inner .preloader-inner-left .preloader-inner-half-circle{-webkit-animation-name:preloader-left-rotate-multicolor;animation-name:preloader-left-rotate-multicolor}.color-multi .preloader-inner .preloader-inner-right .preloader-inner-half-circle{-webkit-animation-name:preloader-right-rotate-multicolor;animation-name:preloader-right-rotate-multicolor}@-webkit-keyframes preloader-left-rotate{0%,100%{-webkit-transform:rotate(130deg)}50%{-webkit-transform:rotate(-5deg)}}@keyframes preloader-left-rotate{0%,100%{transform:rotate(130deg)}50%{transform:rotate(-5deg)}}@-webkit-keyframes preloader-right-rotate{0%,100%{-webkit-transform:rotate(-130deg)}50%{-webkit-transform:rotate(5deg)}}@keyframes preloader-right-rotate{0%,100%{transform:rotate(-130deg)}50%{transform:rotate(5deg)}}@-webkit-keyframes preloader-inner-rotate{12.5%{-webkit-transform:rotate(135deg)}25%{-webkit-transform:rotate(270deg)}37.5%{-webkit-transform:rotate(405deg)}50%{-webkit-transform:rotate(540deg)}62.5%{-webkit-transform:rotate(675deg)}75%{-webkit-transform:rotate(810deg)}87.5%{-webkit-transform:rotate(945deg)}100%{-webkit-transform:rotate(1080deg)}}@keyframes preloader-inner-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@-webkit-keyframes preloader-left-rotate-multicolor{0%,100%{border-left-color:#4285f4;-webkit-transform:rotate(130deg)}75%{border-left-color:#1b9a59;border-top-color:#1b9a59}50%{border-left-color:#f7c223;border-top-color:#f7c223;-webkit-transform:rotate(-5deg)}25%{border-left-color:#de3e35;border-top-color:#de3e35}}@keyframes preloader-left-rotate-multicolor{0%,100%{border-left-color:#4285f4;transform:rotate(130deg)}75%{border-left-color:#1b9a59;border-top-color:#1b9a59}50%{border-left-color:#f7c223;border-top-color:#f7c223;transform:rotate(-5deg)}25%{border-left-color:#de3e35;border-top-color:#de3e35}}@-webkit-keyframes preloader-right-rotate-multicolor{0%,100%{border-right-color:#4285f4;-webkit-transform:rotate(-130deg)}75%{border-right-color:#1b9a59;border-top-color:#1b9a59}50%{border-right-color:#f7c223;border-top-color:#f7c223;-webkit-transform:rotate(5deg)}25%{border-top-color:#de3e35;border-right-color:#de3e35}}@keyframes preloader-right-rotate-multicolor{0%,100%{border-right-color:#4285f4;transform:rotate(-130deg)}75%{border-right-color:#1b9a59;border-top-color:#1b9a59}50%{border-right-color:#f7c223;border-top-color:#f7c223;transform:rotate(5deg)}25%{border-top-color:#de3e35;border-right-color:#de3e35}}.progressbar,.progressbar-infinite{height:4px;width:100%;overflow:hidden;display:block;position:relative;-webkit-transform-origin:center bottom;transform-origin:center bottom;background:rgba(33,150,243,.5)}.progressbar{display:block;vertical-align:middle;-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.progressbar span{content:'';width:100%;background:#2196f3;height:100%;position:absolute;left:0;top:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);-webkit-transition-duration:150ms;transition-duration:150ms}.progressbar-infinite{z-index:15000}.progressbar-infinite:after,.progressbar-infinite:before{content:'';position:absolute;left:0;top:0;width:100%;height:100%;background:#2196f3;-webkit-transform-origin:left center;transform-origin:left center}.progressbar-infinite:before{-webkit-animation:progressbar-infinite-1 2s linear infinite;animation:progressbar-infinite-1 2s linear infinite}.progressbar-infinite:after{-webkit-animation:progressbar-infinite-2 2s linear infinite;animation:progressbar-infinite-2 2s linear infinite}html.with-statusbar-overlay .framework7-root>.progressbar-infinite,html.with-statusbar-overlay body>.progressbar-infinite{top:24px}html.with-statusbar-overlay.ios .framework7-root>.progressbar-infinite,html.with-statusbar-overlay.ios body>.progressbar-infinite{top:20px}.progressbar-infinite.color-multi{background:0 0!important}.progressbar-infinite.color-multi:after,.progressbar-infinite.color-multi:before{width:100%;animation:none}.progressbar-infinite.color-multi:before{background:0 0;-webkit-animation:progressbar-infinite-multicolor-bg 3s step-end infinite;animation:progressbar-infinite-multicolor-bg 3s step-end infinite}.progressbar-infinite.color-multi:after{background:0 0;-webkit-animation:progressbar-infinite-multicolor-fill 3s linear infinite;animation:progressbar-infinite-multicolor-fill 3s linear infinite;-webkit-transform-origin:center center;transform-origin:center center}.framework7-root>.progressbar,.framework7-root>.progressbar-infinite,.page>.progressbar,.page>.progressbar-infinite,.panel>.progressbar,.panel>.progressbar-infinite,.popup>.progressbar,.popup>.progressbar-infinite,.view>.progressbar,.view>.progressbar-infinite,.views>.progressbar,.views>.progressbar-infinite,body>.progressbar,body>.progressbar-infinite{position:absolute;left:0;top:0;z-index:15000;-webkit-transform-origin:center top;transform-origin:center top}.progressbar-in{-webkit-animation:progressbar-in .3s forwards;animation:progressbar-in .3s forwards}.progressbar-out{-webkit-animation:progressbar-out .3s forwards;animation:progressbar-out .3s forwards}html.with-statusbar-overlay .framework7-root>.progressbar,html.with-statusbar-overlay body>.progressbar{top:24px}html.with-statusbar-overlay.ios .framework7-root>.progressbar,html.with-statusbar-overlay.ios body>.progressbar{top:20px}@-webkit-keyframes progressbar-in{from{opacity:0;-webkit-transform:scaleY(0)}to{opacity:1;-webkit-transform:scaleY(1)}}@keyframes progressbar-in{from{opacity:0;transform:scaleY(0)}to{opacity:1;transform:scaleY(1)}}@-webkit-keyframes progressbar-out{from{opacity:1;-webkit-transform:scaleY(1)}to{opacity:0;-webkit-transform:scaleY(0)}}@keyframes progressbar-out{from{opacity:1;transform:scaleY(1)}to{opacity:0;transform:scaleY(0)}}@-webkit-keyframes progressbar-infinite-1{0%{-webkit-transform:translateX(-10%) scaleX(.1)}25%{-webkit-transform:translateX(30%) scaleX(.6)}50%{-webkit-transform:translateX(100%) scaleX(1)}100%{-webkit-transform:translateX(100%) scaleX(1)}}@keyframes progressbar-infinite-1{0%{transform:translateX(-10%) scaleX(.1)}25%{transform:translateX(30%) scaleX(.6)}50%{transform:translateX(100%) scaleX(1)}100%{transform:translateX(100%) scaleX(1)}}@-webkit-keyframes progressbar-infinite-2{0%{-webkit-transform:translateX(-100%) scaleX(1)}40%{-webkit-transform:translateX(-100%) scaleX(1)}75%{-webkit-transform:translateX(60%) scaleX(.35)}90%{-webkit-transform:translateX(100%) scaleX(.1)}100%{-webkit-transform:translateX(100%) scaleX(.1)}}@keyframes progressbar-infinite-2{0%{transform:translateX(-100%) scaleX(1)}40%{transform:translateX(-100%) scaleX(1)}75%{transform:translateX(60%) scaleX(.35)}90%{transform:translateX(100%) scaleX(.1)}100%{transform:translateX(100%) scaleX(.1)}}@-webkit-keyframes progressbar-infinite-multicolor-bg{0%{background-color:#4caf50}25%{background-color:#f44336}50%{background-color:#2196f3}75%{background-color:#ffeb3b}}@keyframes progressbar-infinite-multicolor-bg{0%{background-color:#4caf50}25%{background-color:#f44336}50%{background-color:#2196f3}75%{background-color:#ffeb3b}}@-webkit-keyframes progressbar-infinite-multicolor-fill{0%{-webkit-transform:scaleX(0);background-color:#f44336}24.9%{-webkit-transform:scaleX(1);background-color:#f44336}25%{-webkit-transform:scaleX(0);background-color:#2196f3}49.9%{-webkit-transform:scaleX(1);background-color:#2196f3}50%{-webkit-transform:scaleX(0);background-color:#ffeb3b}74.9%{-webkit-transform:scaleX(1);background-color:#ffeb3b}75%{-webkit-transform:scaleX(0);background-color:#4caf50}100%{-webkit-transform:scaleX(1);background-color:#4caf50}}@keyframes progressbar-infinite-multicolor-fill{0%{transform:scaleX(0);background-color:#f44336}24.9%{transform:scaleX(1);background-color:#f44336}25%{transform:scaleX(0);background-color:#2196f3}49.9%{transform:scaleX(1);background-color:#2196f3}50%{transform:scaleX(0);background-color:#ffeb3b}74.9%{transform:scaleX(1);background-color:#ffeb3b}75%{transform:scaleX(0);background-color:#4caf50}100%{transform:scaleX(1);background-color:#4caf50}}.pull-to-refresh-layer{position:relative;margin-top:-48px;left:0;top:0;width:100%;height:48px}.pull-to-refresh-layer .preloader{position:absolute;left:50%;top:50%;margin-left:-16px;margin-top:-16px;visibility:hidden}.pull-to-refresh-layer .pull-to-refresh-arrow{width:24px;height:24px;position:absolute;left:50%;top:50%;margin-left:-12px;margin-top:-12px;background:no-repeat center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'-80%204%2024%2024'%3E%3Cpath%20d%3D'M-69%2C8v12.2l-5.6-5.6L-76%2C16l8%2C8l8-8l-1.4-1.4l-5.6%2C5.6V8H-69z'%20fill%3D'%238c8c8c'%2F%3E%3C%2Fsvg%3E");z-index:10;-webkit-transform:rotate(0) translate3d(0,0,0);transform:rotate(0) translate3d(0,0,0);-webkit-transition-duration:.3s;transition-duration:.3s}.pull-to-refresh-content.pull-to-refresh-no-navbar{margin-top:-48px;height:-webkit-calc(100% + 48px);height:-moz-calc(100% + 48px);height:calc(100% + 48px)}.pull-to-refresh-content.pull-to-refresh-no-navbar .pull-to-refresh-layer{margin-top:0}.pull-to-refresh-content.refreshing,.pull-to-refresh-content.transitioning{-webkit-transition-duration:.4s;transition-duration:.4s}.pull-to-refresh-content:not(.refreshing) .pull-to-refresh-layer .preloader{-webkit-animation:none;animation:none}.pull-to-refresh-content.refreshing{-webkit-transform:translate3d(0,48px,0);transform:translate3d(0,48px,0)}.pull-to-refresh-content.refreshing .pull-to-refresh-arrow{visibility:hidden;-webkit-transition-duration:0s;transition-duration:0s}.pull-to-refresh-content.refreshing .preloader{visibility:visible}.pull-to-refresh-content.pull-up .pull-to-refresh-arrow{-webkit-transform:rotate(180deg) translate3d(0,0,0);transform:rotate(180deg) translate3d(0,0,0)}.infinite-scroll-preloader{text-align:center;padding:8px 0}.autocomplete-page .autocomplete-found{display:block}.autocomplete-page .autocomplete-not-found{display:none}.autocomplete-page .autocomplete-values{display:block}.autocomplete-page .list-block ul:empty{display:none}.autocomplete-page .navbar .autocomplete-preloader{margin-right:16px}.autocomplete-preloader:not(.autocomplete-preloader-visible){-webkit-animation:none;animation:none;visibility:hidden}.autocomplete-dropdown{background:#fff;box-sizing:border-box;position:absolute;z-index:500;box-shadow:0 2px 2px rgba(0,0,0,.25);width:100%;left:0}.autocomplete-dropdown .autocomplete-dropdown-inner{position:relative;overflow:auto;-webkit-overflow-scrolling:touch;height:100%;z-index:1}.autocomplete-dropdown .autocomplete-preloader{display:none;position:absolute;right:16px;bottom:100%;margin-bottom:8px;width:20px;height:20px}.autocomplete-dropdown .autocomplete-preloader .preloader-inner-gap,.autocomplete-dropdown .autocomplete-preloader .preloader-inner-half-circle{border-width:3px}.autocomplete-dropdown .autocomplete-preloader-visible{display:block}.autocomplete-dropdown .autocomplete-dropdown-placeholder{color:#a9a9a9}.autocomplete-dropdown .list-block{margin:0;color:rgba(0,0,0,.54)}.autocomplete-dropdown .list-block ul{background:0 0!important}.autocomplete-dropdown .list-block ul:before{display:none}.autocomplete-dropdown .list-block ul:after{display:none}.autocomplete-dropdown .list-block b{font-weight:400;color:#212121}.timeline{margin:32px 0;padding:0 16px;box-sizing:border-box}.content-block-inner .timeline{padding:0;margin:0}.timeline-item{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;overflow:hidden;padding:2px 0 16px;box-sizing:border-box;position:relative}.timeline-item:last-child{padding-bottom:2px}.timeline-item-date{-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;width:50px;text-align:right;box-sizing:border-box}.timeline-item-date small{font-size:10px}.timeline-item-content{margin:2px;min-width:0;position:relative;-webkit-box-flex:10;-webkit-flex-shrink:10;-ms-flex:0 10 auto;flex-shrink:10}.timeline-item-content h1:first-child,.timeline-item-content h2:first-child,.timeline-item-content h3:first-child,.timeline-item-content h4:first-child,.timeline-item-content ol:first-child,.timeline-item-content p:first-child,.timeline-item-content ul:first-child{margin-top:0}.timeline-item-content h1:last-child,.timeline-item-content h2:last-child,.timeline-item-content h3:last-child,.timeline-item-content h4:last-child,.timeline-item-content ol:last-child,.timeline-item-content p:last-child,.timeline-item-content ul:last-child{margin-bottom:0}.timeline-item-content .card,.timeline-item-content .content-block,.timeline-item-content .list-block,.timeline-item-content.card,.timeline-item-content.content-block,.timeline-item-content.list-block{margin:0;width:100%}.timeline-item-content .card+.card,.timeline-item-content .card+.content-block,.timeline-item-content .card+.list-block,.timeline-item-content .content-block+.card,.timeline-item-content .content-block+.content-block,.timeline-item-content .content-block+.list-block,.timeline-item-content .list-block+.card,.timeline-item-content .list-block+.content-block,.timeline-item-content .list-block+.list-block{margin:16px 0 0}.timeline-item-inner{border-radius:2px;padding:8px 16px;background:#fff;box-sizing:border-box;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.timeline-item-inner .content-block{padding:0;color:inherit}.timeline-item-inner .content-block-inner{padding-left:0;padding-right:0;margin:0}.timeline-item-inner .content-block-inner:before{display:none}.timeline-item-inner .content-block-inner:after{display:none}.timeline-item-inner .list-block ul:before{display:none}.timeline-item-inner .list-block ul:after{display:none}.timeline-item-inner+.timeline-item-inner{margin-top:16px}.timeline-item-divider{width:1px;margin:0 16px;position:relative;width:10px;height:10px;background:#bbb;border-radius:50%;margin-top:3px;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}.timeline-item-divider:after,.timeline-item-divider:before{content:' ';width:1px;height:100vh;position:absolute;left:50%;background:inherit;-webkit-transform:translate3d(-50%,0,0);transform:translate3d(-50%,0,0)}.timeline-item-divider:after{top:100%}.timeline-item-divider:before{bottom:100%}.timeline-item:last-child .timeline-item-divider:after{display:none}.timeline-item:first-child .timeline-item-divider:before{display:none}.timeline-item-time{color:rgba(0,0,0,.54);margin-top:16px;font-size:13px}.timeline-item-time:first-child{margin-top:0}.timeline-item-title+.timeline-item-time{margin-top:0}.timeline-item-title{font-size:16px}.timeline-sides .timeline-item{margin-left:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:calc(50% - (32px + 10px)/ 2 - 50px);margin-right:0}.timeline-sides .timeline-item .timeline-item-date{text-align:right}.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n){-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-right:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:calc(50% - (32px + 10px)/ 2 - 50px);margin-left:0}.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date{text-align:left}.timeline-sides .timeline-item-left{-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-right:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:calc(50% - (32px + 10px)/ 2 - 50px);margin-left:0}.timeline-sides .timeline-item-left .timeline-item-date{text-align:left}.timeline-sides .timeline-item-right{margin-left:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:calc(50% - (32px + 10px)/ 2 - 50px);margin-right:0}.timeline-sides .timeline-item-right .timeline-item-date{text-align:right}@media (min-width:768px){.tablet-sides .timeline-item{margin-left:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:calc(50% - (32px + 10px)/ 2 - 50px);margin-right:0}.tablet-sides .timeline-item .timeline-item-date{text-align:right}.tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n){-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-right:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:calc(50% - (32px + 10px)/ 2 - 50px);margin-left:0}.tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date{text-align:left}.tablet-sides .timeline-item-left{-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-right:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:calc(50% - (32px + 10px)/ 2 - 50px);margin-left:0}.tablet-sides .timeline-item-left .timeline-item-date{text-align:left}.tablet-sides .timeline-item-right{margin-left:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:calc(50% - (32px + 10px)/ 2 - 50px);margin-right:0}.tablet-sides .timeline-item-right .timeline-item-date{text-align:right}}.timeline-horizontal{padding:0;margin:0;height:100%;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;position:relative}.timeline-horizontal .timeline-item{display:block;width:33.33333333vw;margin:0;padding:0;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;padding-top:34px;padding-bottom:12px;position:relative;height:100%}.timeline-horizontal .timeline-item:after{content:'';position:absolute;right:0;top:0;left:auto;bottom:auto;width:1px;height:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}html.pixel-ratio-2 .timeline-horizontal .timeline-item:after{-webkit-transform:scaleX(.5);transform:scaleX(.5)}html.pixel-ratio-3 .timeline-horizontal .timeline-item:after{-webkit-transform:scaleX(.33);transform:scaleX(.33)}.timeline-horizontal .timeline-item:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .timeline-horizontal .timeline-item:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .timeline-horizontal .timeline-item:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.timeline-horizontal .timeline-item-date{background:#2196f3;width:auto;text-align:left;padding:0 12px;line-height:34px;position:absolute;left:0;top:0;width:100%;height:34px;color:#fff}.timeline-horizontal .timeline-item-date:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .timeline-horizontal .timeline-item-date:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .timeline-horizontal .timeline-item-date:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.timeline-horizontal .timeline-item-content{padding:12px;overflow:auto;-webkit-overflow-scrolling:touch;margin:0;height:-webkit-calc(100% - 12px);height:-moz-calc(100% - 12px);height:calc(100% - 12px)}.timeline-horizontal .timeline-item-divider{display:none}.timeline-horizontal.col-100 .timeline-item{width:100vw}.timeline-horizontal.col-95 .timeline-item{width:95vw}.timeline-horizontal.col-90 .timeline-item{width:90vw}.timeline-horizontal.col-85 .timeline-item{width:85vw}.timeline-horizontal.col-80 .timeline-item{width:80vw}.timeline-horizontal.col-75 .timeline-item{width:75vw}.timeline-horizontal.col-70 .timeline-item{width:70vw}.timeline-horizontal.col-66 .timeline-item{width:66.66666666666666vw}.timeline-horizontal.col-65 .timeline-item{width:65vw}.timeline-horizontal.col-60 .timeline-item{width:60vw}.timeline-horizontal.col-55 .timeline-item{width:55vw}.timeline-horizontal.col-50 .timeline-item{width:50vw}.timeline-horizontal.col-45 .timeline-item{width:45vw}.timeline-horizontal.col-40 .timeline-item{width:40vw}.timeline-horizontal.col-35 .timeline-item{width:35vw}.timeline-horizontal.col-33 .timeline-item{width:33.333333333333336vw}.timeline-horizontal.col-30 .timeline-item{width:30vw}.timeline-horizontal.col-25 .timeline-item{width:25vw}.timeline-horizontal.col-20 .timeline-item{width:20vw}.timeline-horizontal.col-15 .timeline-item{width:15vw}.timeline-horizontal.col-10 .timeline-item{width:10vw}.timeline-horizontal.col-5 .timeline-item{width:5vw}@media all and (min-width:768px){.timeline-horizontal.tablet-100 .timeline-item{width:100vw}.timeline-horizontal.tablet-95 .timeline-item{width:95vw}.timeline-horizontal.tablet-90 .timeline-item{width:90vw}.timeline-horizontal.tablet-85 .timeline-item{width:85vw}.timeline-horizontal.tablet-80 .timeline-item{width:80vw}.timeline-horizontal.tablet-75 .timeline-item{width:75vw}.timeline-horizontal.tablet-70 .timeline-item{width:70vw}.timeline-horizontal.tablet-66 .timeline-item{width:66.66666666666666vw}.timeline-horizontal.tablet-65 .timeline-item{width:65vw}.timeline-horizontal.tablet-60 .timeline-item{width:60vw}.timeline-horizontal.tablet-55 .timeline-item{width:55vw}.timeline-horizontal.tablet-50 .timeline-item{width:50vw}.timeline-horizontal.tablet-45 .timeline-item{width:45vw}.timeline-horizontal.tablet-40 .timeline-item{width:40vw}.timeline-horizontal.tablet-35 .timeline-item{width:35vw}.timeline-horizontal.tablet-33 .timeline-item{width:33.333333333333336vw}.timeline-horizontal.tablet-30 .timeline-item{width:30vw}.timeline-horizontal.tablet-25 .timeline-item{width:25vw}.timeline-horizontal.tablet-20 .timeline-item{width:20vw}.timeline-horizontal.tablet-15 .timeline-item{width:15vw}.timeline-horizontal.tablet-10 .timeline-item{width:10vw}.timeline-horizontal.tablet-5 .timeline-item{width:5vw}}.timeline-month,.timeline-year{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;padding-top:24px;position:relative;box-sizing:border-box;height:100%}.timeline-month-title,.timeline-year-title{position:absolute;left:0;top:0;width:100%;line-height:24px;height:24px;padding:0 12px;box-sizing:border-box;background:#2196f3;color:#fff}.timeline-month-title span,.timeline-year-title span{display:inline-block;position:-webkit-sticky;position:-moz-sticky;position:sticky;left:12px}.timeline-year-title{font-size:16px}.timeline-year-title span{margin-top:2px}.timeline-month-title span{margin-top:-2px}.swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate(0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-box-lines:multiple;-moz-box-lines:multiple;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-moz-transition-timing-function:ease-out;-ms-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;width:100%;height:100%;position:relative}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;-webkit-transition-property:-webkit-transform,height;-moz-transition-property:-moz-transform;-o-transition-property:-o-transform;-ms-transition-property:-ms-transform;transition-property:transform,height}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-wp8-horizontal{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-wp8-vertical{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;-moz-background-size:27px 44px;-webkit-background-size:27px 44px;background-size:27px 44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");right:10px;left:auto}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s;transition:.3s;-webkit-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-moz-appearance:none;-ms-appearance:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-o-transform:translate(0,-50%);-ms-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:5px 0;display:block}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 5px}.swiper-pagination-progress{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progress .swiper-pagination-progressbar{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-moz-transform-origin:left top;-ms-transform-origin:left top;-o-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progress .swiper-pagination-progressbar{-webkit-transform-origin:right top;-moz-transform-origin:right top;-ms-transform-origin:right top;-o-transform-origin:right top;transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progress{width:100%;height:4px;left:0;top:0}.swiper-container-vertical>.swiper-pagination-progress{width:4px;height:100%;left:0;top:0}.swiper-container-3d{-webkit-perspective:1200px;-moz-perspective:1200px;-o-perspective:1200px;perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;-ms-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-moz-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-coverflow .swiper-wrapper,.swiper-container-flip .swiper-wrapper{-ms-perspective:1200px}.swiper-container-cube,.swiper-container-flip{overflow:visible}.swiper-container-cube .swiper-slide,.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-cube .swiper-slide .swiper-slide,.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active,.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top,.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-slide{visibility:hidden;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube.swiper-container-rtl .swiper-slide{-webkit-transform-origin:100% 0;-moz-transform-origin:100% 0;-ms-transform-origin:100% 0;transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-fade.swiper-container-free-mode .swiper-slide{-webkit-transition-timing-function:ease-out;-moz-transition-timing-function:ease-out;-ms-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-moz-transition-property:opacity;-o-transition-property:opacity;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-zoom-container{width:100%;height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-moz-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-moz-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-slide .preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10}.photo-browser{position:absolute;left:0;top:0;width:100%;height:100%;z-index:11500}.framework7-root>.photo-browser,body>.photo-browser{opacity:0;display:none;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.framework7-root>.photo-browser.photo-browser-in,body>.photo-browser.photo-browser-in{display:block;-webkit-animation:photoBrowserIn .4s forwards;animation:photoBrowserIn .4s forwards}.framework7-root>.photo-browser.photo-browser-out,body>.photo-browser.photo-browser-out{display:block;-webkit-animation:photoBrowserOut .4s forwards;animation:photoBrowserOut .4s forwards}html.with-statusbar-overlay .framework7-root>.photo-browser,html.with-statusbar-overlay body>.photo-browser{height:-webkit-calc(100% - 24px);height:calc(100% - 24px);top:24px}html.with-statusbar-overlay.ios .framework7-root>.photo-browser,html.with-statusbar-overlay.ios body>.photo-browser{height:-webkit-calc(100% - 20px);height:calc(100% - 20px);top:20px}.framework7-root>.photo-browser .navbar,.framework7-root>.photo-browser .toolbar,.popup>.photo-browser .navbar,.popup>.photo-browser .toolbar,body>.photo-browser .navbar,body>.photo-browser .toolbar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.photo-browser .page[data-page=photo-browser-slides]{background:0 0}.photo-browser-popup{background:0 0}.photo-browser .navbar,.photo-browser .toolbar,.views .view[data-page=photo-browser-slides] .navbar,.views .view[data-page=photo-browser-slides] .toolbar{background:rgba(33,150,243,.95);-webkit-transition-duration:.4s;transition-duration:.4s}.view[data-page=photo-browser-slides] .page[data-page=photo-browser-slides] .navbar,.view[data-page=photo-browser-slides] .page[data-page=photo-browser-slides] .toolbar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.photo-browser .page[data-page=photo-browser-slides] .toolbar,.view[data-page=photo-browser-slides] .page[data-page=photo-browser-slides] .toolbar{bottom:0;top:auto}.photo-browser-exposed .navbar,.photo-browser-exposed .toolbar{opacity:0;visibility:hidden;pointer-events:none}.photo-browser-exposed .photo-browser-swiper-container{background:#000}.photo-browser-of{margin:0 5px}.photo-browser-captions{pointer-events:none;position:absolute;left:0;width:100%;bottom:0;z-index:10;opacity:1;-webkit-transition-duration:.4s;transition-duration:.4s}.photo-browser-captions.photo-browser-captions-exposed{opacity:0}.toolbar~.photo-browser-captions{bottom:48px;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.photo-browser-exposed .toolbar~.photo-browser-captions{-webkit-transform:translate3d(0,48px,0);transform:translate3d(0,48px,0)}.toolbar~.photo-browser-captions.photo-browser-captions-exposed{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.photo-browser-caption{box-sizing:border-box;-webkit-transition-duration:.3s;transition-duration:.3s;position:absolute;bottom:0;left:0;opacity:0;padding:4px 5px;width:100%;text-align:center;background:rgba(0,0,0,.8)}.photo-browser-caption:empty{display:none}.photo-browser-caption.photo-browser-caption-active{opacity:1}.photo-browser-captions-light .photo-browser-caption{background:rgba(255,255,255,.8)}.photo-browser-captions-dark .photo-browser-caption{color:#fff}.photo-browser-exposed .photo-browser-caption{color:#fff;background:rgba(0,0,0,.8)}.photo-browser-swiper-container{position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden;background:#fff;-webkit-transition-duration:.4s;transition-duration:.4s}.photo-browser-swiper-wrapper{position:absolute;left:0;top:0;width:100%;height:100%;padding:0;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.photo-browser-link-inactive{opacity:.3}.photo-browser-slide{width:100%;height:100%;position:relative;overflow:hidden;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0;box-sizing:border-box}.photo-browser-slide.transitioning{-webkit-transition-duration:.4s;transition-duration:.4s}.photo-browser-slide span.swiper-zoom-container{display:none}.photo-browser-slide img{width:auto;height:auto;max-width:100%;max-height:100%;display:none}.photo-browser-slide.swiper-slide-active span.swiper-zoom-container,.photo-browser-slide.swiper-slide-next span.swiper-zoom-container,.photo-browser-slide.swiper-slide-prev span.swiper-zoom-container{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.photo-browser-slide.swiper-slide-active img,.photo-browser-slide.swiper-slide-next img,.photo-browser-slide.swiper-slide-prev img{display:inline}.photo-browser-slide.swiper-slide-active.photo-browser-slide-lazy .preloader,.photo-browser-slide.swiper-slide-next.photo-browser-slide-lazy .preloader,.photo-browser-slide.swiper-slide-prev.photo-browser-slide-lazy .preloader{display:block}.photo-browser-slide iframe{width:100%;height:100%}.photo-browser-slide .preloader{display:none;position:absolute;width:42px;height:42px;margin-left:-21px;margin-top:-21px;left:50%;top:50%}.photo-browser.photo-browser-dark .navbar,.photo-browser.photo-browser-dark .toolbar{background:rgba(30,30,30,.8);color:#fff}.photo-browser.photo-browser-dark .navbar:before,.photo-browser.photo-browser-dark .toolbar:before{display:none}.photo-browser.photo-browser-dark .navbar:after,.photo-browser.photo-browser-dark .toolbar:after{display:none}.photo-browser.photo-browser-dark .navbar a,.photo-browser.photo-browser-dark .toolbar a{color:#fff}.photo-browser.photo-browser-dark .photo-browser-swiper-container{background:#000}@-webkit-keyframes photoBrowserIn{0%{-webkit-transform:translate3d(0,0,0) scale(.5);opacity:0}100%{-webkit-transform:translate3d(0,0,0) scale(1);opacity:1}}@keyframes photoBrowserIn{0%{transform:translate3d(0,0,0) scale(.5);opacity:0}100%{transform:translate3d(0,0,0) scale(1);opacity:1}}@-webkit-keyframes photoBrowserOut{0%{-webkit-transform:translate3d(0,0,0) scale(1);opacity:1}100%{-webkit-transform:translate3d(0,0,0) scale(.5);opacity:0}}@keyframes photoBrowserOut{0%{transform:translate3d(0,0,0) scale(1);opacity:1}100%{transform:translate3d(0,0,0) scale(.5);opacity:0}}.picker-columns{width:100%;height:260px;z-index:11500}.picker-columns.picker-modal-inline{height:200px}@media (orientation:landscape) and (max-height:415px){.picker-columns:not(.picker-modal-inline){height:200px}}.popover.popover-picker-columns{width:280px}.popover.popover-picker-columns .toolbar{border-radius:2px 2px 0 0}.picker-items{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;padding:0;text-align:right;font-size:20px;-webkit-mask-box-image:-webkit-linear-gradient(bottom,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent);-webkit-mask-box-image:linear-gradient(to top,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent)}.picker-items-col{overflow:hidden;position:relative;max-height:100%}.picker-items-col.picker-items-col-left{text-align:left}.picker-items-col.picker-items-col-center{text-align:center}.picker-items-col.picker-items-col-right{text-align:right}.picker-items-col.picker-items-col-divider{color:rgba(0,0,0,.87);display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.picker-items-col-wrapper{-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.picker-item{height:36px;line-height:36px;white-space:nowrap;position:relative;overflow:hidden;text-overflow:ellipsis;color:rgba(0,0,0,.54);left:0;top:0;width:100%;box-sizing:border-box;-webkit-transition-duration:.3s;transition-duration:.3s}.picker-item span{padding:0 10px}.picker-items-col-absolute .picker-item{position:absolute}.picker-item.picker-item-far{pointer-events:none}.picker-item.picker-selected{color:rgba(0,0,0,.87);-webkit-transform:translate3d(0,0,0) rotateX(0);transform:translate3d(0,0,0) rotateX(0)}.picker-center-highlight{height:36px;box-sizing:border-box;position:absolute;left:0;width:100%;top:50%;margin-top:-18px;pointer-events:none}.picker-center-highlight:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:rgba(0,0,0,.15);display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .picker-center-highlight:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .picker-center-highlight:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.picker-center-highlight:after{content:'';position:absolute;left:0;bottom:0;right:auto;top:auto;height:1px;width:100%;background-color:rgba(0,0,0,.15);display:block;z-index:15;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}html.pixel-ratio-2 .picker-center-highlight:after{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .picker-center-highlight:after{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.picker-3d .picker-items{overflow:hidden;-webkit-perspective:1200px;perspective:1200px}.picker-3d .picker-item,.picker-3d .picker-items-col,.picker-3d .picker-items-col-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.picker-3d .picker-items-col{overflow:visible}.picker-3d .picker-item{-webkit-transform-origin:center center -110px;transform-origin:center center -110px;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.picker-calendar{background:#fff;height:420px;overflow:hidden;bottom:auto;width:90%;left:50%;top:50%;min-width:300px;max-width:380px;-webkit-transform:translate3d(-50%,100%,0);transform:translate3d(-50%,100%,0);box-shadow:0 19px 38px rgba(0,0,0,.3),0 15px 12px rgba(0,0,0,.22)}@media (orientation:landscape) and (max-height:460px){.picker-calendar:not(.picker-modal-inline){height:-webkit-calc(100% - 40px);height:calc(100% - 40px)}}.popover-picker-calendar .picker-calendar{height:420px}.picker-calendar .picker-modal-inner{overflow:hidden}.picker-calendar.modal-in{-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0)}.picker-calendar.modal-out{-webkit-transform:translate3d(-50%,100%,0);transform:translate3d(-50%,100%,0)}.picker-calendar.picker-modal-inline{height:300px}.picker-calendar.picker-modal-inline,.popover-picker-calendar .picker-calendar{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);width:auto;max-width:none;left:0;top:0;box-shadow:none}.picker-calendar.picker-modal{z-index:12500}.popover.popover-picker-calendar{width:320px}.picker-calendar-selected-date{line-height:48px;color:#fff;padding:0 24px;font-size:20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.picker-calendar-week-days{height:14.28571429%;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;font-size:12px;box-sizing:border-box;position:relative;color:rgba(0,0,0,.54)}.picker-calendar-week-days .picker-calendar-week-day{-webkit-box-flex:1;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;width:14.28571429%;width:-webkit-calc(100% / 7);width:-moz-calc(100% / 7);width:calc(100% / 7);text-align:center;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.picker-calendar-week-days+.picker-calendar-months{height:-webkit-calc(100% - 100% / 7);height:-moz-calc(100% - 100% / 7);height:calc(100% - 100% / 7)}.picker-calendar-months{width:100%;height:100%;overflow:hidden;position:relative}.picker-calendar-months-wrapper{position:relative;width:100%;height:100%;-webkit-transition-duration:.3s;transition-duration:.3s}.picker-calendar-month{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-moz-box-orient:vertical;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;width:100%;height:100%;position:absolute;left:0;top:0}.picker-calendar-row{height:16.66666667%;height:-webkit-calc(100% / 6);height:-moz-calc(100% / 6);height:calc(100% / 6);display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;width:100%;position:relative}.picker-calendar-day{-webkit-box-flex:1;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;width:14.28571429%;width:-webkit-calc(100% / 7);width:-moz-calc(100% / 7);width:calc(100% / 7);text-align:center;font-size:12px;cursor:pointer}.picker-calendar-day.picker-calendar-day-next,.picker-calendar-day.picker-calendar-day-prev{color:#b8b8b8}.picker-calendar-day.picker-calendar-day-disabled{color:#d4d4d4;cursor:auto}.picker-calendar-day.picker-calendar-day-today span{color:#2196f3}.picker-calendar-day.picker-calendar-day-selected span{background:#2196f3;color:#fff}.picker-calendar-range .picker-calendar-day.picker-calendar-day-selected span{border-radius:0;width:100%}.picker-calendar-day.picker-calendar-day-has-events span:after{content:'';width:4px;height:4px;border-radius:50%;background:#2196f3;position:absolute;margin-left:-2px;left:50%;bottom:2px}.picker-calendar-day.picker-calendar-day-has-events.picker-calendar-day-selected span:after{display:none}.picker-calendar-day span{display:inline-block;border-radius:100%;width:36px;height:36px;line-height:36px;position:relative}.picker-calendar-month-picker,.picker-calendar-year-picker{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;width:50%;max-width:200px;-webkit-box-flex:10;-webkit-flex-shrink:10;-ms-flex:0 10 auto;flex-shrink:10}.picker-calendar-month-picker span,.picker-calendar-year-picker span{-webkit-box-flex:1;-webkit-flex-shrink:1;-ms-flex:0 1 auto;flex-shrink:1;position:relative;overflow:hidden;text-overflow:ellipsis;width:100%;text-align:center}.notifications{position:absolute;left:0;bottom:0;width:100%;z-index:20000;color:#fff;font-size:14px;margin:0;border:none;display:none;box-sizing:border-box;max-height:100%;overflow:hidden;-webkit-overflow-scrolling:touch;-webkit-transition-duration:450ms;transition-duration:450ms;-webkit-perspective:1200px;perspective:1200px}.notifications.list-block>ul{max-width:568px;background:#323232;margin:0 auto}.notifications.list-block>ul:before{display:none}.notifications.list-block>ul:after{display:none}.notifications .item-content{-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;padding-left:24px}.notifications .item-title{font-size:14px;font-weight:400;white-space:normal;padding-top:14px;padding-bottom:14px}.notifications .item-inner{padding-right:24px;padding-top:0;padding-bottom:0}.notifications .item-inner:after{display:none}.notifications .item-after{max-height:none;margin-left:16px}.notifications .button.close-notification{color:#48aeff}.notifications .notification-item{margin:0 auto;-webkit-transition-duration:450ms;transition-duration:450ms;-webkit-transition-delay:.1s;transition-delay:.1s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.notifications .notification-hidden{opacity:0;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.notifications .notification-item-removing{-webkit-transition-delay:0s;transition-delay:0s}@media (min-width:569px){.notifications.list-block>ul{border-radius:2px;width:auto;min-width:288px}}.login-screen-content{background:#fff}.login-screen-content .content-block,.login-screen-content .list-block,.login-screen-content .list-block-label,.login-screen-content .login-screen-title{max-width:480px;margin:24px auto}.login-screen-content .list-block ul{background:0 0}.login-screen-content .list-block ul:before{display:none}.login-screen-content .list-block ul:after{display:none}.login-screen-content .list-block-label{text-align:center}.navbar-fixed .page .login-screen-content{padding-top:0}.login-screen-title{text-align:center;font-size:34px}.actions-modal-button,.button,.floating-button>a,.label-checkbox,.label-radio,.modal-button,.ripple,.speed-dial-buttons a,.tab-link,a.floating-button,a.item-link,a.link{-webkit-user-select:none;user-select:none}.ripple-wave{left:0;top:0;position:absolute!important;border-radius:50%;pointer-events:none;z-index:-1;background:rgba(0,0,0,.1);padding:0;margin:0;font-size:0;-webkit-transform:translate3d(0,0,0) scale(0);transform:translate3d(0,0,0) scale(0);-webkit-transition-duration:1.4s;transition-duration:1.4s}.ripple-wave.ripple-wave-fill{-webkit-transition-duration:.3s;transition-duration:.3s;opacity:.35}.ripple-wave.ripple-wave-out{-webkit-transition-duration:.6s;transition-duration:.6s;opacity:0}.button-fill .ripple-wave,.picker-calendar-day .ripple-wave{z-index:1}.button-fill .ripple-wave,.floating-button .ripple-wave,.navbar .ripple-wave,.notifications .ripple-wave,.searchbar .ripple-wave,.speed-dial-buttons a .ripple-wave,.subnavbar .ripple-wave,.toolbar .ripple-wave{background:rgba(255,255,255,.3)}.messagebar .ripple-wave{background:rgba(0,0,0,.1)}.data-table .sortable-cell .ripple-wave{z-index:0}.form-checkbox .ripple-wave,.form-radio .ripple-wave{background:rgba(33,150,243,.5);z-index:0}.disabled,[disabled]{opacity:.55;pointer-events:none}.disabled .disabled,.disabled [disabled],[disabled] .disabled,[disabled] [disabled]{opacity:1}.data-table{overflow-x:auto}.data-table table{width:100%;border:none;padding:0;margin:0;border-collapse:collapse;text-align:left}.data-table thead{font-size:12px}.data-table thead td,.data-table thead th{font-weight:500;height:56px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:16px}.data-table thead td:not(.sortable-active),.data-table thead th:not(.sortable-active){color:rgba(0,0,0,.54)}.data-table thead i.icon,.data-table thead i.material-icons{font-size:16px;width:16px;height:16px;vertical-align:top}.data-table tbody{font-size:13px}.data-table tbody tr.data-table-row-selected{background:#f5f5f5}.data-table tbody td{height:48px}.data-table tbody td:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .data-table tbody td:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .data-table tbody td:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}html:not(.ios):not(.android) .data-table tbody tr:hover{background:#f5f5f5}.data-table td,.data-table th{padding:0;position:relative;padding-left:28px;padding-right:28px}.data-table td.label-cell,.data-table th.label-cell{padding-left:24px;padding-right:24px}.data-table td:first-child,.data-table th:first-child{padding-left:24px}.data-table td:last-child,.data-table th:last-child{padding-right:24px}.data-table td.numeric-cell,.data-table th.numeric-cell{text-align:right}.data-table td.checkbox-cell,.data-table th.checkbox-cell{padding-left:24px;padding-right:12px;width:18px;overflow:visible}.data-table td.checkbox-cell+td,.data-table td.checkbox-cell+th,.data-table th.checkbox-cell+td,.data-table th.checkbox-cell+th{padding-left:12px}.data-table td.actions-cell,.data-table th.actions-cell{text-align:right;white-space:nowrap}.data-table td.actions-cell a.link,.data-table th.actions-cell a.link{color:rgba(0,0,0,.54);position:relative;z-index:1;cursor:pointer}.data-table td.actions-cell a.link+a.link,.data-table th.actions-cell a.link+a.link{margin-left:24px}.data-table td.actions-cell a.icon-only,.data-table th.actions-cell a.icon-only{width:24px;height:24px;display:inline-block;vertical-align:middle;font-size:18px;line-height:24px;text-align:center;font-size:0}.data-table td.actions-cell a.icon-only i,.data-table th.actions-cell a.icon-only i{font-size:18px;vertical-align:middle}.data-table .sortable-cell{cursor:pointer;position:relative}.data-table .sortable-cell.numeric-cell:before,.data-table .sortable-cell:not(.numeric-cell):after{content:'';display:inline-block;vertical-align:top;width:16px;height:16px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20fill%3D'%23000000'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%20width%3D'24'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'M0%200h24v24H0V0z'%20fill%3D'none'%2F%3E%3Cpath%20d%3D'M20%2012l-1.41-1.41L13%2016.17V4h-2v12.17l-5.58-5.59L4%2012l8%208%208-8z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");background-size:100% auto;background-position:center;background-repeat:no-repeat;font-size:0;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transform:rotate(0);transform:rotate(0);opacity:0}html:not(.ios):not(.android) .data-table .sortable-cell:not(.sortable-active):hover:after,html:not(.ios):not(.android) .data-table .sortable-cell:not(.sortable-active):hover:before{opacity:.54}.data-table .sortable-cell.sortable-active:after,.data-table .sortable-cell.sortable-active:before{opacity:.87}.data-table .sortable-cell.sortable-desc:after,.data-table .sortable-cell.sortable-desc:before{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.data-table .sortable-cell:not(.numeric-cell):after{margin-left:8px}.data-table .sortable-cell.numeric-cell:before{margin-right:8px}.card .data-table .card-footer,.card .data-table .card-header,.data-table.card .card-footer,.data-table.card .card-header{padding-left:24px;padding-right:14px}.card .data-table .card-header,.data-table.card .card-header{height:64px}.card .data-table .card-footer,.data-table.card .card-footer{height:56px}.card .data-table .card-content,.data-table.card .card-content{overflow-x:auto}.data-table .data-table-title{font-size:20px}.data-table .data-table-actions,.data-table .data-table-links{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.data-table .data-table-actions a.link,.data-table .data-table-links a.link{cursor:pointer}.data-table .data-table-actions a.link+a.link,.data-table .data-table-links a.link+a.link{margin-left:24px}.data-table .data-table-actions{margin-left:auto;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center}.data-table .data-table-actions a.link{cursor:pointer;min-width:0;color:rgba(0,0,0,.54)}.data-table .data-table-actions a.link.icon-only{width:24px;height:24px;line-height:1;overflow:visible}.data-table .data-table-actions a.link.icon-only.active-state,html:not(.watch-active-state) .data-table .data-table-actions a.link.icon-only:active{background:0 0}.data-table .data-table-header,.data-table .data-table-header-selected{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;width:100%}.data-table .card-header>.data-table-header,.data-table .card-header>.data-table-header-selected{padding-left:24px;padding-right:14px;margin-left:-24px;margin-right:-14px;height:100%;padding-top:4px;padding-bottom:4px}.data-table .data-table-header-selected{display:none;background:rgba(33,150,243,.1)}.data-table.data-table-has-checked .data-table-header{display:none}.data-table.data-table-has-checked .data-table-header-selected{display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex}.data-table .data-table-title-selected{color:#2196f3;font-size:14px}@media (max-width:480px) and (orientation:portrait){.data-table.data-table-collapsible thead{display:none}.data-table.data-table-collapsible tbody,.data-table.data-table-collapsible td,.data-table.data-table-collapsible tr{display:block}.data-table.data-table-collapsible tr{position:relative}.data-table.data-table-collapsible tr:before{content:'';position:absolute;left:0;top:0;bottom:auto;right:auto;height:1px;width:100%;background-color:rgba(0,0,0,.12);display:block;z-index:15;-webkit-transform-origin:50% 0;transform-origin:50% 0}html.pixel-ratio-2 .data-table.data-table-collapsible tr:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}html.pixel-ratio-3 .data-table.data-table-collapsible tr:before{-webkit-transform:scaleY(.33);transform:scaleY(.33)}.data-table.data-table-collapsible tr:hover{background-color:inherit}.data-table.data-table-collapsible td{text-align:left;padding-left:16px;padding-right:16px;display:-webkit-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-line-pack:center;-webkit-align-content:center;align-content:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.data-table.data-table-collapsible td:before{display:none}.data-table.data-table-collapsible td:not(.checkbox-cell){font-size:16px}.data-table.data-table-collapsible td:not(.checkbox-cell):before{width:40%;display:block;content:attr(data-collapsible-title);position:relative;height:auto;background:0 0;-webkit-transform:none!important;transform:none!important;color:rgba(0,0,0,.54);font-weight:500;font-size:12px;margin-right:16px;line-height:16px;-webkit-box-flex:0;-webkit-flex-shrink:0;-ms-flex:0 0 auto;flex-shrink:0}.data-table.data-table-collapsible td.checkbox-cell{position:absolute;left:0;top:0}.data-table.data-table-collapsible td.checkbox-cell+td{padding-left:16px}.data-table.data-table-collapsible td.checkbox-cell~td{margin-left:32px}}.data-table .tablet-landscape-only,.data-table .tablet-only{display:none}@media (min-width:768px){.data-table .tablet-only{display:table-cell}}@media (min-width:768px) and (orientation:landscape){.data-table .tablet-landscape-only{display:table-cell}} \ No newline at end of file diff --git a/bower_components/framework7/dist/css/framework7.material.rtl.css b/bower_components/framework7/dist/css/framework7.material.rtl.css new file mode 100644 index 00000000..c4d47830 --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.material.rtl.css @@ -0,0 +1,678 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * Google Material Theme + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +/*============= + Framework 7 RTL Additions +=============*/ +html { + direction: rtl; +} +/* === Lists === */ +.list-block ul ul { + padding-left: 0; + padding-right: 56px; +} +.list-block .item-content { + padding-left: 0; + padding-right: 16px; +} +.list-block .item-inner { + padding-right: 0; + padding-left: 16px; +} +.list-block .item-after { + margin-left: 0; + margin-right: 8px; +} +.list-block .item-media i + i, +.list-block .item-media i + img { + margin-left: 0; + margin-right: 8px; +} +.list-block .item-media + .item-inner { + margin-left: 0; + margin-right: 16px; +} +.list-block .item-link .item-inner { + padding-right: 0; + padding-left: 42px; + background-position: 16px center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E"); +} +.list-block.media-list .item-link .item-inner, +.list-block li.media-item .item-link .item-inner { + padding-right: 0; + padding-left: 16px; +} +.list-block.media-list .item-link .item-title-row, +.list-block li.media-item .item-link .item-title-row { + padding-right: 0; + padding-left: 26px; + background-position: center left; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E"); +} +.list-block .sortable-handler { + right: auto; + left: 0; +} +.list-block.sortable-opened .item-inner, +.list-block.sortable-opened .item-link .item-inner { + padding-right: 0; + padding-left: 50px; +} +.list-block.sortable-opened .item-link .item-inner, +.list-block.sortable-opened .item-link .item-title-row { + background-image: none; +} +.list-block .swipeout-actions-left, +.list-block .swipeout-actions-right { + direction: ltr; +} +/* === Toolbars === */ +.navbar a.link i + span, +.toolbar a.link i + span, +.navbar a.link i + i, +.toolbar a.link i + i, +.navbar a.link span + i, +.toolbar a.link span + i, +.navbar a.link span + span, +.toolbar a.link span + span { + margin-left: 0; + margin-right: 8px; +} +.navbar .right { + margin-left: 0; + margin-right: auto; +} +.tabbar .tab-link-highlight { + left: auto; + right: 0; +} +.tabbar-scrollable .tab-link-highlight { + left: 0; + right: auto; +} +/* === Forms === */ +.list-block input[type="text"], +.list-block input[type="password"], +.list-block input[type="search"], +.list-block input[type="email"], +.list-block input[type="tel"], +.list-block input[type="url"], +.list-block input[type="date"], +.list-block input[type="datetime-local"], +.list-block input[type="time"], +.list-block input[type="number"], +.list-block select, +.list-block textarea { + text-align: right; +} +.list-block .input-item .floating-label, +.list-block.inputs-list .floating-label { + -webkit-transform-origin: right; + transform-origin: right; +} +.buttons-row .button { + margin-left: 0; + margin-right: 8px; +} +.buttons-row .button:first-child { + margin-right: 0; +} +.label-switch .checkbox:after { + left: auto; + right: 0; +} +.label-switch input[type="checkbox"]:checked + .checkbox:after { + -webkit-transform: translateX(-16px); + transform: translateX(-16px); +} +.range-slider input[type="range"]::-webkit-slider-thumb:before { + right: auto; + left: 100%; +} +label.label-checkbox .item-after i.icon-form-checkbox, +label.label-radio .item-after i.icon-form-checkbox, +label.label-checkbox .item-after i.icon-form-radio, +label.label-radio .item-after i.icon-form-radio { + margin-left: 16px; + margin-right: 8px; +} +/* === Search Bar === */ +.searchbar input[type="search"] { + background-position: right center; + padding: 0 24px 0 36px; +} +.searchbar .searchbar-clear { + right: auto; + left: -16px; +} +/* === Modals === */ +.modal-button + .modal-button { + margin-left: 0; + margin-right: 4px; +} +/* === Content Block === */ +.content-block-inner { + margin-left: 0; + margin-right: -16px; +} +/* === Messages === */ +.message-received { + -ms-flex-item-align: end; + -webkit-align-self: flex-end; + align-self: flex-end; + -webkit-box-align: end; + -ms-flex-align: end; + -webkit-align-items: flex-end; + align-items: flex-end; +} +.message-sent { + -ms-flex-item-align: start; + -webkit-align-self: flex-start; + align-self: flex-start; + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +/* === Chips === */ +.chip-media { + margin-left: 0; + margin-right: -12px; +} +.chip-media + .chip-label { + margin-left: 0px; + margin-right: 8px; +} +.chip-label + .chip-delete { + margin-left: -8px; + margin-right: 4px; +} +.chip-delete { + margin-left: -8px; +} +/* === Accordion === */ +.list-block .accordion-toggle .item-inner { + padding-right: 0; + padding-left: 42px; + background-position: 16px center; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E"); +} +.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner, +.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) > .item-link .item-inner, +.list-block.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row, +.list-block.media-list .accordion-item-expanded > .item-link .item-title-row, +.list-block .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row, +.list-block .accordion-item-expanded.media-item > .item-link .item-title-row { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20transform%3D'translate(70%2C%2030)%20rotate(90)'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E"); + background-size: 20px 20px; +} +.list-block .accordion-item ul { + padding-right: 0; +} +/* === Icons === */ +.contacts-block li:not(.list-group-title) { + padding-left: 0; + padding-right: 56px; +} +/* === Icons === */ +i.icon.icon-back { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-forward { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-next { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon.icon-prev { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-red, +i.icon-back.theme-red { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-red, +i.icon-forward.theme-red { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-red, +i.icon-next.theme-red { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23f44336'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-red, +i.icon-prev.theme-red { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23f44336'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-pink, +i.icon-back.theme-pink { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-pink, +i.icon-forward.theme-pink { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-pink, +i.icon-next.theme-pink { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23e91e63'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-pink, +i.icon-prev.theme-pink { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23e91e63'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-purple, +i.icon-back.theme-purple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-purple, +i.icon-forward.theme-purple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-purple, +i.icon-next.theme-purple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239c27b0'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-purple, +i.icon-prev.theme-purple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239c27b0'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-deeppurple, +i.icon-back.theme-deeppurple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-deeppurple, +i.icon-forward.theme-deeppurple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-deeppurple, +i.icon-next.theme-deeppurple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23673ab7'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-deeppurple, +i.icon-prev.theme-deeppurple { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23673ab7'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-indigo, +i.icon-back.theme-indigo { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-indigo, +i.icon-forward.theme-indigo { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-indigo, +i.icon-next.theme-indigo { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%233f51b5'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-indigo, +i.icon-prev.theme-indigo { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%233f51b5'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-blue, +i.icon-back.theme-blue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-blue, +i.icon-forward.theme-blue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-blue, +i.icon-next.theme-blue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%232196f3'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-blue, +i.icon-prev.theme-blue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%232196f3'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-lightblue, +i.icon-back.theme-lightblue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-lightblue, +i.icon-forward.theme-lightblue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-lightblue, +i.icon-next.theme-lightblue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2303a9f4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-lightblue, +i.icon-prev.theme-lightblue { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2303a9f4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-cyan, +i.icon-back.theme-cyan { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-cyan, +i.icon-forward.theme-cyan { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-cyan, +i.icon-next.theme-cyan { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2300bcd4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-cyan, +i.icon-prev.theme-cyan { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2300bcd4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-teal, +i.icon-back.theme-teal { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-teal, +i.icon-forward.theme-teal { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-teal, +i.icon-next.theme-teal { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23009688'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-teal, +i.icon-prev.theme-teal { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23009688'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-green, +i.icon-back.theme-green { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-green, +i.icon-forward.theme-green { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-green, +i.icon-next.theme-green { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%234caf50'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-green, +i.icon-prev.theme-green { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%234caf50'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-lightgreen, +i.icon-back.theme-lightgreen { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-lightgreen, +i.icon-forward.theme-lightgreen { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-lightgreen, +i.icon-next.theme-lightgreen { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%238bc34a'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-lightgreen, +i.icon-prev.theme-lightgreen { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%238bc34a'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-lime, +i.icon-back.theme-lime { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-lime, +i.icon-forward.theme-lime { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-lime, +i.icon-next.theme-lime { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23cddc39'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-lime, +i.icon-prev.theme-lime { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23cddc39'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-yellow, +i.icon-back.theme-yellow { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-yellow, +i.icon-forward.theme-yellow { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-yellow, +i.icon-next.theme-yellow { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffeb3b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-yellow, +i.icon-prev.theme-yellow { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffeb3b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-amber, +i.icon-back.theme-amber { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-amber, +i.icon-forward.theme-amber { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-amber, +i.icon-next.theme-amber { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffc107'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-amber, +i.icon-prev.theme-amber { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffc107'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-orange, +i.icon-back.theme-orange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-orange, +i.icon-forward.theme-orange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-orange, +i.icon-next.theme-orange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff9800'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-orange, +i.icon-prev.theme-orange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff9800'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-deeporange, +i.icon-back.theme-deeporange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-deeporange, +i.icon-forward.theme-deeporange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-deeporange, +i.icon-next.theme-deeporange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff5722'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-deeporange, +i.icon-prev.theme-deeporange { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff5722'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-brown, +i.icon-back.theme-brown { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-brown, +i.icon-forward.theme-brown { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-brown, +i.icon-next.theme-brown { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23795548'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-brown, +i.icon-prev.theme-brown { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23795548'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-gray, +i.icon-back.theme-gray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-gray, +i.icon-forward.theme-gray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-gray, +i.icon-next.theme-gray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239e9e9e'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-gray, +i.icon-prev.theme-gray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239e9e9e'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-bluegray, +i.icon-back.theme-bluegray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-bluegray, +i.icon-forward.theme-bluegray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-bluegray, +i.icon-next.theme-bluegray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23607d8b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-bluegray, +i.icon-prev.theme-bluegray { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23607d8b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-white, +i.icon-back.theme-white { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-white, +i.icon-forward.theme-white { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-white, +i.icon-next.theme-white { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-white, +i.icon-prev.theme-white { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-back.color-black, +i.icon-back.theme-black { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-forward.color-black, +i.icon-forward.theme-black { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-next.color-black, +i.icon-next.theme-black { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23000000'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +i.icon-prev.color-black, +i.icon-prev.theme-black { + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23000000'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E"); +} +/* === Timeline === */ +.timeline-sides .timeline-item { + margin-right: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: calc(50% - (32px + 10px) / 2 - 50px); + margin-left: 0; +} +.timeline-sides .timeline-item .timeline-item-date { + text-align: left; +} +.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-left: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: calc(50% - (32px + 10px) / 2 - 50px); + margin-right: 0; +} +.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date { + text-align: right; +} +.timeline-sides .timeline-item-left { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-left: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: calc(50% - (32px + 10px) / 2 - 50px); + margin-right: 0; +} +.timeline-sides .timeline-item-left .timeline-item-date { + text-align: right; +} +.timeline-sides .timeline-item-right { + margin-right: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: calc(50% - (32px + 10px) / 2 - 50px); + margin-left: 0; +} +.timeline-sides .timeline-item-right .timeline-item-date { + text-align: left; +} +@media (min-width: 768px) { + .tablet-sides .timeline-item { + margin-right: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: calc(50% - (32px + 10px) / 2 - 50px); + margin-left: 0; + } + .tablet-sides .timeline-item .timeline-item-date { + text-align: left; + } + .tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-left: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: calc(50% - (32px + 10px) / 2 - 50px); + margin-right: 0; + } + .tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date { + text-align: right; + } + .tablet-sides .timeline-item-left { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-left: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-left: calc(50% - (32px + 10px) / 2 - 50px); + margin-right: 0; + } + .tablet-sides .timeline-item-left .timeline-item-date { + text-align: right; + } + .tablet-sides .timeline-item-right { + margin-right: -moz-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: -webkit-calc(50% - (32px + 10px) / 2 - 50px); + margin-right: calc(50% - (32px + 10px) / 2 - 50px); + margin-left: 0; + } + .tablet-sides .timeline-item-right .timeline-item-date { + text-align: left; + } +} +.timeline-horizontal .timeline-item-date { + text-align: right; +} diff --git a/bower_components/framework7/dist/css/framework7.material.rtl.min.css b/bower_components/framework7/dist/css/framework7.material.rtl.min.css new file mode 100644 index 00000000..5f66d45b --- /dev/null +++ b/bower_components/framework7/dist/css/framework7.material.rtl.min.css @@ -0,0 +1,15 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +html{direction:rtl}.list-block ul ul{padding-left:0;padding-right:56px}.list-block .item-content{padding-left:0;padding-right:16px}.list-block .item-inner{padding-right:0;padding-left:16px}.list-block .item-after{margin-left:0;margin-right:8px}.list-block .item-media i+i,.list-block .item-media i+img{margin-left:0;margin-right:8px}.list-block .item-media+.item-inner{margin-left:0;margin-right:16px}.list-block .item-link .item-inner{padding-right:0;padding-left:42px;background-position:16px center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E")}.list-block li.media-item .item-link .item-inner,.list-block.media-list .item-link .item-inner{padding-right:0;padding-left:16px}.list-block li.media-item .item-link .item-title-row,.list-block.media-list .item-link .item-title-row{padding-right:0;padding-left:26px;background-position:center left;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E")}.list-block .sortable-handler{right:auto;left:0}.list-block.sortable-opened .item-inner,.list-block.sortable-opened .item-link .item-inner{padding-right:0;padding-left:50px}.list-block.sortable-opened .item-link .item-inner,.list-block.sortable-opened .item-link .item-title-row{background-image:none}.list-block .swipeout-actions-left,.list-block .swipeout-actions-right{direction:ltr}.navbar a.link i+i,.navbar a.link i+span,.navbar a.link span+i,.navbar a.link span+span,.toolbar a.link i+i,.toolbar a.link i+span,.toolbar a.link span+i,.toolbar a.link span+span{margin-left:0;margin-right:8px}.navbar .right{margin-left:0;margin-right:auto}.tabbar .tab-link-highlight{left:auto;right:0}.tabbar-scrollable .tab-link-highlight{left:0;right:auto}.list-block input[type=date],.list-block input[type=datetime-local],.list-block input[type=email],.list-block input[type=number],.list-block input[type=password],.list-block input[type=search],.list-block input[type=tel],.list-block input[type=text],.list-block input[type=time],.list-block input[type=url],.list-block select,.list-block textarea{text-align:right}.list-block .input-item .floating-label,.list-block.inputs-list .floating-label{-webkit-transform-origin:right;transform-origin:right}.buttons-row .button{margin-left:0;margin-right:8px}.buttons-row .button:first-child{margin-right:0}.label-switch .checkbox:after{left:auto;right:0}.label-switch input[type=checkbox]:checked+.checkbox:after{-webkit-transform:translateX(-16px);transform:translateX(-16px)}.range-slider input[type=range]::-webkit-slider-thumb:before{right:auto;left:100%}label.label-checkbox .item-after i.icon-form-checkbox,label.label-checkbox .item-after i.icon-form-radio,label.label-radio .item-after i.icon-form-checkbox,label.label-radio .item-after i.icon-form-radio{margin-left:16px;margin-right:8px}.searchbar input[type=search]{background-position:right center;padding:0 24px 0 36px}.searchbar .searchbar-clear{right:auto;left:-16px}.modal-button+.modal-button{margin-left:0;margin-right:4px}.content-block-inner{margin-left:0;margin-right:-16px}.message-received{-ms-flex-item-align:end;-webkit-align-self:flex-end;align-self:flex-end;-webkit-box-align:end;-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}.message-sent{-ms-flex-item-align:start;-webkit-align-self:flex-start;align-self:flex-start;-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.chip-media{margin-left:0;margin-right:-12px}.chip-media+.chip-label{margin-left:0;margin-right:8px}.chip-label+.chip-delete{margin-left:-8px;margin-right:4px}.chip-delete{margin-left:-8px}.list-block .accordion-toggle .item-inner{padding-right:0;padding-left:42px;background-position:16px center;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20fill%3D'%23c7c7cc'%20transform%3D'translate(60%2C120)%20rotate(180)'%2F%3E%3C%2Fsvg%3E")}.list-block .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row,.list-block .accordion-item-expanded.media-item>.item-link .item-title-row,.list-block.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row,.list-block.media-list .accordion-item-expanded>.item-link .item-title-row,.list-block:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner,.list-block:not(.media-list) .accordion-item-expanded:not(.media-item)>.item-link .item-inner{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%2060%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Cpath%20d%3D'm60%2061.5-38.25%2038.25-9.75-9.75%2029.25-28.5-29.25-28.5%209.75-9.75z'%20transform%3D'translate(70%2C%2030)%20rotate(90)'%20fill%3D'%23c7c7cc'%2F%3E%3C%2Fsvg%3E");background-size:20px 20px}.list-block .accordion-item ul{padding-right:0}.contacts-block li:not(.list-group-title){padding-left:0;padding-right:56px}i.icon.icon-back{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-forward{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon.icon-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-red,i.icon-back.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-red,i.icon-forward.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23f44336'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-red,i.icon-next.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23f44336'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-red,i.icon-prev.theme-red{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23f44336'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-pink,i.icon-back.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-pink,i.icon-forward.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23e91e63'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-pink,i.icon-next.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23e91e63'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-pink,i.icon-prev.theme-pink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23e91e63'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-purple,i.icon-back.theme-purple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-purple,i.icon-forward.theme-purple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%239c27b0'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-purple,i.icon-next.theme-purple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239c27b0'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-purple,i.icon-prev.theme-purple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239c27b0'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-deeppurple,i.icon-back.theme-deeppurple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-deeppurple,i.icon-forward.theme-deeppurple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23673ab7'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-deeppurple,i.icon-next.theme-deeppurple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23673ab7'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-deeppurple,i.icon-prev.theme-deeppurple{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23673ab7'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-indigo,i.icon-back.theme-indigo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-indigo,i.icon-forward.theme-indigo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%233f51b5'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-indigo,i.icon-next.theme-indigo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%233f51b5'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-indigo,i.icon-prev.theme-indigo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%233f51b5'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-blue,i.icon-back.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-blue,i.icon-forward.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%232196f3'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-blue,i.icon-next.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%232196f3'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-blue,i.icon-prev.theme-blue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%232196f3'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-lightblue,i.icon-back.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-lightblue,i.icon-forward.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%2303a9f4'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-lightblue,i.icon-next.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2303a9f4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-lightblue,i.icon-prev.theme-lightblue{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2303a9f4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-cyan,i.icon-back.theme-cyan{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-cyan,i.icon-forward.theme-cyan{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%2300bcd4'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-cyan,i.icon-next.theme-cyan{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2300bcd4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-cyan,i.icon-prev.theme-cyan{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%2300bcd4'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-teal,i.icon-back.theme-teal{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-teal,i.icon-forward.theme-teal{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23009688'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-teal,i.icon-next.theme-teal{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23009688'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-teal,i.icon-prev.theme-teal{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23009688'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-green,i.icon-back.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-green,i.icon-forward.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%234caf50'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-green,i.icon-next.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%234caf50'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-green,i.icon-prev.theme-green{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%234caf50'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-lightgreen,i.icon-back.theme-lightgreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-lightgreen,i.icon-forward.theme-lightgreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%238bc34a'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-lightgreen,i.icon-next.theme-lightgreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%238bc34a'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-lightgreen,i.icon-prev.theme-lightgreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%238bc34a'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-lime,i.icon-back.theme-lime{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-lime,i.icon-forward.theme-lime{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23cddc39'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-lime,i.icon-next.theme-lime{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23cddc39'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-lime,i.icon-prev.theme-lime{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23cddc39'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-yellow,i.icon-back.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-yellow,i.icon-forward.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffeb3b'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-yellow,i.icon-next.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffeb3b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-yellow,i.icon-prev.theme-yellow{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffeb3b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-amber,i.icon-back.theme-amber{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-amber,i.icon-forward.theme-amber{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffc107'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-amber,i.icon-next.theme-amber{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffc107'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-amber,i.icon-prev.theme-amber{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffc107'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-orange,i.icon-back.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-orange,i.icon-forward.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ff9800'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-orange,i.icon-next.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff9800'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-orange,i.icon-prev.theme-orange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff9800'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-deeporange,i.icon-back.theme-deeporange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-deeporange,i.icon-forward.theme-deeporange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ff5722'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-deeporange,i.icon-next.theme-deeporange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff5722'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-deeporange,i.icon-prev.theme-deeporange{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ff5722'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-brown,i.icon-back.theme-brown{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-brown,i.icon-forward.theme-brown{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23795548'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-brown,i.icon-next.theme-brown{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23795548'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-brown,i.icon-prev.theme-brown{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23795548'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-gray,i.icon-back.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-gray,i.icon-forward.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%239e9e9e'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-gray,i.icon-next.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239e9e9e'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-gray,i.icon-prev.theme-gray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%239e9e9e'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-bluegray,i.icon-back.theme-bluegray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-bluegray,i.icon-forward.theme-bluegray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23607d8b'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-bluegray,i.icon-next.theme-bluegray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23607d8b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-bluegray,i.icon-prev.theme-bluegray{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23607d8b'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-white,i.icon-back.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-white,i.icon-forward.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-white,i.icon-next.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-white,i.icon-prev.theme-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23ffffff'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-back.color-black,i.icon-back.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M12%204l-1.41%201.41L16.17%2011H4v2h12.17l-5.58%205.59L12%2020l8-8z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}i.icon-forward.color-black,i.icon-forward.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M20%2011H7.83l5.59-5.59L12%204l-8%208%208%208%201.41-1.41L7.83%2013H20v-2z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}i.icon-next.color-black,i.icon-next.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23000000'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M15.41%207.41L14%206l-6%206%206%206%201.41-1.41L10.83%2012z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}i.icon-prev.color-black,i.icon-prev.theme-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20fill%3D'%23000000'%20width%3D'24'%20height%3D'24'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M10%206L8.59%207.41%2013.17%2012l-4.58%204.59L10%2018l6-6z'%2F%3E%3Cpath%20d%3D'M0%200h24v24H0z'%20fill%3D'none'%2F%3E%3C%2Fsvg%3E")}.timeline-sides .timeline-item{margin-right:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:calc(50% - (32px + 10px)/ 2 - 50px);margin-left:0}.timeline-sides .timeline-item .timeline-item-date{text-align:left}.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n){-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-left:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:calc(50% - (32px + 10px)/ 2 - 50px);margin-right:0}.timeline-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date{text-align:right}.timeline-sides .timeline-item-left{-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-left:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:calc(50% - (32px + 10px)/ 2 - 50px);margin-right:0}.timeline-sides .timeline-item-left .timeline-item-date{text-align:right}.timeline-sides .timeline-item-right{margin-right:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:calc(50% - (32px + 10px)/ 2 - 50px);margin-left:0}.timeline-sides .timeline-item-right .timeline-item-date{text-align:left}@media (min-width:768px){.tablet-sides .timeline-item{margin-right:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:calc(50% - (32px + 10px)/ 2 - 50px);margin-left:0}.tablet-sides .timeline-item .timeline-item-date{text-align:left}.tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n){-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-left:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:calc(50% - (32px + 10px)/ 2 - 50px);margin-right:0}.tablet-sides .timeline-item:not(.timeline-item-right):nth-child(2n) .timeline-item-date{text-align:right}.tablet-sides .timeline-item-left{-webkit-box-direction:reverse;-moz-box-direction:reverse;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;margin-left:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-left:calc(50% - (32px + 10px)/ 2 - 50px);margin-right:0}.tablet-sides .timeline-item-left .timeline-item-date{text-align:right}.tablet-sides .timeline-item-right{margin-right:-moz-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:-webkit-calc(50% - (32px + 10px)/ 2 - 50px);margin-right:calc(50% - (32px + 10px)/ 2 - 50px);margin-left:0}.tablet-sides .timeline-item-right .timeline-item-date{text-align:left}}.timeline-horizontal .timeline-item-date{text-align:right} \ No newline at end of file diff --git a/examples/comebacklater b/bower_components/framework7/dist/css/my-app.css similarity index 100% rename from examples/comebacklater rename to bower_components/framework7/dist/css/my-app.css diff --git a/bower_components/framework7/dist/form.html b/bower_components/framework7/dist/form.html new file mode 100644 index 00000000..be9e37d8 --- /dev/null +++ b/bower_components/framework7/dist/form.html @@ -0,0 +1,215 @@ + + + + +
      + +
      + +
      +
      Form Example
      +
      +
        +
      • +
        +
        +
        Name
        +
        + +
        +
        +
        +
      • +
      • +
        +
        +
        E-mail
        +
        + +
        +
        +
        +
      • +
      • +
        +
        +
        URL
        +
        + +
        +
        +
        +
      • +
      • +
        +
        +
        Password
        +
        + +
        +
        +
        +
      • +
      • +
        +
        +
        Phone
        +
        + +
        +
        +
        +
      • +
      • +
        +
        +
        Gender
        +
        + +
        +
        +
        +
      • +
      • +
        +
        +
        Birth date
        +
        + +
        +
        +
        +
      • +
      • +
        +
        +
        Switch
        +
        + +
        +
        +
        +
      • +
      • +
        +
        +
        Slider
        +
        +
        + +
        +
        +
        +
        +
      • +
      • +
        +
        +
        Textarea
        +
        + +
        +
        +
        +
      • +
      +
      +
      +
      + +
      + +
      +
      +
      +
      Checkbox group
      +
      +
        +
      • + +
      • +
      • + +
      • +
      • + +
      • +
      • + +
      • +
      +
      +
      Radio buttons group
      +
      +
        +
      • + +
      • +
      • + +
      • +
      • + +
      • +
      • + +
      • +
      +
      +
      +
      +
      \ No newline at end of file diff --git a/bower_components/framework7/dist/img/i-f7-ios.png b/bower_components/framework7/dist/img/i-f7-ios.png new file mode 100644 index 0000000000000000000000000000000000000000..10753551ac9437c5e4df017fccda0b9c8227ef6b GIT binary patch literal 7289 zcmaKRbyQUE+BVG~pp>*Y46O`34Ba6hozlZFGz<(w3l2kwNJ$DJCDPqWOQh|d4WO#f)IWIVSZr&u#m8Xh=7EM5b!?-=++v_)=olC zN##GbZttW)4rsKy1V6uzj}M=ZFdq_S&o3x0F3v9?#4jWSzSRJG`njQDzF;>`wtpCu z5T0<9qdVFW=?47E2(v+Yp`}5$p8h)oS9eX#{}Q`-{wGnlDdYErx$_J13GlnR{*CKj z+MZ}V#Q%5Wf7SLh@N-A->mfXmUMTo&J?z;20pI5C|2Fhj@zxs&ZIt6}QD81gNVu0P z!VRsaBn`TK!e{GfD7lT0%0zwcwVbFi@w*Mo0|L)RT z$!#R=|2QNeDl9BwCuk>lO9Y331qGpEU~#CJ4H#~RuoVy!uoD&(vjy?ry2$^xasEdm z{Uf^V&cECLj>YZGe+LWUb~{a|+p!tIsXM~Kp^sKmk~i@E*=erP$7}4dEphes~1E-xBjIG?Ap1dQ|BMZzT{ zJtroDJ#lr1j%-9%S4Ve<{oIhqli4UqE^14@Pu$0l$*Y{<2s+Xl&o9;VZ~YDr{br~i&_k%Pv-D#A_RDfl=xOmMZ+ooG`02;2B6*y5XUT#R6T7TM2W zudYfdH!@{PM@cPQv$DA3&P`0!BfM@QlgF9bYn0(xra%pcEf2jmsbOfo;|DmIwkH03 z9pDSTJyhm3OZ!Bppl#H5Vr5(;){`{aZ7JQ zI|P7USTUwsNp%vhn^Adtqv)gXeS(#H7>a;Tjg2n?(d3A0H7x9V-$D9S=f>8AEWDG& zCJXSHDo02SFD{<=R}|}OX(}rwg;wn)!9!!EEU4=5gERak8=HG4)D}1GNzeB|q&N zBZZ0dYr(^dFCI-H^XpKj!^%I=hN1TvYm1(p40SnM|Hid&*HFVk2Um4wogTzEZkTuj zyGj4x=*dy6J-Eve12w4_F$k4pjKL`&&23lS=?E^cw+GlQ_mmxPKV-12H&?g=u)rh0taju$vh&7O4fjv@>&NUNI`k^I*>lCkW=@2P zhQ}3yPVV2k&O|-IDQKC0eTgb zYNkr(g@x~4ejkopuu1C?Dx&Zc#XswE&?5O96GlZ3>7yvBM@7;$<7Zf#yJ~KI@B!5& zxZ+xvHauZ`uE3(E`=I#Oc#jqQ zs}1Gp+VF{WjjR@FVp1j1gCp-w=F9y}?hos^f1LWbe&XfG?YMl3)yZXeA~eau6s2YG8Fu6wKjYsec#=(#x9uxm#jjA zw2lb>I$UdSwB_5+1MmBj!@YPp3W*K*NYQB zEm_%%1m4@u`FT zn9`q^GQGm|I_%Usmd1puT8)4OLM>aOU+k5!I>Z{QVVa>uhnwN0RfFu})zr9<370gY zYU*LvHlnt3tvy;A(K_%ffxuBfL7_vN$KCz+?t z(O;AJMr(VgvCtjq62}vNO{WRjE63}(favMqv^KCD=%3Cv9ua1vL%s86Hl;tOXf|O{+j0aJX8y94jBN6VJ8g;%dFSSsLj<%bVjNbUW*gbUH_TBd zFfv0(_-gl%RDXOBU9?(=7P!}X@Ssipe7n&{_O$(~)MG2wXxEb1K*@EOhKzIQY^12` zd{vt$$7fEy`s(x98bNn?i^TaNU2ku1{`}>NhXwsSFO;ZNtHgUR40tD`LUK^ql_@Ev zC~GXgzcl{iBmNqe;e$ch)ANbFU;7vHJ}=Hkt|V$3t!qF;#qIi~lOrI)$fp!(Sr{7M zc@gIK@oXPg(l#T3G?0a=_PY-QPZ}{HXJ$z7i#^gGkj<>vrje`xtnWcmNzPM@GsCgN zbUOJYB$XS5j=k>Xl=oq#i2F2{hrWq7@Cnv<%yX~xeC*nDupKgYx%={d;JBvrbXf}C zMh^#a%A$a(knm2PhtFE}H$sn596Tq#gkMAlP10~6g> zt83KFLFPOaPD#2CbKjP1p#5*UQ6!9|ZiZKrn_4np3o?mE^J`mG_U8ayFll?a2JUcd zEm^OoHe zC5;YV$%=#;UKWxL!<^b^*92oLVf@0v*{jp9r3tW!>31YhT?TFX6g~sZ zx9XADNysHFIv5g+tF8N4QQ1W_q3P_q_K(b)8EPtprR>oq+xKRXfn+$KO!>RMk6R#v z&;9p*r0l}3kIkMR1q@Gu)pCAESfswor91Rb=bt`KE#dC?*~U?}uBK7ZqO%igG1^`J z>VWsDjq&nU#q`}EbB#zFbTZXjD`>?N9%b*ShTl{Lm5uQoDL2E9zbwwr<2dz*PTH^m z(5i+gxvI(0omVB(cMhh7;{s<$I2*n@yus<^Gf(*DD7Hr6xxx7Y1b>;7O;9ud=H8lb zNgE9T=v6k(GI76cy1W<9(cIK`y`(v8wmaKtm`-jwv?L+9?81|1?3C%Y15_pe(eYMH zp&22~7F}kOv;(*DF>+$aXuMZu9#wT9Oj$%Y@Fe2qRfHV``BB;BhXR2SN4 zoht-n4vfbw#RC_uzt)*&q+R2@=E9Aqb4Dy_@{kennHkyXd9uy;8q0mraTMN!BkGZB z&&v&mDmD8ZhJu(n^gtV2eD93^7~PB;JS2K?6OVMcM&9If%+AQYDQ>WaPYS7}d{mG| zOqK~&L>7rL9{zr&8>-TpXHg#pu{A_3I(z_T@DH=0%NghWA?}7gsqRHwn5WJY`z%eT z^(ddu-{#K-qcve|AGL>ht zPPaOMzoLf-%cWOJ>*TWg!jESZHSqTH*^5n2UtqvZvpPX`q_wo)jb937VdpFrHqK(2 zN!~YBj75?c3`9l)u01;5a2q!)dQlnuku-?0pdEc3A|(0E%FUdB^l~!($0(VqTac;^ zfNzbf>Nip%1aqHMg288J$FeNm=V1_zPGWl^y*4$ed4+uXY|jrHl_e5__G-ys&g2ma zsyw`?52h1$YJ%yfcm>$Fn17t%OqnH)fX7KagW7qvifd0rUz;+w%RIVgyAK!ulOa!^7p&)Bi;y`exrw_vk&FyrUOwL$w-MWdx{>FkuKMKM{Xm)EazlvluAV0H z*pK*w2ff#x7EU2dUb^ry#ANZjOnd5!thjyF0E-uQQBmI`fqTWx40vH21|v~ii?aFp z*{?im-WyHM#$Fg_7CztJk;OX##@H4$Vwc9!6HIk_|0q$1S`Ar8%prFE9Nx7pZ0EEE zf79&R!+Z|Q!F8mMag7rjZ_}azmu%?Si7Q_U%?qc&h#@Omrc$tcD&L0PZ*t!#)t;51BZVslv#_LI?9Dn z?UIF9x9f~GLj0X@fgAgUZnEdj*0UoWmQ-zJIj_61NEG3gx~%bVkS@{sm#?j(59L%h z6J+B_LIhTx*J;7l(DyAAZm;yXFXaV zzSdZxJWuWfTq<(~ z)iHasIqUNXa=nJX7UppKD!=3QyLy=U8{UwZ$SSpWuhTu4;l^*qj`yx+l4#8G6d(ER1|KNcHg~v4_o9Cp%ZV%fW|RqO zFqSSGIvBE(cvm(6>scWo`1kKU*2j}9dj8z>k8P}}Pk0(3)=CC`fW9>ELSl(FM_svENs zm&f>da~3Go4{w;&J^HlW*ez(&hy+7eD|lqnJi-xT^LWbzkY{ZaonAE3Rq=tlev_#0 zb@uVECY47i1^%QWhOv#0VVc>60z;$ZChhBdgo^oU^K0FWojmSPD3R}{9 z6Z8OIynZ?fidQ6UYj?(ExG$}f6c1BHG=6*a0T!#1@hfyCNfS-R5>sfT^$7rRkehB} z9}$0cUAg4CW#K~?%G)WjEYm93%VSn3&ep$QhXw4R+wt8kq(O{oI(@bb*;8=JHA1;p>8#I~OSw;I<7Z~;<^g#F0b)(2l*`-xGvkjF92xV2`5H7cBB7M>p-HfS zZ4M@lbdfUD8`<~8c5@sa{aVlBSm``WMKFC2F-MHq*amz12TXjfBvm18Qk|c}*gw-L zpYPV%IC>e3SXwzX)G@KSplI8*yzj|n@Z09Q#-Dy}lofGq4;rKXletC@eKx@jJ5Pkw zU(noG^St+@pAuMZtD|Y(I`TT*&BlF-Hck(VxbN``R1griVjD=wbfA5^9Z|{-qLR{4yyNw>*jjU8zp_&d&pBe-Bcp)UPGz0JU_3=Phj7{WDum@;6Xje{M zOu23+V*4)h!d}xZ$YCbzV?q)3Q#pO0)dLFBIt(DKOMm!Jfg)SFv)aPaxYWRV56Lh! z-3n#Sn5ifXA@#-dy(p6YkeBM4+k=`LbBqIbjvu!+`r%IOmA00q4lmp1G{~O1*4Z->Ok;ZI%tL09ab-{GiWHjf=N7;`<&LLfTGd#mG zvoI=oU_~-|GlUrEa=iazR0#+CEuBF3JuIFfMuB4a-D9&v&$!+nFFQI%m@Ef6UcdBL zD0Sid5*UuHmNHpBc~?JQNgVZUAKbVmN>J!E!pkvDlr>7__q(etRh5o{L&vO zU+f`e-_VHeT>U0BOM6z-3RgV&Rg^~=?9hgF@n@R5Z(U;g&h%AVco89>N5p<+_o+g3 zctz&^22Z1A6wcJ(h_y)ED2cNQfQ(TpjpZtg-MDIW$ASXWfNjusO`o%;29>)W4FeY1~JChUOC2JHY zPRU4Ua}lu#Anwbr>cU%jkad8b+C-5z%?%lvH@<{&Bp>BaDl$){j-mCVgcv;DgYGH;GfEG4*aY{b!O7? zD}rULdsx`{fbgo*x=MN;8BWk_ci_a^I}cT^;Ao%Zu8`>Elr(enj4Oe z6sDi>*v3{Zw)}==`?>I?{e8!Y!B1!&vGCIuk-IXy&?T=G#SrARn*M zo}W^rm$(mBRBD5rHo%R2!F9LaZpcZqsboBv!t-R~;?r~&->-W6e;pDtN>M_88=rX+ z>nW;5WZi{ruV{J>(nvkL3x!3A@Z>aXsz%5!_-hu5cgs<<-!zdKwhpibgjJ}giQ%8C zTm`4kQ$nc)W?XgEBio%y4V(%qFMF6eGL@U3Q*@J%yNJ`U!Gl4;FC3E1Y(E?8ErYR^ zA0Op*zoeaM5!QJl-deEHT7!zTw?E$J0mM7C3xc?p*wyi7TLghAM^e;DR{6ig7OPfl z3VuF+bYL*_W-)1y(+0+YYeVSRc|3J^!S{-C>To}sp=YI0CKbes66We}sqDY{MVr(% z&~T{A`)T4zkxEV#Y|V4%D6bhbyRol^%Om2%TBFaf^ttEGRnHRlj<~6N5=br%SDx1* zLN{YiFDNZHNGZ;FiU@hJSqYvzXOKJF6OmKk*PP7bDAmRxOr%k61$eVo$*Akxr~Wx* z;EgH8i&9~+iULQ(*Q6ZjV|>Igs`RuI+6xajREoSgX1NH%TE%uao^=M7?vM#Ql}_Oe z(3lDU7CY689(as=Dm69pDry90+bq^p@9#am~9 zn^6gqRSd1O{b}TQIMMsji2P?qxG^^C*l0Q+F2lgRbdjJ3c literal 0 HcmV?d00001 diff --git a/bower_components/framework7/dist/img/i-f7-material.png b/bower_components/framework7/dist/img/i-f7-material.png new file mode 100644 index 0000000000000000000000000000000000000000..aa306df214710d2dfc2b2c63f9dee35e4d4b58ca GIT binary patch literal 8995 zcmaKSbyQT}+CL3SHxfE@GYrkZ(5-~hB}~yhL#LD=-6f!eNH>zwU6KMrNC`*@hzKbB z@ZS5qzxR)Ky=Sd+_TJBaK2JYuowd)2*3(fZz0Y_b3k!=>Q$yw1-Dv&yCc?RUI$wQp zy&E2&RZYbP(&0gCJYu60sQA;yVK@@umL|) zQTvasyA_1Z4vlsL1A*S&-a_7@LarXRK#;VwG*DOsC?XAziYcGK4WuV5F{e*$$EGN2FC4G0nv20AtjkSJGA5BOa^Y}o$+-^K3#R`i$g&Kj_;hy7hrpiU~Ta8GBX z3tCeJ!gjYKgs?||LCT6!B4TQ)YSNO*Adsq9~u7}R!U7w z7^EgF1yU0IixrnrR8~?|k`|Rvl@b;eQ3Cyg)pS9jp)PRbKYH!&^!^7c`F~=;${t84 z+SS9r)z#^r3edB2MZ2QxT-^Z5%6~I12H??#!tGuD5_$h7>EAx9AU*88kO(yoS7*S# zq71hGU#x&iionFhr9=hA5eP{^F)8?8ePXF5$cZ>fv7SiRen>_B?CL-PY5DV*(q^63ZfzQ&irFn&bx@V>39Apypwf(rU zyFC<_Y~Tf6k_KgZ!4@}Ow{B>vE`{%+7RB%Hl>J0W8YW5rR?gbrVKl!K*e(^ZQ^|`s z-ta`T5mU*;Yg1rjzU=!S`%V^?JTf$GD|<8tfuO#=c6`m#yDR*mq@>O7eAThK!_hb= z$nEw|kN?!ycMlRGKpQ>uKS5kREBoQ|d*s19sZ=WEKR;&^;4U88aC6fi_)ht1@_sx2 zf#y5!b zQ#u68-#VP@-X>UfUPfc#VIIU;Z!JzGq0$e&e|j*hyBzg8S7KFucxIUYjq)G41&%h) z(PX+4^O1vJ439VhwD&VmpQLEWOdjfMaRI*P{sA1kWaj#S8TA(}A`$w-RLl`|xI2U} zRdwnbVhHr%@%Fwn580MzdI$}C%vu2GdcaF^X@S)b#+M*=BFEv=8UKXH($sH1>9)kQ za+}FvHMaTNhs^$Ll9rb|^F`s!$77KST?G@=tofGbC|DqMc94s*TNjI+C2UvK@# zf7F|H7IpoTZ@(YlWTzYpw^9y4ak;TpuYdJ!!-`tL>+In)9k9Qx#55n&nANLfk1s$J zGnklC-!XpY9PSUYRVSXrshA)WQk)Lx{^WDyQV~Q6vSr7MRclnJ-~B%CX6@pEqNc}E zSnuqq#f-$XgbWMR#hzbETXC};%+uw=+(~Za4{g8W7NWeq5&%9o1WPk-o2| z2)gIMKvqADutaOgfWd4Fl$qrXg`wyyd{*%=tituJ0n0J)r{=(UW2*F?OQHPS?ra5` ziq94YXRfq03oCOq8{pn5!cX&bw*2w*LcZilz9%i9ci>GoG4#bq==tf$8ZwAb9|=@r z3^~EVr^jaI@AXpHQ7DnijM0qQqrM5{ZwcL&A+;~f7Ut@+_u03`+SuYCGq@4~&-yWd zBwu85QGc}UczDM0>BV7RZ6qsjx$FxpBvKi7$Ba^Ze!Z|>)Q!V!{hD9^8}V@>pqN^3 zcmPNH<%xpAVo!*v5%b8?(U74Fk*89b9dpn8ME&KxHkp%8GS{ll`I zuRs_oNa8C-6y>unfmO)gcF4kY@`cogu0kqaalt2yu3Kv$!>9km*d7+&U6U*GBngx) z93DGerDuN`waNJVHn;=_fwEp^RY4ER)a>r1u5^x*ZSje!{Wj~31tRRE=<6Ar7Fg~} zSBgLS__8{Ha(apE6NuB*WWpvE5cyd!b8%P4NNSlt&Zx7iqx=tw}OHZr5T6{W(E<99xF@+v!8A=1Sw%c}BoAL{B zJ*gtYZacbYnQpib*m)Us1OTW{dT%^eSj=a)$ATUXnK--KuUeL9=ymQ_SiiQtl>gC7 zmyB7A-RH=o9G<7*7N``cUXH%}9-{TlG&HHUUNUxy6Zq>{d#~54eXCrjuxB-4{MK|O zMCqCWKZj*DzfOdai}afaTBSSs1}Km=(`1;DaC~uK^@=RLM%KXS_1pOoF>A2fnd9K# zi!594W5CyIXMVT+_tFOgkqNU7yb4Wpn*)AGmppHG^rpCADt0Iqo~IcmL$DuGL*q1Nh^lsybNiLy9S_|m)*O7Y|7gJ7OxKTr zrSB8%u0XRau_MPLBHPg(S==oyf~te(TD+CGC$B!ban^z+xiu|fU++^iCpJ2lz}R*} zV9$#LU#&OSRPp2D_0}3`Z=?ljI;u|&x^KK%u8An$lOhsp7ceA@X_cH5KI-Zemg+km zmi$NwIj50O8Q?&^BJnu4ND$JO;5hDWyl7Wv#i6M_v&|O-X~p_>XBwB-m&B51bmB2k zw%O9)ACd${Y`o3zZ5h5k*-XgDNjRAl(EoLRsw~mC5?(FQ>XiiJ*jm3`nhcs(-`SfC zJQ|??sJCKW{MD>eIA>+%1+69Tu_x9#O-w!G69t!%y%Apty)MJK$=1SIu4gqyfOO}+ zKi;VD^Fu;%2>Q>;@y{vW^~swGB|=FCu#RKRP=c&nD;mHX8yvm^S2ZolA>EJIf{N+!gPs`19Wly$V%5emEg@yUMNy)W>)r3>M=-a4q zJkB;oNhuiCD?h80q}mLGSNqK|$)9B<`wdJ&E@su`&G-|RN||n7B0!-cS0`!0F!_)V zO(y5LsZthm9ucIBxFU?S0V<;_m9>9J^KX89X{`3lpV|8%^XO9JbR#C{B=cM6IVhB+ z!^bq%X?mi6fUd2z4#(rBQ7s-v1cx)rGeOHc_yCSM_EB%yUX!~y*-O!_QYfi?YAVy} z?kiJZgPTUpn^DFgFyvMLFv3}*g@nDVu>O4YV)d+>Jl*``_2uNFpl$yBLS-*qO|*Ti z0GT3cU|{0VvSY+}!ca(`Iq!&J$-ZB7a^roxK+JsGksmxaGx&R{uAp*>;WMLiK=Vrw zkaPGPu$!ucMn1}4_XP#Z4e3yqc~Es2a`~(^&9XX6PyE8ETwaS9^5C0uS;JCCEJl+O zPtR%rgdVP3FTgoL>K|NXU@nR!O9s~ps=t9B0MX5=Xi~=MXhV+Tsd}dCW?oXr50uW_z<8y0-C89vW#DJf<#bOWW z85zaZh?uW03{WvFw2}e8zJy%_e8Jt8n+*Q5|0a(MY{ZznqY{%S?VswoM-tPKh9uPT ztT?KUoE^GJz3(t&3hXjMA;~<%duel_kC!a2?oVgvykZKgUi&`8zWu?i>KJmhTWn$~ zKw%Ci{55nafDwJSPj3GfEI|KQ+KXF%IC{X}GZR?+>096uLRWW~W%;4z_W|SJ)097- z+uyyiNPwiTHcvI=PV+f`oG+86Cw$&BSPY_4H_c9^$8bfMdDPm3*(m!|DvVH$N5n|b zl}q&>S!!xH61oO{IlAcV{C%^PW&8YUgTC}R)_XN*={T>C!>1nwX-{tiDLgUm+~hN2 z!)=Z^RJ}t4q7QC(@jZ#Dh;f1~bIn^I1(U`xj` zDnTh(e(Qdmm z*X8%b@y}HY)vDW@a-h1dd;|~xH79N5EB5!jEqE&m>Y*P_wMBEM1tgG!_PVFr1l(^6 zD`fXCDKFnz=hLA3`9|t0LYgCho7GJ5@WvUrpwlq4|M^1<-paPcB;+T(4qFRG z=lQ5^45PpjWj_v>lX!H)A^_~6&M^q(20vbjc>Gb!I46S>>?9{pWUW|tIu*0Zk@G4^ zT$Q3ija%Joz2nlKd^pIEul?k_8Y%g_p|rZ=;p@i|;*zvDgNsQGL5k09CU<@0(#YQ^ zaled}Hjk>OVt3j*8A~`f-#+5*b!@2IBq*~l9bJ_Q)Pv(2+d8~uEin+T;@riPN8Rp9 z2GuV^M@7;1}ien#oc54saXV@siNKDP43nznU!sQ@v3iz;WZ^7)dE0fn6IXqseY!#1 z9HIzGtr_Q=DWmuJprqIHQaE+{efE07Qr*TWzo?G>%01Fp&8~hAp_w}N`-DSHXIjdJaJNVSR0z)LJoTIPg zYM&bC%@sLQX}nJ98`8~IP8G&RL~J5q~FQiJ2s#&94p=@9<qa!N&V8t~&A{4hlMXn5iIZ);LoTN&N>S`I1k|Be#%QA@z}MET7PzLIw0?2XYR=gcFtKtnX46Je|8&o zQWfP1GgO}pEHWmbNlWO;Oe$m5CigyPG7cD+bieT#r8Z^q3rdo{uNqEYs2K32ugXTl zRaZ5BeK=vh0bE0x*au;0>#1snOG({%;ZBbpI&`Mf@){h3)Y~&IQ~`ti_ss=lB$b~=3i1`D2a9R!kVCc#MFVeI_T+Ds<#v}JoDvUVrxgH^Uz&TBx;_$o_-5vK zs*$1+L;*>VD%gDGWWqCC#N5;ntth0}_BKnql<2nZKF>B`1p9;vch}3MpYs>6SX2=a zYq9MZ^NLUo2knaPG$!st%sTK^YrOO3h{&@#|AVGf2~lJJ{&m6#t2B;h zZ2~E-F&@){AC>b{_>XB`dOjU1a#%<))sig*zOpFlcTaRHN`2SlsaMTg>gWm|^@`#s zfit=!CQCciO*6IQw_lq-(rarJ$NJFuBf~KDq%JX=aUhK!7Q0Nh-}f`N1w~04F+cs* znsO>O&_=3=*{Eb9m)msX*sBGK{q-FpEnWahH!Zd7=0l6N=$b6fUCMYMh3HlipP*piz-+gENM5ldVi+*}6gG=$tjKh_=tC--A1fS&pz=^>@ zEFEOj$XPi26h>2_nKId@WFXC#W6{T-F>9CN(-~SH_cW)yVXg>u+DNs9FTQ0o%u9qY zE%1Xtq+K=Y3@fP?l@102WgeBUuuMgxbg<9jBvh%qgU>(znN7vMTC&R6w4c}fQ`9Ze zpjjzESl;uDRCjOdlRdou`MMg?=4pCv3B09+(#a+BO!OUJCdvDfnJI4d{*m7!W)&}H zzk0_Kp9Q?RjBWDjb6U>JNV?#!`@~UT^qCJRtX;PWXQ=6ZNI`CH-frP2ad>lp`D3Zu z`A5ZTe~|vIet_1Z2{XaMY%RBK>`?v28!9Uyb)I@@QR$Rk?NF9=Emq>Bme&vIWoE+- zt+zBt>&kMoJ#D96=D4#nRU4`pDeq8sZuiC zrK7FRyez(pw0n8O4a|tDaHW;RxNaJITiKMtB(JTy3e3>@;z?Dn*eLU*h4s)GY5?(x zamD)&<3+>u&G|(z@kn8lTpSKl8>Gqeqk^;q=j37Yz}v-}(MEJrsDP|n1)BF|9E26H zIfQ2+*kFju*MKwmFtg=;-6p%c0K#g9U{h&vCGQ9AFyGh3``#Aw7TC?KF z7D|rK?~3GBU;aVn4v{}>-*&zcI$1y5Ee&qW5;HI2b%4F&c`v1E%VzHWWkj3jOG$s@ znXZ5d>xGA~)>b_2BBwjl@Md13Agn|oI5G3;7hN@dw=P%7Ps#XZKm|e~&4%sF7epEj zC|(+>2>tQZxmhNdPaOl!q8EX`@a`LF?3Oj9dtd21Wa<)ls9-lXXEz(@Nc!ePRJU!I z=~VP%a_I8O=Batci*%*QLqQ)MtdVesnrQP_zl9gi9g;<_GjsEFRY61 zaQluBre|x48itPW<8tYja=-dr7kS-9t!{rq65&x;#{~wO_?B|jQ3m=Ca@0P^$3(oF z=0F8{Ot)N&i-+W0HBlh%6VmSQy_A*ggjlT%6 z(u4f1{x{4nrIQJu5Nq$jF^&AErR1Rm-UxVq#8Q&8esNE^2+;;=X+f++eaxfu+_|2S zWxQl%MHMgnaI5^+*+?GQ+NlEkVpnF(0~YGAf8?|fF90@#&W`4de8b;fUmO&wxsXR$ zuIDCRF;R`lK{oC2InM|P_m+xC2yahn_1aYY2bg0*Yv`|wBIMvAM&_pY*fnvsSQ=!k zRa|W8^k-z4iHE5)G=$sxA9C5h(?-aj&)giP-1^N6)<#s;s>ih7?uvNuvBs(PRfuS44HNvS4@zy7zT{Pr#g;eq0l>y0=)_ zVtZN7VWi#u?O0n#{IFqF?q?3^-SXTOH@GtL-hP)9?CePtZcKiZ$$dibRk*T|mj{Vm zXfBInDNDm+1g{8|ikge9FBF$yoI3D2mE~~D&HfY`ZE?|iMr&CDs@}OW}6;p*HEEE)NA$#zhozh3~ zxAaC>UApyg*>EM**G1&sxc8;W`>Z^K@}{8?rPjp4d+`%rb`+vq{7i%vIvm!<#Jh0dKY7|8>PSG8Ntv3X0j^OJ z;>Ncere4&OXgbd|#zs)^3h;``To25=)>`WHO0pdom(%Pa+a3W|m`Q!3+CM000DJel z-B1>yoWd)%aH?(OI(`V+LtPj;h3 zj%teP43+)1&33qP3qMp9#Qcc@W8Uhbb`+(0*RjrOs}a$&s_ z8xDU$8v;%0ql_>4nW`Kj^(5rBFZW=DG>rzS?e~5yzMg(UINcbx@T^ixJW7bTug4wn zI76l6v;8(H8>++e6Ao7 zkh5`1`EPJrVx|2kQqI)$g&EICqKhVLmE-RL{UUA*Bsp*i1IZmd_9 z7?~RX#21l(w(6BMmQ|SCNLq>MK>+XV>doN=bMceZbnjn5t?5kbTpL&z7lc}uupU^)Or`dkiX9JlszyG$cm}9M#J-J)T%tayBkJiAgdL?~sm-?09WDN?>8n{ekY2 z{V}Q6Pm$bcDN*0y(x4fq(81gMa9$x{jj*yUGi7z8X`;fHYCkk}fxtnqqwC%A!Fa-O zlbJgw=iX=sF3JyPlcI&!h#pPmN8;pa_8B4;lMD4%OE&V}Lob$h4W*0@eJVNMHaQ@o zbsm?yP1s#pcrm(}6A9OOio14XZs-0AEiqe+#8}^UjqTL;ZrT@|M&IW&ef03rDe9f1 zdXrswhW0?@GZGH%13$vW0q(f58JjH_qja3@$e!M5iJIzp8pW!-AoYu5%%`_kg+hF( zFP`%4ARfu_?eAK&1C$S0c75?6g18aQ61lXW*;}a6Syr)ZQM2A^b-Qo+o}`T@O|JOw@H?Mi=XR2(7Bfb9wp#--f>*#Yevs9FGKhnJv5`w z{ieke=kBX>af5BVe7pVEq~*2&(a%+HtRfiZWj2YP@DjX=Toq6%Km0YKxkT8n&Bk=T zubnk3VR$GMC{ZY7`U6%rt|DQEjC|ZjfZr_P);RTZzGylNay$D(!DCjCMkdI zgXB`AV+R$+eJr){H9hPb-aFyg+w0~z@H{I~25Xv<;dmAGS>z!3x9OtqefTX)RmfVd ztxvrmmNzUl*TBeP?!WcTjDo=b^AD%{ZyhZfKU8gorcvh39*INp_v&XnPXz{sbSz1) zF3a$)#U6@hv8hMfi4=DPiZ5erfa8DdA+0Ubyu&>Yx@?vjkg_c~Nac-yt!B`)|@MUU@sm0p*Yp;>OjLux4-RFz3La{uQxk@##dktzw@oGmuw@>dB z0{v=u+nrqH zi5g8+_##zjJ$|L%2r8z!0>6{d4gtQb7xMyzv1_r%0kg|$+->jZGe7RD9At_a&CD*$ z61Oe#5e(<;iUh=YD*A4aK03B;=tYw1-LiLKA*SnOLd^#~|Nge3sj8z=rDPrY{{YmW B!LR@T literal 0 HcmV?d00001 diff --git a/bower_components/framework7/dist/index.html b/bower_components/framework7/dist/index.html new file mode 100644 index 00000000..728fb890 --- /dev/null +++ b/bower_components/framework7/dist/index.html @@ -0,0 +1,103 @@ + + + + + + + + My App + + + + + + + + +
      + +
      + +
      +
      +

      Left panel content goes here

      +
      +
      + +
      +
      +

      Right panel content goes here

      +
      +
      + +
      + +
      + + + + + + +
      +
      + + + + + + \ No newline at end of file diff --git a/bower_components/framework7/dist/js/framework7.js b/bower_components/framework7/dist/js/framework7.js new file mode 100644 index 00000000..4f1138ec --- /dev/null +++ b/bower_components/framework7/dist/js/framework7.js @@ -0,0 +1,18381 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +/** + * Dom7 1.6.2 + * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API + * http://framework7.io/docs/dom.html + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 11, 2017 + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.Dom7 = factory()); +}(this, (function () { 'use strict'; + +var Dom7 = function Dom7(arr) { + var self = this; + // Create array-like object + for (var i = 0; i < arr.length; i += 1) { + self[i] = arr[i]; + } + self.length = arr.length; + // Return collection with methods + return this; +}; + +function $(selector, context) { + var arr = []; + var i = 0; + if (selector && !context) { + if (selector instanceof Dom7) { + return selector; + } + } + if (selector) { + // String + if (typeof selector === 'string') { + var els; + var tempParent; + var html = selector.trim(); + if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) { + var toCreate = 'div'; + if (html.indexOf(':~]/)) { + // Pure ID selector + els = [document.getElementById(selector.trim().split('#')[1])]; + } else { + // Other selectors + els = (context || document).querySelectorAll(selector.trim()); + } + for (i = 0; i < els.length; i += 1) { + if (els[i]) { arr.push(els[i]); } + } + } + } else if (selector.nodeType || selector === window || selector === document) { + // Node/element + arr.push(selector); + } else if (selector.length > 0 && selector[0].nodeType) { + // Array of elements or instance of Dom + for (i = 0; i < selector.length; i += 1) { + arr.push(selector[i]); + } + } + } + return new Dom7(arr); +} + +// Remove Diacritics +var defaultDiacriticsRemovalap = [ + { base: 'A', letters: '\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F' }, + { base: 'AA', letters: '\uA732' }, + { base: 'AE', letters: '\u00C6\u01FC\u01E2' }, + { base: 'AO', letters: '\uA734' }, + { base: 'AU', letters: '\uA736' }, + { base: 'AV', letters: '\uA738\uA73A' }, + { base: 'AY', letters: '\uA73C' }, + { base: 'B', letters: '\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181' }, + { base: 'C', letters: '\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E' }, + { base: 'D', letters: '\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779' }, + { base: 'DZ', letters: '\u01F1\u01C4' }, + { base: 'Dz', letters: '\u01F2\u01C5' }, + { base: 'E', letters: '\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E' }, + { base: 'F', letters: '\u0046\u24BB\uFF26\u1E1E\u0191\uA77B' }, + { base: 'G', letters: '\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E' }, + { base: 'H', letters: '\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D' }, + { base: 'I', letters: '\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197' }, + { base: 'J', letters: '\u004A\u24BF\uFF2A\u0134\u0248' }, + { base: 'K', letters: '\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2' }, + { base: 'L', letters: '\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780' }, + { base: 'LJ', letters: '\u01C7' }, + { base: 'Lj', letters: '\u01C8' }, + { base: 'M', letters: '\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C' }, + { base: 'N', letters: '\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4' }, + { base: 'NJ', letters: '\u01CA' }, + { base: 'Nj', letters: '\u01CB' }, + { base: 'O', letters: '\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C' }, + { base: 'OI', letters: '\u01A2' }, + { base: 'OO', letters: '\uA74E' }, + { base: 'OU', letters: '\u0222' }, + { base: 'OE', letters: '\u008C\u0152' }, + { base: 'oe', letters: '\u009C\u0153' }, + { base: 'P', letters: '\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754' }, + { base: 'Q', letters: '\u0051\u24C6\uFF31\uA756\uA758\u024A' }, + { base: 'R', letters: '\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782' }, + { base: 'S', letters: '\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784' }, + { base: 'T', letters: '\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786' }, + { base: 'TZ', letters: '\uA728' }, + { base: 'U', letters: '\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244' }, + { base: 'V', letters: '\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245' }, + { base: 'VY', letters: '\uA760' }, + { base: 'W', letters: '\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72' }, + { base: 'X', letters: '\u0058\u24CD\uFF38\u1E8A\u1E8C' }, + { base: 'Y', letters: '\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE' }, + { base: 'Z', letters: '\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762' }, + { base: 'a', letters: '\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250' }, + { base: 'aa', letters: '\uA733' }, + { base: 'ae', letters: '\u00E6\u01FD\u01E3' }, + { base: 'ao', letters: '\uA735' }, + { base: 'au', letters: '\uA737' }, + { base: 'av', letters: '\uA739\uA73B' }, + { base: 'ay', letters: '\uA73D' }, + { base: 'b', letters: '\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253' }, + { base: 'c', letters: '\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184' }, + { base: 'd', letters: '\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A' }, + { base: 'dz', letters: '\u01F3\u01C6' }, + { base: 'e', letters: '\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD' }, + { base: 'f', letters: '\u0066\u24D5\uFF46\u1E1F\u0192\uA77C' }, + { base: 'g', letters: '\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F' }, + { base: 'h', letters: '\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265' }, + { base: 'hv', letters: '\u0195' }, + { base: 'i', letters: '\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131' }, + { base: 'j', letters: '\u006A\u24D9\uFF4A\u0135\u01F0\u0249' }, + { base: 'k', letters: '\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3' }, + { base: 'l', letters: '\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747' }, + { base: 'lj', letters: '\u01C9' }, + { base: 'm', letters: '\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F' }, + { base: 'n', letters: '\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5' }, + { base: 'nj', letters: '\u01CC' }, + { base: 'o', letters: '\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275' }, + { base: 'oi', letters: '\u01A3' }, + { base: 'ou', letters: '\u0223' }, + { base: 'oo', letters: '\uA74F' }, + { base: 'p', letters: '\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755' }, + { base: 'q', letters: '\u0071\u24E0\uFF51\u024B\uA757\uA759' }, + { base: 'r', letters: '\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783' }, + { base: 's', letters: '\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B' }, + { base: 't', letters: '\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787' }, + { base: 'tz', letters: '\uA729' }, + { base: 'u', letters: '\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289' }, + { base: 'v', letters: '\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C' }, + { base: 'vy', letters: '\uA761' }, + { base: 'w', letters: '\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73' }, + { base: 'x', letters: '\u0078\u24E7\uFF58\u1E8B\u1E8D' }, + { base: 'y', letters: '\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF' }, + { base: 'z', letters: '\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763' } ]; + +var diacriticsMap = {}; +for (var i = 0; i < defaultDiacriticsRemovalap.length; i += 1) { + var letters = defaultDiacriticsRemovalap[i].letters; + for (var j = 0; j < letters.length; j += 1) { + diacriticsMap[letters[j]] = defaultDiacriticsRemovalap[i].base; + } +} + +var Utils = { + parseUrlQuery: function parseUrlQuery(url) { + var query = {}; + var urlToParse = url || window.location.href; + var i; + var params; + var param; + var length; + if (typeof urlToParse === 'string' && urlToParse.length) { + urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : ''; + params = urlToParse.split('&').filter(function (paramsPart) { return paramsPart !== ''; }); + length = params.length; + + for (i = 0; i < length; i += 1) { + param = params[i].replace(/#\S+/g, '').split('='); + query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || ''; + } + } + return query; + }, + isArray: function isArray(arr) { + return Array.isArray(arr); + }, + each: function each(obj, callback) { + // Check it's iterable + // TODO: Should probably raise a value error here + if (typeof obj !== 'object') { return; } + // Don't bother continuing without a callback + if (!callback) { return; } + if (Array.isArray(obj) || obj instanceof Dom7) { + // Array + for (var i = 0; i < obj.length; i++) { + // If callback returns false + if (callback(i, obj[i]) === false) { + // Break out of the loop + return; + } + } + } else { + // Object + for (var prop in obj) { + // Check the propertie belongs to the object + // not it's prototype + if (obj.hasOwnProperty(prop)) { + // If the callback returns false + if (callback(prop, obj[prop]) === false) { + // Break out of the loop; + return; + } + } + } + } + }, + unique: function unique(arr) { + var uniqueArray = []; + for (var i = 0; i < arr.length; i += 1) { + if (uniqueArray.indexOf(arr[i]) === -1) { uniqueArray.push(arr[i]); } + } + return uniqueArray; + }, + serializeObject: function serializeObject(obj, parents) { + if ( parents === void 0 ) parents = []; + + if (typeof obj === 'string') { return obj; } + var resultArray = []; + var separator = '&'; + var newParents; + function varName(name) { + if (parents.length > 0) { + var parentParts = ''; + for (var j = 0; j < parents.length; j += 1) { + if (j === 0) { parentParts += parents[j]; } + else { parentParts += "[" + (encodeURIComponent(parents[j])) + "]"; } + } + return (parentParts + "[" + (encodeURIComponent(name)) + "]"); + } + return encodeURIComponent(name); + } + function varValue(value) { + return encodeURIComponent(value); + } + for (var prop in obj) { + if (obj.hasOwnProperty(prop)) { + var toPush = (void 0); + if (Array.isArray(obj[prop])) { + toPush = []; + for (var i = 0; i < obj[prop].length; i += 1) { + if (!Array.isArray(obj[prop][i]) && typeof obj[prop][i] === 'object') { + newParents = parents.slice(); + newParents.push(prop); + newParents.push(String(i)); + toPush.push(Utils.serializeObject(obj[prop][i], newParents)); + } else { + toPush.push(((varName(prop)) + "[]=" + (varValue(obj[prop][i])))); + } + } + if (toPush.length > 0) { resultArray.push(toPush.join(separator)); } + } else if (obj[prop] === null || obj[prop] === '') { + resultArray.push(((varName(prop)) + "=")); + } else if (typeof obj[prop] === 'object') { + // Object, convert to named array + newParents = parents.slice(); + newParents.push(prop); + toPush = Utils.serializeObject(obj[prop], newParents); + if (toPush !== '') { resultArray.push(toPush); } + } else if (typeof obj[prop] !== 'undefined' && obj[prop] !== '') { + // Should be string or plain value + resultArray.push(((varName(prop)) + "=" + (varValue(obj[prop])))); + } else if (obj[prop] === '') { resultArray.push(varName(prop)); } + } + } + return resultArray.join(separator); + }, + toCamelCase: function toCamelCase(string) { + return string.toLowerCase().replace(/-(.)/g, function (match, group1) { return group1.toUpperCase(); }); + }, + dataset: function dataset(el) { + return $(el).dataset(); + }, + getTranslate: function getTranslate(el, axis) { + if ( axis === void 0 ) axis = 'x'; + + var curStyle = window.getComputedStyle(el, null); + var matrix; + var curTransform; + var transformMatrix; + + if (window.WebKitCSSMatrix) { + curTransform = curStyle.transform || curStyle.webkitTransform; + if (curTransform.split(',').length > 6) { + curTransform = curTransform.split(', ').map(function map(a) { + return a.replace(',', '.'); + }).join(', '); + } + // Some old versions of Webkit choke when 'none' is passed; pass + // empty string instead in this case + transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); + } else { + transformMatrix = curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); + matrix = transformMatrix.toString().split(','); + } + + if (axis === 'x') { + // Latest Chrome and webkits Fix + if (window.WebKitCSSMatrix) { curTransform = transformMatrix.m41; } + // Crazy IE10 Matrix + else if (matrix.length === 16) { curTransform = parseFloat(matrix[12]); } + // Normal Browsers + else { curTransform = parseFloat(matrix[4]); } + } + if (axis === 'y') { + // Latest Chrome and webkits Fix + if (window.WebKitCSSMatrix) { curTransform = transformMatrix.m42; } + // Crazy IE10 Matrix + else if (matrix.length === 16) { curTransform = parseFloat(matrix[13]); } + // Normal Browsers + else { curTransform = parseFloat(matrix[5]); } + } + + return curTransform || 0; + }, + requestAnimationFrame: function requestAnimationFrame(callback) { + if (window.requestAnimationFrame) { return window.requestAnimationFrame(callback); } + else if (window.webkitRequestAnimationFrame) { return window.webkitRequestAnimationFrame(callback); } + return window.setTimeout(callback, 1000 / 60); + }, + cancelAnimationFrame: function cancelAnimationFrame(id) { + if (window.cancelAnimationFrame) { return window.cancelAnimationFrame(id); } + else if (window.webkitCancelAnimationFrame) { return window.webkitCancelAnimationFrame(id); } + return window.clearTimeout(id); + }, + supportTouch: !!(('ontouchstart' in window) || (window.DocumentTouch && document instanceof window.DocumentTouch)), + removeDiacritics: function removeDiacritics(str) { + return str.replace(/[^\u0000-\u007E]/g, function (a) { return diacriticsMap[a] || a; }); + }, + extend: function extend() { + var args = [], len$1 = arguments.length; + while ( len$1-- ) args[ len$1 ] = arguments[ len$1 ]; + + var to = Object(args[0]); + for (var i = 1; i < args.length; i += 1) { + var nextSource = args[i]; + if (nextSource !== undefined && nextSource !== null) { + var keysArray = Object.keys(Object(nextSource)); + for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { + var nextKey = keysArray[nextIndex]; + var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) { + if (typeof to[nextKey] === 'object' && typeof nextSource[nextKey] === 'object') { + Utils.extend(to[nextKey], nextSource[nextKey]); + } else { + to[nextKey] = nextSource[nextKey]; + } + } + } + } + } + return to; + }, +}; + +// Aliases +Utils.parseQuery = Utils.parseUrlQuery; +Utils.param = Utils.serializeObject; + +// Global Ajax Setup +var globalAjaxOptions = {}; +$.ajaxSetup = function ajaxSetup(options) { + if (options.type && !options.method) { options.method = options.type; } + Utils.each(options, function (optionName, optionValue) { + globalAjaxOptions[optionName] = optionValue; + }); +}; + +// JSONP Requests +var jsonpRequests = 0; + +// Ajax +function Ajax(options) { + var defaults = { + method: 'GET', + data: false, + async: true, + cache: true, + user: '', + password: '', + headers: {}, + xhrFields: {}, + statusCode: {}, + processData: true, + dataType: 'text', + contentType: 'application/x-www-form-urlencoded', + timeout: 0, + }; + var callbacks = ['beforeSend', 'error', 'complete', 'success', 'statusCode']; + + // For jQuery guys + if (options.type) { options.method = options.type; } + + // Global options + var globals = globalAjaxOptions; + + // Merge global and defaults + Utils.each(globals, function (globalOptionName, globalOptionValue) { + if (callbacks.indexOf(globalOptionName) < 0) { defaults[globalOptionName] = globalOptionValue; } + }); + + // Function to run XHR callbacks and events + function fireAjaxCallback(eventName, eventData, callbackName) { + var a = arguments; + if (eventName) { $(document).trigger(eventName, eventData); } + if (callbackName) { + // Global callback + if (callbackName in globals) { globals[callbackName](a[3], a[4], a[5], a[6]); } + // Options callback + if (options[callbackName]) { options[callbackName](a[3], a[4], a[5], a[6]); } + } + } + + // Merge options and defaults + Utils.each(defaults, function (prop, defaultValue) { + if (!(prop in options)) { options[prop] = defaultValue; } + }); + + // Default URL + if (!options.url) { + options.url = window.location.toString(); + } + // Parameters Prefix + var paramsPrefix = options.url.indexOf('?') >= 0 ? '&' : '?'; + + // UC method + var method = options.method.toUpperCase(); + + // Data to modify GET URL + if ((method === 'GET' || method === 'HEAD' || method === 'OPTIONS' || method === 'DELETE') && options.data) { + var stringData; + if (typeof options.data === 'string') { + // Should be key=value string + if (options.data.indexOf('?') >= 0) { stringData = options.data.split('?')[1]; } + else { stringData = options.data; } + } else { + // Should be key=value object + stringData = Utils.serializeObject(options.data); + } + if (stringData.length) { + options.url += paramsPrefix + stringData; + if (paramsPrefix === '?') { paramsPrefix = '&'; } + } + } + // JSONP + if (options.dataType === 'json' && options.url.indexOf('callback=') >= 0) { + var callbackName = "f7jsonp_" + (Date.now() + ((jsonpRequests += 1))); + var abortTimeout; + var callbackSplit = options.url.split('callback='); + var requestUrl = (callbackSplit[0]) + "callback=" + callbackName; + if (callbackSplit[1].indexOf('&') >= 0) { + var addVars = callbackSplit[1].split('&').filter(function (el) { return el.indexOf('=') > 0; }).join('&'); + if (addVars.length > 0) { requestUrl += "&" + addVars; } + } + + // Create script + var script = document.createElement('script'); + script.type = 'text/javascript'; + script.onerror = function onerror() { + clearTimeout(abortTimeout); + fireAjaxCallback(undefined, undefined, 'error', null, 'scripterror'); + fireAjaxCallback('ajaxComplete ajax:complete', { scripterror: true }, 'complete', null, 'scripterror'); + }; + script.src = requestUrl; + + // Handler + window[callbackName] = function jsonpCallback(data) { + clearTimeout(abortTimeout); + fireAjaxCallback(undefined, undefined, 'success', data); + script.parentNode.removeChild(script); + script = null; + delete window[callbackName]; + }; + document.querySelector('head').appendChild(script); + + if (options.timeout > 0) { + abortTimeout = setTimeout(function () { + script.parentNode.removeChild(script); + script = null; + fireAjaxCallback(undefined, undefined, 'error', null, 'timeout'); + }, options.timeout); + } + + return; + } + + // Cache for GET/HEAD requests + if (method === 'GET' || method === 'HEAD' || method === 'OPTIONS' || method === 'DELETE') { + if (options.cache === false) { + options.url += paramsPrefix + "_nocache" + (Date.now()); + } + } + + // Create XHR + var xhr = new XMLHttpRequest(); + + // Save Request URL + xhr.requestUrl = options.url; + xhr.requestParameters = options; + + // Open XHR + xhr.open(method, options.url, options.async, options.user, options.password); + + // Create POST Data + var postData = null; + + if ((method === 'POST' || method === 'PUT' || method === 'PATCH') && options.data) { + if (options.processData) { + var postDataInstances = [ArrayBuffer, Blob, Document, FormData]; + // Post Data + if (postDataInstances.indexOf(options.data.constructor) >= 0) { + postData = options.data; + } else { + // POST Headers + var boundary = "---------------------------" + (Date.now().toString(16)); + + if (options.contentType === 'multipart\/form-data') { + xhr.setRequestHeader('Content-Type', ("multipart/form-data; boundary=" + boundary)); + } else { + xhr.setRequestHeader('Content-Type', options.contentType); + } + postData = ''; + var data = Utils.serializeObject(options.data); + if (options.contentType === 'multipart\/form-data') { + boundary = "---------------------------" + (Date.now().toString(16)); + data = data.split('&'); + var newData = []; + for (var i = 0; i < data.length; i += 1) { + newData.push('Content-Disposition: form-data; name="' + _data[i].split('=')[0] + '"\r\n\r\n' + _data[i].split('=')[1] + '\r\n'); + } + postData = "--" + boundary + "\r\n" + (newData.join(("--" + boundary + "\r\n"))) + "--" + boundary + "--\r\n"; + } else { + postData = data; + } + } + } else { + postData = options.data; + } + } + + // Additional headers + if (options.headers) { + Utils.each(options.headers, function (headerName, headerCallback) { + xhr.setRequestHeader(headerName, headerCallback); + }); + } + + // Check for crossDomain + if (typeof options.crossDomain === 'undefined') { + options.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(options.url) && RegExp.$2 !== window.location.host; + } + + if (!options.crossDomain) { + xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + } + + if (options.xhrFields) { + Utils.each(options.xhrFields, function (fieldName, fieldValue) { + xhr[fieldName] = fieldValue; + }); + } + + var xhrTimeout; + // Handle XHR + xhr.onload = function onload(e) { + if (xhrTimeout) { clearTimeout(xhrTimeout); } + if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 0) { + var responseData; + if (options.dataType === 'json') { + try { + responseData = JSON.parse(xhr.responseText); + fireAjaxCallback('ajaxSuccess ajax:success', { xhr: xhr }, 'success', responseData, xhr.status, xhr); + } catch (err) { + fireAjaxCallback('ajaxError ajax:error', { xhr: xhr, parseerror: true }, 'error', xhr, 'parseerror'); + } + } else { + responseData = xhr.responseType === 'text' || xhr.responseType === '' ? xhr.responseText : xhr.response; + fireAjaxCallback('ajaxSuccess ajax:success', { xhr: xhr }, 'success', responseData, xhr.status, xhr); + } + } else { + fireAjaxCallback('ajaxError ajax:error', { xhr: xhr }, 'error', xhr, xhr.status); + } + if (options.statusCode) { + if (globals.statusCode && globals.statusCode[xhr.status]) { globals.statusCode[xhr.status](xhr); } + if (options.statusCode[xhr.status]) { options.statusCode[xhr.status](xhr); } + } + fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr }, 'complete', xhr, xhr.status); + }; + + xhr.onerror = function onerror(e) { + if (xhrTimeout) { clearTimeout(xhrTimeout); } + fireAjaxCallback('ajaxError ajax:error', { xhr: xhr }, 'error', xhr, xhr.status); + fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr, error: true }, 'complete', xhr, 'error'); + }; + + // Ajax start callback + fireAjaxCallback('ajaxStart ajax:start', { xhr: xhr }, 'start', xhr); + fireAjaxCallback(undefined, undefined, 'beforeSend', xhr); + + // Timeout + if (options.timeout > 0) { + xhr.onabort = function onabort() { + if (xhrTimeout) { clearTimeout(xhrTimeout); } + }; + xhrTimeout = setTimeout(function () { + xhr.abort(); + fireAjaxCallback('ajaxError ajax:error', { xhr: xhr, timeout: true }, 'error', xhr, 'timeout'); + fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr, timeout: true }, 'complete', xhr, 'timeout'); + }, options.timeout); + } + + // Send XHR + xhr.send(postData); + + // Return XHR object + return xhr; +} + +var Scroll = { + scrollTo: function scrollTo(left, top, duration, easing, callback) { + if ( easing === void 0 ) easing = 'swing'; + + if (arguments.length === 4 && typeof easing === 'function') { + callback = easing; + easing = undefined; + } + return this.each(function animate() { + var el = this; + var currentTop; + var currentLeft; + var maxTop; + var maxLeft; + var newTop; + var newLeft; + var scrollTop; + var scrollLeft; + var animateTop = top > 0 || top === 0; + var animateLeft = left > 0 || left === 0; + if (typeof easing === 'undefined') { + easing = 'swing'; + } + if (animateTop) { + currentTop = el.scrollTop; + if (!duration) { + el.scrollTop = top; + } + } + if (animateLeft) { + currentLeft = el.scrollLeft; + if (!duration) { + el.scrollLeft = left; + } + } + if (!duration) { return; } + if (animateTop) { + maxTop = el.scrollHeight - el.offsetHeight; + newTop = Math.max(Math.min(top, maxTop), 0); + } + if (animateLeft) { + maxLeft = el.scrollWidth - el.offsetWidth; + newLeft = Math.max(Math.min(left, maxLeft), 0); + } + var startTime = null; + if (animateTop && newTop === currentTop) { animateTop = false; } + if (animateLeft && newLeft === currentLeft) { animateLeft = false; } + function render(time) { + if ( time === void 0 ) time = new Date().getTime(); + + if (startTime === null) { + startTime = time; + } + var progress = Math.max(Math.min((time - startTime) / duration, 1), 0); + var easeProgress = easing === 'linear' ? progress : (0.5 - (Math.cos(progress * Math.PI) / 2)); + var done; + if (animateTop) { scrollTop = currentTop + (easeProgress * (newTop - currentTop)); } + if (animateLeft) { scrollLeft = currentLeft + (easeProgress * (newLeft - currentLeft)); } + if (animateTop && newTop > currentTop && scrollTop >= newTop) { + el.scrollTop = newTop; + done = true; + } + if (animateTop && newTop < currentTop && scrollTop <= newTop) { + el.scrollTop = newTop; + done = true; + } + if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) { + el.scrollLeft = newLeft; + done = true; + } + if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) { + el.scrollLeft = newLeft; + done = true; + } + + if (done) { + if (callback) { callback(); } + return; + } + if (animateTop) { el.scrollTop = scrollTop; } + if (animateLeft) { el.scrollLeft = scrollLeft; } + Utils.requestAnimationFrame(render); + } + Utils.requestAnimationFrame(render); + }); + }, + scrollTop: function scrollTop(top, duration, easing, callback) { + if (arguments.length === 3 && typeof easing === 'function') { + callback = easing; + easing = undefined; + } + var dom = this; + if (typeof top === 'undefined') { + if (dom.length > 0) { return dom[0].scrollTop; } + return null; + } + return dom.scrollTo(undefined, top, duration, easing, callback); + }, + scrollLeft: function scrollLeft(left, duration, easing, callback) { + if (arguments.length === 3 && typeof easing === 'function') { + callback = easing; + easing = undefined; + } + var dom = this; + if (typeof left === 'undefined') { + if (dom.length > 0) { return dom[0].scrollLeft; } + return null; + } + return dom.scrollTo(left, undefined, duration, easing, callback); + }, +}; + +var Methods = { + // Classes and attributes + addClass: function addClass(className) { + var this$1 = this; + + if (typeof className === 'undefined') { + return this; + } + var classes = className.split(' '); + for (var i = 0; i < classes.length; i += 1) { + for (var j = 0; j < this.length; j += 1) { + if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.add(classes[i]); } + } + } + return this; + }, + removeClass: function removeClass(className) { + var this$1 = this; + + var classes = className.split(' '); + for (var i = 0; i < classes.length; i += 1) { + for (var j = 0; j < this.length; j += 1) { + if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.remove(classes[i]); } + } + } + return this; + }, + hasClass: function hasClass(className) { + if (!this[0]) { return false; } + return this[0].classList.contains(className); + }, + toggleClass: function toggleClass(className) { + var this$1 = this; + + var classes = className.split(' '); + for (var i = 0; i < classes.length; i += 1) { + for (var j = 0; j < this.length; j += 1) { + if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.toggle(classes[i]); } + } + } + return this; + }, + attr: function attr(attrs, value) { + var arguments$1 = arguments; + var this$1 = this; + + if (arguments.length === 1 && typeof attrs === 'string') { + // Get attr + if (this[0]) { return this[0].getAttribute(attrs); } + return undefined; + } + + // Set attrs + for (var i = 0; i < this.length; i += 1) { + if (arguments$1.length === 2) { + // String + this$1[i].setAttribute(attrs, value); + } else { + // Object + for (var attrName in attrs) { + this$1[i][attrName] = attrs[attrName]; + this$1[i].setAttribute(attrName, attrs[attrName]); + } + } + } + return this; + }, + removeAttr: function removeAttr(attr) { + var this$1 = this; + + for (var i = 0; i < this.length; i += 1) { + this$1[i].removeAttribute(attr); + } + return this; + }, + prop: function prop(props, value) { + var arguments$1 = arguments; + var this$1 = this; + + if (arguments.length === 1 && typeof props === 'string') { + // Get prop + if (this[0]) { return this[0][props]; } + } else { + // Set props + for (var i = 0; i < this.length; i += 1) { + if (arguments$1.length === 2) { + // String + this$1[i][props] = value; + } else { + // Object + for (var propName in props) { + this$1[i][propName] = props[propName]; + } + } + } + return this; + } + }, + data: function data(key, value) { + var this$1 = this; + + var el; + if (typeof value === 'undefined') { + el = this[0]; + // Get value + if (el) { + if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) { + return el.dom7ElementDataStorage[key]; + } + + var dataKey = el.getAttribute(("data-" + key)); + if (dataKey) { + return dataKey; + } + return undefined; + } + return undefined; + } + + // Set value + for (var i = 0; i < this.length; i += 1) { + el = this$1[i]; + if (!el.dom7ElementDataStorage) { el.dom7ElementDataStorage = {}; } + el.dom7ElementDataStorage[key] = value; + } + return this; + }, + removeData: function removeData(key) { + var this$1 = this; + + for (var i = 0; i < this.length; i += 1) { + var el = this$1[i]; + if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) { + el.dom7ElementDataStorage[key] = null; + delete el.dom7ElementDataStorage[key]; + } + } + }, + dataset: function dataset() { + var el = this[0]; + if (!el) { return undefined; } + var dataset = {}; + if (el.dataset) { + for (var dataKey in el.dataset) { + dataset[dataKey] = el.dataset[dataKey]; + } + } else { + for (var i = 0; i < el.attributes.length; i += 1) { + var attr = el.attributes[i]; + if (attr.name.indexOf('data-') >= 0) { + dataset[Utils.toCamelCase(attr.name.split('data-')[1])] = attr.value; + } + } + } + for (var key in dataset) { + if (dataset[key] === 'false') { dataset[key] = false; } + else if (dataset[key] === 'true') { dataset[key] = true; } + else if (parseFloat(dataset[key]) === dataset[key] * 1) { dataset[key] *= 1; } + } + return dataset; + }, + val: function val(value) { + var this$1 = this; + + if (typeof value === 'undefined') { + if (this[0]) { + if (this[0].multiple && this[0].nodeName.toLowerCase() === 'select') { + var values = []; + for (var i = 0; i < this[0].selectedOptions.length; i += 1) { + values.push(this$1[0].selectedOptions[i].value); + } + return values; + } + return this[0].value; + } + return undefined; + } + + for (var i$1 = 0; i$1 < this.length; i$1 += 1) { + this$1[i$1].value = value; + } + return this; + }, + // Transforms + transform: function transform(transform$1) { + var this$1 = this; + + for (var i = 0; i < this.length; i += 1) { + var elStyle = this$1[i].style; + elStyle.webkitTransform = transform$1; + elStyle.transform = transform$1; + } + return this; + }, + transition: function transition(duration) { + var this$1 = this; + + if (typeof duration !== 'string') { + duration = duration + "ms"; + } + for (var i = 0; i < this.length; i += 1) { + var elStyle = this$1[i].style; + elStyle.webkitTransitionDuration = duration; + elStyle.transitionDuration = duration; + } + return this; + }, + // Events + on: function on() { + var this$1 = this; + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var eventType = args[0]; + var targetSelector; + var listener; + var capture = false; + if (typeof args[1] === 'function') { + targetSelector = false; + listener = args[1]; + capture = args[2]; + } else { + targetSelector = args[1]; + listener = args[2]; + capture = args[3]; + } + function handleLiveEvent(e) { + var target = e.target; + var eventData = e.target.dom7EventData || []; + eventData.unshift(e); + if ($(target).is(targetSelector)) { listener.apply(target, eventData); } + else { + var parents = $(target).parents(); + for (var k = 0; k < parents.length; k += 1) { + if ($(parents[k]).is(targetSelector)) { listener.apply(parents[k], eventData); } + } + } + } + function handleEvent(e) { + var eventData = e.target.dom7EventData || []; + eventData.unshift(e); + listener.apply(this, eventData); + } + var events = eventType.split(' '); + var j; + for (var i = 0; i < this.length; i += 1) { + var el = this$1[i]; + if (!targetSelector) { + for (j = 0; j < events.length; j += 1) { + if (!el.dom7Listeners) { el.dom7Listeners = []; } + el.dom7Listeners.push({ + type: eventType, + listener: listener, + proxyListener: handleEvent, + }); + el.addEventListener(events[j], handleEvent, capture); + } + } else { + // Live events + for (j = 0; j < events.length; j += 1) { + if (!el.dom7LiveListeners) { el.dom7LiveListeners = []; } + el.dom7LiveListeners.push({ + type: eventType, + listener: listener, + proxyListener: handleLiveEvent, + }); + el.addEventListener(events[j], handleLiveEvent, capture); + } + } + } + return this; + }, + off: function off() { + var this$1 = this; + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var eventType = args[0]; + var targetSelector; + var listener; + var capture = false; + if (typeof args[1] === 'function') { + targetSelector = false; + listener = args[1]; + capture = args[2]; + } else { + targetSelector = args[1]; + listener = args[2]; + capture = args[3]; + } + var events = eventType.split(' '); + for (var i = 0; i < events.length; i += 1) { + for (var j = 0; j < this.length; j += 1) { + var el = this$1[j]; + if (!targetSelector) { + if (el.dom7Listeners) { + for (var k = 0; k < el.dom7Listeners.length; k += 1) { + if (listener) { + if (el.dom7Listeners[k].listener === listener) { + el.removeEventListener(events[i], el.dom7Listeners[k].proxyListener, capture); + } + } else if (el.dom7Listeners[k].type === events[i]) { + el.removeEventListener(events[i], el.dom7Listeners[k].proxyListener, capture); + } + } + } + } else if (el.dom7LiveListeners) { + for (var k$1 = 0; k$1 < el.dom7LiveListeners.length; k$1 += 1) { + if (listener) { + if (el.dom7LiveListeners[k$1].listener === listener) { + el.removeEventListener(events[i], el.dom7LiveListeners[k$1].proxyListener, capture); + } + } else if (el.dom7Listeners[k$1].type === events[i]) { + el.removeEventListener(events[i], el.dom7LiveListeners[k$1].proxyListener, capture); + } + } + } + } + } + return this; + }, + once: function once(eventName, targetSelector, listener, capture) { + var dom = this; + if (typeof targetSelector === 'function') { + listener = arguments[1]; + capture = arguments[2]; + targetSelector = false; + } + function proxy(e) { + var eventData = e.target.dom7EventData || []; + listener.apply(this, eventData); + dom.off(eventName, targetSelector, proxy, capture); + } + return dom.on(eventName, targetSelector, proxy, capture); + }, + trigger: function trigger() { + var this$1 = this; + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var events = args[0].split(' '); + var eventData = args[1]; + for (var i = 0; i < events.length; i += 1) { + for (var j = 0; j < this.length; j += 1) { + var evt = (void 0); + try { + evt = new CustomEvent(events[i], { detail: eventData, bubbles: true, cancelable: true }); + } catch (e) { + evt = document.createEvent('Event'); + evt.initEvent(events[i], true, true); + evt.detail = eventData; + } + this$1[j].dom7EventData = args.filter(function (data, dataIndex) { return dataIndex > 0; }); + this$1[j].dispatchEvent(evt); + this$1[j].dom7EventData = []; + delete this$1[j].dom7EventData; + } + } + return this; + }, + transitionEnd: function transitionEnd(callback) { + var events = ['webkitTransitionEnd', 'transitionend']; + var dom = this; + var i; + function fireCallBack(e) { + /* jshint validthis:true */ + if (e.target !== this) { return; } + callback.call(this, e); + for (i = 0; i < events.length; i += 1) { + dom.off(events[i], fireCallBack); + } + } + if (callback) { + for (i = 0; i < events.length; i += 1) { + dom.on(events[i], fireCallBack); + } + } + return this; + }, + animationEnd: function animationEnd(callback) { + var events = ['webkitAnimationEnd', 'animationend']; + var dom = this; + var i; + function fireCallBack(e) { + callback(e); + for (i = 0; i < events.length; i += 1) { + dom.off(events[i], fireCallBack); + } + } + if (callback) { + for (i = 0; i < events.length; i += 1) { + dom.on(events[i], fireCallBack); + } + } + return this; + }, + // Sizing/Styles + width: function width() { + if (this[0] === window) { + return window.innerWidth; + } + + if (this.length > 0) { + return parseFloat(this.css('width')); + } + + return null; + }, + outerWidth: function outerWidth(includeMargins) { + if (this.length > 0) { + if (includeMargins) { + var styles = this.styles(); + return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left')); + } + return this[0].offsetWidth; + } + return null; + }, + height: function height() { + if (this[0] === window) { + return window.innerHeight; + } + + if (this.length > 0) { + return parseFloat(this.css('height')); + } + + return null; + }, + outerHeight: function outerHeight(includeMargins) { + if (this.length > 0) { + if (includeMargins) { + var styles = this.styles(); + return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom')); + } + return this[0].offsetHeight; + } + return null; + }, + offset: function offset() { + if (this.length > 0) { + var el = this[0]; + var box = el.getBoundingClientRect(); + var body = document.body; + var clientTop = el.clientTop || body.clientTop || 0; + var clientLeft = el.clientLeft || body.clientLeft || 0; + var scrollTop = el === window ? window.scrollY : el.scrollTop; + var scrollLeft = el === window ? window.scrollX : el.scrollLeft; + return { + top: (box.top + scrollTop) - clientTop, + left: (box.left + scrollLeft) - clientLeft, + }; + } + + return null; + }, + hide: function hide() { + var this$1 = this; + + for (var i = 0; i < this.length; i += 1) { + this$1[i].style.display = 'none'; + } + return this; + }, + show: function show() { + var this$1 = this; + + for (var i = 0; i < this.length; i += 1) { + this$1[i].style.display = 'block'; + } + return this; + }, + styles: function styles() { + if (this[0]) { return window.getComputedStyle(this[0], null); } + }, + css: function css(props, value) { + var this$1 = this; + + var i; + if (arguments.length === 1) { + if (typeof props === 'string') { + if (this[0]) { return window.getComputedStyle(this[0], null).getPropertyValue(props); } + } else { + for (i = 0; i < this.length; i += 1) { + for (var prop in props) { + this$1[i].style[prop] = props[prop]; + } + } + return this; + } + } + if (arguments.length === 2 && typeof props === 'string') { + for (i = 0; i < this.length; i += 1) { + this$1[i].style[props] = value; + } + return this; + } + return this; + }, + + // Dom manipulation + // Iterate over the collection passing elements to `callback` + each: function each(callback) { + var this$1 = this; + + // Don't bother continuing without a callback + if (!callback) { return this; } + // Iterate over the current collection + for (var i = 0; i < this.length; i += 1) { + // If the callback returns false + if (callback.call(this$1[i], i, this$1[i]) === false) { + // End the loop early + return this$1; + } + } + // Return `this` to allow chained DOM operations + return this; + }, + filter: function filter(callback) { + var matchedItems = []; + var dom = this; + for (var i = 0; i < dom.length; i += 1) { + if (callback.call(dom[i], i, dom[i])) { matchedItems.push(dom[i]); } + } + return new Dom7(matchedItems); + }, + html: function html(html$1) { + var this$1 = this; + + if (typeof html$1 === 'undefined') { + return this[0] ? this[0].innerHTML : undefined; + } + + for (var i = 0; i < this.length; i += 1) { + this$1[i].innerHTML = html$1; + } + return this; + }, + text: function text(text$1) { + var this$1 = this; + + if (typeof text$1 === 'undefined') { + if (this[0]) { + return this[0].textContent.trim(); + } + return null; + } + + for (var i = 0; i < this.length; i += 1) { + this$1[i].textContent = text$1; + } + return this; + }, + is: function is(selector) { + var el = this[0]; + var compareWith; + var i; + if (!el || typeof selector === 'undefined') { return false; } + if (typeof selector === 'string') { + if (el.matches) { return el.matches(selector); } + else if (el.webkitMatchesSelector) { return el.webkitMatchesSelector(selector); } + else if (el.msMatchesSelector) { return el.msMatchesSelector(selector); } + + compareWith = $(selector); + for (i = 0; i < compareWith.length; i += 1) { + if (compareWith[i] === el) { return true; } + } + return false; + } else if (selector === document) { return el === document; } + else if (selector === window) { return el === window; } + + if (selector.nodeType || selector instanceof Dom7) { + compareWith = selector.nodeType ? [selector] : selector; + for (i = 0; i < compareWith.length; i += 1) { + if (compareWith[i] === el) { return true; } + } + return false; + } + return false; + }, + indexOf: function indexOf(el) { + var this$1 = this; + + for (var i = 0; i < this.length; i += 1) { + if (this$1[i] === el) { return i; } + } + }, + index: function index() { + var child = this[0]; + var i; + if (child) { + i = 0; + while ((child = child.previousSibling) !== null) { + if (child.nodeType === 1) { i += 1; } + } + return i; + } + }, + eq: function eq(index) { + if (typeof index === 'undefined') { return this; } + var length = this.length; + var returnIndex; + if (index > length - 1) { + return new Dom7([]); + } + if (index < 0) { + returnIndex = length + index; + if (returnIndex < 0) { return new Dom7([]); } + return new Dom7([this[returnIndex]]); + } + return new Dom7([this[index]]); + }, + append: function append() { + var this$1 = this; + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var newChild; + + for (var k = 0; k < args.length; k += 1) { + newChild = args[k]; + for (var i = 0; i < this.length; i += 1) { + if (typeof newChild === 'string') { + var tempDiv = document.createElement('div'); + tempDiv.innerHTML = newChild; + while (tempDiv.firstChild) { + this$1[i].appendChild(tempDiv.firstChild); + } + } else if (newChild instanceof Dom7) { + for (var j = 0; j < newChild.length; j += 1) { + this$1[i].appendChild(newChild[j]); + } + } else { + this$1[i].appendChild(newChild); + } + } + } + + return this; + }, + appendTo: function appendTo(parent) { + $(parent).append(this); + return this; + }, + prepend: function prepend(newChild) { + var this$1 = this; + + var i; + var j; + for (i = 0; i < this.length; i += 1) { + if (typeof newChild === 'string') { + var tempDiv = document.createElement('div'); + tempDiv.innerHTML = newChild; + for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) { + this$1[i].insertBefore(tempDiv.childNodes[j], this$1[i].childNodes[0]); + } + } else if (newChild instanceof Dom7) { + for (j = 0; j < newChild.length; j += 1) { + this$1[i].insertBefore(newChild[j], this$1[i].childNodes[0]); + } + } else { + this$1[i].insertBefore(newChild, this$1[i].childNodes[0]); + } + } + return this; + }, + prependTo: function prependTo(parent) { + $(parent).prepend(this); + return this; + }, + insertBefore: function insertBefore(selector) { + var this$1 = this; + + var before = $(selector); + for (var i = 0; i < this.length; i += 1) { + if (before.length === 1) { + before[0].parentNode.insertBefore(this$1[i], before[0]); + } else if (before.length > 1) { + for (var j = 0; j < before.length; j += 1) { + before[j].parentNode.insertBefore(this$1[i].cloneNode(true), before[j]); + } + } + } + }, + insertAfter: function insertAfter(selector) { + var this$1 = this; + + var after = $(selector); + for (var i = 0; i < this.length; i += 1) { + if (after.length === 1) { + after[0].parentNode.insertBefore(this$1[i], after[0].nextSibling); + } else if (after.length > 1) { + for (var j = 0; j < after.length; j += 1) { + after[j].parentNode.insertBefore(this$1[i].cloneNode(true), after[j].nextSibling); + } + } + } + }, + next: function next(selector) { + if (this.length > 0) { + if (selector) { + if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { return new Dom7([this[0].nextElementSibling]); } + return new Dom7([]); + } + + if (this[0].nextElementSibling) { return new Dom7([this[0].nextElementSibling]); } + return new Dom7([]); + } + return new Dom7([]); + }, + nextAll: function nextAll(selector) { + var nextEls = []; + var el = this[0]; + if (!el) { return new Dom7([]); } + while (el.nextElementSibling) { + var next = el.nextElementSibling; + if (selector) { + if ($(next).is(selector)) { nextEls.push(next); } + } else { nextEls.push(next); } + el = next; + } + return new Dom7(nextEls); + }, + prev: function prev(selector) { + if (this.length > 0) { + var el = this[0]; + if (selector) { + if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { return new Dom7([el.previousElementSibling]); } + return new Dom7([]); + } + + if (el.previousElementSibling) { return new Dom7([el.previousElementSibling]); } + return new Dom7([]); + } + return new Dom7([]); + }, + prevAll: function prevAll(selector) { + var prevEls = []; + var el = this[0]; + if (!el) { return new Dom7([]); } + while (el.previousElementSibling) { + var prev = el.previousElementSibling; + if (selector) { + if ($(prev).is(selector)) { prevEls.push(prev); } + } else { prevEls.push(prev); } + el = prev; + } + return new Dom7(prevEls); + }, + siblings: function siblings(selector) { + return this.nextAll(selector).add(this.prevAll(selector)); + }, + parent: function parent(selector) { + var this$1 = this; + + var parents = []; + for (var i = 0; i < this.length; i += 1) { + if (this$1[i].parentNode !== null) { + if (selector) { + if ($(this$1[i].parentNode).is(selector)) { parents.push(this$1[i].parentNode); } + } else { + parents.push(this$1[i].parentNode); + } + } + } + return $(Utils.unique(parents)); + }, + parents: function parents(selector) { + var this$1 = this; + + var parents = []; + for (var i = 0; i < this.length; i += 1) { + var parent = this$1[i].parentNode; + while (parent) { + if (selector) { + if ($(parent).is(selector)) { parents.push(parent); } + } else { + parents.push(parent); + } + parent = parent.parentNode; + } + } + return $(Utils.unique(parents)); + }, + closest: function closest(selector) { + var closest = this; + if (typeof selector === 'undefined') { + return new Dom7([]); + } + if (!closest.is(selector)) { + closest = closest.parents(selector).eq(0); + } + return closest; + }, + find: function find(selector) { + var this$1 = this; + + var foundElements = []; + for (var i = 0; i < this.length; i += 1) { + var found = this$1[i].querySelectorAll(selector); + for (var j = 0; j < found.length; j += 1) { + foundElements.push(found[j]); + } + } + return new Dom7(foundElements); + }, + children: function children(selector) { + var this$1 = this; + + var children = []; + for (var i = 0; i < this.length; i += 1) { + var childNodes = this$1[i].childNodes; + + for (var j = 0; j < childNodes.length; j += 1) { + if (!selector) { + if (childNodes[j].nodeType === 1) { children.push(childNodes[j]); } + } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) { children.push(childNodes[j]); } + } + } + return new Dom7(Utils.unique(children)); + }, + remove: function remove() { + var this$1 = this; + + for (var i = 0; i < this.length; i += 1) { + if (this$1[i].parentNode) { this$1[i].parentNode.removeChild(this$1[i]); } + } + return this; + }, + detach: function detach() { + return this.remove(); + }, + add: function add() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var dom = this; + var i; + var j; + for (i = 0; i < args.length; i += 1) { + var toAdd = $(args[i]); + for (j = 0; j < toAdd.length; j += 1) { + dom[dom.length] = toAdd[j]; + dom.length += 1; + } + } + return dom; + }, + empty: function empty() { + var this$1 = this; + + for (var i = 0; i < this.length; i += 1) { + var el = this$1[i]; + if (el.nodeType === 1) { + for (var j = 0; j < el.childNodes.length; j += 1) { + if (el.childNodes[j].parentNode) { + el.childNodes[j].parentNode.removeChild(el.childNodes[j]); + } + } + el.textContent = ''; + } + } + return this; + }, +}; + +function Animate(initialProps, initialParams) { + var els = this; + var a = { + props: $.extend({}, initialProps), + params: $.extend({ + duration: 300, + easing: 'swing', // or 'linear' + /* Callbacks + begin(elements) + complete(elements) + progress(elements, complete, remaining, start, tweenValue) + */ + }, initialParams), + + elements: els, + animating: false, + que: [], + + easingProgress: function easingProgress(easing, progress) { + if (easing === 'swing') { + return 0.5 - (Math.cos(progress * Math.PI) / 2); + } + if (typeof easing === 'function') { + return easing(progress); + } + return progress; + }, + stop: function stop() { + if (a.frameId) { + Utils.cancelAnimationFrame(a.frameId); + } + a.animating = false; + a.elements.each(function (index, el) { + var element = el; + delete element.dom7AnimateInstance; + }); + a.que = []; + }, + done: function done(complete) { + a.animating = false; + a.elements.each(function (index, el) { + var element = el; + delete element.dom7AnimateInstance; + }); + if (complete) { complete(els); } + if (a.que.length > 0) { + var que = a.que.shift(); + a.animate(que[0], que[1]); + } + }, + animate: function animate(props, params) { + if (a.animating) { + a.que.push([props, params]); + return a; + } + var elements = []; + + // Define & Cache Initials & Units + a.elements.each(function (index, el) { + var initialFullValue; + var initialValue; + var unit; + var finalValue; + var finalFullValue; + + if (!el.dom7AnimateInstance) { a.elements[index].dom7AnimateInstance = a; } + + elements[index] = { + container: el, + }; + Object.keys(props).forEach(function (prop) { + initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.'); + initialValue = parseFloat(initialFullValue); + unit = initialFullValue.replace(initialValue, ''); + finalValue = parseFloat(props[prop]); + finalFullValue = props[prop] + unit; + elements[index][prop] = { + initialFullValue: initialFullValue, + initialValue: initialValue, + unit: unit, + finalValue: finalValue, + finalFullValue: finalFullValue, + currentValue: initialValue, + }; + }); + }); + + var startTime = null; + var time; + var elementsDone = 0; + var propsDone = 0; + var done; + var began = false; + + a.animating = true; + + function render() { + time = new Date().getTime(); + var progress; + var easeProgress; + // let el; + if (!began) { + began = true; + if (params.begin) { params.begin(els); } + } + if (startTime === null) { + startTime = time; + } + if (params.progress) { + params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), ((startTime + params.duration) - time < 0 ? 0 : (startTime + params.duration) - time), startTime); + } + + elements.forEach(function (element) { + var el = element; + if (done || el.done) { return; } + Object.keys(props).forEach(function (prop) { + if (done || el.done) { return; } + progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0); + easeProgress = a.easingProgress(params.easing, progress); + var ref = el[prop]; + var initialValue = ref.initialValue; + var finalValue = ref.finalValue; + var unit = ref.unit; + el[prop].currentValue = initialValue + (easeProgress * (finalValue - initialValue)); + var currentValue = el[prop].currentValue; + + if ( + (finalValue > initialValue && currentValue >= finalValue) || + (finalValue < initialValue && currentValue <= finalValue)) { + el.container.style[prop] = finalValue + unit; + propsDone += 1; + if (propsDone === Object.keys(props).length) { + el.done = true; + elementsDone += 1; + } + if (elementsDone === elements.length) { + done = true; + } + } + if (done) { + a.done(params.complete); + return; + } + el.container.style[prop] = currentValue + unit; + }); + }); + if (done) { return; } + // Then call + a.frameId = Utils.requestAnimationFrame(render); + } + a.frameId = Utils.requestAnimationFrame(render); + return a; + }, + }; + + if (a.elements.length === 0) { + return els; + } + + var animateInstance; + for (var i = 0; i < a.elements.length; i += 1) { + if (a.elements[i].dom7AnimateInstance) { + animateInstance = a.elements[i].dom7AnimateInstance; + } else { a.elements[i].dom7AnimateInstance = a; } + } + if (!animateInstance) { + animateInstance = a; + } + + if (initialProps === 'stop') { + animateInstance.stop(); + } else { + animateInstance.animate(a.props, a.params); + } + + return els; +} + +function Stop() { + var els = this; + for (var i = 0; i < els.length; i += 1) { + if (els[i].dom7AnimateInstance) { + els[i].dom7AnimateInstance.stop(); + } + } +} + +function dom7() { + // Utils & Helpers + Object.keys(Utils).forEach(function (key) { + $[key] = Utils[key]; + }); + + // Methods + Object.keys(Methods).forEach(function (key) { + Dom7.prototype[key] = Methods[key]; + }); + + // Scroll + Object.keys(Scroll).forEach(function (key) { + Dom7.prototype[key] = Scroll[key]; + }); + + // Animate + Dom7.prototype.animate = Animate; + Dom7.prototype.stop = Stop; + + // Ajax + $.ajax = Ajax; + + // Ajax Shrotcuts + ('get post getJSON').split(' ').forEach(function (method) { + $[method] = function ajax() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var url; + var data; + var success; + var error; + var dataType; + if (typeof args[1] === 'function') { + var assign; + (assign = args, url = assign[0], success = assign[1], error = assign[2], dataType = assign[3]); + } else { + var assign$1; + (assign$1 = args, url = assign$1[0], data = assign$1[1], success = assign$1[2], error = assign$1[3], dataType = assign$1[4]); + } + [success, error].forEach(function (callback) { + if (typeof callback === 'string') { + dataType = callback; + if (callback === success) { success = undefined; } + else { error = undefined; } + } + }); + dataType = dataType || (method === 'getJSON' ? 'json' : undefined); + return $.ajax({ + url: url, + method: method === 'post' ? 'POST' : 'GET', + data: data, + success: success, + error: error, + dataType: dataType, + }); + }; + }); + + // Link to prototype + $.fn = Dom7.prototype; + + return $; +} +var dom7$1 = dom7(); + +return dom7$1; + +}))); + +//# sourceMappingURL=dom7.js.map + +/** + * template7 1.2.3 + * Mobile-first HTML template engine + * + * http://www.idangero.us/template7/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 12, 2017 + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global.Template7 = factory()); +}(this, (function () { 'use strict'; + +var template7Context; +if (typeof window !== 'undefined') { + template7Context = window; +} else if (typeof global !== 'undefined') { + template7Context = global; +} else { + template7Context = undefined; +} +function isArray(arr) { + return Array.isArray ? Array.isArray(arr) : Object.prototype.toString.apply(arr) === '[object Array]'; +} +function isFunction(func) { + return typeof func === 'function'; +} +function escape(string) { + return (typeof template7Context !== 'undefined' && template7Context.escape ? template7Context.escape(string) : string) + .replace(/&/g, '&') + .replace(//g, '>') + .replace(/"/g, '"'); +} +var quoteSingleRexExp = new RegExp('\'', 'g'); +var quoteDoubleRexExp = new RegExp('"', 'g'); +function helperToSlices(string) { + var helperParts = string.replace(/[{}#}]/g, '').split(' '); + var slices = []; + var shiftIndex; + var i; + var j; + for (i = 0; i < helperParts.length; i += 1) { + var part = helperParts[i]; + var blockQuoteRegExp = (void 0); + var openingQuote = (void 0); + if (i === 0) { slices.push(part); } + else if (part.indexOf('"') === 0 || part.indexOf('\'') === 0) { + blockQuoteRegExp = part.indexOf('"') === 0 ? quoteDoubleRexExp : quoteSingleRexExp; + openingQuote = part.indexOf('"') === 0 ? '"' : '\''; + // Plain String + if (part.match(blockQuoteRegExp).length === 2) { + // One word string + slices.push(part); + } else { + // Find closed Index + shiftIndex = 0; + for (j = i + 1; j < helperParts.length; j += 1) { + part += " " + (helperParts[j]); + if (helperParts[j].indexOf(openingQuote) >= 0) { + shiftIndex = j; + slices.push(part); + break; + } + } + if (shiftIndex) { i = shiftIndex; } + } + } else if (part.indexOf('=') > 0) { + // Hash + var hashParts = part.split('='); + var hashName = hashParts[0]; + var hashContent = hashParts[1]; + if (!blockQuoteRegExp) { + blockQuoteRegExp = hashContent.indexOf('"') === 0 ? quoteDoubleRexExp : quoteSingleRexExp; + openingQuote = hashContent.indexOf('"') === 0 ? '"' : '\''; + } + if (hashContent.match(blockQuoteRegExp).length !== 2) { + shiftIndex = 0; + for (j = i + 1; j < helperParts.length; j += 1) { + hashContent += " " + (helperParts[j]); + if (helperParts[j].indexOf(openingQuote) >= 0) { + shiftIndex = j; + break; + } + } + if (shiftIndex) { i = shiftIndex; } + } + var hash = [hashName, hashContent.replace(blockQuoteRegExp, '')]; + slices.push(hash); + } else { + // Plain variable + slices.push(part); + } + } + return slices; +} +function stringToBlocks(string) { + var blocks = []; + var i; + var j; + if (!string) { return []; } + var stringBlocks = string.split(/({{[^{^}]*}})/); + for (i = 0; i < stringBlocks.length; i += 1) { + var block = stringBlocks[i]; + if (block === '') { continue; } + if (block.indexOf('{{') < 0) { + blocks.push({ + type: 'plain', + content: block, + }); + } else { + if (block.indexOf('{/') >= 0) { + continue; + } + if (block.indexOf('{#') < 0 && block.indexOf(' ') < 0 && block.indexOf('else') < 0) { + // Simple variable + blocks.push({ + type: 'variable', + contextName: block.replace(/[{}]/g, ''), + }); + continue; + } + // Helpers + var helperSlices = helperToSlices(block); + var helperName = helperSlices[0]; + var isPartial = helperName === '>'; + var helperContext = []; + var helperHash = {}; + for (j = 1; j < helperSlices.length; j += 1) { + var slice = helperSlices[j]; + if (isArray(slice)) { + // Hash + helperHash[slice[0]] = slice[1] === 'false' ? false : slice[1]; + } else { + helperContext.push(slice); + } + } + + if (block.indexOf('{#') >= 0) { + // Condition/Helper + var helperContent = ''; + var elseContent = ''; + var toSkip = 0; + var shiftIndex = (void 0); + var foundClosed = false; + var foundElse = false; + var depth = 0; + for (j = i + 1; j < stringBlocks.length; j += 1) { + if (stringBlocks[j].indexOf('{{#') >= 0) { + depth += 1; + } + if (stringBlocks[j].indexOf('{{/') >= 0) { + depth -= 1; + } + if (stringBlocks[j].indexOf(("{{#" + helperName)) >= 0) { + helperContent += stringBlocks[j]; + if (foundElse) { elseContent += stringBlocks[j]; } + toSkip += 1; + } else if (stringBlocks[j].indexOf(("{{/" + helperName)) >= 0) { + if (toSkip > 0) { + toSkip -= 1; + helperContent += stringBlocks[j]; + if (foundElse) { elseContent += stringBlocks[j]; } + } else { + shiftIndex = j; + foundClosed = true; + break; + } + } else if (stringBlocks[j].indexOf('else') >= 0 && depth === 0) { + foundElse = true; + } else { + if (!foundElse) { helperContent += stringBlocks[j]; } + if (foundElse) { elseContent += stringBlocks[j]; } + } + } + if (foundClosed) { + if (shiftIndex) { i = shiftIndex; } + blocks.push({ + type: 'helper', + helperName: helperName, + contextName: helperContext, + content: helperContent, + inverseContent: elseContent, + hash: helperHash, + }); + } + } else if (block.indexOf(' ') > 0) { + if (isPartial) { + helperName = '_partial'; + if (helperContext[0]) { helperContext[0] = "\"" + (helperContext[0].replace(/"|'/g, '')) + "\""; } + } + blocks.push({ + type: 'helper', + helperName: helperName, + contextName: helperContext, + hash: helperHash, + }); + } + } + } + return blocks; +} +var Template7 = function Template7(template) { + var t = this; + t.template = template; + + function getCompileVar(name, ctx) { + var variable = ctx; + var parts; + var levelsUp = 0; + if (name.indexOf('../') === 0) { + var newDepth = variable.split('_')[1] - levelsUp; + levelsUp = name.split('../').length - 1; + variable = "ctx_" + (newDepth >= 1 ? newDepth : 1); + parts = name.split('../')[levelsUp].split('.'); + } else if (name.indexOf('@global') === 0) { + variable = 'Template7.global'; + parts = name.split('@global.')[1].split('.'); + } else if (name.indexOf('@root') === 0) { + variable = 'root'; + parts = name.split('@root.')[1].split('.'); + } else { + parts = name.split('.'); + } + for (var i = 0; i < parts.length; i += 1) { + var part = parts[i]; + if (part.indexOf('@') === 0) { + if (i > 0) { + variable += "[(data && data." + (part.replace('@', '')) + ")]"; + } else { + variable = "(data && data." + (name.replace('@', '')) + ")"; + } + } else if (isFinite(part)) { + variable += "[" + part + "]"; + } else if (part === 'this' || part.indexOf('this.') >= 0 || part.indexOf('this[') >= 0 || part.indexOf('this(') >= 0) { + variable = part.replace('this', ctx); + } else { + variable += "." + part; + } + } + + return variable; + } + function getCompiledArguments(contextArray, ctx) { + var arr = []; + for (var i = 0; i < contextArray.length; i += 1) { + if (/^['"]/.test(contextArray[i])) { arr.push(contextArray[i]); } + else if (/^(true|false|\d+)$/.test(contextArray[i])) { arr.push(contextArray[i]); } + else { + arr.push(getCompileVar(contextArray[i], ctx)); + } + } + + return arr.join(', '); + } + function compile(template, depth) { + if ( template === void 0 ) template = t.template; + if ( depth === void 0 ) depth = 1; + + if (typeof template !== 'string') { + throw new Error('Template7: Template must be a string'); + } + var blocks = stringToBlocks(template); + var ctx = "ctx_" + depth; + if (blocks.length === 0) { + return function empty() { return ''; }; + } + + function getCompileFn(block, newDepth) { + if (block.content) { return compile(block.content, newDepth); } + return function empty() { return ''; }; + } + function getCompileInverse(block, newDepth) { + if (block.inverseContent) { return compile(block.inverseContent, newDepth); } + return function empty() { return ''; }; + } + + var resultString = ''; + if (depth === 1) { + resultString += "(function (" + ctx + ", data, root) {\n"; + } else { + resultString += "(function (" + ctx + ", data) {\n"; + } + if (depth === 1) { + resultString += 'function isArray(arr){return Object.prototype.toString.apply(arr) === \'[object Array]\';}\n'; + resultString += 'function isFunction(func){return (typeof func === \'function\');}\n'; + resultString += 'function c(val, ctx) {if (typeof val !== "undefined" && val !== null) {if (isFunction(val)) {return val.call(ctx);} else return val;} else return "";}\n'; + resultString += 'root = root || ctx_1 || {};\n'; + } + resultString += 'var r = \'\';\n'; + var i; + for (i = 0; i < blocks.length; i += 1) { + var block = blocks[i]; + // Plain block + if (block.type === 'plain') { + resultString += "r +='" + ((block.content).replace(/\r/g, '\\r').replace(/\n/g, '\\n').replace(/'/g, '\\' + '\'')) + "';"; + continue; + } + var variable = (void 0); + var compiledArguments = (void 0); + // Variable block + if (block.type === 'variable') { + variable = getCompileVar(block.contextName, ctx); + resultString += "r += c(" + variable + ", " + ctx + ");"; + } + // Helpers block + if (block.type === 'helper') { + if (block.helperName in t.helpers) { + compiledArguments = getCompiledArguments(block.contextName, ctx); + + resultString += "r += (Template7.helpers." + (block.helperName) + ").call(" + ctx + ", " + (compiledArguments && ((compiledArguments + ", "))) + "{hash:" + (JSON.stringify(block.hash)) + ", data: data || {}, fn: " + (getCompileFn(block, depth + 1)) + ", inverse: " + (getCompileInverse(block, depth + 1)) + ", root: root});"; + } else if (block.contextName.length > 0) { + throw new Error(("Template7: Missing helper: \"" + (block.helperName) + "\"")); + } else { + variable = getCompileVar(block.helperName, ctx); + resultString += "if (" + variable + ") {"; + resultString += "if (isArray(" + variable + ")) {"; + resultString += "r += (Template7.helpers.each).call(" + ctx + ", " + variable + ", {hash:" + (JSON.stringify(block.hash)) + ", data: data || {}, fn: " + (getCompileFn(block, depth + 1)) + ", inverse: " + (getCompileInverse(block, depth + 1)) + ", root: root});"; + resultString += '}else {'; + resultString += "r += (Template7.helpers.with).call(" + ctx + ", " + variable + ", {hash:" + (JSON.stringify(block.hash)) + ", data: data || {}, fn: " + (getCompileFn(block, depth + 1)) + ", inverse: " + (getCompileInverse(block, depth + 1)) + ", root: root});"; + resultString += '}}'; + } + } + } + resultString += '\nreturn r;})'; + return eval.call(template7Context, resultString); + } + t.compile = function _compile(template) { + if (!t.compiled) { + t.compiled = compile(template); + } + return t.compiled; + }; +}; + +Template7.prototype = { + options: {}, + partials: {}, + helpers: { + _partial: function _partial(partialName, options) { + var p = Template7.prototype.partials[partialName]; + if (!p || (p && !p.template)) { return ''; } + if (!p.compiled) { + p.compiled = new Template7(p.template).compile(); + } + var ctx = this; + for (var hashName in options.hash) { + ctx[hashName] = options.hash[hashName]; + } + return p.compiled(ctx, options.data, options.root); + }, + escape: function escape$1(context, options) { + if (typeof context !== 'string') { + throw new Error('Template7: Passed context to "escape" helper should be a string'); + } + return escape(context); + }, + if: function if$1(context, options) { + var ctx = context; + if (isFunction(ctx)) { ctx = ctx.call(this); } + if (ctx) { + return options.fn(this, options.data); + } + + return options.inverse(this, options.data); + }, + unless: function unless(context, options) { + var ctx = context; + if (isFunction(ctx)) { ctx = ctx.call(this); } + if (!ctx) { + return options.fn(this, options.data); + } + + return options.inverse(this, options.data); + }, + each: function each(context, options) { + var ctx = context; + var ret = ''; + var i = 0; + if (isFunction(ctx)) { ctx = ctx.call(this); } + if (isArray(ctx)) { + if (options.hash.reverse) { + ctx = ctx.reverse(); + } + for (i = 0; i < ctx.length; i += 1) { + ret += options.fn(ctx[i], { first: i === 0, last: i === ctx.length - 1, index: i }); + } + if (options.hash.reverse) { + ctx = ctx.reverse(); + } + } else { + for (var key in ctx) { + i += 1; + ret += options.fn(ctx[key], { key: key }); + } + } + if (i > 0) { return ret; } + return options.inverse(this); + }, + with: function with$1(context, options) { + var ctx = context; + if (isFunction(ctx)) { ctx = context.call(this); } + return options.fn(ctx); + }, + join: function join(context, options) { + var ctx = context; + if (isFunction(ctx)) { ctx = ctx.call(this); } + return ctx.join(options.hash.delimiter || options.hash.delimeter); + }, + js: function js(expression, options) { + var func; + if (expression.indexOf('return') >= 0) { + func = "(function(){" + expression + "})"; + } else { + func = "(function(){return (" + expression + ")})"; + } + return eval.call(this, func).call(this); + }, + js_compare: function js_compare(expression, options) { + var func; + if (expression.indexOf('return') >= 0) { + func = "(function(){" + expression + "})"; + } else { + func = "(function(){return (" + expression + ")})"; + } + var condition = eval.call(this, func).call(this); + if (condition) { + return options.fn(this, options.data); + } + + return options.inverse(this, options.data); + }, + }, +}; +function t7(template, data) { + if (arguments.length === 2) { + var instance = new Template7(template); + var rendered = instance.compile()(data); + instance = null; + return (rendered); + } + return new Template7(template); +} +t7.registerHelper = function registerHelper(name, fn) { + Template7.prototype.helpers[name] = fn; +}; +t7.unregisterHelper = function unregisterHelper(name) { + Template7.prototype.helpers[name] = undefined; + delete Template7.prototype.helpers[name]; +}; +t7.registerPartial = function registerPartial(name, template) { + Template7.prototype.partials[name] = { template: template }; +}; +t7.unregisterPartial = function unregisterPartial(name) { + if (Template7.prototype.partials[name]) { + Template7.prototype.partials[name] = undefined; + delete Template7.prototype.partials[name]; + } +}; +t7.compile = function compile(template, options) { + var instance = new Template7(template, options); + return instance.compile(); +}; + +t7.options = Template7.prototype.options; +t7.helpers = Template7.prototype.helpers; +t7.partials = Template7.prototype.partials; + +return t7; + +}))); + +//# sourceMappingURL=template7.js.map + +(function () { + + 'use strict'; + /*=========================== + Framework 7 + ===========================*/ + window.Framework7 = function (params) { + // App + var app = this; + + // Version + app.version = '1.6.0'; + + // Default Parameters + app.params = { + // + root: 'body', + // + cache: true, + cacheIgnore: [], + cacheIgnoreGetParameters: false, + cacheDuration: 1000 * 60 * 10, // Ten minutes + preloadPreviousPage: true, + uniqueHistory: false, + uniqueHistoryIgnoreGetParameters: false, + dynamicPageUrl: 'content-{{index}}', + allowDuplicateUrls: false, + router: true, + routerRemoveTimeout: false, + routerRemoveWithTimeout: false, + // Push State + pushState: false, + pushStateRoot: undefined, + pushStateNoAnimation: false, + pushStateSeparator: '#!/', + pushStateOnLoad: true, + // Fast clicks + fastClicks: true, + fastClicksDistanceThreshold: 10, + fastClicksDelayBetweenClicks: 50, + fastClicksExclude: '', // CSS selector + // Tap Hold + tapHold: false, + tapHoldDelay: 750, + tapHoldPreventClicks: true, + // Active State + activeState: true, + activeStateElements: 'a, button, label, span', + // Animate Nav Back Icon + animateNavBackIcon: false, + // Swipe Back + swipeBackPage: true, + swipeBackPageThreshold: 0, + swipeBackPageActiveArea: 30, + swipeBackPageAnimateShadow: true, + swipeBackPageAnimateOpacity: true, + // Ajax + ajaxLinks: undefined, // or CSS selector + // External Links + externalLinks: '.external', // CSS selector + // Sortable + sortable: true, + // Scroll toolbars + hideNavbarOnPageScroll: false, + hideToolbarOnPageScroll: false, + hideTabbarOnPageScroll: false, + showBarsOnPageScrollEnd: true, + showBarsOnPageScrollTop: true, + // Swipeout + swipeout: true, + swipeoutActionsNoFold: false, + swipeoutNoFollow: false, + swipeoutRemoveWithTimeout: false, + // Smart Select Back link template + smartSelectOpenIn: 'page', // or 'popup' or 'picker' + smartSelectBackText: 'Back', + smartSelectPopupCloseText: 'Close', + smartSelectPickerCloseText: 'Done', + smartSelectSearchbar: false, + smartSelectBackOnSelect: false, + // Tap Navbar or Statusbar to scroll to top + scrollTopOnNavbarClick: false, + scrollTopOnStatusbarClick: false, + // Panels + panelLeftBreakpoint: null, + panelRightBreakpoint: null, + swipePanel: false, // or 'left' or 'right' + swipePanelActiveArea: 0, + swipePanelCloseOpposite: true, + swipePanelOnlyClose: false, + swipePanelNoFollow: false, + swipePanelThreshold: 0, + panelsCloseByOutside: true, + // Modals + modalButtonOk: 'OK', + modalButtonCancel: 'Cancel', + modalUsernamePlaceholder: 'Username', + modalPasswordPlaceholder: 'Password', + modalTitle: 'Framework7', + modalCloseByOutside: false, + actionsCloseByOutside: true, + popupCloseByOutside: true, + popoverCloseByOutside: true, + modalPreloaderTitle: 'Loading... ', + modalStack: true, + modalsMoveToRoot: true, + // Lazy Load + imagesLazyLoadThreshold: 0, + imagesLazyLoadSequential: true, + // Name space + viewClass: 'view', + viewMainClass: 'view-main', + viewsClass: 'views', + // Notifications defaults + notificationCloseOnClick: false, + notificationCloseIcon: true, + notificationCloseButtonText: 'Close', + // Animate Pages + animatePages: true, + // Template7 + templates: {}, + template7Data: {}, + template7Pages: false, + precompileTemplates: false, + // Material + material: false, + materialPageLoadDelay: 0, + materialPreloaderSvg: '', + materialPreloaderHtml: + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '', + materialRipple: true, + materialRippleElements: '.ripple, a.link, a.item-link, .button, .modal-button, .tab-link, .label-radio, .label-checkbox, .actions-modal-button, a.searchbar-clear, a.floating-button, .floating-button > a, .speed-dial-buttons a, .form-checkbox, .form-radio, .data-table .sortable-cell', + // Auto init + init: true, + }; + + // Extend defaults with parameters + for (var param in params) { + app.params[param] = params[param]; + } + + // DOM lib + var $ = Dom7; + + // Template7 lib + var t7 = Template7; + app._compiledTemplates = {}; + + // App Root + app.root = $(app.params.root); + app.root.eq(0).addClass('framework7-root'); + + // Touch events + app.touchEvents = { + start: app.support.touch ? 'touchstart' : 'mousedown', + move: app.support.touch ? 'touchmove' : 'mousemove', + end: app.support.touch ? 'touchend' : 'mouseup' + }; + + // Link to local storage + app.ls = window.localStorage; + + // RTL + app.rtl = $('body').css('direction') === 'rtl'; + if (app.rtl) $('html').attr('dir', 'rtl'); + + // Overwrite statusbar overlay + if (typeof app.params.statusbarOverlay !== 'undefined') { + if (app.params.statusbarOverlay) $('html').addClass('with-statusbar-overlay'); + else $('html').removeClass('with-statusbar-overlay'); + } + else if (app.device.ios && (window.cordova || window.phonegap)) { + $(document).on('resume', function () { + if (app.device.needsStatusBar()) { + $('html').addClass('with-statusbar-overlay'); + } + }, false); + } + + + /*====================================================== + ************ Views ************ + ======================================================*/ + app.views = []; + var View = function (selector, params) { + var defaults = { + dynamicNavbar: false, + domCache: false, + linksView: undefined, + reloadPages: false, + uniqueHistory: app.params.uniqueHistory, + uniqueHistoryIgnoreGetParameters: app.params.uniqueHistoryIgnoreGetParameters, + allowDuplicateUrls: app.params.allowDuplicateUrls, + swipeBackPage: app.params.swipeBackPage, + swipeBackPageAnimateShadow: app.params.swipeBackPageAnimateShadow, + swipeBackPageAnimateOpacity: app.params.swipeBackPageAnimateOpacity, + swipeBackPageActiveArea: app.params.swipeBackPageActiveArea, + swipeBackPageThreshold: app.params.swipeBackPageThreshold, + animatePages: app.params.animatePages, + preloadPreviousPage: app.params.preloadPreviousPage + }; + var i; + + // Params + params = params || {}; + + // Disable dynamic navbar for material theme + if (params.dynamicNavbar && app.params.material) params.dynamicNavbar = false; + + // Extend params with defaults + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + // View + var view = this; + view.params = params; + + // Selector + view.selector = selector; + + // Container + var container = $(selector); + view.container = container[0]; + + // Fix Selector + + if (typeof selector !== 'string') { + // Supposed to be HTMLElement or Dom7 + selector = (container.attr('id') ? '#' + container.attr('id') : '') + (container.attr('class') ? '.' + container.attr('class').replace(/ /g, '.').replace('.active', '') : ''); + view.selector = selector; + } + + // Is main + view.main = container.hasClass(app.params.viewMainClass); + + // Content cache + view.contentCache = {}; + + // Context cache + view.contextCache = {}; + + // Pages cache + view.pagesCache = {}; + view.pageElementsCache = {}; + + // Store View in element for easy access + container[0].f7View = view; + + // Pages + view.pagesContainer = container.find('.pages')[0]; + view.initialPages = []; + view.initialPagesUrl = []; + view.initialNavbars = []; + if (view.params.domCache) { + var initialPages = container.find('.page'); + for (i = 0; i < initialPages.length; i++) { + view.initialPages.push(initialPages[i]); + view.initialPagesUrl.push('#' + initialPages.eq(i).attr('data-page')); + } + if (view.params.dynamicNavbar) { + var initialNavbars = container.find('.navbar-inner'); + for (i = 0; i < initialNavbars.length; i++) { + view.initialNavbars.push(initialNavbars[i]); + } + } + + } + + view.allowPageChange = true; + + // Location + var docLocation = document.location.href; + + // History + view.history = []; + var viewURL = docLocation; + var pushStateSeparator = app.params.pushStateSeparator; + var pushStateRoot = app.params.pushStateRoot; + if (app.params.pushState && view.main) { + if (pushStateRoot) { + viewURL = pushStateRoot; + } + else { + if (pushStateSeparator && viewURL.indexOf(pushStateSeparator) >= 0 && viewURL.indexOf(pushStateSeparator + '#') < 0) viewURL = viewURL.split(pushStateSeparator)[0]; + } + + } + + // Active Page + var currentPage, currentPageData; + if (!view.activePage) { + currentPage = $(view.pagesContainer).find('.page-on-center'); + if (currentPage.length === 0) { + currentPage = $(view.pagesContainer).find('.page:not(.cached)'); + currentPage = currentPage.eq(currentPage.length - 1); + } + if (currentPage.length > 0) { + currentPageData = currentPage[0].f7PageData; + } + } + + // View startup URL + if (view.params.domCache && currentPage) { + view.url = container.attr('data-url') || view.params.url || '#' + currentPage.attr('data-page'); + view.pagesCache[view.url] = currentPage.attr('data-page'); + } + else view.url = container.attr('data-url') || view.params.url || viewURL; + + // Update current page Data + if (currentPageData) { + currentPageData.view = view; + currentPageData.url = view.url; + if (view.params.domCache && view.params.dynamicNavbar && !currentPageData.navbarInnerContainer) { + currentPageData.navbarInnerContainer = view.initialNavbars[view.initialPages.indexOf(currentPageData.container)]; + } + view.activePage = currentPageData; + currentPage[0].f7PageData = currentPageData; + } + + // Store to history main view's url + if (view.url) { + view.history.push(view.url); + } + + // Touch events + var isTouched = false, + isMoved = false, + touchesStart = {}, + isScrolling, + activePage = [], + previousPage = [], + viewContainerWidth, + touchesDiff, + allowViewTouchMove = true, + touchStartTime, + activeNavbar = [], + previousNavbar = [], + activeNavElements, + previousNavElements, + activeNavBackIcon, + previousNavBackIcon, + dynamicNavbar, + pageShadow, + pageOpacity, + el; + + view.handleTouchStart = function (e) { + if (!allowViewTouchMove || !view.params.swipeBackPage || isTouched || app.swipeoutOpenedEl || !view.allowPageChange) return; + isMoved = false; + isTouched = true; + isScrolling = undefined; + touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = (new Date()).getTime(); + dynamicNavbar = view.params.dynamicNavbar && container.find('.navbar-inner').length > 1; + }; + + view.handleTouchMove = function (e) { + if (!isTouched) return; + var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (typeof isScrolling === 'undefined') { + isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x)); + } + if (isScrolling || e.f7PreventSwipeBack || app.preventSwipeBack) { + isTouched = false; + return; + } + if (!isMoved) { + var cancel = false; + // Calc values during first move fired + viewContainerWidth = container.width(); + var target = $(e.target); + var swipeout = target.hasClass('swipeout') ? target : target.parents('.swipeout'); + if (swipeout.length > 0) { + if (!app.rtl && swipeout.find('.swipeout-actions-left').length > 0) cancel = true; + if (app.rtl && swipeout.find('.swipeout-actions-right').length > 0) cancel = true; + } + activePage = target.is('.page') ? target : target.parents('.page'); + if (activePage.hasClass('no-swipeback')) cancel = true; + previousPage = container.find('.page-on-left:not(.cached)'); + var notFromBorder = touchesStart.x - container.offset().left > view.params.swipeBackPageActiveArea; + if (app.rtl) { + notFromBorder = touchesStart.x < container.offset().left - container[0].scrollLeft + viewContainerWidth - view.params.swipeBackPageActiveArea; + } + else { + notFromBorder = touchesStart.x - container.offset().left > view.params.swipeBackPageActiveArea; + } + if (notFromBorder) cancel = true; + if (previousPage.length === 0 || activePage.length === 0) cancel = true; + if (cancel) { + isTouched = false; + return; + } + + if (view.params.swipeBackPageAnimateShadow && !app.device.android) { + pageShadow = activePage.find('.swipeback-page-shadow'); + if (pageShadow.length === 0) { + pageShadow = $('
      '); + activePage.append(pageShadow); + } + } + if (view.params.swipeBackPageAnimateOpacity) { + pageOpacity = previousPage.find('.swipeback-page-opacity'); + if (pageOpacity.length === 0) { + pageOpacity = $('
      '); + previousPage.append(pageOpacity); + } + } + + if (dynamicNavbar) { + activeNavbar = container.find('.navbar-on-center:not(.cached)'); + previousNavbar = container.find('.navbar-on-left:not(.cached)'); + activeNavElements = activeNavbar.find('.left, .center, .right, .subnavbar, .fading'); + previousNavElements = previousNavbar.find('.left, .center, .right, .subnavbar, .fading'); + if (app.params.animateNavBackIcon) { + activeNavBackIcon = activeNavbar.find('.left.sliding .back .icon'); + previousNavBackIcon = previousNavbar.find('.left.sliding .back .icon'); + } + } + + // Close/Hide Any Picker + if ($('.picker-modal.modal-in').length > 0) { + app.closeModal($('.picker-modal.modal-in')); + } + } + e.f7PreventPanelSwipe = true; + isMoved = true; + e.preventDefault(); + + // RTL inverter + var inverter = app.rtl ? -1 : 1; + + // Touches diff + touchesDiff = (pageX - touchesStart.x - view.params.swipeBackPageThreshold) * inverter; + if (touchesDiff < 0) touchesDiff = 0; + var percentage = touchesDiff / viewContainerWidth; + + // Swipe Back Callback + var callbackData = { + percentage: percentage, + activePage: activePage[0], + previousPage: previousPage[0], + activeNavbar: activeNavbar[0], + previousNavbar: previousNavbar[0] + }; + if (view.params.onSwipeBackMove) { + view.params.onSwipeBackMove(callbackData); + } + container.trigger('swipeBackMove swipeback:move', callbackData); + + // Transform pages + var activePageTranslate = touchesDiff * inverter; + var previousPageTranslate = (touchesDiff / 5 - viewContainerWidth / 5) * inverter; + if (app.device.pixelRatio === 1) { + activePageTranslate = Math.round(activePageTranslate); + previousPageTranslate = Math.round(previousPageTranslate); + } + + activePage.transform('translate3d(' + activePageTranslate + 'px,0,0)'); + if (view.params.swipeBackPageAnimateShadow && !app.device.android) pageShadow[0].style.opacity = 1 - 1 * percentage; + + previousPage.transform('translate3d(' + previousPageTranslate + 'px,0,0)'); + if (view.params.swipeBackPageAnimateOpacity) pageOpacity[0].style.opacity = 1 - 1 * percentage; + + // Dynamic Navbars Animation + if (dynamicNavbar) { + var i; + for (i = 0; i < activeNavElements.length; i++) { + el = $(activeNavElements[i]); + if (!el.is('.subnavbar.sliding')) el[0].style.opacity = (1 - percentage * 1.3); + if (el[0].className.indexOf('sliding') >= 0) { + var activeNavTranslate = percentage * el[0].f7NavbarRightOffset; + if (app.device.pixelRatio === 1) activeNavTranslate = Math.round(activeNavTranslate); + el.transform('translate3d(' + activeNavTranslate + 'px,0,0)'); + if (app.params.animateNavBackIcon) { + if (el[0].className.indexOf('left') >= 0 && activeNavBackIcon.length > 0) { + activeNavBackIcon.transform('translate3d(' + -activeNavTranslate + 'px,0,0)'); + } + } + } + } + for (i = 0; i < previousNavElements.length; i++) { + el = $(previousNavElements[i]); + if (!el.is('.subnavbar.sliding')) el[0].style.opacity = percentage * 1.3 - 0.3; + if (el[0].className.indexOf('sliding') >= 0) { + var previousNavTranslate = el[0].f7NavbarLeftOffset * (1 - percentage); + if (app.device.pixelRatio === 1) previousNavTranslate = Math.round(previousNavTranslate); + el.transform('translate3d(' + previousNavTranslate + 'px,0,0)'); + if (app.params.animateNavBackIcon) { + if (el[0].className.indexOf('left') >= 0 && previousNavBackIcon.length > 0) { + previousNavBackIcon.transform('translate3d(' + -previousNavTranslate + 'px,0,0)'); + } + } + } + } + } + }; + + view.handleTouchEnd = function (e) { + if (!isTouched || !isMoved) { + isTouched = false; + isMoved = false; + return; + } + isTouched = false; + isMoved = false; + if (touchesDiff === 0) { + $([activePage[0], previousPage[0]]).transform(''); + if (dynamicNavbar) { + activeNavElements.transform('').css({opacity: ''}); + previousNavElements.transform('').css({opacity: ''}); + if (activeNavBackIcon && activeNavBackIcon.length > 0) activeNavBackIcon.transform(''); + if (previousNavBackIcon && activeNavBackIcon.length > 0) previousNavBackIcon.transform(''); + } + return; + } + var timeDiff = (new Date()).getTime() - touchStartTime; + var pageChanged = false; + // Swipe back to previous page + if ( + timeDiff < 300 && touchesDiff > 10 || + timeDiff >= 300 && touchesDiff > viewContainerWidth / 2 + ) { + activePage.removeClass('page-on-center').addClass('page-on-right'); + previousPage.removeClass('page-on-left').addClass('page-on-center'); + if (dynamicNavbar) { + activeNavbar.removeClass('navbar-on-center').addClass('navbar-on-right'); + previousNavbar.removeClass('navbar-on-left').addClass('navbar-on-center'); + } + pageChanged = true; + } + // Reset custom styles + // Add transitioning class for transition-duration + $([activePage[0], previousPage[0]]).transform('').addClass('page-transitioning'); + if (dynamicNavbar) { + activeNavElements.css({opacity: ''}) + .each(function () { + var translate = pageChanged ? this.f7NavbarRightOffset : 0; + var sliding = $(this); + sliding.transform('translate3d(' + translate + 'px,0,0)'); + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && activeNavBackIcon.length > 0) { + activeNavBackIcon.addClass('page-transitioning').transform('translate3d(' + -translate + 'px,0,0)'); + } + } + + }).addClass('page-transitioning'); + + previousNavElements.transform('').css({opacity: ''}).each(function () { + var translate = pageChanged ? 0 : this.f7NavbarLeftOffset; + var sliding = $(this); + sliding.transform('translate3d(' + translate + 'px,0,0)'); + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && previousNavBackIcon.length > 0) { + previousNavBackIcon.addClass('page-transitioning').transform('translate3d(' + -translate + 'px,0,0)'); + } + } + }).addClass('page-transitioning'); + } + allowViewTouchMove = false; + view.allowPageChange = false; + // Swipe Back Callback + var callbackData = { + activePage: activePage[0], + previousPage: previousPage[0], + activeNavbar: activeNavbar[0], + previousNavbar: previousNavbar[0] + }; + if (pageChanged) { + // Update View's URL + var url = view.history[view.history.length - 2]; + view.url = url; + + // Page before animation callback + app.pageBackCallback('before', view, {pageContainer: activePage[0], url: url, position: 'center', newPage: previousPage, oldPage: activePage, swipeBack: true}); + app.pageAnimCallback('before', view, {pageContainer: previousPage[0], url: url, position: 'left', newPage: previousPage, oldPage: activePage, swipeBack: true}); + + if (view.params.onSwipeBackBeforeChange) { + view.params.onSwipeBackBeforeChange(callbackData); + } + container.trigger('swipeBackBeforeChange swipeback:beforechange', callbackData); + } + else { + if (view.params.onSwipeBackBeforeReset) { + view.params.onSwipeBackBeforeReset(callbackData); + } + container.trigger('swipeBackBeforeReset swipeback:beforereset', callbackData); + } + + activePage.transitionEnd(function () { + $([activePage[0], previousPage[0]]).removeClass('page-transitioning'); + if (dynamicNavbar) { + activeNavElements.removeClass('page-transitioning').css({opacity: ''}); + previousNavElements.removeClass('page-transitioning').css({opacity: ''}); + if (activeNavBackIcon && activeNavBackIcon.length > 0) activeNavBackIcon.removeClass('page-transitioning'); + if (previousNavBackIcon && previousNavBackIcon.length > 0) previousNavBackIcon.removeClass('page-transitioning'); + } + allowViewTouchMove = true; + view.allowPageChange = true; + if (pageChanged) { + if (app.params.pushState && view.main) history.back(); + // Page after animation callback + app.pageBackCallback('after', view, {pageContainer: activePage[0], url: url, position: 'center', newPage: previousPage, oldPage: activePage, swipeBack: true}); + app.pageAnimCallback('after', view, {pageContainer: previousPage[0], url: url, position: 'left', newPage: previousPage, oldPage: activePage, swipeBack: true}); + app.router.afterBack(view, activePage, previousPage); + + if (view.params.onSwipeBackAfterChange) { + view.params.onSwipeBackAfterChange(callbackData); + } + container.trigger('swipeBackAfterChange swipeback:afterchange', callbackData); + } + else { + if (view.params.onSwipeBackAfterReset) { + view.params.onSwipeBackAfterReset(callbackData); + } + container.trigger('swipeBackAfterReset swipeback:afterreset', callbackData); + } + if (pageShadow && pageShadow.length > 0) pageShadow.remove(); + if (pageOpacity && pageOpacity.length > 0) pageOpacity.remove(); + }); + }; + view.attachEvents = function (detach) { + var action = detach ? 'off' : 'on'; + var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false; + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + container[action](app.touchEvents.start, view.handleTouchStart, passiveListener); + container[action](app.touchEvents.move, view.handleTouchMove, activeListener); + container[action](app.touchEvents.end, view.handleTouchEnd, passiveListener); + }; + view.detachEvents = function () { + view.attachEvents(true); + }; + + // Init + if (view.params.swipeBackPage && !app.params.material) { + view.attachEvents(); + } + + // Check view name to delete unwanted characters + if (view.params.name) view.params.name = view.params.name.replace(/[^a-zA-Z]/g, ''); + + // Add view to app + app.views.push(view); + if (view.main) { + app.mainView = view; + app.views.main = view; + } + else if(view.params.name) { + app[view.params.name + 'View'] = view; + app.views[view.params.name] = view; + } + + // Router + view.router = { + load: function (options) { + return app.router.load(view, options); + }, + back: function (options) { + return app.router.back(view, options); + }, + // Shortcuts + loadPage: function (options) { + options = options || {}; + if (typeof options === 'string') { + var url = options; + options = {}; + if (url && url.indexOf('#') === 0 && view.params.domCache) { + options.pageName = url.split('#')[1]; + } + else options.url = url; + } + return app.router.load(view, options); + }, + loadContent: function (content) { + return app.router.load(view, {content: content}); + }, + reloadPage: function (url) { + return app.router.load(view, {url: url, reload: true}); + }, + reloadContent: function (content) { + return app.router.load(view, {content: content, reload: true}); + }, + reloadPreviousPage: function (url) { + return app.router.load(view, {url: url, reloadPrevious: true, reload: true}); + }, + reloadPreviousContent: function (content) { + return app.router.load(view, {content: content, reloadPrevious: true, reload: true}); + }, + refreshPage: function () { + var options = { + url: view.url, + reload: true, + ignoreCache: true + }; + if (options.url && options.url.indexOf('#') === 0) { + if (view.params.domCache && view.pagesCache[options.url]) { + options.pageName = view.pagesCache[options.url]; + options.url = undefined; + delete options.url; + } + else if (view.contentCache[options.url]) { + options.content = view.contentCache[options.url]; + options.url = undefined; + delete options.url; + } + } + return app.router.load(view, options); + }, + refreshPreviousPage: function () { + var options = { + url: view.history[view.history.length - 2], + reload: true, + reloadPrevious: true, + ignoreCache: true + }; + if (options.url && options.url.indexOf('#') === 0 && view.params.domCache && view.pagesCache[options.url]) { + options.pageName = view.pagesCache[options.url]; + options.url = undefined; + delete options.url; + } + return app.router.load(view, options); + } + }; + + // Aliases for temporary backward compatibility + view.loadPage = view.router.loadPage; + view.loadContent = view.router.loadContent; + view.reloadPage = view.router.reloadPage; + view.reloadContent = view.router.reloadContent; + view.reloadPreviousPage = view.router.reloadPreviousPage; + view.reloadPreviousContent = view.router.reloadPreviousContent; + view.refreshPage = view.router.refreshPage; + view.refreshPreviousPage = view.router.refreshPreviousPage; + view.back = view.router.back; + + // Bars methods + view.hideNavbar = function (animated) { + return app.hideNavbar(container.find('.navbar'), animated); + }; + view.showNavbar = function (animated) { + return app.showNavbar(container.find('.navbar'), animated); + }; + view.hideToolbar = function (animated) { + return app.hideToolbar(container.find('.toolbar'), animated); + }; + view.showToolbar = function (animated) { + return app.showToolbar(container.find('.toolbar'), animated); + }; + + // Push State on load + if (app.params.pushState && app.params.pushStateOnLoad && view.main) { + var pushStateUrl; + var pushStateUrlSplit = docLocation.split(pushStateSeparator)[1]; + if (pushStateRoot) { + pushStateUrl = docLocation.split(app.params.pushStateRoot + pushStateSeparator)[1]; + } + else if (pushStateSeparator && docLocation.indexOf(pushStateSeparator) >= 0 && docLocation.indexOf(pushStateSeparator + '#') < 0) { + pushStateUrl = pushStateUrlSplit; + } + var pushStateAnimatePages = app.params.pushStateNoAnimation ? false : undefined; + var historyState = history.state; + if (pushStateUrl) { + if (pushStateUrl.indexOf('#') >= 0 && view.params.domCache && historyState && historyState.pageName && 'viewIndex' in historyState) { + app.router.load(view, {pageName: historyState.pageName, url: historyState.url, animatePages: pushStateAnimatePages, pushState: false}); + } + else if (pushStateUrl.indexOf('#') >= 0 && view.params.domCache && view.initialPagesUrl.indexOf(pushStateUrl) >= 0) { + app.router.load(view, {pageName: pushStateUrl.replace('#',''), animatePages: pushStateAnimatePages, pushState: false}); + } + else app.router.load(view, {url: pushStateUrl, animatePages: pushStateAnimatePages, pushState: false}); + } + else if (view.params.domCache && docLocation.indexOf(pushStateSeparator + '#') >= 0) { + if (historyState && historyState.pageName && 'viewIndex' in historyState) { + app.router.load(view, {pageName: historyState.pageName, url: historyState.url, animatePages: pushStateAnimatePages, pushState: false}); + } + else if (pushStateSeparator && pushStateUrlSplit.indexOf('#') === 0) { + if (view.initialPagesUrl.indexOf(pushStateUrlSplit)) { + app.router.load(view, {pageName: pushStateUrlSplit.replace('#', ''), animatePages: pushStateAnimatePages, pushState: false}); + } + } + } + } + + // Destroy + view.destroy = function () { + view.detachEvents(); + if (view.main) { + app.mainView = null; + delete app.mainView; + app.views.main = null; + delete app.views.main; + } + else if(view.params.name) { + app[view.params.name + 'View'] = null; + delete app[view.params.name + 'View']; + app.views[view.params.name] = null; + delete app.views[view.params.name]; + } + container.removeAttr('data-page'); + container[0].f7View = null; + delete container[0].f7View; + + app.views.splice(app.views.indexOf(view), 1); + + // Delete props & methods + for (var prop in view) { + if (view.hasOwnProperty(prop)) { + view[prop] = null; + delete view[prop]; + } + } + view = null; + }; + + // Plugin hook + app.pluginHook('addView', view); + + // Return view + return view; + }; + + app.addView = function (selector, params) { + return new View(selector, params); + }; + + app.getCurrentView = function (index) { + var popoverView = $('.popover.modal-in .view'); + var popupView = $('.popup.modal-in .view'); + var panelView = $('.panel.active .view'); + var appViews = $('.views'); + // Find active view as tab + var appView = appViews.children('.view'); + // Propably in tabs or split view + if (appView.length > 1) { + if (appView.hasClass('tab')) { + // Tabs + appView = appViews.children('.view.active'); + } + else { + // Split View, leave appView intact + } + } + if (popoverView.length > 0 && popoverView[0].f7View) return popoverView[0].f7View; + if (popupView.length > 0 && popupView[0].f7View) return popupView[0].f7View; + if (panelView.length > 0 && panelView[0].f7View) return panelView[0].f7View; + if (appView.length > 0) { + if (appView.length === 1 && appView[0].f7View) return appView[0].f7View; + if (appView.length > 1) { + var currentViews = []; + for (var i = 0; i < appView.length; i++) { + if (appView[i].f7View) currentViews.push(appView[i].f7View); + } + if (currentViews.length > 0 && typeof index !== 'undefined') return currentViews[index]; + if (currentViews.length > 1) return currentViews; + if (currentViews.length === 1) return currentViews[0]; + return undefined; + } + } + return undefined; + }; + + + /*====================================================== + ************ Navbars && Toolbars ************ + ======================================================*/ + // On Navbar Init Callback + app.navbarInitCallback = function (view, pageContainer, navbarContainer, navbarInnerContainer) { + if (!navbarContainer && navbarInnerContainer) navbarContainer = $(navbarInnerContainer).parent('.navbar')[0]; + if (!navbarInnerContainer || navbarInnerContainer.f7NavbarInitialized && view && !view.params.domCache) return; + var navbarData = { + container: navbarContainer, + innerContainer: navbarInnerContainer + }; + var pageData = pageContainer && pageContainer.f7PageData; + + var eventData = { + page: pageData, + navbar: navbarData + }; + + if (navbarInnerContainer.f7NavbarInitialized && ((view && view.params.domCache) || (!view && $(navbarContainer).parents('.popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal').length > 0))) { + // Reinit Navbar + app.reinitNavbar(navbarContainer, navbarInnerContainer); + + // Plugin hook + app.pluginHook('navbarReinit', eventData); + + // Event + $(navbarInnerContainer).trigger('navbarReinit navbar:reinit', eventData); + return; + } + navbarInnerContainer.f7NavbarInitialized = true; + // Before Init + app.pluginHook('navbarBeforeInit', navbarData, pageData); + $(navbarInnerContainer).trigger('navbarBeforeInit navbar:beforeinit', eventData); + + // Initialize Navbar + app.initNavbar(navbarContainer, navbarInnerContainer); + + // On init + app.pluginHook('navbarInit', navbarData, pageData); + $(navbarInnerContainer).trigger('navbarInit navbar:init', eventData); + }; + // Navbar Remove Callback + app.navbarRemoveCallback = function (view, pageContainer, navbarContainer, navbarInnerContainer) { + if (!navbarContainer && navbarInnerContainer) navbarContainer = $(navbarInnerContainer).parent('.navbar')[0]; + var navbarData = { + container: navbarContainer, + innerContainer: navbarInnerContainer + }; + var pageData; + if (pageContainer) { + pageData = pageContainer.f7PageData; + } + + var eventData = { + page: pageData, + navbar: navbarData + }; + app.pluginHook('navbarBeforeRemove', navbarData, pageData); + $(navbarInnerContainer).trigger('navbarBeforeRemove navbar:beforeremove', eventData); + navbarData = null; + pageData = null; + }; + app.initNavbar = function (navbarContainer, navbarInnerContainer) { + // Init Subnavbar Searchbar + if (app.initSearchbar) app.initSearchbar(navbarInnerContainer); + }; + app.reinitNavbar = function (navbarContainer, navbarInnerContainer) { + // Re init navbar methods + }; + app.initNavbarWithCallback = function (navbarContainer) { + navbarContainer = $(navbarContainer); + var viewContainer = navbarContainer.parents('.' + app.params.viewClass); + var view; + if (viewContainer.length === 0) return; + if (navbarContainer.parents('.navbar-through').length === 0 && viewContainer.find('.navbar-through').length === 0) return; + view = viewContainer[0].f7View || undefined; + + navbarContainer.find('.navbar-inner').each(function () { + var navbarInnerContainer = this; + var pageContainer; + if ($(navbarInnerContainer).attr('data-page')) { + // For dom cache + pageContainer = viewContainer.find('.page[data-page="' + $(navbarInnerContainer).attr('data-page') + '"]')[0]; + } + if (!pageContainer) { + var pages = viewContainer.find('.page'); + if (pages.length === 1) { + pageContainer = pages[0]; + } + else { + viewContainer.find('.page').each(function () { + if (this.f7PageData && this.f7PageData.navbarInnerContainer === navbarInnerContainer) { + pageContainer = this; + } + }); + } + } + app.navbarInitCallback(view, pageContainer, navbarContainer[0], navbarInnerContainer); + }); + }; + + // Size Navbars + app.sizeNavbars = function (viewContainer) { + if (app.params.material) return; + var navbarInner = viewContainer ? $(viewContainer).find('.navbar .navbar-inner:not(.cached)') : $('.navbar .navbar-inner:not(.cached)'); + navbarInner.each(function () { + var n = $(this); + if (n.hasClass('cached')) return; + var left = app.rtl ? n.find('.right') : n.find('.left'), + right = app.rtl ? n.find('.left') : n.find('.right'), + center = n.find('.center'), + subnavbar = n.find('.subnavbar'), + noLeft = left.length === 0, + noRight = right.length === 0, + leftWidth = noLeft ? 0 : left.outerWidth(true), + rightWidth = noRight ? 0 : right.outerWidth(true), + centerWidth = center.outerWidth(true), + navbarStyles = n.styles(), + navbarWidth = n[0].offsetWidth - parseInt(navbarStyles.paddingLeft, 10) - parseInt(navbarStyles.paddingRight, 10), + onLeft = n.hasClass('navbar-on-left'), + currLeft, diff; + + if (noRight) { + currLeft = navbarWidth - centerWidth; + } + if (noLeft) { + currLeft = 0; + } + if (!noLeft && !noRight) { + currLeft = (navbarWidth - rightWidth - centerWidth + leftWidth) / 2; + } + var requiredLeft = (navbarWidth - centerWidth) / 2; + if (navbarWidth - leftWidth - rightWidth > centerWidth) { + if (requiredLeft < leftWidth) { + requiredLeft = leftWidth; + } + if (requiredLeft + centerWidth > navbarWidth - rightWidth) { + requiredLeft = navbarWidth - rightWidth - centerWidth; + } + diff = requiredLeft - currLeft; + } + else { + diff = 0; + } + // RTL inverter + var inverter = app.rtl ? -1 : 1; + + if (center.hasClass('sliding')) { + center[0].f7NavbarLeftOffset = -(currLeft + diff) * inverter; + center[0].f7NavbarRightOffset = (navbarWidth - currLeft - diff - centerWidth) * inverter; + if (onLeft) { + if (app.params.animateNavBackIcon) { + var activeNavbarBackLink = n.parent().find('.navbar-on-center').find('.left.sliding .back .icon ~ span'); + if (activeNavbarBackLink.length > 0) { + center[0].f7NavbarLeftOffset += activeNavbarBackLink[0].offsetLeft; + } + } + center.transform('translate3d(' + center[0].f7NavbarLeftOffset + 'px, 0, 0)'); + } + } + if (!noLeft && left.hasClass('sliding')) { + if (app.rtl) { + left[0].f7NavbarLeftOffset = -(navbarWidth - left[0].offsetWidth) / 2 * inverter; + left[0].f7NavbarRightOffset = leftWidth * inverter; + } + else { + left[0].f7NavbarLeftOffset = -leftWidth; + left[0].f7NavbarRightOffset = (navbarWidth - left[0].offsetWidth) / 2; + if (app.params.animateNavBackIcon && left.find('.back .icon').length > 0) { + left[0].f7NavbarRightOffset -= left.find('.back .icon')[0].offsetWidth; + } + } + if (onLeft) left.transform('translate3d(' + left[0].f7NavbarLeftOffset + 'px, 0, 0)'); + } + if (!noRight && right.hasClass('sliding')) { + if (app.rtl) { + right[0].f7NavbarLeftOffset = -rightWidth * inverter; + right[0].f7NavbarRightOffset = (navbarWidth - right[0].offsetWidth) / 2 * inverter; + } + else { + right[0].f7NavbarLeftOffset = -(navbarWidth - right[0].offsetWidth) / 2; + right[0].f7NavbarRightOffset = rightWidth; + } + if (onLeft) right.transform('translate3d(' + right[0].f7NavbarLeftOffset + 'px, 0, 0)'); + } + if (subnavbar.length && subnavbar.hasClass('sliding')) { + subnavbar[0].f7NavbarLeftOffset = app.rtl ? subnavbar[0].offsetWidth : -subnavbar[0].offsetWidth; + subnavbar[0].f7NavbarRightOffset = -subnavbar[0].f7NavbarLeftOffset; + } + + // Center left + var centerLeft = diff; + if (app.rtl && noLeft && noRight && center.length > 0) centerLeft = -centerLeft; + center.css({left: centerLeft + 'px'}); + + }); + }; + + // Hide/Show Navbars/Toolbars + app.hideNavbar = function (navbarContainer, animated) { + if (typeof animated === 'undefined') animated = true; + $(navbarContainer).addClass('navbar-hidden' + (!animated ? (' not-animated') : '')); + return true; + }; + app.showNavbar = function (navbarContainer, animated) { + if (typeof animated === 'undefined') animated = true; + var navbar = $(navbarContainer); + if (animated) { + navbar.removeClass('not-animated'); + navbar.addClass('navbar-hiding').removeClass('navbar-hidden').transitionEnd(function () { + navbar.removeClass('navbar-hiding'); + }); + } + else { + navbar.removeClass('navbar-hidden navbar-hiding not-animated'); + } + return true; + }; + app.hideToolbar = function (toolbarContainer, animated) { + if (typeof animated === 'undefined') animated = true; + $(toolbarContainer).addClass('toolbar-hidden' + (!animated ? (' not-animated') : '')); + return true; + }; + app.showToolbar = function (toolbarContainer, animated) { + if (typeof animated === 'undefined') animated = true; + var toolbar = $(toolbarContainer); + if (animated) { + toolbar.removeClass('not-animated'); + toolbar.addClass('toolbar-hiding').removeClass('toolbar-hidden').transitionEnd(function () { + toolbar.removeClass('toolbar-hiding' + (!animated ? (' not-animated') : '')); + }); + } + else { + toolbar.removeClass('toolbar-hidden toolbar-hiding not-animated'); + } + + }; + + + /*====================================================== + ************ Searchbar ************ + ======================================================*/ + var Searchbar = function (container, params) { + var defaults = { + input: null, + clearButton: null, + cancelButton: null, + searchList: null, + searchIn: '.item-title', + searchBy: '', + found: null, + notFound: null, + overlay: null, + ignore: '.searchbar-ignore', + customSearch: false, + removeDiacritics: false, + hideDividers: true, + hideGroups: true, + /* Callbacks + onSearch + onEnable + onDisable + onClear + */ + + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined' || params[def] === null && defaults.hasOwnProperty(def)) { + params[def] = defaults[def]; + } + } + + // Instance + var s = this; + + // Material + s.material = app.params.material; + + // Params + s.params = params; + + // Container + container = $(container); + s.container = container; + + // Active + s.active = false; + + // Input + s.input = s.params.input ? $(s.params.input) : s.container.find('input[type="search"]'); + s.clearButton = s.params.clearButton ? $(s.params.clearButton) : s.container.find('.searchbar-clear'); + s.cancelButton = s.params.cancelButton ? $(s.params.cancelButton) : s.container.find('.searchbar-cancel'); + + // Search List + s.searchList = $(s.params.searchList); + + // Is Virtual List + s.isVirtualList = s.searchList.hasClass('virtual-list'); + + // Is In Page + s.pageContainer = s.container.parents('.page').eq(0); + + // Overlay + if (!s.params.overlay) { + s.overlay = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-overlay') : $('.searchbar-overlay'); + } + else { + s.overlay = $(s.params.overlay); + } + // Found and not found + if (!s.params.found) { + s.found = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-found') : $('.searchbar-found'); + } + else { + s.found = $(s.params.found); + } + if (!s.params.notFound) { + s.notFound = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-not-found') : $('.searchbar-not-found'); + } + else { + s.notFound = $(s.params.notFound); + } + + // Set Cancel button + var cancelMarginProp = app.rtl ? 'margin-left' : 'margin-right'; + var cancelButtonHasMargin = false; + s.setCancelButtonMargin = function () { + s.cancelButton.transition(0).show(); + s.cancelButton.css(cancelMarginProp, -s.cancelButton[0].offsetWidth + 'px'); + var clientLeft = s.cancelButton[0].clientLeft; + s.cancelButton.transition(''); + cancelButtonHasMargin = true; + }; + + // Trigger + s.triggerEvent = function (eventName, callbackName, eventData) { + s.container.trigger(eventName, eventData); + if (s.searchList.length > 0) s.searchList.trigger(eventName, eventData); + if (callbackName && s.params[callbackName]) s.params[callbackName](s, eventData); + }; + + // Enable/disalbe + s.enable = function (e) { + function _enable() { + if ((s.searchList.length || s.params.customSearch) && !s.container.hasClass('searchbar-active') && !s.query) s.overlay.addClass('searchbar-overlay-active'); + s.container.addClass('searchbar-active'); + if (s.cancelButton.length > 0 && !s.material) { + if (!cancelButtonHasMargin) { + s.setCancelButtonMargin(); + } + s.cancelButton.css(cancelMarginProp, '0px'); + } + s.triggerEvent('enableSearch searchbar:enable', 'onEnable'); + s.active = true; + } + if (app.device.ios && !app.params.material && e && e.type === 'focus') { + setTimeout(function () { + _enable(); + }, 400); + } + else { + _enable(); + } + }; + + s.disable = function () { + s.input.val('').trigger('change'); + s.container.removeClass('searchbar-active searchbar-not-empty'); + if (s.cancelButton.length > 0 && !s.material) s.cancelButton.css(cancelMarginProp, -s.cancelButton[0].offsetWidth + 'px'); + + if (s.searchList.length || s.params.customSearch) s.overlay.removeClass('searchbar-overlay-active'); + + s.active = false; + function _disable() { + s.input.blur(); + } + if (app.device.ios) { + setTimeout(function () { + _disable(); + }, 400); + } + else { + _disable(); + } + s.triggerEvent('disableSearch searchbar:disable', 'onDisable'); + }; + + // Clear + s.clear = function (e) { + if (!s.query && e && $(e.target).hasClass('searchbar-clear')) { + s.disable(); + return; + } + var previousQuery = s.value; + s.input.val('').trigger('change').focus(); + s.triggerEvent('clearSearch searchbar:clear', 'onClear', {previousQuery: previousQuery}); + }; + + // Search + s.handleInput = function () { + setTimeout(function () { + var value = s.input.val().trim(); + if ((s.searchList.length > 0 || s.params.customSearch) && (s.params.searchIn || s.isVirtualList)) s.search(value, true); + }, 0); + }; + + var previousQuery = ''; + var virtualList; + s.search = function (query, internal) { + if (previousQuery && query.trim() === previousQuery) return; + previousQuery = query.trim(); + + if (!internal) { + if (!s.active) { + s.enable(); + } + s.input.val(query); + } + s.query = s.value = query; + // Add active/inactive classes on overlay + if (query.length === 0) { + s.container.removeClass('searchbar-not-empty'); + if (s.searchList.length && s.container.hasClass('searchbar-active')) s.overlay.addClass('searchbar-overlay-active'); + } + else { + s.container.addClass('searchbar-not-empty'); + if (s.searchList.length && s.container.hasClass('searchbar-active')) s.overlay.removeClass('searchbar-overlay-active'); + } + + if (s.params.customSearch) { + s.triggerEvent('search searchbar:search', 'onSearch', {query: query}); + return; + } + + var foundItems = [], _vlQuery; + if (s.isVirtualList) { + virtualList = s.searchList[0].f7VirtualList; + if (query.trim() === '') { + virtualList.resetFilter(); + s.notFound.hide(); + s.found.show(); + return; + } + _vlQuery = s.params.removeDiacritics ? $.removeDiacritics(query) : query; + if (virtualList.params.searchAll) { + foundItems = virtualList.params.searchAll(_vlQuery, virtualList.items) || []; + } + else if (virtualList.params.searchByItem) { + for (var i = 0; i < virtualList.items.length; i++) { + if(virtualList.params.searchByItem(_vlQuery, i, virtualList.params.items[i])) { + foundItems.push(i); + } + } + } + } + else { + var values; + if (s.params.removeDiacritics) values = $.removeDiacritics(query.trim().toLowerCase()).split(' '); + else { + values = query.trim().toLowerCase().split(' '); + } + s.searchList.find('li').removeClass('hidden-by-searchbar').each(function (index, el) { + el = $(el); + var compareWithText = []; + el.find(s.params.searchIn).each(function () { + var itemText = $(this).text().trim().toLowerCase(); + if (s.params.removeDiacritics) itemText = $.removeDiacritics(itemText); + compareWithText.push(itemText); + }); + compareWithText = compareWithText.join(' '); + var wordsMatch = 0; + for (var i = 0; i < values.length; i++) { + if (compareWithText.indexOf(values[i]) >= 0) wordsMatch++; + } + if (wordsMatch !== values.length && !(s.params.ignore && el.is(s.params.ignore))) { + el.addClass('hidden-by-searchbar'); + } + else { + foundItems.push(el[0]); + } + }); + + if (s.params.hideDividers) { + s.searchList.find('.item-divider, .list-group-title').each(function () { + var title = $(this); + var nextElements = title.nextAll('li'); + var hide = true; + for (var i = 0; i < nextElements.length; i++) { + var nextEl = $(nextElements[i]); + if (nextEl.hasClass('list-group-title') || nextEl.hasClass('item-divider')) break; + if (!nextEl.hasClass('hidden-by-searchbar')) { + hide = false; + } + } + var ignore = s.params.ignore && title.is(s.params.ignore); + if (hide && !ignore) title.addClass('hidden-by-searchbar'); + else title.removeClass('hidden-by-searchbar'); + }); + } + if (s.params.hideGroups) { + s.searchList.find('.list-group').each(function () { + var group = $(this); + var ignore = s.params.ignore && group.is(s.params.ignore); + var notHidden = group.find('li:not(.hidden-by-searchbar)'); + if (notHidden.length === 0 && !ignore) { + group.addClass('hidden-by-searchbar'); + } + else { + group.removeClass('hidden-by-searchbar'); + } + }); + } + } + s.triggerEvent('search searchbar:search', 'onSearch', {query: query, foundItems: foundItems}); + if (foundItems.length === 0) { + s.notFound.show(); + s.found.hide(); + } + else { + s.notFound.hide(); + s.found.show(); + } + if (s.isVirtualList) { + virtualList.filterItems(foundItems); + } + }; + + // Events + function preventSubmit(e) { + e.preventDefault(); + } + + s.attachEvents = function (destroy) { + var method = destroy ? 'off' : 'on'; + s.container[method]('submit', preventSubmit); + if (!s.material) s.cancelButton[method]('click', s.disable); + s.overlay[method]('click', s.disable); + s.input[method]('focus', s.enable); + s.input[method]('change keydown keypress keyup compositionend', s.handleInput); + s.clearButton[method]('click', s.clear); + + }; + s.detachEvents = function() { + s.attachEvents(true); + }; + + // Init Destroy + s.init = function () { + s.attachEvents(); + }; + s.destroy = function () { + if (!s) return; + s.detachEvents(); + s = null; + }; + + // Init + s.init(); + + s.container[0].f7Searchbar = s; + return s; + + }; + app.searchbar = function (container, params) { + return new Searchbar(container, params); + }; + app.initSearchbar = function (container) { + container = $(container); + var searchbar = container.hasClass('searchbar') ? container : container.find('.searchbar'); + if (searchbar.length === 0) return; + if (!searchbar.hasClass('searchbar-init')) return; + + var sb = app.searchbar(searchbar, searchbar.dataset()); + + function onBeforeRemove() { + if (sb) sb.destroy(); + } + if (container.hasClass('page')) { + container.once('pageBeforeRemove', onBeforeRemove); + } + else if (container.hasClass('navbar-inner')) { + container.once('navbarBeforeRemove', onBeforeRemove); + } + }; + + + /*====================================================== + ************ Messagebar ************ + ======================================================*/ + var Messagebar = function (container, params) { + var defaults = { + textarea: null, + maxHeight: null, + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined' || params[def] === null) { + params[def] = defaults[def]; + } + } + + // Instance + var m = this; + + // Params + m.params = params; + + // Container + m.container = $(container); + if (m.container.length === 0) return; + + // Textarea + m.textarea = m.params.textarea ? $(m.params.textarea) : m.container.find('textarea'); + + // Is In Page + m.pageContainer = m.container.parents('.page').eq(0); + m.pageContent = m.pageContainer.find('.page-content'); + + // Initial Sizes + m.pageContentPadding = parseInt(m.pageContent.css('padding-bottom')); + m.initialBarHeight = m.container[0].offsetHeight; + m.initialAreaHeight = m.textarea[0].offsetHeight; + + + // Resize textarea + m.sizeTextarea = function () { + // Reset + m.textarea.css({'height': ''}); + + var height = m.textarea[0].offsetHeight; + var diff = height - m.textarea[0].clientHeight; + var scrollHeight = m.textarea[0].scrollHeight; + + // Update + if (scrollHeight + diff > height) { + var newAreaHeight = scrollHeight + diff; + var newBarHeight = m.initialBarHeight + (newAreaHeight - m.initialAreaHeight); + var maxBarHeight = m.params.maxHeight || m.container.parents('.view')[0].offsetHeight - 88; + if (newBarHeight > maxBarHeight) { + newBarHeight = parseInt(maxBarHeight, 10); + newAreaHeight = newBarHeight - m.initialBarHeight + m.initialAreaHeight; + } + m.textarea.css('height', newAreaHeight + 'px'); + m.container.css('height', newBarHeight + 'px'); + var onBottom = (m.pageContent[0].scrollTop === m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight); + if (m.pageContent.length > 0) { + m.pageContent.css('padding-bottom', newBarHeight + 'px'); + if (m.pageContent.find('.messages-new-first').length === 0 && onBottom) { + m.pageContent.scrollTop(m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight); + } + } + } + else { + if (m.pageContent.length > 0) { + m.container.css({'height': '', 'bottom': ''}); + m.pageContent.css({'padding-bottom': ''}); + } + } + }; + + // Clear + m.clear = function () { + m.textarea.val('').trigger('change'); + }; + m.value = function (value) { + if (typeof value === 'undefined') return m.textarea.val(); + else m.textarea.val(value).trigger('change'); + }; + + // Handle textarea + m.textareaTimeout = undefined; + m.handleTextarea = function (e) { + clearTimeout(m.textareaTimeout); + m.textareaTimeout = setTimeout(function () { + m.sizeTextarea(); + }, 0); + }; + + //Events + function preventSubmit(e) { + e.preventDefault(); + } + + m.attachEvents = function (destroy) { + var method = destroy ? 'off' : 'on'; + m.container[method]('submit', preventSubmit); + m.textarea[method]('change keydown keypress keyup paste cut', m.handleTextarea); + }; + m.detachEvents = function () { + m.attachEvents(true); + }; + + // Init Destroy + m.init = function () { + m.attachEvents(); + }; + m.destroy = function () { + m.detachEvents(); + m = null; + }; + + // Init + m.init(); + + m.container[0].f7Messagebar = m; + return m; + }; + app.messagebar = function (container, params) { + return new Messagebar(container, params); + }; + app.initPageMessagebar = function (pageContainer) { + pageContainer = $(pageContainer); + var messagebar = pageContainer.hasClass('messagebar') ? pageContainer : pageContainer.find('.messagebar'); + if (messagebar.length === 0) return; + if (!messagebar.hasClass('messagebar-init')) return; + var mb = app.messagebar(messagebar, messagebar.dataset()); + + // Destroy on page remove + function pageBeforeRemove() { + mb.destroy(); + pageContainer.off('page:beforeremove', pageBeforeRemove); + } + if (pageContainer.hasClass('page')) { + pageContainer.on('page:beforeremove', pageBeforeRemove); + } + }; + + + /*====================================================== + ************ XHR ************ + ======================================================*/ + // XHR Caching + app.cache = []; + app.removeFromCache = function (url) { + var index = false; + for (var i = 0; i < app.cache.length; i++) { + if (app.cache[i].url === url) index = i; + } + if (index !== false) app.cache.splice(index, 1); + }; + + // XHR + app.xhr = false; + app.get = function (url, view, ignoreCache, callback) { + // should we ignore get params or not + var _url = url; + if (app.params.cacheIgnoreGetParameters && url.indexOf('?') >= 0) { + _url = url.split('?')[0]; + } + if (app.params.cache && !ignoreCache && url.indexOf('nocache') < 0 && app.params.cacheIgnore.indexOf(_url) < 0) { + // Check is the url cached + for (var i = 0; i < app.cache.length; i++) { + if (app.cache[i].url === _url) { + // Check expiration + if ((new Date()).getTime() - app.cache[i].time < app.params.cacheDuration) { + // Load from cache + callback(app.cache[i].content); + return false; + } + } + } + } + + app.xhr = $.ajax({ + url: url, + method: 'GET', + beforeSend: app.params.onAjaxStart, + complete: function (xhr, status) { + if (status !== 'error' && status !== 'timeout' && (xhr.status >= 200 && xhr.status < 300) || xhr.status === 0) { + if (app.params.cache && xhr.responseText !== '') { + app.removeFromCache(_url); + app.cache.push({ + url: _url, + time: (new Date()).getTime(), + content: xhr.responseText + }); + } + callback(xhr.responseText, false); + } + else { + callback(xhr.responseText, true); + } + if (app.params.onAjaxComplete) app.params.onAjaxComplete(xhr); + }, + error: function (xhr) { + callback(xhr.responseText, true); + if (app.params.onAjaxError) app.params.onAjaxError(xhr); + } + }); + if (view) view.xhr = app.xhr; + + return app.xhr; + }; + + + /*====================================================== + ************ Pages ************ + ======================================================*/ + // Page Callbacks API + app.pageCallbacks = {}; + + app.onPage = function (callbackName, pageName, callback) { + if (pageName && pageName.split(' ').length > 1) { + var pageNames = pageName.split(' '); + var returnCallbacks = []; + for (var i = 0; i < pageNames.length; i++) { + returnCallbacks.push(app.onPage(callbackName, pageNames[i], callback)); + } + returnCallbacks.remove = function () { + for (var i = 0; i < returnCallbacks.length; i++) { + returnCallbacks[i].remove(); + } + }; + returnCallbacks.trigger = function () { + for (var i = 0; i < returnCallbacks.length; i++) { + returnCallbacks[i].trigger(); + } + }; + return returnCallbacks; + } + var callbacks = app.pageCallbacks[callbackName][pageName]; + if (!callbacks) { + callbacks = app.pageCallbacks[callbackName][pageName] = []; + } + app.pageCallbacks[callbackName][pageName].push(callback); + return { + remove: function () { + var removeIndex; + for (var i = 0; i < callbacks.length; i++) { + if (callbacks[i].toString() === callback.toString()) { + removeIndex = i; + } + } + if (typeof removeIndex !== 'undefined') callbacks.splice(removeIndex, 1); + }, + trigger: callback + }; + }; + + //Create callbacks methods dynamically + function createPageCallback(callbackName) { + var capitalized = callbackName.replace(/^./, function (match) { + return match.toUpperCase(); + }); + app['onPage' + capitalized] = function (pageName, callback) { + return app.onPage(callbackName, pageName, callback); + }; + } + + var pageCallbacksNames = ('beforeInit init reinit beforeAnimation afterAnimation back afterBack beforeRemove').split(' '); + for (var i = 0; i < pageCallbacksNames.length; i++) { + app.pageCallbacks[pageCallbacksNames[i]] = {}; + createPageCallback(pageCallbacksNames[i]); + } + + app.triggerPageCallbacks = function (callbackName, pageName, pageData) { + var allPagesCallbacks = app.pageCallbacks[callbackName]['*']; + if (allPagesCallbacks) { + for (var j = 0; j < allPagesCallbacks.length; j++) { + allPagesCallbacks[j](pageData); + } + } + var callbacks = app.pageCallbacks[callbackName][pageName]; + if (!callbacks || callbacks.length === 0) return; + for (var i = 0; i < callbacks.length; i++) { + callbacks[i](pageData); + } + }; + + // On Page Init Callback + app.pageInitCallback = function (view, params) { + var pageContainer = params.pageContainer; + if (!pageContainer) return; + if (pageContainer.f7PageInitialized && view && !view.params.domCache) return; + + var pageQuery = params.query; + if (!pageQuery) { + if (params.url && params.url.indexOf('?') > 0) { + pageQuery = $.parseUrlQuery(params.url || ''); + } + else if (pageContainer.f7PageData && pageContainer.f7PageData.query) { + pageQuery = pageContainer.f7PageData.query; + } + else { + pageQuery = {}; + } + } + + // Page Data + var pageData = { + container: pageContainer, + url: params.url, + query: pageQuery, + name: $(pageContainer).attr('data-page'), + view: view, + from: params.position, + context: params.context, + navbarInnerContainer: params.navbarInnerContainer, + fromPage: params.fromPage + }; + if (params.fromPage && !params.fromPage.navbarInnerContainer && params.oldNavbarInnerContainer) { + params.fromPage.navbarInnerContainer = params.oldNavbarInnerContainer; + } + + if (pageContainer.f7PageInitialized && ((view && view.params.domCache) || (!view && $(pageContainer).parents('.popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal').length > 0))) { + // Reinit Page + app.reinitPage(pageContainer); + + // Callbacks + app.pluginHook('pageReinit', pageData); + if (app.params.onPageReinit) app.params.onPageReinit(app, pageData); + app.triggerPageCallbacks('reinit', pageData.name, pageData); + $(pageData.container).trigger('pageReinit page:reinit', {page: pageData}); + return; + } + pageContainer.f7PageInitialized = true; + + // Store pagedata in page + pageContainer.f7PageData = pageData; + + // Update View's activePage + if (view && !params.preloadOnly && !params.reloadPrevious) { + // Add data-page on view + $(view.container).attr('data-page', pageData.name); + // Update View active page data + view.activePage = pageData; + } + + // Before Init Callbacks + app.pluginHook('pageBeforeInit', pageData); + if (app.params.onPageBeforeInit) app.params.onPageBeforeInit(app, pageData); + app.triggerPageCallbacks('beforeInit', pageData.name, pageData); + $(pageData.container).trigger('pageBeforeInit page:beforeinit', {page: pageData}); + + // Init page + app.initPage(pageContainer); + + // Init Callback + app.pluginHook('pageInit', pageData); + if (app.params.onPageInit) app.params.onPageInit(app, pageData); + app.triggerPageCallbacks('init', pageData.name, pageData); + $(pageData.container).trigger('pageInit page:init', {page: pageData}); + }; + app.pageRemoveCallback = function (view, pageContainer, position) { + var pageContext; + if (!pageContainer) return; + if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context; + // Page Data + var pageData = { + container: pageContainer, + name: $(pageContainer).attr('data-page'), + view: view, + url: pageContainer.f7PageData && pageContainer.f7PageData.url, + query: pageContainer.f7PageData && pageContainer.f7PageData.query, + navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer, + from: position, + context: pageContext + }; + // Before Init Callback + app.pluginHook('pageBeforeRemove', pageData); + if (app.params.onPageBeforeRemove) app.params.onPageBeforeRemove(app, pageData); + app.triggerPageCallbacks('beforeRemove', pageData.name, pageData); + $(pageData.container).trigger('pageBeforeRemove page:beforeremove', {page: pageData}); + pageData = null; + }; + app.pageBackCallback = function (callback, view, params) { + // Page Data + var pageContainer = params.pageContainer; + var pageContext; + if (!pageContainer) return; + if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context; + + var pageData = { + container: pageContainer, + name: $(pageContainer).attr('data-page'), + url: pageContainer.f7PageData && pageContainer.f7PageData.url, + query: pageContainer.f7PageData && pageContainer.f7PageData.query, + view: view, + from: params.position, + context: pageContext, + navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer, + swipeBack: params.swipeBack + }; + + if (callback === 'after') { + app.pluginHook('pageAfterBack', pageData); + if (app.params.onPageAfterBack) app.params.onPageAfterBack(app, pageData); + app.triggerPageCallbacks('afterBack', pageData.name, pageData); + $(pageContainer).trigger('pageAfterBack page:afterback', {page: pageData}); + + } + if (callback === 'before') { + app.pluginHook('pageBack', pageData); + if (app.params.onPageBack) app.params.onPageBack(app, pageData); + app.triggerPageCallbacks('back', pageData.name, pageData); + $(pageData.container).trigger('pageBack page:back', {page: pageData}); + } + }; + app.pageAnimCallback = function (callback, view, params) { + var pageContainer = params.pageContainer; + var pageContext; + if (!pageContainer) return; + if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context; + + var pageQuery = params.query; + if (!pageQuery) { + if (params.url && params.url.indexOf('?') > 0) { + pageQuery = $.parseUrlQuery(params.url || ''); + } + else if (pageContainer.f7PageData && pageContainer.f7PageData.query) { + pageQuery = pageContainer.f7PageData.query; + } + else { + pageQuery = {}; + } + } + // Page Data + var pageData = { + container: pageContainer, + url: params.url, + query: pageQuery, + name: $(pageContainer).attr('data-page'), + view: view, + from: params.position, + context: pageContext, + swipeBack: params.swipeBack, + navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer, + fromPage: params.fromPage + }; + var oldPage = params.oldPage, + newPage = params.newPage; + + // Update page date + pageContainer.f7PageData = pageData; + + if (callback === 'after') { + app.pluginHook('pageAfterAnimation', pageData); + if (app.params.onPageAfterAnimation) app.params.onPageAfterAnimation(app, pageData); + app.triggerPageCallbacks('afterAnimation', pageData.name, pageData); + $(pageData.container).trigger('pageAfterAnimation page:afteranimation', {page: pageData}); + + } + if (callback === 'before') { + // Add data-page on view + $(view.container).attr('data-page', pageData.name); + + // Update View's activePage + if (view) view.activePage = pageData; + + // Hide/show navbar dynamically + if (newPage.hasClass('no-navbar') && !oldPage.hasClass('no-navbar')) { + view.hideNavbar(); + } + if (!newPage.hasClass('no-navbar') && (oldPage.hasClass('no-navbar') || oldPage.hasClass('no-navbar-by-scroll'))) { + view.showNavbar(); + } + // Hide/show navbar toolbar + if (newPage.hasClass('no-toolbar') && !oldPage.hasClass('no-toolbar')) { + view.hideToolbar(); + } + if (!newPage.hasClass('no-toolbar') && (oldPage.hasClass('no-toolbar') || oldPage.hasClass('no-toolbar-by-scroll'))) { + view.showToolbar(); + } + // Hide/show tabbar + var tabBar; + if (newPage.hasClass('no-tabbar') && !oldPage.hasClass('no-tabbar')) { + tabBar = $(view.container).find('.tabbar'); + if (tabBar.length === 0) tabBar = $(view.container).parents('.' + app.params.viewsClass).find('.tabbar'); + app.hideToolbar(tabBar); + } + if (!newPage.hasClass('no-tabbar') && (oldPage.hasClass('no-tabbar') || oldPage.hasClass('no-tabbar-by-scroll'))) { + tabBar = $(view.container).find('.tabbar'); + if (tabBar.length === 0) tabBar = $(view.container).parents('.' + app.params.viewsClass).find('.tabbar'); + app.showToolbar(tabBar); + } + + oldPage.removeClass('no-navbar-by-scroll no-toolbar-by-scroll'); + // Callbacks + app.pluginHook('pageBeforeAnimation', pageData); + if (app.params.onPageBeforeAnimation) app.params.onPageBeforeAnimation(app, pageData); + app.triggerPageCallbacks('beforeAnimation', pageData.name, pageData); + $(pageData.container).trigger('pageBeforeAnimation page:beforeanimation', {page: pageData}); + } + }; + + // Init Page Events and Manipulations + app.initPage = function (pageContainer) { + pageContainer = $(pageContainer); + if (pageContainer.length === 0) return; + // Size navbars on page load + if (app.sizeNavbars) app.sizeNavbars(pageContainer.parents('.' + app.params.viewClass)[0]); + // Init messages + if (app.initPageMessages) app.initPageMessages(pageContainer); + // Init forms storage + if (app.initFormsStorage) app.initFormsStorage(pageContainer); + // Init smart select + if (app.initSmartSelects) app.initSmartSelects(pageContainer); + // Init slider + if (app.initPageSwiper) app.initPageSwiper(pageContainer); + // Init pull to refres + if (app.initPullToRefresh) app.initPullToRefresh(pageContainer); + // Init infinite scroll + if (app.initPageInfiniteScroll) app.initPageInfiniteScroll(pageContainer); + // Init searchbar + if (app.initSearchbar) app.initSearchbar(pageContainer); + // Init message bar + if (app.initPageMessagebar) app.initPageMessagebar(pageContainer); + // Init scroll toolbars + if (app.initPageScrollToolbars) app.initPageScrollToolbars(pageContainer); + // Init lazy images + if (app.initImagesLazyLoad) app.initImagesLazyLoad(pageContainer); + // Init progress bars + if (app.initPageProgressbar) app.initPageProgressbar(pageContainer); + // Init resizeable textareas + if (app.initPageResizableTextarea) app.initPageResizableTextarea(pageContainer); + // Init Data Table + if (app.initPageDataTables) app.initPageDataTables(pageContainer); + // Init Material Preloader + if (app.params.material && app.initPageMaterialPreloader) app.initPageMaterialPreloader(pageContainer); + // Init Material Inputs + if (app.params.material && app.initPageMaterialInputs) app.initPageMaterialInputs(pageContainer); + // Init Material Tabbar + if (app.params.material && app.initPageMaterialTabbar) app.initPageMaterialTabbar(pageContainer); + }; + app.reinitPage = function (pageContainer) { + pageContainer = $(pageContainer); + if (pageContainer.length === 0) return; + // Size navbars on page reinit + if (app.sizeNavbars) app.sizeNavbars(pageContainer.parents('.' + app.params.viewClass)[0]); + // Reinit slider + if (app.reinitPageSwiper) app.reinitPageSwiper(pageContainer); + // Reinit lazy load + if (app.reinitLazyLoad) app.reinitLazyLoad(pageContainer); + }; + app.initPageWithCallback = function (pageContainer) { + pageContainer = $(pageContainer); + var viewContainer = pageContainer.parents('.' + app.params.viewClass); + if (viewContainer.length === 0) return; + var view = viewContainer[0].f7View || undefined; + var url = view && view.url ? view.url : undefined; + if (viewContainer && pageContainer.attr('data-page')) { + viewContainer.attr('data-page', pageContainer.attr('data-page')); + } + app.pageInitCallback(view, {pageContainer: pageContainer[0], url: url, position: 'center'}); + }; + + + /*====================================================== + ************ Navigation / Router ************ + ======================================================*/ + app.router = { + _remove: function (el) { + if (app.params.routerRemoveTimeout || app.params.routerRemoveWithTimeout) { + setTimeout(function () { + $(el).remove(); + }, 0); + } + else $(el).remove(); + }, + _modalsSelector: '.popup, .modal, .popover, .actions-modal, .picker-modal, .login-screen', + // Temporary DOM Element + temporaryDom: document.createElement('div'), + + // Find page or navbar in passed container which are related to View + findElement: function (selector, container, view, notCached) { + container = $(container); + if (notCached) selector = selector + ':not(.cached)'; + var found = container.find(selector).filter(function (index, el) { + return $(el).parents(app.router._modalsSelector).length === 0; + }); + if (found.length > 1) { + if (typeof view.selector === 'string') { + // Search in related view + found = container.find(view.selector + ' ' + selector); + } + if (found.length > 1) { + // Search in main view + found = container.find('.' + app.params.viewMainClass + ' ' + selector); + } + } + if (found.length === 1) return found; + else { + // Try to find non cached + if (!notCached) found = app.router.findElement(selector, container, view, true); + if (found && found.length === 1) return found; + if (found && found.length > 1) return $(found[0]); + else return undefined; + } + }, + + // Set pages classes for animationEnd + animatePages: function (leftPage, rightPage, direction) { + // Loading new page + var removeClasses = 'page-on-center page-on-right page-on-left'; + if (direction === 'to-left') { + leftPage.removeClass(removeClasses).addClass('page-from-center-to-left'); + rightPage.removeClass(removeClasses).addClass('page-from-right-to-center'); + } + // Go back + if (direction === 'to-right') { + leftPage.removeClass(removeClasses).addClass('page-from-left-to-center'); + rightPage.removeClass(removeClasses).addClass('page-from-center-to-right'); + + } + }, + + // Prepare navbar before animarion + prepareNavbar: function (newNavbarInner, oldNavbarInner, newNavbarPosition) { + $(newNavbarInner).find('.sliding').each(function () { + var sliding = $(this); + var slidingOffset = newNavbarPosition === 'right' ? this.f7NavbarRightOffset : this.f7NavbarLeftOffset; + + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) { + sliding.find('.back .icon').transform('translate3d(' + (-slidingOffset) + 'px,0,0)'); + } + } + sliding.transform('translate3d(' + slidingOffset + 'px,0,0)'); + }); + }, + + // Set navbars classes for animation + animateNavbars: function (leftNavbarInner, rightNavbarInner, direction) { + // Loading new page + var removeClasses = 'navbar-on-right navbar-on-center navbar-on-left'; + if (direction === 'to-left') { + rightNavbarInner.removeClass(removeClasses).addClass('navbar-from-right-to-center'); + rightNavbarInner.find('.sliding').each(function () { + var sliding = $(this); + sliding.transform('translate3d(0px,0,0)'); + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) { + sliding.find('.back .icon').transform('translate3d(0px,0,0)'); + } + } + }); + + leftNavbarInner.removeClass(removeClasses).addClass('navbar-from-center-to-left'); + leftNavbarInner.find('.sliding').each(function () { + var sliding = $(this); + var rightText; + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('center') && rightNavbarInner.find('.sliding.left .back .icon').length > 0) { + rightText = rightNavbarInner.find('.sliding.left .back span'); + if (rightText.length > 0) this.f7NavbarLeftOffset += rightText[0].offsetLeft; + } + if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) { + sliding.find('.back .icon').transform('translate3d(' + (-this.f7NavbarLeftOffset) + 'px,0,0)'); + } + } + sliding.transform('translate3d(' + (this.f7NavbarLeftOffset) + 'px,0,0)'); + }); + } + // Go back + if (direction === 'to-right') { + leftNavbarInner.removeClass(removeClasses).addClass('navbar-from-left-to-center'); + leftNavbarInner.find('.sliding').each(function () { + var sliding = $(this); + sliding.transform('translate3d(0px,0,0)'); + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) { + sliding.find('.back .icon').transform('translate3d(0px,0,0)'); + } + } + }); + + rightNavbarInner.removeClass(removeClasses).addClass('navbar-from-center-to-right'); + rightNavbarInner.find('.sliding').each(function () { + var sliding = $(this); + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) { + sliding.find('.back .icon').transform('translate3d(' + (-this.f7NavbarRightOffset) + 'px,0,0)'); + } + } + sliding.transform('translate3d(' + (this.f7NavbarRightOffset) + 'px,0,0)'); + }); + } + }, + + preprocess: function(view, content, url, next) { + // Plugin hook + app.pluginHook('routerPreprocess', view, content, url, next); + + // Preprocess by plugin + content = app.pluginProcess('preprocess', content); + + if (view && view.params && view.params.preprocess) { + content = view.params.preprocess(content, url, next); + if (typeof content !== 'undefined') { + next(content); + } + } + else if (app.params.preprocess) { + content = app.params.preprocess(content, url, next); + if (typeof content !== 'undefined') { + next(content); + } + } + else { + next(content); + } + }, + preroute: function(view, options, isBack) { + if (isBack) options.isBack = true; + app.pluginHook('routerPreroute', view, options); + if ((app.params.preroute && app.params.preroute(view, options) === false) || (view && view.params.preroute && view.params.preroute(view, options) === false)) { + return true; + } + else { + return false; + } + }, + + template7Render: function (view, options) { + var url = options.url, + content = options.content, //initial content + t7_rendered_content = options.content, // will be rendered using Template7 + context = options.context, // Context data for Template7 + contextName = options.contextName, + template = options.template; // Template 7 compiled template + + var t7_ctx, t7_template; + if (typeof content === 'string') { + if (url) { + if (app.template7Cache[url] && !options.ignoreCache) t7_template = t7.cache[url]; + else { + t7_template = t7.compile(content); + t7.cache[url] = t7_template; + } + } + else t7_template = t7.compile(content); + } + else if (template) { + t7_template = template; + } + + if (context) { + t7_ctx = context; + if (context && url) { + view.contextCache[url] = context; + } + } + else { + if (contextName) { + if (contextName.indexOf('.') >= 0) { + var _ctx_path = contextName.split('.'); + var _ctx = t7.data[_ctx_path[0]]; + for (var i = 1; i < _ctx_path.length; i++) { + if (_ctx_path[i]) _ctx = _ctx[_ctx_path[i]]; + } + t7_ctx = _ctx; + } + else t7_ctx = t7.data[contextName]; + } + if (!t7_ctx && url) { + t7_ctx = t7.data['url:' + url]; + } + if (!t7_ctx && typeof content === 'string' && !template) { + //try to find by page name in content + var pageNameMatch = content.match(/(data-page=["'][^"^']*["'])/); + if (pageNameMatch) { + var page = pageNameMatch[0].split('data-page=')[1].replace(/['"]/g, ''); + if (page) t7_ctx = t7.data['page:' + page]; + } + } + if (!t7_ctx && template && t7.templates) { + // Try to find matched template name in t7.templates + for (var templateName in t7.templates) { + if (t7.templates[templateName] === template) t7_ctx = t7.data[templateName]; + } + } + if (!t7_ctx && url && url in view.contextCache) { + t7_ctx = view.contextCache[url]; + } + if (!t7_ctx) { + t7_ctx = {}; + } + } + + if (t7_template && t7_ctx) { + if (typeof t7_ctx === 'function') t7_ctx = t7_ctx(); + if (url) { + // Extend data with URL query + var query = $.parseUrlQuery(url); + t7_ctx.url_query = {}; + for (var key in query) { + t7_ctx.url_query[key] = query[key]; + } + } + try { + t7_rendered_content = t7_template(t7_ctx); + } + catch (e) { + t7_rendered_content = ''; + if (window.console && window.console.error) { + console.error(e); + } + } + } + + return {content: t7_rendered_content, context: t7_ctx}; + } + }; + + + app.router._load = function (view, options) { + // Plugin hook + app.pluginHook('routerLoad', view, options); + + var url = options.url, + content = options.content, //initial content + t7_rendered = {content: options.content}, + template = options.template, // Template 7 compiled template + pageName = options.pageName, + viewContainer = $(view.container), + pagesContainer = $(view.pagesContainer), + animatePages = options.animatePages, + newPage, oldPage, pagesInView, i, oldNavbarInner, newNavbarInner, navbar, dynamicNavbar, reloadPosition, + isDynamicPage = typeof url === 'undefined' && content || template, + pushState = options.pushState, + pageElement = options.pageElement; + + if (typeof animatePages === 'undefined') animatePages = view.params.animatePages; + + // Render with Template7 + if (app.params.template7Pages && typeof content === 'string' || template) { + t7_rendered = app.router.template7Render(view, options); + if (t7_rendered.content && !content) { + content = t7_rendered.content; + } + } + + app.router.temporaryDom.innerHTML = ''; + + // Parse DOM + if (!pageName && !pageElement) { + if ((typeof content === 'string') || (url && (typeof content === 'string'))) { + app.router.temporaryDom.innerHTML = t7_rendered.content; + } else { + if ('length' in content && content.length > 1) { + for (var ci = 0; ci < content.length; ci++) { + $(app.router.temporaryDom).append(content[ci]); + } + } else { + $(app.router.temporaryDom).append(content); + } + } + } + + // Reload position + reloadPosition = options.reload && (options.reloadPrevious ? 'left' : 'center'); + + // Find new page + if (pageName) newPage = pagesContainer.find('.page[data-page="' + pageName + '"]'); + else { + if (pageElement) newPage = $(pageElement); + else newPage = app.router.findElement('.page', app.router.temporaryDom, view); + } + // If page not found exit + if (!newPage || newPage.length === 0 || (pageName && view.activePage && view.activePage.name === pageName)) { + view.allowPageChange = true; + return; + } + + newPage.addClass(options.reload ? 'page-on-' + reloadPosition : 'page-on-right'); + + // Find old page (should be the last one) and remove older pages + pagesInView = pagesContainer.children('.page:not(.cached)'); + if (pageElement) { + pagesInView = pagesInView.filter(function (index, page) { + if (page !== pageElement) return page; + }); + } + + if (options.reload && options.reloadPrevious && pagesInView.length === 1) { + view.allowPageChange = true; + return; + } + + if (options.reload) { + oldPage = pagesInView.eq(pagesInView.length - 1); + } + else { + if (pagesInView.length > 1) { + for (i = 0; i < pagesInView.length - 2; i++) { + if (!view.params.domCache) { + app.pageRemoveCallback(view, pagesInView[i], 'left'); + app.router._remove(pagesInView[i]); + } + else { + $(pagesInView[i]).addClass('cached'); + } + } + if (!view.params.domCache) { + app.pageRemoveCallback(view, pagesInView[i], 'left'); + app.router._remove(pagesInView[i]); + } + else { + $(pagesInView[i]).addClass('cached'); + } + } + oldPage = pagesContainer.children('.page:not(.cached)'); + } + if (pageElement && oldPage.length > 1) { + oldPage = oldPage.filter(function (index, page) { + if (page !== pageElement) return page; + }); + } + if(view.params.domCache || pageElement) newPage.removeClass('cached'); + + // Dynamic navbar + if (view.params.dynamicNavbar) { + dynamicNavbar = true; + // Find navbar + if (pageName) { + newNavbarInner = viewContainer.find('.navbar-inner[data-page="' + pageName + '"]'); + } + else { + newNavbarInner = app.router.findElement('.navbar-inner', app.router.temporaryDom, view); + } + if (!newNavbarInner || newNavbarInner.length === 0) { + // Look in page + newNavbarInner = newPage.find('.navbar-inner'); + if (!newNavbarInner || newNavbarInner.length === 0) { + // Set false + dynamicNavbar = false; + } + else { + if (newNavbarInner.parent('.navbar').length > 0) { + newNavbarInner.prependTo(newPage); + } + } + } + if (dynamicNavbar && newPage.find('.navbar').length > 0) { + app.router._remove(newPage.find('.navbar').filter(function(index, el){ + return $(el).parents(app.router._modalsSelector).length === 0; + })); + } + navbar = viewContainer.children('.navbar'); + if (options.reload) { + oldNavbarInner = navbar.find('.navbar-inner:not(.cached):last-child'); + } + else { + oldNavbarInner = navbar.find('.navbar-inner:not(.cached)'); + + if (oldNavbarInner.length > 0) { + for (i = 0; i < oldNavbarInner.length - 1; i++) { + if (!view.params.domCache) { + app.navbarRemoveCallback(view, pagesInView[i], navbar[0], oldNavbarInner[i]); + app.router._remove(oldNavbarInner[i]); + } + else + $(oldNavbarInner[i]).addClass('cached'); + } + if (!newNavbarInner && oldNavbarInner.length === 1) { + if (!view.params.domCache) { + app.navbarRemoveCallback(view, pagesInView[0], navbar[0], oldNavbarInner[0]); + app.router._remove(oldNavbarInner[0]); + } + else + $(oldNavbarInner[0]).addClass('cached'); + } + oldNavbarInner = navbar.find('.navbar-inner:not(.cached)'); + } + } + } + if (dynamicNavbar) { + newNavbarInner.addClass(options.reload ? 'navbar-on-' + reloadPosition : 'navbar-on-right'); + if(view.params.domCache || pageElement) newNavbarInner.removeClass('cached'); + newPage[0].f7RelatedNavbar = newNavbarInner[0]; + newNavbarInner[0].f7RelatedPage = newPage[0]; + } + + // save content areas into view's cache + if (!url) { + var newPageName = pageName || newPage.attr('data-page'); + if (isDynamicPage) url = '#' + app.params.dynamicPageUrl.replace(/{{name}}/g, newPageName).replace(/{{index}}/g, view.history.length - (options.reload ? 1 : 0)); + else url = '#' + newPageName; + if (!view.params.domCache) { + view.contentCache[url] = content; + } + if (view.params.domCache && pageName) { + view.pagesCache[url] = pageName; + } + } + else if (url && pageElement) { + view.pageElementsCache[url] = { + page: newPage, + navbarInner: newNavbarInner + }; + } + + // Push State + if (app.params.pushState && !options.reloadPrevious && view.main) { + if (typeof pushState === 'undefined') pushState = true; + var pushStateRoot = app.params.pushStateRoot || ''; + var method = options.reload ? 'replaceState' : 'pushState'; + if (pushState) { + if (!isDynamicPage && !pageName) { + history[method]({url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url); + } + else if (isDynamicPage && content) { + history[method]({content: typeof content === 'string' ? content : '', url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url); + } + else if (pageName) { + history[method]({pageName: pageName, url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url); + } + } + } + + // Update View history + view.url = url; + if (options.reload) { + var lastUrl = view.history[view.history.length - (options.reloadPrevious ? 2 : 1)]; + if (lastUrl && + lastUrl.indexOf('#') === 0 && + lastUrl in view.contentCache && + lastUrl !== url && + view.history.indexOf(lastUrl) === -1) { + view.contentCache[lastUrl] = null; + delete view.contentCache[lastUrl]; + } + else if (lastUrl && + lastUrl in view.pageElementsCache && + lastUrl !== url && + (view.history.indexOf(lastUrl) === -1 || view.history.indexOf(lastUrl) === view.history.length - 1)) { + view.pageElementsCache[lastUrl] = null; + delete view.pageElementsCache[lastUrl]; + } + if (lastUrl && + lastUrl in view.contextCache && + lastUrl !== url && + (view.history.indexOf(lastUrl) === -1 || view.history.indexOf(lastUrl) === view.history.length - 1)) { + view.contextCache[lastUrl] = null; + delete view.contextCache[lastUrl]; + } + view.history[view.history.length - (options.reloadPrevious ? 2 : 1)] = url; + } + else { + view.history.push(url); + } + + // Unique history + var historyBecameUnique = false; + if (view.params.uniqueHistory) { + var _history = view.history; + var _url = url; + if (view.params.uniqueHistoryIgnoreGetParameters) { + _history = []; + _url = url.split('?')[0]; + for (i = 0; i < view.history.length; i++) { + _history.push(view.history[i].split('?')[0]); + } + } + + if (_history.indexOf(_url) !== _history.lastIndexOf(_url)) { + view.history = view.history.slice(0, _history.indexOf(_url)); + view.history.push(url); + historyBecameUnique = true; + } + } + // Dom manipulations + if (options.reloadPrevious) { + oldPage = oldPage.prev('.page'); + newPage.insertBefore(oldPage); + if (dynamicNavbar) { + oldNavbarInner = oldNavbarInner.prev('.navbar-inner'); + newNavbarInner.insertAfter(oldNavbarInner); + } + } + else { + pagesContainer.append(newPage[0]); + if (dynamicNavbar) navbar.append(newNavbarInner[0]); + } + // Remove Old Page And Navbar + if (options.reload) { + if (view.params.domCache && view.initialPages.indexOf(oldPage[0]) >= 0) { + oldPage.addClass('cached'); + if (dynamicNavbar) oldNavbarInner.addClass('cached'); + } + else { + app.pageRemoveCallback(view, oldPage[0], reloadPosition); + if (dynamicNavbar) app.navbarRemoveCallback(view, oldPage[0], navbar[0], oldNavbarInner[0]); + app.router._remove(oldPage); + if (dynamicNavbar) app.router._remove(oldNavbarInner); + } + } + + // Page Init Events + app.pageInitCallback(view, { + pageContainer: newPage[0], + url: url, + position: options.reload ? reloadPosition : 'right', + navbarInnerContainer: dynamicNavbar ? newNavbarInner && newNavbarInner[0] : undefined, + oldNavbarInnerContainer: dynamicNavbar ? oldNavbarInner && oldNavbarInner[0] : undefined, + context: t7_rendered.context || options.context, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData, + reload: options.reload, + reloadPrevious: options.reloadPrevious + }); + + // Navbar init event + if (dynamicNavbar) { + app.navbarInitCallback(view, newPage[0], navbar[0], newNavbarInner[0], url, options.reload ? reloadPosition : 'right'); + } + + if (options.reload) { + view.allowPageChange = true; + if (historyBecameUnique) view.refreshPreviousPage(); + return; + } + + if (dynamicNavbar && animatePages) { + app.router.prepareNavbar(newNavbarInner, oldNavbarInner, 'right'); + } + // Force reLayout + var clientLeft = newPage[0].clientLeft; + + // Before Anim Callback + app.pageAnimCallback('before', view, { + pageContainer: newPage[0], + url: url, + position: 'right', + oldPage: oldPage, + newPage: newPage, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData + }); + + function afterAnimation() { + view.allowPageChange = true; + newPage.removeClass('page-from-right-to-center page-on-right page-on-left').addClass('page-on-center'); + oldPage.removeClass('page-from-center-to-left page-on-center page-on-right').addClass('page-on-left'); + if (dynamicNavbar) { + newNavbarInner.removeClass('navbar-from-right-to-center navbar-on-left navbar-on-right').addClass('navbar-on-center'); + oldNavbarInner.removeClass('navbar-from-center-to-left navbar-on-center navbar-on-right').addClass('navbar-on-left'); + } + app.pageAnimCallback('after', view, { + pageContainer: newPage[0], + url: url, + position: 'right', + oldPage: oldPage, + newPage: newPage, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData + }); + if (app.params.pushState && view.main) app.pushStateClearQueue(); + if (!(view.params.swipeBackPage || view.params.preloadPreviousPage)) { + if (view.params.domCache) { + oldPage.addClass('cached'); + if (dynamicNavbar) oldNavbarInner.addClass('cached'); + } + else { + if (!(url.indexOf('#') === 0 && newPage.attr('data-page').indexOf('smart-select-') === 0)) { + app.pageRemoveCallback(view, oldPage[0], 'left'); + if (dynamicNavbar) app.navbarRemoveCallback(view, oldPage[0], navbar[0], oldNavbarInner[0]); + app.router._remove(oldPage); + if (dynamicNavbar) app.router._remove(oldNavbarInner); + } + } + } + if (view.params.uniqueHistory && historyBecameUnique) { + view.refreshPreviousPage(); + } + } + if (animatePages) { + // Set pages before animation + if (app.params.material && app.params.materialPageLoadDelay) { + setTimeout(function () { + app.router.animatePages(oldPage, newPage, 'to-left', view); + }, app.params.materialPageLoadDelay); + } + else { + app.router.animatePages(oldPage, newPage, 'to-left', view); + } + + // Dynamic navbar animation + if (dynamicNavbar) { + setTimeout(function() { + app.router.animateNavbars(oldNavbarInner, newNavbarInner, 'to-left', view); + }, 0); + } + newPage.animationEnd(function () { + afterAnimation(); + }); + } + else { + if (dynamicNavbar) newNavbarInner.find('.sliding, .sliding .back .icon').transform(''); + afterAnimation(); + } + + }; + + app.router.load = function (view, options) { + options = options || {}; + if (app.routerPreOptions) { + options = app.routerPreOptions(view, options) || {}; + } + if (options.component && app.componentLoader) { + try { + app.componentLoader(view, options, function (newOptions) { + app.router.load(view, newOptions); + }); + } catch (e) {} + return; + } + if (app.router.preroute(view, options)) { + return false; + } + var url = options.url; + var content = options.content; + var pageName = options.pageName; + var pageElement = options.pageElement; + if (pageName) { + if (pageName.indexOf('?') > 0) { + options.query = $.parseUrlQuery(pageName); + options.pageName = pageName = pageName.split('?')[0]; + } + } + var template = options.template; + if (view.params.reloadPages === true) options.reload = true; + + if (!view.allowPageChange) return false; + if (url && view.url === url && !options.reload && !view.params.allowDuplicateUrls) return false; + view.allowPageChange = false; + if (app.xhr && view.xhr && view.xhr === app.xhr) { + app.xhr.abort(); + app.xhr = false; + } + function proceed(content) { + app.router.preprocess(view, content, url, function (content) { + options.content = content; + app.router._load(view, options); + }); + } + if (content || pageName || pageElement) { + proceed(content); + return; + } + else if (template) { + app.router._load(view, options); + return; + } + + if (!options.url || options.url === '#') { + view.allowPageChange = true; + return; + } + app.get(options.url, view, options.ignoreCache, function (content, error) { + if (error) { + view.allowPageChange = true; + return; + } + proceed(content); + }); + }; + + app.router._back = function (view, options) { + options = options || {}; + + app.pluginHook('routerBack', view, options); + + var url = options.url, + content = options.content, + t7_rendered = {content: options.content}, // will be rendered using Template7 + template = options.template, // Template 7 compiled template + animatePages = options.animatePages, + preloadOnly = options.preloadOnly, + pushState = options.pushState, + ignoreCache = options.ignoreCache, + force = options.force, + pageName = options.pageName, + pageElement = options.pageElement; + + var viewContainer = $(view.container), + pagesContainer = $(view.pagesContainer), + pagesInView = pagesContainer.children('.page:not(.cached)'), + oldPage, newPage, oldNavbarInner, newNavbarInner, navbar, navbarInners, dynamicNavbar, manipulateDom = true; + + if (typeof animatePages === 'undefined') animatePages = view.params.animatePages; + + // Render with Template7 + if (app.params.template7Pages && typeof content === 'string' || template) { + t7_rendered = app.router.template7Render(view, options); + if (t7_rendered.content && !content) { + content = t7_rendered.content; + } + } + + // Animation + function afterAnimation() { + app.pageBackCallback('after', view, { + pageContainer: oldPage[0], + url: url, + position: 'center', + oldPage: oldPage, + newPage: newPage, + }); + app.pageAnimCallback('after', view, { + pageContainer: newPage[0], + url: url, + position: 'left', + oldPage: oldPage, + newPage: newPage, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData + }); + app.router.afterBack(view, oldPage[0], newPage[0]); + } + function animateBack() { + // Page before animation callback + app.pageBackCallback('before', view, { + pageContainer: oldPage[0], + url: url, + position: 'center', + oldPage: oldPage, + newPage: newPage, + }); + app.pageAnimCallback('before', view, { + pageContainer: newPage[0], + url: url, + position: 'left', + oldPage: oldPage, + newPage: newPage, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData + }); + + if (animatePages) { + // Set pages before animation + app.router.animatePages(newPage, oldPage, 'to-right', view); + + // Dynamic navbar animation + if (dynamicNavbar) { + setTimeout(function () { + app.router.animateNavbars(newNavbarInner, oldNavbarInner, 'to-right', view); + }, 0); + } + + newPage.animationEnd(function () { + afterAnimation(); + }); + } + else { + if (dynamicNavbar) newNavbarInner.find('.sliding, .sliding .back .icon').transform(''); + afterAnimation(); + } + } + + function parseNewPage() { + app.router.temporaryDom.innerHTML = ''; + // Parse DOM + if ((typeof content === 'string') || (url && (typeof content === 'string'))) { + app.router.temporaryDom.innerHTML = t7_rendered.content; + } else { + if ('length' in content && content.length > 1) { + for (var ci = 0; ci < content.length; ci++) { + $(app.router.temporaryDom).append(content[ci]); + } + } else { + $(app.router.temporaryDom).append(content); + } + } + if (pageElement) newPage = $(pageElement); + else newPage = app.router.findElement('.page', app.router.temporaryDom, view); + + if (view.params.dynamicNavbar) { + // Find navbar + newNavbarInner = app.router.findElement('.navbar-inner', app.router.temporaryDom, view); + } + } + function setPages() { + // If pages not found or there are still more than one, exit + if (!newPage || newPage.length === 0) { + view.allowPageChange = true; + return; + } + if (view.params.dynamicNavbar && typeof dynamicNavbar === 'undefined') { + if (!newNavbarInner || newNavbarInner.length === 0) { + dynamicNavbar = false; + } + else { + dynamicNavbar = true; + } + } + + newPage.addClass('page-on-left').removeClass('cached'); + if (dynamicNavbar) { + navbar = viewContainer.children('.navbar'); + navbarInners = navbar.find('.navbar-inner:not(.cached)'); + newNavbarInner.addClass('navbar-on-left').removeClass('cached'); + } + // Remove/hide previous page in force mode + if (force) { + var pageToRemove, navbarToRemove; + pageToRemove = $(pagesInView[pagesInView.length - 2]); + + if (dynamicNavbar) navbarToRemove = $(pageToRemove[0] && pageToRemove[0].f7RelatedNavbar || navbarInners[navbarInners.length - 2]); + if (view.params.domCache && view.initialPages.indexOf(pageToRemove[0]) >= 0) { + if (pageToRemove.length && pageToRemove[0] !== newPage[0]) pageToRemove.addClass('cached'); + if (dynamicNavbar && navbarToRemove.length && navbarToRemove[0] !== newNavbarInner[0]) { + navbarToRemove.addClass('cached'); + } + } + else { + var removeNavbar = dynamicNavbar && navbarToRemove.length; + if (pageToRemove.length) { + app.pageRemoveCallback(view, pageToRemove[0], 'right'); + if (removeNavbar) { + app.navbarRemoveCallback(view, pageToRemove[0], navbar[0], navbarToRemove[0]); + } + app.router._remove(pageToRemove); + if (removeNavbar) app.router._remove(navbarToRemove); + } + else if (removeNavbar) { + app.navbarRemoveCallback(view, pageToRemove[0], navbar[0], navbarToRemove[0]); + app.router._remove(navbarToRemove); + } + } + pagesInView = pagesContainer.children('.page:not(.cached)'); + if (dynamicNavbar) { + navbarInners = viewContainer.children('.navbar').find('.navbar-inner:not(.cached)'); + } + if (view.history.indexOf(url) >= 0) { + view.history = view.history.slice(0, view.history.indexOf(url) + 2); + } + else { + if (view.history[[view.history.length - 2]]) { + view.history[view.history.length - 2] = url; + } + else { + view.history.unshift(url); + } + } + } + + oldPage = $(pagesInView[pagesInView.length - 1]); + if (view.params.domCache) { + if (oldPage[0] === newPage[0]) { + oldPage = pagesContainer.children('.page.page-on-center'); + if (oldPage.length === 0 && view.activePage) oldPage = $(view.activePage.container); + } + } + + if (dynamicNavbar && !oldNavbarInner) { + oldNavbarInner = $(navbarInners[navbarInners.length - 1]); + if (view.params.domCache) { + if (oldNavbarInner[0] === newNavbarInner[0]) { + oldNavbarInner = navbar.children('.navbar-inner.navbar-on-center:not(.cached)'); + } + if (oldNavbarInner.length === 0) { + oldNavbarInner = navbar.children('.navbar-inner[data-page="'+oldPage.attr('data-page')+'"]'); + } + } + if (oldNavbarInner.length === 0 || newNavbarInner[0] === oldNavbarInner[0]) dynamicNavbar = false; + } + + if (dynamicNavbar) { + if (manipulateDom) newNavbarInner.insertBefore(oldNavbarInner); + newNavbarInner[0].f7RelatedPage = newPage[0]; + newPage[0].f7RelatedNavbar = newNavbarInner[0]; + } + if (manipulateDom) newPage.insertBefore(oldPage); + + // Page Init Events + app.pageInitCallback(view, { + pageContainer: newPage[0], + url: url, + position: 'left', + navbarInnerContainer: dynamicNavbar ? newNavbarInner[0] : undefined, + oldNavbarInnerContainer: dynamicNavbar ? oldNavbarInner && oldNavbarInner[0] : undefined, + context: t7_rendered.context, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData, + preloadOnly: preloadOnly + }); + if (dynamicNavbar) { + app.navbarInitCallback(view, newPage[0], navbar[0], newNavbarInner[0], url, 'right'); + } + + if (dynamicNavbar && newNavbarInner.hasClass('navbar-on-left') && animatePages) { + app.router.prepareNavbar(newNavbarInner, oldNavbarInner, 'left'); + } + + if (preloadOnly) { + view.allowPageChange = true; + return; + } + + // Update View's URL + view.url = url; + + // Force reLayout + var clientLeft = newPage[0].clientLeft; + + animateBack(); + + // Push state + if (app.params.pushState && view.main) { + if (typeof pushState === 'undefined') pushState = true; + if (!preloadOnly && history.state && pushState) { + history.back(); + } + } + return; + } + + // Simple go back when we have pages on left + if (pagesInView.length > 1 && !force) { + // Exit if only preloadOnly + if (preloadOnly) { + view.allowPageChange = true; + return; + } + // Update View's URL + view.url = view.history[view.history.length - 2]; + url = view.url; + + // Define old and new pages + newPage = $(pagesInView[pagesInView.length - 2]); + oldPage = $(pagesInView[pagesInView.length - 1]); + + // Dynamic navbar + if (view.params.dynamicNavbar) { + dynamicNavbar = true; + // Find navbar + navbarInners = viewContainer.children('.navbar').find('.navbar-inner:not(.cached)'); + newNavbarInner = $(navbarInners[0]); + oldNavbarInner = $(navbarInners[1]); + if (newNavbarInner.length === 0 || oldNavbarInner.length === 0 || oldNavbarInner[0] === newNavbarInner[0]) { + dynamicNavbar = false; + } + } + manipulateDom = false; + setPages(); + return; + } + + if (!force) { + // Go back when there is no pages on left + if (!preloadOnly) { + view.url = view.history[view.history.length - 2]; + url = view.url; + } + + if (content) { + parseNewPage(); + setPages(); + return; + } + else if (pageName) { + // Get dom cached pages + newPage = $(viewContainer).find('.page[data-page="' + pageName + '"]'); + if (view.params.dynamicNavbar) { + newNavbarInner = $(viewContainer).children('.navbar').find('.navbar-inner[data-page="' + pageName + '"]'); + if (newNavbarInner.length === 0 && newPage[0].f7RelatedNavbar) { + newNavbarInner = $(newPage[0].f7RelatedNavbar); + } + if (newNavbarInner.length === 0 && newPage[0].f7PageData) { + newNavbarInner = $(newPage[0].f7PageData.navbarInnerContainer); + } + } + setPages(); + return; + } + else if (url && url in view.pageElementsCache) { + newPage = view.pageElementsCache[url].page; + newNavbarInner = view.pageElementsCache[url].navbarInner; + setPages(); + return; + } + else { + view.allowPageChange = true; + return; + } + } + else { + if (url && url === view.url || pageName && view.activePage && view.activePage.name === pageName) { + view.allowPageChange = true; + return; + } + // Go back with force url + if (content) { + parseNewPage(); + setPages(); + return; + } + else if (pageName && view.params.domCache) { + if (pageName) url = '#' + pageName; + + newPage = $(viewContainer).find('.page[data-page="' + pageName + '"]'); + if (newPage[0].f7PageData && newPage[0].f7PageData.url) { + url = newPage[0].f7PageData.url; + } + if (view.params.dynamicNavbar) { + newNavbarInner = $(viewContainer).children('.navbar').find('.navbar-inner[data-page="' + pageName + '"]'); + if (newNavbarInner.length === 0 && newPage[0].f7RelatedNavbar) { + newNavbarInner = $(newPage[0].f7RelatedNavbar); + } + if (newNavbarInner.length === 0 && newPage[0].f7PageData) { + newNavbarInner = $(newPage[0].f7PageData.navbarInnerContainer); + } + } + setPages(); + return; + } + else if (pageElement && url) { + newPage = $(pageElement); + if (view.params.dynamicNavbar) { + newNavbarInner = newPage.find('.navbar-inner').filter(function (index, el) { + return $(el).parents(app.router._modalsSelector).length === 0; + }); + if (newNavbarInner.length > 0) { + newPage.prepend(newNavbarInner); + app.router._remove(newPage.find('.navbar').filter(function (index, el) { + return $(el).parents(app.router._modalsSelector).length === 0; + })); + } + } + setPages(); + return; + } + else { + view.allowPageChange = true; + return; + } + } + + }; + app.router.back = function (view, options) { + options = options || {}; + if (app.routerPreOptions) { + options = app.routerPreOptions(view, options) || {}; + } + if (options.component && app.componentLoader) { + try { + app.componentLoader(view, options, function (newOptions) { + app.router.load(view, newOptions); + }); + } catch (e) {} + return; + } + if (app.router.preroute(view, options, true)) { + return false; + } + var url = options.url; + var content = options.content; + var pageName = options.pageName; + var pageElement = options.pageElement; + if (pageName) { + if (pageName.indexOf('?') > 0) { + options.query = $.parseUrlQuery(pageName); + options.pageName = pageName = pageName.split('?')[0]; + } + } + var force = options.force; + if (!view.allowPageChange) return false; + view.allowPageChange = false; + if (app.xhr && view.xhr && view.xhr === app.xhr) { + app.xhr.abort(); + app.xhr = false; + } + var pagesInView = $(view.pagesContainer).find('.page:not(.cached)'); + + function proceed(content) { + app.router.preprocess(view, content, url, function (content) { + options.content = content; + app.router._back(view, options); + }); + } + if (pagesInView.length > 1 && !force) { + // Simple go back to previos page in view + app.router._back(view, options); + return; + } + if (!force) { + url = view.history[view.history.length - 2] || options.url; + if (!options.url) options.url = url; + if (!url) { + view.allowPageChange = true; + return; + } + if (url.indexOf('#') === 0 && view.contentCache[url]) { + proceed(view.contentCache[url]); + return; + } + else if (url.indexOf('#') === 0 && view.params.domCache) { + if (!pageName) options.pageName = url.split('#')[1]; + proceed(); + return; + } + else if (url && url in view.pageElementsCache) { + proceed(); + } + else if (url.indexOf('#') !== 0) { + // Load ajax page + app.get(options.url, view, options.ignoreCache, function (content, error) { + if (error) { + view.allowPageChange = true; + return; + } + proceed(content); + }); + return; + } + } + else { + // Go back with force url + if (!url && content) { + proceed(content); + return; + } + else if (!url && pageName) { + if (pageName) url = '#' + pageName; + proceed(); + return; + } + else if (url && pageElement) { + proceed(); + return; + } + else if (url) { + app.get(options.url, view, options.ignoreCache, function (content, error) { + if (error) { + view.allowPageChange = true; + return; + } + proceed(content); + }); + return; + } + } + view.allowPageChange = true; + return; + }; + + app.router.afterBack = function (view, oldPage, newPage) { + // Remove old page and set classes on new one + oldPage = $(oldPage); + newPage = $(newPage); + + if (view.params.domCache && view.initialPages.indexOf(oldPage[0]) >= 0) { + oldPage.removeClass('page-from-center-to-right').addClass('cached'); + } + else { + app.pageRemoveCallback(view, oldPage[0], 'right'); + app.router._remove(oldPage); + } + + newPage.removeClass('page-from-left-to-center page-on-left').addClass('page-on-center'); + view.allowPageChange = true; + + // Update View's History + var previousURL = view.history.pop(); + + var newNavbar; + + // Updated dynamic navbar + if (view.params.dynamicNavbar) { + var inners = $(view.container).children('.navbar').find('.navbar-inner:not(.cached)'); + var oldNavbar = $(oldPage[0].f7RelatedNavbar || inners[1]); + if (view.params.domCache && view.initialNavbars.indexOf(oldNavbar[0]) >= 0) { + oldNavbar.removeClass('navbar-from-center-to-right').addClass('cached'); + } + else { + app.navbarRemoveCallback(view, oldPage[0], undefined, oldNavbar[0]); + app.router._remove(oldNavbar); + } + newNavbar = $(inners[0]).removeClass('navbar-on-left navbar-from-left-to-center').addClass('navbar-on-center'); + } + + // Remove pages in dom cache + if (view.params.domCache) { + $(view.container).find('.page.cached').each(function () { + var page = $(this); + var pageUrl = page[0].f7PageData && page[0].f7PageData.url; + if (pageUrl && view.history.indexOf(pageUrl) < 0 && view.initialPages.indexOf(this) < 0) { + app.pageRemoveCallback(view, page[0], 'right'); + if (page[0].f7RelatedNavbar && view.params.dynamicNavbar) app.navbarRemoveCallback(view, page[0], undefined, page[0].f7RelatedNavbar); + app.router._remove(page); + if (page[0].f7RelatedNavbar && view.params.dynamicNavbar) app.router._remove(page[0].f7RelatedNavbar); + } + }); + } + + // Check previous page is content based only and remove it from content cache + if (!view.params.domCache && + previousURL && + previousURL.indexOf('#') > -1 && + (previousURL in view.contentCache) && + // If the same page is in the history multiple times, don't remove it. + view.history.indexOf(previousURL) === -1) { + view.contentCache[previousURL] = null; + delete view.contentCache[previousURL]; + } + if (previousURL && + (previousURL in view.pageElementsCache) && + // If the same page is in the history multiple times, don't remove it. + view.history.indexOf(previousURL) === -1) { + view.pageElementsCache[previousURL] = null; + delete view.pageElementsCache[previousURL]; + } + // Check for context cache + if (previousURL && + (previousURL in view.contextCache) && + // If the same page is in the history multiple times, don't remove it. + view.history.indexOf(previousURL) === -1) { + view.contextCache[previousURL] = null; + delete view.contextCache[previousURL]; + } + + if (app.params.pushState && view.main) app.pushStateClearQueue(); + + // Preload previous page + if (view.params.preloadPreviousPage) { + if (view.params.domCache && view.history.length > 1) { + var preloadUrl = view.history[view.history.length - 2]; + var previousPage; + var previousNavbar; + if (preloadUrl && view.pagesCache[preloadUrl]) { + // Load by page name + previousPage = $(view.container).find('.page[data-page="' + view.pagesCache[preloadUrl] + '"]'); + if (previousPage.next('.page')[0] !== newPage[0]) previousPage.insertBefore(newPage); + if (newNavbar) { + previousNavbar = $(view.container).children('.navbar').find('.navbar-inner[data-page="' + view.pagesCache[preloadUrl] + '"]'); + if(!previousNavbar || previousNavbar.length === 0) previousNavbar = newNavbar.prev('.navbar-inner.cached'); + if (previousNavbar.next('.navbar-inner')[0] !== newNavbar[0]) previousNavbar.insertBefore(newNavbar); + } + } + else { + // Just load previous page + previousPage = newPage.prev('.page.cached'); + if (newNavbar) previousNavbar = newNavbar.prev('.navbar-inner.cached'); + } + if (previousPage && previousPage.length > 0) previousPage.removeClass('cached page-on-right page-on-center').addClass('page-on-left'); + if (previousNavbar && previousNavbar.length > 0) previousNavbar.removeClass('cached navbar-on-right navbar-on-center').addClass('navbar-on-left'); + } + else { + app.router.back(view, {preloadOnly: true}); + } + } + }; + + + /*====================================================== + ************ Modals ************ + ======================================================*/ + var _modalTemplateTempDiv = document.createElement('div'); + app.modalStack = []; + app.modalStackClearQueue = function () { + if (app.modalStack.length) { + (app.modalStack.shift())(); + } + }; + app.modal = function (params) { + params = params || {}; + var modalHTML = ''; + if (app.params.modalTemplate) { + if (!app._compiledTemplates.modal) app._compiledTemplates.modal = t7.compile(app.params.modalTemplate); + modalHTML = app._compiledTemplates.modal(params); + } + else { + var buttonsHTML = ''; + if (params.buttons && params.buttons.length > 0) { + for (var i = 0; i < params.buttons.length; i++) { + buttonsHTML += '' + params.buttons[i].text + ''; + } + } + var titleHTML = params.title ? '' : ''; + var textHTML = params.text ? '' : ''; + var afterTextHTML = params.afterText ? params.afterText : ''; + var noButtons = !params.buttons || params.buttons.length === 0 ? 'modal-no-buttons' : ''; + var verticalButtons = params.verticalButtons ? 'modal-buttons-vertical': ''; + var modalButtonsHTML = params.buttons && params.buttons.length > 0 ? '' : ''; + modalHTML = ''; + } + + _modalTemplateTempDiv.innerHTML = modalHTML; + + var modal = $(_modalTemplateTempDiv).children(); + + app.root.append(modal[0]); + + // Add events on buttons + modal.find('.modal-button').each(function (index, el) { + $(el).on('click', function (e) { + if (params.buttons[index].close !== false) app.closeModal(modal); + if (params.buttons[index].onClick) params.buttons[index].onClick(modal, e); + if (params.onClick) params.onClick(modal, index); + }); + }); + app.openModal(modal); + return modal[0]; + }; + app.alert = function (text, title, callbackOk) { + if (typeof title === 'function') { + callbackOk = arguments[1]; + title = undefined; + } + return app.modal({ + text: text || '', + title: typeof title === 'undefined' ? app.params.modalTitle : title, + buttons: [ {text: app.params.modalButtonOk, bold: true, onClick: callbackOk} ] + }); + }; + app.confirm = function (text, title, callbackOk, callbackCancel) { + if (typeof title === 'function') { + callbackCancel = arguments[2]; + callbackOk = arguments[1]; + title = undefined; + } + return app.modal({ + text: text || '', + title: typeof title === 'undefined' ? app.params.modalTitle : title, + buttons: [ + {text: app.params.modalButtonCancel, onClick: callbackCancel}, + {text: app.params.modalButtonOk, bold: true, onClick: callbackOk} + ] + }); + }; + app.prompt = function (text, title, callbackOk, callbackCancel) { + if (typeof title === 'function') { + callbackCancel = arguments[2]; + callbackOk = arguments[1]; + title = undefined; + } + return app.modal({ + text: text || '', + title: typeof title === 'undefined' ? app.params.modalTitle : title, + afterText: '
      ', + buttons: [ + { + text: app.params.modalButtonCancel + }, + { + text: app.params.modalButtonOk, + bold: true + } + ], + onClick: function (modal, index) { + if (index === 0 && callbackCancel) callbackCancel($(modal).find('.modal-text-input').val()); + if (index === 1 && callbackOk) callbackOk($(modal).find('.modal-text-input').val()); + } + }); + }; + app.modalLogin = function (text, title, callbackOk, callbackCancel) { + if (typeof title === 'function') { + callbackCancel = arguments[2]; + callbackOk = arguments[1]; + title = undefined; + } + return app.modal({ + text: text || '', + title: typeof title === 'undefined' ? app.params.modalTitle : title, + afterText: '', + buttons: [ + { + text: app.params.modalButtonCancel + }, + { + text: app.params.modalButtonOk, + bold: true + } + ], + onClick: function (modal, index) { + var username = $(modal).find('.modal-text-input[name="modal-username"]').val(); + var password = $(modal).find('.modal-text-input[name="modal-password"]').val(); + if (index === 0 && callbackCancel) callbackCancel(username, password); + if (index === 1 && callbackOk) callbackOk(username, password); + } + }); + }; + app.modalPassword = function (text, title, callbackOk, callbackCancel) { + if (typeof title === 'function') { + callbackCancel = arguments[2]; + callbackOk = arguments[1]; + title = undefined; + } + return app.modal({ + text: text || '', + title: typeof title === 'undefined' ? app.params.modalTitle : title, + afterText: '
      ', + buttons: [ + { + text: app.params.modalButtonCancel + }, + { + text: app.params.modalButtonOk, + bold: true + } + ], + onClick: function (modal, index) { + var password = $(modal).find('.modal-text-input[name="modal-password"]').val(); + if (index === 0 && callbackCancel) callbackCancel(password); + if (index === 1 && callbackOk) callbackOk(password); + } + }); + }; + app.showPreloader = function (title) { + return app.modal({ + title: title || app.params.modalPreloaderTitle, + text: '
      ' + (app.params.material ? app.params.materialPreloaderHtml : '') + '
      ', + cssClass: 'modal-preloader' + }); + }; + app.hidePreloader = function () { + app.closeModal('.modal-preloader'); + }; + app.showIndicator = function () { + if ($('.preloader-indicator-overlay').length > 0) return; + app.root.append('
      ' + (app.params.material ? app.params.materialPreloaderHtml : '') + '
      '); + }; + app.hideIndicator = function () { + $('.preloader-indicator-overlay, .preloader-indicator-modal').remove(); + }; + // Action Sheet + app.actions = function (target, params, animated) { + var toPopover = false, modal, groupSelector, buttonSelector; + if (arguments.length === 1 || arguments.length === 2 && typeof arguments[1] === 'boolean') { + // Actions + params = arguments[0]; + animated = arguments[1]; + } + else { + // Popover + if (app.device.ios) { + if (app.device.ipad) toPopover = true; + } + else { + if (app.width >= 768) toPopover = true; + } + } + if (typeof animated === 'undefined') animated = true; + + params = params || []; + + if (params.length > 0 && !Array.isArray(params[0])) { + params = [params]; + } + var modalHTML; + if (toPopover) { + var actionsToPopoverTemplate = app.params.modalActionsToPopoverTemplate || + '
      ' + + '
      ' + + '{{#each this}}' + + '
      ' + + '
        ' + + '{{#each this}}' + + '{{#if label}}' + + '
      • {{text}}
      • ' + + '{{else}}' + + '
      • {{text}}
      • ' + + '{{/if}}' + + '{{/each}}' + + '
      ' + + '
      ' + + '{{/each}}' + + '
      ' + + '
      '; + if (!app._compiledTemplates.actionsToPopover) { + app._compiledTemplates.actionsToPopover = t7.compile(actionsToPopoverTemplate); + } + var popoverHTML = app._compiledTemplates.actionsToPopover(params); + modal = $(app.popover(popoverHTML, target, true, animated)); + groupSelector = '.list-block ul'; + buttonSelector = '.list-button'; + } + else { + if (app.params.modalActionsTemplate) { + if (!app._compiledTemplates.actions) app._compiledTemplates.actions = t7.compile(app.params.modalActionsTemplate); + modalHTML = app._compiledTemplates.actions(params); + } + else { + var buttonsHTML = ''; + for (var i = 0; i < params.length; i++) { + for (var j = 0; j < params[i].length; j++) { + if (j === 0) buttonsHTML += '
      '; + var button = params[i][j]; + var buttonClass = button.label ? 'actions-modal-label' : 'actions-modal-button'; + if (button.bold) buttonClass += ' actions-modal-button-bold'; + if (button.color) buttonClass += ' color-' + button.color; + if (button.bg) buttonClass += ' bg-' + button.bg; + if (button.disabled) buttonClass += ' disabled'; + buttonsHTML += '
      ' + button.text + '
      '; + if (j === params[i].length - 1) buttonsHTML += '
      '; + } + } + modalHTML = '
      ' + buttonsHTML + '
      '; + } + _modalTemplateTempDiv.innerHTML = modalHTML; + modal = $(_modalTemplateTempDiv).children(); + app.root.append(modal[0]); + groupSelector = '.actions-modal-group'; + buttonSelector = '.actions-modal-button'; + } + + var groups = modal.find(groupSelector); + groups.each(function (index, el) { + var groupIndex = index; + $(el).children().each(function (index, el) { + var buttonIndex = index; + var buttonParams = params[groupIndex][buttonIndex]; + var clickTarget; + if (!toPopover && $(el).is(buttonSelector)) clickTarget = $(el); + if (toPopover && $(el).find(buttonSelector).length > 0) clickTarget = $(el).find(buttonSelector); + + if (clickTarget) { + clickTarget.on('click', function (e) { + if (buttonParams.close !== false) app.closeModal(modal); + if (buttonParams.onClick) buttonParams.onClick(modal, e); + }); + } + }); + }); + if (!toPopover) app.openModal(modal, animated); + return modal[0]; + }; + app.popover = function (modal, target, removeOnClose, animated, closeByOutside) { + if (typeof removeOnClose === 'undefined') removeOnClose = true; + if (typeof closeByOutside === 'undefined') closeByOutside = true; + if (typeof animated === 'undefined') animated = true; + if (typeof modal === 'string' && modal.indexOf('<') >= 0) { + var _modal = document.createElement('div'); + _modal.innerHTML = modal.trim(); + if (_modal.childNodes.length > 0) { + modal = _modal.childNodes[0]; + if (removeOnClose) modal.classList.add('remove-on-close'); + if (!closeByOutside) modal.classList.add('ignore-close-by-outside'); + app.root.append(modal); + } + else return false; //nothing found + } + modal = $(modal); + target = $(target); + if (modal.length === 0 || target.length === 0) return false; + if (modal.parents('body').length === 0) { + if (removeOnClose) modal.addClass('remove-on-close'); + if (!closeByOutside) modal.addClass.add('ignore-close-by-outside'); + app.root.append(modal[0]); + } + if (modal.find('.popover-angle').length === 0 && !app.params.material) { + modal.append('
      '); + } + modal.show(); + + var material = app.params.material; + + function sizePopover() { + modal.css({left: '', top: ''}); + var modalWidth = modal.width(); + var modalHeight = modal.height(); // 13 - height of angle + var modalAngle, modalAngleSize = 0, modalAngleLeft, modalAngleTop; + if (!material) { + modalAngle = modal.find('.popover-angle'); + modalAngleSize = modalAngle.width() / 2; + modalAngle.removeClass('on-left on-right on-top on-bottom').css({left: '', top: ''}); + } + else { + modal.removeClass('popover-on-left popover-on-right popover-on-top popover-on-bottom').css({left: '', top: ''}); + } + + var targetWidth = target.outerWidth(); + var targetHeight = target.outerHeight(); + var targetOffset = target.offset(); + var targetOffsetLeft = targetOffset.left - app.left; + var targetOffsetTop = targetOffset.top - app.top; + var targetParentPage = target.parents('.page'); + if (targetParentPage.length > 0) { + targetOffsetTop = targetOffsetTop - targetParentPage[0].scrollTop; + } + + var modalTop = 0; + var modalLeft = 0; + var diff = 0; + // Top Position + var modalPosition = material ? 'bottom' : 'top'; + if (material) { + if (modalHeight < app.height - targetOffsetTop - targetHeight) { + // On bottom + modalPosition = 'bottom'; + modalTop = targetOffsetTop; + } + else if (modalHeight < targetOffsetTop) { + // On top + modalTop = targetOffsetTop - modalHeight + targetHeight; + modalPosition = 'top'; + } + else { + // On middle + modalPosition = 'bottom'; + modalTop = targetOffsetTop; + } + + if (modalTop <= 0) { + modalTop = 8; + } + else if (modalTop + modalHeight >= app.height) { + modalTop = app.height - modalHeight - 8; + } + + // Horizontal Position + modalLeft = targetOffsetLeft; + if (modalLeft + modalWidth >= app.width - 8) { + modalLeft = targetOffsetLeft + targetWidth - modalWidth - 8; + } + if (modalLeft < 8) { + modalLeft = 8; + } + if (modalPosition === 'top') { + modal.addClass('popover-on-top'); + } + if (modalPosition === 'bottom') { + modal.addClass('popover-on-bottom'); + } + if (target.hasClass('floating-button-to-popover') && !modal.hasClass('modal-in')) { + modal.addClass('popover-floating-button'); + var diffX = (modalLeft + modalWidth / 2) - (targetOffsetLeft + targetWidth / 2), + diffY = (modalTop + modalHeight / 2) - (targetOffsetTop + targetHeight / 2); + target + .addClass('floating-button-to-popover-in') + .transform('translate3d(' + diffX + 'px, ' + diffY + 'px,0)') + .transitionEnd(function (e) { + if (!target.hasClass('floating-button-to-popover-in')) return; + target + .addClass('floating-button-to-popover-scale') + .transform('translate3d(' + diffX + 'px, ' + diffY + 'px,0) scale(' + (modalWidth/targetWidth) + ', ' + (modalHeight/targetHeight) + ')'); + }); + + modal.once('popover:close', function () { + target + .removeClass('floating-button-to-popover-in floating-button-to-popover-scale') + .addClass('floating-button-to-popover-out') + .transform('') + .transitionEnd(function (e) { + target.removeClass('floating-button-to-popover-out'); + }); + }); + modal.once('popover:closed', function () { + modal.removeClass('popover-floating-button'); + }); + } + else if (target.hasClass('floating-button-to-popover') && modal.hasClass('modal-in')) { + modalLeft = targetOffsetLeft; + modalTop = targetOffsetTop; + } + + } + else { + if ((modalHeight + modalAngleSize) < targetOffsetTop) { + // On top + modalTop = targetOffsetTop - modalHeight - modalAngleSize; + } + else if ((modalHeight + modalAngleSize) < app.height - targetOffsetTop - targetHeight) { + // On bottom + modalPosition = 'bottom'; + modalTop = targetOffsetTop + targetHeight + modalAngleSize; + } + else { + // On middle + modalPosition = 'middle'; + modalTop = targetHeight / 2 + targetOffsetTop - modalHeight / 2; + diff = modalTop; + if (modalTop <= 0) { + modalTop = 5; + } + else if (modalTop + modalHeight >= app.height) { + modalTop = app.height - modalHeight - 5; + } + diff = diff - modalTop; + } + + // Horizontal Position + if (modalPosition === 'top' || modalPosition === 'bottom') { + modalLeft = targetWidth / 2 + targetOffsetLeft - modalWidth / 2; + diff = modalLeft; + if (modalLeft < 5) modalLeft = 5; + if (modalLeft + modalWidth > app.width) modalLeft = app.width - modalWidth - 5; + if (modalPosition === 'top') { + modalAngle.addClass('on-bottom'); + } + if (modalPosition === 'bottom') { + modalAngle.addClass('on-top'); + } + diff = diff - modalLeft; + modalAngleLeft = (modalWidth / 2 - modalAngleSize + diff); + modalAngleLeft = Math.max(Math.min(modalAngleLeft, modalWidth - modalAngleSize * 2 - 13), 13); + modalAngle.css({left: modalAngleLeft + 'px'}); + + } + else if (modalPosition === 'middle') { + modalLeft = targetOffsetLeft - modalWidth - modalAngleSize; + modalAngle.addClass('on-right'); + if (modalLeft < 5 || (modalLeft + modalWidth > app.width)) { + if (modalLeft < 5) modalLeft = targetOffsetLeft + targetWidth + modalAngleSize; + if (modalLeft + modalWidth > app.width) modalLeft = app.width - modalWidth - 5; + modalAngle.removeClass('on-right').addClass('on-left'); + } + modalAngleTop = (modalHeight / 2 - modalAngleSize + diff); + modalAngleTop = Math.max(Math.min(modalAngleTop, modalHeight - modalAngleSize * 2 - 13), 13); + modalAngle.css({top: modalAngleTop + 'px'}); + } + } + + + // Apply Styles + modal.css({top: modalTop + 'px', left: modalLeft + 'px'}); + } + + sizePopover(); + + app.onResize(sizePopover); + + modal.on('popover:close', function () { + app.offResize(sizePopover); + }); + + app.openModal(modal, animated); + return modal[0]; + }; + app.popup = function (modal, removeOnClose, animated) { + if (typeof removeOnClose === 'undefined') removeOnClose = true; + if (typeof animated === 'undefined') animated = true; + if (typeof modal === 'string' && modal.indexOf('<') >= 0) { + var _modal = document.createElement('div'); + _modal.innerHTML = modal.trim(); + if (_modal.childNodes.length > 0) { + modal = _modal.childNodes[0]; + if (removeOnClose) modal.classList.add('remove-on-close'); + app.root.append(modal); + } + else return false; //nothing found + } + modal = $(modal); + if (modal.length === 0) return false; + if (modal.parents('body').length === 0) { + if (removeOnClose) modal.addClass('remove-on-close'); + app.root.append(modal[0]); + } + modal.show(); + + app.openModal(modal, animated); + return modal[0]; + }; + app.pickerModal = function (modal, removeOnClose, animated) { + if (typeof removeOnClose === 'undefined') removeOnClose = true; + if (typeof animated === 'undefined') animated = true; + if (typeof modal === 'string' && modal.indexOf('<') >= 0) { + modal = $(modal); + if (modal.length > 0) { + if (removeOnClose) modal.addClass('remove-on-close'); + app.root.append(modal[0]); + } + else return false; //nothing found + } + modal = $(modal); + if (modal.length === 0) return false; + if (modal.parents('body').length === 0) { + if (removeOnClose) modal.addClass('remove-on-close'); + app.root.append(modal[0]); + } + if ($('.picker-modal.modal-in:not(.modal-out)').length > 0 && !modal.hasClass('modal-in')) { + app.closeModal('.picker-modal.modal-in:not(.modal-out)'); + } + modal.show(); + app.openModal(modal, animated); + return modal[0]; + }; + app.loginScreen = function (modal, animated) { + if (!modal) modal = '.login-screen'; + if (typeof animated === 'undefined') animated = true; + modal = $(modal); + if (modal.length === 0) return false; + if ($('.login-screen.modal-in:not(.modal-out)').length > 0 && !modal.hasClass('modal-in')) { + app.closeModal('.login-screen.modal-in:not(.modal-out)'); + } + modal.show(); + + app.openModal(modal, animated); + return modal[0]; + }; + app.openModal = function (modal, animated) { + if (typeof animated === 'undefined') animated = true; + modal = $(modal); + modal[animated ? 'removeClass' : 'addClass']('not-animated'); + + var isModal = modal.hasClass('modal'); + var isPopover = modal.hasClass('popover'); + var isPopup = modal.hasClass('popup'); + var isLoginScreen = modal.hasClass('login-screen'); + var isPickerModal = modal.hasClass('picker-modal'); + var isActions = modal.hasClass('actions-modal'); + + // Modal Event Prefix + var modalType = 'modal'; + if (isPopover) modalType = 'popover'; + if (isPopup) modalType = 'popup'; + if (isLoginScreen) modalType = 'loginscreen'; + if (isPickerModal) modalType = 'picker'; + if (isActions) modalType = 'actions'; + + if ($('.modal.modal-in:not(.modal-out)').length && app.params.modalStack && isModal) { + app.modalStack.push(function () { + app.openModal(modal); + }); + return; + } + + // do nothing if this modal already shown + if (true === modal.data('f7-modal-shown')) { + return; + } + modal.data('f7-modal-shown', true); + + // Move modal + var modalParent = modal.parent(); + if (app.params.modalsMoveToRoot && !modalParent.is(app.root)) { + app.root.append(modal); + modal.once(modalType + ':closed', function() { + modalParent.append(modal); + }); + } + + modal.once(modalType + ':close', function() { + modal.removeData('f7-modal-shown'); + }); + + if (isModal) { + modal.show(); + modal.css({ + marginTop: - Math.round(modal.outerHeight() / 2) + 'px' + }); + } + + var overlay; + if (!isLoginScreen && !isPickerModal) { + if ($('.modal-overlay').length === 0 && !isPopup) { + app.root.append(''); + } + if ($('.popup-overlay').length === 0 && isPopup) { + app.root.append(''); + } + overlay = isPopup ? $('.popup-overlay') : $('.modal-overlay'); + } + if (app.params.material && isPickerModal) { + if (modal.hasClass('picker-calendar')) { + if ($('.picker-modal-overlay').length === 0 && !isPopup) { + app.root.append('
      '); + } + overlay = $('.picker-modal-overlay'); + } + } + if (overlay) { + overlay[animated ? 'removeClass' : 'addClass']('not-animated'); + } + + //Make sure that styles are applied, trigger relayout; + var clientLeft = modal[0].clientLeft; + + // Trugger open event + modal.trigger('open ' + modalType + ':open'); + + // Picker modal body class + if (isPickerModal) { + $('body').addClass('with-picker-modal'); + } + + // Init Pages and Navbars in modal + if (modal.find('.' + app.params.viewClass).length > 0) { + modal.find('.page').each(function () { + app.initPageWithCallback(this); + }); + modal.find('.navbar').each(function () { + app.initNavbarWithCallback(this); + }); + } + + // Classes for transition in + if (!isLoginScreen && !isPickerModal) overlay.addClass('modal-overlay-visible'); + if (app.params.material && isPickerModal && overlay) overlay.addClass('modal-overlay-visible'); + if (animated) { + modal.removeClass('modal-out').addClass('modal-in').transitionEnd(function (e) { + if (modal.hasClass('modal-out')) modal.trigger('closed ' + modalType + ':closed'); + else modal.trigger('opened ' + modalType + ':opened'); + }); + } + else { + modal.removeClass('modal-out').addClass('modal-in'); + modal.trigger('opened ' + modalType + ':opened'); + } + return true; + }; + app.closeModal = function (modal, animated) { + if (typeof animated === 'undefined') animated = true; + modal = $(modal || '.modal-in'); + if (typeof modal !== 'undefined' && modal.length === 0) { + return; + } + modal[animated ? 'removeClass' : 'addClass']('not-animated'); + var isModal = modal.hasClass('modal'); + var isPopover = modal.hasClass('popover'); + var isPopup = modal.hasClass('popup'); + var isLoginScreen = modal.hasClass('login-screen'); + var isPickerModal = modal.hasClass('picker-modal'); + var isActions = modal.hasClass('actions-modal'); + + // Modal Event Prefix + var modalType = 'modal'; + if (isPopover) modalType = 'popover'; + if (isPopup) modalType = 'popup'; + if (isLoginScreen) modalType = 'loginscreen'; + if (isPickerModal) modalType = 'picker'; + if (isActions) modalType = 'actions'; + + var removeOnClose = modal.hasClass('remove-on-close'); + + // ignore close popover + if (isPopover && !removeOnClose && modal.hasClass('ignore-close-by-outside')) { + return; + } + + // For Actions + var keepOnClose = modal.hasClass('keep-on-close'); + + var overlay; + + if (isPopup) overlay = $('.popup-overlay'); + else { + if (isPickerModal && app.params.material) overlay = $('.picker-modal-overlay'); + else if (!isPickerModal) overlay = $('.modal-overlay'); + } + + if (isPopup){ + if (modal.length === $('.popup.modal-in').length) { + overlay.removeClass('modal-overlay-visible'); + } + } + else if (overlay && overlay.length > 0) { + overlay.removeClass('modal-overlay-visible'); + } + if (overlay) overlay[animated ? 'removeClass' : 'addClass']('not-animated'); + + modal.trigger('close ' + modalType + ':close'); + + // Picker modal body class + if (isPickerModal) { + $('body').removeClass('with-picker-modal'); + $('body').addClass('picker-modal-closing'); + } + + if (!(isPopover && !app.params.material)) { + if (animated) { + modal.removeClass('modal-in').addClass('modal-out').transitionEnd(function (e) { + if (modal.hasClass('modal-out')) modal.trigger('closed ' + modalType + ':closed'); + else { + modal.trigger('opened ' + modalType + ':opened'); + if (isPopover) return; + } + + if (isPickerModal) { + $('body').removeClass('picker-modal-closing'); + } + if (isPopup || isLoginScreen || isPickerModal || isPopover) { + modal.removeClass('modal-out').hide(); + if (removeOnClose && modal.length > 0) { + modal.remove(); + } + } + else if (!keepOnClose) { + modal.remove(); + } + }); + } + else { + modal.trigger('closed ' + modalType + ':closed'); + modal.removeClass('modal-in modal-out'); + if (isPickerModal) { + $('body').removeClass('picker-modal-closing'); + } + if (isPopup || isLoginScreen || isPickerModal || isPopover) { + modal.hide(); + if (removeOnClose && modal.length > 0) { + modal.remove(); + } + } + else if (!keepOnClose) { + modal.remove(); + } + } + if (isModal && app.params.modalStack) { + app.modalStackClearQueue(); + } + } + else { + modal.removeClass('modal-in modal-out not-animated').trigger('closed ' + modalType + ':closed').hide(); + if (removeOnClose) { + modal.remove(); + } + } + return true; + }; + + + /*=============================================================================== + ************ Progress Bar ************ + ===============================================================================*/ + app.setProgressbar = function (container, progress, speed) { + container = $(container || app.root); + if (container.length === 0) return; + if (progress) progress = Math.min(Math.max(progress, 0), 100); + var progressbar; + if (container.hasClass('progressbar')) progressbar = container; + else { + progressbar = container.children('.progressbar'); + } + if (progressbar.length === 0 || progressbar.hasClass('progressbar-infinite')) return; + var clientLeft = progressbar[0].clientLeft; + progressbar.children('span').transform('translate3d(' + (-100 + progress) + '%,0,0)'); + if (typeof speed !== 'undefined') { + progressbar.children('span').transition(speed); + } + else { + progressbar.children('span').transition(''); + } + return progressbar[0]; + }; + app.showProgressbar = function (container, progress, color) { + if (typeof container === 'number') { + container = app.root; + progress = arguments[0]; + color = arguments[1]; + } + if (progress && typeof progress === 'string' && parseFloat(progress) !== progress * 1) { + color = progress; + progress = undefined; + } + container = $(container || app.root); + if (container.length === 0) return; + var progressbar; + if (container.hasClass('progressbar')) progressbar = container; + else { + progressbar = container.children('.progressbar:not(.progressbar-out), .progressbar-infinite:not(.progressbar-out)'); + if (progressbar.length === 0) { + // Create one + if (typeof progress !== 'undefined') { + // Determined + progressbar = $(''); + } + else { + // Infinite + progressbar = $(''); + } + container.append(progressbar); + } + } + if (progress) app.setProgressbar(container, progress); + return progressbar[0]; + }; + app.hideProgressbar = function (container) { + container = $(container || app.root); + if (container.length === 0) return; + var progressbar; + if (container.hasClass('progressbar')) progressbar = container; + else { + progressbar = container.children('.progressbar, .progressbar-infinite'); + } + if (progressbar.length === 0 || !progressbar.hasClass('progressbar-in') || progressbar.hasClass('progressbar-out')) return; + progressbar.removeClass('progressbar-in').addClass('progressbar-out').animationEnd(function () { + progressbar.remove(); + progressbar = null; + }); + return; + }; + app.initPageProgressbar = function (pageContainer) { + pageContainer = $(pageContainer); + pageContainer.find('.progressbar').each(function () { + var p = $(this); + if (p.children('span').length === 0) p.append(''); + if (p.attr('data-progress')) app.setProgressbar(p, p.attr('data-progress')); + }); + }; + + /*====================================================== + ************ Panels ************ + ======================================================*/ + app.allowPanelOpen = true; + app.openPanel = function (panelPosition, animated) { + if (typeof animated === 'undefined') animated = true; + if (!app.allowPanelOpen) return false; + var panel = $('.panel-' + panelPosition); + if (panel.length === 0 || panel.hasClass('active') || panel.hasClass('panel-visible-by-breakpoint')) return false; + app.closePanel(); // Close if some panel is opened + app.allowPanelOpen = false; + var effect = panel.hasClass('panel-reveal') ? 'reveal' : 'cover'; + panel[animated ? 'removeClass' : 'addClass']('not-animated'); + panel.css({display: 'block'}).addClass('active'); + panel.trigger('open panel:open'); + + var panelOverlay = $('.panel-overlay'); + panelOverlay[animated ? 'removeClass' : 'addClass']('not-animated'); + panelOverlay.show(); + + if (panel.find('.' + app.params.viewClass).length > 0) { + if (app.sizeNavbars) app.sizeNavbars(panel.find('.' + app.params.viewClass)[0]); + } + + // Trigger reLayout + var clientLeft = panel[0].clientLeft; + + // Transition End; + var transitionEndTarget = effect === 'reveal' ? $('.' + app.params.viewsClass) : panel; + + function panelTransitionEnd() { + transitionEndTarget.transitionEnd(function (e) { + if ($(e.target).is(transitionEndTarget)) { + if (panel.hasClass('active')) { + panel.trigger('opened panel:opened'); + } + else { + panel.trigger('closed panel:closed'); + } + panelOverlay.css({display: ''}); + app.allowPanelOpen = true; + } + else panelTransitionEnd(); + }); + } + if (animated) { + panelTransitionEnd(); + } + else { + panel.trigger('opened panel:opened'); + panelOverlay.css({display: ''}); + app.allowPanelOpen = true; + } + + $('body').addClass('with-panel-' + panelPosition + '-' + effect); + return true; + }; + app.closePanel = function (animated) { + if (typeof animated === 'undefined') animated = true; + var activePanel = $('.panel.active'); + if (activePanel.length === 0 || activePanel.hasClass('panel-visible-by-breakpoint')) return false; + var effect = activePanel.hasClass('panel-reveal') ? 'reveal' : 'cover'; + var panelPosition = activePanel.hasClass('panel-left') ? 'left' : 'right'; + activePanel[animated ? 'removeClass' : 'addClass']('not-animated'); + activePanel.removeClass('active'); + + var panelOverlay = $('.panel-overlay'); + panelOverlay.removeClass('not-animated'); + + var transitionEndTarget = effect === 'reveal' ? $('.' + app.params.viewsClass) : activePanel; + activePanel.trigger('close panel:close'); + app.allowPanelOpen = false; + if (animated) { + transitionEndTarget.transitionEnd(function () { + if (activePanel.hasClass('active')) return; + activePanel.css({display: ''}); + activePanel.trigger('closed panel:closed'); + $('body').removeClass('panel-closing'); + app.allowPanelOpen = true; + }); + $('body').addClass('panel-closing').removeClass('with-panel-' + panelPosition + '-' + effect); + } + else { + activePanel.css({display: ''}); + activePanel.trigger('closed panel:closed'); + activePanel.removeClass('not-animated'); + $('body').removeClass('with-panel-' + panelPosition + '-' + effect); + app.allowPanelOpen = true; + } + }; + /*====================================================== + ************ Panels breakpoints ************ + ======================================================*/ + app.initPanelsBreakpoints = function () { + var panelLeft = $('.panel-left'); + var panelRight = $('.panel-right'); + var views = app.root.children('.views'); + var wasVisible; + function setPanels() { + // Left Panel + if (app.params.panelLeftBreakpoint && panelLeft.length > 0) { + wasVisible = panelLeft.hasClass('panel-visible-by-breakpoint'); + if (app.width >= app.params.panelLeftBreakpoint) { + if (!wasVisible) { + $('body').removeClass('with-panel-left-reveal with-panel-left-cover'); + panelLeft.css('display', '').addClass('panel-visible-by-breakpoint').removeClass('active'); + panelLeft.trigger('open panel:open opened panel:opened'); + views.css({ + 'margin-left': panelLeft.width() + 'px' + }); + app.allowPanelOpen = true; + } + } + else { + if (wasVisible) { + panelLeft.css('display', '').removeClass('panel-visible-by-breakpoint active'); + panelLeft.trigger('close panel:close closed panel:closed'); + views.css({ + 'margin-left': '' + }); + app.allowPanelOpen = true; + } + } + } + // Right Panel + if (app.params.panelRightBreakpoint && panelRight.length > 0) { + wasVisible = panelRight.hasClass('panel-visible-by-breakpoint'); + if (app.width >= app.params.panelRightBreakpoint) { + if (!wasVisible) { + $('body').removeClass('with-panel-right-reveal with-panel-right-cover'); + panelRight.css('display', '').addClass('panel-visible-by-breakpoint').removeClass('active'); + panelRight.trigger('open panel:open opened panel:opened'); + views.css({ + 'margin-right': panelRight.width() + 'px' + }); + app.allowPanelOpen = true; + } + } + else { + if (wasVisible) { + panelRight.css('display', '').removeClass('panel-visible-by-breakpoint active'); + panelRight.trigger('close panel:close closed panel:closed'); + views.css({ + 'margin-right': '' + }); + app.allowPanelOpen = true; + } + } + } + } + app.onResize(setPanels); + setPanels(); + }; + /*====================================================== + ************ Swipe panels ************ + ======================================================*/ + app.initSwipePanels = function () { + var panel, side; + if (app.params.swipePanel) { + panel = $('.panel.panel-' + app.params.swipePanel); + side = app.params.swipePanel; + if (panel.length === 0 && side !== 'both') return; + } + else { + if (app.params.swipePanelOnlyClose) { + if ($('.panel').length === 0) return; + } + else return; + } + + var panelOverlay = $('.panel-overlay'); + var isTouched, isMoved, isScrolling, touchesStart = {}, touchStartTime, touchesDiff, translate, overlayOpacity, opened, panelWidth, effect, direction; + var views = $('.' + app.params.viewsClass); + + function handleTouchStart(e) { + if (!app.allowPanelOpen || (!app.params.swipePanel && !app.params.swipePanelOnlyClose) || isTouched) return; + if ($('.modal-in, .photo-browser-in').length > 0) return; + if (!(app.params.swipePanelCloseOpposite || app.params.swipePanelOnlyClose)) { + if ($('.panel.active').length > 0 && !panel.hasClass('active')) return; + } + if (e.target && e.target.nodeName.toLowerCase() === 'input' && e.target.type === 'range') return; + if ($(e.target).closest('.tabs-swipeable-wrap').length > 0) return; + touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + if (app.params.swipePanelCloseOpposite || app.params.swipePanelOnlyClose) { + if ($('.panel.active').length > 0) { + side = $('.panel.active').hasClass('panel-left') ? 'left' : 'right'; + } + else { + if (app.params.swipePanelOnlyClose) return; + side = app.params.swipePanel; + } + if (!side) return; + } + panel = $('.panel.panel-' + side); + opened = panel.hasClass('active'); + if (app.params.swipePanelActiveArea && !opened) { + if (side === 'left') { + if (touchesStart.x > app.params.swipePanelActiveArea) return; + } + if (side === 'right') { + if (touchesStart.x < app.width - app.params.swipePanelActiveArea) return; + } + } + isMoved = false; + isTouched = true; + isScrolling = undefined; + + touchStartTime = (new Date()).getTime(); + direction = undefined; + } + function handleTouchMove(e) { + if (!isTouched) return; + if (e.f7PreventPanelSwipe) return; + var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (typeof isScrolling === 'undefined') { + isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x)); + } + if (isScrolling) { + isTouched = false; + return; + } + if (!direction) { + if (pageX > touchesStart.x) { + direction = 'to-right'; + } + else { + direction = 'to-left'; + } + + if(side === 'both'){ + if ($('.panel.active').length > 0) { + side = $('.panel.active').hasClass('panel-left') ? 'left' : 'right'; + } + else { + side = direction === 'to-right' ? 'left' : 'right'; + } + if (app.params.swipePanelActiveArea > 0) { + if (side === 'left' && touchesStart.x > app.params.swipePanelActiveArea) { + isTouched = false; + return; + } + if (side === 'right' && touchesStart.x < app.width - app.params.swipePanelActiveArea) { + isTouched = false; + return; + } + } + panel = $('.panel.panel-' + side); + } + if (panel.hasClass('panel-visible-by-breakpoint')) { + isTouched = false; + return; + } + + if ( + side === 'left' && + ( + direction === 'to-left' && !panel.hasClass('active') + ) || + side === 'right' && + ( + direction === 'to-right' && !panel.hasClass('active') + ) + ) + { + isTouched = false; + return; + } + } + + if (app.params.swipePanelNoFollow) { + var timeDiff = (new Date()).getTime() - touchStartTime; + if (timeDiff < 300) { + if (direction === 'to-left') { + if (side === 'right') app.openPanel(side); + if (side === 'left' && panel.hasClass('active')) app.closePanel(); + } + if (direction === 'to-right') { + if (side === 'left') app.openPanel(side); + if (side === 'right' && panel.hasClass('active')) app.closePanel(); + } + } + isTouched = false; + isMoved = false; + return; + } + + if (!isMoved) { + effect = panel.hasClass('panel-cover') ? 'cover' : 'reveal'; + if (!opened) { + panel.show(); + panelOverlay.show(); + } + panelWidth = panel[0].offsetWidth; + panel.transition(0); + if (panel.find('.' + app.params.viewClass).length > 0) { + if (app.sizeNavbars) app.sizeNavbars(panel.find('.' + app.params.viewClass)[0]); + } + } + + isMoved = true; + + e.preventDefault(); + var threshold = opened ? 0 : -app.params.swipePanelThreshold; + if (side === 'right') threshold = -threshold; + + touchesDiff = pageX - touchesStart.x + threshold; + + if (side === 'right') { + if (effect === 'cover') { + translate = touchesDiff + (opened ? 0 : panelWidth); + if (translate < 0) translate = 0; + if (translate > panelWidth) { + translate = panelWidth; + } + } + else { + translate = touchesDiff - (opened ? panelWidth : 0); + if (translate > 0) translate = 0; + if (translate < -panelWidth) { + translate = -panelWidth; + } + } + } + else { + translate = touchesDiff + (opened ? panelWidth : 0); + if (translate < 0) translate = 0; + if (translate > panelWidth) { + translate = panelWidth; + } + } + if (effect === 'reveal') { + views.transform('translate3d(' + translate + 'px,0,0)').transition(0); + panelOverlay.transform('translate3d(' + translate + 'px,0,0)').transition(0); + + panel.trigger('panel:swipe', {progress: Math.abs(translate / panelWidth)}); + app.pluginHook('swipePanelSetTransform', views[0], panel[0], Math.abs(translate / panelWidth)); + } + else { + if (side === 'left') translate = translate - panelWidth; + panel.transform('translate3d(' + (translate) + 'px,0,0)').transition(0); + + panelOverlay.transition(0); + overlayOpacity = 1 - Math.abs(translate/panelWidth); + panelOverlay.css({opacity: overlayOpacity}); + + panel.trigger('panel:swipe', {progress: Math.abs(translate / panelWidth)}); + app.pluginHook('swipePanelSetTransform', views[0], panel[0], Math.abs(translate / panelWidth)); + } + } + function handleTouchEnd(e) { + if (!isTouched || !isMoved) { + isTouched = false; + isMoved = false; + return; + } + isTouched = false; + isMoved = false; + var timeDiff = (new Date()).getTime() - touchStartTime; + var action; + var edge = (translate === 0 || Math.abs(translate) === panelWidth); + + if (!opened) { + if (effect === 'cover') { + if (translate === 0) { + action = 'swap'; //open + } + else if (timeDiff < 300 && Math.abs(translate) > 0) { + action = 'swap'; //open + } + else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) { + action = 'swap'; //open + } + else { + action = 'reset'; //close + } + } + else { + if (translate === 0) { + action = 'reset'; + } + else if ( + timeDiff < 300 && Math.abs(translate) > 0 || + timeDiff >= 300 && (Math.abs(translate) >= panelWidth / 2) + ) { + action = 'swap'; + } + else { + action = 'reset'; + } + } + } + else { + if (effect === 'cover') { + if (translate === 0) { + action = 'reset'; //open + } + else if (timeDiff < 300 && Math.abs(translate) > 0) { + action = 'swap'; //open + } + else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) { + action = 'reset'; //open + } + else { + action = 'swap'; //close + } + } + else { + if (translate === -panelWidth) { + action = 'reset'; + } + else if ( + timeDiff < 300 && Math.abs(translate) >= 0 || + timeDiff >= 300 && (Math.abs(translate) <= panelWidth / 2) + ) { + if (side === 'left' && translate === panelWidth) action = 'reset'; + else action = 'swap'; + } + else { + action = 'reset'; + } + } + } + if (action === 'swap') { + app.allowPanelOpen = true; + if (opened) { + app.closePanel(); + if (edge) { + panel.css({display: ''}); + $('body').removeClass('panel-closing'); + } + } + else { + app.openPanel(side); + } + if (edge) app.allowPanelOpen = true; + } + if (action === 'reset') { + if (opened) { + app.allowPanelOpen = true; + app.openPanel(side); + } + else { + app.closePanel(); + if (edge) { + app.allowPanelOpen = true; + panel.css({display: ''}); + } + else { + var target = effect === 'reveal' ? views : panel; + panel.trigger('close panel:close'); + $('body').addClass('panel-closing'); + target.transitionEnd(function () { + if (panel.hasClass('active')) return; + panel.trigger('close panel:closed'); + panel.css({display: ''}); + $('body').removeClass('panel-closing'); + app.allowPanelOpen = true; + }); + } + } + } + if (effect === 'reveal') { + views.transition(''); + views.transform(''); + } + panel.transition('').transform(''); + panelOverlay.css({display: ''}).transform('').transition('').css('opacity', ''); + } + var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false; + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + $(document).on(app.touchEvents.start, handleTouchStart, passiveListener); + $(document).on(app.touchEvents.move, handleTouchMove, activeListener); + $(document).on(app.touchEvents.end, handleTouchEnd, passiveListener); + }; + + + /*====================================================== + ************ Image Lazy Loading ************ + ************ Based on solution by Marc Godard, https://github.com/MarcGodard ************ + ======================================================*/ + app.initImagesLazyLoad = function (pageContainer) { + pageContainer = $(pageContainer); + + // Lazy images + var lazyLoadImages; + if (pageContainer.hasClass('lazy')) { + lazyLoadImages = pageContainer; + pageContainer = lazyLoadImages.parents('.page'); + } + else { + lazyLoadImages = pageContainer.find('.lazy'); + } + if (lazyLoadImages.length === 0) return; + + // Scrollable page content + var pageContent; + if (pageContainer.hasClass('page-content')) { + pageContent = pageContainer; + pageContainer = pageContainer.parents('.page'); + } + else { + pageContent = pageContainer.find('.page-content'); + } + if (pageContent.length === 0) return; + + // Placeholder + var placeholderSrc = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEXCwsK592mkAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg=='; + if (typeof app.params.imagesLazyLoadPlaceholder === 'string') { + placeholderSrc = app.params.imagesLazyLoadPlaceholder; + } + if (app.params.imagesLazyLoadPlaceholder !== false) lazyLoadImages.each(function(){ + if ($(this).attr('data-src') && !$(this).attr('src')) $(this).attr('src', placeholderSrc); + }); + + // load image + var imagesSequence = []; + var imageIsLoading = false; + function loadImage(el) { + el = $(el); + + var bg = el.attr('data-background'); + var src = bg ? bg : el.attr('data-src'); + if (!src) return; + + function onLoad() { + el.removeClass('lazy').addClass('lazy-loaded'); + if (bg) { + el.css('background-image', 'url(' + src + ')'); + } + else { + el.attr('src', src); + } + + if (app.params.imagesLazyLoadSequential) { + imageIsLoading = false; + if (imagesSequence.length > 0) { + loadImage(imagesSequence.shift()); + } + } + el.trigger('lazy-loaded'); + if (app.params.onLazyLoaded) app.params.onLazyLoaded(el); + } + + function onError() { + el.removeClass('lazy').addClass('lazy-loaded'); + if (bg) { + el.css('background-image', 'url(' + placeholderSrc + ')'); + } + else { + el.attr('src', placeholderSrc); + } + + if (app.params.imagesLazyLoadSequential) { + imageIsLoading = false; + if (imagesSequence.length > 0) { + loadImage(imagesSequence.shift()); + } + } + el.trigger('lazy-error'); + if (app.params.onLazyError) app.params.onLazyError(el); + } + + if (app.params.imagesLazyLoadSequential) { + if (imageIsLoading) { + if (imagesSequence.indexOf(el[0]) < 0) imagesSequence.push(el[0]); + return; + } + } + + // Loading flag + imageIsLoading = true; + + var image = new Image(); + image.onload = onLoad; + image.onerror = onError; + image.src =src; + + // Add loaded callback and events + el.trigger('lazy-load'); + if (app.params.onLazyLoad && !el.hasClass('lazy-loaded')) app.params.onLazyLoad(el); + } + function lazyHandler() { + lazyLoadImages = pageContainer.find('.lazy'); + lazyLoadImages.each(function(index, el) { + el = $(el); + if (el.parents('.tab:not(.active)').length > 0) { + return; + } + if (isElementInViewport(el[0])) { + loadImage(el); + } + }); + } + + function isElementInViewport (el) { + var rect = el.getBoundingClientRect(); + var threshold = app.params.imagesLazyLoadThreshold || 0; + return ( + rect.top >= (0 - threshold) && + rect.left >= (0 - threshold) && + rect.top <= (app.height + threshold) && + rect.left <= (app.width + threshold) + ); + } + + function attachEvents(destroy) { + var method = destroy ? 'off' : 'on'; + lazyLoadImages[method]('lazy', lazyHandler); + lazyLoadImages.parents('.tab')[method]('show', lazyHandler); + pageContainer[method]('lazy', lazyHandler); + pageContent[method]('lazy', lazyHandler); + pageContent[method]('scroll', lazyHandler); + app[method === 'on' ? 'onResize' : 'offResize'](lazyHandler); + } + function detachEvents() { + attachEvents(true); + } + + // Store detach function + pageContainer[0].f7DestroyImagesLazyLoad = detachEvents; + + // Attach events + attachEvents(); + + // Destroy on page remove + if (pageContainer.hasClass('page')) { + pageContainer.once('page:beforeremove', detachEvents); + } + + // Run loader on page load/init + lazyHandler(); + + // Run after page animation + pageContainer.once('page:afteranimation', lazyHandler); + }; + app.destroyImagesLazyLoad = function (pageContainer) { + pageContainer = $(pageContainer); + if (pageContainer.length > 0 && pageContainer[0].f7DestroyImagesLazyLoad) { + pageContainer[0].f7DestroyImagesLazyLoad(); + } + }; + app.reinitImagesLazyLoad = function (pageContainer) { + pageContainer = $(pageContainer); + if (pageContainer.length > 0) { + pageContainer.trigger('lazy'); + } + }; + + + /*====================================================== + ************ Material Preloader ************ + ======================================================*/ + app.initPageMaterialPreloader = function (pageContainer) { + $(pageContainer).find('.preloader').each(function () { + if ($(this).children().length === 0) { + $(this).html(app.params.materialPreloaderHtml); + } + }); + }; + + /*====================================================== + ************ Messages ************ + ======================================================*/ + var Messages = function (container, params) { + var defaults = { + autoLayout: true, + newMessagesFirst: false, + scrollMessages: true, + scrollMessagesOnlyOnEdge: false, + messageTemplate: + '{{#if day}}' + + '
      {{day}} {{#if time}}, {{time}}{{/if}}
      ' + + '{{/if}}' + + '
      ' + + '{{#if name}}
      {{name}}
      {{/if}}' + + '
      {{text}}{{#if date}}
      {{date}}
      {{/if}}
      ' + + '{{#if avatar}}
      {{/if}}' + + '{{#if label}}
      {{label}}
      {{/if}}' + + '
      ' + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined' || params[def] === null) { + params[def] = defaults[def]; + } + } + + // Instance + var m = this; + + // Params + m.params = params; + + // Container + m.container = $(container); + if (m.container.length === 0) return; + + // Autolayout + if (m.params.autoLayout) m.container.addClass('messages-auto-layout'); + + // New messages first + if (m.params.newMessagesFirst) m.container.addClass('messages-new-first'); + + // Is In Page + m.pageContainer = m.container.parents('.page').eq(0); + m.pageContent = m.pageContainer.find('.page-content'); + + // Compiled template + m.template = Template7.compile(m.params.messageTemplate); + + // Auto Layout + m.layout = function () { + if (!m.container.hasClass('messages-auto-layout')) m.container.addClass('messages-auto-layout'); + m.container.find('.message').each(function () { + var message = $(this); + if (message.find('.message-text img').length > 0) { + var childNodes = message.find('.message-text')[0].childNodes; + var onlyPic = true; + for (var i = 0 ; i < childNodes.length; i++) { + if (childNodes[i].nodeType === 1 && childNodes[i].nodeName.toLowerCase() !== 'img') onlyPic = false; + if (childNodes[i].nodeType === 3 && childNodes[i].textContent.trim() !== '') onlyPic = false; + } + if (onlyPic) message.addClass('message-pic'); + else message.removeClass('message-pic'); + } + if (message.find('.message-avatar').length > 0) message.addClass('message-with-avatar'); + }); + m.container.find('.message').each(function () { + var message = $(this); + var isSent = message.hasClass('message-sent'); + var next = message.next('.message-' + (isSent ? 'sent' : 'received')); + var prev = message.prev('.message-' + (isSent ? 'sent' : 'received')); + if (next.length === 0) { + message.addClass('message-last message-with-tail'); + } + else message.removeClass('message-last message-with-tail'); + + if (prev.length === 0) { + message.addClass('message-first'); + } + else message.removeClass('message-first'); + + if (prev.length > 0 && prev.find('.message-name').length > 0 && message.find('.message-name').length > 0) { + if (prev.find('.message-name').text() !== message.find('.message-name').text()) { + prev.addClass('message-last message-with-tail'); + message.addClass('message-first'); + } + } + }); + }; + + // Add Message + m.appendMessage = function (props, animate) { + return m.addMessage(props, 'append', animate); + }; + m.prependMessage = function (props, animate) { + return m.addMessage(props, 'prepend', animate); + }; + m.addMessage = function (props, method, animate) { + return m.addMessages([props], method, animate); + }; + m.addMessages = function (newMessages, method, animate) { + if (typeof animate === 'undefined') { + animate = true; + } + if (typeof method === 'undefined') { + method = m.params.newMessagesFirst ? 'prepend' : 'append'; + } + var newMessagesHTML = '', i; + for (i = 0; i < newMessages.length; i++) { + var props = newMessages[i] || {}; + props.type = props.type || 'sent'; + if (!props.text) continue; + props.hasImage = props.text.indexOf('= 0; + if (props.onlyImage === false) props.hasImage = false; + if (animate) props.position = method === 'append' ? 'bottom' : 'top'; + + newMessagesHTML += m.template(props); + } + var scrollHeightBefore = m.pageContent[0].scrollHeight, + heightBefore = m.pageContent[0].offsetHeight, + scrollBefore = m.pageContent[0].scrollTop; + m.container[method](newMessagesHTML); + if (m.params.autoLayout) m.layout(); + if (method === 'prepend') { + m.pageContent[0].scrollTop = scrollBefore + (m.pageContent[0].scrollHeight - scrollHeightBefore); + } + if (m.params.scrollMessages && (method === 'append' && !m.params.newMessagesFirst) || (method === 'prepend' && m.params.newMessagesFirst)) { + if (m.params.scrollMessagesOnlyOnEdge) { + var onEdge = false; + if (m.params.newMessagesFirst) { + if (scrollBefore === 0) onEdge = true; + } + else { + if (scrollBefore - (scrollHeightBefore - heightBefore) >= -10) onEdge = true; + } + if (onEdge) m.scrollMessages(animate ? undefined : 0); + } + else m.scrollMessages(animate ? undefined : 0); + } + var messages = m.container.find('.message'); + if (newMessages.length === 1) { + return method === 'append' ? messages[messages.length - 1] : messages[0]; + } + else { + var messagesToReturn = []; + if (method === 'append') { + for (i = messages.length - newMessages.length; i < messages.length; i++) { + messagesToReturn.push(messages[i]); + } + } + else { + for (i = 0; i < newMessages.length; i++) { + messagesToReturn.push(messages[i]); + } + } + return messagesToReturn; + } + + }; + m.removeMessage = function (message) { + message = $(message); + if (message.length === 0) { + return false; + } + else { + message.remove(); + if (m.params.autoLayout) m.layout(); + return true; + } + }; + m.removeMessages = function (messages) { + m.removeMessage(messages); + }; + m.clean = function () { + m.container.html(''); + }; + + // Scroll + m.scrollMessages = function (duration, scrollTop) { + if (typeof duration === 'undefined') duration = 400; + var currentScroll = m.pageContent[0].scrollTop; + var newScroll; + if (typeof scrollTop !== 'undefined') newScroll = scrollTop; + else { + newScroll = m.params.newMessagesFirst ? 0 : m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight; + if (newScroll === currentScroll) return; + } + m.pageContent.scrollTop(newScroll, duration); + }; + + // Init Destroy + m.init = function () { + if (m.params.messages) { + m.addMessages(m.params.messages, undefined, false); + } + else { + if (m.params.autoLayout) m.layout(); + m.scrollMessages(0); + } + + }; + m.destroy = function () { + m = null; + }; + + // Init + m.init(); + + m.container[0].f7Messages = m; + return m; + }; + app.messages = function (container, params) { + return new Messages (container, params); + }; + app.initPageMessages = function (pageContainer) { + pageContainer = $(pageContainer); + var messages = pageContainer.find('.messages'); + if (messages.length === 0) return; + if (!messages.hasClass('messages-init')) { + return; + } + var m = app.messages(messages, messages.dataset()); + + // Destroy on page remove + function pageBeforeRemove() { + m.destroy(); + pageContainer.off('page:beforeremove', pageBeforeRemove); + } + if (pageContainer.hasClass('page')) { + pageContainer.on('page:beforeremove', pageBeforeRemove); + } + }; + + + /*=============================================================================== + ************ Swipeout Actions (Swipe to delete) ************ + ===============================================================================*/ + app.swipeoutOpenedEl = undefined; + app.allowSwipeout = true; + app.initSwipeout = function (swipeoutEl) { + var isTouched, isMoved, isScrolling, touchesStart = {}, touchStartTime, touchesDiff, swipeOutEl, swipeOutContent, actionsRight, actionsLeft, actionsLeftWidth, actionsRightWidth, translate, opened, openedActions, buttonsLeft, buttonsRight, direction, overswipeLeftButton, overswipeRightButton, overswipeLeft, overswipeRight, noFoldLeft, noFoldRight; + + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + + $(document).on(app.touchEvents.start, function (e) { + if (app.swipeoutOpenedEl) { + var target = $(e.target); + if (!( + app.swipeoutOpenedEl.is(target[0]) || + target.parents('.swipeout').is(app.swipeoutOpenedEl) || + target.hasClass('modal-in') || + target.hasClass('modal-overlay') || + target.hasClass('actions-modal') || + target.parents('.actions-modal.modal-in, .modal.modal-in').length > 0 + )) { + app.swipeoutClose(app.swipeoutOpenedEl); + } + } + }, activeListener); + + function handleTouchStart(e) { + if (!app.allowSwipeout) return; + isMoved = false; + isTouched = true; + isScrolling = undefined; + touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = (new Date()).getTime(); + } + function handleTouchMove(e) { + if (!isTouched) return; + var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (typeof isScrolling === 'undefined') { + isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x)); + } + if (isScrolling) { + isTouched = false; + return; + } + + if (!isMoved) { + if ($('.list-block.sortable-opened').length > 0) return; + /*jshint validthis:true */ + swipeOutEl = $(this); + swipeOutContent = swipeOutEl.find('.swipeout-content'); + actionsRight = swipeOutEl.find('.swipeout-actions-right'); + actionsLeft = swipeOutEl.find('.swipeout-actions-left'); + actionsLeftWidth = actionsRightWidth = buttonsLeft = buttonsRight = overswipeRightButton = overswipeLeftButton = null; + noFoldLeft = actionsLeft.hasClass('swipeout-actions-no-fold') || app.params.swipeoutActionsNoFold; + noFoldRight = actionsRight.hasClass('swipeout-actions-no-fold') || app.params.swipeoutActionsNoFold; + if (actionsLeft.length > 0) { + actionsLeftWidth = actionsLeft.outerWidth(); + buttonsLeft = actionsLeft.children('a'); + overswipeLeftButton = actionsLeft.find('.swipeout-overswipe'); + } + if (actionsRight.length > 0) { + actionsRightWidth = actionsRight.outerWidth(); + buttonsRight = actionsRight.children('a'); + overswipeRightButton = actionsRight.find('.swipeout-overswipe'); + } + opened = swipeOutEl.hasClass('swipeout-opened'); + if (opened) { + openedActions = swipeOutEl.find('.swipeout-actions-left.swipeout-actions-opened').length > 0 ? 'left' : 'right'; + } + swipeOutEl.removeClass('transitioning'); + if (!app.params.swipeoutNoFollow) { + swipeOutEl.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened'); + swipeOutEl.removeClass('swipeout-opened'); + } + } + isMoved = true; + e.preventDefault(); + + touchesDiff = pageX - touchesStart.x; + translate = touchesDiff; + + if (opened) { + if (openedActions === 'right') translate = translate - actionsRightWidth; + else translate = translate + actionsLeftWidth; + } + + if (translate > 0 && actionsLeft.length === 0 || translate < 0 && actionsRight.length === 0) { + if (!opened) { + isTouched = isMoved = false; + swipeOutContent.transform(''); + if (buttonsRight && buttonsRight.length > 0) { + buttonsRight.transform(''); + } + if (buttonsLeft && buttonsLeft.length > 0) { + buttonsLeft.transform(''); + } + return; + } + translate = 0; + } + + if (translate < 0) direction = 'to-left'; + else if (translate > 0) direction = 'to-right'; + else { + if (!direction) direction = 'to-left'; + } + + var i, buttonOffset, progress; + + e.f7PreventPanelSwipe = true; + if (app.params.swipeoutNoFollow) { + if (opened) { + if (openedActions === 'right' && touchesDiff > 0) { + app.swipeoutClose(swipeOutEl); + } + if (openedActions === 'left' && touchesDiff < 0) { + app.swipeoutClose(swipeOutEl); + } + } + else { + if (touchesDiff < 0 && actionsRight.length > 0) { + app.swipeoutOpen(swipeOutEl, 'right'); + } + if (touchesDiff > 0 && actionsLeft.length > 0) { + app.swipeoutOpen(swipeOutEl, 'left'); + } + } + isTouched = false; + isMoved = false; + return; + } + overswipeLeft = false; + overswipeRight = false; + var $button; + if (actionsRight.length > 0) { + // Show right actions + progress = translate / actionsRightWidth; + if (translate < -actionsRightWidth) { + translate = -actionsRightWidth - Math.pow(-translate - actionsRightWidth, 0.8); + if (overswipeRightButton.length > 0) { + overswipeRight = true; + } + } + for (i = 0; i < buttonsRight.length; i++) { + if (typeof buttonsRight[i]._buttonOffset === 'undefined') { + buttonsRight[i]._buttonOffset = buttonsRight[i].offsetLeft; + } + buttonOffset = buttonsRight[i]._buttonOffset; + $button = $(buttonsRight[i]); + if (overswipeRightButton.length > 0 && $button.hasClass('swipeout-overswipe')) { + $button.css({left: (overswipeRight ? -buttonOffset : 0) + 'px'}); + if (overswipeRight) { + $button.addClass('swipeout-overswipe-active'); + } + else { + $button.removeClass('swipeout-overswipe-active'); + } + } + $button.transform('translate3d(' + (translate - buttonOffset * (1 + Math.max(progress, -1))) + 'px,0,0)'); + } + } + if (actionsLeft.length > 0) { + // Show left actions + progress = translate / actionsLeftWidth; + if (translate > actionsLeftWidth) { + translate = actionsLeftWidth + Math.pow(translate - actionsLeftWidth, 0.8); + if (overswipeLeftButton.length > 0) { + overswipeLeft = true; + } + } + for (i = 0; i < buttonsLeft.length; i++) { + if (typeof buttonsLeft[i]._buttonOffset === 'undefined') { + buttonsLeft[i]._buttonOffset = actionsLeftWidth - buttonsLeft[i].offsetLeft - buttonsLeft[i].offsetWidth; + } + buttonOffset = buttonsLeft[i]._buttonOffset; + $button = $(buttonsLeft[i]); + if (overswipeLeftButton.length > 0 && $button.hasClass('swipeout-overswipe')) { + $button.css({left: (overswipeLeft ? buttonOffset : 0) + 'px'}); + if (overswipeLeft) { + $button.addClass('swipeout-overswipe-active'); + } + else { + $button.removeClass('swipeout-overswipe-active'); + } + } + if (buttonsLeft.length > 1) { + $button.css('z-index', buttonsLeft.length - i); + } + $button.transform('translate3d(' + (translate + buttonOffset * (1 - Math.min(progress, 1))) + 'px,0,0)'); + } + } + swipeOutContent.transform('translate3d(' + translate + 'px,0,0)'); + } + function handleTouchEnd(e) { + if (!isTouched || !isMoved) { + isTouched = false; + isMoved = false; + return; + } + + isTouched = false; + isMoved = false; + var timeDiff = (new Date()).getTime() - touchStartTime; + var action, actionsWidth, actions, buttons, i; + + actions = direction === 'to-left' ? actionsRight : actionsLeft; + actionsWidth = direction === 'to-left' ? actionsRightWidth : actionsLeftWidth; + + if ( + timeDiff < 300 && (touchesDiff < -10 && direction === 'to-left' || touchesDiff > 10 && direction === 'to-right') || + timeDiff >= 300 && Math.abs(translate) > actionsWidth / 2 + ) { + action = 'open'; + } + else { + action = 'close'; + } + if (timeDiff < 300) { + if (Math.abs(translate) === 0) action = 'close'; + if (Math.abs(translate) === actionsWidth) action = 'open'; + } + + if (action === 'open') { + app.swipeoutOpenedEl = swipeOutEl; + swipeOutEl.trigger('open swipeout:open'); + swipeOutEl.addClass('swipeout-opened transitioning'); + var newTranslate = direction === 'to-left' ? -actionsWidth : actionsWidth; + swipeOutContent.transform('translate3d(' + newTranslate + 'px,0,0)'); + actions.addClass('swipeout-actions-opened'); + buttons = direction === 'to-left' ? buttonsRight : buttonsLeft; + if (buttons) { + for (i = 0; i < buttons.length; i++) { + $(buttons[i]).transform('translate3d(' + newTranslate + 'px,0,0)'); + } + } + if (overswipeRight) { + actionsRight.find('.swipeout-overswipe')[0].click(); + } + if (overswipeLeft) { + actionsLeft.find('.swipeout-overswipe')[0].click(); + } + } + else { + swipeOutEl.trigger('close swipeout:close'); + app.swipeoutOpenedEl = undefined; + swipeOutEl.addClass('transitioning').removeClass('swipeout-opened'); + swipeOutContent.transform(''); + actions.removeClass('swipeout-actions-opened'); + } + + var buttonOffset; + if (buttonsLeft && buttonsLeft.length > 0 && buttonsLeft !== buttons) { + for (i = 0; i < buttonsLeft.length; i++) { + buttonOffset = buttonsLeft[i]._buttonOffset; + if (typeof buttonOffset === 'undefined') { + buttonsLeft[i]._buttonOffset = actionsLeftWidth - buttonsLeft[i].offsetLeft - buttonsLeft[i].offsetWidth; + } + $(buttonsLeft[i]).transform('translate3d(' + (buttonOffset) + 'px,0,0)'); + } + } + if (buttonsRight && buttonsRight.length > 0 && buttonsRight !== buttons) { + for (i = 0; i < buttonsRight.length; i++) { + buttonOffset = buttonsRight[i]._buttonOffset; + if (typeof buttonOffset === 'undefined') { + buttonsRight[i]._buttonOffset = buttonsRight[i].offsetLeft; + } + $(buttonsRight[i]).transform('translate3d(' + (-buttonOffset) + 'px,0,0)'); + } + } + swipeOutContent.transitionEnd(function (e) { + if (opened && action === 'open' || closed && action === 'close') return; + swipeOutEl.trigger(action === 'open' ? 'opened' : 'closed'); + if (opened && action === 'close') { + if (actionsRight.length > 0) { + buttonsRight.transform(''); + } + if (actionsLeft.length > 0) { + buttonsLeft.transform(''); + } + } + }); + } + if (swipeoutEl) { + $(swipeoutEl).on(app.touchEvents.start, handleTouchStart, activeListener); + $(swipeoutEl).on(app.touchEvents.move, handleTouchMove, activeListener); + $(swipeoutEl).on(app.touchEvents.end, handleTouchEnd, activeListener); + } + else { + $(document).on(app.touchEvents.start, '.list-block li.swipeout', handleTouchStart, activeListener); + $(document).on(app.touchEvents.move, '.list-block li.swipeout', handleTouchMove, activeListener); + $(document).on(app.touchEvents.end, '.list-block li.swipeout', handleTouchEnd, activeListener); + } + + }; + app.swipeoutOpen = function (el, dir, callback) { + el = $(el); + if (arguments.length === 2) { + if (typeof arguments[1] === 'function') { + callback = dir; + } + } + + if (el.length === 0) return; + if (el.length > 1) el = $(el[0]); + if (!el.hasClass('swipeout') || el.hasClass('swipeout-opened')) return; + if (!dir) { + if (el.find('.swipeout-actions-right').length > 0) dir = 'right'; + else dir = 'left'; + } + var swipeOutActions = el.find('.swipeout-actions-' + dir); + if (swipeOutActions.length === 0) return; + el.trigger('open swipeout:open').addClass('swipeout-opened').removeClass('transitioning'); + swipeOutActions.addClass('swipeout-actions-opened'); + var buttons = swipeOutActions.children('a'); + var swipeOutActionsWidth = swipeOutActions.outerWidth(); + var translate = dir === 'right' ? -swipeOutActionsWidth : swipeOutActionsWidth; + var i; + if (buttons.length > 1) { + for (i = 0; i < buttons.length; i++) { + if (dir === 'right') { + $(buttons[i]).transform('translate3d(' + (- buttons[i].offsetLeft) + 'px,0,0)'); + } + else { + $(buttons[i]).css('z-index', buttons.length - i).transform('translate3d(' + (swipeOutActionsWidth - buttons[i].offsetWidth - buttons[i].offsetLeft) + 'px,0,0)'); + } + } + var clientLeft = buttons[1].clientLeft; + } + el.addClass('transitioning'); + for (i = 0; i < buttons.length; i++) { + $(buttons[i]).transform('translate3d(' + (translate) + 'px,0,0)'); + } + el.find('.swipeout-content').transform('translate3d(' + translate + 'px,0,0)').transitionEnd(function () { + el.trigger('opened swipeout:opened'); + if (callback) callback.call(el[0]); + }); + app.swipeoutOpenedEl = el; + }; + app.swipeoutClose = function (el, callback) { + el = $(el); + if (el.length === 0) return; + if (!el.hasClass('swipeout-opened')) return; + var dir = el.find('.swipeout-actions-opened').hasClass('swipeout-actions-right') ? 'right' : 'left'; + var swipeOutActions = el.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened'); + var buttons = swipeOutActions.children('a'); + var swipeOutActionsWidth = swipeOutActions.outerWidth(); + app.allowSwipeout = false; + el.trigger('close swipeout:close'); + el.removeClass('swipeout-opened').addClass('transitioning'); + + var closeTO; + function onSwipeoutClose() { + app.allowSwipeout = true; + if (el.hasClass('swipeout-opened')) return; + el.removeClass('transitioning'); + buttons.transform(''); + el.trigger('closed swipeout:closed'); + if (callback) callback.call(el[0]); + if (closeTO) clearTimeout(closeTO); + } + el.find('.swipeout-content').transform('').transitionEnd(onSwipeoutClose); + closeTO = setTimeout(onSwipeoutClose, 500); + + for (var i = 0; i < buttons.length; i++) { + if (dir === 'right') { + $(buttons[i]).transform('translate3d(' + (-buttons[i].offsetLeft) + 'px,0,0)'); + } + else { + $(buttons[i]).transform('translate3d(' + (swipeOutActionsWidth - buttons[i].offsetWidth - buttons[i].offsetLeft) + 'px,0,0)'); + } + $(buttons[i]).css({left:0 + 'px'}).removeClass('swipeout-overswipe-active'); + } + if (app.swipeoutOpenedEl && app.swipeoutOpenedEl[0] === el[0]) app.swipeoutOpenedEl = undefined; + }; + app.swipeoutDelete = function (el, callback) { + el = $(el); + if (el.length === 0) return; + if (el.length > 1) el = $(el[0]); + app.swipeoutOpenedEl = undefined; + el.trigger('delete swipeout:delete'); + el.css({height: el.outerHeight() + 'px'}); + var clientLeft = el[0].clientLeft; + el.css({height: 0 + 'px'}).addClass('deleting transitioning').transitionEnd(function () { + el.trigger('deleted swipeout:deleted'); + if (callback) callback.call(el[0]); + if (el.parents('.virtual-list').length > 0) { + var virtualList = el.parents('.virtual-list')[0].f7VirtualList; + var virtualIndex = el[0].f7VirtualListIndex; + if (virtualList && typeof virtualIndex !== 'undefined') virtualList.deleteItem(virtualIndex); + } + else { + if (app.params.swipeoutRemoveWithTimeout) { + setTimeout(function () { + el.remove(); + }, 0); + } + else el.remove(); + } + }); + var translate = '-100%'; + el.find('.swipeout-content').transform('translate3d(' + translate + ',0,0)'); + }; + + + /*=============================================================================== + ************ Sortable ************ + ===============================================================================*/ + app.sortableToggle = function (sortableContainer) { + sortableContainer = $(sortableContainer); + if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable'); + sortableContainer.toggleClass('sortable-opened'); + if (sortableContainer.hasClass('sortable-opened')) { + sortableContainer.trigger('open sortable:open'); + } + else { + sortableContainer.trigger('close sortable:close'); + } + return sortableContainer; + }; + app.sortableOpen = function (sortableContainer) { + sortableContainer = $(sortableContainer); + if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable'); + sortableContainer.addClass('sortable-opened'); + sortableContainer.trigger('open sortable:open'); + return sortableContainer; + }; + app.sortableClose = function (sortableContainer) { + sortableContainer = $(sortableContainer); + if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable'); + sortableContainer.removeClass('sortable-opened'); + sortableContainer.trigger('close sortable:close'); + return sortableContainer; + }; + app.initSortable = function () { + var isTouched, isMoved, touchStartY, touchesDiff, sortingEl, sortingElHeight, sortingItems, minTop, maxTop, insertAfter, insertBefore, sortableContainer, startIndex; + + function handleTouchStart(e) { + isMoved = false; + isTouched = true; + touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + /*jshint validthis:true */ + sortingEl = $(this).parent(); + startIndex = sortingEl.index(); + sortingItems = sortingEl.parent().children('li'); + sortableContainer = sortingEl.parents('.sortable'); + e.preventDefault(); + app.allowPanelOpen = app.allowSwipeout = false; + } + function handleTouchMove(e) { + if (!isTouched || !sortingEl) return; + var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (!isMoved) { + sortingEl.addClass('sorting'); + sortableContainer.addClass('sortable-sorting'); + minTop = sortingEl[0].offsetTop; + maxTop = sortingEl.parent().height() - sortingEl[0].offsetTop - sortingEl.height(); + sortingElHeight = sortingEl[0].offsetHeight; + } + isMoved = true; + + e.preventDefault(); + e.f7PreventPanelSwipe = true; + touchesDiff = pageY - touchStartY; + var translate = touchesDiff; + if (translate < -minTop) translate = -minTop; + if (translate > maxTop) translate = maxTop; + sortingEl.transform('translate3d(0,' + translate + 'px,0)'); + + insertBefore = insertAfter = undefined; + + sortingItems.each(function () { + var currentEl = $(this); + if (currentEl[0] === sortingEl[0]) return; + var currentElOffset = currentEl[0].offsetTop; + var currentElHeight = currentEl.height(); + var sortingElOffset = sortingEl[0].offsetTop + translate; + + if ((sortingElOffset >= currentElOffset - currentElHeight / 2) && sortingEl.index() < currentEl.index()) { + currentEl.transform('translate3d(0, '+(-sortingElHeight)+'px,0)'); + insertAfter = currentEl; + insertBefore = undefined; + } + else if ((sortingElOffset <= currentElOffset + currentElHeight / 2) && sortingEl.index() > currentEl.index()) { + currentEl.transform('translate3d(0, '+(sortingElHeight)+'px,0)'); + insertAfter = undefined; + if (!insertBefore) insertBefore = currentEl; + } + else { + $(this).transform('translate3d(0, 0%,0)'); + } + }); + } + function handleTouchEnd(e) { + app.allowPanelOpen = app.allowSwipeout = true; + if (!isTouched || !isMoved) { + isTouched = false; + isMoved = false; + return; + } + e.preventDefault(); + sortingItems.transform(''); + sortingEl.removeClass('sorting'); + sortableContainer.removeClass('sortable-sorting'); + var virtualList, oldIndex, newIndex; + if (insertAfter) { + sortingEl.insertAfter(insertAfter); + sortingEl.trigger('sort sortable:sort', {startIndex: startIndex, newIndex: sortingEl.index()}); + } + if (insertBefore) { + sortingEl.insertBefore(insertBefore); + sortingEl.trigger('sort sortable:sort', {startIndex: startIndex, newIndex: sortingEl.index()}); + } + if ((insertAfter || insertBefore) && sortableContainer.hasClass('virtual-list')) { + virtualList = sortableContainer[0].f7VirtualList; + oldIndex = sortingEl[0].f7VirtualListIndex; + newIndex = insertBefore ? insertBefore[0].f7VirtualListIndex : insertAfter[0].f7VirtualListIndex; + if (virtualList) virtualList.moveItem(oldIndex, newIndex); + } + insertAfter = insertBefore = undefined; + isTouched = false; + isMoved = false; + } + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + $(document).on(app.touchEvents.start, '.list-block.sortable .sortable-handler', handleTouchStart, activeListener); + if (app.support.touch) { + $(document).on(app.touchEvents.move, '.list-block.sortable .sortable-handler', handleTouchMove, activeListener); + $(document).on(app.touchEvents.end, '.list-block.sortable .sortable-handler', handleTouchEnd, activeListener); + } + else { + $(document).on(app.touchEvents.move, handleTouchMove, activeListener); + $(document).on(app.touchEvents.end, handleTouchEnd, activeListener); + } + }; + + + /*=============================================================================== + ************ Smart Select ************ + ===============================================================================*/ + app.initSmartSelects = function (pageContainer) { + pageContainer = $(pageContainer); + var selects; + if (pageContainer.is('.smart-select')) { + selects = pageContainer; + } + else { + selects = pageContainer.find('.smart-select'); + } + if (selects.length === 0) return; + + selects.each(function () { + var smartSelect = $(this); + + var $select = smartSelect.find('select'); + if ($select.length === 0) return; + + var select = $select[0]; + if (select.length === 0) return; + + var valueText = []; + var displayAs; + for (var i = 0; i < select.length; i++) { + if (select[i].selected) { + displayAs = select[i].dataset ? select[i].dataset.displayAs : $(select[i]).data('display-as'); + if (displayAs && typeof displayAs !== 'undefined') { + valueText.push(displayAs); + } else { + valueText.push(select[i].textContent.trim()); + } + } + } + + var itemAfter = smartSelect.find('.item-after'); + if (itemAfter.length === 0) { + smartSelect.find('.item-inner').append('
      ' + valueText.join(', ') + '
      '); + } + else { + var selectedText = itemAfter.text(); + if (itemAfter.hasClass('smart-select-value')) { + for (i = 0; i < select.length; i++) { + select[i].selected = select[i].textContent.trim() === selectedText.trim(); + } + } else { + itemAfter.text(valueText.join(', ')); + } + } + + $select.on('change', function () { + var valueText = []; + for (var i = 0; i < select.length; i++) { + if (select[i].selected) { + var displayAs = select[i].dataset ? select[i].dataset.displayAs : $(select[i]).data('display-as'); + if (displayAs && typeof displayAs !== 'undefined') { + valueText.push(displayAs); + } else { + valueText.push(select[i].textContent.trim()); + } + } + } + smartSelect.find('.item-after').text(valueText.join(', ')); + }); + + }); + + }; + app.smartSelectAddOption = function (select, option, index) { + select = $(select); + var smartSelect = select.parents('.smart-select'); + if (typeof index === 'undefined') { + select.append(option); + } + else { + $(option).insertBefore(select.find('option').eq(index)); + } + app.initSmartSelects(smartSelect); + var selectName = smartSelect.find('select').attr('name'); + var opened = $('.page.smart-select-page[data-select-name="' + selectName + '"]').length > 0; + if (opened) { + app.smartSelectOpen(smartSelect, true); + } + }; + app.smartSelectOpen = function (smartSelect, reLayout) { + smartSelect = $(smartSelect); + if (smartSelect.length === 0) return; + + // Find related view + var view = smartSelect.parents('.' + app.params.viewClass); + if (view.length === 0) return; + view = view[0].f7View; + + // Parameters + var openIn = smartSelect.attr('data-open-in') || app.params.smartSelectOpenIn; + if (openIn === 'popup') { + if ($('.popup.smart-select-popup').length > 0) return; + } + else if (openIn === 'picker') { + if ($('.picker-modal.modal-in').length > 0 && !reLayout){ + if (smartSelect[0].f7SmartSelectPicker !== $('.picker-modal.modal-in:not(.modal-out)')[0]) app.closeModal($('.picker-modal.modal-in:not(.modal-out)')); + else return; + } + } + else { + if (!view) return; + } + + var smartSelectData = smartSelect.dataset(); + var pageTitle = smartSelectData.pageTitle || smartSelect.find('.item-title').text(); + var backText = smartSelectData.backText || app.params.smartSelectBackText; + var closeText; + if (openIn === 'picker') { + closeText = smartSelectData.pickerCloseText || smartSelectData.backText || app.params.smartSelectPickerCloseText ; + } + else { + closeText = smartSelectData.popupCloseText || smartSelectData.backText || app.params.smartSelectPopupCloseText ; + } + var backOnSelect = smartSelectData.backOnSelect !== undefined ? smartSelectData.backOnSelect : app.params.smartSelectBackOnSelect; + var formTheme = smartSelectData.formTheme || app.params.smartSelectFormTheme; + var navbarTheme = smartSelectData.navbarTheme || app.params.smartSelectNavbarTheme; + var toolbarTheme = smartSelectData.toolbarTheme || app.params.smartSelectToolbarTheme; + var virtualList = smartSelectData.virtualList; + var virtualListHeight = smartSelectData.virtualListHeight; + var material = app.params.material; + var pickerHeight = smartSelectData.pickerHeight || app.params.smartSelectPickerHeight; + + // Collect all options/values + var select = smartSelect.find('select')[0]; + var $select = $(select); + var $selectData = $select.dataset(); + if (select.disabled || smartSelect.hasClass('disabled') || $select.hasClass('disabled')) { + return; + } + var values = []; + var id = (new Date()).getTime(); + var inputType = select.multiple ? 'checkbox' : 'radio'; + var inputName = inputType + '-' + id; + var maxLength = $select.attr('maxlength'); + var selectName = select.name; + var option, optionHasMedia, optionImage, optionIcon, optionGroup, optionGroupLabel, optionPreviousGroup, optionIsLabel, previousGroup, optionColor, optionClassName, optionData; + for (var i = 0; i < select.length; i++) { + option = $(select[i]); + optionData = option.dataset(); + optionImage = optionData.optionImage || $selectData.optionImage || smartSelectData.optionImage; + optionIcon = optionData.optionIcon || $selectData.optionIcon || smartSelectData.optionIcon; + optionHasMedia = optionImage || optionIcon || inputType === 'checkbox'; + if (material) optionHasMedia = optionImage || optionIcon; + optionColor = optionData.optionColor; + optionClassName = optionData.optionClass; + if (option[0].disabled) optionClassName += ' disabled'; + optionGroup = option.parent('optgroup')[0]; + optionGroupLabel = optionGroup && optionGroup.label; + optionIsLabel = false; + if (optionGroup) { + if (optionGroup !== previousGroup) { + optionIsLabel = true; + previousGroup = optionGroup; + values.push({ + groupLabel: optionGroupLabel, + isLabel: optionIsLabel + }); + } + } + values.push({ + value: option[0].value, + text: option[0].textContent.trim(), + selected: option[0].selected, + group: optionGroup, + groupLabel: optionGroupLabel, + image: optionImage, + icon: optionIcon, + color: optionColor, + className: optionClassName, + disabled: option[0].disabled, + inputType: inputType, + id: id, + hasMedia: optionHasMedia, + checkbox: inputType === 'checkbox', + inputName: inputName, + material: app.params.material + }); + } + + + // Item template/HTML + if (!app._compiledTemplates.smartSelectItem) { + app._compiledTemplates.smartSelectItem = t7.compile(app.params.smartSelectItemTemplate || + '{{#if isLabel}}' + + '
    • {{groupLabel}}
    • ' + + '{{else}}' + + '' + + '' + + '' + + '{{/if}}' + ); + } + var smartSelectItemTemplate = app._compiledTemplates.smartSelectItem; + + var inputsHTML = ''; + if (!virtualList) { + for (var j = 0; j < values.length; j++) { + inputsHTML += smartSelectItemTemplate(values[j]); + } + } + + // Toolbar / Navbar + var toolbarHTML = '', navbarHTML; + var noNavbar = '', noToolbar = '', noTabbar = '', navbarLayout; + + if (openIn === 'picker') { + if (!app._compiledTemplates.smartSelectToolbar) { + app._compiledTemplates.smartSelectToolbar = t7.compile(app.params.smartSelectToolbarTemplate || + '
      ' + + '
      ' + + '
      ' + + '' + + '
      ' + + '
      ' + ); + } + + toolbarHTML = app._compiledTemplates.smartSelectToolbar({ + pageTitle: pageTitle, + closeText: closeText, + openIn: openIn, + toolbarTheme: toolbarTheme, + inPicker: openIn === 'picker' + }); + } + else { + // Navbar HTML + if (!app._compiledTemplates.smartSelectNavbar) { + app._compiledTemplates.smartSelectNavbar = t7.compile(app.params.smartSelectNavbarTemplate || + '' + ); + } + navbarHTML = app._compiledTemplates.smartSelectNavbar({ + pageTitle: pageTitle, + backText: backText, + closeText: closeText, + openIn: openIn, + navbarTheme: navbarTheme, + inPopup: openIn === 'popup', + inPage: openIn === 'page', + leftTemplate: openIn === 'popup' ? + (app.params.smartSelectPopupCloseTemplate || (material ? '
      ' : '')).replace(/{{closeText}}/g, closeText) : + (app.params.smartSelectBackTemplate || (material ? '
      ' : '')).replace(/{{backText}}/g, backText) + }); + // Determine navbar layout type - static/fixed/through + if (openIn === 'page') { + navbarLayout = 'static'; + if (smartSelect.parents('.navbar-through').length > 0) navbarLayout = 'through'; + if (smartSelect.parents('.navbar-fixed').length > 0) navbarLayout = 'fixed'; + noToolbar = smartSelect.parents('.page').hasClass('no-toolbar') ? 'no-toolbar' : ''; + noNavbar = smartSelect.parents('.page').hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout; + noTabbar = smartSelect.parents('.page').hasClass('no-tabbar') ? 'no-tabbar' : ''; + } + else { + navbarLayout = 'fixed'; + } + } + + + // Page Layout + var pageName = 'smart-select-' + inputName; + + var useSearchbar = typeof smartSelect.data('searchbar') === 'undefined' ? app.params.smartSelectSearchbar : (smartSelect.data('searchbar') === 'true' ? true : false); + var searchbarPlaceholder, searchbarCancel; + + if (useSearchbar) { + searchbarPlaceholder = smartSelect.data('searchbar-placeholder') || 'Search'; + searchbarCancel = smartSelect.data('searchbar-cancel') || 'Cancel'; + } + + var searchbarHTML = '' + + '
      '; + + var pageHTML = + (openIn !== 'picker' && navbarLayout === 'through' ? navbarHTML : '') + + '
      ' + + '
      ' + + (openIn !== 'picker' && navbarLayout === 'fixed' ? navbarHTML : '') + + (useSearchbar ? searchbarHTML : '') + + '
      ' + + (openIn !== 'picker' && navbarLayout === 'static' ? navbarHTML : '') + + '
      ' + + '
        ' + + (virtualList ? '' : inputsHTML) + + '
      ' + + '
      ' + + '
      ' + + '
      ' + + '
      '; + + // Define popup and picker + var popup, picker; + + // Scroll SS Picker To Input + function scrollToInput() { + var pageContent = smartSelect.parents('.page-content'); + if (pageContent.length === 0) return; + var paddingTop = parseInt(pageContent.css('padding-top'), 10), + paddingBottom = parseInt(pageContent.css('padding-bottom'), 10), + pageHeight = pageContent[0].offsetHeight - paddingTop - picker.height(), + pageScrollHeight = pageContent[0].scrollHeight - paddingTop - picker.height(), + newPaddingBottom; + var inputTop = smartSelect.offset().top - paddingTop + smartSelect[0].offsetHeight; + if (inputTop > pageHeight) { + var scrollTop = pageContent.scrollTop() + inputTop - pageHeight; + if (scrollTop + pageHeight > pageScrollHeight) { + newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom; + if (pageHeight === pageScrollHeight) { + newPaddingBottom = picker.height(); + } + pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'}); + } + pageContent.scrollTop(scrollTop, 300); + } + } + // Close SS Picker on HTML Click + function closeOnHTMLClick(e) { + var close = true; + if (e.target === smartSelect[0] || $(e.target).parents(smartSelect[0]).length > 0) { + close = false; + } + if ($(e.target).parents('.picker-modal').length > 0) { + close = false; + } + if (close) { + app.closeModal('.smart-select-picker.modal-in'); + } + } + + // Check max length + function checkMaxLength(container) { + if (select.selectedOptions.length >= maxLength) { + container.find('input[type="checkbox"]').each(function () { + if (!this.checked) { + $(this).parents('li').addClass('disabled'); + } + else { + $(this).parents('li').removeClass('disabled'); + } + }); + } + else { + container.find('.disabled').removeClass('disabled'); + } + } + // Event Listeners on new page + function handleInputs(container) { + container = $(container); + if (virtualList) { + var virtualListInstance = app.virtualList(container.find('.virtual-list'), { + items: values, + template: smartSelectItemTemplate, + height: virtualListHeight || undefined, + searchByItem: function (query, index, item) { + if (item.text && item.text.toLowerCase().indexOf(query.trim().toLowerCase()) >=0 ) return true; + return false; + } + }); + container.once(openIn === 'popup' || openIn === 'picker' ? 'closed': 'pageBeforeRemove', function () { + if (virtualListInstance && virtualListInstance.destroy) virtualListInstance.destroy(); + }); + } + if (maxLength) { + checkMaxLength(container); + } + if (backOnSelect) { + container.find('input[type="radio"][name="' + inputName + '"]:checked').parents('label').once('click', function () { + if (openIn === 'popup') app.closeModal(popup); + else if (openIn === 'picker') app.closeModal(picker); + else view.router.back(); + }); + } + container.on('change', 'input[name="' + inputName + '"]', function () { + var option, text; + var input = this; + var value = input.value; + var optionText = []; + var displayAs; + if (input.type === 'checkbox') { + var values = []; + for (var i = 0; i < select.options.length; i++) { + option = select.options[i]; + if (option.value === value) { + option.selected = input.checked; + } + if (option.selected) { + displayAs = option.dataset ? option.dataset.displayAs : $(option).data('display-as'); + text = displayAs && typeof displayAs !== 'undefined' ? displayAs : option.textContent; + optionText.push(text.trim()); + } + } + if (maxLength) { + checkMaxLength(container); + } + } + else { + option = smartSelect.find('option[value="' + value + '"]')[0]; + displayAs = option.dataset ? option.dataset.displayAs : $(option).data('display-as'); + text = displayAs && typeof displayAs !== 'undefined' ? displayAs : option.textContent; + optionText = [text]; + select.value = value; + } + + $select.trigger('change'); + smartSelect.find('.item-after').text(optionText.join(', ')); + if (backOnSelect && inputType === 'radio') { + if (openIn === 'popup') app.closeModal(popup); + else if (openIn === 'picker') app.closeModal(picker); + else view.router.back(); + } + }); + } + function pageInit(e) { + var page = e.detail.page; + if (page.name === pageName) { + handleInputs(page.container); + } + } + if (openIn === 'popup') { + if (reLayout) { + popup = $('.popup.smart-select-popup .view'); + popup.html(pageHTML); + } + else { + popup = app.popup( + '' + ); + popup = $(popup); + } + app.initPage(popup.find('.page')); + handleInputs(popup); + } + else if (openIn === 'picker') { + if (reLayout) { + picker = $('.picker-modal.smart-select-picker .view'); + picker.html(pageHTML); + } + else { + picker = app.pickerModal( + '
      ' + + toolbarHTML + + '
      ' + + '
      ' + + pageHTML + + '
      ' + + '
      ' + + '
      ' + ); + picker = $(picker); + + // Scroll To Input + scrollToInput(); + + // Close On Click + $('html').on('click', closeOnHTMLClick); + + // On Close + picker.once('picker:close', function () { + // Reset linked picker + smartSelect[0].f7SmartSelectPicker = undefined; + + // Detach html click + $('html').off('click', closeOnHTMLClick); + + // Restore page padding bottom + smartSelect.parents('.page-content').css({paddingBottom: ''}); + }); + + // Link Picker + smartSelect[0].f7SmartSelectPicker = picker[0]; + } + + // Init Page + app.initPage(picker.find('.page')); + + // Attach events + handleInputs(picker); + } + else { + $(document).once('page:init', '.smart-select-page', pageInit); + view.router.load({ + content: pageHTML, + reload: reLayout ? true : undefined + }); + } + }; + + + /*=============================================================================== + ************ Virtual List ************ + ===============================================================================*/ + var VirtualList = function (listBlock, params) { + var defaults = { + cols: 1, + height: app.params.material ? 48 : 44, + cache: true, + dynamicHeightBufferSize: 1, + showFilteredItemsOnly: false, + renderExternal: undefined, + template: + '
    • ' + + '
      ' + + '
      ' + + '
      {{this}}
      ' + + '
      ' + + '
      ' + + '
    • ' + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + + // Preparation + var vl = this; + vl.listBlock = $(listBlock); + vl.params = params; + vl.items = vl.params.items; + if (vl.params.showFilteredItemsOnly) { + vl.filteredItems = []; + } + if (vl.params.template && !vl.params.renderItem) { + if (typeof vl.params.template === 'string') vl.template = t7.compile(vl.params.template); + else if (typeof vl.params.template === 'function') vl.template = vl.params.template; + } + vl.pageContent = vl.listBlock.parents('.page-content'); + + // Bad scroll + var updatableScroll; + if (typeof vl.params.updatableScroll !== 'undefined') { + updatableScroll = vl.params.updatableScroll; + } + else { + updatableScroll = true; + if (app.device.ios && app.device.osVersion.split('.')[0] < 8) { + updatableScroll = false; + } + vl.params.updatableScroll = updatableScroll; + } + + // Append
        + vl.ul = vl.params.ul ? $(vl.params.ul) : vl.listBlock.children('ul'); + if (vl.ul.length === 0) { + vl.listBlock.append('
          '); + vl.ul = vl.listBlock.children('ul'); + } + + // DOM cached items + vl.domCache = {}; + vl.displayDomCache = {}; + + // Temporary DOM Element + vl.tempDomElement = document.createElement('ul'); + + // Last repain position + vl.lastRepaintY = null; + + // Fragment + vl.fragment = document.createDocumentFragment(); + + // Filter + vl.filterItems = function (indexes, resetScrollTop) { + vl.filteredItems = []; + var firstIndex = indexes[0]; + var lastIndex = indexes[indexes.length - 1]; + for (var i = 0; i < indexes.length; i++) { + vl.filteredItems.push(vl.items[indexes[i]]); + } + if (typeof resetScrollTop === 'undefined') resetScrollTop = true; + if (resetScrollTop) { + vl.pageContent[0].scrollTop = 0; + } + vl.update(); + }; + vl.resetFilter = function () { + if (vl.params.showFilteredItemsOnly) { + vl.filteredItems = []; + } + else { + vl.filteredItems = null; + delete vl.filteredItems; + } + vl.update(); + }; + + var pageHeight, rowsPerScreen, rowsBefore, rowsAfter, rowsToRender, maxBufferHeight = 0, listHeight; + var dynamicHeight = typeof vl.params.height === 'function'; + + // Set list size + vl.setListSize = function () { + var items = vl.filteredItems || vl.items; + pageHeight = vl.pageContent[0].offsetHeight; + if (dynamicHeight) { + listHeight = 0; + vl.heights = []; + for (var i = 0; i < items.length; i++) { + var itemHeight = vl.params.height(items[i]); + listHeight += itemHeight; + vl.heights.push(itemHeight); + } + } + else { + listHeight = Math.ceil(items.length / vl.params.cols) * vl.params.height; + rowsPerScreen = Math.ceil(pageHeight / vl.params.height); + rowsBefore = vl.params.rowsBefore || rowsPerScreen * 2; + rowsAfter = vl.params.rowsAfter || rowsPerScreen; + rowsToRender = (rowsPerScreen + rowsBefore + rowsAfter); + maxBufferHeight = rowsBefore / 2 * vl.params.height; + } + + if (updatableScroll) { + vl.ul.css({height: listHeight + 'px'}); + } + }; + + // Render items + vl.render = function (force, forceScrollTop) { + if (force) vl.lastRepaintY = null; + + var scrollTop = -(vl.listBlock[0].getBoundingClientRect().top - vl.pageContent[0].getBoundingClientRect().top); + + if (typeof forceScrollTop !== 'undefined') scrollTop = forceScrollTop; + + if (vl.lastRepaintY === null || Math.abs(scrollTop - vl.lastRepaintY) > maxBufferHeight || (!updatableScroll && (vl.pageContent[0].scrollTop + pageHeight >= vl.pageContent[0].scrollHeight))) { + vl.lastRepaintY = scrollTop; + } + else { + return; + } + + var items = vl.filteredItems || vl.items, + fromIndex, toIndex, heightBeforeFirstItem = 0, heightBeforeLastItem = 0; + if (dynamicHeight) { + var itemTop = 0, j, itemHeight; + maxBufferHeight = pageHeight; + + for (j = 0; j < vl.heights.length; j++) { + itemHeight = vl.heights[j]; + if (typeof fromIndex === 'undefined') { + if (itemTop + itemHeight >= scrollTop - pageHeight * 2 * vl.params.dynamicHeightBufferSize) fromIndex = j; + else heightBeforeFirstItem += itemHeight; + } + + if (typeof toIndex === 'undefined') { + if (itemTop + itemHeight >= scrollTop + pageHeight * 2 * vl.params.dynamicHeightBufferSize || j === vl.heights.length - 1) toIndex = j + 1; + heightBeforeLastItem += itemHeight; + } + itemTop += itemHeight; + } + toIndex = Math.min(toIndex, items.length); + } + else { + fromIndex = (parseInt(scrollTop / vl.params.height) - rowsBefore) * vl.params.cols; + if (fromIndex < 0) { + fromIndex = 0; + } + toIndex = Math.min(fromIndex + rowsToRender * vl.params.cols, items.length); + } + + var topPosition, renderExternalItems = []; + vl.reachEnd = false; + for (var i = fromIndex; i < toIndex; i++) { + var item, index; + // Define real item index + index = vl.items.indexOf(items[i]); + + if (i === fromIndex) vl.currentFromIndex = index; + if (i === toIndex - 1) vl.currentToIndex = index; + if (vl.filteredItems) { + if (vl.items[index] === vl.filteredItems[vl.filteredItems.length - 1]) vl.reachEnd = true; + } + else { + if (index === vl.items.length - 1) vl.reachEnd = true; + } + + // Find items + if (vl.params.renderExternal) { + renderExternalItems.push(items[i]) + } + else { + if (vl.domCache[index]) { + item = vl.domCache[index]; + item.f7VirtualListIndex = index; + } + else { + if (vl.template && !vl.params.renderItem) { + vl.tempDomElement.innerHTML = vl.template(items[i], {index: index}).trim(); + } + else if (vl.params.renderItem) { + vl.tempDomElement.innerHTML = vl.params.renderItem(index, items[i]).trim(); + } + else { + vl.tempDomElement.innerHTML = items[i].toString().trim(); + } + item = vl.tempDomElement.childNodes[0]; + if (vl.params.cache) vl.domCache[index] = item; + item.f7VirtualListIndex = index; + } + } + + // Set item top position + if (i === fromIndex) { + if (dynamicHeight) { + topPosition = heightBeforeFirstItem; + } + else { + topPosition = (i * vl.params.height / vl.params.cols); + } + } + if (!vl.params.renderExternal) { + item.style.top = topPosition + 'px'; + + // Before item insert + if (vl.params.onItemBeforeInsert) vl.params.onItemBeforeInsert(vl, item); + + // Append item to fragment + vl.fragment.appendChild(item); + } + } + + // Update list height with not updatable scroll + if (!updatableScroll) { + if (dynamicHeight) { + vl.ul[0].style.height = heightBeforeLastItem + 'px'; + } + else { + vl.ul[0].style.height = i * vl.params.height / vl.params.cols + 'px'; + } + } + + // Update list html + if (vl.params.renderExternal) { + if (items && items.length === 0) { + vl.reachEnd = true; + } + } + else { + if (vl.params.onBeforeClear) vl.params.onBeforeClear(vl, vl.fragment); + vl.ul[0].innerHTML = ''; + + if (vl.params.onItemsBeforeInsert) vl.params.onItemsBeforeInsert(vl, vl.fragment); + if (items && items.length === 0) { + vl.reachEnd = true; + if (vl.params.emptyTemplate) vl.ul[0].innerHTML = vl.params.emptyTemplate; + } + else { + vl.ul[0].appendChild(vl.fragment); + } + + if (vl.params.onItemsAfterInsert) vl.params.onItemsAfterInsert(vl, vl.fragment); + } + + if (typeof forceScrollTop !== 'undefined' && force) { + vl.pageContent.scrollTop(forceScrollTop, 0); + } + if (vl.params.renderExternal) { + vl.params.renderExternal(vl, { + fromIndex: fromIndex, + toIndex: toIndex, + listHeight: listHeight, + topPosition: topPosition, + items: renderExternalItems + }); + } + }; + + vl.scrollToItem = function (index) { + if (index > vl.items.length) return false; + + var itemTop = 0, listTop; + if (dynamicHeight) { + for (var i = 0; i < index; i++) { + itemTop += vl.heights[i]; + } + } + else { + itemTop = index * vl.params.height; + } + listTop = vl.listBlock[0].offsetTop; + vl.render(true, listTop + itemTop - parseInt(vl.pageContent.css('padding-top'), 10)); + return true; + }; + + // Handle scroll event + vl.handleScroll = function (e) { + vl.render(); + }; + // Handle resize event + vl._isVisible = function (el) { + return !!( el.offsetWidth || el.offsetHeight || el.getClientRects().length ); + }; + vl.handleResize = function (e) { + if (vl._isVisible(vl.listBlock[0])) { + vl.setListSize(); + vl.render(true); + } + }; + + vl.attachEvents = function (detach) { + var action = detach ? 'off' : 'on'; + vl.pageContent[action]('scroll', vl.handleScroll); + vl.listBlock.parents('.tab').eq(0)[action]('tab:show', vl.handleResize); + vl.listBlock.parents('.panel').eq(0)[action]('panel:open', vl.handleResize); + vl.listBlock.parents('.popup').eq(0)[action]('popup:open', vl.handleResize); + app[action === 'on' ? 'onResize' : 'offResize'](vl.handleResize); + }; + + // Init Virtual List + vl.init = function () { + vl.attachEvents(); + vl.setListSize(); + vl.render(); + }; + + // Append + vl.appendItems = function (items) { + for (var i = 0; i < items.length; i++) { + vl.items.push(items[i]); + } + vl.update(); + }; + vl.appendItem = function (item) { + vl.appendItems([item]); + }; + // Replace + vl.replaceAllItems = function (items) { + vl.items = items; + delete vl.filteredItems; + vl.domCache = {}; + vl.update(); + }; + vl.replaceItem = function (index, item) { + vl.items[index] = item; + if (vl.params.cache) delete vl.domCache[index]; + vl.update(); + }; + // Prepend + vl.prependItems = function (items) { + for (var i = items.length - 1; i >= 0; i--) { + vl.items.unshift(items[i]); + } + if (vl.params.cache) { + var newCache = {}; + for (var cached in vl.domCache) { + newCache[parseInt(cached, 10) + items.length] = vl.domCache[cached]; + } + vl.domCache = newCache; + } + vl.update(); + }; + vl.prependItem = function (item) { + vl.prependItems([item]); + }; + + // Move + vl.moveItem = function (oldIndex, newIndex) { + if (oldIndex === newIndex) return; + // remove item from array + var item = vl.items.splice(oldIndex, 1)[0]; + if (newIndex >= vl.items.length) { + // Add item to the end + vl.items.push(item); + newIndex = vl.items.length - 1; + } + else { + // Add item to new index + vl.items.splice(newIndex, 0, item); + } + // Update cache + if (vl.params.cache) { + var newCache = {}; + for (var cached in vl.domCache) { + var cachedIndex = parseInt(cached, 10); + var leftIndex = oldIndex < newIndex ? oldIndex : newIndex; + var rightIndex = oldIndex < newIndex ? newIndex : oldIndex; + var indexShift = oldIndex < newIndex ? -1 : 1; + if (cachedIndex < leftIndex || cachedIndex > rightIndex) newCache[cachedIndex] = vl.domCache[cachedIndex]; + if (cachedIndex === leftIndex) newCache[rightIndex] = vl.domCache[cachedIndex]; + if (cachedIndex > leftIndex && cachedIndex <= rightIndex) newCache[cachedIndex + indexShift] = vl.domCache[cachedIndex]; + } + vl.domCache = newCache; + } + vl.update(); + }; + // Insert before + vl.insertItemBefore = function (index, item) { + if (index === 0) { + vl.prependItem(item); + return; + } + if (index >= vl.items.length) { + vl.appendItem(item); + return; + } + vl.items.splice(index, 0, item); + // Update cache + if (vl.params.cache) { + var newCache = {}; + for (var cached in vl.domCache) { + var cachedIndex = parseInt(cached, 10); + if (cachedIndex >= index) { + newCache[cachedIndex + 1] = vl.domCache[cachedIndex]; + } + } + vl.domCache = newCache; + } + vl.update(); + }; + // Delete + vl.deleteItems = function (indexes) { + var prevIndex, indexShift = 0; + for (var i = 0; i < indexes.length; i++) { + var index = indexes[i]; + if (typeof prevIndex !== 'undefined') { + if (index > prevIndex) { + indexShift = -i; + } + } + index = index + indexShift; + prevIndex = indexes[i]; + // Delete item + var deletedItem = vl.items.splice(index, 1)[0]; + + // Delete from filtered + if (vl.filteredItems && vl.filteredItems.indexOf(deletedItem) >= 0) { + vl.filteredItems.splice(vl.filteredItems.indexOf(deletedItem), 1); + } + // Update cache + if (vl.params.cache) { + var newCache = {}; + for (var cached in vl.domCache) { + var cachedIndex = parseInt(cached, 10); + if (cachedIndex === index) { + delete vl.domCache[index]; + } + else if (parseInt(cached, 10) > index) { + newCache[cachedIndex - 1] = vl.domCache[cached]; + } + else { + newCache[cachedIndex] = vl.domCache[cached]; + } + } + vl.domCache = newCache; + } + } + vl.update(); + }; + vl.deleteAllItems = function () { + vl.items = []; + delete vl.filteredItems; + if (vl.params.cache) vl.domCache = {}; + vl.update(); + }; + vl.deleteItem = function (index) { + vl.deleteItems([index]); + }; + + // Clear cache + vl.clearCache = function () { + vl.domCache = {}; + }; + + // Update Virtual List + vl.update = function () { + vl.setListSize(); + vl.render(true); + }; + + // Destroy + vl.destroy = function () { + vl.attachEvents(true); + delete vl.items; + delete vl.domCache; + }; + + // Init Virtual List + vl.init(); + + // Store vl in container + vl.listBlock[0].f7VirtualList = vl; + return vl; + }; + + // App Method + app.virtualList = function (listBlock, params) { + return new VirtualList(listBlock, params); + }; + + app.reinitVirtualList = function (pageContainer) { + var page = $(pageContainer); + var vlists = page.find('.virtual-list'); + if (vlists.length === 0) return; + for (var i = 0; i < vlists.length; i++) { + var vlistInstance = vlists[i].f7VirtualList; + if (vlistInstance) { + vlistInstance.update(); + } + } + }; + + + /*====================================================== + ************ Pull To Refresh ************ + ======================================================*/ + app.initPullToRefresh = function (pageContainer) { + var eventsTarget = $(pageContainer); + if (!eventsTarget.hasClass('pull-to-refresh-content')) { + eventsTarget = eventsTarget.find('.pull-to-refresh-content'); + } + if (!eventsTarget || eventsTarget.length === 0) return; + + var touchId, isTouched, isMoved, touchesStart = {}, isScrolling, touchesDiff, touchStartTime, container, refresh = false, useTranslate = false, startTranslate = 0, translate, scrollTop, wasScrolled, layer, triggerDistance, dynamicTriggerDistance, pullStarted; + var page = eventsTarget.hasClass('page') ? eventsTarget : eventsTarget.parents('.page'); + var hasNavbar = false; + if (page.find('.navbar').length > 0 || page.parents('.navbar-fixed, .navbar-through').length > 0 || page.hasClass('navbar-fixed') || page.hasClass('navbar-through')) hasNavbar = true; + if (page.hasClass('no-navbar')) hasNavbar = false; + if (!hasNavbar) eventsTarget.addClass('pull-to-refresh-no-navbar'); + + container = eventsTarget; + + // Define trigger distance + if (container.attr('data-ptr-distance')) { + dynamicTriggerDistance = true; + } + else { + triggerDistance = 44; + } + + function handleTouchStart(e) { + if (isTouched) { + if (app.device.os === 'android') { + if ('targetTouches' in e && e.targetTouches.length > 1) return; + } + else return; + } + + /*jshint validthis:true */ + container = $(this); + if (container.hasClass('refreshing')) { + return; + } + + isMoved = false; + pullStarted = false; + isTouched = true; + isScrolling = undefined; + wasScrolled = undefined; + if (e.type === 'touchstart') touchId = e.targetTouches[0].identifier; + touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = (new Date()).getTime(); + + } + + function handleTouchMove(e) { + if (!isTouched) return; + var pageX, pageY, touch; + if (e.type === 'touchmove') { + if (touchId && e.touches) { + for (var i = 0; i < e.touches.length; i++) { + if (e.touches[i].identifier === touchId) { + touch = e.touches[i]; + } + } + } + if (!touch) touch = e.targetTouches[0]; + pageX = touch.pageX; + pageY = touch.pageY; + } + else { + pageX = e.pageX; + pageY = e.pageY; + } + if (!pageX || !pageY) return; + + + if (typeof isScrolling === 'undefined') { + isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x)); + } + if (!isScrolling) { + isTouched = false; + return; + } + + scrollTop = container[0].scrollTop; + if (typeof wasScrolled === 'undefined' && scrollTop !== 0) wasScrolled = true; + + if (!isMoved) { + /*jshint validthis:true */ + container.removeClass('transitioning'); + if (scrollTop > container[0].offsetHeight) { + isTouched = false; + return; + } + if (dynamicTriggerDistance) { + triggerDistance = container.attr('data-ptr-distance'); + if (triggerDistance.indexOf('%') >= 0) triggerDistance = container[0].offsetHeight * parseInt(triggerDistance, 10) / 100; + } + startTranslate = container.hasClass('refreshing') ? triggerDistance : 0; + if (container[0].scrollHeight === container[0].offsetHeight || app.device.os !== 'ios') { + useTranslate = true; + } + else { + useTranslate = false; + } + } + isMoved = true; + touchesDiff = pageY - touchesStart.y; + + if (touchesDiff > 0 && scrollTop <= 0 || scrollTop < 0) { + // iOS 8 fix + if (app.device.os === 'ios' && parseInt(app.device.osVersion.split('.')[0], 10) > 7 && scrollTop === 0 && !wasScrolled) useTranslate = true; + + if (useTranslate) { + e.preventDefault(); + translate = (Math.pow(touchesDiff, 0.85) + startTranslate); + container.transform('translate3d(0,' + translate + 'px,0)'); + } + if ((useTranslate && Math.pow(touchesDiff, 0.85) > triggerDistance) || (!useTranslate && touchesDiff >= triggerDistance * 2)) { + refresh = true; + container.addClass('pull-up').removeClass('pull-down'); + } + else { + refresh = false; + container.removeClass('pull-up').addClass('pull-down'); + } + if (!pullStarted) { + container.trigger('pullstart ptr:pullstart'); + pullStarted = true; + } + container.trigger('pullmove ptr:pullmove', { + event: e, + scrollTop: scrollTop, + translate: translate, + touchesDiff: touchesDiff + }); + } + else { + pullStarted = false; + container.removeClass('pull-up pull-down'); + refresh = false; + return; + } + } + function handleTouchEnd(e) { + if (e.type === 'touchend' && e.changedTouches && e.changedTouches.length > 0 && touchId) { + if (e.changedTouches[0].identifier !== touchId) return; + } + if (!isTouched || !isMoved) { + isTouched = false; + isMoved = false; + return; + } + if (translate) { + container.addClass('transitioning'); + translate = 0; + } + container.transform(''); + if (refresh) { + container.addClass('refreshing'); + container.trigger('refresh ptr:refresh', { + done: function () { + app.pullToRefreshDone(container); + } + }); + } + else { + container.removeClass('pull-down'); + } + isTouched = false; + isMoved = false; + if (pullStarted) container.trigger('pullend ptr:pullend'); + } + + // Attach Events + var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false; + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + eventsTarget.on(app.touchEvents.start, handleTouchStart, passiveListener); + eventsTarget.on(app.touchEvents.move, handleTouchMove, activeListener); + eventsTarget.on(app.touchEvents.end, handleTouchEnd, passiveListener); + + // Detach Events on page remove + if (page.length === 0) return; + function destroyPullToRefresh(destroyTarget) { + destroyTarget.off(app.touchEvents.start, handleTouchStart, passiveListener); + destroyTarget.off(app.touchEvents.move, handleTouchMove, activeListener); + destroyTarget.off(app.touchEvents.end, handleTouchEnd, passiveListener); + } + for (var i = 0; i < eventsTarget.length; i++) { + eventsTarget[i].f7DestroyPullToRefresh = destroyPullToRefresh; + } + function detachEvents() { + destroyPullToRefresh(eventsTarget); + page.off('page:beforeremove', detachEvents); + } + page.on('page:beforeremove', detachEvents); + + }; + + app.pullToRefreshDone = function (container) { + container = $(container); + if (container.length === 0) container = $('.pull-to-refresh-content.refreshing'); + container.removeClass('refreshing').addClass('transitioning'); + container.transitionEnd(function () { + container.removeClass('transitioning pull-up pull-down'); + container.trigger('refreshdone ptr:done'); + }); + }; + app.pullToRefreshTrigger = function (container) { + container = $(container); + if (container.length === 0) container = $('.pull-to-refresh-content'); + if (container.hasClass('refreshing')) return; + container.addClass('transitioning refreshing'); + container.trigger('refresh ptr:refresh', { + done: function () { + app.pullToRefreshDone(container); + } + }); + }; + + app.destroyPullToRefresh = function (pageContainer) { + pageContainer = $(pageContainer); + var pullToRefreshContent = pageContainer.hasClass('pull-to-refresh-content') ? pageContainer : pageContainer.find('.pull-to-refresh-content'); + if (pullToRefreshContent.length === 0) return; + if (pullToRefreshContent[0].f7DestroyPullToRefresh) pullToRefreshContent[0].f7DestroyPullToRefresh(pageContainer); + }; + + + /* =============================================================================== + ************ Infinite Scroll ************ + =============================================================================== */ + function handleInfiniteScroll() { + /*jshint validthis:true */ + var inf = $(this); + var scrollTop = inf[0].scrollTop; + var scrollHeight = inf[0].scrollHeight; + var height = inf[0].offsetHeight; + var distance = inf[0].getAttribute('data-distance'); + var virtualListContainer = inf.find('.virtual-list'); + var virtualList; + var onTop = inf.hasClass('infinite-scroll-top'); + if (!distance) distance = 50; + if (typeof distance === 'string' && distance.indexOf('%') >= 0) { + distance = parseInt(distance, 10) / 100 * height; + } + if (distance > height) distance = height; + if (onTop) { + if (scrollTop < distance) { + inf.trigger('infinite'); + } + } + else { + if (scrollTop + height >= scrollHeight - distance) { + if (virtualListContainer.length > 0) { + virtualList = virtualListContainer.eq(-1)[0].f7VirtualList; + if (virtualList && !virtualList.reachEnd && !virtualList.params.updatableScroll) { + return; + } + } + inf.trigger('infinite'); + } + } + + } + app.attachInfiniteScroll = function (infiniteContent) { + $(infiniteContent).on('scroll', handleInfiniteScroll); + }; + app.detachInfiniteScroll = function (infiniteContent) { + $(infiniteContent).off('scroll', handleInfiniteScroll); + }; + + app.initPageInfiniteScroll = function (pageContainer) { + pageContainer = $(pageContainer); + var infiniteContent = pageContainer.find('.infinite-scroll'); + if (infiniteContent.length === 0) return; + app.attachInfiniteScroll(infiniteContent); + function detachEvents() { + app.detachInfiniteScroll(infiniteContent); + pageContainer.off('page:beforeremove', detachEvents); + } + pageContainer.on('page:beforeremove', detachEvents); + }; + + /*============================================================= + ************ Hide/show Toolbar/Navbar on scroll ************ + =============================================================*/ + app.initPageScrollToolbars = function (pageContainer) { + pageContainer = $(pageContainer); + var scrollContent = pageContainer.find('.page-content'); + if (scrollContent.length === 0) return; + var hideNavbar = (app.params.hideNavbarOnPageScroll || scrollContent.hasClass('hide-navbar-on-scroll') || scrollContent.hasClass('hide-bars-on-scroll')) && !(scrollContent.hasClass('keep-navbar-on-scroll') || scrollContent.hasClass('keep-bars-on-scroll')); + var hideToolbar = (app.params.hideToolbarOnPageScroll || scrollContent.hasClass('hide-toolbar-on-scroll') || scrollContent.hasClass('hide-bars-on-scroll')) && !(scrollContent.hasClass('keep-toolbar-on-scroll') || scrollContent.hasClass('keep-bars-on-scroll')); + var hideTabbar = (app.params.hideTabbarOnPageScroll || scrollContent.hasClass('hide-tabbar-on-scroll')) && !(scrollContent.hasClass('keep-tabbar-on-scroll')); + + if (!(hideNavbar || hideToolbar || hideTabbar)) return; + + var viewContainer = scrollContent.parents('.' + app.params.viewClass); + if (viewContainer.length === 0) return; + + var navbar = viewContainer.find('.navbar'), + toolbar = viewContainer.find('.toolbar'), + tabbar; + if (hideTabbar) { + tabbar = viewContainer.find('.tabbar'); + if (tabbar.length === 0) tabbar = viewContainer.parents('.' + app.params.viewsClass).find('.tabbar'); + } + + var hasNavbar = navbar.length > 0, + hasToolbar = toolbar.length > 0, + hasTabbar = tabbar && tabbar.length > 0; + + var previousScroll, currentScroll; + previousScroll = currentScroll = scrollContent[0].scrollTop; + + var scrollHeight, offsetHeight, reachEnd, action, navbarHidden, toolbarHidden, tabbarHidden; + + var toolbarHeight = (hasToolbar && hideToolbar) ? toolbar[0].offsetHeight : 0; + var tabbarHeight = (hasTabbar && hideTabbar) ? tabbar[0].offsetHeight : 0; + var bottomBarHeight = tabbarHeight || toolbarHeight; + + function handleScroll(e) { + if (pageContainer.hasClass('page-on-left')) return; + currentScroll = scrollContent[0].scrollTop; + scrollHeight = scrollContent[0].scrollHeight; + offsetHeight = scrollContent[0].offsetHeight; + reachEnd = currentScroll + offsetHeight >= scrollHeight - bottomBarHeight; + navbarHidden = navbar.hasClass('navbar-hidden'); + toolbarHidden = toolbar.hasClass('toolbar-hidden'); + tabbarHidden = tabbar && tabbar.hasClass('toolbar-hidden'); + + if (reachEnd) { + if (app.params.showBarsOnPageScrollEnd) { + action = 'show'; + } + } + else if (previousScroll > currentScroll) { + if (app.params.showBarsOnPageScrollTop || currentScroll <= 44) { + action = 'show'; + } + else { + action = 'hide'; + } + } + else { + if (currentScroll > 44) { + action = 'hide'; + } + else { + action = 'show'; + } + } + + if (action === 'show') { + if (hasNavbar && hideNavbar && navbarHidden) { + app.showNavbar(navbar); + pageContainer.removeClass('no-navbar-by-scroll'); + navbarHidden = false; + } + if (hasToolbar && hideToolbar && toolbarHidden) { + app.showToolbar(toolbar); + pageContainer.removeClass('no-toolbar-by-scroll'); + toolbarHidden = false; + } + if (hasTabbar && hideTabbar && tabbarHidden) { + app.showToolbar(tabbar); + pageContainer.removeClass('no-tabbar-by-scroll'); + tabbarHidden = false; + } + } + else { + if (hasNavbar && hideNavbar && !navbarHidden) { + app.hideNavbar(navbar); + pageContainer.addClass('no-navbar-by-scroll'); + navbarHidden = true; + } + if (hasToolbar && hideToolbar && !toolbarHidden) { + app.hideToolbar(toolbar); + pageContainer.addClass('no-toolbar-by-scroll'); + toolbarHidden = true; + } + if (hasTabbar && hideTabbar && !tabbarHidden) { + app.hideToolbar(tabbar); + pageContainer.addClass('no-tabbar-by-scroll'); + tabbarHidden = true; + } + } + + previousScroll = currentScroll; + } + scrollContent.on('scroll', handleScroll); + scrollContent[0].f7ScrollToolbarsHandler = handleScroll; + }; + app.destroyScrollToolbars = function (pageContainer) { + pageContainer = $(pageContainer); + var scrollContent = pageContainer.find('.page-content'); + if (scrollContent.length === 0) return; + var handler = scrollContent[0].f7ScrollToolbarsHandler; + if (!handler) return; + scrollContent.off('scroll', scrollContent[0].f7ScrollToolbarsHandler); + }; + + + /*====================================================== + ************ Material Tabbar ************ + ======================================================*/ + app.materialTabbarSetHighlight = function (tabbar, activeLink) { + $(tabbar).each(function () { + var tabbar = $(this); + activeLink = activeLink || tabbar.find('.tab-link.active'); + + if (activeLink && activeLink.length > 0) { + var tabLinkWidth, highlightTranslate; + if (tabbar.hasClass('tabbar-scrollable')) { + tabLinkWidth = activeLink[0].offsetWidth + 'px'; + highlightTranslate = activeLink[0].offsetLeft + 'px'; + } + else { + tabLinkWidth = 1 / tabbar.find('.tab-link').length * 100 + '%'; + highlightTranslate = (app.rtl ? - activeLink.index(): activeLink.index()) * 100 + '%'; + } + + tabbar.find('.tab-link-highlight') + .css({width: tabLinkWidth}) + .transform('translate3d(' + highlightTranslate + ',0,0)'); + } + }); + }; + app.initPageMaterialTabbar = function (pageContainer) { + pageContainer = $(pageContainer); + var tabbar = pageContainer.find('.tabbar'); + if (tabbar.length === 0 && pageContainer.hasClass('tabbar')) tabbar = pageContainer; + + function tabbarSetHighlight() { + app.materialTabbarSetHighlight(tabbar); + } + if (tabbar.length > 0) { + if (tabbar.find('.tab-link-highlight').length === 0) { + tabbar.find('.toolbar-inner').append(''); + } + + tabbarSetHighlight(); + app.onResize(tabbarSetHighlight); + pageContainer.once('page:beforeremove', function () { + app.offResize(tabbarSetHighlight); + }); + } + }; + app.initMaterialTabbar = function (tabbar) { + return app.initPageMaterialTabbar(tabbar); + }; + + + /* =============================================================================== + ************ Tabs ************ + =============================================================================== */ + app.showTab = function (tab, tabLink, animated, force) { + var newTab = $(tab); + if (arguments.length === 2 && typeof arguments[1] === 'boolean') { + tab = arguments[0]; + animated = arguments[1]; + } + if (arguments.length === 3 && typeof arguments[1] === 'boolean' && typeof arguments[2] === 'boolean') { + tab = arguments[0]; + animated = arguments[1]; + force = arguments[2]; + } + if (typeof animated === 'undefined') animated = true; + if (newTab.length === 0) return false; + if (newTab.hasClass('active')) { + if (force) newTab.trigger('show tab:show'); + return false; + } + var tabs = newTab.parent('.tabs'); + if (tabs.length === 0) return false; + + // Return swipeouts in hidden tabs + app.allowSwipeout = true; + + // Animated tabs + var isAnimatedTabs = tabs.parent().hasClass('tabs-animated-wrap'); + if (isAnimatedTabs) { + tabs.parent()[animated ? 'removeClass' : 'addClass']('not-animated'); + var tabTranslate = (app.rtl ? newTab.index() : -newTab.index()) * 100; + tabs.transform('translate3d(' + tabTranslate + '%,0,0)'); + } + + // Swipeable tabs + var isSwipeableTabs = tabs.parent().hasClass('tabs-swipeable-wrap'), swiper; + if (isSwipeableTabs) { + swiper = tabs.parent()[0].swiper; + if (swiper.activeIndex !== newTab.index()) swiper.slideTo(newTab.index(), animated ? undefined : 0, false); + } + + // Remove active class from old tabs + var oldTab = tabs.children('.tab.active').removeClass('active').trigger('hide tab:hide'); + // Add active class to new tab + newTab.addClass('active'); + // Trigger 'show' event on new tab + newTab.trigger('show tab:show'); + + // Update navbars in new tab + if (!isAnimatedTabs && !isSwipeableTabs && newTab.find('.navbar').length > 0) { + // Find tab's view + var viewContainer; + if (newTab.hasClass(app.params.viewClass)) viewContainer = newTab[0]; + else viewContainer = newTab.parents('.' + app.params.viewClass)[0]; + app.sizeNavbars(viewContainer); + } + + // Find related link for new tab + if (tabLink) tabLink = $(tabLink); + else { + // Search by id + if (typeof tab === 'string') tabLink = $('.tab-link[href="' + tab + '"]'); + else tabLink = $('.tab-link[href="#' + newTab.attr('id') + '"]'); + // Search by data-tab + if (!tabLink || tabLink && tabLink.length === 0) { + $('[data-tab]').each(function () { + if (newTab.is($(this).attr('data-tab'))) tabLink = $(this); + }); + } + } + if (tabLink.length === 0) return; + + // Find related link for old tab + var oldTabLink; + if (oldTab && oldTab.length > 0) { + // Search by id + var oldTabId = oldTab.attr('id'); + if (oldTabId) oldTabLink = $('.tab-link[href="#' + oldTabId + '"]'); + // Search by data-tab + if (!oldTabLink || oldTabLink && oldTabLink.length === 0) { + $('[data-tab]').each(function () { + if (oldTab.is($(this).attr('data-tab'))) oldTabLink = $(this); + }); + } + } + + // Update links' classes + if (tabLink && tabLink.length > 0) { + tabLink.addClass('active'); + // Material Highlight + if (app.params.material) { + var tabbar = tabLink.parents('.tabbar'); + if (tabbar.length > 0) { + if (tabbar.find('.tab-link-highlight').length === 0) { + tabbar.find('.toolbar-inner').append(''); + } + app.materialTabbarSetHighlight(tabbar, tabLink); + } + } + } + if (oldTabLink && oldTabLink.length > 0) oldTabLink.removeClass('active'); + + return true; + }; + + /*=============================================================================== + ************ Accordion ************ + ===============================================================================*/ + app.accordionToggle = function (item) { + item = $(item); + if (item.length === 0) return; + if (item.hasClass('accordion-item-expanded')) app.accordionClose(item); + else app.accordionOpen(item); + }; + app.accordionOpen = function (item) { + item = $(item); + var list = item.parents('.accordion-list').eq(0); + var content = item.children('.accordion-item-content'); + if (content.length === 0) content = item.find('.accordion-item-content'); + var expandedItem = list.length > 0 && item.parent().children('.accordion-item-expanded'); + if (expandedItem.length > 0) { + app.accordionClose(expandedItem); + } + content.css('height', content[0].scrollHeight + 'px').transitionEnd(function () { + if (item.hasClass('accordion-item-expanded')) { + content.transition(0); + content.css('height', 'auto'); + var clientLeft = content[0].clientLeft; + content.transition(''); + item.trigger('opened accordion:opened'); + } + else { + content.css('height', ''); + item.trigger('closed accordion:closed'); + } + }); + item.trigger('open accordion:open'); + item.addClass('accordion-item-expanded'); + }; + app.accordionClose = function (item) { + item = $(item); + var content = item.children('.accordion-item-content'); + if (content.length === 0) content = item.find('.accordion-item-content'); + item.removeClass('accordion-item-expanded'); + content.transition(0); + content.css('height', content[0].scrollHeight + 'px'); + // Relayout + var clientLeft = content[0].clientLeft; + // Close + content.transition(''); + content.css('height', '').transitionEnd(function () { + if (item.hasClass('accordion-item-expanded')) { + content.transition(0); + content.css('height', 'auto'); + var clientLeft = content[0].clientLeft; + content.transition(''); + item.trigger('opened accordion:opened'); + } + else { + content.css('height', ''); + item.trigger('closed accordion:closed'); + } + }); + item.trigger('close accordion:close'); + }; + + /*=============================================================================== + ************ Fast Clicks ************ + ************ Inspired by https://github.com/ftlabs/fastclick ************ + ===============================================================================*/ + app.initFastClicks = function () { + if (app.params.activeState) { + $('html').addClass('watch-active-state'); + } + if (app.device.ios && app.device.webView) { + // Strange hack required for iOS 8 webview to work on inputs + window.addEventListener('touchstart', function () {}); + } + + var touchStartX, touchStartY, touchStartTime, targetElement, trackClick, activeSelection, scrollParent, lastClickTime, isMoved, tapHoldFired, tapHoldTimeout; + var activableElement, activeTimeout, needsFastClick, needsFastClickTimeOut; + var rippleWave, rippleTarget, rippleTransform, rippleTimeout; + function findActivableElement(el) { + var target = $(el); + var parents = target.parents(app.params.activeStateElements); + var activable; + if (target.is(app.params.activeStateElements)) { + activable = target; + } + if (parents.length > 0) { + activable = activable ? activable.add(parents) : parents; + } + return activable ? activable : target; + } + function isInsideScrollableView(el) { + var pageContent = el.parents('.page-content, .panel'); + + if (pageContent.length === 0) { + return false; + } + + // This event handler covers the "tap to stop scrolling". + if (pageContent.prop('scrollHandlerSet') !== 'yes') { + pageContent.on('scroll', function() { + clearTimeout(activeTimeout); + clearTimeout(rippleTimeout); + }); + pageContent.prop('scrollHandlerSet', 'yes'); + } + + return true; + } + function addActive() { + if (!activableElement) return; + activableElement.addClass('active-state'); + } + function removeActive(el) { + if (!activableElement) return; + activableElement.removeClass('active-state'); + activableElement = null; + } + function isFormElement(el) { + var nodes = ('input select textarea label').split(' '); + if (el.nodeName && nodes.indexOf(el.nodeName.toLowerCase()) >= 0) return true; + return false; + } + function androidNeedsBlur(el) { + var noBlur = ('button input textarea select').split(' '); + if (document.activeElement && el !== document.activeElement && document.activeElement !== document.body) { + if (noBlur.indexOf(el.nodeName.toLowerCase()) >= 0) { + return false; + } + else { + return true; + } + } + else { + return false; + } + } + function targetNeedsFastClick(el) { + var $el = $(el); + if (el.nodeName.toLowerCase() === 'input' && (el.type === 'file' || el.type === 'range')) return false; + if (el.nodeName.toLowerCase() === 'select' && app.device.android) return false; + if ($el.hasClass('no-fastclick') || $el.parents('.no-fastclick').length > 0) return false; + if (app.params.fastClicksExclude && $el.is(app.params.fastClicksExclude)) return false; + return true; + } + function targetNeedsFocus(el) { + if (document.activeElement === el) { + return false; + } + var tag = el.nodeName.toLowerCase(); + var skipInputs = ('button checkbox file image radio submit').split(' '); + if (el.disabled || el.readOnly) return false; + if (tag === 'textarea') return true; + if (tag === 'select') { + if (app.device.android) return false; + else return true; + } + if (tag === 'input' && skipInputs.indexOf(el.type) < 0) return true; + } + function targetNeedsPrevent(el) { + el = $(el); + var prevent = true; + if (el.is('label') || el.parents('label').length > 0) { + if (app.device.android) { + prevent = false; + } + else if (app.device.ios && el.is('input')) { + prevent = true; + } + else prevent = false; + } + return prevent; + } + + // Mouse Handlers + function handleMouseDown (e) { + findActivableElement(e.target).addClass('active-state'); + if ('which' in e && e.which === 3) { + setTimeout(function () { + $('.active-state').removeClass('active-state'); + }, 0); + } + if (app.params.material && app.params.materialRipple) { + touchStartX = e.pageX; + touchStartY = e.pageY; + rippleTouchStart(e.target, e.pageX, e.pageY); + } + } + function handleMouseMove (e) { + $('.active-state').removeClass('active-state'); + if (app.params.material && app.params.materialRipple) { + rippleTouchMove(); + } + } + function handleMouseUp (e) { + $('.active-state').removeClass('active-state'); + if (app.params.material && app.params.materialRipple) { + rippleTouchEnd(); + } + } + + // Material Touch Ripple Effect + function findRippleElement(el) { + var needsRipple = app.params.materialRippleElements; + var $el = $(el); + if ($el.is(needsRipple)) { + if ($el.hasClass('no-ripple')) { + return false; + } + return $el; + } + else if ($el.parents(needsRipple).length > 0) { + var rippleParent = $el.parents(needsRipple).eq(0); + if (rippleParent.hasClass('no-ripple')) { + return false; + } + return rippleParent; + } + else return false; + } + function createRipple(x, y, el) { + if (!el) return; + var box = el[0].getBoundingClientRect(); + var center = { + x: x - box.left, + y: y - box.top + }, + height = box.height, + width = box.width; + var diameter = Math.max(Math.pow((Math.pow(height, 2) + Math.pow(width, 2)), 0.5), 48); + + rippleWave = $( + '
          ' + ); + el.prepend(rippleWave); + var clientLeft = rippleWave[0].clientLeft; + rippleTransform = 'translate3d('+(-center.x + width/2)+'px, '+(-center.y + height/2)+'px, 0) scale(1)'; + rippleWave.transform(rippleTransform); + } + + function removeRipple() { + if (!rippleWave) return; + var toRemove = rippleWave; + + var removeTimeout = setTimeout(function () { + toRemove.remove(); + }, 400); + + rippleWave + .addClass('ripple-wave-fill') + .transform(rippleTransform.replace('scale(1)', 'scale(1.01)')) + .transitionEnd(function () { + clearTimeout(removeTimeout); + + var rippleWave = $(this) + .addClass('ripple-wave-out') + .transform(rippleTransform.replace('scale(1)', 'scale(1.01)')); + + removeTimeout = setTimeout(function () { + rippleWave.remove(); + }, 700); + + setTimeout(function () { + rippleWave.transitionEnd(function(){ + clearTimeout(removeTimeout); + $(this).remove(); + }); + }, 0); + }); + + rippleWave = rippleTarget = undefined; + } + + function rippleTouchStart (el, x, y) { + rippleTarget = findRippleElement(el); + if (!rippleTarget || rippleTarget.length === 0) { + rippleTarget = undefined; + return; + } + if (!isInsideScrollableView(rippleTarget)) { + createRipple(touchStartX, touchStartY, rippleTarget); + } + else { + rippleTimeout = setTimeout(function () { + createRipple(touchStartX, touchStartY, rippleTarget); + }, 80); + } + } + function rippleTouchMove() { + clearTimeout(rippleTimeout); + removeRipple(); + } + function rippleTouchEnd() { + if (rippleWave) { + removeRipple(); + } + else if (rippleTarget && !isMoved) { + clearTimeout(rippleTimeout); + createRipple(touchStartX, touchStartY, rippleTarget); + setTimeout(removeRipple, 0); + } + else { + removeRipple(); + } + } + + // Send Click + function sendClick(e) { + var touch = e.changedTouches[0]; + var evt = document.createEvent('MouseEvents'); + var eventType = 'click'; + if (app.device.android && targetElement.nodeName.toLowerCase() === 'select') { + eventType = 'mousedown'; + } + evt.initMouseEvent(eventType, true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); + evt.forwardedTouchEvent = true; + targetElement.dispatchEvent(evt); + } + + // Touch Handlers + function handleTouchStart(e) { + isMoved = false; + tapHoldFired = false; + if (e.targetTouches.length > 1) { + if (activableElement) removeActive(); + return true; + } + if (e.touches.length > 1 && activableElement) { + removeActive(); + } + if (app.params.tapHold) { + if (tapHoldTimeout) clearTimeout(tapHoldTimeout); + tapHoldTimeout = setTimeout(function () { + if (e && e.touches && e.touches.length > 1) return; + tapHoldFired = true; + e.preventDefault(); + $(e.target).trigger('taphold'); + }, app.params.tapHoldDelay); + } + if (needsFastClickTimeOut) clearTimeout(needsFastClickTimeOut); + needsFastClick = targetNeedsFastClick(e.target); + + if (!needsFastClick) { + trackClick = false; + return true; + } + if (app.device.ios || (app.device.android && 'getSelection' in window)) { + var selection = window.getSelection(); + if (selection.rangeCount && selection.focusNode !== document.body && (!selection.isCollapsed || document.activeElement === selection.focusNode)) { + activeSelection = true; + return true; + } + else { + activeSelection = false; + } + } + if (app.device.android) { + if (androidNeedsBlur(e.target)) { + document.activeElement.blur(); + } + } + + trackClick = true; + targetElement = e.target; + touchStartTime = (new Date()).getTime(); + touchStartX = e.targetTouches[0].pageX; + touchStartY = e.targetTouches[0].pageY; + + // Detect scroll parent + if (app.device.ios) { + scrollParent = undefined; + $(targetElement).parents().each(function () { + var parent = this; + if (parent.scrollHeight > parent.offsetHeight && !scrollParent) { + scrollParent = parent; + scrollParent.f7ScrollTop = scrollParent.scrollTop; + } + }); + } + if ((e.timeStamp - lastClickTime) < app.params.fastClicksDelayBetweenClicks) { + e.preventDefault(); + } + + if (app.params.activeState) { + activableElement = findActivableElement(targetElement); + // If it's inside a scrollable view, we don't trigger active-state yet, + // because it can be a scroll instead. Based on the link: + // http://labnote.beedesk.com/click-scroll-and-pseudo-active-on-mobile-webk + if (!isInsideScrollableView(activableElement)) { + addActive(); + } else { + activeTimeout = setTimeout(addActive, 80); + } + } + if (app.params.material && app.params.materialRipple) { + rippleTouchStart(targetElement, touchStartX, touchStartY); + } + } + function handleTouchMove(e) { + if (!trackClick) return; + var _isMoved = false; + var distance = app.params.fastClicksDistanceThreshold; + if (distance) { + var pageX = e.targetTouches[0].pageX; + var pageY = e.targetTouches[0].pageY; + if (Math.abs(pageX - touchStartX) > distance || Math.abs(pageY - touchStartY) > distance) { + _isMoved = true; + } + } + else { + _isMoved = true; + } + if (_isMoved) { + trackClick = false; + targetElement = null; + isMoved = true; + if (app.params.tapHold) { + clearTimeout(tapHoldTimeout); + } + if (app.params.activeState) { + clearTimeout(activeTimeout); + removeActive(); + } + if (app.params.material && app.params.materialRipple) { + rippleTouchMove(); + } + } + } + function handleTouchEnd(e) { + clearTimeout(activeTimeout); + clearTimeout(tapHoldTimeout); + + if (!trackClick) { + if (!activeSelection && needsFastClick) { + if (!(app.device.android && !e.cancelable)) { + e.preventDefault(); + } + } + return true; + } + + if (document.activeElement === e.target) { + if (app.params.activeState) removeActive(); + if (app.params.material && app.params.materialRipple) { + rippleTouchEnd(); + } + return true; + } + + if (!activeSelection) { + e.preventDefault(); + } + + if ((e.timeStamp - lastClickTime) < app.params.fastClicksDelayBetweenClicks) { + setTimeout(removeActive, 0); + return true; + } + + lastClickTime = e.timeStamp; + + trackClick = false; + + if (app.device.ios && scrollParent) { + if (scrollParent.scrollTop !== scrollParent.f7ScrollTop) { + return false; + } + } + + // Add active-state here because, in a very fast tap, the timeout didn't + // have the chance to execute. Removing active-state in a timeout gives + // the chance to the animation execute. + if (app.params.activeState) { + addActive(); + setTimeout(removeActive, 0); + } + // Remove Ripple + if (app.params.material && app.params.materialRipple) { + rippleTouchEnd(); + } + + // Trigger focus when required + if (targetNeedsFocus(targetElement)) { + if (app.device.ios && app.device.webView) { + if ((event.timeStamp - touchStartTime) > 159) { + targetElement = null; + return false; + } + targetElement.focus(); + return false; + } + else { + targetElement.focus(); + } + } + + // Blur active elements + if (document.activeElement && targetElement !== document.activeElement && document.activeElement !== document.body && targetElement.nodeName.toLowerCase() !== 'label') { + document.activeElement.blur(); + } + + // Send click + e.preventDefault(); + sendClick(e); + return false; + } + function handleTouchCancel(e) { + trackClick = false; + targetElement = null; + + // Remove Active State + clearTimeout(activeTimeout); + clearTimeout(tapHoldTimeout); + if (app.params.activeState) { + removeActive(); + } + + // Remove Ripple + if (app.params.material && app.params.materialRipple) { + rippleTouchEnd(); + } + } + + function handleClick(e) { + var allowClick = false; + + if (trackClick) { + targetElement = null; + trackClick = false; + return true; + } + if (e.target.type === 'submit' && e.detail === 0 || e.target.type === 'file') { + return true; + } + if (!targetElement) { + if (!isFormElement(e.target)) { + allowClick = true; + } + } + if (!needsFastClick) { + allowClick = true; + } + if (document.activeElement === targetElement) { + allowClick = true; + } + if (e.forwardedTouchEvent) { + allowClick = true; + } + if (!e.cancelable) { + allowClick = true; + } + if (app.params.tapHold && app.params.tapHoldPreventClicks && tapHoldFired) { + allowClick = false; + } + if (!allowClick) { + e.stopImmediatePropagation(); + e.stopPropagation(); + if (targetElement) { + if (targetNeedsPrevent(targetElement) || isMoved) { + e.preventDefault(); + } + } + else { + e.preventDefault(); + } + targetElement = null; + } + needsFastClickTimeOut = setTimeout(function () { + needsFastClick = false; + }, (app.device.ios || app.device.androidChrome ? 100 : 400)); + + if (app.params.tapHold) { + tapHoldTimeout = setTimeout(function () { + tapHoldFired = false; + }, (app.device.ios || app.device.androidChrome ? 100 : 400)); + } + + return allowClick; + } + if (app.support.touch) { + document.addEventListener('click', handleClick, true); + + document.addEventListener('touchstart', handleTouchStart); + document.addEventListener('touchmove', handleTouchMove); + document.addEventListener('touchend', handleTouchEnd); + document.addEventListener('touchcancel', handleTouchCancel); + } + else { + if (app.params.activeState) { + document.addEventListener('mousedown', handleMouseDown); + document.addEventListener('mousemove', handleMouseMove); + document.addEventListener('mouseup', handleMouseUp); + } + } + if (app.params.material && app.params.materialRipple) { + document.addEventListener('contextmenu', function (e) { + if (activableElement) removeActive(); + rippleTouchEnd(); + }); + } + + }; + + + /*=============================================================================== + ************ Handle clicks and make them fast (on tap); ************ + ===============================================================================*/ + app.initClickEvents = function () { + function handleScrollTop(e) { + /*jshint validthis:true */ + var clicked = $(this); + var target = $(e.target); + var isLink = clicked[0].nodeName.toLowerCase() === 'a' || + clicked.parents('a').length > 0 || + target[0].nodeName.toLowerCase() === 'a' || + target.parents('a').length > 0; + + if (isLink) return; + var pageContent, page; + if (app.params.scrollTopOnNavbarClick && clicked.is('.navbar .center')) { + // Find active page + var navbar = clicked.parents('.navbar'); + + // Static Layout + pageContent = navbar.parents('.page-content'); + + if (pageContent.length === 0) { + // Fixed Layout + if (navbar.parents('.page').length > 0) { + pageContent = navbar.parents('.page').find('.page-content'); + } + // Through Layout + if (pageContent.length === 0) { + if (navbar.nextAll('.pages').length > 0) { + pageContent = navbar.nextAll('.pages').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content'); + } + } + } + } + if (app.params.scrollTopOnStatusbarClick && clicked.is('.statusbar-overlay')) { + if ($('.popup.modal-in').length > 0) { + // Check for opened popup + pageContent = $('.popup.modal-in').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content'); + } + else if ($('.panel.active').length > 0) { + // Check for opened panel + pageContent = $('.panel.active').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content'); + } + else if ($('.views > .view.active').length > 0) { + // View in tab bar app layout + pageContent = $('.views > .view.active').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content'); + } + else { + // Usual case + pageContent = $('.views').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content'); + } + } + + if (pageContent && pageContent.length > 0) { + // Check for tab + if (pageContent.hasClass('tab')) { + pageContent = pageContent.parent('.tabs').children('.page-content.active'); + } + if (pageContent.length > 0) pageContent.scrollTop(0, 300); + } + } + function handleClicks(e) { + /*jshint validthis:true */ + var clicked = $(this); + var url = clicked.attr('href'); + var isLink = clicked[0].nodeName.toLowerCase() === 'a'; + + // Check if link is external + if (isLink) { + if (clicked.is(app.params.externalLinks) || (url && url.indexOf('javascript:') >= 0)) { + if(url && clicked.attr('target') === '_system') { + e.preventDefault(); + window.open(url, '_system'); + } + return; + } + } + + // Collect Clicked data- attributes + var clickedData = clicked.dataset(); + + // Smart Select + if (clicked.hasClass('smart-select')) { + if (app.smartSelectOpen) app.smartSelectOpen(clicked); + } + + // Open Panel + if (clicked.hasClass('open-panel')) { + if ($('.panel').length === 1) { + if ($('.panel').hasClass('panel-left')) app.openPanel('left'); + else app.openPanel('right'); + } + else { + if (clickedData.panel === 'right') app.openPanel('right'); + else app.openPanel('left'); + } + } + + // Close Panel + if (clicked.hasClass('close-panel')) { + app.closePanel(); + } + + // Panel Overlay + if (clicked.hasClass('panel-overlay')) { + $('.panel.active').trigger('panel:overlay-click'); + if (app.params.panelsCloseByOutside) app.closePanel(); + } + + // Popover + if (clicked.hasClass('open-popover')) { + var popover; + if (clickedData.popover) { + popover = clickedData.popover; + } + else popover = '.popover'; + app.popover(popover, clicked); + } + if (clicked.hasClass('close-popover')) { + app.closeModal('.popover.modal-in'); + } + // Popup + var popup; + if (clicked.hasClass('open-popup')) { + if (clickedData.popup) { + popup = clickedData.popup; + } + else popup = '.popup'; + app.popup(popup); + } + if (clicked.hasClass('close-popup')) { + if (clickedData.popup) { + popup = clickedData.popup; + } + else popup = '.popup.modal-in'; + app.closeModal(popup); + } + // Login Screen + var loginScreen; + if (clicked.hasClass('open-login-screen')) { + if (clickedData.loginScreen) { + loginScreen = clickedData.loginScreen; + } + else loginScreen = '.login-screen'; + app.loginScreen(loginScreen); + } + if (clicked.hasClass('close-login-screen')) { + app.closeModal('.login-screen.modal-in'); + } + // Close Modal + if (clicked.hasClass('modal-overlay')) { + if ($('.modal.modal-in').length > 0 && app.params.modalCloseByOutside) + app.closeModal('.modal.modal-in'); + if ($('.actions-modal.modal-in').length > 0 && app.params.actionsCloseByOutside) + app.closeModal('.actions-modal.modal-in'); + + if ($('.popover.modal-in').length > 0 && app.params.popoverCloseByOutside) + app.closeModal('.popover.modal-in'); + } + if (clicked.hasClass('popup-overlay')) { + if ($('.popup.modal-in').length > 0 && app.params.popupCloseByOutside) + app.closeModal('.popup.modal-in'); + } + if (clicked.hasClass('picker-modal-overlay')) { + if ($('.picker-modal.modal-in').length > 0) + app.closeModal('.picker-modal.modal-in'); + } + + // Picker + if (clicked.hasClass('close-picker')) { + var pickerToClose = $('.picker-modal.modal-in'); + if (pickerToClose.length > 0) { + app.closeModal(pickerToClose); + } + else { + pickerToClose = $('.popover.modal-in .picker-modal'); + if (pickerToClose.length > 0) { + app.closeModal(pickerToClose.parents('.popover')); + } + } + } + if (clicked.hasClass('open-picker')) { + var pickerToOpen; + if (clickedData.picker) { + pickerToOpen = clickedData.picker; + } + else pickerToOpen = '.picker-modal'; + app.pickerModal(pickerToOpen, clicked); + } + + // Tabs + var isTabLink; + if (clicked.hasClass('tab-link')) { + isTabLink = true; + app.showTab(clickedData.tab || clicked.attr('href'), clicked); + } + // Swipeout Close + if (clicked.hasClass('swipeout-close')) { + app.swipeoutClose(clicked.parents('.swipeout-opened')); + } + // Swipeout Delete + if (clicked.hasClass('swipeout-delete')) { + if (clickedData.confirm) { + var text = clickedData.confirm; + var title = clickedData.confirmTitle; + if (title) { + app.confirm(text, title, function () { + app.swipeoutDelete(clicked.parents('.swipeout')); + }, function () { + if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout')); + }); + } + else { + app.confirm(text, function () { + app.swipeoutDelete(clicked.parents('.swipeout')); + }, function () { + if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout')); + }); + } + } + else { + app.swipeoutDelete(clicked.parents('.swipeout')); + } + + } + // Sortable + if (clicked.hasClass('toggle-sortable')) { + app.sortableToggle(clickedData.sortable); + } + if (clicked.hasClass('open-sortable')) { + app.sortableOpen(clickedData.sortable); + } + if (clicked.hasClass('close-sortable')) { + app.sortableClose(clickedData.sortable); + } + // Accordion + if (clicked.hasClass('accordion-item-toggle') || (clicked.hasClass('item-link') && clicked.parent().hasClass('accordion-item'))) { + var accordionItem = clicked.parent('.accordion-item'); + if (accordionItem.length === 0) accordionItem = clicked.parents('.accordion-item'); + if (accordionItem.length === 0) accordionItem = clicked.parents('li'); + app.accordionToggle(accordionItem); + } + + // Speed Dial + if (clicked.hasClass('floating-button') && clicked.parent().hasClass('speed-dial')) { + clicked.parent().toggleClass('speed-dial-opened'); + } + if (clicked.hasClass('close-speed-dial')) { + $('.speed-dial-opened').removeClass('speed-dial-opened'); + } + + // Load Page + if (app.params.ajaxLinks && !clicked.is(app.params.ajaxLinks) || !isLink || !app.params.router) { + return; + } + if (isLink) { + e.preventDefault(); + } + + var validUrl = url && url.length > 0 && url !== '#' && !isTabLink; + var template = clickedData.template; + if (validUrl || clicked.hasClass('back') || template) { + var view; + if (clickedData.view) { + view = $(clickedData.view)[0].f7View; + } + else { + view = clicked.parents('.' + app.params.viewClass)[0] && clicked.parents('.' + app.params.viewClass)[0].f7View; + if (view && view.params.linksView) { + if (typeof view.params.linksView === 'string') view = $(view.params.linksView)[0].f7View; + else if (view.params.linksView instanceof View) view = view.params.linksView; + } + } + if (!view) { + if (app.mainView) view = app.mainView; + } + if (!view) return; + + var pageName; + if (!template) { + if (url && url.indexOf('#') === 0 && url !== '#') { + if (view.params.domCache) { + pageName = url.split('#')[1]; + } + else return; + } + if (url === '#' && !clicked.hasClass('back')) return; + } + else { + url = undefined; + } + + var animatePages; + if (typeof clickedData.animatePages !== 'undefined') { + animatePages = clickedData.animatePages; + } + else { + if (clicked.hasClass('with-animation')) animatePages = true; + if (clicked.hasClass('no-animation')) animatePages = false; + } + + var options = { + animatePages: animatePages, + ignoreCache: clickedData.ignoreCache, + force: clickedData.force, + reload: clickedData.reload, + reloadPrevious: clickedData.reloadPrevious, + pageName: pageName, + pushState: clickedData.pushState, + url: url + }; + + if (app.params.template7Pages) { + options.contextName = clickedData.contextName; + var context = clickedData.context; + if (context) { + options.context = JSON.parse(context); + } + } + if (template && template in t7.templates) { + options.template = t7.templates[template]; + } + + if (clicked.hasClass('back')) view.router.back(options); + else view.router.load(options); + } + } + $(document).on('click', 'a, .open-panel, .close-panel, .panel-overlay, .modal-overlay, .popup-overlay, .swipeout-delete, .swipeout-close, .close-popup, .open-popup, .open-popover, .open-login-screen, .close-login-screen .smart-select, .toggle-sortable, .open-sortable, .close-sortable, .accordion-item-toggle, .close-picker, .picker-modal-overlay', handleClicks); + if (app.params.scrollTopOnNavbarClick || app.params.scrollTopOnStatusbarClick) { + $(document).on('click', '.statusbar-overlay, .navbar .center', handleScrollTop); + } + + // Prevent scrolling on overlays + function preventScrolling(e) { + e.preventDefault(); + } + if (app.support.touch && !app.device.android) { + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + $(document).on((app.params.fastClicks ? 'touchstart' : 'touchmove'), '.panel-overlay, .modal-overlay, .preloader-indicator-overlay, .popup-overlay, .searchbar-overlay', preventScrolling, activeListener); + } + }; + + + /*====================================================== + ************ App Resize Actions ************ + ======================================================*/ + // Prevent iPad horizontal body scrolling when soft keyboard is opened + function _fixIpadBodyScrolLeft() { + if (app.device.ipad) { + document.body.scrollLeft = 0; + setTimeout(function () { + document.body.scrollLeft = 0; + }, 0); + } + } + var appResizeCallbacks = []; + app.getSize = function () { + var offset = app.root.offset(); + app.width = app.root[0].offsetWidth; + app.height = app.root[0].offsetHeight; + app.left = offset.left; + app.top = offset.top; + }; + app.onResize = function (callback) { + appResizeCallbacks.push(callback); + }; + app.offResize = function (callback) { + for (var i = 0; i < appResizeCallbacks.length; i++) { + if (appResizeCallbacks[i] === callback) { + appResizeCallbacks.splice(i, 1); + } + } + }; + app.resize = function () { + _fixIpadBodyScrolLeft(); + app.getSize(); + if (app.sizeNavbars) app.sizeNavbars(); + for (var i = 0; i < appResizeCallbacks.length; i++) { + appResizeCallbacks[i](); + } + }; + app.orientationchange = function () { + if (app.device && app.device.minimalUi) { + if (window.orientation === 90 || window.orientation === -90) document.body.scrollTop = 0; + } + _fixIpadBodyScrolLeft(); + }; + app.initResize = function () { + $(window).on('resize', app.resize); + $(window).on('orientationchange', app.orientationchange); + app.getSize(); + }; + + + /*=============================================================================== + ************ Store and parse forms data ************ + ===============================================================================*/ + app.formsData = {}; + app.formStoreData = function (formId, formJSON) { + // Store form data in app.formsData + app.formsData[formId] = formJSON; + + // Store form data in local storage also + app.ls['f7form-' + formId] = JSON.stringify(formJSON); + }; + app.formDeleteData = function (formId) { + // Delete form data from app.formsData + if (app.formsData[formId]) { + app.formsData[formId] = ''; + delete app.formsData[formId]; + } + + // Delete form data from local storage also + if (app.ls['f7form-' + formId]) { + app.ls['f7form-' + formId] = ''; + app.ls.removeItem('f7form-' + formId); + } + }; + app.formGetData = function (formId) { + // First of all check in local storage + if (app.ls['f7form-' + formId]) { + return JSON.parse(app.ls['f7form-' + formId]); + } + // Try to get it from formsData obj + else if (app.formsData[formId]) return app.formsData[formId]; + }; + app.formToData = function (form) { + form = $(form); + if (form.length !== 1) return false; + + // Form data + var formData = {}; + + // Skip input types + var skipTypes = ['submit', 'image', 'button', 'file']; + var skipNames = []; + form.find('input, select, textarea').each(function () { + var input = $(this); + var name = input.attr('name'); + var type = input.attr('type'); + var tag = this.nodeName.toLowerCase(); + if (skipTypes.indexOf(type) >= 0) return; + if (skipNames.indexOf(name) >= 0 || !name) return; + if (tag === 'select' && input.prop('multiple')) { + skipNames.push(name); + formData[name] = []; + form.find('select[name="' + name + '"] option').each(function () { + if (this.selected) formData[name].push(this.value); + }); + } + else { + switch (type) { + case 'checkbox' : + skipNames.push(name); + formData[name] = []; + form.find('input[name="' + name + '"]').each(function () { + if (this.checked) formData[name].push(this.value); + }); + break; + case 'radio' : + skipNames.push(name); + form.find('input[name="' + name + '"]').each(function () { + if (this.checked) formData[name] = this.value; + }); + break; + default : + formData[name] = input.val(); + break; + } + } + }); + form.trigger('formToJSON formToData form:todata', {formData: formData}); + + return formData; + }; + app.formToJSON = app.formToData; + app.formFromData = function (form, formData) { + form = $(form); + if (form.length !== 1) return false; + + // Skip input types + var skipTypes = ['submit', 'image', 'button', 'file']; + var skipNames = []; + + form.find('input, select, textarea').each(function () { + var input = $(this); + var name = input.attr('name'); + var type = input.attr('type'); + var tag = this.nodeName.toLowerCase(); + if (typeof formData[name] === 'undefined' || formData[name] === null) return; + if (skipTypes.indexOf(type) >= 0) return; + if (skipNames.indexOf(name) >= 0 || !name) return; + if (tag === 'select' && input.prop('multiple')) { + skipNames.push(name); + form.find('select[name="' + name + '"] option').each(function () { + if (formData[name].indexOf(this.value) >= 0) this.selected = true; + else this.selected = false; + }); + } + else { + switch (type) { + case 'checkbox' : + skipNames.push(name); + form.find('input[name="' + name + '"]').each(function () { + if (formData[name].indexOf(this.value) >= 0) this.checked = true; + else this.checked = false; + }); + break; + case 'radio' : + skipNames.push(name); + form.find('input[name="' + name + '"]').each(function () { + if (formData[name] === this.value) this.checked = true; + else this.checked = false; + }); + break; + default : + input.val(formData[name]); + break; + } + } + if (tag === 'select' || tag === 'input' || tag === 'textarea') { + input.trigger('change'); + } + }); + form.trigger('formFromJSON formFromData form:fromdata', {formData: formData}); + }; + app.formFromJSON = app.formFromData; + + app.initFormsStorage = function (pageContainer) { + pageContainer = $(pageContainer); + var forms = pageContainer.find('form.store-data'); + if (forms.length === 0) return; + + // Parse forms data and fill form if there is such data + forms.each(function () { + var id = this.getAttribute('id'); + if (!id) return; + var formData = app.formGetData(id); + if (formData) app.formFromData(this, formData); + }); + // Update forms data on inputs change + function storeForm() { + /*jshint validthis:true */ + var form = $(this); + var formId = form[0].id; + if (!formId) return; + var formJSON = app.formToData(form); + if (!formJSON) return; + app.formStoreData(formId, formJSON); + form.trigger('store form:storedata', {data: formJSON}); + } + forms.on('change submit', storeForm); + + // Detach Listeners + function pageBeforeRemove() { + forms.off('change submit', storeForm); + pageContainer.off('page:beforeremove', pageBeforeRemove); + } + pageContainer.on('page:beforeremove', pageBeforeRemove); + }; + + /*=============================================================================== + ************ Ajax submit for forms ************ + ===============================================================================*/ + // Ajax submit on forms + $(document).on('submit change', 'form.ajax-submit, form.ajax-submit-onchange', function (e) { + var form = $(this); + if (e.type === 'change' && !form.hasClass('ajax-submit-onchange')) return; + if (e.type === 'submit') e.preventDefault(); + + var method = (form.attr('method') || 'GET').toUpperCase(); + var contentType = form.prop('enctype') || form.attr('enctype'); + + var url = form.attr('action'); + if (!url) return; + + var data; + if (method === 'POST') data = new FormData(form[0]); + else data = $.serializeObject(app.formToJSON(form[0])); + + var xhr = $.ajax({ + method: method, + url: url, + contentType: contentType, + data: data, + beforeSend: function (xhr) { + form.trigger('beforeSubmit form:beforesend', {data:data, xhr: xhr}); + }, + error: function (xhr) { + form.trigger('submitError form:error', {data:data, xhr: xhr}); + }, + success: function (data) { + form.trigger('submitted form:success', {data: data, xhr: xhr}); + } + }); + }); + + + + /*=============================================================================== + ************ Resizable textarea ************ + ===============================================================================*/ + app.resizeTextarea = function (textarea) { + textarea = $(textarea); + if (!textarea.hasClass('resizable')) { + return; + } + textarea.css({'height': ''}); + var height = textarea[0].offsetHeight; + var diff = height - textarea[0].clientHeight; + var scrollHeight = textarea[0].scrollHeight; + + if (scrollHeight + diff > height) { + var newAreaHeight = scrollHeight + diff; + textarea.css('height', newAreaHeight + 'px'); + } + }; + app.resizableTextarea = function (textarea) { + textarea = $(textarea); + if (textarea.length === 0) return; + var textareaTimeout; + function handleTextarea() { + clearTimeout(textareaTimeout); + textareaTimeout = setTimeout(function () { + app.resizeTextarea(textarea); + }, 0); + } + textarea[0].f7DestroyResizableTextarea = function () { + textarea.off('change keydown keypress keyup paste cut', handleTextarea); + }; + return textarea.on('change keydown keypress keyup paste cut', handleTextarea); + }; + app.destroyResizableTextarea = function (pageContainer) { + pageContainer = $(pageContainer); + if (pageContainer.length > 0 && pageContainer.is('textarea') && pageContainer[0].f7DestroyResizableTextarea) { + pageContainer[0].f7DestroyResizableTextarea(); + } + else if (pageContainer.length > 0) { + pageContainer.find('textarea.resiable').each(function () { + var textarea = this; + if (textarea.f7DestroyResizableTextarea) { + textarea.f7DestroyResizableTextarea (); + } + }); + } + }; + app.initPageResizableTextarea = function (pageContainer) { + pageContainer = $(pageContainer); + var textareas = pageContainer.find('textarea.resizable'); + textareas.each(function () { + app.resizableTextarea(this); + }); + }; + + /*====================================================== + ************ Material Text Inputs ************ + ======================================================*/ + app.initPageMaterialInputs = function (pageContainer) { + pageContainer = $(pageContainer); + var textareas = pageContainer.find('textarea.resizable'); + pageContainer.find('.item-input').each(function () { + var itemInput = $(this); + var notInputs = ['checkbox', 'button', 'submit', 'range', 'radio', 'image']; + itemInput.find('input, select, textarea').each(function () { + var input = $(this); + if (notInputs.indexOf(input.attr('type')) < 0) { + itemInput.addClass('item-input-field'); + if (input.val().trim() !== '') { + input.parents('.item-input, .input-field').add(input.parents('.item-inner')).addClass('not-empty-state'); + } + } + }); + if (itemInput.parents('.input-item, .inputs-list').length > 0) return; + itemInput.parents('.list-block').eq(0).addClass('inputs-list'); + }); + }; + /*====================================================== + ************ Material Focus Inputs ************ + ======================================================*/ + app.initMaterialWatchInputs = function () { + var notInputs = ['checkbox', 'button', 'submit', 'range', 'radio', 'image']; + function addFocusState(e) { + /*jshint validthis:true*/ + var i = $(this); + var type = i.attr('type'); + if (notInputs.indexOf(type) >= 0) return; + var els = i.add(i.parents('.item-input, .input-field')).add(i.parents('.item-inner').eq(0)); + els.removeClass('not-empty-state').addClass('focus-state'); + } + function removeFocusState(e) { + /*jshint validthis:true*/ + var i = $(this), value = i.val(); + var type = i.attr('type'); + if (notInputs.indexOf(type) >= 0) return; + var els = i.add(i.parents('.item-input, .input-field')).add(i.parents('.item-inner').eq(0)); + els.removeClass('focus-state'); + if (value && value.trim() !== '') { + els.removeClass('focus-state').addClass('not-empty-state'); + } + else { + els.removeClass('not-empty-state'); + } + } + function watchChangeState(e) { + /*jshint validthis:true*/ + var input = $(this), + value = input.val(); + var type = input.attr('type'); + if (notInputs.indexOf(type) >= 0) return; + var els = input.add(input.parents('.item-input, .input-field')).add(input.parents('.item-inner').eq(0)); + if (els.length === 0) return; + if (value && (typeof value === 'string' && value.trim() !== '') || (Array.isArray(value) && value.length > 0)) { + els.addClass('not-empty-state'); + } + else { + els.removeClass('not-empty-state'); + } + } + $(document).on('change', 'input, textarea, select', watchChangeState, true); + $(document).on('focus', 'input, textarea, select', addFocusState, true); + $(document).on('blur', 'input, textarea, select', removeFocusState, true); + }; + + + /*====================================================== + ************ Handle Browser's History ************ + ======================================================*/ + app.pushStateQueue = []; + app.pushStateClearQueue = function () { + if (app.pushStateQueue.length === 0) return; + var queue = app.pushStateQueue.pop(); + var animatePages; + if (app.params.pushStateNoAnimation === true) animatePages = false; + if (queue.action === 'back') { + app.router.back(queue.view, {animatePages: animatePages}); + } + if (queue.action === 'loadPage') { + app.router.load(queue.view, {url: queue.stateUrl, animatePages: animatePages, pushState: false}); + } + if (queue.action === 'loadContent') { + app.router.load(queue.view, {content: queue.stateContent, animatePages: animatePages, pushState: false}); + } + if (queue.action === 'loadPageName') { + app.router.load(queue.view, {pageName: queue.statePageName, url: queue.stateUrl, animatePages: animatePages, pushState: false}); + } + }; + + app.initPushState = function () { + var blockPopstate = true; + $(window).on('load', function () { + setTimeout(function () { + blockPopstate = false; + }, 0); + }); + + if (document.readyState && document.readyState === 'complete') { + blockPopstate = false; + } + + function handlePopState(e) { + if (blockPopstate) return; + var mainView = app.mainView; + if (!mainView) return; + var state = e.state; + if (!state) { + state = { + viewIndex: app.views.indexOf(mainView), + url : mainView.history[0] + }; + } + if (state.viewIndex < 0) return; + var view = app.views[state.viewIndex]; + var stateUrl = state && state.url || undefined; + var stateContent = state && state.content || undefined; + var statePageName = state && state.pageName || undefined; + var animatePages; + + if (app.params.pushStateNoAnimation === true) animatePages = false; + + if (stateUrl !== view.url) { + if (view.history.indexOf(stateUrl) >= 0) { + // Go Back + if (view.allowPageChange) { + app.router.back(view, {url:undefined, animatePages: animatePages, pushState: false, preloadOnly:false}); + } + else { + app.pushStateQueue.push({ + action: 'back', + view: view + }); + } + } + else if (stateContent) { + // Load Page + if (view.allowPageChange) { + app.router.load(view, {content:stateContent, animatePages: animatePages, pushState: false}); + } + else { + app.pushStateQueue.unshift({ + action: 'loadContent', + stateContent: stateContent, + view: view + }); + } + + } + else if (statePageName) { + // Load Page by page name with Dom Cache + if (view.allowPageChange) { + app.router.load(view, {pageName:statePageName, url: stateUrl, animatePages: animatePages, pushState: false}); + } + else { + app.pushStateQueue.unshift({ + action: 'loadPageName', + statePageName: statePageName, + view: view + }); + } + } + else { + // Load Page + if (view.allowPageChange) { + app.router.load(view, {url:stateUrl, animatePages: animatePages, pushState: false}); + } + else { + app.pushStateQueue.unshift({ + action: 'loadPage', + stateUrl: stateUrl, + view: view + }); + } + } + } + } + $(window).on('popstate', handlePopState); + }; + + + /*=========================== + Framework7 Swiper Additions + ===========================*/ + app.swiper = function (container, params) { + return new Swiper(container, params); + }; + app.initPageSwiper = function (pageContainer) { + pageContainer = $(pageContainer); + var swipers = pageContainer.find('.swiper-init, .tabs-swipeable-wrap'); + if (swipers.length === 0) return; + function destroySwiperOnRemove(slider) { + function destroySwiper() { + slider.destroy(); + pageContainer.off('page:beforeremove', destroySwiper); + } + pageContainer.on('page:beforeremove', destroySwiper); + } + swipers.each(function () { + var swiper = $(this), initialSlide; + var params; + if (swiper.hasClass('tabs-swipeable-wrap')) { + swiper.addClass('swiper-container').children('.tabs').addClass('swiper-wrapper').children('.tab').addClass('swiper-slide'); + initialSlide = swiper.children('.tabs').children('.tab.active').index(); + } + if (swiper.data('swiper')) { + params = JSON.parse(swiper.data('swiper')); + } + else { + params = swiper.dataset(); + } + if (typeof params.initialSlide === 'undefined' && typeof initialSlide !== 'undefined') { + params.initialSlide = initialSlide; + } + if (swiper.hasClass('tabs-swipeable-wrap')) { + params.onSlideChangeStart = function (s) { + app.showTab(s.slides.eq(s.activeIndex)); + }; + } + var _slider = app.swiper(swiper[0], params); + destroySwiperOnRemove(_slider); + }); + }; + app.reinitPageSwiper = function (pageContainer) { + pageContainer = $(pageContainer); + var sliders = pageContainer.find('.swiper-init, .tabs-swipeable-wrap'); + if (sliders.length === 0) return; + for (var i = 0; i < sliders.length; i++) { + var sliderInstance = sliders[0].swiper; + if (sliderInstance) { + sliderInstance.update(true); + } + } + }; + + + /*====================================================== + ************ Photo Browser ************ + ======================================================*/ + var PhotoBrowser = function (params) { + var pb = this, i; + + var defaults = { + photos : [], + initialSlide: 0, + spaceBetween: 20, + speed: 300, + zoom: true, + zoomMax: 3, + zoomMin: 1, + exposition: true, + expositionHideCaptions: false, + type: 'standalone', + navbar: true, + toolbar: true, + theme: 'light', + swipeToClose: true, + backLinkText: 'Close', + ofText: 'of', + loop: false, + lazyLoading: false, + lazyLoadingInPrevNext: false, + lazyLoadingOnTransitionStart: false, + material: app.params.material, + materialPreloaderSvg: app.params.materialPreloaderSvg, + materialPreloaderHtml: app.params.materialPreloaderHtml, + /* + Callbacks: + onLazyImageLoad(pb, slide, img) + onLazyImageReady(pb, slide, img) + onOpen(pb) + onClose(pb) + onTransitionStart(swiper) + onTransitionEnd(swiper) + onSlideChangeStart(swiper) + onSlideChangeEnd(swiper) + onTap(swiper, e) + onClick(swiper, e) + onDoubleTap(swiper, e) + onSwipeToClose(pb) + */ + }; + + params = params || {}; + if (!params.backLinkText && app.params.material) defaults.backLinkText = ''; + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + if (params.maxZoom) { + params.zoomMax = params.maxZoom; + } + if (params.minZoom) { + params.zoomMin = params.minZoom; + } + + pb.params = params; + pb.params.iconsColorClass = pb.params.iconsColor ? 'color-' + pb.params.iconsColor : (pb.params.theme === 'dark' ? 'color-white' : ''); + pb.params.preloaderColorClass = pb.params.theme === 'dark' ? 'preloader-white' : ''; + + // Templates + var photoTemplate = pb.params.photoTemplate || + '
          ' + + '' + + '' + + '' + + '
          '; + var photoLazyTemplate = pb.params.lazyPhotoTemplate || + '
          ' + + '
          {{#if @root.material}}{{@root.materialPreloaderHtml}}{{/if}}
          ' + + '' + + '' + + '' + + '
          '; + var objectTemplate = pb.params.objectTemplate || + '
          {{js "this.html || this"}}
          '; + var captionTemplate = pb.params.captionTemplate || + '
          ' + + '{{caption}}' + + '
          '; + var navbarTemplate = pb.params.navbarTemplate || + ''; + var toolbarTemplate = pb.params.toolbarTemplate || + '
          ' + + '
          ' + + '' + + '' + + '' + + '' + + '' + + '' + + '
          ' + + '
          '; + + var htmlTemplate = t7.compile('
          ' + + '' + + '
          ')(pb.params); + + pb.activeIndex = pb.params.initialSlide; + pb.openIndex = pb.activeIndex; + pb.opened = false; + + pb.open = function (index) { + if (typeof index === 'undefined') index = pb.activeIndex; + index = parseInt(index, 10); + if (pb.opened && pb.swiper) { + pb.swiper.slideTo(index); + return; + } + pb.opened = true; + pb.openIndex = index; + if (pb.params.type === 'standalone') { + app.root.append(htmlTemplate); + } + if (pb.params.type === 'popup') { + pb.popup = app.popup(''); + $(pb.popup).on('popup:closed', pb.onPopupClose); + } + if (pb.params.type === 'page') { + $(document).once('page:beforeinit', pb.onPageBeforeInit); + $(document).once('page:beforeremove', pb.onPageBeforeRemove); + if (!pb.params.view) pb.params.view = app.mainView; + pb.params.view.loadContent(htmlTemplate); + return; + } + pb.layout(pb.openIndex); + if (pb.params.onOpen) { + pb.params.onOpen(pb); + } + + }; + pb.close = function () { + pb.opened = false; + if (!pb.swiperContainer || pb.swiperContainer.length === 0) { + return; + } + if (pb.params.onClose) { + pb.params.onClose(pb); + } + // Detach events + pb.attachEvents(true); + // Delete from DOM + if (pb.params.type === 'standalone') { + pb.container.removeClass('photo-browser-in').addClass('photo-browser-out').animationEnd(function () { + pb.container.remove(); + }); + } + // Destroy slider + pb.swiper.destroy(); + // Delete references + pb.swiper = pb.swiperContainer = pb.swiperWrapper = pb.slides = undefined; //gestureSlide = gestureImg = gestureImgWrap = undefined; + }; + + pb.onPopupClose = function (e) { + pb.close(); + $(pb.popup).off('page:beforeinit', pb.onPopupClose); + }; + pb.onPageBeforeInit = function (e) { + if (e.detail.page.name === 'photo-browser-slides') { + pb.layout(pb.openIndex); + if (pb.params.onOpen) { + pb.params.onOpen(pb); + } + } + }; + pb.onPageBeforeRemove = function (e) { + if (e.detail.page.name === 'photo-browser-slides') { + pb.close(); + } + }; + + pb.onSliderTransitionStart = function (swiper) { + pb.activeIndex = swiper.activeIndex; + + var current = swiper.activeIndex + 1; + var total = swiper.slides.length; + if (pb.params.loop) { + total = total - 2; + current = current - swiper.loopedSlides; + if (current < 1) current = total + current; + if (current > total) current = current - total; + } + pb.container.find('.photo-browser-current').text(current); + pb.container.find('.photo-browser-total').text(total); + + $('.photo-browser-prev, .photo-browser-next').removeClass('photo-browser-link-inactive'); + + if (swiper.isBeginning && !pb.params.loop) { + $('.photo-browser-prev').addClass('photo-browser-link-inactive'); + } + if (swiper.isEnd && !pb.params.loop) { + $('.photo-browser-next').addClass('photo-browser-link-inactive'); + } + + // Update captions + if (pb.captions.length > 0) { + pb.captionsContainer.find('.photo-browser-caption-active').removeClass('photo-browser-caption-active'); + var captionIndex = pb.params.loop ? swiper.slides.eq(swiper.activeIndex).attr('data-swiper-slide-index') : pb.activeIndex; + pb.captionsContainer.find('[data-caption-index="' + captionIndex + '"]').addClass('photo-browser-caption-active'); + } + + + // Stop Video + var previousSlideVideo = swiper.slides.eq(swiper.previousIndex).find('video'); + if (previousSlideVideo.length > 0) { + if ('pause' in previousSlideVideo[0]) previousSlideVideo[0].pause(); + } + // Callback + if (pb.params.onTransitionStart) pb.params.onTransitionStart(swiper); + }; + pb.onSliderTransitionEnd = function (swiper) { + if (pb.params.onTransitionEnd) pb.params.onTransitionEnd(swiper); + }; + + pb.layout = function (index) { + if (pb.params.type === 'page') { + pb.container = $('.photo-browser-swiper-container').parents('.view'); + } + else { + pb.container = $('.photo-browser'); + } + if (pb.params.type === 'standalone') { + pb.container.addClass('photo-browser-in'); + app.sizeNavbars(pb.container); + } + pb.swiperContainer = pb.container.find('.photo-browser-swiper-container'); + pb.swiperWrapper = pb.container.find('.photo-browser-swiper-wrapper'); + pb.slides = pb.container.find('.photo-browser-slide'); + pb.captionsContainer = pb.container.find('.photo-browser-captions'); + pb.captions = pb.container.find('.photo-browser-caption'); + + var sliderSettings = { + nextButton: pb.params.nextButton || '.photo-browser-next', + prevButton: pb.params.prevButton || '.photo-browser-prev', + indexButton: pb.params.indexButton, + initialSlide: index, + spaceBetween: pb.params.spaceBetween, + speed: pb.params.speed, + loop: pb.params.loop, + lazyLoading: pb.params.lazyLoading, + lazyLoadingInPrevNext: pb.params.lazyLoadingInPrevNext, + lazyLoadingOnTransitionStart: pb.params.lazyLoadingOnTransitionStart, + preloadImages: pb.params.lazyLoading ? false : true, + zoom: pb.params.zoom, + zoomMax: pb.params.zoomMax, + zoomMin: pb.params.zoomMin, + onTap: function (swiper, e) { + if (pb.params.onTap) pb.params.onTap(swiper, e); + }, + onClick: function (swiper, e) { + if (pb.params.exposition) pb.toggleExposition(); + if (pb.params.onClick) pb.params.onClick(swiper, e); + }, + onDoubleTap: function (swiper, e) { + // pb.toggleZoom(e); + if (pb.params.onDoubleTap) pb.params.onDoubleTap(swiper, e); + }, + onTransitionStart: function (swiper) { + pb.onSliderTransitionStart(swiper); + }, + onTransitionEnd: function (swiper) { + pb.onSliderTransitionEnd(swiper); + }, + onSlideChangeStart: pb.params.onSlideChangeStart, + onSlideChangeEnd: pb.params.onSlideChangeEnd, + onLazyImageLoad: function (swiper, slide, img) { + if (pb.params.onLazyImageLoad) pb.params.onLazyImageLoad(pb, slide, img); + }, + onLazyImageReady: function (swiper, slide, img) { + $(slide).removeClass('photo-browser-slide-lazy'); + if (pb.params.onLazyImageReady) pb.params.onLazyImageReady(pb, slide, img); + } + }; + + if (pb.params.swipeToClose && pb.params.type !== 'page') { + sliderSettings.onTouchStart = pb.swipeCloseTouchStart; + sliderSettings.onTouchMoveOpposite = pb.swipeCloseTouchMove; + sliderSettings.onTouchEnd = pb.swipeCloseTouchEnd; + } + + pb.swiper = app.swiper(pb.swiperContainer, sliderSettings); + if (index === 0) { + pb.onSliderTransitionStart(pb.swiper); + } + pb.attachEvents(); + }; + pb.attachEvents = function (detach) { + var action = detach ? 'off' : 'on'; + pb.container.find('.photo-browser-close-link')[action]('click', pb.close); + }; + + + // Expose + pb.exposed = false; + pb.toggleExposition = function () { + if (pb.container) pb.container.toggleClass('photo-browser-exposed'); + if (pb.params.expositionHideCaptions) pb.captionsContainer.toggleClass('photo-browser-captions-exposed'); + pb.exposed = !pb.exposed; + }; + pb.enableExposition = function () { + if (pb.container) pb.container.addClass('photo-browser-exposed'); + if (pb.params.expositionHideCaptions) pb.captionsContainer.addClass('photo-browser-captions-exposed'); + pb.exposed = true; + }; + pb.disableExposition = function () { + if (pb.container) pb.container.removeClass('photo-browser-exposed'); + if (pb.params.expositionHideCaptions) pb.captionsContainer.removeClass('photo-browser-captions-exposed'); + pb.exposed = false; + }; + + // Swipe Up To Close + var swipeToCloseIsTouched = false; + var allowSwipeToClose = true; + var swipeToCloseDiff, swipeToCloseStart, swipeToCloseCurrent, swipeToCloseStarted = false, swipeToCloseActiveSlide, swipeToCloseTimeStart; + pb.swipeCloseTouchStart = function (swiper, e) { + if (!allowSwipeToClose) return; + swipeToCloseIsTouched = true; + }; + pb.swipeCloseTouchMove = function (swiper, e) { + if (!swipeToCloseIsTouched) return; + if (!swipeToCloseStarted) { + swipeToCloseStarted = true; + swipeToCloseStart = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + swipeToCloseActiveSlide = pb.swiper.slides.eq(pb.swiper.activeIndex); + swipeToCloseTimeStart = (new Date()).getTime(); + } + e.preventDefault(); + swipeToCloseCurrent = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + swipeToCloseDiff = swipeToCloseStart - swipeToCloseCurrent; + var opacity = 1 - Math.abs(swipeToCloseDiff) / 300; + swipeToCloseActiveSlide.transform('translate3d(0,' + (-swipeToCloseDiff) + 'px,0)'); + pb.swiper.container.css('opacity', opacity).transition(0); + }; + pb.swipeCloseTouchEnd = function (swiper, e) { + swipeToCloseIsTouched = false; + if (!swipeToCloseStarted) { + swipeToCloseStarted = false; + return; + } + swipeToCloseStarted = false; + allowSwipeToClose = false; + var diff = Math.abs(swipeToCloseDiff); + var timeDiff = (new Date()).getTime() - swipeToCloseTimeStart; + if ((timeDiff < 300 && diff > 20) || (timeDiff >= 300 && diff > 100)) { + setTimeout(function () { + if (pb.params.type === 'standalone') { + pb.close(); + } + if (pb.params.type === 'popup') { + app.closeModal(pb.popup); + } + if (pb.params.onSwipeToClose) { + pb.params.onSwipeToClose(pb); + } + allowSwipeToClose = true; + }, 0); + return; + } + if (diff !== 0) { + swipeToCloseActiveSlide.addClass('transitioning').transitionEnd(function () { + allowSwipeToClose = true; + swipeToCloseActiveSlide.removeClass('transitioning'); + }); + } + else { + allowSwipeToClose = true; + } + pb.swiper.container.css('opacity', '').transition(''); + swipeToCloseActiveSlide.transform(''); + }; + + return pb; + }; + + app.photoBrowser = function (params) { + return new PhotoBrowser(params); + }; + + + /*=============================================================================== + ************ Autocomplete ************ + ===============================================================================*/ + var Autocomplete = function (params) { + var a = this; + + // Params + var defaults = { + // Standalone Options + /* + opener: undefined, + */ + popupCloseText: 'Close', + backText: 'Back', + searchbarPlaceholderText: 'Search...', + searchbarCancelText: 'Cancel', + openWithAnimation: true, + // When opened in page should the searchbar be focused by default + autoFocus: false, + openIn: 'page', + backOnSelect: false, + notFoundText: 'Nothing found', + requestSourceOnOpen: false, + /* + pageTitle: undefined, + */ + + // Handle Data + /* + source: undefined, + limit: undefined, + */ + valueProperty: 'id', + textProperty: 'text', + + // Dropdown Options + highlightMatches: true, + + /* + dropdownPlaceholderText: 'Type anything...', + */ + updateInputValueOnSelect: true, + expandInput: false, + + // Preloader + preloaderColor: false, + preloader: false, + + // Templates + /* + itemTemplate: undefined, + navbarTemplate: undefined, + dropdownTemplate: undefined + dropdownItemTemplate: undefined, + dropdownPlaceholderTemplate: undefined + */ + + // Color themes + /* + navbarTheme: undefined, + formTheme: undefined, + */ + + // Callbacks + /* + onChange: function (a, value) - for not dropdown + onOpen: function (a) + onClose: function (a) + */ + }; + + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + a.params = params; + + // Opener Link & View + if (a.params.opener) { + a.opener = $(a.params.opener); + } + var view = a.params.view; + if (!a.params.view && a.opener && a.opener.length) { + // Find related view + view = a.opener.parents('.' + app.params.viewClass); + if (view.length === 0) return; + view = view[0].f7View; + } + + // Input + if (a.params.input) { + a.input = $(a.params.input); + if (a.input.length === 0 && a.params.openIn === 'dropdown') return; + } + + // Array with selected items + a.value = a.params.value || []; + + // ID & Inputs + a.id = (new Date()).getTime(); + a.inputType = a.params.multiple ? 'checkbox' : 'radio'; + a.inputName = a.inputType + '-' + a.id; + + // Is Material + var material = app.params.material; + + // Back On Select + var backOnSelect = a.params.backOnSelect; + + if (a.params.openIn !== 'dropdown') { + // Item Template + a.itemTemplate = t7.compile(a.params.itemTemplate || + '
        • ' + + '' + + '
        • ' + ); + // Page Layout + var pageTitle = a.params.pageTitle || ''; + if (!pageTitle && a.opener && a.opener.length) { + pageTitle = a.opener.find('.item-title').text(); + } + var pageName = 'autocomplete-' + a.inputName; + + var navbarTheme = a.params.navbarTheme, + formTheme = a.params.formTheme; + + // Navbar HTML + var navbarHTML; + var noNavbar = '', noToolbar = '', navbarLayout; + + a.navbarTemplate = t7.compile(a.params.navbarTemplate || + '' + ); + navbarHTML = a.navbarTemplate({ + pageTitle: pageTitle, + backText: a.params.backText, + popupCloseText: a.params.popupCloseText, + openIn: a.params.openIn, + navbarTheme: navbarTheme, + inPopup: a.params.openIn === 'popup', + inPage: a.params.openIn === 'page', + material: material, + preloader: a.params.preloader, + preloaderColor: a.params.preloaderColor, + animated: a.params.openWithAnimation + }); + + // Determine navbar layout type - static/fixed/through + if (a.params.openIn === 'page') { + navbarLayout = 'static'; + if (a.opener) { + if (a.opener.parents('.navbar-through').length > 0) navbarLayout = 'through'; + if (a.opener.parents('.navbar-fixed').length > 0) navbarLayout = 'fixed'; + noToolbar = a.opener.parents('.page').hasClass('no-toolbar') ? 'no-toolbar' : ''; + noNavbar = a.opener.parents('.page').hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout; + } + else if (view.container) { + if ($(view.container).hasClass('navbar-through') || $(view.container).find('.navbar-through').length > 0) navbarLayout = 'through'; + if ($(view.container).hasClass('navbar-fixed') || $(view.container).find('.navbar-fixed').length > 0) navbarLayout = 'fixed'; + noToolbar = $(view.activePage.container).hasClass('no-toolbar') ? 'no-toolbar' : ''; + noNavbar = $(view.activePage.container).hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout; + } + } + else { + navbarLayout = 'fixed'; + } + var searchbarHTML = + '' + + '
          '; + var pageHTML = + (navbarLayout === 'through' ? navbarHTML : '') + + '
          ' + + '
          ' + + (navbarLayout === 'fixed' ? navbarHTML : '') + + searchbarHTML + + '
          ' + + (navbarLayout === 'static' ? navbarHTML : '') + + '
          ' + + '
            ' + + '
            ' + + '
            ' + + '
            • ' + a.params.notFoundText + '
            ' + + '
            ' + + '
            ' + + '
              ' + + '
              ' + + '
              ' + + '
              ' + + '
              '; + } + else { + a.dropdownItemTemplate = t7.compile(a.params.dropdownItemTemplate || + '
            • ' + + '' + + '
            • ' + ); + a.dropdownPlaceholderTemplate = t7.compile(a.params.dropdownPlaceholderTemplate || + '
            • ' + + '
              ' + + '
              ' + + '
              {{text}}
              ' + + '
              ' + + '' + + '
            • ' + ); + a.dropdownTemplate = t7.compile(a.params.dropdownTemplate || + '
              ' + + '
              ' + + '
              ' + + '
                ' + + '
                ' + + '
                ' + + '{{#if preloader}}' + + '
                {{#if material}}{{materialPreloaderHtml}}{{/if}}
                ' + + '{{/if}}' + + '
                ' + ); + } + + // Define popup + a.popup = undefined; + + // Define Dropdown + a.dropdown = undefined; + + // Handle Input Value Change + function handleInputValue (e) { + var query = a.input.val(); + if (a.params.source) { + a.params.source(a, query, function (items) { + var itemsHTML = ''; + var limit = a.params.limit ? Math.min(a.params.limit, items.length) : items.length; + a.items = items; + var i, j, regExp; + if (a.params.highlightMatches) { + query = query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); + regExp = new RegExp('('+query+')', 'i'); + } + + for (i = 0; i < limit; i++) { + var itemValue = typeof items[i] === 'object' ? items[i][a.params.valueProperty] : items[i]; + var itemText = typeof items[i] !== 'object' ? items[i] : items[i][a.params.textProperty]; + itemsHTML += a.dropdownItemTemplate({ + value: itemValue, + text: a.params.highlightMatches ? itemText.replace(regExp, '$1') : itemText + }); + } + if (itemsHTML === '' && query === '' && a.params.dropdownPlaceholderText) { + itemsHTML += a.dropdownPlaceholderTemplate({ + text: a.params.dropdownPlaceholderText, + }); + } + a.dropdown.find('ul').html(itemsHTML); + }); + } + } + // Handle Drop Down Click + function handleDropdownClick (e) { + /*jshint validthis:true */ + var clicked = $(this); + var clickedItem; + for (var i = 0; i < a.items.length; i++) { + var itemValue = typeof a.items[i] === 'object' ? a.items[i][a.params.valueProperty] : a.items[i]; + var value = clicked.attr('data-value'); + if (itemValue === value || itemValue * 1 === value * 1) { + clickedItem = a.items[i]; + } + } + if (a.params.updateInputValueOnSelect) { + a.input.val(typeof clickedItem === 'object' ? clickedItem[a.params.valueProperty] : clickedItem); + a.input.trigger('input change'); + } + + if (a.params.onChange) { + a.params.onChange(a, clickedItem); + } + + a.close(); + } + + // Handle HTML Click to close Dropdown + function closeOnHTMLClick (e) { + var target = $(e.target); + if (!(target.is(a.input[0]) || a.dropdown && target.parents(a.dropdown[0]).length > 0)) { + a.close(); + } + } + + a.positionDropDown = function () { + var listBlock = a.input.parents('.list-block'), + pageContent = a.input.parents('.page-content'), + paddingTop = parseInt(pageContent.css('padding-top'), 10), + paddingBottom = parseInt(pageContent.css('padding-top'), 10), + // inputOffset = a.input.offset(), + listBlockOffsetLeft = listBlock.length > 0 ? listBlock.offset().left - listBlock.parent().offset().left : 0, + inputOffsetLeft = a.input.offset().left - (listBlock.length > 0 ? listBlock.offset().left : 0), + inputOffsetTop = a.input.offset().top - (pageContent.offset().top - pageContent[0].scrollTop), + maxHeight = pageContent[0].scrollHeight - paddingBottom - (inputOffsetTop + pageContent[0].scrollTop) - a.input[0].offsetHeight; + + a.dropdown.css({ + left: (listBlock.length > 0 ? listBlockOffsetLeft : inputOffsetLeft) + 'px', + top: inputOffsetTop + pageContent[0].scrollTop + a.input[0].offsetHeight + 'px', + width: (listBlock.length > 0 ? listBlock[0].offsetWidth : a.input[0].offsetWidth) + 'px' + }); + a.dropdown.children('.autocomplete-dropdown-inner').css({ + maxHeight: maxHeight + 'px', + paddingLeft: listBlock.length > 0 && !a.params.expandInput ? inputOffsetLeft - (material ? 16 : 15) + 'px' : '' + }); + }; + + a.pageInit = function (e) { + var page = e.detail.page; + a.page = $(page.container); + a.pageData = page; + if (page.name !== pageName) { + return; + } + var container = $(page.container); + + // Source + function onSource(query) { + if (!a.params.source) return; + var i, j, k; + + a.params.source(a, query, function(items) { + var itemsHTML = ''; + var limit = a.params.limit ? Math.min(a.params.limit, items.length) : items.length; + a.items = items; + for (i = 0; i < limit; i++) { + var selected = false; + var itemValue = typeof items[i] === 'object' ? items[i][a.params.valueProperty] : items[i]; + for (j = 0; j < a.value.length; j++) { + var aValue = typeof a.value[j] === 'object' ? a.value[j][a.params.valueProperty] : a.value[j]; + if (aValue === itemValue || aValue * 1 === itemValue * 1) selected = true; + } + itemsHTML += a.itemTemplate({ + value: itemValue, + text: typeof items[i] !== 'object' ? items[i] : items[i][a.params.textProperty], + inputType: a.inputType, + id: a.id, + inputName: a.inputName, + selected: selected, + checkbox: a.inputType === 'checkbox', + material: material + }); + } + container.find('.autocomplete-found ul').html(itemsHTML); + if (items.length === 0) { + if (query.length !== 0) { + container.find('.autocomplete-not-found').show(); + container.find('.autocomplete-found, .autocomplete-values').hide(); + } + else { + container.find('.autocomplete-values').show(); + container.find('.autocomplete-found, .autocomplete-not-found').hide(); + } + } + else { + container.find('.autocomplete-found').show(); + container.find('.autocomplete-not-found, .autocomplete-values').hide(); + } + }); + } + + // Init Search Bar + var searchbar = app.searchbar(container.find('.searchbar'), { + customSearch: true, + onSearch: function (searchbar, data) { + if (data.query.length === 0 && searchbar.active) { + searchbar.overlay.addClass('searchbar-overlay-active'); + } + else { + searchbar.overlay.removeClass('searchbar-overlay-active'); + } + + onSource(data.query); + } + }); + + // Save searchbar instance + a.searchbar = searchbar; + + // Update values + function updateValues() { + var valuesHTML = ''; + var i; + for (i = 0; i < a.value.length; i++) { + + valuesHTML += a.itemTemplate({ + value: typeof a.value[i] === 'object' ? a.value[i][a.params.valueProperty] : a.value[i], + text: typeof a.value[i] === 'object' ? a.value[i][a.params.textProperty]: a.value[i], + inputType: a.inputType, + id: a.id, + inputName: a.inputName + '-checked', + checkbox: a.inputType === 'checkbox', + material: material, + selected: true + }); + } + container.find('.autocomplete-values ul').html(valuesHTML); + } + + // Handle Inputs + if (!a.params.multiple && a.params.backOnSelect) { + container.once('click', '.list-block label', function () { + if (a.params.openIn === 'popup') app.closeModal(a.popup); + else view.router.back({animatePages: a.params.openWithAnimation}); + }); + } + container.on('change', 'input[type="radio"], input[type="checkbox"]', function () { + var i; + var input = this; + var value = input.value; + var text = $(input).parents('li').find('.item-title').text(); + var isValues = $(input).parents('.autocomplete-values').length > 0; + var item, itemValue, aValue; + if (isValues) { + if (a.inputType === 'checkbox' && !input.checked) { + for (i = 0; i < a.value.length; i++) { + aValue = typeof a.value[i] === 'string' ? a.value[i] : a.value[i][a.params.valueProperty]; + if (aValue === value || aValue * 1 === value * 1) { + a.value.splice(i, 1); + } + } + updateValues(); + if (a.params.onChange) a.params.onChange(a, a.value); + } + return; + } + + // Find Related Item + for (i = 0; i < a.items.length; i++) { + itemValue = typeof a.items[i] === 'string' ? a.items[i] : a.items[i][a.params.valueProperty]; + if (itemValue === value || itemValue * 1 === value * 1) item = a.items[i]; + } + // Update Selected Value + if (a.inputType === 'radio') { + a.value = [item]; + } + else { + if (input.checked) { + a.value.push(item); + } + else { + for (i = 0; i < a.value.length; i++) { + aValue = typeof a.value[i] === 'string' ? a.value[i] : a.value[i][a.params.valueProperty]; + if (aValue === value || aValue * 1 === value * 1) { + a.value.splice(i, 1); + } + } + } + } + + // Update Values Block + updateValues(); + + // On Select Callback + if ((a.inputType === 'radio' && input.checked || a.inputType === 'checkbox') && a.params.onChange ) { + a.params.onChange(a, a.value); + } + }); + + // Update Values On Page Init + updateValues(); + + // Source on load + if (a.params.requestSourceOnOpen) onSource(''); + + // On Open Callback + if (a.params.onOpen) a.params.onOpen(a); + }; + + // Show Hide Preloader + a.showPreloader = function () { + if (a.params.openIn === 'dropdown') { + if (a.dropdown) a.dropdown.find('.autocomplete-preloader').addClass('autocomplete-preloader-visible'); + } + else $('.autocomplete-preloader').addClass('autocomplete-preloader-visible'); + }; + + a.hidePreloader = function () { + if (a.params.openIn === 'dropdown') { + if (a.dropdown) a.dropdown.find('.autocomplete-preloader').removeClass('autocomplete-preloader-visible'); + } + else $('.autocomplete-preloader').removeClass('autocomplete-preloader-visible'); + }; + + // Autofocus + a.autoFocus = function (e) { + var self = this; + setTimeout(function () { + $(self).find('input[type=search]').focus(); + }, 0); + }; + + // Open Autocomplete Page/Popup + a.open = function () { + if (a.opened) return; + a.opened = true; + if (a.params.openIn === 'dropdown') { + if (!a.dropdown) { + a.dropdown = $(a.dropdownTemplate({ + preloader: a.params.preloader, + preloaderColor: a.params.preloaderColor, + material: material, + materialPreloaderHtml: app.params.materialPreloaderHtml + })); + a.dropdown.on('click', 'label', handleDropdownClick); + + } + var listBlock = a.input.parents('.list-block'); + if (listBlock.length && a.input.parents('.item-content').length > 0 && a.params.expandInput) { + a.input.parents('.item-content').addClass('item-content-dropdown-expand'); + } + a.positionDropDown(); + a.input.parents('.page-content').append(a.dropdown); + a.dropdown.addClass('autocomplete-dropdown-in'); + a.input.trigger('input'); + app.onResize(a.positionDropDown); + if (a.params.onOpen) a.params.onOpen(a); + } + else { + $(document).once('page:init', '.autocomplete-page', a.pageInit); + if (a.params.openIn === 'popup') { + a.popup = app.popup( + '', + true, + a.params.openWithAnimation + ); + a.popup = $(a.popup); + if (a.params.autoFocus) { + if (a.params.openWithAnimation) a.popup.once('popup:opened', a.autoFocus); + else a.autoFocus.bind(a.popup)(); + } + a.popup.once('popup:closed', function () { + a.popup = undefined; + a.opened = false; + if (a.params.onClose) a.params.onClose(a); + }); + } + else { + if (a.params.autoFocus) { + $(document).once(a.params.openWithAnimation ? 'page:afteranimation' : 'page:init', '.autocomplete-page', a.autoFocus); + } + view.router.load({ + content: pageHTML, + animatePages: a.params.openWithAnimation + }); + $(document).once('page:back', '.autocomplete-page', function () { + a.opened = false; + if (a.params.onClose) a.params.onClose(a); + }); + } + } + }; + a.close = function (e) { + if (!a.opened) return; + if (a.params.openIn === 'dropdown') { + if (e && e.type === 'blur' && a.dropdown.find('label.active-state').length > 0) return; + a.dropdown.removeClass('autocomplete-dropdown-in').remove(); + a.input.parents('.item-content-dropdown-expand').removeClass('item-content-dropdown-expand'); + a.opened = false; + app.offResize(a.positionDropDown); + if (a.params.onClose) a.params.onClose(a); + } + if (a.params.openIn === 'popup') { + if (a.popup) app.closeModal(a.popup); + } + }; + + // Init Events + a.initEvents = function (detach) { + var method = detach ? 'off' : 'on'; + if (a.params.openIn !== 'dropdown' && a.opener) { + a.opener[method]('click', a.open); + } + if (a.params.openIn === 'dropdown' && a.input) { + a.input[method]('focus', a.open); + a.input[method]('input', handleInputValue); + if (app.device.android) { + $('html')[method]('click', closeOnHTMLClick); + } + else { + a.input[method]('blur', a.close); + } + } + if (detach && a.dropdown) { + a.dropdown = null; + } + }; + + // Init/Destroy Methods + a.init = function () { + a.initEvents(); + }; + a.destroy = function () { + a.initEvents(true); + a = null; + }; + + // Init + a.init(); + + return a; + }; + app.autocomplete = function (params) { + return new Autocomplete(params); + }; + + + /*====================================================== + ************ Picker ************ + ======================================================*/ + var Picker = function (params) { + var p = this; + var defaults = { + updateValuesOnMomentum: false, + updateValuesOnTouchmove: true, + rotateEffect: false, + momentumRatio: 7, + freeMode: false, + // Common settings + closeByOutsideClick: true, + scrollToInput: true, + inputReadOnly: true, + convertToPopover: true, + onlyInPopover: false, + toolbar: true, + toolbarCloseText: 'Done', + toolbarTemplate: + '
                ' + + '
                ' + + '
                ' + + '
                ' + + '{{closeText}}' + + '
                ' + + '
                ' + + '
                ' + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + p.params = params; + p.cols = []; + p.initialized = false; + + // Inline flag + p.inline = p.params.container ? true : false; + + // 3D Transforms origin bug, only on safari + var originBug = app.device.ios || (navigator.userAgent.toLowerCase().indexOf('safari') >= 0 && navigator.userAgent.toLowerCase().indexOf('chrome') < 0) && !app.device.android; + + // Should be converted to popover + function isPopover() { + var toPopover = false; + if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover; + if (!p.inline && p.params.input) { + if (p.params.onlyInPopover) toPopover = true; + else { + if (app.device.ios) { + toPopover = app.device.ipad ? true : false; + } + else { + if (app.width >= 768) toPopover = true; + } + } + } + return toPopover; + } + function inPopover() { + if (p.opened && p.container && p.container.length > 0 && p.container.parents('.popover').length > 0) return true; + else return false; + } + + // Value + p.setValue = function (arrValues, transition) { + var valueIndex = 0; + if (p.cols.length === 0) { + p.value = arrValues; + p.updateValue(arrValues); + return; + } + for (var i = 0; i < p.cols.length; i++) { + if (p.cols[i] && !p.cols[i].divider) { + p.cols[i].setValue(arrValues[valueIndex], transition); + valueIndex++; + } + } + }; + p.updateValue = function (forceValues) { + var newValue = forceValues || []; + var newDisplayValue = [], i, column; + if (p.cols.length === 0) { + for (i = 0; i < p.params.cols.length; i++) { + column = p.params.cols[i]; + if (column.displayValues !== undefined && column.values !== undefined && column.values.indexOf(newValue[i]) !== undefined) { + newDisplayValue.push(column.displayValues[column.values.indexOf(newValue[i])]); + } + else { + newDisplayValue.push(newValue[i]); + } + } + } + else { + for (i = 0; i < p.cols.length; i++) { + if (!p.cols[i].divider) { + newValue.push(p.cols[i].value); + newDisplayValue.push(p.cols[i].displayValue); + } + } + } + + if (newValue.indexOf(undefined) >= 0) { + return; + } + p.value = newValue; + p.displayValue = newDisplayValue; + if (p.params.onChange) { + p.params.onChange(p, p.value, p.displayValue); + } + if (p.input && p.input.length > 0) { + $(p.input).val(p.params.formatValue ? p.params.formatValue(p, p.value, p.displayValue) : p.value.join(' ')); + $(p.input).trigger('change'); + } + }; + + // Columns Handlers + p.initPickerCol = function (colElement, updateItems) { + var colContainer = $(colElement); + var colIndex = colContainer.index(); + var col = p.cols[colIndex]; + if (col.divider) return; + col.container = colContainer; + col.wrapper = col.container.find('.picker-items-col-wrapper'); + col.items = col.wrapper.find('.picker-item'); + + var i, j; + var wrapperHeight, itemHeight, itemsHeight, minTranslate, maxTranslate; + col.replaceValues = function (values, displayValues) { + col.destroyEvents(); + col.values = values; + col.displayValues = displayValues; + var newItemsHTML = p.columnHTML(col, true); + col.wrapper.html(newItemsHTML); + col.items = col.wrapper.find('.picker-item'); + col.calcSize(); + col.setValue(col.values[0], 0, true); + col.initEvents(); + }; + var resizeTimeout; + col.calcSize = function () { + if (p.params.rotateEffect) { + col.container.removeClass('picker-items-col-absolute'); + if (!col.width) col.container.css({width:''}); + } + var colWidth, colHeight; + colWidth = 0; + colHeight = col.container[0].offsetHeight; + wrapperHeight = col.wrapper[0].offsetHeight; + itemHeight = col.items[0].offsetHeight; + itemsHeight = itemHeight * col.items.length; + minTranslate = colHeight / 2 - itemsHeight + itemHeight / 2; + maxTranslate = colHeight / 2 - itemHeight / 2; + if (col.width) { + colWidth = col.width; + if (parseInt(colWidth, 10) === colWidth) colWidth = colWidth + 'px'; + col.container.css({width: colWidth}); + } + if (p.params.rotateEffect) { + if (!col.width) { + col.items.each(function () { + var item = $(this).children('span'); + colWidth = Math.max(colWidth, item[0].offsetWidth); + }); + col.container.css({width: (colWidth + 2) + 'px'}); + } + col.container.addClass('picker-items-col-absolute'); + } + }; + col.calcSize(); + + col.wrapper.transform('translate3d(0,' + maxTranslate + 'px,0)').transition(0); + + + var activeIndex = 0; + var animationFrameId; + + // Set Value Function + col.setValue = function (newValue, transition, valueCallbacks) { + if (typeof transition === 'undefined') transition = ''; + var newActiveIndex = col.wrapper.find('.picker-item[data-picker-value="' + newValue + '"]').index(); + if(typeof newActiveIndex === 'undefined' || newActiveIndex === -1) { + return; + } + var newTranslate = -newActiveIndex * itemHeight + maxTranslate; + // Update wrapper + col.wrapper.transition(transition); + col.wrapper.transform('translate3d(0,' + (newTranslate) + 'px,0)'); + + // Watch items + if (p.params.updateValuesOnMomentum && col.activeIndex && col.activeIndex !== newActiveIndex ) { + $.cancelAnimationFrame(animationFrameId); + col.wrapper.transitionEnd(function(){ + $.cancelAnimationFrame(animationFrameId); + }); + updateDuringScroll(); + } + + // Update items + col.updateItems(newActiveIndex, newTranslate, transition, valueCallbacks); + }; + + col.updateItems = function (activeIndex, translate, transition, valueCallbacks) { + if (typeof translate === 'undefined') { + translate = $.getTranslate(col.wrapper[0], 'y'); + } + if(typeof activeIndex === 'undefined') activeIndex = -Math.round((translate - maxTranslate)/itemHeight); + if (activeIndex < 0) activeIndex = 0; + if (activeIndex >= col.items.length) activeIndex = col.items.length - 1; + var previousActiveIndex = col.activeIndex; + col.activeIndex = activeIndex; + col.wrapper.find('.picker-selected').removeClass('picker-selected'); + + col.items.transition(transition); + + var selectedItem = col.items.eq(activeIndex).addClass('picker-selected').transform(''); + + // Set 3D rotate effect + if (p.params.rotateEffect) { + var percentage = (translate - (Math.floor((translate - maxTranslate)/itemHeight) * itemHeight + maxTranslate)) / itemHeight; + + col.items.each(function () { + var item = $(this); + var itemOffsetTop = item.index() * itemHeight; + var translateOffset = maxTranslate - translate; + var itemOffset = itemOffsetTop - translateOffset; + var percentage = itemOffset / itemHeight; + + var itemsFit = Math.ceil(col.height / itemHeight / 2) + 1; + + var angle = (-18*percentage); + if (angle > 180) angle = 180; + if (angle < -180) angle = -180; + // Far class + if (Math.abs(percentage) > itemsFit) item.addClass('picker-item-far'); + else item.removeClass('picker-item-far'); + // Set transform + item.transform('translate3d(0, ' + (-translate + maxTranslate) + 'px, ' + (originBug ? -110 : 0) + 'px) rotateX(' + angle + 'deg)'); + }); + } + + if (valueCallbacks || typeof valueCallbacks === 'undefined') { + // Update values + col.value = selectedItem.attr('data-picker-value'); + col.displayValue = col.displayValues ? col.displayValues[activeIndex] : col.value; + // On change callback + if (previousActiveIndex !== activeIndex) { + if (col.onChange) { + col.onChange(p, col.value, col.displayValue); + } + p.updateValue(); + } + } + }; + + function updateDuringScroll() { + animationFrameId = $.requestAnimationFrame(function () { + col.updateItems(undefined, undefined, 0); + updateDuringScroll(); + }); + } + + // Update items on init + if (updateItems) col.updateItems(0, maxTranslate, 0); + + var allowItemClick = true; + var isTouched, isMoved, touchStartY, touchCurrentY, touchStartTime, touchEndTime, startTranslate, returnTo, currentTranslate, prevTranslate, velocityTranslate, velocityTime; + function handleTouchStart (e) { + if (isMoved || isTouched) return; + e.preventDefault(); + isTouched = true; + touchStartY = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = (new Date()).getTime(); + + allowItemClick = true; + startTranslate = currentTranslate = $.getTranslate(col.wrapper[0], 'y'); + } + function handleTouchMove (e) { + if (!isTouched) return; + e.preventDefault(); + allowItemClick = false; + touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (!isMoved) { + // First move + $.cancelAnimationFrame(animationFrameId); + isMoved = true; + startTranslate = currentTranslate = $.getTranslate(col.wrapper[0], 'y'); + col.wrapper.transition(0); + } + + var diff = touchCurrentY - touchStartY; + currentTranslate = startTranslate + diff; + returnTo = undefined; + + // Normalize translate + if (currentTranslate < minTranslate) { + currentTranslate = minTranslate - Math.pow(minTranslate - currentTranslate, 0.8); + returnTo = 'min'; + } + if (currentTranslate > maxTranslate) { + currentTranslate = maxTranslate + Math.pow(currentTranslate - maxTranslate, 0.8); + returnTo = 'max'; + } + // Transform wrapper + col.wrapper.transform('translate3d(0,' + currentTranslate + 'px,0)'); + + // Update items + col.updateItems(undefined, currentTranslate, 0, p.params.updateValuesOnTouchmove); + + // Calc velocity + velocityTranslate = currentTranslate - prevTranslate || currentTranslate; + velocityTime = (new Date()).getTime(); + prevTranslate = currentTranslate; + } + function handleTouchEnd (e) { + if (!isTouched || !isMoved) { + isTouched = isMoved = false; + return; + } + isTouched = isMoved = false; + col.wrapper.transition(''); + if (returnTo) { + if (returnTo === 'min') { + col.wrapper.transform('translate3d(0,' + minTranslate + 'px,0)'); + } + else col.wrapper.transform('translate3d(0,' + maxTranslate + 'px,0)'); + } + touchEndTime = new Date().getTime(); + var velocity, newTranslate; + if (touchEndTime - touchStartTime > 300) { + newTranslate = currentTranslate; + } + else { + velocity = Math.abs(velocityTranslate / (touchEndTime - velocityTime)); + newTranslate = currentTranslate + velocityTranslate * p.params.momentumRatio; + } + + newTranslate = Math.max(Math.min(newTranslate, maxTranslate), minTranslate); + + // Active Index + var activeIndex = -Math.floor((newTranslate - maxTranslate)/itemHeight); + + // Normalize translate + if (!p.params.freeMode) newTranslate = -activeIndex * itemHeight + maxTranslate; + + // Transform wrapper + col.wrapper.transform('translate3d(0,' + (parseInt(newTranslate,10)) + 'px,0)'); + + // Update items + col.updateItems(activeIndex, newTranslate, '', true); + + // Watch items + if (p.params.updateValuesOnMomentum) { + updateDuringScroll(); + col.wrapper.transitionEnd(function(){ + $.cancelAnimationFrame(animationFrameId); + }); + } + + // Allow click + setTimeout(function () { + allowItemClick = true; + }, 100); + } + + function handleClick(e) { + if (!allowItemClick) return; + $.cancelAnimationFrame(animationFrameId); + /*jshint validthis:true */ + var value = $(this).attr('data-picker-value'); + col.setValue(value); + } + + col.initEvents = function (detach) { + var method = detach ? 'off' : 'on'; + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + col.container[method](app.touchEvents.start, handleTouchStart, activeListener); + col.container[method](app.touchEvents.move, handleTouchMove, activeListener); + col.container[method](app.touchEvents.end, handleTouchEnd, activeListener); + col.items[method]('click', handleClick); + }; + col.destroyEvents = function () { + col.initEvents(true); + }; + + col.container[0].f7DestroyPickerCol = function () { + col.destroyEvents(); + }; + + col.initEvents(); + + }; + p.destroyPickerCol = function (colContainer) { + colContainer = $(colContainer); + if ('f7DestroyPickerCol' in colContainer[0]) colContainer[0].f7DestroyPickerCol(); + }; + // Resize cols + function resizeCols() { + if (!p.opened) return; + for (var i = 0; i < p.cols.length; i++) { + if (!p.cols[i].divider) { + p.cols[i].calcSize(); + p.cols[i].setValue(p.cols[i].value, 0, false); + } + } + } + app.onResize(resizeCols); + + // HTML Layout + p.columnHTML = function (col, onlyItems) { + var columnItemsHTML = ''; + var columnHTML = ''; + if (col.divider) { + columnHTML += '
                ' + col.content + '
                '; + } + else { + for (var j = 0; j < col.values.length; j++) { + columnItemsHTML += '
                ' + (col.displayValues ? col.displayValues[j] : col.values[j]) + '
                '; + } + columnHTML += '
                ' + columnItemsHTML + '
                '; + } + return onlyItems ? columnItemsHTML : columnHTML; + }; + p.layout = function () { + var pickerHTML = ''; + var pickerClass = ''; + var i; + p.cols = []; + var colsHTML = ''; + for (i = 0; i < p.params.cols.length; i++) { + var col = p.params.cols[i]; + colsHTML += p.columnHTML(p.params.cols[i]); + p.cols.push(col); + } + pickerClass = 'picker-modal picker-columns ' + (p.params.cssClass || '') + (p.params.rotateEffect ? ' picker-3d' : ''); + pickerHTML = + '
                ' + + (p.params.toolbar ? p.params.toolbarTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : '') + + '
                ' + + colsHTML + + '
                ' + + '
                ' + + '
                '; + + p.pickerHTML = pickerHTML; + }; + + // Input Events + function openOnInput(e) { + e.preventDefault(); + if (p.opened) return; + p.open(); + if (p.params.scrollToInput && !isPopover()) { + var pageContent = p.input.parents('.page-content'); + if (pageContent.length === 0) return; + + var paddingTop = parseInt(pageContent.css('padding-top'), 10), + paddingBottom = parseInt(pageContent.css('padding-bottom'), 10), + pageHeight = pageContent[0].offsetHeight - paddingTop - p.container.height(), + pageScrollHeight = pageContent[0].scrollHeight - paddingTop - p.container.height(), + newPaddingBottom; + var inputTop = p.input.offset().top - paddingTop + p.input[0].offsetHeight; + if (inputTop > pageHeight) { + var scrollTop = pageContent.scrollTop() + inputTop - pageHeight; + if (scrollTop + pageHeight > pageScrollHeight) { + newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom; + if (pageHeight === pageScrollHeight) { + newPaddingBottom = p.container.height(); + } + pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'}); + } + pageContent.scrollTop(scrollTop, 300); + } + } + } + function closeOnHTMLClick(e) { + if (inPopover()) return; + if (p.input && p.input.length > 0) { + if (e.target !== p.input[0] && $(e.target).parents('.picker-modal').length === 0) p.close(); + } + else { + if ($(e.target).parents('.picker-modal').length === 0) p.close(); + } + } + + if (p.params.input) { + p.input = $(p.params.input); + if (p.input.length > 0) { + if (p.params.inputReadOnly) p.input.prop('readOnly', true); + if (!p.inline) { + p.input.on('click', openOnInput); + } + if (p.params.inputReadOnly) { + p.input.on('focus mousedown', function (e) { + e.preventDefault(); + }); + } + } + + } + + if (!p.inline && p.params.closeByOutsideClick) $('html').on('click', closeOnHTMLClick); + + // Open + function onPickerClose() { + p.opened = false; + if (p.input && p.input.length > 0) { + p.input.parents('.page-content').css({'padding-bottom': ''}); + if (app.params.material) p.input.trigger('blur'); + } + if (p.params.onClose) p.params.onClose(p); + + // Destroy events + p.container.find('.picker-items-col').each(function () { + p.destroyPickerCol(this); + }); + } + + p.opened = false; + p.open = function () { + var toPopover = isPopover(); + + if (!p.opened) { + + // Layout + p.layout(); + + // Append + if (toPopover) { + p.pickerHTML = '
                ' + p.pickerHTML + '
                '; + p.popover = app.popover(p.pickerHTML, p.params.input, true); + p.container = $(p.popover).find('.picker-modal'); + $(p.popover).on('popover:close', function () { + onPickerClose(); + }); + } + else if (p.inline) { + p.container = $(p.pickerHTML); + p.container.addClass('picker-modal-inline'); + $(p.params.container).append(p.container); + } + else { + p.container = $(app.pickerModal(p.pickerHTML)); + $(p.container) + .on('picker:close', function () { + onPickerClose(); + }); + } + + // Store picker instance + p.container[0].f7Picker = p; + + // Init Events + p.container.find('.picker-items-col').each(function () { + var updateItems = true; + if ((!p.initialized && p.params.value) || (p.initialized && p.value)) updateItems = false; + p.initPickerCol(this, updateItems); + }); + + // Set value + if (!p.initialized) { + if (p.value) p.setValue(p.value, 0); + else if (p.params.value) { + p.setValue(p.params.value, 0); + } + } + else { + if (p.value) p.setValue(p.value, 0); + } + + // Material Focus + if (p.input && p.input.length > 0 && app.params.material) { + p.input.trigger('focus'); + } + } + + // Set flag + p.opened = true; + p.initialized = true; + + if (p.params.onOpen) p.params.onOpen(p); + }; + + // Close + p.close = function () { + if (!p.opened || p.inline) return; + if (inPopover()) { + app.closeModal(p.popover); + return; + } + else { + app.closeModal(p.container); + return; + } + }; + + // Destroy + p.destroy = function () { + p.close(); + if (p.params.input && p.input.length > 0) { + p.input.off('click focus', openOnInput); + } + $('html').off('click', closeOnHTMLClick); + app.offResize(resizeCols); + }; + + if (p.inline) { + p.open(); + } + else { + if (!p.initialized && p.params.value) p.setValue(p.params.value); + } + + return p; + }; + app.picker = function (params) { + return new Picker(params); + }; + + + /*====================================================== + ************ Calendar ************ + ======================================================*/ + var Calendar = function (params) { + var p = this; + var defaults = { + monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August' , 'September' , 'October', 'November', 'December'], + monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + firstDay: 1, // First day of the week, Monday + weekendDays: [0, 6], // Sunday and Saturday + multiple: false, + rangePicker: false, + dateFormat: 'yyyy-mm-dd', + direction: 'horizontal', // or 'vertical' + minDate: null, + maxDate: null, + disabled: null, // dates range of disabled days + events: null, // dates range of days with events + rangesClasses: null, //array with custom classes date ranges + touchMove: true, + animate: true, + closeOnSelect: false, + monthPicker: true, + monthPickerTemplate: + '
                ' + + '' + + '' + + '' + + '
                ', + yearPicker: true, + yearPickerTemplate: + '
                ' + + '' + + '' + + '' + + '
                ', + weekHeader: true, + // Common settings + closeByOutsideClick: true, + scrollToInput: true, + inputReadOnly: true, + convertToPopover: true, + onlyInPopover: false, + toolbar: true, + toolbarCloseText: 'Done', + headerPlaceholder: 'Select date', + header: app.params.material, + footer: app.params.material, + toolbarTemplate: + '
                ' + + '
                ' + + '{{monthPicker}}' + + '{{yearPicker}}' + + '
                ' + + '
                ', + headerTemplate: + '
                ' + + '
                {{placeholder}}
                ' + + '
                ', + footerTemplate: + '', + + /* Callbacks + onMonthAdd + onChange + onOpen + onClose + onDayClick + onMonthYearChangeStart + onMonthYearChangeEnd + */ + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + p.params = params; + p.initialized = false; + + // Inline flag + p.inline = p.params.container ? true : false; + + // Is horizontal + p.isH = p.params.direction === 'horizontal'; + + // RTL inverter + var inverter = p.isH ? (app.rtl ? -1 : 1) : 1; + + // Animating flag + p.animating = false; + + // Should be converted to popover + function isPopover() { + var toPopover = false; + if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover; + if (!p.inline && p.params.input) { + if (p.params.onlyInPopover) toPopover = true; + else { + if (app.device.ios) { + toPopover = app.device.ipad ? true : false; + } + else { + if (app.width >= 768) toPopover = true; + } + } + } + return toPopover; + } + function inPopover() { + if (p.opened && p.container && p.container.length > 0 && p.container.parents('.popover').length > 0) return true; + else return false; + } + + // Format date + function formatDate(date) { + date = new Date(date); + var year = date.getFullYear(); + var month = date.getMonth(); + var month1 = month + 1; + var day = date.getDate(); + var weekDay = date.getDay(); + + return p.params.dateFormat + .replace(/yyyy/g, year) + .replace(/yy/g, (year + '').substring(2)) + .replace(/mm/g, month1 < 10 ? '0' + month1 : month1) + .replace(/m(\W+)/g, month1 + '$1') + .replace(/MM/g, p.params.monthNames[month]) + .replace(/M(\W+)/g, p.params.monthNamesShort[month] + '$1') + .replace(/dd/g, day < 10 ? '0' + day : day) + .replace(/d(\W+)/g, day + '$1') + .replace(/DD/g, p.params.dayNames[weekDay]) + .replace(/D(\W+)/g, p.params.dayNamesShort[weekDay] + '$1'); + } + + + // Value + p.addValue = function (value) { + if (p.params.multiple) { + if (!p.value) p.value = []; + var inValuesIndex; + for (var i = 0; i < p.value.length; i++) { + if (new Date(value).getTime() === new Date(p.value[i]).getTime()) { + inValuesIndex = i; + } + } + if (typeof inValuesIndex === 'undefined') { + p.value.push(value); + } + else { + p.value.splice(inValuesIndex, 1); + } + p.updateValue(); + } + else if (p.params.rangePicker) { + if (!p.value) p.value = []; + if (p.value.length === 2 || p.value.length === 0) { + p.value = []; + } + if (p.value[0] !== value) p.value.push(value); + else p.value = []; + p.value.sort(function (a,b) { + return a - b; + }); + p.updateValue(); + } + else { + p.value = [value]; + p.updateValue(); + } + }; + p.setValue = function (arrValues) { + p.value = arrValues; + p.updateValue(); + }; + p.updateValue = function (onlyHeader) { + var i, inputValue; + if (p.container && p.container.length > 0) { + p.wrapper.find('.picker-calendar-day-selected').removeClass('picker-calendar-day-selected'); + var valueDate; + if (p.params.rangePicker && p.value.length === 2) { + for (i = new Date(p.value[0]).getTime(); i <= new Date(p.value[1]).getTime(); i += 24*60*60*1000) { + valueDate = new Date(i); + p.wrapper.find('.picker-calendar-day[data-date="' + valueDate.getFullYear() + '-' + valueDate.getMonth() + '-' + valueDate.getDate() + '"]').addClass('picker-calendar-day-selected'); + } + } + else { + for (i = 0; i < p.value.length; i++) { + valueDate = new Date(p.value[i]); + p.wrapper.find('.picker-calendar-day[data-date="' + valueDate.getFullYear() + '-' + valueDate.getMonth() + '-' + valueDate.getDate() + '"]').addClass('picker-calendar-day-selected'); + } + } + } + + if (p.params.onChange) { + p.params.onChange(p, p.value); + } + if ((p.input && p.input.length > 0) || (app.params.material && p.params.header)) { + if (p.params.formatValue) inputValue = p.params.formatValue(p, p.value); + else { + inputValue = []; + for (i = 0; i < p.value.length; i++) { + inputValue.push(formatDate(p.value[i])); + } + inputValue = inputValue.join(p.params.rangePicker ? ' - ' : ', '); + } + if (app.params.material && p.params.header && p.container && p.container.length > 0) { + p.container.find('.picker-calendar-selected-date').text(inputValue); + } + if (p.input && p.input.length > 0 && !onlyHeader) { + $(p.input).val(inputValue); + $(p.input).trigger('change'); + } + + } + }; + + // Columns Handlers + p.initCalendarEvents = function () { + var col; + var allowItemClick = true; + var isTouched, isMoved, touchStartX, touchStartY, touchCurrentX, touchCurrentY, touchStartTime, touchEndTime, startTranslate, currentTranslate, wrapperWidth, wrapperHeight, percentage, touchesDiff, isScrolling; + function handleTouchStart (e) { + if (isMoved || isTouched) return; + // e.preventDefault(); + isTouched = true; + touchStartX = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touchStartY = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = (new Date()).getTime(); + percentage = 0; + allowItemClick = true; + isScrolling = undefined; + startTranslate = currentTranslate = p.monthsTranslate; + } + function handleTouchMove (e) { + if (!isTouched) return; + + touchCurrentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (typeof isScrolling === 'undefined') { + isScrolling = !!(isScrolling || Math.abs(touchCurrentY - touchStartY) > Math.abs(touchCurrentX - touchStartX)); + } + if (p.isH && isScrolling) { + isTouched = false; + return; + } + e.preventDefault(); + if (p.animating) { + isTouched = false; + return; + } + allowItemClick = false; + if (!isMoved) { + // First move + isMoved = true; + wrapperWidth = p.wrapper[0].offsetWidth; + wrapperHeight = p.wrapper[0].offsetHeight; + p.wrapper.transition(0); + } + + touchesDiff = p.isH ? touchCurrentX - touchStartX : touchCurrentY - touchStartY; + percentage = touchesDiff/(p.isH ? wrapperWidth : wrapperHeight); + currentTranslate = (p.monthsTranslate * inverter + percentage) * 100; + + // Transform wrapper + p.wrapper.transform('translate3d(' + (p.isH ? currentTranslate : 0) + '%, ' + (p.isH ? 0 : currentTranslate) + '%, 0)'); + + } + function handleTouchEnd (e) { + if (!isTouched || !isMoved) { + isTouched = isMoved = false; + return; + } + isTouched = isMoved = false; + + touchEndTime = new Date().getTime(); + if (touchEndTime - touchStartTime < 300) { + if (Math.abs(touchesDiff) < 10) { + p.resetMonth(); + } + else if (touchesDiff >= 10) { + if (app.rtl) p.nextMonth(); + else p.prevMonth(); + } + else { + if (app.rtl) p.prevMonth(); + else p.nextMonth(); + } + } + else { + if (percentage <= -0.5) { + if (app.rtl) p.prevMonth(); + else p.nextMonth(); + } + else if (percentage >= 0.5) { + if (app.rtl) p.nextMonth(); + else p.prevMonth(); + } + else { + p.resetMonth(); + } + } + + // Allow click + setTimeout(function () { + allowItemClick = true; + }, 100); + } + + function handleDayClick(e) { + if (!allowItemClick) return; + var day = $(e.target).parents('.picker-calendar-day'); + if (day.length === 0 && $(e.target).hasClass('picker-calendar-day')) { + day = $(e.target); + } + if (day.length === 0) return; + if (day.hasClass('picker-calendar-day-disabled')) return; + if (!p.params.rangePicker) { + if (day.hasClass('picker-calendar-day-next')) p.nextMonth(); + if (day.hasClass('picker-calendar-day-prev')) p.prevMonth(); + } + var dateYear = day.attr('data-year'); + var dateMonth = day.attr('data-month'); + var dateDay = day.attr('data-day'); + if (p.params.onDayClick) { + p.params.onDayClick(p, day[0], dateYear, dateMonth, dateDay); + } + if (!day.hasClass('picker-calendar-day-selected') || p.params.multiple || p.params.rangePicker) { + p.addValue(new Date(dateYear, dateMonth, dateDay, 0, 0, 0)); + } + if (p.params.closeOnSelect) { + if (p.params.rangePicker && p.value.length === 2 || !p.params.rangePicker) p.close(); + } + } + + p.container.find('.picker-calendar-prev-month').on('click', p.prevMonth); + p.container.find('.picker-calendar-next-month').on('click', p.nextMonth); + p.container.find('.picker-calendar-prev-year').on('click', p.prevYear); + p.container.find('.picker-calendar-next-year').on('click', p.nextYear); + p.wrapper.on('click', handleDayClick); + var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false; + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + if (p.params.touchMove) { + p.wrapper.on(app.touchEvents.start, handleTouchStart, passiveListener); + p.wrapper.on(app.touchEvents.move, handleTouchMove, activeListener); + p.wrapper.on(app.touchEvents.end, handleTouchEnd, passiveListener); + } + + p.container[0].f7DestroyCalendarEvents = function () { + p.container.find('.picker-calendar-prev-month').off('click', p.prevMonth); + p.container.find('.picker-calendar-next-month').off('click', p.nextMonth); + p.container.find('.picker-calendar-prev-year').off('click', p.prevYear); + p.container.find('.picker-calendar-next-year').off('click', p.nextYear); + p.wrapper.off('click', handleDayClick); + if (p.params.touchMove) { + p.wrapper.off(app.touchEvents.start, handleTouchStart, passiveListener); + p.wrapper.off(app.touchEvents.move, handleTouchMove, activeListener); + p.wrapper.off(app.touchEvents.end, handleTouchEnd, passiveListener); + } + }; + + + }; + p.destroyCalendarEvents = function (colContainer) { + if ('f7DestroyCalendarEvents' in p.container[0]) p.container[0].f7DestroyCalendarEvents(); + }; + + // Scan Dates Range + p.dateInRange = function (dayDate, range) { + var match = false; + var i; + if (!range) return false; + if (Array.isArray(range)) { + for (i = 0; i < range.length; i ++) { + if (range[i].from || range[i].to) { + if (range[i].from && range[i].to) { + if ((dayDate <= new Date(range[i].to).getTime()) && (dayDate >= new Date(range[i].from).getTime())) { + match = true; + } + } + else if (range[i].from) { + if (dayDate >= new Date(range[i].from).getTime()) { + match = true; + } + } + else if (range[i].to) { + if (dayDate <= new Date(range[i].to).getTime()) { + match = true; + } + } + } else if (dayDate === new Date(range[i]).getTime()) { + match = true; + } + } + } + else if (range.from || range.to) { + if (range.from && range.to) { + if ((dayDate <= new Date(range.to).getTime()) && (dayDate >= new Date(range.from).getTime())) { + match = true; + } + } + else if (range.from) { + if (dayDate >= new Date(range.from).getTime()) { + match = true; + } + } + else if (range.to) { + if (dayDate <= new Date(range.to).getTime()) { + match = true; + } + } + } + else if (typeof range === 'function') { + match = range(new Date(dayDate)); + } + return match; + }; + // Calendar Methods + p.daysInMonth = function (date) { + var d = new Date(date); + return new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate(); + }; + p.monthHTML = function (date, offset) { + date = new Date(date); + var year = date.getFullYear(), + month = date.getMonth(), + day = date.getDate(); + if (offset === 'next') { + if (month === 11) date = new Date(year + 1, 0); + else date = new Date(year, month + 1, 1); + } + if (offset === 'prev') { + if (month === 0) date = new Date(year - 1, 11); + else date = new Date(year, month - 1, 1); + } + if (offset === 'next' || offset === 'prev') { + month = date.getMonth(); + year = date.getFullYear(); + } + var daysInPrevMonth = p.daysInMonth(new Date(date.getFullYear(), date.getMonth()).getTime() - 10 * 24 * 60 * 60 * 1000), + daysInMonth = p.daysInMonth(date), + firstDayOfMonthIndex = new Date(date.getFullYear(), date.getMonth()).getDay(); + if (firstDayOfMonthIndex === 0) firstDayOfMonthIndex = 7; + + var dayDate, currentValues = [], i, j, k, + rows = 6, cols = 7, + monthHTML = '', + dayIndex = 0 + (p.params.firstDay - 1), + today = new Date().setHours(0,0,0,0), + minDate = p.params.minDate ? new Date(p.params.minDate).getTime() : null, + maxDate = p.params.maxDate ? new Date(p.params.maxDate).getTime() : null, + disabled, + hasEvent; + + if (p.value && p.value.length) { + for (i = 0; i < p.value.length; i++) { + currentValues.push(new Date(p.value[i]).setHours(0,0,0,0)); + } + } + + for (i = 1; i <= rows; i++) { + var rowHTML = ''; + var row = i; + for (j = 1; j <= cols; j++) { + var col = j; + dayIndex ++; + var dayNumber = dayIndex - firstDayOfMonthIndex; + var weekDayIndex = (col - 1 + p.params.firstDay > 6) ? (col - 1 - 7 + p.params.firstDay) : (col - 1 + p.params.firstDay); + var addClass = ''; + if (dayNumber < 0) { + dayNumber = daysInPrevMonth + dayNumber + 1; + addClass += ' picker-calendar-day-prev'; + dayDate = new Date(month - 1 < 0 ? year - 1 : year, month - 1 < 0 ? 11 : month - 1, dayNumber).getTime(); + } + else { + dayNumber = dayNumber + 1; + if (dayNumber > daysInMonth) { + dayNumber = dayNumber - daysInMonth; + addClass += ' picker-calendar-day-next'; + dayDate = new Date(month + 1 > 11 ? year + 1 : year, month + 1 > 11 ? 0 : month + 1, dayNumber).getTime(); + } + else { + dayDate = new Date(year, month, dayNumber).getTime(); + } + } + // Today + if (dayDate === today) addClass += ' picker-calendar-day-today'; + // Selected + if (p.params.rangePicker && currentValues.length === 2) { + if (dayDate >= currentValues[0] && dayDate <= currentValues[1]) addClass += ' picker-calendar-day-selected'; + } + else { + if (currentValues.indexOf(dayDate) >= 0) addClass += ' picker-calendar-day-selected'; + } + // Weekend + if (p.params.weekendDays.indexOf(weekDayIndex) >= 0) { + addClass += ' picker-calendar-day-weekend'; + } + // Has Events + hasEvent = false; + if (p.params.events) { + if (p.dateInRange(dayDate, p.params.events)) { + hasEvent = true; + } + } + if (hasEvent) { + addClass += ' picker-calendar-day-has-events'; + } + // Custom Ranges + if (p.params.rangesClasses) { + for (k = 0; k < p.params.rangesClasses.length; k++) { + if (p.dateInRange(dayDate, p.params.rangesClasses[k].range)) { + addClass += ' ' + p.params.rangesClasses[k].cssClass; + } + } + } + // Disabled + disabled = false; + if ((minDate && dayDate < minDate) || (maxDate && dayDate > maxDate)) { + disabled = true; + } + if (p.params.disabled) { + if (p.dateInRange(dayDate, p.params.disabled)) { + disabled = true; + } + } + if (disabled) { + addClass += ' picker-calendar-day-disabled'; + } + + + dayDate = new Date(dayDate); + var dayYear = dayDate.getFullYear(); + var dayMonth = dayDate.getMonth(); + rowHTML += '
                '+dayNumber+'
                '; + } + monthHTML += '
                ' + rowHTML + '
                '; + } + monthHTML = '
                ' + monthHTML + '
                '; + return monthHTML; + }; + p.animating = false; + p.updateCurrentMonthYear = function (dir) { + if (typeof dir === 'undefined') { + p.currentMonth = parseInt(p.months.eq(1).attr('data-month'), 10); + p.currentYear = parseInt(p.months.eq(1).attr('data-year'), 10); + } + else { + p.currentMonth = parseInt(p.months.eq(dir === 'next' ? (p.months.length - 1) : 0).attr('data-month'), 10); + p.currentYear = parseInt(p.months.eq(dir === 'next' ? (p.months.length - 1) : 0).attr('data-year'), 10); + } + p.container.find('.current-month-value').text(p.params.monthNames[p.currentMonth]); + p.container.find('.current-year-value').text(p.currentYear); + + }; + p.onMonthChangeStart = function (dir) { + p.updateCurrentMonthYear(dir); + p.months.removeClass('picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next'); + var currentIndex = dir === 'next' ? p.months.length - 1 : 0; + + p.months.eq(currentIndex).addClass('picker-calendar-month-current'); + p.months.eq(dir === 'next' ? currentIndex - 1 : currentIndex + 1).addClass(dir === 'next' ? 'picker-calendar-month-prev' : 'picker-calendar-month-next'); + + if (p.params.onMonthYearChangeStart) { + p.params.onMonthYearChangeStart(p, p.currentYear, p.currentMonth); + } + }; + p.onMonthChangeEnd = function (dir, rebuildBoth) { + p.animating = false; + var nextMonthHTML, prevMonthHTML, newMonthHTML; + p.wrapper.find('.picker-calendar-month:not(.picker-calendar-month-prev):not(.picker-calendar-month-current):not(.picker-calendar-month-next)').remove(); + + if (typeof dir === 'undefined') { + dir = 'next'; + rebuildBoth = true; + } + if (!rebuildBoth) { + newMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), dir); + } + else { + p.wrapper.find('.picker-calendar-month-next, .picker-calendar-month-prev').remove(); + prevMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), 'prev'); + nextMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), 'next'); + } + if (dir === 'next' || rebuildBoth) { + p.wrapper.append(newMonthHTML || nextMonthHTML); + } + if (dir === 'prev' || rebuildBoth) { + p.wrapper.prepend(newMonthHTML || prevMonthHTML); + } + p.months = p.wrapper.find('.picker-calendar-month'); + p.setMonthsTranslate(p.monthsTranslate); + if (p.params.onMonthAdd) { + p.params.onMonthAdd(p, dir === 'next' ? p.months.eq(p.months.length - 1)[0] : p.months.eq(0)[0]); + } + if (p.params.onMonthYearChangeEnd) { + p.params.onMonthYearChangeEnd(p, p.currentYear, p.currentMonth); + } + }; + p.setMonthsTranslate = function (translate) { + translate = translate || p.monthsTranslate || 0; + if (typeof p.monthsTranslate === 'undefined') p.monthsTranslate = translate; + p.months.removeClass('picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next'); + var prevMonthTranslate = -(translate + 1) * 100 * inverter; + var currentMonthTranslate = -translate * 100 * inverter; + var nextMonthTranslate = -(translate - 1) * 100 * inverter; + p.months.eq(0).transform('translate3d(' + (p.isH ? prevMonthTranslate : 0) + '%, ' + (p.isH ? 0 : prevMonthTranslate) + '%, 0)').addClass('picker-calendar-month-prev'); + p.months.eq(1).transform('translate3d(' + (p.isH ? currentMonthTranslate : 0) + '%, ' + (p.isH ? 0 : currentMonthTranslate) + '%, 0)').addClass('picker-calendar-month-current'); + p.months.eq(2).transform('translate3d(' + (p.isH ? nextMonthTranslate : 0) + '%, ' + (p.isH ? 0 : nextMonthTranslate) + '%, 0)').addClass('picker-calendar-month-next'); + }; + p.nextMonth = function (transition) { + if (typeof transition === 'undefined' || typeof transition === 'object') { + transition = ''; + if (!p.params.animate) transition = 0; + } + var nextMonth = parseInt(p.months.eq(p.months.length - 1).attr('data-month'), 10); + var nextYear = parseInt(p.months.eq(p.months.length - 1).attr('data-year'), 10); + var nextDate = new Date(nextYear, nextMonth); + var nextDateTime = nextDate.getTime(); + var transitionEndCallback = p.animating ? false : true; + if (p.params.maxDate) { + if (nextDateTime > new Date(p.params.maxDate).getTime()) { + return p.resetMonth(); + } + } + p.monthsTranslate --; + if (nextMonth === p.currentMonth) { + var nextMonthTranslate = -(p.monthsTranslate) * 100 * inverter; + var nextMonthHTML = $(p.monthHTML(nextDateTime, 'next')).transform('translate3d(' + (p.isH ? nextMonthTranslate : 0) + '%, ' + (p.isH ? 0 : nextMonthTranslate) + '%, 0)').addClass('picker-calendar-month-next'); + p.wrapper.append(nextMonthHTML[0]); + p.months = p.wrapper.find('.picker-calendar-month'); + if (p.params.onMonthAdd) { + p.params.onMonthAdd(p, p.months.eq(p.months.length - 1)[0]); + } + } + p.animating = true; + p.onMonthChangeStart('next'); + var translate = (p.monthsTranslate * 100) * inverter; + + p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)'); + if (transitionEndCallback) { + p.wrapper.transitionEnd(function () { + p.onMonthChangeEnd('next'); + }); + } + if (!p.params.animate) { + p.onMonthChangeEnd('next'); + } + }; + p.prevMonth = function (transition) { + if (typeof transition === 'undefined' || typeof transition === 'object') { + transition = ''; + if (!p.params.animate) transition = 0; + } + var prevMonth = parseInt(p.months.eq(0).attr('data-month'), 10); + var prevYear = parseInt(p.months.eq(0).attr('data-year'), 10); + var prevDate = new Date(prevYear, prevMonth + 1, -1); + var prevDateTime = prevDate.getTime(); + var transitionEndCallback = p.animating ? false : true; + if (p.params.minDate) { + if (prevDateTime < new Date(p.params.minDate).getTime()) { + return p.resetMonth(); + } + } + p.monthsTranslate ++; + if (prevMonth === p.currentMonth) { + var prevMonthTranslate = -(p.monthsTranslate) * 100 * inverter; + var prevMonthHTML = $(p.monthHTML(prevDateTime, 'prev')).transform('translate3d(' + (p.isH ? prevMonthTranslate : 0) + '%, ' + (p.isH ? 0 : prevMonthTranslate) + '%, 0)').addClass('picker-calendar-month-prev'); + p.wrapper.prepend(prevMonthHTML[0]); + p.months = p.wrapper.find('.picker-calendar-month'); + if (p.params.onMonthAdd) { + p.params.onMonthAdd(p, p.months.eq(0)[0]); + } + } + p.animating = true; + p.onMonthChangeStart('prev'); + var translate = (p.monthsTranslate * 100) * inverter; + p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)'); + if (transitionEndCallback) { + p.wrapper.transitionEnd(function () { + p.onMonthChangeEnd('prev'); + }); + } + if (!p.params.animate) { + p.onMonthChangeEnd('prev'); + } + }; + p.resetMonth = function (transition) { + if (typeof transition === 'undefined') transition = ''; + var translate = (p.monthsTranslate * 100) * inverter; + p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)'); + }; + p.setYearMonth = function (year, month, transition) { + if (typeof year === 'undefined') year = p.currentYear; + if (typeof month === 'undefined') month = p.currentMonth; + if (typeof transition === 'undefined' || typeof transition === 'object') { + transition = ''; + if (!p.params.animate) transition = 0; + } + var targetDate; + if (year < p.currentYear) { + targetDate = new Date(year, month + 1, -1).getTime(); + } + else { + targetDate = new Date(year, month).getTime(); + } + if (p.params.maxDate && targetDate > new Date(p.params.maxDate).getTime()) { + return false; + } + if (p.params.minDate && targetDate < new Date(p.params.minDate).getTime()) { + return false; + } + var currentDate = new Date(p.currentYear, p.currentMonth).getTime(); + var dir = targetDate > currentDate ? 'next' : 'prev'; + var newMonthHTML = p.monthHTML(new Date(year, month)); + p.monthsTranslate = p.monthsTranslate || 0; + var prevTranslate = p.monthsTranslate; + var monthTranslate, wrapperTranslate; + var transitionEndCallback = p.animating ? false : true; + if (targetDate > currentDate) { + // To next + p.monthsTranslate --; + if (!p.animating) p.months.eq(p.months.length - 1).remove(); + p.wrapper.append(newMonthHTML); + p.months = p.wrapper.find('.picker-calendar-month'); + monthTranslate = -(prevTranslate - 1) * 100 * inverter; + p.months.eq(p.months.length - 1).transform('translate3d(' + (p.isH ? monthTranslate : 0) + '%, ' + (p.isH ? 0 : monthTranslate) + '%, 0)').addClass('picker-calendar-month-next'); + } + else { + // To prev + p.monthsTranslate ++; + if (!p.animating) p.months.eq(0).remove(); + p.wrapper.prepend(newMonthHTML); + p.months = p.wrapper.find('.picker-calendar-month'); + monthTranslate = -(prevTranslate + 1) * 100 * inverter; + p.months.eq(0).transform('translate3d(' + (p.isH ? monthTranslate : 0) + '%, ' + (p.isH ? 0 : monthTranslate) + '%, 0)').addClass('picker-calendar-month-prev'); + } + if (p.params.onMonthAdd) { + p.params.onMonthAdd(p, dir === 'next' ? p.months.eq(p.months.length - 1)[0] : p.months.eq(0)[0]); + } + p.animating = true; + p.onMonthChangeStart(dir); + wrapperTranslate = (p.monthsTranslate * 100) * inverter; + p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? wrapperTranslate : 0) + '%, ' + (p.isH ? 0 : wrapperTranslate) + '%, 0)'); + if (transitionEndCallback) { + p.wrapper.transitionEnd(function () { + p.onMonthChangeEnd(dir, true); + }); + } + if (!p.params.animate) { + p.onMonthChangeEnd(dir); + } + }; + p.nextYear = function () { + p.setYearMonth(p.currentYear + 1); + }; + p.prevYear = function () { + p.setYearMonth(p.currentYear - 1); + }; + + + // HTML Layout + p.layout = function () { + var pickerHTML = ''; + var pickerClass = ''; + var i; + + var layoutDate = p.value && p.value.length ? p.value[0] : new Date().setHours(0,0,0,0); + var prevMonthHTML = p.monthHTML(layoutDate, 'prev'); + var currentMonthHTML = p.monthHTML(layoutDate); + var nextMonthHTML = p.monthHTML(layoutDate, 'next'); + var monthsHTML = '
                ' + (prevMonthHTML + currentMonthHTML + nextMonthHTML) + '
                '; + // Week days header + var weekHeaderHTML = ''; + if (p.params.weekHeader) { + for (i = 0; i < 7; i++) { + var weekDayIndex = (i + p.params.firstDay > 6) ? (i - 7 + p.params.firstDay) : (i + p.params.firstDay); + var dayName = p.params.dayNamesShort[weekDayIndex]; + weekHeaderHTML += '
                ' + dayName + '
                '; + + } + weekHeaderHTML = '
                ' + weekHeaderHTML + '
                '; + } + pickerClass = 'picker-modal picker-calendar' + + (p.params.rangePicker ? ' picker-calendar-range' : '') + + (p.params.cssClass ? ' ' + p.params.cssClass : ''); + var toolbarHTML = p.params.toolbar ? p.params.toolbarTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : ''; + if (p.params.toolbar) { + toolbarHTML = p.params.toolbarTemplate + .replace(/{{closeText}}/g, p.params.toolbarCloseText) + .replace(/{{monthPicker}}/g, (p.params.monthPicker ? p.params.monthPickerTemplate : '')) + .replace(/{{yearPicker}}/g, (p.params.yearPicker ? p.params.yearPickerTemplate : '')); + } + var headerHTML = p.params.header ? p.params.headerTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText).replace(/{{placeholder}}/g, p.params.headerPlaceholder) : ''; + var footerHTML = p.params.footer ? p.params.footerTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : ''; + + pickerHTML = + '
                ' + + headerHTML + + footerHTML + + toolbarHTML + + '
                ' + + weekHeaderHTML + + monthsHTML + + '
                ' + + '
                '; + + + p.pickerHTML = pickerHTML; + }; + + // Input Events + function openOnInput(e) { + e.preventDefault(); + if (p.opened) return; + p.open(); + if (p.params.scrollToInput && !isPopover() && !app.params.material) { + var pageContent = p.input.parents('.page-content'); + if (pageContent.length === 0) return; + + var paddingTop = parseInt(pageContent.css('padding-top'), 10), + paddingBottom = parseInt(pageContent.css('padding-bottom'), 10), + pageHeight = pageContent[0].offsetHeight - paddingTop - p.container.height(), + pageScrollHeight = pageContent[0].scrollHeight - paddingTop - p.container.height(), + newPaddingBottom; + + var inputTop = p.input.offset().top - paddingTop + p.input[0].offsetHeight; + if (inputTop > pageHeight) { + var scrollTop = pageContent.scrollTop() + inputTop - pageHeight; + if (scrollTop + pageHeight > pageScrollHeight) { + newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom; + if (pageHeight === pageScrollHeight) { + newPaddingBottom = p.container.height(); + } + pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'}); + } + pageContent.scrollTop(scrollTop, 300); + } + } + } + function closeOnHTMLClick(e) { + if (inPopover()) return; + if (p.input && p.input.length > 0) { + if (e.target !== p.input[0] && $(e.target).parents('.picker-modal').length === 0) p.close(); + } + else { + if ($(e.target).parents('.picker-modal').length === 0) p.close(); + } + } + + if (p.params.input) { + p.input = $(p.params.input); + if (p.input.length > 0) { + if (p.params.inputReadOnly) p.input.prop('readOnly', true); + if (!p.inline) { + p.input.on('click', openOnInput); + } + if (p.params.inputReadOnly) { + p.input.on('focus mousedown', function (e) { + e.preventDefault(); + }); + } + } + + } + + if (!p.inline && p.params.closeByOutsideClick) $('html').on('click', closeOnHTMLClick); + + // Open + function onPickerClose() { + p.opened = false; + if (p.input && p.input.length > 0) { + p.input.parents('.page-content').css({'padding-bottom': ''}); + if (app.params.material) p.input.trigger('blur'); + } + if (p.params.onClose) p.params.onClose(p); + + // Destroy events + p.destroyCalendarEvents(); + } + + p.opened = false; + p.open = function () { + var toPopover = isPopover(); + var updateValue = false; + if (!p.opened) { + // Set date value + if (!p.value) { + if (p.params.value) { + p.value = p.params.value; + updateValue = true; + } + } + + // Layout + p.layout(); + + // Append + if (toPopover) { + p.pickerHTML = '
                ' + p.pickerHTML + '
                '; + p.popover = app.popover(p.pickerHTML, p.params.input, true); + p.container = $(p.popover).find('.picker-modal'); + $(p.popover).on('popover:close', function () { + onPickerClose(); + }); + } + else if (p.inline) { + p.container = $(p.pickerHTML); + p.container.addClass('picker-modal-inline'); + $(p.params.container).append(p.container); + } + else { + p.container = $(app.pickerModal(p.pickerHTML)); + $(p.container) + .on('picker:close', function () { + onPickerClose(); + }); + } + + // Store calendar instance + p.container[0].f7Calendar = p; + p.wrapper = p.container.find('.picker-calendar-months-wrapper'); + + // Months + p.months = p.wrapper.find('.picker-calendar-month'); + + // Update current month and year + p.updateCurrentMonthYear(); + + // Set initial translate + p.monthsTranslate = 0; + p.setMonthsTranslate(); + + // Init events + p.initCalendarEvents(); + + // Update input value + if (updateValue) p.updateValue(); + else if (app.params.material && p.value) p.updateValue(true); + + // Material Focus + if (p.input && p.input.length > 0 && app.params.material) { + p.input.trigger('focus'); + } + + } + + // Set flag + p.opened = true; + p.initialized = true; + if (p.params.onMonthAdd) { + p.months.each(function () { + p.params.onMonthAdd(p, this); + }); + } + if (p.params.onOpen) p.params.onOpen(p); + }; + + // Close + p.close = function () { + if (!p.opened || p.inline) return; + if (inPopover()) { + app.closeModal(p.popover); + return; + } + else { + app.closeModal(p.container); + return; + } + }; + + // Destroy + p.destroy = function () { + p.close(); + if (p.params.input && p.input.length > 0) { + p.input.off('click focus', openOnInput); + } + $('html').off('click', closeOnHTMLClick); + }; + + if (p.inline) { + p.open(); + } + else { + if (!p.initialized && p.params.value) p.setValue(p.params.value); + } + + return p; + }; + app.calendar = function (params) { + return new Calendar(params); + }; + + + /*====================================================== + ************ Notifications ************ + ======================================================*/ + var _tempNotificationElement; + app.addNotification = function (params) { + if (!params) return; + + if (typeof params.media === 'undefined') params.media = app.params.notificationMedia; + if (typeof params.title === 'undefined') params.title = app.params.notificationTitle; + if (typeof params.subtitle === 'undefined') params.subtitle = app.params.notificationSubtitle; + if (typeof params.closeIcon === 'undefined') params.closeIcon = app.params.notificationCloseIcon; + if (typeof params.hold === 'undefined') params.hold = app.params.notificationHold; + if (typeof params.closeOnClick === 'undefined') params.closeOnClick = app.params.notificationCloseOnClick; + if (typeof params.button === 'undefined') params.button = app.params.notificationCloseButtonText && { + text: app.params.notificationCloseButtonText, + close: true + }; + + if (!_tempNotificationElement) _tempNotificationElement = document.createElement('div'); + + params.material = app.params.material; + + var container = $('.notifications'); + if (container.length === 0) { + app.root.append('
                  '); + container = $('.notifications'); + } + var list = container.children('ul'); + + var notificationTemplate = app.params.notificationTemplate || + '{{#if custom}}' + + '
                • {{custom}}
                • ' + + '{{else}}' + + '
                • ' + + '
                  ' + + '{{#if material}}' + + '
                  ' + + '
                  {{js "this.message || this.title || this.subtitle"}}
                  ' + + '{{#if ../button}}{{#button}}' + + '
                  ' + + '{{text}}' + + '
                  ' + + '{{/button}}{{/if}}' + + '
                  ' + + '{{else}}' + + '{{#if media}}' + + '
                  {{media}}
                  ' + + '{{/if}}' + + '
                  ' + + '
                  ' + + '{{#if title}}' + + '
                  {{title}}
                  ' + + '{{/if}}' + + '{{#if closeIcon}}' + + '
                  ' + + '{{/if}}' + + '
                  ' + + '{{#if subtitle}}' + + '
                  {{subtitle}}
                  ' + + '{{/if}}' + + '{{#if message}}' + + '
                  {{message}}
                  ' + + '
                  ' + + '{{/if}}' + + '{{/if}}' + + '
                  ' + + '
                • ' + + '{{/if}}'; + if (!app._compiledTemplates.notification) { + app._compiledTemplates.notification = t7.compile(notificationTemplate); + } + _tempNotificationElement.innerHTML = app._compiledTemplates.notification(params); + + var item = $(_tempNotificationElement).children(); + + item.on('click', function (e) { + var close = false; + var target = $(e.target); + if (params.material && target.hasClass('button')) { + if (params.button && params.button.onClick) params.button.onClick.call(target[0], e, item[0]); + } + if (target.is('.close-notification') || $(e.target).parents('.close-notification').length > 0) { + close = true; + } + else { + if (params.onClick) params.onClick(e, item[0]); + if (params.closeOnClick) close = true; + } + if (close) app.closeNotification(item[0], e); + }); + if (params.onClose) { + item.data('f7NotificationOnClose', function (e) { + params.onClose(item[0], e); + }); + } + if (params.additionalClass) { + item.addClass(params.additionalClass); + } + if (params.hold) { + setTimeout(function () { + if (item.length > 0) app.closeNotification(item[0]); + }, params.hold); + } + + if (!app.params.material) { + app.closeNotification(list.children('li.notification-item:last-child')); + } + list.append(item[0]); + container.show(); + + var itemHeight = item.outerHeight(), clientLeft; + if (params.material) { + container.transform('translate3d(0, '+itemHeight+'px, 0)'); + container.transition(0); + + clientLeft = item[0].clientLeft; + + container.transform('translate3d(0, 0, 0)'); + container.transition(''); + } + else { + item.transform('translate3d(0,' + (-itemHeight) + 'px,0)'); + item.transition(0); + + clientLeft = item[0].clientLeft; + + item.transition(''); + item.transform('translate3d(0,0px,0)'); + } + + container.transform('translate3d(0, 0,0)'); + item.removeClass('notification-hidden'); + + return item[0]; + }; + app.closeNotification = function (item, event) { + item = $(item); + if (item.length === 0) return; + if (item.hasClass('notification-item-removing')) return; + var container = $('.notifications'); + + var itemHeight = item.outerHeight(); + item.css('height', itemHeight + 'px').transition(0).addClass('notification-item-removing'); + var clientLeft = item[0].clientLeft; + + item.css({ + height: '0px', + marginBottom: '0px' + }).transition(''); + + if (item.data('f7NotificationOnClose')) item.data('f7NotificationOnClose')(event); + + if (container.find('.notification-item:not(.notification-item-removing)').length === 0) { + container.transform(''); + } + + item.addClass('notification-hidden').transitionEnd(function () { + item.remove(); + if (container.find('.notification-item').length === 0) { + container.hide(); + } + }); + }; + + /*=============================================================================== + ************ Data Table ************ + ===============================================================================*/ + app.initDataTable = function (table) { + table = $(table); + var tableHeader = table.find('.data-table-header'); + var tableHeaderSelected = table.find('.data-table-header-selected'); + + // Handle selected + function checkSelectedHeader() { + if (tableHeader.length > 0 && tableHeaderSelected.length > 0) { + var checkedItems = table.find('tbody .checkbox-cell input:checked').length; + table[checkedItems > 0 ? 'addClass' : 'removeClass']('data-table-has-checked'); + tableHeaderSelected.find('.data-table-selected-count').text(checkedItems); + } + } + table.on('change', '.checkbox-cell input[type="checkbox"]', function (e) { + if (e.detail && e.detail._sentByF7DataTable) { + // Scripted event, don't do anything + return; + } + var input = $(this); + var checked = input[0].checked; + if (input.parents('thead').length > 0) { + table + .find('tbody tr')[checked ? 'addClass': 'removeClass']('data-table-row-selected') + .find('input').prop('checked', checked).trigger('change', {_sentByF7DataTable: true}); + } + else { + input.parents('tr')[checked ? 'addClass': 'removeClass']('data-table-row-selected'); + if (!checked) { + table.find('thead .checkbox-cell input[type="checkbox"]').prop('checked', false); + } + else { + // Check for all checked + if (table.find('tbody .checkbox-cell input[type="checkbox"]:checked').length === table.find('tbody tr').length) { + table.find('thead .checkbox-cell input[type="checkbox"]').prop('checked', true).trigger('change', {_sentByF7DataTable: true}); + } + } + } + checkSelectedHeader(); + }); + checkSelectedHeader(); + + // Sortable + table.find('thead .sortable-cell').on('click', function () { + var cell = $(this); + var isActive = cell.hasClass('sortable-active'); + var currentSort; + if (isActive) { + currentSort = cell.hasClass('sortable-desc') ? 'desc' : 'asc'; + cell.removeClass('sortable-desc sortable-asc').addClass('sortable-' + (currentSort === 'desc' ? 'asc' : 'desc')); + } + else { + table.find('thead .sortable-active').removeClass('sortable-active'); + cell.addClass('sortable-active'); + } + }); + + // Collapsible + if (table.hasClass('data-table-collapsible')) { + table.find('tbody td:not(.checkbox-cell)').each(function () { + var index = $(this).index(); + var collpsibleTitle = $(this).attr('data-collapsible-title'); + if (!collpsibleTitle && collpsibleTitle !== '') { + $(this).attr('data-collapsible-title', table.find('thead th').eq(index).text()); + } + }); + } + }; + app.initPageDataTables = function (pageContainer) { + pageContainer = $(pageContainer); + var dataTables = pageContainer.find('.data-table-init'); + if (dataTables.length === 0 && pageContainer.hasClass('data-table-init')) { + dataTables = pageContainer; + } + dataTables.each(function () { + app.initDataTable(this); + }); + }; + + + /*=========================== + Compile Template7 Templates On App Init + ===========================*/ + app.initTemplate7Templates = function () { + if (!window.Template7) return; + Template7.templates = Template7.templates || app.params.templates || {}; + Template7.data = Template7.data || app.params.template7Data || {}; + Template7.cache = Template7.cache || {}; + + app.templates = Template7.templates; + app.template7Data = Template7.data; + app.template7Cache = Template7.cache; + + // Precompile templates on app init + if (!app.params.precompileTemplates) return; + $('script[type="text/template7"]').each(function () { + var id = $(this).attr('id'); + if (!id) return; + Template7.templates[id] = Template7.compile($(this).html()); + }); + }; + + + /*======================================= + ************ Plugins API ************ + =======================================*/ + var _plugins = []; + app.initPlugins = function () { + // Initialize plugins + for (var plugin in app.plugins) { + var p = app.plugins[plugin](app, app.params[plugin]); + if (p) _plugins.push(p); + } + }; + // Plugin Hooks + app.pluginHook = function (hook) { + for (var i = 0; i < _plugins.length; i++) { + if (_plugins[i].hooks && hook in _plugins[i].hooks) { + _plugins[i].hooks[hook](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); + } + } + }; + // Prevented by plugin + app.pluginPrevent = function (action) { + var prevent = false; + for (var i = 0; i < _plugins.length; i++) { + if (_plugins[i].prevents && action in _plugins[i].prevents) { + if (_plugins[i].prevents[action](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5])) prevent = true; + } + } + return prevent; + }; + // Preprocess content by plugin + app.pluginProcess = function (process, data) { + var processed = data; + for (var i = 0; i < _plugins.length; i++) { + if (_plugins[i].preprocess && process in _plugins[i].preprocess) { + processed = _plugins[i].preprocess[process](data, arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]); + } + } + return processed; + }; + + + + /*====================================================== + ************ App Init ************ + ======================================================*/ + app.init = function () { + // Compile Template7 templates on app load + if (app.initTemplate7Templates) app.initTemplate7Templates(); + + // Init Plugins + if (app.initPlugins) app.initPlugins(); + + // Init Device + if (app.getDeviceInfo) app.getDeviceInfo(); + + // Init resize events and calc app sizes + if (app.initResize) app.initResize(); + + // Init Panels Breakpoints + if (app.initPanelsBreakpoints && (app.params.panelLeftBreakpoint || app.params.panelRightBreakpoint)) app.initPanelsBreakpoints(); + + // Init Click events + if (app.initFastClicks && app.params.fastClicks) app.initFastClicks(); + if (app.initClickEvents) app.initClickEvents(); + + // Init each page callbacks + $('.page:not(.cached)').each(function () { + app.initPageWithCallback(this); + }); + + // Init each navbar callbacks + $('.navbar:not(.cached)').each(function () { + app.initNavbarWithCallback(this); + }); + + // Init push state + if (app.initPushState && app.params.pushState) app.initPushState(); + + // Init Live Swipeouts events + if (app.initSwipeout && app.params.swipeout) app.initSwipeout(); + + // Init Live Sortable events + if (app.initSortable && app.params.sortable) app.initSortable(); + + // Init Live Swipe Panels + if (app.initSwipePanels && (app.params.swipePanel || app.params.swipePanelOnlyClose)) app.initSwipePanels(); + + // Init Material Inputs + if (app.params.material && app.initMaterialWatchInputs) app.initMaterialWatchInputs(); + + // Init Material Tabbar + if (app.params.material) { + $('.tabbar').each(function (index, el) { + if ($(el).parents('.page').length === 0) { + app.initMaterialTabbar(el); + } + }); + } + + // App Init callback + if (app.params.onAppInit) app.params.onAppInit(); + + // Plugin app init hook + app.pluginHook('appInit'); + }; + if (app.params.init) app.init(); + + + //Return instance + return app; + }; + + // Save Dom7 + Framework7.$ = window.Dom7; + + + /*=========================== + Features Support Detection + ===========================*/ + Framework7.prototype.support = (function () { + var support = { + touch: !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch), + passiveListener: (function () { + var supportsPassive = false; + try { + var opts = Object.defineProperty({}, 'passive', { + get: function() { + supportsPassive = true; + } + }); + window.addEventListener('testPassiveListener', null, opts); + } catch (e) {} + return supportsPassive; + })() + }; + + // Export object + return support; + })(); + + + /*=========================== + Device/OS Detection + ===========================*/ + Framework7.prototype.device = (function () { + var device = {}; + var ua = navigator.userAgent; + var $ = Dom7; + + var windows = ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/); + var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); + var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); + var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); + var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); + + device.ios = device.android = device.windows = device.iphone = device.ipod = device.ipad = device.androidChrome = false; + + // Windows + if (windows) { + device.os = 'windows'; + device.osVersion = windows[2]; + device.windows = true; + } + // Android + if (android && !windows) { + device.os = 'android'; + device.osVersion = android[2]; + device.android = true; + device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0; + } + if (ipad || iphone || ipod) { + device.os = 'ios'; + device.ios = true; + } + // iOS + if (iphone && !ipod) { + device.osVersion = iphone[2].replace(/_/g, '.'); + device.iphone = true; + } + if (ipad) { + device.osVersion = ipad[2].replace(/_/g, '.'); + device.ipad = true; + } + if (ipod) { + device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null; + device.iphone = true; + } + // iOS 8+ changed UA + if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) { + if (device.osVersion.split('.')[0] === '10') { + device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0]; + } + } + + // Webview + device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i); + + // Minimal UI + if (device.os && device.os === 'ios') { + var osVersionArr = device.osVersion.split('.'); + device.minimalUi = !device.webView && + (ipod || iphone) && + (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7) && + $('meta[name="viewport"]').length > 0 && $('meta[name="viewport"]').attr('content').indexOf('minimal-ui') >= 0; + } + + // Check for status bar and fullscreen app mode + var windowWidth = $(window).width(); + var windowHeight = $(window).height(); + + device.needsStatusBar = function () { + if (device.webView && (windowWidth * windowHeight === screen.width * screen.height)) { + return true; + } + return false; + }; + device.statusBar = device.needsStatusBar(); + + // Classes + var classNames = []; + + // Pixel Ratio + device.pixelRatio = window.devicePixelRatio || 1; + classNames.push('pixel-ratio-' + Math.floor(device.pixelRatio)); + if (device.pixelRatio >= 2) { + classNames.push('retina'); + } + + // OS classes + if (device.os) { + classNames.push(device.os, device.os + '-' + device.osVersion.split('.')[0], device.os + '-' + device.osVersion.replace(/\./g, '-')); + if (device.os === 'ios') { + var major = parseInt(device.osVersion.split('.')[0], 10); + for (var i = major - 1; i >= 6; i--) { + classNames.push('ios-gt-' + i); + } + } + + } + // Status bar classes + if (device.statusBar) { + classNames.push('with-statusbar-overlay'); + } + else { + $('html').removeClass('with-statusbar-overlay'); + } + + // Add html classes + if (classNames.length > 0) $('html').addClass(classNames.join(' ')); + + // Export object + return device; + })(); + + + /*=========================== + Plugins prototype + ===========================*/ + Framework7.prototype.plugins = {}; + + + /*=========================== + Swiper + ===========================*/ + window.Swiper = function (container, params) { + if (!(this instanceof Swiper)) return new Swiper(container, params); + + var defaults = { + direction: 'horizontal', + touchEventsTarget: 'container', + initialSlide: 0, + speed: 300, + // autoplay + autoplay: false, + autoplayDisableOnInteraction: true, + autoplayStopOnLast: false, + // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView). + iOSEdgeSwipeDetection: false, + iOSEdgeSwipeThreshold: 20, + // Free mode + freeMode: false, + freeModeMomentum: true, + freeModeMomentumRatio: 1, + freeModeMomentumBounce: true, + freeModeMomentumBounceRatio: 1, + freeModeMomentumVelocityRatio: 1, + freeModeSticky: false, + freeModeMinimumVelocity: 0.02, + // Autoheight + autoHeight: false, + // Set wrapper width + setWrapperSize: false, + // Virtual Translate + virtualTranslate: false, + // Effects + effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' + coverflow: { + rotate: 50, + stretch: 0, + depth: 100, + modifier: 1, + slideShadows : true + }, + flip: { + slideShadows : true, + limitRotation: true + }, + cube: { + slideShadows: true, + shadow: true, + shadowOffset: 20, + shadowScale: 0.94 + }, + fade: { + crossFade: false + }, + // Parallax + parallax: false, + // Zoom + zoom: false, + zoomMax: 3, + zoomMin: 1, + zoomToggle: true, + // Scrollbar + scrollbar: null, + scrollbarHide: true, + scrollbarDraggable: false, + scrollbarSnapOnRelease: false, + // Keyboard Mousewheel + keyboardControl: false, + mousewheelControl: false, + mousewheelReleaseOnEdges: false, + mousewheelInvert: false, + mousewheelForceToAxis: false, + mousewheelSensitivity: 1, + mousewheelEventsTarged: 'container', + // Hash Navigation + hashnav: false, + hashnavWatchState: false, + // History + history: false, + // Commong Nav State + replaceState: false, + // Breakpoints + breakpoints: undefined, + // Slides grid + spaceBetween: 0, + slidesPerView: 1, + slidesPerColumn: 1, + slidesPerColumnFill: 'column', + slidesPerGroup: 1, + centeredSlides: false, + slidesOffsetBefore: 0, // in px + slidesOffsetAfter: 0, // in px + // Round length + roundLengths: false, + // Touches + touchRatio: 1, + touchAngle: 45, + simulateTouch: true, + shortSwipes: true, + longSwipes: true, + longSwipesRatio: 0.5, + longSwipesMs: 300, + followFinger: true, + onlyExternal: false, + threshold: 0, + touchMoveStopPropagation: true, + touchReleaseOnEdges: false, + // Unique Navigation Elements + uniqueNavElements: true, + // Pagination + pagination: null, + paginationElement: 'span', + paginationClickable: false, + paginationHide: false, + paginationBulletRender: null, + paginationProgressRender: null, + paginationFractionRender: null, + paginationCustomRender: null, + paginationType: 'bullets', // 'bullets' or 'progress' or 'fraction' or 'custom' + // Resistance + resistance: true, + resistanceRatio: 0.85, + // Next/prev buttons + nextButton: null, + prevButton: null, + // Progress + watchSlidesProgress: false, + watchSlidesVisibility: false, + // Cursor + grabCursor: false, + // Clicks + preventClicks: true, + preventClicksPropagation: true, + slideToClickedSlide: false, + // Lazy Loading + lazyLoading: false, + lazyLoadingInPrevNext: false, + lazyLoadingInPrevNextAmount: 1, + lazyLoadingOnTransitionStart: false, + // Images + preloadImages: true, + updateOnImagesReady: true, + // loop + loop: false, + loopAdditionalSlides: 0, + loopedSlides: null, + // Control + control: undefined, + controlInverse: false, + controlBy: 'slide', //or 'container' + normalizeSlideIndex: true, + // Swiping/no swiping + allowSwipeToPrev: true, + allowSwipeToNext: true, + swipeHandler: null, //'.swipe-handler', + noSwiping: true, + noSwipingClass: 'swiper-no-swiping', + // Passive Listeners + passiveListeners: true, + // NS + containerModifierClass: 'swiper-container-', // NEW + slideClass: 'swiper-slide', + slideActiveClass: 'swiper-slide-active', + slideDuplicateActiveClass: 'swiper-slide-duplicate-active', + slideVisibleClass: 'swiper-slide-visible', + slideDuplicateClass: 'swiper-slide-duplicate', + slideNextClass: 'swiper-slide-next', + slideDuplicateNextClass: 'swiper-slide-duplicate-next', + slidePrevClass: 'swiper-slide-prev', + slideDuplicatePrevClass: 'swiper-slide-duplicate-prev', + wrapperClass: 'swiper-wrapper', + bulletClass: 'swiper-pagination-bullet', + bulletActiveClass: 'swiper-pagination-bullet-active', + buttonDisabledClass: 'swiper-button-disabled', + paginationCurrentClass: 'swiper-pagination-current', + paginationTotalClass: 'swiper-pagination-total', + paginationHiddenClass: 'swiper-pagination-hidden', + paginationProgressbarClass: 'swiper-pagination-progressbar', + paginationClickableClass: 'swiper-pagination-clickable', // NEW + paginationModifierClass: 'swiper-pagination-', // NEW + lazyLoadingClass: 'swiper-lazy', + lazyStatusLoadingClass: 'swiper-lazy-loading', + lazyStatusLoadedClass: 'swiper-lazy-loaded', + lazyPreloaderClass: 'swiper-lazy-preloader', + notificationClass: 'swiper-notification', + preloaderClass: 'preloader', + zoomContainerClass: 'swiper-zoom-container', + + // Observer + observer: false, + observeParents: false, + // Accessibility + a11y: false, + prevSlideMessage: 'Previous slide', + nextSlideMessage: 'Next slide', + firstSlideMessage: 'This is the first slide', + lastSlideMessage: 'This is the last slide', + paginationBulletMessage: 'Go to slide {{index}}', + // Callbacks + runCallbacksOnInit: true + /* + Callbacks: + onInit: function (swiper) + onDestroy: function (swiper) + onBeforeResize: function (swiper) + onAfterResize: function (swiper) + onClick: function (swiper, e) + onTap: function (swiper, e) + onDoubleTap: function (swiper, e) + onSliderMove: function (swiper, e) + onSlideChangeStart: function (swiper) + onSlideChangeEnd: function (swiper) + onTransitionStart: function (swiper) + onTransitionEnd: function (swiper) + onImagesReady: function (swiper) + onProgress: function (swiper, progress) + onTouchStart: function (swiper, e) + onTouchMove: function (swiper, e) + onTouchMoveOpposite: function (swiper, e) + onTouchEnd: function (swiper, e) + onReachBeginning: function (swiper) + onReachEnd: function (swiper) + onSetTransition: function (swiper, duration) + onSetTranslate: function (swiper, translate) + onAutoplayStart: function (swiper) + onAutoplayStop: function (swiper), + onLazyImageLoad: function (swiper, slide, image) + onLazyImageReady: function (swiper, slide, image) + onKeyPress: function (swiper, keyCode) + */ + + }; + var initialVirtualTranslate = params && params.virtualTranslate; + + params = params || {}; + var originalParams = {}; + for (var param in params) { + if (typeof params[param] === 'object' && params[param] !== null && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) { + originalParams[param] = {}; + for (var deepParam in params[param]) { + originalParams[param][deepParam] = params[param][deepParam]; + } + } + else { + originalParams[param] = params[param]; + } + } + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + else if (typeof params[def] === 'object') { + for (var deepDef in defaults[def]) { + if (typeof params[def][deepDef] === 'undefined') { + params[def][deepDef] = defaults[def][deepDef]; + } + } + } + } + + // Swiper + var s = this; + + // Params + s.params = params; + s.originalParams = originalParams; + + // Classname + s.classNames = []; + /*========================= + Dom Library and plugins + ===========================*/ + var $ = $; + if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){ + $ = Dom7; + } + if (typeof $ === 'undefined') { + if (typeof Dom7 === 'undefined') { + $ = window.Dom7 || window.Zepto || window.jQuery; + } + else { + $ = Dom7; + } + if (!$) return; + } + // Export it to Swiper instance + s.$ = $; + + /*========================= + Breakpoints + ===========================*/ + s.currentBreakpoint = undefined; + s.getActiveBreakpoint = function () { + //Get breakpoint for window width + if (!s.params.breakpoints) return false; + var breakpoint = false; + var points = [], point; + for ( point in s.params.breakpoints ) { + if (s.params.breakpoints.hasOwnProperty(point)) { + points.push(point); + } + } + points.sort(function (a, b) { + return parseInt(a, 10) > parseInt(b, 10); + }); + for (var i = 0; i < points.length; i++) { + point = points[i]; + if (point >= window.innerWidth && !breakpoint) { + breakpoint = point; + } + } + return breakpoint || 'max'; + }; + s.setBreakpoint = function () { + //Set breakpoint for window width and update parameters + var breakpoint = s.getActiveBreakpoint(); + if (breakpoint && s.currentBreakpoint !== breakpoint) { + var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams; + var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView); + for ( var param in breakPointsParams ) { + s.params[param] = breakPointsParams[param]; + } + s.currentBreakpoint = breakpoint; + if(needsReLoop && s.destroyLoop) { + s.reLoop(true); + } + } + }; + // Set breakpoint on load + if (s.params.breakpoints) { + s.setBreakpoint(); + } + + /*========================= + Preparation - Define Container, Wrapper and Pagination + ===========================*/ + s.container = $(container); + if (s.container.length === 0) return; + if (s.container.length > 1) { + var swipers = []; + s.container.each(function () { + var container = this; + swipers.push(new Swiper(this, params)); + }); + return swipers; + } + + // Save instance in container HTML Element and in data + s.container[0].swiper = s; + s.container.data('swiper', s); + + s.classNames.push(s.params.containerModifierClass + s.params.direction); + + if (s.params.freeMode) { + s.classNames.push(s.params.containerModifierClass + 'free-mode'); + } + if (!s.support.flexbox) { + s.classNames.push(s.params.containerModifierClass + 'no-flexbox'); + s.params.slidesPerColumn = 1; + } + if (s.params.autoHeight) { + s.classNames.push(s.params.containerModifierClass + 'autoheight'); + } + // Enable slides progress when required + if (s.params.parallax || s.params.watchSlidesVisibility) { + s.params.watchSlidesProgress = true; + } + // Max resistance when touchReleaseOnEdges + if (s.params.touchReleaseOnEdges) { + s.params.resistanceRatio = 0; + } + // Coverflow / 3D + if (['cube', 'coverflow', 'flip'].indexOf(s.params.effect) >= 0) { + if (s.support.transforms3d) { + s.params.watchSlidesProgress = true; + s.classNames.push(s.params.containerModifierClass + '3d'); + } + else { + s.params.effect = 'slide'; + } + } + if (s.params.effect !== 'slide') { + s.classNames.push(s.params.containerModifierClass + s.params.effect); + } + if (s.params.effect === 'cube') { + s.params.resistanceRatio = 0; + s.params.slidesPerView = 1; + s.params.slidesPerColumn = 1; + s.params.slidesPerGroup = 1; + s.params.centeredSlides = false; + s.params.spaceBetween = 0; + s.params.virtualTranslate = true; + } + if (s.params.effect === 'fade' || s.params.effect === 'flip') { + s.params.slidesPerView = 1; + s.params.slidesPerColumn = 1; + s.params.slidesPerGroup = 1; + s.params.watchSlidesProgress = true; + s.params.spaceBetween = 0; + if (typeof initialVirtualTranslate === 'undefined') { + s.params.virtualTranslate = true; + } + } + + // Grab Cursor + if (s.params.grabCursor && s.support.touch) { + s.params.grabCursor = false; + } + + // Wrapper + s.wrapper = s.container.children('.' + s.params.wrapperClass); + + // Pagination + if (s.params.pagination) { + s.paginationContainer = $(s.params.pagination); + if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) { + s.paginationContainer = s.container.find(s.params.pagination); + } + + if (s.params.paginationType === 'bullets' && s.params.paginationClickable) { + s.paginationContainer.addClass(s.params.paginationModifierClass + 'clickable'); + } + else { + s.params.paginationClickable = false; + } + s.paginationContainer.addClass(s.params.paginationModifierClass + s.params.paginationType); + } + // Next/Prev Buttons + if (s.params.nextButton || s.params.prevButton) { + if (s.params.nextButton) { + s.nextButton = $(s.params.nextButton); + if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) { + s.nextButton = s.container.find(s.params.nextButton); + } + } + if (s.params.prevButton) { + s.prevButton = $(s.params.prevButton); + if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) { + s.prevButton = s.container.find(s.params.prevButton); + } + } + } + + // Is Horizontal + s.isHorizontal = function () { + return s.params.direction === 'horizontal'; + }; + // s.isH = isH; + + // RTL + s.rtl = s.isHorizontal() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl'); + if (s.rtl) { + s.classNames.push(s.params.containerModifierClass + 'rtl'); + } + + // Wrong RTL support + if (s.rtl) { + s.wrongRTL = s.wrapper.css('display') === '-webkit-box'; + } + + // Columns + if (s.params.slidesPerColumn > 1) { + s.classNames.push(s.params.containerModifierClass + 'multirow'); + } + + // Check for Android + if (s.device.android) { + s.classNames.push(s.params.containerModifierClass + 'android'); + } + + // Add classes + s.container.addClass(s.classNames.join(' ')); + + // Translate + s.translate = 0; + + // Progress + s.progress = 0; + + // Velocity + s.velocity = 0; + + /*========================= + Locks, unlocks + ===========================*/ + s.lockSwipeToNext = function () { + s.params.allowSwipeToNext = false; + if (s.params.allowSwipeToPrev === false && s.params.grabCursor) { + s.unsetGrabCursor(); + } + }; + s.lockSwipeToPrev = function () { + s.params.allowSwipeToPrev = false; + if (s.params.allowSwipeToNext === false && s.params.grabCursor) { + s.unsetGrabCursor(); + } + }; + s.lockSwipes = function () { + s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false; + if (s.params.grabCursor) s.unsetGrabCursor(); + }; + s.unlockSwipeToNext = function () { + s.params.allowSwipeToNext = true; + if (s.params.allowSwipeToPrev === true && s.params.grabCursor) { + s.setGrabCursor(); + } + }; + s.unlockSwipeToPrev = function () { + s.params.allowSwipeToPrev = true; + if (s.params.allowSwipeToNext === true && s.params.grabCursor) { + s.setGrabCursor(); + } + }; + s.unlockSwipes = function () { + s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true; + if (s.params.grabCursor) s.setGrabCursor(); + }; + + /*========================= + Round helper + ===========================*/ + function round(a) { + return Math.floor(a); + } + /*========================= + Set grab cursor + ===========================*/ + s.setGrabCursor = function(moving) { + s.container[0].style.cursor = 'move'; + s.container[0].style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab'; + s.container[0].style.cursor = moving ? '-moz-grabbin' : '-moz-grab'; + s.container[0].style.cursor = moving ? 'grabbing': 'grab'; + }; + s.unsetGrabCursor = function () { + s.container[0].style.cursor = ''; + }; + if (s.params.grabCursor) { + s.setGrabCursor(); + } + /*========================= + Update on Images Ready + ===========================*/ + s.imagesToLoad = []; + s.imagesLoaded = 0; + + s.loadImage = function (imgElement, src, srcset, sizes, checkForComplete, callback) { + var image; + function onReady () { + if (callback) callback(); + } + if (!imgElement.complete || !checkForComplete) { + if (src) { + image = new window.Image(); + image.onload = onReady; + image.onerror = onReady; + if (sizes) { + image.sizes = sizes; + } + if (srcset) { + image.srcset = srcset; + } + if (src) { + image.src = src; + } + } else { + onReady(); + } + + } else {//image already loaded... + onReady(); + } + }; + s.preloadImages = function () { + s.imagesToLoad = s.container.find('img'); + function _onReady() { + if (typeof s === 'undefined' || s === null || !s) return; + if (s.imagesLoaded !== undefined) s.imagesLoaded++; + if (s.imagesLoaded === s.imagesToLoad.length) { + if (s.params.updateOnImagesReady) s.update(); + s.emit('onImagesReady', s); + } + } + for (var i = 0; i < s.imagesToLoad.length; i++) { + s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), s.imagesToLoad[i].sizes || s.imagesToLoad[i].getAttribute('sizes'), true, _onReady); + } + }; + + /*========================= + Autoplay + ===========================*/ + s.autoplayTimeoutId = undefined; + s.autoplaying = false; + s.autoplayPaused = false; + function autoplay() { + var autoplayDelay = s.params.autoplay; + var activeSlide = s.slides.eq(s.activeIndex); + if (activeSlide.attr('data-swiper-autoplay')) { + autoplayDelay = activeSlide.attr('data-swiper-autoplay') || s.params.autoplay; + } + s.autoplayTimeoutId = setTimeout(function () { + if (s.params.loop) { + s.fixLoop(); + s._slideNext(); + s.emit('onAutoplay', s); + } + else { + if (!s.isEnd) { + s._slideNext(); + s.emit('onAutoplay', s); + } + else { + if (!params.autoplayStopOnLast) { + s._slideTo(0); + s.emit('onAutoplay', s); + } + else { + s.stopAutoplay(); + } + } + } + }, autoplayDelay); + } + s.startAutoplay = function () { + if (typeof s.autoplayTimeoutId !== 'undefined') return false; + if (!s.params.autoplay) return false; + if (s.autoplaying) return false; + s.autoplaying = true; + s.emit('onAutoplayStart', s); + autoplay(); + }; + s.stopAutoplay = function (internal) { + if (!s.autoplayTimeoutId) return; + if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId); + s.autoplaying = false; + s.autoplayTimeoutId = undefined; + s.emit('onAutoplayStop', s); + }; + s.pauseAutoplay = function (speed) { + if (s.autoplayPaused) return; + if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId); + s.autoplayPaused = true; + if (speed === 0) { + s.autoplayPaused = false; + autoplay(); + } + else { + s.wrapper.transitionEnd(function () { + if (!s) return; + s.autoplayPaused = false; + if (!s.autoplaying) { + s.stopAutoplay(); + } + else { + autoplay(); + } + }); + } + }; + /*========================= + Min/Max Translate + ===========================*/ + s.minTranslate = function () { + return (-s.snapGrid[0]); + }; + s.maxTranslate = function () { + return (-s.snapGrid[s.snapGrid.length - 1]); + }; + /*========================= + Slider/slides sizes + ===========================*/ + s.updateAutoHeight = function () { + var activeSlides = []; + var newHeight = 0; + var i; + + // Find slides currently in view + if(s.params.slidesPerView !== 'auto' && s.params.slidesPerView > 1) { + for (i = 0; i < Math.ceil(s.params.slidesPerView); i++) { + var index = s.activeIndex + i; + if(index > s.slides.length) break; + activeSlides.push(s.slides.eq(index)[0]); + } + } else { + activeSlides.push(s.slides.eq(s.activeIndex)[0]); + } + + // Find new height from heighest slide in view + for (i = 0; i < activeSlides.length; i++) { + if (typeof activeSlides[i] !== 'undefined') { + var height = activeSlides[i].offsetHeight; + newHeight = height > newHeight ? height : newHeight; + } + } + + // Update Height + if (newHeight) s.wrapper.css('height', newHeight + 'px'); + }; + s.updateContainerSize = function () { + var width, height; + if (typeof s.params.width !== 'undefined') { + width = s.params.width; + } + else { + width = s.container[0].clientWidth; + } + if (typeof s.params.height !== 'undefined') { + height = s.params.height; + } + else { + height = s.container[0].clientHeight; + } + if (width === 0 && s.isHorizontal() || height === 0 && !s.isHorizontal()) { + return; + } + + //Subtract paddings + width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10); + height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10); + + // Store values + s.width = width; + s.height = height; + s.size = s.isHorizontal() ? s.width : s.height; + }; + + s.updateSlidesSize = function () { + s.slides = s.wrapper.children('.' + s.params.slideClass); + s.snapGrid = []; + s.slidesGrid = []; + s.slidesSizesGrid = []; + + var spaceBetween = s.params.spaceBetween, + slidePosition = -s.params.slidesOffsetBefore, + i, + prevSlideSize = 0, + index = 0; + if (typeof s.size === 'undefined') return; + if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { + spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size; + } + + s.virtualSize = -spaceBetween; + // reset margins + if (s.rtl) s.slides.css({marginLeft: '', marginTop: ''}); + else s.slides.css({marginRight: '', marginBottom: ''}); + + var slidesNumberEvenToRows; + if (s.params.slidesPerColumn > 1) { + if (Math.floor(s.slides.length / s.params.slidesPerColumn) === s.slides.length / s.params.slidesPerColumn) { + slidesNumberEvenToRows = s.slides.length; + } + else { + slidesNumberEvenToRows = Math.ceil(s.slides.length / s.params.slidesPerColumn) * s.params.slidesPerColumn; + } + if (s.params.slidesPerView !== 'auto' && s.params.slidesPerColumnFill === 'row') { + slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, s.params.slidesPerView * s.params.slidesPerColumn); + } + } + + // Calc slides + var slideSize; + var slidesPerColumn = s.params.slidesPerColumn; + var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn; + var numFullColumns = slidesPerRow - (s.params.slidesPerColumn * slidesPerRow - s.slides.length); + for (i = 0; i < s.slides.length; i++) { + slideSize = 0; + var slide = s.slides.eq(i); + if (s.params.slidesPerColumn > 1) { + // Set slides order + var newSlideOrderIndex; + var column, row; + if (s.params.slidesPerColumnFill === 'column') { + column = Math.floor(i / slidesPerColumn); + row = i - column * slidesPerColumn; + if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn-1)) { + if (++row >= slidesPerColumn) { + row = 0; + column++; + } + } + newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn; + slide + .css({ + '-webkit-box-ordinal-group': newSlideOrderIndex, + '-moz-box-ordinal-group': newSlideOrderIndex, + '-ms-flex-order': newSlideOrderIndex, + '-webkit-order': newSlideOrderIndex, + 'order': newSlideOrderIndex + }); + } + else { + row = Math.floor(i / slidesPerRow); + column = i - row * slidesPerRow; + } + slide + .css( + 'margin-' + (s.isHorizontal() ? 'top' : 'left'), + (row !== 0 && s.params.spaceBetween) && (s.params.spaceBetween + 'px') + ) + .attr('data-swiper-column', column) + .attr('data-swiper-row', row); + + } + if (slide.css('display') === 'none') continue; + if (s.params.slidesPerView === 'auto') { + slideSize = s.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true); + if (s.params.roundLengths) slideSize = round(slideSize); + } + else { + slideSize = (s.size - (s.params.slidesPerView - 1) * spaceBetween) / s.params.slidesPerView; + if (s.params.roundLengths) slideSize = round(slideSize); + + if (s.isHorizontal()) { + s.slides[i].style.width = slideSize + 'px'; + } + else { + s.slides[i].style.height = slideSize + 'px'; + } + } + s.slides[i].swiperSlideSize = slideSize; + s.slidesSizesGrid.push(slideSize); + + + if (s.params.centeredSlides) { + slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; + if(prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - s.size / 2 - spaceBetween; + if (i === 0) slidePosition = slidePosition - s.size / 2 - spaceBetween; + if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0; + if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition); + s.slidesGrid.push(slidePosition); + } + else { + if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition); + s.slidesGrid.push(slidePosition); + slidePosition = slidePosition + slideSize + spaceBetween; + } + + s.virtualSize += slideSize + spaceBetween; + + prevSlideSize = slideSize; + + index ++; + } + s.virtualSize = Math.max(s.virtualSize, s.size) + s.params.slidesOffsetAfter; + var newSlidesGrid; + + if ( + s.rtl && s.wrongRTL && (s.params.effect === 'slide' || s.params.effect === 'coverflow')) { + s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'}); + } + if (!s.support.flexbox || s.params.setWrapperSize) { + if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'}); + else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'}); + } + + if (s.params.slidesPerColumn > 1) { + s.virtualSize = (slideSize + s.params.spaceBetween) * slidesNumberEvenToRows; + s.virtualSize = Math.ceil(s.virtualSize / s.params.slidesPerColumn) - s.params.spaceBetween; + if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'}); + else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'}); + if (s.params.centeredSlides) { + newSlidesGrid = []; + for (i = 0; i < s.snapGrid.length; i++) { + if (s.snapGrid[i] < s.virtualSize + s.snapGrid[0]) newSlidesGrid.push(s.snapGrid[i]); + } + s.snapGrid = newSlidesGrid; + } + } + + // Remove last grid elements depending on width + if (!s.params.centeredSlides) { + newSlidesGrid = []; + for (i = 0; i < s.snapGrid.length; i++) { + if (s.snapGrid[i] <= s.virtualSize - s.size) { + newSlidesGrid.push(s.snapGrid[i]); + } + } + s.snapGrid = newSlidesGrid; + if (Math.floor(s.virtualSize - s.size) - Math.floor(s.snapGrid[s.snapGrid.length - 1]) > 1) { + s.snapGrid.push(s.virtualSize - s.size); + } + } + if (s.snapGrid.length === 0) s.snapGrid = [0]; + + if (s.params.spaceBetween !== 0) { + if (s.isHorizontal()) { + if (s.rtl) s.slides.css({marginLeft: spaceBetween + 'px'}); + else s.slides.css({marginRight: spaceBetween + 'px'}); + } + else s.slides.css({marginBottom: spaceBetween + 'px'}); + } + if (s.params.watchSlidesProgress) { + s.updateSlidesOffset(); + } + }; + s.updateSlidesOffset = function () { + for (var i = 0; i < s.slides.length; i++) { + s.slides[i].swiperSlideOffset = s.isHorizontal() ? s.slides[i].offsetLeft : s.slides[i].offsetTop; + } + }; + + /*========================= + Dynamic Slides Per View + ===========================*/ + s.currentSlidesPerView = function () { + var spv = 1, i, j; + if (s.params.centeredSlides) { + var size = s.slides[s.activeIndex].swiperSlideSize; + var breakLoop; + for (i = s.activeIndex + 1; i < s.slides.length; i++) { + if (s.slides[i] && !breakLoop) { + size += s.slides[i].swiperSlideSize; + spv ++; + if (size > s.size) breakLoop = true; + } + } + for (j = s.activeIndex - 1; j >= 0; j--) { + if (s.slides[j] && !breakLoop) { + size += s.slides[j].swiperSlideSize; + spv ++; + if (size > s.size) breakLoop = true; + } + } + } + else { + for (i = s.activeIndex + 1; i < s.slides.length; i++) { + if (s.slidesGrid[i] - s.slidesGrid[s.activeIndex] < s.size) { + spv++; + } + } + } + return spv; + }; + /*========================= + Slider/slides progress + ===========================*/ + s.updateSlidesProgress = function (translate) { + if (typeof translate === 'undefined') { + translate = s.translate || 0; + } + if (s.slides.length === 0) return; + if (typeof s.slides[0].swiperSlideOffset === 'undefined') s.updateSlidesOffset(); + + var offsetCenter = -translate; + if (s.rtl) offsetCenter = translate; + + // Visible Slides + s.slides.removeClass(s.params.slideVisibleClass); + for (var i = 0; i < s.slides.length; i++) { + var slide = s.slides[i]; + var slideProgress = (offsetCenter + (s.params.centeredSlides ? s.minTranslate() : 0) - slide.swiperSlideOffset) / (slide.swiperSlideSize + s.params.spaceBetween); + if (s.params.watchSlidesVisibility) { + var slideBefore = -(offsetCenter - slide.swiperSlideOffset); + var slideAfter = slideBefore + s.slidesSizesGrid[i]; + var isVisible = + (slideBefore >= 0 && slideBefore < s.size) || + (slideAfter > 0 && slideAfter <= s.size) || + (slideBefore <= 0 && slideAfter >= s.size); + if (isVisible) { + s.slides.eq(i).addClass(s.params.slideVisibleClass); + } + } + slide.progress = s.rtl ? -slideProgress : slideProgress; + } + }; + s.updateProgress = function (translate) { + if (typeof translate === 'undefined') { + translate = s.translate || 0; + } + var translatesDiff = s.maxTranslate() - s.minTranslate(); + var wasBeginning = s.isBeginning; + var wasEnd = s.isEnd; + if (translatesDiff === 0) { + s.progress = 0; + s.isBeginning = s.isEnd = true; + } + else { + s.progress = (translate - s.minTranslate()) / (translatesDiff); + s.isBeginning = s.progress <= 0; + s.isEnd = s.progress >= 1; + } + if (s.isBeginning && !wasBeginning) s.emit('onReachBeginning', s); + if (s.isEnd && !wasEnd) s.emit('onReachEnd', s); + + if (s.params.watchSlidesProgress) s.updateSlidesProgress(translate); + s.emit('onProgress', s, s.progress); + }; + s.updateActiveIndex = function () { + var translate = s.rtl ? s.translate : -s.translate; + var newActiveIndex, i, snapIndex; + for (i = 0; i < s.slidesGrid.length; i ++) { + if (typeof s.slidesGrid[i + 1] !== 'undefined') { + if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1] - (s.slidesGrid[i + 1] - s.slidesGrid[i]) / 2) { + newActiveIndex = i; + } + else if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1]) { + newActiveIndex = i + 1; + } + } + else { + if (translate >= s.slidesGrid[i]) { + newActiveIndex = i; + } + } + } + // Normalize slideIndex + if(s.params.normalizeSlideIndex){ + if (newActiveIndex < 0 || typeof newActiveIndex === 'undefined') newActiveIndex = 0; + } + // for (i = 0; i < s.slidesGrid.length; i++) { + // if (- translate >= s.slidesGrid[i]) { + // newActiveIndex = i; + // } + // } + snapIndex = Math.floor(newActiveIndex / s.params.slidesPerGroup); + if (snapIndex >= s.snapGrid.length) snapIndex = s.snapGrid.length - 1; + + if (newActiveIndex === s.activeIndex) { + return; + } + s.snapIndex = snapIndex; + s.previousIndex = s.activeIndex; + s.activeIndex = newActiveIndex; + s.updateClasses(); + s.updateRealIndex(); + }; + s.updateRealIndex = function(){ + s.realIndex = parseInt(s.slides.eq(s.activeIndex).attr('data-swiper-slide-index') || s.activeIndex, 10); + }; + + /*========================= + Classes + ===========================*/ + s.updateClasses = function () { + s.slides.removeClass(s.params.slideActiveClass + ' ' + s.params.slideNextClass + ' ' + s.params.slidePrevClass + ' ' + s.params.slideDuplicateActiveClass + ' ' + s.params.slideDuplicateNextClass + ' ' + s.params.slideDuplicatePrevClass); + var activeSlide = s.slides.eq(s.activeIndex); + // Active classes + activeSlide.addClass(s.params.slideActiveClass); + if (params.loop) { + // Duplicate to all looped slides + if (activeSlide.hasClass(s.params.slideDuplicateClass)) { + s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + s.realIndex + '"]').addClass(s.params.slideDuplicateActiveClass); + } + else { + s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + s.realIndex + '"]').addClass(s.params.slideDuplicateActiveClass); + } + } + // Next Slide + var nextSlide = activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass); + if (s.params.loop && nextSlide.length === 0) { + nextSlide = s.slides.eq(0); + nextSlide.addClass(s.params.slideNextClass); + } + // Prev Slide + var prevSlide = activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass); + if (s.params.loop && prevSlide.length === 0) { + prevSlide = s.slides.eq(-1); + prevSlide.addClass(s.params.slidePrevClass); + } + if (params.loop) { + // Duplicate to all looped slides + if (nextSlide.hasClass(s.params.slideDuplicateClass)) { + s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + nextSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicateNextClass); + } + else { + s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + nextSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicateNextClass); + } + if (prevSlide.hasClass(s.params.slideDuplicateClass)) { + s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + prevSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicatePrevClass); + } + else { + s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + prevSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicatePrevClass); + } + } + + // Pagination + if (s.paginationContainer && s.paginationContainer.length > 0) { + // Current/Total + var current, + total = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length; + if (s.params.loop) { + current = Math.ceil((s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup); + if (current > s.slides.length - 1 - s.loopedSlides * 2) { + current = current - (s.slides.length - s.loopedSlides * 2); + } + if (current > total - 1) current = current - total; + if (current < 0 && s.params.paginationType !== 'bullets') current = total + current; + } + else { + if (typeof s.snapIndex !== 'undefined') { + current = s.snapIndex; + } + else { + current = s.activeIndex || 0; + } + } + // Types + if (s.params.paginationType === 'bullets' && s.bullets && s.bullets.length > 0) { + s.bullets.removeClass(s.params.bulletActiveClass); + if (s.paginationContainer.length > 1) { + s.bullets.each(function () { + if ($(this).index() === current) $(this).addClass(s.params.bulletActiveClass); + }); + } + else { + s.bullets.eq(current).addClass(s.params.bulletActiveClass); + } + } + if (s.params.paginationType === 'fraction') { + s.paginationContainer.find('.' + s.params.paginationCurrentClass).text(current + 1); + s.paginationContainer.find('.' + s.params.paginationTotalClass).text(total); + } + if (s.params.paginationType === 'progress') { + var scale = (current + 1) / total, + scaleX = scale, + scaleY = 1; + if (!s.isHorizontal()) { + scaleY = scale; + scaleX = 1; + } + s.paginationContainer.find('.' + s.params.paginationProgressbarClass).transform('translate3d(0,0,0) scaleX(' + scaleX + ') scaleY(' + scaleY + ')').transition(s.params.speed); + } + if (s.params.paginationType === 'custom' && s.params.paginationCustomRender) { + s.paginationContainer.html(s.params.paginationCustomRender(s, current + 1, total)); + s.emit('onPaginationRendered', s, s.paginationContainer[0]); + } + } + + // Next/active buttons + if (!s.params.loop) { + if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) { + if (s.isBeginning) { + s.prevButton.addClass(s.params.buttonDisabledClass); + if (s.params.a11y && s.a11y) s.a11y.disable(s.prevButton); + } + else { + s.prevButton.removeClass(s.params.buttonDisabledClass); + if (s.params.a11y && s.a11y) s.a11y.enable(s.prevButton); + } + } + if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) { + if (s.isEnd) { + s.nextButton.addClass(s.params.buttonDisabledClass); + if (s.params.a11y && s.a11y) s.a11y.disable(s.nextButton); + } + else { + s.nextButton.removeClass(s.params.buttonDisabledClass); + if (s.params.a11y && s.a11y) s.a11y.enable(s.nextButton); + } + } + } + }; + + /*========================= + Pagination + ===========================*/ + s.updatePagination = function () { + if (!s.params.pagination) return; + if (s.paginationContainer && s.paginationContainer.length > 0) { + var paginationHTML = ''; + if (s.params.paginationType === 'bullets') { + var numberOfBullets = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length; + for (var i = 0; i < numberOfBullets; i++) { + if (s.params.paginationBulletRender) { + paginationHTML += s.params.paginationBulletRender(s, i, s.params.bulletClass); + } + else { + paginationHTML += '<' + s.params.paginationElement+' class="' + s.params.bulletClass + '">'; + } + } + s.paginationContainer.html(paginationHTML); + s.bullets = s.paginationContainer.find('.' + s.params.bulletClass); + if (s.params.paginationClickable && s.params.a11y && s.a11y) { + s.a11y.initPagination(); + } + } + if (s.params.paginationType === 'fraction') { + if (s.params.paginationFractionRender) { + paginationHTML = s.params.paginationFractionRender(s, s.params.paginationCurrentClass, s.params.paginationTotalClass); + } + else { + paginationHTML = + '' + + ' / ' + + ''; + } + s.paginationContainer.html(paginationHTML); + } + if (s.params.paginationType === 'progress') { + if (s.params.paginationProgressRender) { + paginationHTML = s.params.paginationProgressRender(s, s.params.paginationProgressbarClass); + } + else { + paginationHTML = ''; + } + s.paginationContainer.html(paginationHTML); + } + if (s.params.paginationType !== 'custom') { + s.emit('onPaginationRendered', s, s.paginationContainer[0]); + } + } + }; + /*========================= + Common update method + ===========================*/ + s.update = function (updateTranslate) { + if (!s) return; + s.updateContainerSize(); + s.updateSlidesSize(); + s.updateProgress(); + s.updatePagination(); + s.updateClasses(); + if (s.params.scrollbar && s.scrollbar) { + s.scrollbar.set(); + } + var newTranslate; + function forceSetTranslate() { + var translate = s.rtl ? -s.translate : s.translate; + newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate()); + s.setWrapperTranslate(newTranslate); + s.updateActiveIndex(); + s.updateClasses(); + } + if (updateTranslate) { + var translated; + if (s.controller && s.controller.spline) { + s.controller.spline = undefined; + } + if (s.params.freeMode) { + forceSetTranslate(); + if (s.params.autoHeight) { + s.updateAutoHeight(); + } + } + else { + if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) { + translated = s.slideTo(s.slides.length - 1, 0, false, true); + } + else { + translated = s.slideTo(s.activeIndex, 0, false, true); + } + if (!translated) { + forceSetTranslate(); + } + } + } + else if (s.params.autoHeight) { + s.updateAutoHeight(); + } + }; + + /*========================= + Resize Handler + ===========================*/ + s.onResize = function (forceUpdatePagination) { + if (s.params.onBeforeResize) s.params.onBeforeResize(s); + //Breakpoints + if (s.params.breakpoints) { + s.setBreakpoint(); + } + + // Disable locks on resize + var allowSwipeToPrev = s.params.allowSwipeToPrev; + var allowSwipeToNext = s.params.allowSwipeToNext; + s.params.allowSwipeToPrev = s.params.allowSwipeToNext = true; + + s.updateContainerSize(); + s.updateSlidesSize(); + if (s.params.slidesPerView === 'auto' || s.params.freeMode || forceUpdatePagination) s.updatePagination(); + if (s.params.scrollbar && s.scrollbar) { + s.scrollbar.set(); + } + if (s.controller && s.controller.spline) { + s.controller.spline = undefined; + } + var slideChangedBySlideTo = false; + if (s.params.freeMode) { + var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate()); + s.setWrapperTranslate(newTranslate); + s.updateActiveIndex(); + s.updateClasses(); + + if (s.params.autoHeight) { + s.updateAutoHeight(); + } + } + else { + s.updateClasses(); + if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) { + slideChangedBySlideTo = s.slideTo(s.slides.length - 1, 0, false, true); + } + else { + slideChangedBySlideTo = s.slideTo(s.activeIndex, 0, false, true); + } + } + if (s.params.lazyLoading && !slideChangedBySlideTo && s.lazy) { + s.lazy.load(); + } + // Return locks after resize + s.params.allowSwipeToPrev = allowSwipeToPrev; + s.params.allowSwipeToNext = allowSwipeToNext; + if (s.params.onAfterResize) s.params.onAfterResize(s); + }; + + /*========================= + Events + ===========================*/ + + //Define Touch Events + s.touchEventsDesktop = {start: 'mousedown', move: 'mousemove', end: 'mouseup'}; + if (window.navigator.pointerEnabled) s.touchEventsDesktop = {start: 'pointerdown', move: 'pointermove', end: 'pointerup'}; + else if (window.navigator.msPointerEnabled) s.touchEventsDesktop = {start: 'MSPointerDown', move: 'MSPointerMove', end: 'MSPointerUp'}; + s.touchEvents = { + start : s.support.touch || !s.params.simulateTouch ? 'touchstart' : s.touchEventsDesktop.start, + move : s.support.touch || !s.params.simulateTouch ? 'touchmove' : s.touchEventsDesktop.move, + end : s.support.touch || !s.params.simulateTouch ? 'touchend' : s.touchEventsDesktop.end + }; + + + // WP8 Touch Events Fix + if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) { + (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction); + } + + // Attach/detach events + s.initEvents = function (detach) { + var actionDom = detach ? 'off' : 'on'; + var action = detach ? 'removeEventListener' : 'addEventListener'; + var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0]; + var target = s.support.touch ? touchEventsTarget : document; + + var moveCapture = s.params.nested ? true : false; + + //Touch Events + if (s.browser.ie) { + touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false); + target[action](s.touchEvents.move, s.onTouchMove, moveCapture); + target[action](s.touchEvents.end, s.onTouchEnd, false); + } + else { + if (s.support.touch) { + var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false; + touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, passiveListener); + touchEventsTarget[action](s.touchEvents.move, s.onTouchMove, moveCapture); + touchEventsTarget[action](s.touchEvents.end, s.onTouchEnd, passiveListener); + } + if ((params.simulateTouch && !s.device.ios && !s.device.android) || (params.simulateTouch && !s.support.touch && s.device.ios)) { + touchEventsTarget[action]('mousedown', s.onTouchStart, false); + document[action]('mousemove', s.onTouchMove, moveCapture); + document[action]('mouseup', s.onTouchEnd, false); + } + } + window[action]('resize', s.onResize); + + // Next, Prev, Index + if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) { + s.nextButton[actionDom]('click', s.onClickNext); + if (s.params.a11y && s.a11y) s.nextButton[actionDom]('keydown', s.a11y.onEnterKey); + } + if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) { + s.prevButton[actionDom]('click', s.onClickPrev); + if (s.params.a11y && s.a11y) s.prevButton[actionDom]('keydown', s.a11y.onEnterKey); + } + if (s.params.pagination && s.params.paginationClickable) { + s.paginationContainer[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex); + if (s.params.a11y && s.a11y) s.paginationContainer[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey); + } + + // Prevent Links Clicks + if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true); + }; + s.attachEvents = function () { + s.initEvents(); + }; + s.detachEvents = function () { + s.initEvents(true); + }; + + /*========================= + Handle Clicks + ===========================*/ + // Prevent Clicks + s.allowClick = true; + s.preventClicks = function (e) { + if (!s.allowClick) { + if (s.params.preventClicks) e.preventDefault(); + if (s.params.preventClicksPropagation && s.animating) { + e.stopPropagation(); + e.stopImmediatePropagation(); + } + } + }; + // Clicks + s.onClickNext = function (e) { + e.preventDefault(); + if (s.isEnd && !s.params.loop) return; + s.slideNext(); + }; + s.onClickPrev = function (e) { + e.preventDefault(); + if (s.isBeginning && !s.params.loop) return; + s.slidePrev(); + }; + s.onClickIndex = function (e) { + e.preventDefault(); + var index = $(this).index() * s.params.slidesPerGroup; + if (s.params.loop) index = index + s.loopedSlides; + s.slideTo(index); + }; + + /*========================= + Handle Touches + ===========================*/ + function findElementInEvent(e, selector) { + var el = $(e.target); + if (!el.is(selector)) { + if (typeof selector === 'string') { + el = el.parents(selector); + } + else if (selector.nodeType) { + var found; + el.parents().each(function (index, _el) { + if (_el === selector) found = selector; + }); + if (!found) return undefined; + else return selector; + } + } + if (el.length === 0) { + return undefined; + } + return el[0]; + } + s.updateClickedSlide = function (e) { + var slide = findElementInEvent(e, '.' + s.params.slideClass); + var slideFound = false; + if (slide) { + for (var i = 0; i < s.slides.length; i++) { + if (s.slides[i] === slide) slideFound = true; + } + } + + if (slide && slideFound) { + s.clickedSlide = slide; + s.clickedIndex = $(slide).index(); + } + else { + s.clickedSlide = undefined; + s.clickedIndex = undefined; + return; + } + if (s.params.slideToClickedSlide && s.clickedIndex !== undefined && s.clickedIndex !== s.activeIndex) { + var slideToIndex = s.clickedIndex, + realIndex, + duplicatedSlides, + slidesPerView = s.params.slidesPerView === 'auto' ? s.currentSlidesPerView() : s.params.slidesPerView; + if (s.params.loop) { + if (s.animating) return; + realIndex = parseInt($(s.clickedSlide).attr('data-swiper-slide-index'), 10); + if (s.params.centeredSlides) { + if ((slideToIndex < s.loopedSlides - slidesPerView/2) || (slideToIndex > s.slides.length - s.loopedSlides + slidesPerView/2)) { + s.fixLoop(); + slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index(); + setTimeout(function () { + s.slideTo(slideToIndex); + }, 0); + } + else { + s.slideTo(slideToIndex); + } + } + else { + if (slideToIndex > s.slides.length - slidesPerView) { + s.fixLoop(); + slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index(); + setTimeout(function () { + s.slideTo(slideToIndex); + }, 0); + } + else { + s.slideTo(slideToIndex); + } + } + } + else { + s.slideTo(slideToIndex); + } + } + }; + + var isTouched, + isMoved, + allowTouchCallbacks, + touchStartTime, + isScrolling, + currentTranslate, + startTranslate, + allowThresholdMove, + // Form elements to match + formElements = 'input, select, textarea, button, video', + // Last click time + lastClickTime = Date.now(), clickTimeout, + //Velocities + velocities = [], + allowMomentumBounce; + + // Animating Flag + s.animating = false; + + // Touches information + s.touches = { + startX: 0, + startY: 0, + currentX: 0, + currentY: 0, + diff: 0 + }; + + // Touch handlers + var isTouchEvent, startMoving; + s.onTouchStart = function (e) { + if (e.originalEvent) e = e.originalEvent; + isTouchEvent = e.type === 'touchstart'; + if (!isTouchEvent && 'which' in e && e.which === 3) return; + if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) { + s.allowClick = true; + return; + } + if (s.params.swipeHandler) { + if (!findElementInEvent(e, s.params.swipeHandler)) return; + } + + var startX = s.touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + var startY = s.touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + + // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore + if(s.device.ios && s.params.iOSEdgeSwipeDetection && startX <= s.params.iOSEdgeSwipeThreshold) { + return; + } + + isTouched = true; + isMoved = false; + allowTouchCallbacks = true; + isScrolling = undefined; + startMoving = undefined; + s.touches.startX = startX; + s.touches.startY = startY; + touchStartTime = Date.now(); + s.allowClick = true; + s.updateContainerSize(); + s.swipeDirection = undefined; + if (s.params.threshold > 0) allowThresholdMove = false; + if (e.type !== 'touchstart') { + var preventDefault = true; + if ($(e.target).is(formElements)) preventDefault = false; + if (document.activeElement && $(document.activeElement).is(formElements)) { + document.activeElement.blur(); + } + if (preventDefault) { + e.preventDefault(); + } + } + s.emit('onTouchStart', s, e); + }; + + s.onTouchMove = function (e) { + if (e.originalEvent) e = e.originalEvent; + if (isTouchEvent && e.type === 'mousemove') return; + if (e.preventedByNestedSwiper) { + s.touches.startX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + s.touches.startY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + return; + } + if (s.params.onlyExternal) { + // isMoved = true; + s.allowClick = false; + if (isTouched) { + s.touches.startX = s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + s.touches.startY = s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = Date.now(); + } + return; + } + if (isTouchEvent && s.params.touchReleaseOnEdges && !s.params.loop) { + if (!s.isHorizontal()) { + // Vertical + if ( + (s.touches.currentY < s.touches.startY && s.translate <= s.maxTranslate()) || + (s.touches.currentY > s.touches.startY && s.translate >= s.minTranslate()) + ) { + return; + } + } + else { + if ( + (s.touches.currentX < s.touches.startX && s.translate <= s.maxTranslate()) || + (s.touches.currentX > s.touches.startX && s.translate >= s.minTranslate()) + ) { + return; + } + } + } + if (isTouchEvent && document.activeElement) { + if (e.target === document.activeElement && $(e.target).is(formElements)) { + isMoved = true; + s.allowClick = false; + return; + } + } + if (allowTouchCallbacks) { + s.emit('onTouchMove', s, e); + } + if (e.targetTouches && e.targetTouches.length > 1) return; + + s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + + if (typeof isScrolling === 'undefined') { + var touchAngle; + if (s.isHorizontal() && s.touches.currentY === s.touches.startY || !s.isHorizontal() && s.touches.currentX === s.touches.startX) { + isScrolling = false; + } + else { + touchAngle = Math.atan2(Math.abs(s.touches.currentY - s.touches.startY), Math.abs(s.touches.currentX - s.touches.startX)) * 180 / Math.PI; + isScrolling = s.isHorizontal() ? touchAngle > s.params.touchAngle : (90 - touchAngle > s.params.touchAngle); + } + } + if (isScrolling) { + s.emit('onTouchMoveOpposite', s, e); + } + if (typeof startMoving === 'undefined') { + if (s.touches.currentX !== s.touches.startX || s.touches.currentY !== s.touches.startY) { + startMoving = true; + } + } + if (!isTouched) return; + if (isScrolling) { + isTouched = false; + return; + } + if (!startMoving) { + return; + } + s.allowClick = false; + s.emit('onSliderMove', s, e); + e.preventDefault(); + if (s.params.touchMoveStopPropagation && !s.params.nested) { + e.stopPropagation(); + } + + if (!isMoved) { + if (params.loop) { + s.fixLoop(); + } + startTranslate = s.getWrapperTranslate(); + s.setWrapperTransition(0); + if (s.animating) { + s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd'); + } + if (s.params.autoplay && s.autoplaying) { + if (s.params.autoplayDisableOnInteraction) { + s.stopAutoplay(); + } + else { + s.pauseAutoplay(); + } + } + allowMomentumBounce = false; + //Grab Cursor + if (s.params.grabCursor && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) { + s.setGrabCursor(true); + } + } + isMoved = true; + + var diff = s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY; + + diff = diff * s.params.touchRatio; + if (s.rtl) diff = -diff; + + s.swipeDirection = diff > 0 ? 'prev' : 'next'; + currentTranslate = diff + startTranslate; + + var disableParentSwiper = true; + if ((diff > 0 && currentTranslate > s.minTranslate())) { + disableParentSwiper = false; + if (s.params.resistance) currentTranslate = s.minTranslate() - 1 + Math.pow(-s.minTranslate() + startTranslate + diff, s.params.resistanceRatio); + } + else if (diff < 0 && currentTranslate < s.maxTranslate()) { + disableParentSwiper = false; + if (s.params.resistance) currentTranslate = s.maxTranslate() + 1 - Math.pow(s.maxTranslate() - startTranslate - diff, s.params.resistanceRatio); + } + + if (disableParentSwiper) { + e.preventedByNestedSwiper = true; + } + + // Directions locks + if (!s.params.allowSwipeToNext && s.swipeDirection === 'next' && currentTranslate < startTranslate) { + currentTranslate = startTranslate; + } + if (!s.params.allowSwipeToPrev && s.swipeDirection === 'prev' && currentTranslate > startTranslate) { + currentTranslate = startTranslate; + } + + + // Threshold + if (s.params.threshold > 0) { + if (Math.abs(diff) > s.params.threshold || allowThresholdMove) { + if (!allowThresholdMove) { + allowThresholdMove = true; + s.touches.startX = s.touches.currentX; + s.touches.startY = s.touches.currentY; + currentTranslate = startTranslate; + s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY; + return; + } + } + else { + currentTranslate = startTranslate; + return; + } + } + + if (!s.params.followFinger) return; + + // Update active index in free mode + if (s.params.freeMode || s.params.watchSlidesProgress) { + s.updateActiveIndex(); + } + if (s.params.freeMode) { + //Velocity + if (velocities.length === 0) { + velocities.push({ + position: s.touches[s.isHorizontal() ? 'startX' : 'startY'], + time: touchStartTime + }); + } + velocities.push({ + position: s.touches[s.isHorizontal() ? 'currentX' : 'currentY'], + time: (new window.Date()).getTime() + }); + } + // Update progress + s.updateProgress(currentTranslate); + // Update translate + s.setWrapperTranslate(currentTranslate); + }; + s.onTouchEnd = function (e) { + if (e.originalEvent) e = e.originalEvent; + if (allowTouchCallbacks) { + s.emit('onTouchEnd', s, e); + } + allowTouchCallbacks = false; + if (!isTouched) return; + //Return Grab Cursor + if (s.params.grabCursor && isMoved && isTouched && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) { + s.setGrabCursor(false); + } + + // Time diff + var touchEndTime = Date.now(); + var timeDiff = touchEndTime - touchStartTime; + + // Tap, doubleTap, Click + if (s.allowClick) { + s.updateClickedSlide(e); + s.emit('onTap', s, e); + if (timeDiff < 300 && (touchEndTime - lastClickTime) > 300) { + if (clickTimeout) clearTimeout(clickTimeout); + clickTimeout = setTimeout(function () { + if (!s) return; + if (s.params.paginationHide && s.paginationContainer.length > 0 && !$(e.target).hasClass(s.params.bulletClass)) { + s.paginationContainer.toggleClass(s.params.paginationHiddenClass); + } + s.emit('onClick', s, e); + }, 300); + + } + if (timeDiff < 300 && (touchEndTime - lastClickTime) < 300) { + if (clickTimeout) clearTimeout(clickTimeout); + s.emit('onDoubleTap', s, e); + } + } + + lastClickTime = Date.now(); + setTimeout(function () { + if (s) s.allowClick = true; + }, 0); + + if (!isTouched || !isMoved || !s.swipeDirection || s.touches.diff === 0 || currentTranslate === startTranslate) { + isTouched = isMoved = false; + return; + } + isTouched = isMoved = false; + + var currentPos; + if (s.params.followFinger) { + currentPos = s.rtl ? s.translate : -s.translate; + } + else { + currentPos = -currentTranslate; + } + if (s.params.freeMode) { + if (currentPos < -s.minTranslate()) { + s.slideTo(s.activeIndex); + return; + } + else if (currentPos > -s.maxTranslate()) { + if (s.slides.length < s.snapGrid.length) { + s.slideTo(s.snapGrid.length - 1); + } + else { + s.slideTo(s.slides.length - 1); + } + return; + } + + if (s.params.freeModeMomentum) { + if (velocities.length > 1) { + var lastMoveEvent = velocities.pop(), velocityEvent = velocities.pop(); + + var distance = lastMoveEvent.position - velocityEvent.position; + var time = lastMoveEvent.time - velocityEvent.time; + s.velocity = distance / time; + s.velocity = s.velocity / 2; + if (Math.abs(s.velocity) < s.params.freeModeMinimumVelocity) { + s.velocity = 0; + } + // this implies that the user stopped moving a finger then released. + // There would be no events with distance zero, so the last event is stale. + if (time > 150 || (new window.Date().getTime() - lastMoveEvent.time) > 300) { + s.velocity = 0; + } + } else { + s.velocity = 0; + } + s.velocity = s.velocity * s.params.freeModeMomentumVelocityRatio; + + velocities.length = 0; + var momentumDuration = 1000 * s.params.freeModeMomentumRatio; + var momentumDistance = s.velocity * momentumDuration; + + var newPosition = s.translate + momentumDistance; + if (s.rtl) newPosition = - newPosition; + var doBounce = false; + var afterBouncePosition; + var bounceAmount = Math.abs(s.velocity) * 20 * s.params.freeModeMomentumBounceRatio; + if (newPosition < s.maxTranslate()) { + if (s.params.freeModeMomentumBounce) { + if (newPosition + s.maxTranslate() < -bounceAmount) { + newPosition = s.maxTranslate() - bounceAmount; + } + afterBouncePosition = s.maxTranslate(); + doBounce = true; + allowMomentumBounce = true; + } + else { + newPosition = s.maxTranslate(); + } + } + else if (newPosition > s.minTranslate()) { + if (s.params.freeModeMomentumBounce) { + if (newPosition - s.minTranslate() > bounceAmount) { + newPosition = s.minTranslate() + bounceAmount; + } + afterBouncePosition = s.minTranslate(); + doBounce = true; + allowMomentumBounce = true; + } + else { + newPosition = s.minTranslate(); + } + } + else if (s.params.freeModeSticky) { + var j = 0, + nextSlide; + for (j = 0; j < s.snapGrid.length; j += 1) { + if (s.snapGrid[j] > -newPosition) { + nextSlide = j; + break; + } + + } + if (Math.abs(s.snapGrid[nextSlide] - newPosition) < Math.abs(s.snapGrid[nextSlide - 1] - newPosition) || s.swipeDirection === 'next') { + newPosition = s.snapGrid[nextSlide]; + } else { + newPosition = s.snapGrid[nextSlide - 1]; + } + if (!s.rtl) newPosition = - newPosition; + } + //Fix duration + if (s.velocity !== 0) { + if (s.rtl) { + momentumDuration = Math.abs((-newPosition - s.translate) / s.velocity); + } + else { + momentumDuration = Math.abs((newPosition - s.translate) / s.velocity); + } + } + else if (s.params.freeModeSticky) { + s.slideReset(); + return; + } + + if (s.params.freeModeMomentumBounce && doBounce) { + s.updateProgress(afterBouncePosition); + s.setWrapperTransition(momentumDuration); + s.setWrapperTranslate(newPosition); + s.onTransitionStart(); + s.animating = true; + s.wrapper.transitionEnd(function () { + if (!s || !allowMomentumBounce) return; + s.emit('onMomentumBounce', s); + + s.setWrapperTransition(s.params.speed); + s.setWrapperTranslate(afterBouncePosition); + s.wrapper.transitionEnd(function () { + if (!s) return; + s.onTransitionEnd(); + }); + }); + } else if (s.velocity) { + s.updateProgress(newPosition); + s.setWrapperTransition(momentumDuration); + s.setWrapperTranslate(newPosition); + s.onTransitionStart(); + if (!s.animating) { + s.animating = true; + s.wrapper.transitionEnd(function () { + if (!s) return; + s.onTransitionEnd(); + }); + } + + } else { + s.updateProgress(newPosition); + } + + s.updateActiveIndex(); + } + if (!s.params.freeModeMomentum || timeDiff >= s.params.longSwipesMs) { + s.updateProgress(); + s.updateActiveIndex(); + } + return; + } + + // Find current slide + var i, stopIndex = 0, groupSize = s.slidesSizesGrid[0]; + for (i = 0; i < s.slidesGrid.length; i += s.params.slidesPerGroup) { + if (typeof s.slidesGrid[i + s.params.slidesPerGroup] !== 'undefined') { + if (currentPos >= s.slidesGrid[i] && currentPos < s.slidesGrid[i + s.params.slidesPerGroup]) { + stopIndex = i; + groupSize = s.slidesGrid[i + s.params.slidesPerGroup] - s.slidesGrid[i]; + } + } + else { + if (currentPos >= s.slidesGrid[i]) { + stopIndex = i; + groupSize = s.slidesGrid[s.slidesGrid.length - 1] - s.slidesGrid[s.slidesGrid.length - 2]; + } + } + } + + // Find current slide size + var ratio = (currentPos - s.slidesGrid[stopIndex]) / groupSize; + + if (timeDiff > s.params.longSwipesMs) { + // Long touches + if (!s.params.longSwipes) { + s.slideTo(s.activeIndex); + return; + } + if (s.swipeDirection === 'next') { + if (ratio >= s.params.longSwipesRatio) s.slideTo(stopIndex + s.params.slidesPerGroup); + else s.slideTo(stopIndex); + + } + if (s.swipeDirection === 'prev') { + if (ratio > (1 - s.params.longSwipesRatio)) s.slideTo(stopIndex + s.params.slidesPerGroup); + else s.slideTo(stopIndex); + } + } + else { + // Short swipes + if (!s.params.shortSwipes) { + s.slideTo(s.activeIndex); + return; + } + if (s.swipeDirection === 'next') { + s.slideTo(stopIndex + s.params.slidesPerGroup); + + } + if (s.swipeDirection === 'prev') { + s.slideTo(stopIndex); + } + } + }; + /*========================= + Transitions + ===========================*/ + s._slideTo = function (slideIndex, speed) { + return s.slideTo(slideIndex, speed, true, true); + }; + s.slideTo = function (slideIndex, speed, runCallbacks, internal) { + if (typeof runCallbacks === 'undefined') runCallbacks = true; + if (typeof slideIndex === 'undefined') slideIndex = 0; + if (slideIndex < 0) slideIndex = 0; + s.snapIndex = Math.floor(slideIndex / s.params.slidesPerGroup); + if (s.snapIndex >= s.snapGrid.length) s.snapIndex = s.snapGrid.length - 1; + + var translate = - s.snapGrid[s.snapIndex]; + // Stop autoplay + if (s.params.autoplay && s.autoplaying) { + if (internal || !s.params.autoplayDisableOnInteraction) { + s.pauseAutoplay(speed); + } + else { + s.stopAutoplay(); + } + } + // Update progress + s.updateProgress(translate); + + // Normalize slideIndex + if(s.params.normalizeSlideIndex){ + for (var i = 0; i < s.slidesGrid.length; i++) { + if (- Math.floor(translate * 100) >= Math.floor(s.slidesGrid[i] * 100)) { + slideIndex = i; + } + } + } + + // Directions locks + if (!s.params.allowSwipeToNext && translate < s.translate && translate < s.minTranslate()) { + return false; + } + if (!s.params.allowSwipeToPrev && translate > s.translate && translate > s.maxTranslate()) { + if ((s.activeIndex || 0) !== slideIndex ) return false; + } + + // Update Index + if (typeof speed === 'undefined') speed = s.params.speed; + s.previousIndex = s.activeIndex || 0; + s.activeIndex = slideIndex; + s.updateRealIndex(); + if ((s.rtl && -translate === s.translate) || (!s.rtl && translate === s.translate)) { + // Update Height + if (s.params.autoHeight) { + s.updateAutoHeight(); + } + s.updateClasses(); + if (s.params.effect !== 'slide') { + s.setWrapperTranslate(translate); + } + return false; + } + s.updateClasses(); + s.onTransitionStart(runCallbacks); + + if (speed === 0 || s.browser.lteIE9) { + s.setWrapperTranslate(translate); + s.setWrapperTransition(0); + s.onTransitionEnd(runCallbacks); + } + else { + s.setWrapperTranslate(translate); + s.setWrapperTransition(speed); + if (!s.animating) { + s.animating = true; + s.wrapper.transitionEnd(function () { + if (!s) return; + s.onTransitionEnd(runCallbacks); + }); + } + + } + + return true; + }; + + s.onTransitionStart = function (runCallbacks) { + if (typeof runCallbacks === 'undefined') runCallbacks = true; + if (s.params.autoHeight) { + s.updateAutoHeight(); + } + if (s.lazy) s.lazy.onTransitionStart(); + if (runCallbacks) { + s.emit('onTransitionStart', s); + if (s.activeIndex !== s.previousIndex) { + s.emit('onSlideChangeStart', s); + if (s.activeIndex > s.previousIndex) { + s.emit('onSlideNextStart', s); + } + else { + s.emit('onSlidePrevStart', s); + } + } + + } + }; + s.onTransitionEnd = function (runCallbacks) { + s.animating = false; + s.setWrapperTransition(0); + if (typeof runCallbacks === 'undefined') runCallbacks = true; + if (s.lazy) s.lazy.onTransitionEnd(); + if (runCallbacks) { + s.emit('onTransitionEnd', s); + if (s.activeIndex !== s.previousIndex) { + s.emit('onSlideChangeEnd', s); + if (s.activeIndex > s.previousIndex) { + s.emit('onSlideNextEnd', s); + } + else { + s.emit('onSlidePrevEnd', s); + } + } + } + if (s.params.history && s.history) { + s.history.setHistory(s.params.history, s.activeIndex); + } + if (s.params.hashnav && s.hashnav) { + s.hashnav.setHash(); + } + + }; + s.slideNext = function (runCallbacks, speed, internal) { + if (s.params.loop) { + if (s.animating) return false; + s.fixLoop(); + var clientLeft = s.container[0].clientLeft; + return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal); + } + else return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal); + }; + s._slideNext = function (speed) { + return s.slideNext(true, speed, true); + }; + s.slidePrev = function (runCallbacks, speed, internal) { + if (s.params.loop) { + if (s.animating) return false; + s.fixLoop(); + var clientLeft = s.container[0].clientLeft; + return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal); + } + else return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal); + }; + s._slidePrev = function (speed) { + return s.slidePrev(true, speed, true); + }; + s.slideReset = function (runCallbacks, speed, internal) { + return s.slideTo(s.activeIndex, speed, runCallbacks); + }; + + s.disableTouchControl = function () { + s.params.onlyExternal = true; + return true; + }; + s.enableTouchControl = function () { + s.params.onlyExternal = false; + return true; + }; + + /*========================= + Translate/transition helpers + ===========================*/ + s.setWrapperTransition = function (duration, byController) { + s.wrapper.transition(duration); + if (s.params.effect !== 'slide' && s.effects[s.params.effect]) { + s.effects[s.params.effect].setTransition(duration); + } + if (s.params.parallax && s.parallax) { + s.parallax.setTransition(duration); + } + if (s.params.scrollbar && s.scrollbar) { + s.scrollbar.setTransition(duration); + } + if (s.params.control && s.controller) { + s.controller.setTransition(duration, byController); + } + s.emit('onSetTransition', s, duration); + }; + s.setWrapperTranslate = function (translate, updateActiveIndex, byController) { + var x = 0, y = 0, z = 0; + if (s.isHorizontal()) { + x = s.rtl ? -translate : translate; + } + else { + y = translate; + } + + if (s.params.roundLengths) { + x = round(x); + y = round(y); + } + + if (!s.params.virtualTranslate) { + if (s.support.transforms3d) s.wrapper.transform('translate3d(' + x + 'px, ' + y + 'px, ' + z + 'px)'); + else s.wrapper.transform('translate(' + x + 'px, ' + y + 'px)'); + } + + s.translate = s.isHorizontal() ? x : y; + + // Check if we need to update progress + var progress; + var translatesDiff = s.maxTranslate() - s.minTranslate(); + if (translatesDiff === 0) { + progress = 0; + } + else { + progress = (translate - s.minTranslate()) / (translatesDiff); + } + if (progress !== s.progress) { + s.updateProgress(translate); + } + + if (updateActiveIndex) s.updateActiveIndex(); + if (s.params.effect !== 'slide' && s.effects[s.params.effect]) { + s.effects[s.params.effect].setTranslate(s.translate); + } + if (s.params.parallax && s.parallax) { + s.parallax.setTranslate(s.translate); + } + if (s.params.scrollbar && s.scrollbar) { + s.scrollbar.setTranslate(s.translate); + } + if (s.params.control && s.controller) { + s.controller.setTranslate(s.translate, byController); + } + s.emit('onSetTranslate', s, s.translate); + }; + + s.getTranslate = function (el, axis) { + var matrix, curTransform, curStyle, transformMatrix; + + // automatic axis detection + if (typeof axis === 'undefined') { + axis = 'x'; + } + + if (s.params.virtualTranslate) { + return s.rtl ? -s.translate : s.translate; + } + + curStyle = window.getComputedStyle(el, null); + if (window.WebKitCSSMatrix) { + curTransform = curStyle.transform || curStyle.webkitTransform; + if (curTransform.split(',').length > 6) { + curTransform = curTransform.split(', ').map(function(a){ + return a.replace(',','.'); + }).join(', '); + } + // Some old versions of Webkit choke when 'none' is passed; pass + // empty string instead in this case + transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); + } + else { + transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); + matrix = transformMatrix.toString().split(','); + } + + if (axis === 'x') { + //Latest Chrome and webkits Fix + if (window.WebKitCSSMatrix) + curTransform = transformMatrix.m41; + //Crazy IE10 Matrix + else if (matrix.length === 16) + curTransform = parseFloat(matrix[12]); + //Normal Browsers + else + curTransform = parseFloat(matrix[4]); + } + if (axis === 'y') { + //Latest Chrome and webkits Fix + if (window.WebKitCSSMatrix) + curTransform = transformMatrix.m42; + //Crazy IE10 Matrix + else if (matrix.length === 16) + curTransform = parseFloat(matrix[13]); + //Normal Browsers + else + curTransform = parseFloat(matrix[5]); + } + if (s.rtl && curTransform) curTransform = -curTransform; + return curTransform || 0; + }; + s.getWrapperTranslate = function (axis) { + if (typeof axis === 'undefined') { + axis = s.isHorizontal() ? 'x' : 'y'; + } + return s.getTranslate(s.wrapper[0], axis); + }; + + /*========================= + Observer + ===========================*/ + s.observers = []; + function initObserver(target, options) { + options = options || {}; + // create an observer instance + var ObserverFunc = window.MutationObserver || window.WebkitMutationObserver; + var observer = new ObserverFunc(function (mutations) { + mutations.forEach(function (mutation) { + s.onResize(true); + s.emit('onObserverUpdate', s, mutation); + }); + }); + + observer.observe(target, { + attributes: typeof options.attributes === 'undefined' ? true : options.attributes, + childList: typeof options.childList === 'undefined' ? true : options.childList, + characterData: typeof options.characterData === 'undefined' ? true : options.characterData + }); + + s.observers.push(observer); + } + s.initObservers = function () { + if (s.params.observeParents) { + var containerParents = s.container.parents(); + for (var i = 0; i < containerParents.length; i++) { + initObserver(containerParents[i]); + } + } + + // Observe container + initObserver(s.container[0], {childList: false}); + + // Observe wrapper + initObserver(s.wrapper[0], {attributes: false}); + }; + s.disconnectObservers = function () { + for (var i = 0; i < s.observers.length; i++) { + s.observers[i].disconnect(); + } + s.observers = []; + }; + /*========================= + Loop + ===========================*/ + // Create looped slides + s.createLoop = function () { + // Remove duplicated slides + s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove(); + + var slides = s.wrapper.children('.' + s.params.slideClass); + + if(s.params.slidesPerView === 'auto' && !s.params.loopedSlides) s.params.loopedSlides = slides.length; + + s.loopedSlides = parseInt(s.params.loopedSlides || s.params.slidesPerView, 10); + s.loopedSlides = s.loopedSlides + s.params.loopAdditionalSlides; + if (s.loopedSlides > slides.length) { + s.loopedSlides = slides.length; + } + + var prependSlides = [], appendSlides = [], i; + slides.each(function (index, el) { + var slide = $(this); + if (index < s.loopedSlides) appendSlides.push(el); + if (index < slides.length && index >= slides.length - s.loopedSlides) prependSlides.push(el); + slide.attr('data-swiper-slide-index', index); + }); + for (i = 0; i < appendSlides.length; i++) { + s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass)); + } + for (i = prependSlides.length - 1; i >= 0; i--) { + s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass)); + } + }; + s.destroyLoop = function () { + s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove(); + s.slides.removeAttr('data-swiper-slide-index'); + }; + s.reLoop = function (updatePosition) { + var oldIndex = s.activeIndex - s.loopedSlides; + s.destroyLoop(); + s.createLoop(); + s.updateSlidesSize(); + if (updatePosition) { + s.slideTo(oldIndex + s.loopedSlides, 0, false); + } + + }; + s.fixLoop = function () { + var newIndex; + //Fix For Negative Oversliding + if (s.activeIndex < s.loopedSlides) { + newIndex = s.slides.length - s.loopedSlides * 3 + s.activeIndex; + newIndex = newIndex + s.loopedSlides; + s.slideTo(newIndex, 0, false, true); + } + //Fix For Positive Oversliding + else if ((s.params.slidesPerView === 'auto' && s.activeIndex >= s.loopedSlides * 2) || (s.activeIndex > s.slides.length - s.params.slidesPerView * 2)) { + newIndex = -s.slides.length + s.activeIndex + s.loopedSlides; + newIndex = newIndex + s.loopedSlides; + s.slideTo(newIndex, 0, false, true); + } + }; + /*========================= + Append/Prepend/Remove Slides + ===========================*/ + s.appendSlide = function (slides) { + if (s.params.loop) { + s.destroyLoop(); + } + if (typeof slides === 'object' && slides.length) { + for (var i = 0; i < slides.length; i++) { + if (slides[i]) s.wrapper.append(slides[i]); + } + } + else { + s.wrapper.append(slides); + } + if (s.params.loop) { + s.createLoop(); + } + if (!(s.params.observer && s.support.observer)) { + s.update(true); + } + }; + s.prependSlide = function (slides) { + if (s.params.loop) { + s.destroyLoop(); + } + var newActiveIndex = s.activeIndex + 1; + if (typeof slides === 'object' && slides.length) { + for (var i = 0; i < slides.length; i++) { + if (slides[i]) s.wrapper.prepend(slides[i]); + } + newActiveIndex = s.activeIndex + slides.length; + } + else { + s.wrapper.prepend(slides); + } + if (s.params.loop) { + s.createLoop(); + } + if (!(s.params.observer && s.support.observer)) { + s.update(true); + } + s.slideTo(newActiveIndex, 0, false); + }; + s.removeSlide = function (slidesIndexes) { + if (s.params.loop) { + s.destroyLoop(); + s.slides = s.wrapper.children('.' + s.params.slideClass); + } + var newActiveIndex = s.activeIndex, + indexToRemove; + if (typeof slidesIndexes === 'object' && slidesIndexes.length) { + for (var i = 0; i < slidesIndexes.length; i++) { + indexToRemove = slidesIndexes[i]; + if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove(); + if (indexToRemove < newActiveIndex) newActiveIndex--; + } + newActiveIndex = Math.max(newActiveIndex, 0); + } + else { + indexToRemove = slidesIndexes; + if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove(); + if (indexToRemove < newActiveIndex) newActiveIndex--; + newActiveIndex = Math.max(newActiveIndex, 0); + } + + if (s.params.loop) { + s.createLoop(); + } + + if (!(s.params.observer && s.support.observer)) { + s.update(true); + } + if (s.params.loop) { + s.slideTo(newActiveIndex + s.loopedSlides, 0, false); + } + else { + s.slideTo(newActiveIndex, 0, false); + } + + }; + s.removeAllSlides = function () { + var slidesIndexes = []; + for (var i = 0; i < s.slides.length; i++) { + slidesIndexes.push(i); + } + s.removeSlide(slidesIndexes); + }; + + + /*========================= + Effects + ===========================*/ + s.effects = { + fade: { + setTranslate: function () { + for (var i = 0; i < s.slides.length; i++) { + var slide = s.slides.eq(i); + var offset = slide[0].swiperSlideOffset; + var tx = -offset; + if (!s.params.virtualTranslate) tx = tx - s.translate; + var ty = 0; + if (!s.isHorizontal()) { + ty = tx; + tx = 0; + } + var slideOpacity = s.params.fade.crossFade ? + Math.max(1 - Math.abs(slide[0].progress), 0) : + 1 + Math.min(Math.max(slide[0].progress, -1), 0); + slide + .css({ + opacity: slideOpacity + }) + .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)'); + + } + + }, + setTransition: function (duration) { + s.slides.transition(duration); + if (s.params.virtualTranslate && duration !== 0) { + var eventTriggered = false; + s.slides.transitionEnd(function () { + if (eventTriggered) return; + if (!s) return; + eventTriggered = true; + s.animating = false; + var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd']; + for (var i = 0; i < triggerEvents.length; i++) { + s.wrapper.trigger(triggerEvents[i]); + } + }); + } + } + }, + flip: { + setTranslate: function () { + for (var i = 0; i < s.slides.length; i++) { + var slide = s.slides.eq(i); + var progress = slide[0].progress; + if (s.params.flip.limitRotation) { + progress = Math.max(Math.min(slide[0].progress, 1), -1); + } + var offset = slide[0].swiperSlideOffset; + var rotate = -180 * progress, + rotateY = rotate, + rotateX = 0, + tx = -offset, + ty = 0; + if (!s.isHorizontal()) { + ty = tx; + tx = 0; + rotateX = -rotateY; + rotateY = 0; + } + else if (s.rtl) { + rotateY = -rotateY; + } + + slide[0].style.zIndex = -Math.abs(Math.round(progress)) + s.slides.length; + + if (s.params.flip.slideShadows) { + //Set shadows + var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top'); + var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom'); + if (shadowBefore.length === 0) { + shadowBefore = $('
                  '); + slide.append(shadowBefore); + } + if (shadowAfter.length === 0) { + shadowAfter = $('
                  '); + slide.append(shadowAfter); + } + if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); + if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); + } + + slide + .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)'); + } + }, + setTransition: function (duration) { + s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + if (s.params.virtualTranslate && duration !== 0) { + var eventTriggered = false; + s.slides.eq(s.activeIndex).transitionEnd(function () { + if (eventTriggered) return; + if (!s) return; + if (!$(this).hasClass(s.params.slideActiveClass)) return; + eventTriggered = true; + s.animating = false; + var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd']; + for (var i = 0; i < triggerEvents.length; i++) { + s.wrapper.trigger(triggerEvents[i]); + } + }); + } + } + }, + cube: { + setTranslate: function () { + var wrapperRotate = 0, cubeShadow; + if (s.params.cube.shadow) { + if (s.isHorizontal()) { + cubeShadow = s.wrapper.find('.swiper-cube-shadow'); + if (cubeShadow.length === 0) { + cubeShadow = $('
                  '); + s.wrapper.append(cubeShadow); + } + cubeShadow.css({height: s.width + 'px'}); + } + else { + cubeShadow = s.container.find('.swiper-cube-shadow'); + if (cubeShadow.length === 0) { + cubeShadow = $('
                  '); + s.container.append(cubeShadow); + } + } + } + for (var i = 0; i < s.slides.length; i++) { + var slide = s.slides.eq(i); + var slideAngle = i * 90; + var round = Math.floor(slideAngle / 360); + if (s.rtl) { + slideAngle = -slideAngle; + round = Math.floor(-slideAngle / 360); + } + var progress = Math.max(Math.min(slide[0].progress, 1), -1); + var tx = 0, ty = 0, tz = 0; + if (i % 4 === 0) { + tx = - round * 4 * s.size; + tz = 0; + } + else if ((i - 1) % 4 === 0) { + tx = 0; + tz = - round * 4 * s.size; + } + else if ((i - 2) % 4 === 0) { + tx = s.size + round * 4 * s.size; + tz = s.size; + } + else if ((i - 3) % 4 === 0) { + tx = - s.size; + tz = 3 * s.size + s.size * 4 * round; + } + if (s.rtl) { + tx = -tx; + } + + if (!s.isHorizontal()) { + ty = tx; + tx = 0; + } + + var transform = 'rotateX(' + (s.isHorizontal() ? 0 : -slideAngle) + 'deg) rotateY(' + (s.isHorizontal() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)'; + if (progress <= 1 && progress > -1) { + wrapperRotate = i * 90 + progress * 90; + if (s.rtl) wrapperRotate = -i * 90 - progress * 90; + } + slide.transform(transform); + if (s.params.cube.slideShadows) { + //Set shadows + var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top'); + var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom'); + if (shadowBefore.length === 0) { + shadowBefore = $('
                  '); + slide.append(shadowBefore); + } + if (shadowAfter.length === 0) { + shadowAfter = $('
                  '); + slide.append(shadowAfter); + } + if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); + if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); + } + } + s.wrapper.css({ + '-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px', + '-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px', + '-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px', + 'transform-origin': '50% 50% -' + (s.size / 2) + 'px' + }); + + if (s.params.cube.shadow) { + if (s.isHorizontal()) { + cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')'); + } + else { + var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90; + var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2); + var scale1 = s.params.cube.shadowScale, + scale2 = s.params.cube.shadowScale / multiplier, + offset = s.params.cube.shadowOffset; + cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)'); + } + } + var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0; + s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (s.isHorizontal() ? 0 : wrapperRotate) + 'deg) rotateY(' + (s.isHorizontal() ? -wrapperRotate : 0) + 'deg)'); + }, + setTransition: function (duration) { + s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + if (s.params.cube.shadow && !s.isHorizontal()) { + s.container.find('.swiper-cube-shadow').transition(duration); + } + } + }, + coverflow: { + setTranslate: function () { + var transform = s.translate; + var center = s.isHorizontal() ? -transform + s.width / 2 : -transform + s.height / 2; + var rotate = s.isHorizontal() ? s.params.coverflow.rotate: -s.params.coverflow.rotate; + var translate = s.params.coverflow.depth; + //Each slide offset from center + for (var i = 0, length = s.slides.length; i < length; i++) { + var slide = s.slides.eq(i); + var slideSize = s.slidesSizesGrid[i]; + var slideOffset = slide[0].swiperSlideOffset; + var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier; + + var rotateY = s.isHorizontal() ? rotate * offsetMultiplier : 0; + var rotateX = s.isHorizontal() ? 0 : rotate * offsetMultiplier; + // var rotateZ = 0 + var translateZ = -translate * Math.abs(offsetMultiplier); + + var translateY = s.isHorizontal() ? 0 : s.params.coverflow.stretch * (offsetMultiplier); + var translateX = s.isHorizontal() ? s.params.coverflow.stretch * (offsetMultiplier) : 0; + + //Fix for ultra small values + if (Math.abs(translateX) < 0.001) translateX = 0; + if (Math.abs(translateY) < 0.001) translateY = 0; + if (Math.abs(translateZ) < 0.001) translateZ = 0; + if (Math.abs(rotateY) < 0.001) rotateY = 0; + if (Math.abs(rotateX) < 0.001) rotateX = 0; + + var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)'; + + slide.transform(slideTransform); + slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; + if (s.params.coverflow.slideShadows) { + //Set shadows + var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top'); + var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom'); + if (shadowBefore.length === 0) { + shadowBefore = $('
                  '); + slide.append(shadowBefore); + } + if (shadowAfter.length === 0) { + shadowAfter = $('
                  '); + slide.append(shadowAfter); + } + if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; + if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0; + } + } + + //Set correct perspective for IE10 + if (s.browser.ie) { + var ws = s.wrapper[0].style; + ws.perspectiveOrigin = center + 'px 50%'; + } + }, + setTransition: function (duration) { + s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + } + } + }; + + + /*========================= + Images Lazy Loading + ===========================*/ + s.lazy = { + initialImageLoaded: false, + loadImageInSlide: function (index, loadInDuplicate) { + if (typeof index === 'undefined') return; + if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true; + if (s.slides.length === 0) return; + + var slide = s.slides.eq(index); + var img = slide.find('.' + s.params.lazyLoadingClass + ':not(.' + s.params.lazyStatusLoadedClass + '):not(.' + s.params.lazyStatusLoadingClass + ')'); + if (slide.hasClass(s.params.lazyLoadingClass) && !slide.hasClass(s.params.lazyStatusLoadedClass) && !slide.hasClass(s.params.lazyStatusLoadingClass)) { + img = img.add(slide[0]); + } + if (img.length === 0) return; + + img.each(function () { + var _img = $(this); + _img.addClass(s.params.lazyStatusLoadingClass); + var background = _img.attr('data-background'); + var src = _img.attr('data-src'), + srcset = _img.attr('data-srcset'), + sizes = _img.attr('data-sizes'); + s.loadImage(_img[0], (src || background), srcset, sizes, false, function () { + if (typeof s === 'undefined' || s === null || !s) return; + if (background) { + _img.css('background-image', 'url("' + background + '")'); + _img.removeAttr('data-background'); + } + else { + if (srcset) { + _img.attr('srcset', srcset); + _img.removeAttr('data-srcset'); + } + if (sizes) { + _img.attr('sizes', sizes); + _img.removeAttr('data-sizes'); + } + if (src) { + _img.attr('src', src); + _img.removeAttr('data-src'); + } + + } + + _img.addClass(s.params.lazyStatusLoadedClass).removeClass(s.params.lazyStatusLoadingClass); + slide.find('.' + s.params.lazyPreloaderClass + ', .' + s.params.preloaderClass).remove(); + if (s.params.loop && loadInDuplicate) { + var slideOriginalIndex = slide.attr('data-swiper-slide-index'); + if (slide.hasClass(s.params.slideDuplicateClass)) { + var originalSlide = s.wrapper.children('[data-swiper-slide-index="' + slideOriginalIndex + '"]:not(.' + s.params.slideDuplicateClass + ')'); + s.lazy.loadImageInSlide(originalSlide.index(), false); + } + else { + var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + slideOriginalIndex + '"]'); + s.lazy.loadImageInSlide(duplicatedSlide.index(), false); + } + } + s.emit('onLazyImageReady', s, slide[0], _img[0]); + }); + + s.emit('onLazyImageLoad', s, slide[0], _img[0]); + }); + + }, + load: function () { + var i; + var slidesPerView = s.params.slidesPerView; + if (slidesPerView === 'auto') { + slidesPerView = 0; + } + if (!s.lazy.initialImageLoaded) s.lazy.initialImageLoaded = true; + if (s.params.watchSlidesVisibility) { + s.wrapper.children('.' + s.params.slideVisibleClass).each(function () { + s.lazy.loadImageInSlide($(this).index()); + }); + } + else { + if (slidesPerView > 1) { + for (i = s.activeIndex; i < s.activeIndex + slidesPerView ; i++) { + if (s.slides[i]) s.lazy.loadImageInSlide(i); + } + } + else { + s.lazy.loadImageInSlide(s.activeIndex); + } + } + if (s.params.lazyLoadingInPrevNext) { + if (slidesPerView > 1 || (s.params.lazyLoadingInPrevNextAmount && s.params.lazyLoadingInPrevNextAmount > 1)) { + var amount = s.params.lazyLoadingInPrevNextAmount; + var spv = slidesPerView; + var maxIndex = Math.min(s.activeIndex + spv + Math.max(amount, spv), s.slides.length); + var minIndex = Math.max(s.activeIndex - Math.max(spv, amount), 0); + // Next Slides + for (i = s.activeIndex + slidesPerView; i < maxIndex; i++) { + if (s.slides[i]) s.lazy.loadImageInSlide(i); + } + // Prev Slides + for (i = minIndex; i < s.activeIndex ; i++) { + if (s.slides[i]) s.lazy.loadImageInSlide(i); + } + } + else { + var nextSlide = s.wrapper.children('.' + s.params.slideNextClass); + if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index()); + + var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass); + if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index()); + } + } + }, + onTransitionStart: function () { + if (s.params.lazyLoading) { + if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) { + s.lazy.load(); + } + } + }, + onTransitionEnd: function () { + if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) { + s.lazy.load(); + } + } + }; + + + /*========================= + Scrollbar + ===========================*/ + s.scrollbar = { + isTouched: false, + setDragPosition: function (e) { + var sb = s.scrollbar; + var x = 0, y = 0; + var translate; + var pointerPosition = s.isHorizontal() ? + ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) : + ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ; + var position = (pointerPosition) - sb.track.offset()[s.isHorizontal() ? 'left' : 'top'] - sb.dragSize / 2; + var positionMin = -s.minTranslate() * sb.moveDivider; + var positionMax = -s.maxTranslate() * sb.moveDivider; + if (position < positionMin) { + position = positionMin; + } + else if (position > positionMax) { + position = positionMax; + } + position = -position / sb.moveDivider; + s.updateProgress(position); + s.setWrapperTranslate(position, true); + }, + dragStart: function (e) { + var sb = s.scrollbar; + sb.isTouched = true; + e.preventDefault(); + e.stopPropagation(); + + sb.setDragPosition(e); + clearTimeout(sb.dragTimeout); + + sb.track.transition(0); + if (s.params.scrollbarHide) { + sb.track.css('opacity', 1); + } + s.wrapper.transition(100); + sb.drag.transition(100); + s.emit('onScrollbarDragStart', s); + }, + dragMove: function (e) { + var sb = s.scrollbar; + if (!sb.isTouched) return; + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + sb.setDragPosition(e); + s.wrapper.transition(0); + sb.track.transition(0); + sb.drag.transition(0); + s.emit('onScrollbarDragMove', s); + }, + dragEnd: function (e) { + var sb = s.scrollbar; + if (!sb.isTouched) return; + sb.isTouched = false; + if (s.params.scrollbarHide) { + clearTimeout(sb.dragTimeout); + sb.dragTimeout = setTimeout(function () { + sb.track.css('opacity', 0); + sb.track.transition(400); + }, 1000); + + } + s.emit('onScrollbarDragEnd', s); + if (s.params.scrollbarSnapOnRelease) { + s.slideReset(); + } + }, + draggableEvents: (function () { + if ((s.params.simulateTouch === false && !s.support.touch)) return s.touchEventsDesktop; + else return s.touchEvents; + })(), + enableDraggable: function () { + var sb = s.scrollbar; + var target = s.support.touch ? sb.track : document; + $(sb.track).on(sb.draggableEvents.start, sb.dragStart); + $(target).on(sb.draggableEvents.move, sb.dragMove); + $(target).on(sb.draggableEvents.end, sb.dragEnd); + }, + disableDraggable: function () { + var sb = s.scrollbar; + var target = s.support.touch ? sb.track : document; + $(sb.track).off(sb.draggableEvents.start, sb.dragStart); + $(target).off(sb.draggableEvents.move, sb.dragMove); + $(target).off(sb.draggableEvents.end, sb.dragEnd); + }, + set: function () { + if (!s.params.scrollbar) return; + var sb = s.scrollbar; + sb.track = $(s.params.scrollbar); + if (s.params.uniqueNavElements && typeof s.params.scrollbar === 'string' && sb.track.length > 1 && s.container.find(s.params.scrollbar).length === 1) { + sb.track = s.container.find(s.params.scrollbar); + } + sb.drag = sb.track.find('.swiper-scrollbar-drag'); + if (sb.drag.length === 0) { + sb.drag = $('
                  '); + sb.track.append(sb.drag); + } + sb.drag[0].style.width = ''; + sb.drag[0].style.height = ''; + sb.trackSize = s.isHorizontal() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight; + + sb.divider = s.size / s.virtualSize; + sb.moveDivider = sb.divider * (sb.trackSize / s.size); + sb.dragSize = sb.trackSize * sb.divider; + + if (s.isHorizontal()) { + sb.drag[0].style.width = sb.dragSize + 'px'; + } + else { + sb.drag[0].style.height = sb.dragSize + 'px'; + } + + if (sb.divider >= 1) { + sb.track[0].style.display = 'none'; + } + else { + sb.track[0].style.display = ''; + } + if (s.params.scrollbarHide) { + sb.track[0].style.opacity = 0; + } + }, + setTranslate: function () { + if (!s.params.scrollbar) return; + var diff; + var sb = s.scrollbar; + var translate = s.translate || 0; + var newPos; + + var newSize = sb.dragSize; + newPos = (sb.trackSize - sb.dragSize) * s.progress; + if (s.rtl && s.isHorizontal()) { + newPos = -newPos; + if (newPos > 0) { + newSize = sb.dragSize - newPos; + newPos = 0; + } + else if (-newPos + sb.dragSize > sb.trackSize) { + newSize = sb.trackSize + newPos; + } + } + else { + if (newPos < 0) { + newSize = sb.dragSize + newPos; + newPos = 0; + } + else if (newPos + sb.dragSize > sb.trackSize) { + newSize = sb.trackSize - newPos; + } + } + if (s.isHorizontal()) { + if (s.support.transforms3d) { + sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)'); + } + else { + sb.drag.transform('translateX(' + (newPos) + 'px)'); + } + sb.drag[0].style.width = newSize + 'px'; + } + else { + if (s.support.transforms3d) { + sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)'); + } + else { + sb.drag.transform('translateY(' + (newPos) + 'px)'); + } + sb.drag[0].style.height = newSize + 'px'; + } + if (s.params.scrollbarHide) { + clearTimeout(sb.timeout); + sb.track[0].style.opacity = 1; + sb.timeout = setTimeout(function () { + sb.track[0].style.opacity = 0; + sb.track.transition(400); + }, 1000); + } + }, + setTransition: function (duration) { + if (!s.params.scrollbar) return; + s.scrollbar.drag.transition(duration); + } + }; + + + /*========================= + Controller + ===========================*/ + s.controller = { + LinearSpline: function (x, y) { + var binarySearch = (function() { + var maxIndex, minIndex, guess; + return function(array, val) { + minIndex = -1; + maxIndex = array.length; + while (maxIndex - minIndex > 1) + if (array[guess = maxIndex + minIndex >> 1] <= val) { + minIndex = guess; + } else { + maxIndex = guess; + } + return maxIndex; + }; + })(); + this.x = x; + this.y = y; + this.lastIndex = x.length - 1; + // Given an x value (x2), return the expected y2 value: + // (x1,y1) is the known point before given value, + // (x3,y3) is the known point after given value. + var i1, i3; + var l = this.x.length; + + this.interpolate = function (x2) { + if (!x2) return 0; + + // Get the indexes of x1 and x3 (the array indexes before and after given x2): + i3 = binarySearch(this.x, x2); + i1 = i3 - 1; + + // We have our indexes i1 & i3, so we can calculate already: + // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1 + return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1]; + }; + }, + //xxx: for now i will just save one spline function to to + getInterpolateFunction: function(c){ + if(!s.controller.spline) s.controller.spline = s.params.loop ? + new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) : + new s.controller.LinearSpline(s.snapGrid, c.snapGrid); + }, + setTranslate: function (translate, byController) { + var controlled = s.params.control; + var multiplier, controlledTranslate; + function setControlledTranslate(c) { + // this will create an Interpolate function based on the snapGrids + // x is the Grid of the scrolled scroller and y will be the controlled scroller + // it makes sense to create this only once and recall it for the interpolation + // the function does a lot of value caching for performance + translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate; + if (s.params.controlBy === 'slide') { + s.controller.getInterpolateFunction(c); + // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid + // but it did not work out + controlledTranslate = -s.controller.spline.interpolate(-translate); + } + + if(!controlledTranslate || s.params.controlBy === 'container'){ + multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate()); + controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate(); + } + + if (s.params.controlInverse) { + controlledTranslate = c.maxTranslate() - controlledTranslate; + } + c.updateProgress(controlledTranslate); + c.setWrapperTranslate(controlledTranslate, false, s); + c.updateActiveIndex(); + } + if (Array.isArray(controlled)) { + for (var i = 0; i < controlled.length; i++) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTranslate(controlled[i]); + } + } + } + else if (controlled instanceof Swiper && byController !== controlled) { + + setControlledTranslate(controlled); + } + }, + setTransition: function (duration, byController) { + var controlled = s.params.control; + var i; + function setControlledTransition(c) { + c.setWrapperTransition(duration, s); + if (duration !== 0) { + c.onTransitionStart(); + c.wrapper.transitionEnd(function(){ + if (!controlled) return; + if (c.params.loop && s.params.controlBy === 'slide') { + c.fixLoop(); + } + c.onTransitionEnd(); + + }); + } + } + if (Array.isArray(controlled)) { + for (i = 0; i < controlled.length; i++) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTransition(controlled[i]); + } + } + } + else if (controlled instanceof Swiper && byController !== controlled) { + setControlledTransition(controlled); + } + } + }; + + + /*========================= + Parallax + ===========================*/ + function setParallaxTransform(el, progress) { + el = $(el); + var p, pX, pY; + var rtlFactor = s.rtl ? -1 : 1; + + p = el.attr('data-swiper-parallax') || '0'; + pX = el.attr('data-swiper-parallax-x'); + pY = el.attr('data-swiper-parallax-y'); + if (pX || pY) { + pX = pX || '0'; + pY = pY || '0'; + } + else { + if (s.isHorizontal()) { + pX = p; + pY = '0'; + } + else { + pY = p; + pX = '0'; + } + } + + if ((pX).indexOf('%') >= 0) { + pX = parseInt(pX, 10) * progress * rtlFactor + '%'; + } + else { + pX = pX * progress * rtlFactor + 'px' ; + } + if ((pY).indexOf('%') >= 0) { + pY = parseInt(pY, 10) * progress + '%'; + } + else { + pY = pY * progress + 'px' ; + } + + el.transform('translate3d(' + pX + ', ' + pY + ',0px)'); + } + s.parallax = { + setTranslate: function () { + s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){ + setParallaxTransform(this, s.progress); + + }); + s.slides.each(function () { + var slide = $(this); + slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () { + var progress = Math.min(Math.max(slide[0].progress, -1), 1); + setParallaxTransform(this, progress); + }); + }); + }, + setTransition: function (duration) { + if (typeof duration === 'undefined') duration = s.params.speed; + s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){ + var el = $(this); + var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration; + if (duration === 0) parallaxDuration = 0; + el.transition(parallaxDuration); + }); + } + }; + + + /*========================= + Zoom + ===========================*/ + s.zoom = { + // "Global" Props + scale: 1, + currentScale: 1, + isScaling: false, + gesture: { + slide: undefined, + slideWidth: undefined, + slideHeight: undefined, + image: undefined, + imageWrap: undefined, + zoomMax: s.params.zoomMax + }, + image: { + isTouched: undefined, + isMoved: undefined, + currentX: undefined, + currentY: undefined, + minX: undefined, + minY: undefined, + maxX: undefined, + maxY: undefined, + width: undefined, + height: undefined, + startX: undefined, + startY: undefined, + touchesStart: {}, + touchesCurrent: {} + }, + velocity: { + x: undefined, + y: undefined, + prevPositionX: undefined, + prevPositionY: undefined, + prevTime: undefined + }, + // Calc Scale From Multi-touches + getDistanceBetweenTouches: function (e) { + if (e.targetTouches.length < 2) return 1; + var x1 = e.targetTouches[0].pageX, + y1 = e.targetTouches[0].pageY, + x2 = e.targetTouches[1].pageX, + y2 = e.targetTouches[1].pageY; + var distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); + return distance; + }, + // Events + onGestureStart: function (e) { + var z = s.zoom; + if (!s.support.gestures) { + if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) { + return; + } + z.gesture.scaleStart = z.getDistanceBetweenTouches(e); + } + if (!z.gesture.slide || !z.gesture.slide.length) { + z.gesture.slide = $(this); + if (z.gesture.slide.length === 0) z.gesture.slide = s.slides.eq(s.activeIndex); + z.gesture.image = z.gesture.slide.find('img, svg, canvas'); + z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass); + z.gesture.zoomMax = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax ; + if (z.gesture.imageWrap.length === 0) { + z.gesture.image = undefined; + return; + } + } + z.gesture.image.transition(0); + z.isScaling = true; + }, + onGestureChange: function (e) { + var z = s.zoom; + if (!s.support.gestures) { + if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) { + return; + } + z.gesture.scaleMove = z.getDistanceBetweenTouches(e); + } + if (!z.gesture.image || z.gesture.image.length === 0) return; + if (s.support.gestures) { + z.scale = e.scale * z.currentScale; + } + else { + z.scale = (z.gesture.scaleMove / z.gesture.scaleStart) * z.currentScale; + } + if (z.scale > z.gesture.zoomMax) { + z.scale = z.gesture.zoomMax - 1 + Math.pow((z.scale - z.gesture.zoomMax + 1), 0.5); + } + if (z.scale < s.params.zoomMin) { + z.scale = s.params.zoomMin + 1 - Math.pow((s.params.zoomMin - z.scale + 1), 0.5); + } + z.gesture.image.transform('translate3d(0,0,0) scale(' + z.scale + ')'); + }, + onGestureEnd: function (e) { + var z = s.zoom; + if (!s.support.gestures) { + if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2) { + return; + } + } + if (!z.gesture.image || z.gesture.image.length === 0) return; + z.scale = Math.max(Math.min(z.scale, z.gesture.zoomMax), s.params.zoomMin); + z.gesture.image.transition(s.params.speed).transform('translate3d(0,0,0) scale(' + z.scale + ')'); + z.currentScale = z.scale; + z.isScaling = false; + if (z.scale === 1) z.gesture.slide = undefined; + }, + onTouchStart: function (s, e) { + var z = s.zoom; + if (!z.gesture.image || z.gesture.image.length === 0) return; + if (z.image.isTouched) return; + if (s.device.os === 'android') e.preventDefault(); + z.image.isTouched = true; + z.image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + z.image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + }, + onTouchMove: function (e) { + var z = s.zoom; + if (!z.gesture.image || z.gesture.image.length === 0) return; + s.allowClick = false; + if (!z.image.isTouched || !z.gesture.slide) return; + + if (!z.image.isMoved) { + z.image.width = z.gesture.image[0].offsetWidth; + z.image.height = z.gesture.image[0].offsetHeight; + z.image.startX = s.getTranslate(z.gesture.imageWrap[0], 'x') || 0; + z.image.startY = s.getTranslate(z.gesture.imageWrap[0], 'y') || 0; + z.gesture.slideWidth = z.gesture.slide[0].offsetWidth; + z.gesture.slideHeight = z.gesture.slide[0].offsetHeight; + z.gesture.imageWrap.transition(0); + if (s.rtl) z.image.startX = -z.image.startX; + if (s.rtl) z.image.startY = -z.image.startY; + } + // Define if we need image drag + var scaledWidth = z.image.width * z.scale; + var scaledHeight = z.image.height * z.scale; + + if (scaledWidth < z.gesture.slideWidth && scaledHeight < z.gesture.slideHeight) return; + + z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0); + z.image.maxX = -z.image.minX; + z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0); + z.image.maxY = -z.image.minY; + + z.image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + z.image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + + if (!z.image.isMoved && !z.isScaling) { + if (s.isHorizontal() && + (Math.floor(z.image.minX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x < z.image.touchesStart.x) || + (Math.floor(z.image.maxX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x > z.image.touchesStart.x) + ) { + z.image.isTouched = false; + return; + } + else if (!s.isHorizontal() && + (Math.floor(z.image.minY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y < z.image.touchesStart.y) || + (Math.floor(z.image.maxY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y > z.image.touchesStart.y) + ) { + z.image.isTouched = false; + return; + } + } + e.preventDefault(); + e.stopPropagation(); + + z.image.isMoved = true; + z.image.currentX = z.image.touchesCurrent.x - z.image.touchesStart.x + z.image.startX; + z.image.currentY = z.image.touchesCurrent.y - z.image.touchesStart.y + z.image.startY; + + if (z.image.currentX < z.image.minX) { + z.image.currentX = z.image.minX + 1 - Math.pow((z.image.minX - z.image.currentX + 1), 0.8); + } + if (z.image.currentX > z.image.maxX) { + z.image.currentX = z.image.maxX - 1 + Math.pow((z.image.currentX - z.image.maxX + 1), 0.8); + } + + if (z.image.currentY < z.image.minY) { + z.image.currentY = z.image.minY + 1 - Math.pow((z.image.minY - z.image.currentY + 1), 0.8); + } + if (z.image.currentY > z.image.maxY) { + z.image.currentY = z.image.maxY - 1 + Math.pow((z.image.currentY - z.image.maxY + 1), 0.8); + } + + //Velocity + if (!z.velocity.prevPositionX) z.velocity.prevPositionX = z.image.touchesCurrent.x; + if (!z.velocity.prevPositionY) z.velocity.prevPositionY = z.image.touchesCurrent.y; + if (!z.velocity.prevTime) z.velocity.prevTime = Date.now(); + z.velocity.x = (z.image.touchesCurrent.x - z.velocity.prevPositionX) / (Date.now() - z.velocity.prevTime) / 2; + z.velocity.y = (z.image.touchesCurrent.y - z.velocity.prevPositionY) / (Date.now() - z.velocity.prevTime) / 2; + if (Math.abs(z.image.touchesCurrent.x - z.velocity.prevPositionX) < 2) z.velocity.x = 0; + if (Math.abs(z.image.touchesCurrent.y - z.velocity.prevPositionY) < 2) z.velocity.y = 0; + z.velocity.prevPositionX = z.image.touchesCurrent.x; + z.velocity.prevPositionY = z.image.touchesCurrent.y; + z.velocity.prevTime = Date.now(); + + z.gesture.imageWrap.transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)'); + }, + onTouchEnd: function (s, e) { + var z = s.zoom; + if (!z.gesture.image || z.gesture.image.length === 0) return; + if (!z.image.isTouched || !z.image.isMoved) { + z.image.isTouched = false; + z.image.isMoved = false; + return; + } + z.image.isTouched = false; + z.image.isMoved = false; + var momentumDurationX = 300; + var momentumDurationY = 300; + var momentumDistanceX = z.velocity.x * momentumDurationX; + var newPositionX = z.image.currentX + momentumDistanceX; + var momentumDistanceY = z.velocity.y * momentumDurationY; + var newPositionY = z.image.currentY + momentumDistanceY; + + //Fix duration + if (z.velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - z.image.currentX) / z.velocity.x); + if (z.velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - z.image.currentY) / z.velocity.y); + var momentumDuration = Math.max(momentumDurationX, momentumDurationY); + + z.image.currentX = newPositionX; + z.image.currentY = newPositionY; + + // Define if we need image drag + var scaledWidth = z.image.width * z.scale; + var scaledHeight = z.image.height * z.scale; + z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0); + z.image.maxX = -z.image.minX; + z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0); + z.image.maxY = -z.image.minY; + z.image.currentX = Math.max(Math.min(z.image.currentX, z.image.maxX), z.image.minX); + z.image.currentY = Math.max(Math.min(z.image.currentY, z.image.maxY), z.image.minY); + + z.gesture.imageWrap.transition(momentumDuration).transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)'); + }, + onTransitionEnd: function (s) { + var z = s.zoom; + if (z.gesture.slide && s.previousIndex !== s.activeIndex) { + z.gesture.image.transform('translate3d(0,0,0) scale(1)'); + z.gesture.imageWrap.transform('translate3d(0,0,0)'); + z.gesture.slide = z.gesture.image = z.gesture.imageWrap = undefined; + z.scale = z.currentScale = 1; + } + }, + // Toggle Zoom + toggleZoom: function (s, e) { + var z = s.zoom; + if (!z.gesture.slide) { + z.gesture.slide = s.clickedSlide ? $(s.clickedSlide) : s.slides.eq(s.activeIndex); + z.gesture.image = z.gesture.slide.find('img, svg, canvas'); + z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass); + } + if (!z.gesture.image || z.gesture.image.length === 0) return; + + var touchX, touchY, offsetX, offsetY, diffX, diffY, translateX, translateY, imageWidth, imageHeight, scaledWidth, scaledHeight, translateMinX, translateMinY, translateMaxX, translateMaxY, slideWidth, slideHeight; + + if (typeof z.image.touchesStart.x === 'undefined' && e) { + touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX; + touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY; + } + else { + touchX = z.image.touchesStart.x; + touchY = z.image.touchesStart.y; + } + + if (z.scale && z.scale !== 1) { + // Zoom Out + z.scale = z.currentScale = 1; + z.gesture.imageWrap.transition(300).transform('translate3d(0,0,0)'); + z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(1)'); + z.gesture.slide = undefined; + } + else { + // Zoom In + z.scale = z.currentScale = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax; + if (e) { + slideWidth = z.gesture.slide[0].offsetWidth; + slideHeight = z.gesture.slide[0].offsetHeight; + offsetX = z.gesture.slide.offset().left; + offsetY = z.gesture.slide.offset().top; + diffX = offsetX + slideWidth/2 - touchX; + diffY = offsetY + slideHeight/2 - touchY; + + imageWidth = z.gesture.image[0].offsetWidth; + imageHeight = z.gesture.image[0].offsetHeight; + scaledWidth = imageWidth * z.scale; + scaledHeight = imageHeight * z.scale; + + translateMinX = Math.min((slideWidth / 2 - scaledWidth / 2), 0); + translateMinY = Math.min((slideHeight / 2 - scaledHeight / 2), 0); + translateMaxX = -translateMinX; + translateMaxY = -translateMinY; + + translateX = diffX * z.scale; + translateY = diffY * z.scale; + + if (translateX < translateMinX) { + translateX = translateMinX; + } + if (translateX > translateMaxX) { + translateX = translateMaxX; + } + + if (translateY < translateMinY) { + translateY = translateMinY; + } + if (translateY > translateMaxY) { + translateY = translateMaxY; + } + } + else { + translateX = 0; + translateY = 0; + } + z.gesture.imageWrap.transition(300).transform('translate3d(' + translateX + 'px, ' + translateY + 'px,0)'); + z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(' + z.scale + ')'); + } + }, + // Attach/Detach Events + attachEvents: function (detach) { + var action = detach ? 'off' : 'on'; + + if (s.params.zoom) { + var target = s.slides; + var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false; + // Scale image + if (s.support.gestures) { + s.slides[action]('gesturestart', s.zoom.onGestureStart, passiveListener); + s.slides[action]('gesturechange', s.zoom.onGestureChange, passiveListener); + s.slides[action]('gestureend', s.zoom.onGestureEnd, passiveListener); + } + else if (s.touchEvents.start === 'touchstart') { + s.slides[action](s.touchEvents.start, s.zoom.onGestureStart, passiveListener); + s.slides[action](s.touchEvents.move, s.zoom.onGestureChange, passiveListener); + s.slides[action](s.touchEvents.end, s.zoom.onGestureEnd, passiveListener); + } + + // Move image + s[action]('touchStart', s.zoom.onTouchStart); + s.slides.each(function (index, slide){ + if ($(slide).find('.' + s.params.zoomContainerClass).length > 0) { + $(slide)[action](s.touchEvents.move, s.zoom.onTouchMove); + } + }); + s[action]('touchEnd', s.zoom.onTouchEnd); + + // Scale Out + s[action]('transitionEnd', s.zoom.onTransitionEnd); + if (s.params.zoomToggle) { + s.on('doubleTap', s.zoom.toggleZoom); + } + } + }, + init: function () { + s.zoom.attachEvents(); + }, + destroy: function () { + s.zoom.attachEvents(true); + } + }; + + + /*========================= + Plugins API. Collect all and init all plugins + ===========================*/ + s._plugins = []; + for (var plugin in s.plugins) { + var p = s.plugins[plugin](s, s.params[plugin]); + if (p) s._plugins.push(p); + } + // Method to call all plugins event/method + s.callPlugins = function (eventName) { + for (var i = 0; i < s._plugins.length; i++) { + if (eventName in s._plugins[i]) { + s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); + } + } + }; + + + /*========================= + Events/Callbacks/Plugins Emitter + ===========================*/ + function normalizeEventName (eventName) { + if (eventName.indexOf('on') !== 0) { + if (eventName[0] !== eventName[0].toUpperCase()) { + eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1); + } + else { + eventName = 'on' + eventName; + } + } + return eventName; + } + s.emitterEventListeners = { + + }; + s.emit = function (eventName) { + // Trigger callbacks + if (s.params[eventName]) { + s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); + } + var i; + // Trigger events + if (s.emitterEventListeners[eventName]) { + for (i = 0; i < s.emitterEventListeners[eventName].length; i++) { + s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); + } + } + // Trigger plugins + if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); + }; + s.on = function (eventName, handler) { + eventName = normalizeEventName(eventName); + if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = []; + s.emitterEventListeners[eventName].push(handler); + return s; + }; + s.off = function (eventName, handler) { + var i; + eventName = normalizeEventName(eventName); + if (typeof handler === 'undefined') { + // Remove all handlers for such event + s.emitterEventListeners[eventName] = []; + return s; + } + if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return; + for (i = 0; i < s.emitterEventListeners[eventName].length; i++) { + if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1); + } + return s; + }; + s.once = function (eventName, handler) { + eventName = normalizeEventName(eventName); + var _handler = function () { + handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]); + s.off(eventName, _handler); + }; + s.on(eventName, _handler); + return s; + }; + + + // Accessibility tools + s.a11y = { + makeFocusable: function ($el) { + $el.attr('tabIndex', '0'); + return $el; + }, + addRole: function ($el, role) { + $el.attr('role', role); + return $el; + }, + + addLabel: function ($el, label) { + $el.attr('aria-label', label); + return $el; + }, + + disable: function ($el) { + $el.attr('aria-disabled', true); + return $el; + }, + + enable: function ($el) { + $el.attr('aria-disabled', false); + return $el; + }, + + onEnterKey: function (event) { + if (event.keyCode !== 13) return; + if ($(event.target).is(s.params.nextButton)) { + s.onClickNext(event); + if (s.isEnd) { + s.a11y.notify(s.params.lastSlideMessage); + } + else { + s.a11y.notify(s.params.nextSlideMessage); + } + } + else if ($(event.target).is(s.params.prevButton)) { + s.onClickPrev(event); + if (s.isBeginning) { + s.a11y.notify(s.params.firstSlideMessage); + } + else { + s.a11y.notify(s.params.prevSlideMessage); + } + } + if ($(event.target).is('.' + s.params.bulletClass)) { + $(event.target)[0].click(); + } + }, + + liveRegion: $(''), + + notify: function (message) { + var notification = s.a11y.liveRegion; + if (notification.length === 0) return; + notification.html(''); + notification.html(message); + }, + init: function () { + // Setup accessibility + if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) { + s.a11y.makeFocusable(s.nextButton); + s.a11y.addRole(s.nextButton, 'button'); + s.a11y.addLabel(s.nextButton, s.params.nextSlideMessage); + } + if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) { + s.a11y.makeFocusable(s.prevButton); + s.a11y.addRole(s.prevButton, 'button'); + s.a11y.addLabel(s.prevButton, s.params.prevSlideMessage); + } + + $(s.container).append(s.a11y.liveRegion); + }, + initPagination: function () { + if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) { + s.bullets.each(function () { + var bullet = $(this); + s.a11y.makeFocusable(bullet); + s.a11y.addRole(bullet, 'button'); + s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1)); + }); + } + }, + destroy: function () { + if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove(); + } + }; + + + /*========================= + Init/Destroy + ===========================*/ + s.init = function () { + if (s.params.loop) s.createLoop(); + s.updateContainerSize(); + s.updateSlidesSize(); + s.updatePagination(); + if (s.params.scrollbar && s.scrollbar) { + s.scrollbar.set(); + if (s.params.scrollbarDraggable) { + s.scrollbar.enableDraggable(); + } + } + if (s.params.effect !== 'slide' && s.effects[s.params.effect]) { + if (!s.params.loop) s.updateProgress(); + s.effects[s.params.effect].setTranslate(); + } + if (s.params.loop) { + s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit); + } + else { + s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit); + if (s.params.initialSlide === 0) { + if (s.parallax && s.params.parallax) s.parallax.setTranslate(); + if (s.lazy && s.params.lazyLoading) { + s.lazy.load(); + s.lazy.initialImageLoaded = true; + } + } + } + s.attachEvents(); + if (s.params.observer && s.support.observer) { + s.initObservers(); + } + if (s.params.preloadImages && !s.params.lazyLoading) { + s.preloadImages(); + } + if (s.params.zoom && s.zoom) { + s.zoom.init(); + } + if (s.params.autoplay) { + s.startAutoplay(); + } + if (s.params.keyboardControl) { + if (s.enableKeyboardControl) s.enableKeyboardControl(); + } + if (s.params.mousewheelControl) { + if (s.enableMousewheelControl) s.enableMousewheelControl(); + } + // Deprecated hashnavReplaceState changed to replaceState for use in hashnav and history + if (s.params.hashnavReplaceState) { + s.params.replaceState = s.params.hashnavReplaceState; + } + if (s.params.history) { + if (s.history) s.history.init(); + } + if (s.params.hashnav) { + if (s.hashnav) s.hashnav.init(); + } + if (s.params.a11y && s.a11y) s.a11y.init(); + s.emit('onInit', s); + }; + + // Cleanup dynamic styles + s.cleanupStyles = function () { + // Container + s.container.removeClass(s.classNames.join(' ')).removeAttr('style'); + + // Wrapper + s.wrapper.removeAttr('style'); + + // Slides + if (s.slides && s.slides.length) { + s.slides + .removeClass([ + s.params.slideVisibleClass, + s.params.slideActiveClass, + s.params.slideNextClass, + s.params.slidePrevClass + ].join(' ')) + .removeAttr('style') + .removeAttr('data-swiper-column') + .removeAttr('data-swiper-row'); + } + + // Pagination/Bullets + if (s.paginationContainer && s.paginationContainer.length) { + s.paginationContainer.removeClass(s.params.paginationHiddenClass); + } + if (s.bullets && s.bullets.length) { + s.bullets.removeClass(s.params.bulletActiveClass); + } + + // Buttons + if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass); + if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass); + + // Scrollbar + if (s.params.scrollbar && s.scrollbar) { + if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style'); + if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style'); + } + }; + + // Destroy + s.destroy = function (deleteInstance, cleanupStyles) { + // Detach evebts + s.detachEvents(); + // Stop autoplay + s.stopAutoplay(); + // Disable draggable + if (s.params.scrollbar && s.scrollbar) { + if (s.params.scrollbarDraggable) { + s.scrollbar.disableDraggable(); + } + } + // Destroy loop + if (s.params.loop) { + s.destroyLoop(); + } + // Cleanup styles + if (cleanupStyles) { + s.cleanupStyles(); + } + // Disconnect observer + s.disconnectObservers(); + + // Destroy zoom + if (s.params.zoom && s.zoom) { + s.zoom.destroy(); + } + // Disable keyboard/mousewheel + if (s.params.keyboardControl) { + if (s.disableKeyboardControl) s.disableKeyboardControl(); + } + if (s.params.mousewheelControl) { + if (s.disableMousewheelControl) s.disableMousewheelControl(); + } + // Disable a11y + if (s.params.a11y && s.a11y) s.a11y.destroy(); + // Delete history popstate + if (s.params.history && !s.params.replaceState) { + window.removeEventListener('popstate', s.history.setHistoryPopState); + } + if (s.params.hashnav && s.hashnav) { + s.hashnav.destroy(); + } + // Destroy callback + s.emit('onDestroy'); + // Delete instance + if (deleteInstance !== false) s = null; + }; + + s.init(); + + + + // Return swiper instance + return s; + }; + + /*================================================== + Prototype + ====================================================*/ + Swiper.prototype = { + isSafari: (function () { + var ua = window.navigator.userAgent.toLowerCase(); + return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0); + })(), + isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent), + isArray: function (arr) { + return Object.prototype.toString.apply(arr) === '[object Array]'; + }, + /*================================================== + Browser + ====================================================*/ + browser: { + ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled, + ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1), + lteIE9: (function() { + // create temporary DIV + var div = document.createElement('div'); + // add content to tmp DIV which is wrapped into the IE HTML conditional statement + div.innerHTML = ''; + // return true / false value based on what will browser render + return div.getElementsByTagName('i').length === 1; + })() + }, + /*================================================== + Devices + ====================================================*/ + device: (function () { + var ua = window.navigator.userAgent; + var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); + var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); + var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); + var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); + return { + ios: ipad || iphone || ipod, + android: android + }; + })(), + /*================================================== + Feature Detection + ====================================================*/ + support: { + touch : (window.Modernizr && Modernizr.touch === true) || (function () { + return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch); + })(), + + transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () { + var div = document.createElement('div').style; + return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div); + })(), + + flexbox: (function () { + var div = document.createElement('div').style; + var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' '); + for (var i = 0; i < styles.length; i++) { + if (styles[i] in div) return true; + } + })(), + + observer: (function () { + return ('MutationObserver' in window || 'WebkitMutationObserver' in window); + })(), + + passiveListener: (function () { + var supportsPassive = false; + try { + var opts = Object.defineProperty({}, 'passive', { + get: function() { + supportsPassive = true; + } + }); + window.addEventListener('testPassiveListener', null, opts); + } catch (e) {} + return supportsPassive; + })(), + + gestures: (function () { + return 'ongesturestart' in window; + })() + }, + /*================================================== + Plugins + ====================================================*/ + plugins: {} + }; + + +})(); + +//# sourceMappingURL=framework7.js.map diff --git a/bower_components/framework7/dist/js/framework7.js.map b/bower_components/framework7/dist/js/framework7.js.map new file mode 100644 index 00000000..b6458acc --- /dev/null +++ b/bower_components/framework7/dist/js/framework7.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["dom7.js","template7.js","wrap-start.js","f7-intro.js","views.js","navbars.js","searchbar.js","messagebar.js","xhr.js","pages.js","router.js","modals.js","progressbar.js","panels.js","lazy-load.js","material-preloader.js","messages.js","swipeout.js","sortable.js","smart-select.js","virtual-list.js","pull-to-refresh.js","infinite-scroll.js","scroll-toolbars.js","material-tabbar.js","tabs.js","accordion.js","fast-clicks.js","clicks.js","resize.js","forms-storage.js","forms-ajax.js","forms-textarea.js","material-inputs.js","push-state.js","swiper-init.js","photo-browser.js","autocomplete.js","picker.js","calendar.js","notifications.js","data-table.js","template7-templates.js","plugins.js","init.js","f7-outro.js","proto-support.js","proto-device.js","proto-plugins.js","swiper.js","wrap-end.js"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACv1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACheA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/VA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3hBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3pBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9mBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACv+BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjHA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACn9HA;AACA","file":"framework7.js","sourcesContent":["/**\n * Dom7 1.6.2\n * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API\n * http://framework7.io/docs/dom.html\n * \n * Copyright 2017, Vladimir Kharlampidi\n * The iDangero.us\n * http://www.idangero.us/\n * \n * Licensed under MIT\n * \n * Released on: May 11, 2017\n */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.Dom7 = factory());\n}(this, (function () { 'use strict';\n\nvar Dom7 = function Dom7(arr) {\n var self = this;\n // Create array-like object\n for (var i = 0; i < arr.length; i += 1) {\n self[i] = arr[i];\n }\n self.length = arr.length;\n // Return collection with methods\n return this;\n};\n\nfunction $(selector, context) {\n var arr = [];\n var i = 0;\n if (selector && !context) {\n if (selector instanceof Dom7) {\n return selector;\n }\n }\n if (selector) {\n // String\n if (typeof selector === 'string') {\n var els;\n var tempParent;\n var html = selector.trim();\n if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {\n var toCreate = 'div';\n if (html.indexOf(':~]/)) {\n // Pure ID selector\n els = [document.getElementById(selector.trim().split('#')[1])];\n } else {\n // Other selectors\n els = (context || document).querySelectorAll(selector.trim());\n }\n for (i = 0; i < els.length; i += 1) {\n if (els[i]) { arr.push(els[i]); }\n }\n }\n } else if (selector.nodeType || selector === window || selector === document) {\n // Node/element\n arr.push(selector);\n } else if (selector.length > 0 && selector[0].nodeType) {\n // Array of elements or instance of Dom\n for (i = 0; i < selector.length; i += 1) {\n arr.push(selector[i]);\n }\n }\n }\n return new Dom7(arr);\n}\n\n// Remove Diacritics\nvar defaultDiacriticsRemovalap = [\n { base: 'A', letters: '\\u0041\\u24B6\\uFF21\\u00C0\\u00C1\\u00C2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\u00C3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\u00C4\\u01DE\\u1EA2\\u00C5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F' },\n { base: 'AA', letters: '\\uA732' },\n { base: 'AE', letters: '\\u00C6\\u01FC\\u01E2' },\n { base: 'AO', letters: '\\uA734' },\n { base: 'AU', letters: '\\uA736' },\n { base: 'AV', letters: '\\uA738\\uA73A' },\n { base: 'AY', letters: '\\uA73C' },\n { base: 'B', letters: '\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181' },\n { base: 'C', letters: '\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E' },\n { base: 'D', letters: '\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779' },\n { base: 'DZ', letters: '\\u01F1\\u01C4' },\n { base: 'Dz', letters: '\\u01F2\\u01C5' },\n { base: 'E', letters: '\\u0045\\u24BA\\uFF25\\u00C8\\u00C9\\u00CA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\u00CB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E' },\n { base: 'F', letters: '\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B' },\n { base: 'G', letters: '\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E' },\n { base: 'H', letters: '\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D' },\n { base: 'I', letters: '\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197' },\n { base: 'J', letters: '\\u004A\\u24BF\\uFF2A\\u0134\\u0248' },\n { base: 'K', letters: '\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2' },\n { base: 'L', letters: '\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780' },\n { base: 'LJ', letters: '\\u01C7' },\n { base: 'Lj', letters: '\\u01C8' },\n { base: 'M', letters: '\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C' },\n { base: 'N', letters: '\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4' },\n { base: 'NJ', letters: '\\u01CA' },\n { base: 'Nj', letters: '\\u01CB' },\n { base: 'O', letters: '\\u004F\\u24C4\\uFF2F\\u00D2\\u00D3\\u00D4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\u00D5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\u00D6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\u00D8\\u01FE\\u0186\\u019F\\uA74A\\uA74C' },\n { base: 'OI', letters: '\\u01A2' },\n { base: 'OO', letters: '\\uA74E' },\n { base: 'OU', letters: '\\u0222' },\n { base: 'OE', letters: '\\u008C\\u0152' },\n { base: 'oe', letters: '\\u009C\\u0153' },\n { base: 'P', letters: '\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754' },\n { base: 'Q', letters: '\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A' },\n { base: 'R', letters: '\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782' },\n { base: 'S', letters: '\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784' },\n { base: 'T', letters: '\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786' },\n { base: 'TZ', letters: '\\uA728' },\n { base: 'U', letters: '\\u0055\\u24CA\\uFF35\\u00D9\\u00DA\\u00DB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\u00DC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244' },\n { base: 'V', letters: '\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245' },\n { base: 'VY', letters: '\\uA760' },\n { base: 'W', letters: '\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72' },\n { base: 'X', letters: '\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C' },\n { base: 'Y', letters: '\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE' },\n { base: 'Z', letters: '\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762' },\n { base: 'a', letters: '\\u0061\\u24D0\\uFF41\\u1E9A\\u00E0\\u00E1\\u00E2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\u00E3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\u00E4\\u01DF\\u1EA3\\u00E5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250' },\n { base: 'aa', letters: '\\uA733' },\n { base: 'ae', letters: '\\u00E6\\u01FD\\u01E3' },\n { base: 'ao', letters: '\\uA735' },\n { base: 'au', letters: '\\uA737' },\n { base: 'av', letters: '\\uA739\\uA73B' },\n { base: 'ay', letters: '\\uA73D' },\n { base: 'b', letters: '\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253' },\n { base: 'c', letters: '\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184' },\n { base: 'd', letters: '\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A' },\n { base: 'dz', letters: '\\u01F3\\u01C6' },\n { base: 'e', letters: '\\u0065\\u24D4\\uFF45\\u00E8\\u00E9\\u00EA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\u00EB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD' },\n { base: 'f', letters: '\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C' },\n { base: 'g', letters: '\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F' },\n { base: 'h', letters: '\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265' },\n { base: 'hv', letters: '\\u0195' },\n { base: 'i', letters: '\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131' },\n { base: 'j', letters: '\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249' },\n { base: 'k', letters: '\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3' },\n { base: 'l', letters: '\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747' },\n { base: 'lj', letters: '\\u01C9' },\n { base: 'm', letters: '\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F' },\n { base: 'n', letters: '\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5' },\n { base: 'nj', letters: '\\u01CC' },\n { base: 'o', letters: '\\u006F\\u24DE\\uFF4F\\u00F2\\u00F3\\u00F4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\u00F5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\u00F6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\u00F8\\u01FF\\u0254\\uA74B\\uA74D\\u0275' },\n { base: 'oi', letters: '\\u01A3' },\n { base: 'ou', letters: '\\u0223' },\n { base: 'oo', letters: '\\uA74F' },\n { base: 'p', letters: '\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755' },\n { base: 'q', letters: '\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759' },\n { base: 'r', letters: '\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783' },\n { base: 's', letters: '\\u0073\\u24E2\\uFF53\\u00DF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B' },\n { base: 't', letters: '\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787' },\n { base: 'tz', letters: '\\uA729' },\n { base: 'u', letters: '\\u0075\\u24E4\\uFF55\\u00F9\\u00FA\\u00FB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\u00FC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289' },\n { base: 'v', letters: '\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C' },\n { base: 'vy', letters: '\\uA761' },\n { base: 'w', letters: '\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73' },\n { base: 'x', letters: '\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D' },\n { base: 'y', letters: '\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF' },\n { base: 'z', letters: '\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763' } ];\n\nvar diacriticsMap = {};\nfor (var i = 0; i < defaultDiacriticsRemovalap.length; i += 1) {\n var letters = defaultDiacriticsRemovalap[i].letters;\n for (var j = 0; j < letters.length; j += 1) {\n diacriticsMap[letters[j]] = defaultDiacriticsRemovalap[i].base;\n }\n}\n\nvar Utils = {\n parseUrlQuery: function parseUrlQuery(url) {\n var query = {};\n var urlToParse = url || window.location.href;\n var i;\n var params;\n var param;\n var length;\n if (typeof urlToParse === 'string' && urlToParse.length) {\n urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\\S*\\?/, '') : '';\n params = urlToParse.split('&').filter(function (paramsPart) { return paramsPart !== ''; });\n length = params.length;\n\n for (i = 0; i < length; i += 1) {\n param = params[i].replace(/#\\S+/g, '').split('=');\n query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';\n }\n }\n return query;\n },\n isArray: function isArray(arr) {\n return Array.isArray(arr);\n },\n each: function each(obj, callback) {\n // Check it's iterable\n // TODO: Should probably raise a value error here\n if (typeof obj !== 'object') { return; }\n // Don't bother continuing without a callback\n if (!callback) { return; }\n if (Array.isArray(obj) || obj instanceof Dom7) {\n // Array\n for (var i = 0; i < obj.length; i++) {\n // If callback returns false\n if (callback(i, obj[i]) === false) {\n // Break out of the loop\n return;\n }\n }\n } else {\n // Object\n for (var prop in obj) {\n // Check the propertie belongs to the object\n // not it's prototype\n if (obj.hasOwnProperty(prop)) {\n // If the callback returns false\n if (callback(prop, obj[prop]) === false) {\n // Break out of the loop;\n return;\n }\n }\n }\n }\n },\n unique: function unique(arr) {\n var uniqueArray = [];\n for (var i = 0; i < arr.length; i += 1) {\n if (uniqueArray.indexOf(arr[i]) === -1) { uniqueArray.push(arr[i]); }\n }\n return uniqueArray;\n },\n serializeObject: function serializeObject(obj, parents) {\n if ( parents === void 0 ) parents = [];\n\n if (typeof obj === 'string') { return obj; }\n var resultArray = [];\n var separator = '&';\n var newParents;\n function varName(name) {\n if (parents.length > 0) {\n var parentParts = '';\n for (var j = 0; j < parents.length; j += 1) {\n if (j === 0) { parentParts += parents[j]; }\n else { parentParts += \"[\" + (encodeURIComponent(parents[j])) + \"]\"; }\n }\n return (parentParts + \"[\" + (encodeURIComponent(name)) + \"]\");\n }\n return encodeURIComponent(name);\n }\n function varValue(value) {\n return encodeURIComponent(value);\n }\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n var toPush = (void 0);\n if (Array.isArray(obj[prop])) {\n toPush = [];\n for (var i = 0; i < obj[prop].length; i += 1) {\n if (!Array.isArray(obj[prop][i]) && typeof obj[prop][i] === 'object') {\n newParents = parents.slice();\n newParents.push(prop);\n newParents.push(String(i));\n toPush.push(Utils.serializeObject(obj[prop][i], newParents));\n } else {\n toPush.push(((varName(prop)) + \"[]=\" + (varValue(obj[prop][i]))));\n }\n }\n if (toPush.length > 0) { resultArray.push(toPush.join(separator)); }\n } else if (obj[prop] === null || obj[prop] === '') {\n resultArray.push(((varName(prop)) + \"=\"));\n } else if (typeof obj[prop] === 'object') {\n // Object, convert to named array\n newParents = parents.slice();\n newParents.push(prop);\n toPush = Utils.serializeObject(obj[prop], newParents);\n if (toPush !== '') { resultArray.push(toPush); }\n } else if (typeof obj[prop] !== 'undefined' && obj[prop] !== '') {\n // Should be string or plain value\n resultArray.push(((varName(prop)) + \"=\" + (varValue(obj[prop]))));\n } else if (obj[prop] === '') { resultArray.push(varName(prop)); }\n }\n }\n return resultArray.join(separator);\n },\n toCamelCase: function toCamelCase(string) {\n return string.toLowerCase().replace(/-(.)/g, function (match, group1) { return group1.toUpperCase(); });\n },\n dataset: function dataset(el) {\n return $(el).dataset();\n },\n getTranslate: function getTranslate(el, axis) {\n if ( axis === void 0 ) axis = 'x';\n\n var curStyle = window.getComputedStyle(el, null);\n var matrix;\n var curTransform;\n var transformMatrix;\n\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(function map(a) {\n return a.replace(',', '.');\n }).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) { curTransform = transformMatrix.m41; }\n // Crazy IE10 Matrix\n else if (matrix.length === 16) { curTransform = parseFloat(matrix[12]); }\n // Normal Browsers\n else { curTransform = parseFloat(matrix[4]); }\n }\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) { curTransform = transformMatrix.m42; }\n // Crazy IE10 Matrix\n else if (matrix.length === 16) { curTransform = parseFloat(matrix[13]); }\n // Normal Browsers\n else { curTransform = parseFloat(matrix[5]); }\n }\n\n return curTransform || 0;\n },\n requestAnimationFrame: function requestAnimationFrame(callback) {\n if (window.requestAnimationFrame) { return window.requestAnimationFrame(callback); }\n else if (window.webkitRequestAnimationFrame) { return window.webkitRequestAnimationFrame(callback); }\n return window.setTimeout(callback, 1000 / 60);\n },\n cancelAnimationFrame: function cancelAnimationFrame(id) {\n if (window.cancelAnimationFrame) { return window.cancelAnimationFrame(id); }\n else if (window.webkitCancelAnimationFrame) { return window.webkitCancelAnimationFrame(id); }\n return window.clearTimeout(id);\n },\n supportTouch: !!(('ontouchstart' in window) || (window.DocumentTouch && document instanceof window.DocumentTouch)),\n removeDiacritics: function removeDiacritics(str) {\n return str.replace(/[^\\u0000-\\u007E]/g, function (a) { return diacriticsMap[a] || a; });\n },\n extend: function extend() {\n var args = [], len$1 = arguments.length;\n while ( len$1-- ) args[ len$1 ] = arguments[ len$1 ];\n\n var to = Object(args[0]);\n for (var i = 1; i < args.length; i += 1) {\n var nextSource = args[i];\n if (nextSource !== undefined && nextSource !== null) {\n var keysArray = Object.keys(Object(nextSource));\n for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n var nextKey = keysArray[nextIndex];\n var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n if (typeof to[nextKey] === 'object' && typeof nextSource[nextKey] === 'object') {\n Utils.extend(to[nextKey], nextSource[nextKey]);\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n return to;\n },\n};\n\n// Aliases\nUtils.parseQuery = Utils.parseUrlQuery;\nUtils.param = Utils.serializeObject;\n\n// Global Ajax Setup\nvar globalAjaxOptions = {};\n$.ajaxSetup = function ajaxSetup(options) {\n if (options.type && !options.method) { options.method = options.type; }\n Utils.each(options, function (optionName, optionValue) {\n globalAjaxOptions[optionName] = optionValue;\n });\n};\n\n// JSONP Requests\nvar jsonpRequests = 0;\n\n// Ajax\nfunction Ajax(options) {\n var defaults = {\n method: 'GET',\n data: false,\n async: true,\n cache: true,\n user: '',\n password: '',\n headers: {},\n xhrFields: {},\n statusCode: {},\n processData: true,\n dataType: 'text',\n contentType: 'application/x-www-form-urlencoded',\n timeout: 0,\n };\n var callbacks = ['beforeSend', 'error', 'complete', 'success', 'statusCode'];\n\n // For jQuery guys\n if (options.type) { options.method = options.type; }\n\n // Global options\n var globals = globalAjaxOptions;\n\n // Merge global and defaults\n Utils.each(globals, function (globalOptionName, globalOptionValue) {\n if (callbacks.indexOf(globalOptionName) < 0) { defaults[globalOptionName] = globalOptionValue; }\n });\n\n // Function to run XHR callbacks and events\n function fireAjaxCallback(eventName, eventData, callbackName) {\n var a = arguments;\n if (eventName) { $(document).trigger(eventName, eventData); }\n if (callbackName) {\n // Global callback\n if (callbackName in globals) { globals[callbackName](a[3], a[4], a[5], a[6]); }\n // Options callback\n if (options[callbackName]) { options[callbackName](a[3], a[4], a[5], a[6]); }\n }\n }\n\n // Merge options and defaults\n Utils.each(defaults, function (prop, defaultValue) {\n if (!(prop in options)) { options[prop] = defaultValue; }\n });\n\n // Default URL\n if (!options.url) {\n options.url = window.location.toString();\n }\n // Parameters Prefix\n var paramsPrefix = options.url.indexOf('?') >= 0 ? '&' : '?';\n\n // UC method\n var method = options.method.toUpperCase();\n\n // Data to modify GET URL\n if ((method === 'GET' || method === 'HEAD' || method === 'OPTIONS' || method === 'DELETE') && options.data) {\n var stringData;\n if (typeof options.data === 'string') {\n // Should be key=value string\n if (options.data.indexOf('?') >= 0) { stringData = options.data.split('?')[1]; }\n else { stringData = options.data; }\n } else {\n // Should be key=value object\n stringData = Utils.serializeObject(options.data);\n }\n if (stringData.length) {\n options.url += paramsPrefix + stringData;\n if (paramsPrefix === '?') { paramsPrefix = '&'; }\n }\n }\n // JSONP\n if (options.dataType === 'json' && options.url.indexOf('callback=') >= 0) {\n var callbackName = \"f7jsonp_\" + (Date.now() + ((jsonpRequests += 1)));\n var abortTimeout;\n var callbackSplit = options.url.split('callback=');\n var requestUrl = (callbackSplit[0]) + \"callback=\" + callbackName;\n if (callbackSplit[1].indexOf('&') >= 0) {\n var addVars = callbackSplit[1].split('&').filter(function (el) { return el.indexOf('=') > 0; }).join('&');\n if (addVars.length > 0) { requestUrl += \"&\" + addVars; }\n }\n\n // Create script\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.onerror = function onerror() {\n clearTimeout(abortTimeout);\n fireAjaxCallback(undefined, undefined, 'error', null, 'scripterror');\n fireAjaxCallback('ajaxComplete ajax:complete', { scripterror: true }, 'complete', null, 'scripterror');\n };\n script.src = requestUrl;\n\n // Handler\n window[callbackName] = function jsonpCallback(data) {\n clearTimeout(abortTimeout);\n fireAjaxCallback(undefined, undefined, 'success', data);\n script.parentNode.removeChild(script);\n script = null;\n delete window[callbackName];\n };\n document.querySelector('head').appendChild(script);\n\n if (options.timeout > 0) {\n abortTimeout = setTimeout(function () {\n script.parentNode.removeChild(script);\n script = null;\n fireAjaxCallback(undefined, undefined, 'error', null, 'timeout');\n }, options.timeout);\n }\n\n return;\n }\n\n // Cache for GET/HEAD requests\n if (method === 'GET' || method === 'HEAD' || method === 'OPTIONS' || method === 'DELETE') {\n if (options.cache === false) {\n options.url += paramsPrefix + \"_nocache\" + (Date.now());\n }\n }\n\n // Create XHR\n var xhr = new XMLHttpRequest();\n\n // Save Request URL\n xhr.requestUrl = options.url;\n xhr.requestParameters = options;\n\n // Open XHR\n xhr.open(method, options.url, options.async, options.user, options.password);\n\n // Create POST Data\n var postData = null;\n\n if ((method === 'POST' || method === 'PUT' || method === 'PATCH') && options.data) {\n if (options.processData) {\n var postDataInstances = [ArrayBuffer, Blob, Document, FormData];\n // Post Data\n if (postDataInstances.indexOf(options.data.constructor) >= 0) {\n postData = options.data;\n } else {\n // POST Headers\n var boundary = \"---------------------------\" + (Date.now().toString(16));\n\n if (options.contentType === 'multipart\\/form-data') {\n xhr.setRequestHeader('Content-Type', (\"multipart/form-data; boundary=\" + boundary));\n } else {\n xhr.setRequestHeader('Content-Type', options.contentType);\n }\n postData = '';\n var data = Utils.serializeObject(options.data);\n if (options.contentType === 'multipart\\/form-data') {\n boundary = \"---------------------------\" + (Date.now().toString(16));\n data = data.split('&');\n var newData = [];\n for (var i = 0; i < data.length; i += 1) {\n newData.push('Content-Disposition: form-data; name=\"' + _data[i].split('=')[0] + '\"\\r\\n\\r\\n' + _data[i].split('=')[1] + '\\r\\n');\n }\n postData = \"--\" + boundary + \"\\r\\n\" + (newData.join((\"--\" + boundary + \"\\r\\n\"))) + \"--\" + boundary + \"--\\r\\n\";\n } else {\n postData = data;\n }\n }\n } else {\n postData = options.data;\n }\n }\n\n // Additional headers\n if (options.headers) {\n Utils.each(options.headers, function (headerName, headerCallback) {\n xhr.setRequestHeader(headerName, headerCallback);\n });\n }\n\n // Check for crossDomain\n if (typeof options.crossDomain === 'undefined') {\n options.crossDomain = /^([\\w-]+:)?\\/\\/([^\\/]+)/.test(options.url) && RegExp.$2 !== window.location.host;\n }\n\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n }\n\n if (options.xhrFields) {\n Utils.each(options.xhrFields, function (fieldName, fieldValue) {\n xhr[fieldName] = fieldValue;\n });\n }\n\n var xhrTimeout;\n // Handle XHR\n xhr.onload = function onload(e) {\n if (xhrTimeout) { clearTimeout(xhrTimeout); }\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 0) {\n var responseData;\n if (options.dataType === 'json') {\n try {\n responseData = JSON.parse(xhr.responseText);\n fireAjaxCallback('ajaxSuccess ajax:success', { xhr: xhr }, 'success', responseData, xhr.status, xhr);\n } catch (err) {\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr, parseerror: true }, 'error', xhr, 'parseerror');\n }\n } else {\n responseData = xhr.responseType === 'text' || xhr.responseType === '' ? xhr.responseText : xhr.response;\n fireAjaxCallback('ajaxSuccess ajax:success', { xhr: xhr }, 'success', responseData, xhr.status, xhr);\n }\n } else {\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr }, 'error', xhr, xhr.status);\n }\n if (options.statusCode) {\n if (globals.statusCode && globals.statusCode[xhr.status]) { globals.statusCode[xhr.status](xhr); }\n if (options.statusCode[xhr.status]) { options.statusCode[xhr.status](xhr); }\n }\n fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr }, 'complete', xhr, xhr.status);\n };\n\n xhr.onerror = function onerror(e) {\n if (xhrTimeout) { clearTimeout(xhrTimeout); }\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr }, 'error', xhr, xhr.status);\n fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr, error: true }, 'complete', xhr, 'error');\n };\n\n // Ajax start callback\n fireAjaxCallback('ajaxStart ajax:start', { xhr: xhr }, 'start', xhr);\n fireAjaxCallback(undefined, undefined, 'beforeSend', xhr);\n\n // Timeout\n if (options.timeout > 0) {\n xhr.onabort = function onabort() {\n if (xhrTimeout) { clearTimeout(xhrTimeout); }\n };\n xhrTimeout = setTimeout(function () {\n xhr.abort();\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr, timeout: true }, 'error', xhr, 'timeout');\n fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr, timeout: true }, 'complete', xhr, 'timeout');\n }, options.timeout);\n }\n\n // Send XHR\n xhr.send(postData);\n\n // Return XHR object\n return xhr;\n}\n\nvar Scroll = {\n scrollTo: function scrollTo(left, top, duration, easing, callback) {\n if ( easing === void 0 ) easing = 'swing';\n\n if (arguments.length === 4 && typeof easing === 'function') {\n callback = easing;\n easing = undefined;\n }\n return this.each(function animate() {\n var el = this;\n var currentTop;\n var currentLeft;\n var maxTop;\n var maxLeft;\n var newTop;\n var newLeft;\n var scrollTop;\n var scrollLeft;\n var animateTop = top > 0 || top === 0;\n var animateLeft = left > 0 || left === 0;\n if (typeof easing === 'undefined') {\n easing = 'swing';\n }\n if (animateTop) {\n currentTop = el.scrollTop;\n if (!duration) {\n el.scrollTop = top;\n }\n }\n if (animateLeft) {\n currentLeft = el.scrollLeft;\n if (!duration) {\n el.scrollLeft = left;\n }\n }\n if (!duration) { return; }\n if (animateTop) {\n maxTop = el.scrollHeight - el.offsetHeight;\n newTop = Math.max(Math.min(top, maxTop), 0);\n }\n if (animateLeft) {\n maxLeft = el.scrollWidth - el.offsetWidth;\n newLeft = Math.max(Math.min(left, maxLeft), 0);\n }\n var startTime = null;\n if (animateTop && newTop === currentTop) { animateTop = false; }\n if (animateLeft && newLeft === currentLeft) { animateLeft = false; }\n function render(time) {\n if ( time === void 0 ) time = new Date().getTime();\n\n if (startTime === null) {\n startTime = time;\n }\n var progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n var easeProgress = easing === 'linear' ? progress : (0.5 - (Math.cos(progress * Math.PI) / 2));\n var done;\n if (animateTop) { scrollTop = currentTop + (easeProgress * (newTop - currentTop)); }\n if (animateLeft) { scrollLeft = currentLeft + (easeProgress * (newLeft - currentLeft)); }\n if (animateTop && newTop > currentTop && scrollTop >= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n if (animateTop && newTop < currentTop && scrollTop <= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (done) {\n if (callback) { callback(); }\n return;\n }\n if (animateTop) { el.scrollTop = scrollTop; }\n if (animateLeft) { el.scrollLeft = scrollLeft; }\n Utils.requestAnimationFrame(render);\n }\n Utils.requestAnimationFrame(render);\n });\n },\n scrollTop: function scrollTop(top, duration, easing, callback) {\n if (arguments.length === 3 && typeof easing === 'function') {\n callback = easing;\n easing = undefined;\n }\n var dom = this;\n if (typeof top === 'undefined') {\n if (dom.length > 0) { return dom[0].scrollTop; }\n return null;\n }\n return dom.scrollTo(undefined, top, duration, easing, callback);\n },\n scrollLeft: function scrollLeft(left, duration, easing, callback) {\n if (arguments.length === 3 && typeof easing === 'function') {\n callback = easing;\n easing = undefined;\n }\n var dom = this;\n if (typeof left === 'undefined') {\n if (dom.length > 0) { return dom[0].scrollLeft; }\n return null;\n }\n return dom.scrollTo(left, undefined, duration, easing, callback);\n },\n};\n\nvar Methods = {\n // Classes and attributes\n addClass: function addClass(className) {\n var this$1 = this;\n\n if (typeof className === 'undefined') {\n return this;\n }\n var classes = className.split(' ');\n for (var i = 0; i < classes.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.add(classes[i]); }\n }\n }\n return this;\n },\n removeClass: function removeClass(className) {\n var this$1 = this;\n\n var classes = className.split(' ');\n for (var i = 0; i < classes.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.remove(classes[i]); }\n }\n }\n return this;\n },\n hasClass: function hasClass(className) {\n if (!this[0]) { return false; }\n return this[0].classList.contains(className);\n },\n toggleClass: function toggleClass(className) {\n var this$1 = this;\n\n var classes = className.split(' ');\n for (var i = 0; i < classes.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.toggle(classes[i]); }\n }\n }\n return this;\n },\n attr: function attr(attrs, value) {\n var arguments$1 = arguments;\n var this$1 = this;\n\n if (arguments.length === 1 && typeof attrs === 'string') {\n // Get attr\n if (this[0]) { return this[0].getAttribute(attrs); }\n return undefined;\n }\n\n // Set attrs\n for (var i = 0; i < this.length; i += 1) {\n if (arguments$1.length === 2) {\n // String\n this$1[i].setAttribute(attrs, value);\n } else {\n // Object\n for (var attrName in attrs) {\n this$1[i][attrName] = attrs[attrName];\n this$1[i].setAttribute(attrName, attrs[attrName]);\n }\n }\n }\n return this;\n },\n removeAttr: function removeAttr(attr) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].removeAttribute(attr);\n }\n return this;\n },\n prop: function prop(props, value) {\n var arguments$1 = arguments;\n var this$1 = this;\n\n if (arguments.length === 1 && typeof props === 'string') {\n // Get prop\n if (this[0]) { return this[0][props]; }\n } else {\n // Set props\n for (var i = 0; i < this.length; i += 1) {\n if (arguments$1.length === 2) {\n // String\n this$1[i][props] = value;\n } else {\n // Object\n for (var propName in props) {\n this$1[i][propName] = props[propName];\n }\n }\n }\n return this;\n }\n },\n data: function data(key, value) {\n var this$1 = this;\n\n var el;\n if (typeof value === 'undefined') {\n el = this[0];\n // Get value\n if (el) {\n if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) {\n return el.dom7ElementDataStorage[key];\n }\n\n var dataKey = el.getAttribute((\"data-\" + key));\n if (dataKey) {\n return dataKey;\n }\n return undefined;\n }\n return undefined;\n }\n\n // Set value\n for (var i = 0; i < this.length; i += 1) {\n el = this$1[i];\n if (!el.dom7ElementDataStorage) { el.dom7ElementDataStorage = {}; }\n el.dom7ElementDataStorage[key] = value;\n }\n return this;\n },\n removeData: function removeData(key) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n var el = this$1[i];\n if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {\n el.dom7ElementDataStorage[key] = null;\n delete el.dom7ElementDataStorage[key];\n }\n }\n },\n dataset: function dataset() {\n var el = this[0];\n if (!el) { return undefined; }\n var dataset = {};\n if (el.dataset) {\n for (var dataKey in el.dataset) {\n dataset[dataKey] = el.dataset[dataKey];\n }\n } else {\n for (var i = 0; i < el.attributes.length; i += 1) {\n var attr = el.attributes[i];\n if (attr.name.indexOf('data-') >= 0) {\n dataset[Utils.toCamelCase(attr.name.split('data-')[1])] = attr.value;\n }\n }\n }\n for (var key in dataset) {\n if (dataset[key] === 'false') { dataset[key] = false; }\n else if (dataset[key] === 'true') { dataset[key] = true; }\n else if (parseFloat(dataset[key]) === dataset[key] * 1) { dataset[key] *= 1; }\n }\n return dataset;\n },\n val: function val(value) {\n var this$1 = this;\n\n if (typeof value === 'undefined') {\n if (this[0]) {\n if (this[0].multiple && this[0].nodeName.toLowerCase() === 'select') {\n var values = [];\n for (var i = 0; i < this[0].selectedOptions.length; i += 1) {\n values.push(this$1[0].selectedOptions[i].value);\n }\n return values;\n }\n return this[0].value;\n }\n return undefined;\n }\n\n for (var i$1 = 0; i$1 < this.length; i$1 += 1) {\n this$1[i$1].value = value;\n }\n return this;\n },\n // Transforms\n transform: function transform(transform$1) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n var elStyle = this$1[i].style;\n elStyle.webkitTransform = transform$1;\n elStyle.transform = transform$1;\n }\n return this;\n },\n transition: function transition(duration) {\n var this$1 = this;\n\n if (typeof duration !== 'string') {\n duration = duration + \"ms\";\n }\n for (var i = 0; i < this.length; i += 1) {\n var elStyle = this$1[i].style;\n elStyle.webkitTransitionDuration = duration;\n elStyle.transitionDuration = duration;\n }\n return this;\n },\n // Events\n on: function on() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var eventType = args[0];\n var targetSelector;\n var listener;\n var capture = false;\n if (typeof args[1] === 'function') {\n targetSelector = false;\n listener = args[1];\n capture = args[2];\n } else {\n targetSelector = args[1];\n listener = args[2];\n capture = args[3];\n }\n function handleLiveEvent(e) {\n var target = e.target;\n var eventData = e.target.dom7EventData || [];\n eventData.unshift(e);\n if ($(target).is(targetSelector)) { listener.apply(target, eventData); }\n else {\n var parents = $(target).parents();\n for (var k = 0; k < parents.length; k += 1) {\n if ($(parents[k]).is(targetSelector)) { listener.apply(parents[k], eventData); }\n }\n }\n }\n function handleEvent(e) {\n var eventData = e.target.dom7EventData || [];\n eventData.unshift(e);\n listener.apply(this, eventData);\n }\n var events = eventType.split(' ');\n var j;\n for (var i = 0; i < this.length; i += 1) {\n var el = this$1[i];\n if (!targetSelector) {\n for (j = 0; j < events.length; j += 1) {\n if (!el.dom7Listeners) { el.dom7Listeners = []; }\n el.dom7Listeners.push({\n type: eventType,\n listener: listener,\n proxyListener: handleEvent,\n });\n el.addEventListener(events[j], handleEvent, capture);\n }\n } else {\n // Live events\n for (j = 0; j < events.length; j += 1) {\n if (!el.dom7LiveListeners) { el.dom7LiveListeners = []; }\n el.dom7LiveListeners.push({\n type: eventType,\n listener: listener,\n proxyListener: handleLiveEvent,\n });\n el.addEventListener(events[j], handleLiveEvent, capture);\n }\n }\n }\n return this;\n },\n off: function off() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var eventType = args[0];\n var targetSelector;\n var listener;\n var capture = false;\n if (typeof args[1] === 'function') {\n targetSelector = false;\n listener = args[1];\n capture = args[2];\n } else {\n targetSelector = args[1];\n listener = args[2];\n capture = args[3];\n }\n var events = eventType.split(' ');\n for (var i = 0; i < events.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n var el = this$1[j];\n if (!targetSelector) {\n if (el.dom7Listeners) {\n for (var k = 0; k < el.dom7Listeners.length; k += 1) {\n if (listener) {\n if (el.dom7Listeners[k].listener === listener) {\n el.removeEventListener(events[i], el.dom7Listeners[k].proxyListener, capture);\n }\n } else if (el.dom7Listeners[k].type === events[i]) {\n el.removeEventListener(events[i], el.dom7Listeners[k].proxyListener, capture);\n }\n }\n }\n } else if (el.dom7LiveListeners) {\n for (var k$1 = 0; k$1 < el.dom7LiveListeners.length; k$1 += 1) {\n if (listener) {\n if (el.dom7LiveListeners[k$1].listener === listener) {\n el.removeEventListener(events[i], el.dom7LiveListeners[k$1].proxyListener, capture);\n }\n } else if (el.dom7Listeners[k$1].type === events[i]) {\n el.removeEventListener(events[i], el.dom7LiveListeners[k$1].proxyListener, capture);\n }\n }\n }\n }\n }\n return this;\n },\n once: function once(eventName, targetSelector, listener, capture) {\n var dom = this;\n if (typeof targetSelector === 'function') {\n listener = arguments[1];\n capture = arguments[2];\n targetSelector = false;\n }\n function proxy(e) {\n var eventData = e.target.dom7EventData || [];\n listener.apply(this, eventData);\n dom.off(eventName, targetSelector, proxy, capture);\n }\n return dom.on(eventName, targetSelector, proxy, capture);\n },\n trigger: function trigger() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var events = args[0].split(' ');\n var eventData = args[1];\n for (var i = 0; i < events.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n var evt = (void 0);\n try {\n evt = new CustomEvent(events[i], { detail: eventData, bubbles: true, cancelable: true });\n } catch (e) {\n evt = document.createEvent('Event');\n evt.initEvent(events[i], true, true);\n evt.detail = eventData;\n }\n this$1[j].dom7EventData = args.filter(function (data, dataIndex) { return dataIndex > 0; });\n this$1[j].dispatchEvent(evt);\n this$1[j].dom7EventData = [];\n delete this$1[j].dom7EventData;\n }\n }\n return this;\n },\n transitionEnd: function transitionEnd(callback) {\n var events = ['webkitTransitionEnd', 'transitionend'];\n var dom = this;\n var i;\n function fireCallBack(e) {\n /* jshint validthis:true */\n if (e.target !== this) { return; }\n callback.call(this, e);\n for (i = 0; i < events.length; i += 1) {\n dom.off(events[i], fireCallBack);\n }\n }\n if (callback) {\n for (i = 0; i < events.length; i += 1) {\n dom.on(events[i], fireCallBack);\n }\n }\n return this;\n },\n animationEnd: function animationEnd(callback) {\n var events = ['webkitAnimationEnd', 'animationend'];\n var dom = this;\n var i;\n function fireCallBack(e) {\n callback(e);\n for (i = 0; i < events.length; i += 1) {\n dom.off(events[i], fireCallBack);\n }\n }\n if (callback) {\n for (i = 0; i < events.length; i += 1) {\n dom.on(events[i], fireCallBack);\n }\n }\n return this;\n },\n // Sizing/Styles\n width: function width() {\n if (this[0] === window) {\n return window.innerWidth;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('width'));\n }\n\n return null;\n },\n outerWidth: function outerWidth(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n var styles = this.styles();\n return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));\n }\n return this[0].offsetWidth;\n }\n return null;\n },\n height: function height() {\n if (this[0] === window) {\n return window.innerHeight;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('height'));\n }\n\n return null;\n },\n outerHeight: function outerHeight(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n var styles = this.styles();\n return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));\n }\n return this[0].offsetHeight;\n }\n return null;\n },\n offset: function offset() {\n if (this.length > 0) {\n var el = this[0];\n var box = el.getBoundingClientRect();\n var body = document.body;\n var clientTop = el.clientTop || body.clientTop || 0;\n var clientLeft = el.clientLeft || body.clientLeft || 0;\n var scrollTop = el === window ? window.scrollY : el.scrollTop;\n var scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: (box.top + scrollTop) - clientTop,\n left: (box.left + scrollLeft) - clientLeft,\n };\n }\n\n return null;\n },\n hide: function hide() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].style.display = 'none';\n }\n return this;\n },\n show: function show() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].style.display = 'block';\n }\n return this;\n },\n styles: function styles() {\n if (this[0]) { return window.getComputedStyle(this[0], null); }\n },\n css: function css(props, value) {\n var this$1 = this;\n\n var i;\n if (arguments.length === 1) {\n if (typeof props === 'string') {\n if (this[0]) { return window.getComputedStyle(this[0], null).getPropertyValue(props); }\n } else {\n for (i = 0; i < this.length; i += 1) {\n for (var prop in props) {\n this$1[i].style[prop] = props[prop];\n }\n }\n return this;\n }\n }\n if (arguments.length === 2 && typeof props === 'string') {\n for (i = 0; i < this.length; i += 1) {\n this$1[i].style[props] = value;\n }\n return this;\n }\n return this;\n },\n\n // Dom manipulation\n // Iterate over the collection passing elements to `callback`\n each: function each(callback) {\n var this$1 = this;\n\n // Don't bother continuing without a callback\n if (!callback) { return this; }\n // Iterate over the current collection\n for (var i = 0; i < this.length; i += 1) {\n // If the callback returns false\n if (callback.call(this$1[i], i, this$1[i]) === false) {\n // End the loop early\n return this$1;\n }\n }\n // Return `this` to allow chained DOM operations\n return this;\n },\n filter: function filter(callback) {\n var matchedItems = [];\n var dom = this;\n for (var i = 0; i < dom.length; i += 1) {\n if (callback.call(dom[i], i, dom[i])) { matchedItems.push(dom[i]); }\n }\n return new Dom7(matchedItems);\n },\n html: function html(html$1) {\n var this$1 = this;\n\n if (typeof html$1 === 'undefined') {\n return this[0] ? this[0].innerHTML : undefined;\n }\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].innerHTML = html$1;\n }\n return this;\n },\n text: function text(text$1) {\n var this$1 = this;\n\n if (typeof text$1 === 'undefined') {\n if (this[0]) {\n return this[0].textContent.trim();\n }\n return null;\n }\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].textContent = text$1;\n }\n return this;\n },\n is: function is(selector) {\n var el = this[0];\n var compareWith;\n var i;\n if (!el || typeof selector === 'undefined') { return false; }\n if (typeof selector === 'string') {\n if (el.matches) { return el.matches(selector); }\n else if (el.webkitMatchesSelector) { return el.webkitMatchesSelector(selector); }\n else if (el.msMatchesSelector) { return el.msMatchesSelector(selector); }\n\n compareWith = $(selector);\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) { return true; }\n }\n return false;\n } else if (selector === document) { return el === document; }\n else if (selector === window) { return el === window; }\n\n if (selector.nodeType || selector instanceof Dom7) {\n compareWith = selector.nodeType ? [selector] : selector;\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) { return true; }\n }\n return false;\n }\n return false;\n },\n indexOf: function indexOf(el) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n if (this$1[i] === el) { return i; }\n }\n },\n index: function index() {\n var child = this[0];\n var i;\n if (child) {\n i = 0;\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) { i += 1; }\n }\n return i;\n }\n },\n eq: function eq(index) {\n if (typeof index === 'undefined') { return this; }\n var length = this.length;\n var returnIndex;\n if (index > length - 1) {\n return new Dom7([]);\n }\n if (index < 0) {\n returnIndex = length + index;\n if (returnIndex < 0) { return new Dom7([]); }\n return new Dom7([this[returnIndex]]);\n }\n return new Dom7([this[index]]);\n },\n append: function append() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var newChild;\n\n for (var k = 0; k < args.length; k += 1) {\n newChild = args[k];\n for (var i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n var tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n while (tempDiv.firstChild) {\n this$1[i].appendChild(tempDiv.firstChild);\n }\n } else if (newChild instanceof Dom7) {\n for (var j = 0; j < newChild.length; j += 1) {\n this$1[i].appendChild(newChild[j]);\n }\n } else {\n this$1[i].appendChild(newChild);\n }\n }\n }\n\n return this;\n },\n appendTo: function appendTo(parent) {\n $(parent).append(this);\n return this;\n },\n prepend: function prepend(newChild) {\n var this$1 = this;\n\n var i;\n var j;\n for (i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n var tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {\n this$1[i].insertBefore(tempDiv.childNodes[j], this$1[i].childNodes[0]);\n }\n } else if (newChild instanceof Dom7) {\n for (j = 0; j < newChild.length; j += 1) {\n this$1[i].insertBefore(newChild[j], this$1[i].childNodes[0]);\n }\n } else {\n this$1[i].insertBefore(newChild, this$1[i].childNodes[0]);\n }\n }\n return this;\n },\n prependTo: function prependTo(parent) {\n $(parent).prepend(this);\n return this;\n },\n insertBefore: function insertBefore(selector) {\n var this$1 = this;\n\n var before = $(selector);\n for (var i = 0; i < this.length; i += 1) {\n if (before.length === 1) {\n before[0].parentNode.insertBefore(this$1[i], before[0]);\n } else if (before.length > 1) {\n for (var j = 0; j < before.length; j += 1) {\n before[j].parentNode.insertBefore(this$1[i].cloneNode(true), before[j]);\n }\n }\n }\n },\n insertAfter: function insertAfter(selector) {\n var this$1 = this;\n\n var after = $(selector);\n for (var i = 0; i < this.length; i += 1) {\n if (after.length === 1) {\n after[0].parentNode.insertBefore(this$1[i], after[0].nextSibling);\n } else if (after.length > 1) {\n for (var j = 0; j < after.length; j += 1) {\n after[j].parentNode.insertBefore(this$1[i].cloneNode(true), after[j].nextSibling);\n }\n }\n }\n },\n next: function next(selector) {\n if (this.length > 0) {\n if (selector) {\n if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { return new Dom7([this[0].nextElementSibling]); }\n return new Dom7([]);\n }\n\n if (this[0].nextElementSibling) { return new Dom7([this[0].nextElementSibling]); }\n return new Dom7([]);\n }\n return new Dom7([]);\n },\n nextAll: function nextAll(selector) {\n var nextEls = [];\n var el = this[0];\n if (!el) { return new Dom7([]); }\n while (el.nextElementSibling) {\n var next = el.nextElementSibling;\n if (selector) {\n if ($(next).is(selector)) { nextEls.push(next); }\n } else { nextEls.push(next); }\n el = next;\n }\n return new Dom7(nextEls);\n },\n prev: function prev(selector) {\n if (this.length > 0) {\n var el = this[0];\n if (selector) {\n if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { return new Dom7([el.previousElementSibling]); }\n return new Dom7([]);\n }\n\n if (el.previousElementSibling) { return new Dom7([el.previousElementSibling]); }\n return new Dom7([]);\n }\n return new Dom7([]);\n },\n prevAll: function prevAll(selector) {\n var prevEls = [];\n var el = this[0];\n if (!el) { return new Dom7([]); }\n while (el.previousElementSibling) {\n var prev = el.previousElementSibling;\n if (selector) {\n if ($(prev).is(selector)) { prevEls.push(prev); }\n } else { prevEls.push(prev); }\n el = prev;\n }\n return new Dom7(prevEls);\n },\n siblings: function siblings(selector) {\n return this.nextAll(selector).add(this.prevAll(selector));\n },\n parent: function parent(selector) {\n var this$1 = this;\n\n var parents = [];\n for (var i = 0; i < this.length; i += 1) {\n if (this$1[i].parentNode !== null) {\n if (selector) {\n if ($(this$1[i].parentNode).is(selector)) { parents.push(this$1[i].parentNode); }\n } else {\n parents.push(this$1[i].parentNode);\n }\n }\n }\n return $(Utils.unique(parents));\n },\n parents: function parents(selector) {\n var this$1 = this;\n\n var parents = [];\n for (var i = 0; i < this.length; i += 1) {\n var parent = this$1[i].parentNode;\n while (parent) {\n if (selector) {\n if ($(parent).is(selector)) { parents.push(parent); }\n } else {\n parents.push(parent);\n }\n parent = parent.parentNode;\n }\n }\n return $(Utils.unique(parents));\n },\n closest: function closest(selector) {\n var closest = this;\n if (typeof selector === 'undefined') {\n return new Dom7([]);\n }\n if (!closest.is(selector)) {\n closest = closest.parents(selector).eq(0);\n }\n return closest;\n },\n find: function find(selector) {\n var this$1 = this;\n\n var foundElements = [];\n for (var i = 0; i < this.length; i += 1) {\n var found = this$1[i].querySelectorAll(selector);\n for (var j = 0; j < found.length; j += 1) {\n foundElements.push(found[j]);\n }\n }\n return new Dom7(foundElements);\n },\n children: function children(selector) {\n var this$1 = this;\n\n var children = [];\n for (var i = 0; i < this.length; i += 1) {\n var childNodes = this$1[i].childNodes;\n\n for (var j = 0; j < childNodes.length; j += 1) {\n if (!selector) {\n if (childNodes[j].nodeType === 1) { children.push(childNodes[j]); }\n } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) { children.push(childNodes[j]); }\n }\n }\n return new Dom7(Utils.unique(children));\n },\n remove: function remove() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n if (this$1[i].parentNode) { this$1[i].parentNode.removeChild(this$1[i]); }\n }\n return this;\n },\n detach: function detach() {\n return this.remove();\n },\n add: function add() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var dom = this;\n var i;\n var j;\n for (i = 0; i < args.length; i += 1) {\n var toAdd = $(args[i]);\n for (j = 0; j < toAdd.length; j += 1) {\n dom[dom.length] = toAdd[j];\n dom.length += 1;\n }\n }\n return dom;\n },\n empty: function empty() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n var el = this$1[i];\n if (el.nodeType === 1) {\n for (var j = 0; j < el.childNodes.length; j += 1) {\n if (el.childNodes[j].parentNode) {\n el.childNodes[j].parentNode.removeChild(el.childNodes[j]);\n }\n }\n el.textContent = '';\n }\n }\n return this;\n },\n};\n\nfunction Animate(initialProps, initialParams) {\n var els = this;\n var a = {\n props: $.extend({}, initialProps),\n params: $.extend({\n duration: 300,\n easing: 'swing', // or 'linear'\n /* Callbacks\n begin(elements)\n complete(elements)\n progress(elements, complete, remaining, start, tweenValue)\n */\n }, initialParams),\n\n elements: els,\n animating: false,\n que: [],\n\n easingProgress: function easingProgress(easing, progress) {\n if (easing === 'swing') {\n return 0.5 - (Math.cos(progress * Math.PI) / 2);\n }\n if (typeof easing === 'function') {\n return easing(progress);\n }\n return progress;\n },\n stop: function stop() {\n if (a.frameId) {\n Utils.cancelAnimationFrame(a.frameId);\n }\n a.animating = false;\n a.elements.each(function (index, el) {\n var element = el;\n delete element.dom7AnimateInstance;\n });\n a.que = [];\n },\n done: function done(complete) {\n a.animating = false;\n a.elements.each(function (index, el) {\n var element = el;\n delete element.dom7AnimateInstance;\n });\n if (complete) { complete(els); }\n if (a.que.length > 0) {\n var que = a.que.shift();\n a.animate(que[0], que[1]);\n }\n },\n animate: function animate(props, params) {\n if (a.animating) {\n a.que.push([props, params]);\n return a;\n }\n var elements = [];\n\n // Define & Cache Initials & Units\n a.elements.each(function (index, el) {\n var initialFullValue;\n var initialValue;\n var unit;\n var finalValue;\n var finalFullValue;\n\n if (!el.dom7AnimateInstance) { a.elements[index].dom7AnimateInstance = a; }\n\n elements[index] = {\n container: el,\n };\n Object.keys(props).forEach(function (prop) {\n initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');\n initialValue = parseFloat(initialFullValue);\n unit = initialFullValue.replace(initialValue, '');\n finalValue = parseFloat(props[prop]);\n finalFullValue = props[prop] + unit;\n elements[index][prop] = {\n initialFullValue: initialFullValue,\n initialValue: initialValue,\n unit: unit,\n finalValue: finalValue,\n finalFullValue: finalFullValue,\n currentValue: initialValue,\n };\n });\n });\n\n var startTime = null;\n var time;\n var elementsDone = 0;\n var propsDone = 0;\n var done;\n var began = false;\n\n a.animating = true;\n\n function render() {\n time = new Date().getTime();\n var progress;\n var easeProgress;\n // let el;\n if (!began) {\n began = true;\n if (params.begin) { params.begin(els); }\n }\n if (startTime === null) {\n startTime = time;\n }\n if (params.progress) {\n params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), ((startTime + params.duration) - time < 0 ? 0 : (startTime + params.duration) - time), startTime);\n }\n\n elements.forEach(function (element) {\n var el = element;\n if (done || el.done) { return; }\n Object.keys(props).forEach(function (prop) {\n if (done || el.done) { return; }\n progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);\n easeProgress = a.easingProgress(params.easing, progress);\n var ref = el[prop];\n var initialValue = ref.initialValue;\n var finalValue = ref.finalValue;\n var unit = ref.unit;\n el[prop].currentValue = initialValue + (easeProgress * (finalValue - initialValue));\n var currentValue = el[prop].currentValue;\n\n if (\n (finalValue > initialValue && currentValue >= finalValue) ||\n (finalValue < initialValue && currentValue <= finalValue)) {\n el.container.style[prop] = finalValue + unit;\n propsDone += 1;\n if (propsDone === Object.keys(props).length) {\n el.done = true;\n elementsDone += 1;\n }\n if (elementsDone === elements.length) {\n done = true;\n }\n }\n if (done) {\n a.done(params.complete);\n return;\n }\n el.container.style[prop] = currentValue + unit;\n });\n });\n if (done) { return; }\n // Then call\n a.frameId = Utils.requestAnimationFrame(render);\n }\n a.frameId = Utils.requestAnimationFrame(render);\n return a;\n },\n };\n\n if (a.elements.length === 0) {\n return els;\n }\n\n var animateInstance;\n for (var i = 0; i < a.elements.length; i += 1) {\n if (a.elements[i].dom7AnimateInstance) {\n animateInstance = a.elements[i].dom7AnimateInstance;\n } else { a.elements[i].dom7AnimateInstance = a; }\n }\n if (!animateInstance) {\n animateInstance = a;\n }\n\n if (initialProps === 'stop') {\n animateInstance.stop();\n } else {\n animateInstance.animate(a.props, a.params);\n }\n\n return els;\n}\n\nfunction Stop() {\n var els = this;\n for (var i = 0; i < els.length; i += 1) {\n if (els[i].dom7AnimateInstance) {\n els[i].dom7AnimateInstance.stop();\n }\n }\n}\n\nfunction dom7() {\n // Utils & Helpers\n Object.keys(Utils).forEach(function (key) {\n $[key] = Utils[key];\n });\n\n // Methods\n Object.keys(Methods).forEach(function (key) {\n Dom7.prototype[key] = Methods[key];\n });\n\n // Scroll\n Object.keys(Scroll).forEach(function (key) {\n Dom7.prototype[key] = Scroll[key];\n });\n\n // Animate\n Dom7.prototype.animate = Animate;\n Dom7.prototype.stop = Stop;\n\n // Ajax\n $.ajax = Ajax;\n\n // Ajax Shrotcuts\n ('get post getJSON').split(' ').forEach(function (method) {\n $[method] = function ajax() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var url;\n var data;\n var success;\n var error;\n var dataType;\n if (typeof args[1] === 'function') {\n var assign;\n (assign = args, url = assign[0], success = assign[1], error = assign[2], dataType = assign[3]);\n } else {\n var assign$1;\n (assign$1 = args, url = assign$1[0], data = assign$1[1], success = assign$1[2], error = assign$1[3], dataType = assign$1[4]);\n }\n [success, error].forEach(function (callback) {\n if (typeof callback === 'string') {\n dataType = callback;\n if (callback === success) { success = undefined; }\n else { error = undefined; }\n }\n });\n dataType = dataType || (method === 'getJSON' ? 'json' : undefined);\n return $.ajax({\n url: url,\n method: method === 'post' ? 'POST' : 'GET',\n data: data,\n success: success,\n error: error,\n dataType: dataType,\n });\n };\n });\n\n // Link to prototype\n $.fn = Dom7.prototype;\n\n return $;\n}\nvar dom7$1 = dom7();\n\nreturn dom7$1;\n\n})));\n\n//# sourceMappingURL=dom7.js.map\n","/**\n * template7 1.2.3\n * Mobile-first HTML template engine\n * \n * http://www.idangero.us/template7/\n * \n * Copyright 2017, Vladimir Kharlampidi\n * The iDangero.us\n * http://www.idangero.us/\n * \n * Licensed under MIT\n * \n * Released on: May 12, 2017\n */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.Template7 = factory());\n}(this, (function () { 'use strict';\n\nvar template7Context;\nif (typeof window !== 'undefined') {\n template7Context = window;\n} else if (typeof global !== 'undefined') {\n template7Context = global;\n} else {\n template7Context = undefined;\n}\nfunction isArray(arr) {\n return Array.isArray ? Array.isArray(arr) : Object.prototype.toString.apply(arr) === '[object Array]';\n}\nfunction isFunction(func) {\n return typeof func === 'function';\n}\nfunction escape(string) {\n return (typeof template7Context !== 'undefined' && template7Context.escape ? template7Context.escape(string) : string)\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"');\n}\nvar quoteSingleRexExp = new RegExp('\\'', 'g');\nvar quoteDoubleRexExp = new RegExp('\"', 'g');\nfunction helperToSlices(string) {\n var helperParts = string.replace(/[{}#}]/g, '').split(' ');\n var slices = [];\n var shiftIndex;\n var i;\n var j;\n for (i = 0; i < helperParts.length; i += 1) {\n var part = helperParts[i];\n var blockQuoteRegExp = (void 0);\n var openingQuote = (void 0);\n if (i === 0) { slices.push(part); }\n else if (part.indexOf('\"') === 0 || part.indexOf('\\'') === 0) {\n blockQuoteRegExp = part.indexOf('\"') === 0 ? quoteDoubleRexExp : quoteSingleRexExp;\n openingQuote = part.indexOf('\"') === 0 ? '\"' : '\\'';\n // Plain String\n if (part.match(blockQuoteRegExp).length === 2) {\n // One word string\n slices.push(part);\n } else {\n // Find closed Index\n shiftIndex = 0;\n for (j = i + 1; j < helperParts.length; j += 1) {\n part += \" \" + (helperParts[j]);\n if (helperParts[j].indexOf(openingQuote) >= 0) {\n shiftIndex = j;\n slices.push(part);\n break;\n }\n }\n if (shiftIndex) { i = shiftIndex; }\n }\n } else if (part.indexOf('=') > 0) {\n // Hash\n var hashParts = part.split('=');\n var hashName = hashParts[0];\n var hashContent = hashParts[1];\n if (!blockQuoteRegExp) {\n blockQuoteRegExp = hashContent.indexOf('\"') === 0 ? quoteDoubleRexExp : quoteSingleRexExp;\n openingQuote = hashContent.indexOf('\"') === 0 ? '\"' : '\\'';\n }\n if (hashContent.match(blockQuoteRegExp).length !== 2) {\n shiftIndex = 0;\n for (j = i + 1; j < helperParts.length; j += 1) {\n hashContent += \" \" + (helperParts[j]);\n if (helperParts[j].indexOf(openingQuote) >= 0) {\n shiftIndex = j;\n break;\n }\n }\n if (shiftIndex) { i = shiftIndex; }\n }\n var hash = [hashName, hashContent.replace(blockQuoteRegExp, '')];\n slices.push(hash);\n } else {\n // Plain variable\n slices.push(part);\n }\n }\n return slices;\n}\nfunction stringToBlocks(string) {\n var blocks = [];\n var i;\n var j;\n if (!string) { return []; }\n var stringBlocks = string.split(/({{[^{^}]*}})/);\n for (i = 0; i < stringBlocks.length; i += 1) {\n var block = stringBlocks[i];\n if (block === '') { continue; }\n if (block.indexOf('{{') < 0) {\n blocks.push({\n type: 'plain',\n content: block,\n });\n } else {\n if (block.indexOf('{/') >= 0) {\n continue;\n }\n if (block.indexOf('{#') < 0 && block.indexOf(' ') < 0 && block.indexOf('else') < 0) {\n // Simple variable\n blocks.push({\n type: 'variable',\n contextName: block.replace(/[{}]/g, ''),\n });\n continue;\n }\n // Helpers\n var helperSlices = helperToSlices(block);\n var helperName = helperSlices[0];\n var isPartial = helperName === '>';\n var helperContext = [];\n var helperHash = {};\n for (j = 1; j < helperSlices.length; j += 1) {\n var slice = helperSlices[j];\n if (isArray(slice)) {\n // Hash\n helperHash[slice[0]] = slice[1] === 'false' ? false : slice[1];\n } else {\n helperContext.push(slice);\n }\n }\n\n if (block.indexOf('{#') >= 0) {\n // Condition/Helper\n var helperContent = '';\n var elseContent = '';\n var toSkip = 0;\n var shiftIndex = (void 0);\n var foundClosed = false;\n var foundElse = false;\n var depth = 0;\n for (j = i + 1; j < stringBlocks.length; j += 1) {\n if (stringBlocks[j].indexOf('{{#') >= 0) {\n depth += 1;\n }\n if (stringBlocks[j].indexOf('{{/') >= 0) {\n depth -= 1;\n }\n if (stringBlocks[j].indexOf((\"{{#\" + helperName)) >= 0) {\n helperContent += stringBlocks[j];\n if (foundElse) { elseContent += stringBlocks[j]; }\n toSkip += 1;\n } else if (stringBlocks[j].indexOf((\"{{/\" + helperName)) >= 0) {\n if (toSkip > 0) {\n toSkip -= 1;\n helperContent += stringBlocks[j];\n if (foundElse) { elseContent += stringBlocks[j]; }\n } else {\n shiftIndex = j;\n foundClosed = true;\n break;\n }\n } else if (stringBlocks[j].indexOf('else') >= 0 && depth === 0) {\n foundElse = true;\n } else {\n if (!foundElse) { helperContent += stringBlocks[j]; }\n if (foundElse) { elseContent += stringBlocks[j]; }\n }\n }\n if (foundClosed) {\n if (shiftIndex) { i = shiftIndex; }\n blocks.push({\n type: 'helper',\n helperName: helperName,\n contextName: helperContext,\n content: helperContent,\n inverseContent: elseContent,\n hash: helperHash,\n });\n }\n } else if (block.indexOf(' ') > 0) {\n if (isPartial) {\n helperName = '_partial';\n if (helperContext[0]) { helperContext[0] = \"\\\"\" + (helperContext[0].replace(/\"|'/g, '')) + \"\\\"\"; }\n }\n blocks.push({\n type: 'helper',\n helperName: helperName,\n contextName: helperContext,\n hash: helperHash,\n });\n }\n }\n }\n return blocks;\n}\nvar Template7 = function Template7(template) {\n var t = this;\n t.template = template;\n\n function getCompileVar(name, ctx) {\n var variable = ctx;\n var parts;\n var levelsUp = 0;\n if (name.indexOf('../') === 0) {\n var newDepth = variable.split('_')[1] - levelsUp;\n levelsUp = name.split('../').length - 1;\n variable = \"ctx_\" + (newDepth >= 1 ? newDepth : 1);\n parts = name.split('../')[levelsUp].split('.');\n } else if (name.indexOf('@global') === 0) {\n variable = 'Template7.global';\n parts = name.split('@global.')[1].split('.');\n } else if (name.indexOf('@root') === 0) {\n variable = 'root';\n parts = name.split('@root.')[1].split('.');\n } else {\n parts = name.split('.');\n }\n for (var i = 0; i < parts.length; i += 1) {\n var part = parts[i];\n if (part.indexOf('@') === 0) {\n if (i > 0) {\n variable += \"[(data && data.\" + (part.replace('@', '')) + \")]\";\n } else {\n variable = \"(data && data.\" + (name.replace('@', '')) + \")\";\n }\n } else if (isFinite(part)) {\n variable += \"[\" + part + \"]\";\n } else if (part === 'this' || part.indexOf('this.') >= 0 || part.indexOf('this[') >= 0 || part.indexOf('this(') >= 0) {\n variable = part.replace('this', ctx);\n } else {\n variable += \".\" + part;\n }\n }\n\n return variable;\n }\n function getCompiledArguments(contextArray, ctx) {\n var arr = [];\n for (var i = 0; i < contextArray.length; i += 1) {\n if (/^['\"]/.test(contextArray[i])) { arr.push(contextArray[i]); }\n else if (/^(true|false|\\d+)$/.test(contextArray[i])) { arr.push(contextArray[i]); }\n else {\n arr.push(getCompileVar(contextArray[i], ctx));\n }\n }\n\n return arr.join(', ');\n }\n function compile(template, depth) {\n if ( template === void 0 ) template = t.template;\n if ( depth === void 0 ) depth = 1;\n\n if (typeof template !== 'string') {\n throw new Error('Template7: Template must be a string');\n }\n var blocks = stringToBlocks(template);\n var ctx = \"ctx_\" + depth;\n if (blocks.length === 0) {\n return function empty() { return ''; };\n }\n\n function getCompileFn(block, newDepth) {\n if (block.content) { return compile(block.content, newDepth); }\n return function empty() { return ''; };\n }\n function getCompileInverse(block, newDepth) {\n if (block.inverseContent) { return compile(block.inverseContent, newDepth); }\n return function empty() { return ''; };\n }\n\n var resultString = '';\n if (depth === 1) {\n resultString += \"(function (\" + ctx + \", data, root) {\\n\";\n } else {\n resultString += \"(function (\" + ctx + \", data) {\\n\";\n }\n if (depth === 1) {\n resultString += 'function isArray(arr){return Object.prototype.toString.apply(arr) === \\'[object Array]\\';}\\n';\n resultString += 'function isFunction(func){return (typeof func === \\'function\\');}\\n';\n resultString += 'function c(val, ctx) {if (typeof val !== \"undefined\" && val !== null) {if (isFunction(val)) {return val.call(ctx);} else return val;} else return \"\";}\\n';\n resultString += 'root = root || ctx_1 || {};\\n';\n }\n resultString += 'var r = \\'\\';\\n';\n var i;\n for (i = 0; i < blocks.length; i += 1) {\n var block = blocks[i];\n // Plain block\n if (block.type === 'plain') {\n resultString += \"r +='\" + ((block.content).replace(/\\r/g, '\\\\r').replace(/\\n/g, '\\\\n').replace(/'/g, '\\\\' + '\\'')) + \"';\";\n continue;\n }\n var variable = (void 0);\n var compiledArguments = (void 0);\n // Variable block\n if (block.type === 'variable') {\n variable = getCompileVar(block.contextName, ctx);\n resultString += \"r += c(\" + variable + \", \" + ctx + \");\";\n }\n // Helpers block\n if (block.type === 'helper') {\n if (block.helperName in t.helpers) {\n compiledArguments = getCompiledArguments(block.contextName, ctx);\n\n resultString += \"r += (Template7.helpers.\" + (block.helperName) + \").call(\" + ctx + \", \" + (compiledArguments && ((compiledArguments + \", \"))) + \"{hash:\" + (JSON.stringify(block.hash)) + \", data: data || {}, fn: \" + (getCompileFn(block, depth + 1)) + \", inverse: \" + (getCompileInverse(block, depth + 1)) + \", root: root});\";\n } else if (block.contextName.length > 0) {\n throw new Error((\"Template7: Missing helper: \\\"\" + (block.helperName) + \"\\\"\"));\n } else {\n variable = getCompileVar(block.helperName, ctx);\n resultString += \"if (\" + variable + \") {\";\n resultString += \"if (isArray(\" + variable + \")) {\";\n resultString += \"r += (Template7.helpers.each).call(\" + ctx + \", \" + variable + \", {hash:\" + (JSON.stringify(block.hash)) + \", data: data || {}, fn: \" + (getCompileFn(block, depth + 1)) + \", inverse: \" + (getCompileInverse(block, depth + 1)) + \", root: root});\";\n resultString += '}else {';\n resultString += \"r += (Template7.helpers.with).call(\" + ctx + \", \" + variable + \", {hash:\" + (JSON.stringify(block.hash)) + \", data: data || {}, fn: \" + (getCompileFn(block, depth + 1)) + \", inverse: \" + (getCompileInverse(block, depth + 1)) + \", root: root});\";\n resultString += '}}';\n }\n }\n }\n resultString += '\\nreturn r;})';\n return eval.call(template7Context, resultString);\n }\n t.compile = function _compile(template) {\n if (!t.compiled) {\n t.compiled = compile(template);\n }\n return t.compiled;\n };\n};\n\nTemplate7.prototype = {\n options: {},\n partials: {},\n helpers: {\n _partial: function _partial(partialName, options) {\n var p = Template7.prototype.partials[partialName];\n if (!p || (p && !p.template)) { return ''; }\n if (!p.compiled) {\n p.compiled = new Template7(p.template).compile();\n }\n var ctx = this;\n for (var hashName in options.hash) {\n ctx[hashName] = options.hash[hashName];\n }\n return p.compiled(ctx, options.data, options.root);\n },\n escape: function escape$1(context, options) {\n if (typeof context !== 'string') {\n throw new Error('Template7: Passed context to \"escape\" helper should be a string');\n }\n return escape(context);\n },\n if: function if$1(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n if (ctx) {\n return options.fn(this, options.data);\n }\n\n return options.inverse(this, options.data);\n },\n unless: function unless(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n if (!ctx) {\n return options.fn(this, options.data);\n }\n\n return options.inverse(this, options.data);\n },\n each: function each(context, options) {\n var ctx = context;\n var ret = '';\n var i = 0;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n if (isArray(ctx)) {\n if (options.hash.reverse) {\n ctx = ctx.reverse();\n }\n for (i = 0; i < ctx.length; i += 1) {\n ret += options.fn(ctx[i], { first: i === 0, last: i === ctx.length - 1, index: i });\n }\n if (options.hash.reverse) {\n ctx = ctx.reverse();\n }\n } else {\n for (var key in ctx) {\n i += 1;\n ret += options.fn(ctx[key], { key: key });\n }\n }\n if (i > 0) { return ret; }\n return options.inverse(this);\n },\n with: function with$1(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = context.call(this); }\n return options.fn(ctx);\n },\n join: function join(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n return ctx.join(options.hash.delimiter || options.hash.delimeter);\n },\n js: function js(expression, options) {\n var func;\n if (expression.indexOf('return') >= 0) {\n func = \"(function(){\" + expression + \"})\";\n } else {\n func = \"(function(){return (\" + expression + \")})\";\n }\n return eval.call(this, func).call(this);\n },\n js_compare: function js_compare(expression, options) {\n var func;\n if (expression.indexOf('return') >= 0) {\n func = \"(function(){\" + expression + \"})\";\n } else {\n func = \"(function(){return (\" + expression + \")})\";\n }\n var condition = eval.call(this, func).call(this);\n if (condition) {\n return options.fn(this, options.data);\n }\n\n return options.inverse(this, options.data);\n },\n },\n};\nfunction t7(template, data) {\n if (arguments.length === 2) {\n var instance = new Template7(template);\n var rendered = instance.compile()(data);\n instance = null;\n return (rendered);\n }\n return new Template7(template);\n}\nt7.registerHelper = function registerHelper(name, fn) {\n Template7.prototype.helpers[name] = fn;\n};\nt7.unregisterHelper = function unregisterHelper(name) {\n Template7.prototype.helpers[name] = undefined;\n delete Template7.prototype.helpers[name];\n};\nt7.registerPartial = function registerPartial(name, template) {\n Template7.prototype.partials[name] = { template: template };\n};\nt7.unregisterPartial = function unregisterPartial(name) {\n if (Template7.prototype.partials[name]) {\n Template7.prototype.partials[name] = undefined;\n delete Template7.prototype.partials[name];\n }\n};\nt7.compile = function compile(template, options) {\n var instance = new Template7(template, options);\n return instance.compile();\n};\n\nt7.options = Template7.prototype.options;\nt7.helpers = Template7.prototype.helpers;\nt7.partials = Template7.prototype.partials;\n\nreturn t7;\n\n})));\n\n//# sourceMappingURL=template7.js.map\n","(function () {\n"," 'use strict';\n /*===========================\n Framework 7\n ===========================*/\n window.Framework7 = function (params) {\n // App\n var app = this;\n \n // Version\n app.version = '1.6.0';\n \n // Default Parameters\n app.params = {\n //\n root: 'body',\n //\n cache: true,\n cacheIgnore: [],\n cacheIgnoreGetParameters: false,\n cacheDuration: 1000 * 60 * 10, // Ten minutes\n preloadPreviousPage: true,\n uniqueHistory: false,\n uniqueHistoryIgnoreGetParameters: false,\n dynamicPageUrl: 'content-{{index}}',\n allowDuplicateUrls: false,\n router: true,\n routerRemoveTimeout: false,\n routerRemoveWithTimeout: false,\n // Push State\n pushState: false,\n pushStateRoot: undefined,\n pushStateNoAnimation: false,\n pushStateSeparator: '#!/',\n pushStateOnLoad: true,\n // Fast clicks\n fastClicks: true,\n fastClicksDistanceThreshold: 10,\n fastClicksDelayBetweenClicks: 50,\n fastClicksExclude: '', // CSS selector\n // Tap Hold\n tapHold: false,\n tapHoldDelay: 750,\n tapHoldPreventClicks: true,\n // Active State\n activeState: true,\n activeStateElements: 'a, button, label, span',\n // Animate Nav Back Icon\n animateNavBackIcon: false,\n // Swipe Back\n swipeBackPage: true,\n swipeBackPageThreshold: 0,\n swipeBackPageActiveArea: 30,\n swipeBackPageAnimateShadow: true,\n swipeBackPageAnimateOpacity: true,\n // Ajax\n ajaxLinks: undefined, // or CSS selector\n // External Links\n externalLinks: '.external', // CSS selector\n // Sortable\n sortable: true,\n // Scroll toolbars\n hideNavbarOnPageScroll: false,\n hideToolbarOnPageScroll: false,\n hideTabbarOnPageScroll: false,\n showBarsOnPageScrollEnd: true,\n showBarsOnPageScrollTop: true,\n // Swipeout\n swipeout: true,\n swipeoutActionsNoFold: false,\n swipeoutNoFollow: false,\n swipeoutRemoveWithTimeout: false,\n // Smart Select Back link template\n smartSelectOpenIn: 'page', // or 'popup' or 'picker'\n smartSelectBackText: 'Back',\n smartSelectPopupCloseText: 'Close',\n smartSelectPickerCloseText: 'Done',\n smartSelectSearchbar: false,\n smartSelectBackOnSelect: false,\n // Tap Navbar or Statusbar to scroll to top\n scrollTopOnNavbarClick: false,\n scrollTopOnStatusbarClick: false,\n // Panels\n panelLeftBreakpoint: null,\n panelRightBreakpoint: null,\n swipePanel: false, // or 'left' or 'right'\n swipePanelActiveArea: 0,\n swipePanelCloseOpposite: true,\n swipePanelOnlyClose: false,\n swipePanelNoFollow: false,\n swipePanelThreshold: 0,\n panelsCloseByOutside: true,\n // Modals\n modalButtonOk: 'OK',\n modalButtonCancel: 'Cancel',\n modalUsernamePlaceholder: 'Username',\n modalPasswordPlaceholder: 'Password',\n modalTitle: 'Framework7',\n modalCloseByOutside: false,\n actionsCloseByOutside: true,\n popupCloseByOutside: true,\n popoverCloseByOutside: true,\n modalPreloaderTitle: 'Loading... ',\n modalStack: true,\n modalsMoveToRoot: true,\n // Lazy Load\n imagesLazyLoadThreshold: 0,\n imagesLazyLoadSequential: true,\n // Name space\n viewClass: 'view',\n viewMainClass: 'view-main',\n viewsClass: 'views',\n // Notifications defaults\n notificationCloseOnClick: false,\n notificationCloseIcon: true,\n notificationCloseButtonText: 'Close',\n // Animate Pages\n animatePages: true,\n // Template7\n templates: {},\n template7Data: {},\n template7Pages: false,\n precompileTemplates: false,\n // Material\n material: false,\n materialPageLoadDelay: 0,\n materialPreloaderSvg: '',\n materialPreloaderHtml:\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '',\n materialRipple: true,\n materialRippleElements: '.ripple, a.link, a.item-link, .button, .modal-button, .tab-link, .label-radio, .label-checkbox, .actions-modal-button, a.searchbar-clear, a.floating-button, .floating-button > a, .speed-dial-buttons a, .form-checkbox, .form-radio, .data-table .sortable-cell',\n // Auto init\n init: true,\n };\n \n // Extend defaults with parameters\n for (var param in params) {\n app.params[param] = params[param];\n }\n \n // DOM lib\n var $ = Dom7;\n \n // Template7 lib\n var t7 = Template7;\n app._compiledTemplates = {};\n \n // App Root\n app.root = $(app.params.root);\n app.root.eq(0).addClass('framework7-root');\n \n // Touch events\n app.touchEvents = {\n start: app.support.touch ? 'touchstart' : 'mousedown',\n move: app.support.touch ? 'touchmove' : 'mousemove',\n end: app.support.touch ? 'touchend' : 'mouseup'\n };\n \n // Link to local storage\n app.ls = window.localStorage;\n \n // RTL\n app.rtl = $('body').css('direction') === 'rtl';\n if (app.rtl) $('html').attr('dir', 'rtl');\n \n // Overwrite statusbar overlay\n if (typeof app.params.statusbarOverlay !== 'undefined') {\n if (app.params.statusbarOverlay) $('html').addClass('with-statusbar-overlay');\n else $('html').removeClass('with-statusbar-overlay');\n }\n else if (app.device.ios && (window.cordova || window.phonegap)) {\n $(document).on('resume', function () {\n if (app.device.needsStatusBar()) {\n $('html').addClass('with-statusbar-overlay');\n }\n }, false);\n }\n \n"," /*======================================================\n ************ Views ************\n ======================================================*/\n app.views = [];\n var View = function (selector, params) {\n var defaults = {\n dynamicNavbar: false,\n domCache: false,\n linksView: undefined,\n reloadPages: false,\n uniqueHistory: app.params.uniqueHistory,\n uniqueHistoryIgnoreGetParameters: app.params.uniqueHistoryIgnoreGetParameters,\n allowDuplicateUrls: app.params.allowDuplicateUrls,\n swipeBackPage: app.params.swipeBackPage,\n swipeBackPageAnimateShadow: app.params.swipeBackPageAnimateShadow,\n swipeBackPageAnimateOpacity: app.params.swipeBackPageAnimateOpacity,\n swipeBackPageActiveArea: app.params.swipeBackPageActiveArea,\n swipeBackPageThreshold: app.params.swipeBackPageThreshold,\n animatePages: app.params.animatePages,\n preloadPreviousPage: app.params.preloadPreviousPage\n };\n var i;\n \n // Params\n params = params || {};\n \n // Disable dynamic navbar for material theme\n if (params.dynamicNavbar && app.params.material) params.dynamicNavbar = false;\n \n // Extend params with defaults\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n // View\n var view = this;\n view.params = params;\n \n // Selector\n view.selector = selector;\n \n // Container\n var container = $(selector);\n view.container = container[0];\n \n // Fix Selector\n \n if (typeof selector !== 'string') {\n // Supposed to be HTMLElement or Dom7\n selector = (container.attr('id') ? '#' + container.attr('id') : '') + (container.attr('class') ? '.' + container.attr('class').replace(/ /g, '.').replace('.active', '') : '');\n view.selector = selector;\n }\n \n // Is main\n view.main = container.hasClass(app.params.viewMainClass);\n \n // Content cache\n view.contentCache = {};\n \n // Context cache\n view.contextCache = {};\n \n // Pages cache\n view.pagesCache = {};\n view.pageElementsCache = {};\n \n // Store View in element for easy access\n container[0].f7View = view;\n \n // Pages\n view.pagesContainer = container.find('.pages')[0];\n view.initialPages = [];\n view.initialPagesUrl = [];\n view.initialNavbars = [];\n if (view.params.domCache) {\n var initialPages = container.find('.page');\n for (i = 0; i < initialPages.length; i++) {\n view.initialPages.push(initialPages[i]);\n view.initialPagesUrl.push('#' + initialPages.eq(i).attr('data-page'));\n }\n if (view.params.dynamicNavbar) {\n var initialNavbars = container.find('.navbar-inner');\n for (i = 0; i < initialNavbars.length; i++) {\n view.initialNavbars.push(initialNavbars[i]);\n }\n }\n \n }\n \n view.allowPageChange = true;\n \n // Location\n var docLocation = document.location.href;\n \n // History\n view.history = [];\n var viewURL = docLocation;\n var pushStateSeparator = app.params.pushStateSeparator;\n var pushStateRoot = app.params.pushStateRoot;\n if (app.params.pushState && view.main) {\n if (pushStateRoot) {\n viewURL = pushStateRoot;\n }\n else {\n if (pushStateSeparator && viewURL.indexOf(pushStateSeparator) >= 0 && viewURL.indexOf(pushStateSeparator + '#') < 0) viewURL = viewURL.split(pushStateSeparator)[0];\n }\n \n }\n \n // Active Page\n var currentPage, currentPageData;\n if (!view.activePage) {\n currentPage = $(view.pagesContainer).find('.page-on-center');\n if (currentPage.length === 0) {\n currentPage = $(view.pagesContainer).find('.page:not(.cached)');\n currentPage = currentPage.eq(currentPage.length - 1);\n }\n if (currentPage.length > 0) {\n currentPageData = currentPage[0].f7PageData;\n }\n }\n \n // View startup URL\n if (view.params.domCache && currentPage) {\n view.url = container.attr('data-url') || view.params.url || '#' + currentPage.attr('data-page');\n view.pagesCache[view.url] = currentPage.attr('data-page');\n }\n else view.url = container.attr('data-url') || view.params.url || viewURL;\n \n // Update current page Data\n if (currentPageData) {\n currentPageData.view = view;\n currentPageData.url = view.url;\n if (view.params.domCache && view.params.dynamicNavbar && !currentPageData.navbarInnerContainer) {\n currentPageData.navbarInnerContainer = view.initialNavbars[view.initialPages.indexOf(currentPageData.container)];\n }\n view.activePage = currentPageData;\n currentPage[0].f7PageData = currentPageData;\n }\n \n // Store to history main view's url\n if (view.url) {\n view.history.push(view.url);\n }\n \n // Touch events\n var isTouched = false,\n isMoved = false,\n touchesStart = {},\n isScrolling,\n activePage = [],\n previousPage = [],\n viewContainerWidth,\n touchesDiff,\n allowViewTouchMove = true,\n touchStartTime,\n activeNavbar = [],\n previousNavbar = [],\n activeNavElements,\n previousNavElements,\n activeNavBackIcon,\n previousNavBackIcon,\n dynamicNavbar,\n pageShadow,\n pageOpacity,\n el;\n \n view.handleTouchStart = function (e) {\n if (!allowViewTouchMove || !view.params.swipeBackPage || isTouched || app.swipeoutOpenedEl || !view.allowPageChange) return;\n isMoved = false;\n isTouched = true;\n isScrolling = undefined;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n dynamicNavbar = view.params.dynamicNavbar && container.find('.navbar-inner').length > 1;\n };\n \n view.handleTouchMove = function (e) {\n if (!isTouched) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (isScrolling || e.f7PreventSwipeBack || app.preventSwipeBack) {\n isTouched = false;\n return;\n }\n if (!isMoved) {\n var cancel = false;\n // Calc values during first move fired\n viewContainerWidth = container.width();\n var target = $(e.target);\n var swipeout = target.hasClass('swipeout') ? target : target.parents('.swipeout');\n if (swipeout.length > 0) {\n if (!app.rtl && swipeout.find('.swipeout-actions-left').length > 0) cancel = true;\n if (app.rtl && swipeout.find('.swipeout-actions-right').length > 0) cancel = true;\n }\n activePage = target.is('.page') ? target : target.parents('.page');\n if (activePage.hasClass('no-swipeback')) cancel = true;\n previousPage = container.find('.page-on-left:not(.cached)');\n var notFromBorder = touchesStart.x - container.offset().left > view.params.swipeBackPageActiveArea;\n if (app.rtl) {\n notFromBorder = touchesStart.x < container.offset().left - container[0].scrollLeft + viewContainerWidth - view.params.swipeBackPageActiveArea;\n }\n else {\n notFromBorder = touchesStart.x - container.offset().left > view.params.swipeBackPageActiveArea;\n }\n if (notFromBorder) cancel = true;\n if (previousPage.length === 0 || activePage.length === 0) cancel = true;\n if (cancel) {\n isTouched = false;\n return;\n }\n \n if (view.params.swipeBackPageAnimateShadow && !app.device.android) {\n pageShadow = activePage.find('.swipeback-page-shadow');\n if (pageShadow.length === 0) {\n pageShadow = $('
                  ');\n activePage.append(pageShadow);\n }\n }\n if (view.params.swipeBackPageAnimateOpacity) {\n pageOpacity = previousPage.find('.swipeback-page-opacity');\n if (pageOpacity.length === 0) {\n pageOpacity = $('
                  ');\n previousPage.append(pageOpacity);\n }\n }\n \n if (dynamicNavbar) {\n activeNavbar = container.find('.navbar-on-center:not(.cached)');\n previousNavbar = container.find('.navbar-on-left:not(.cached)');\n activeNavElements = activeNavbar.find('.left, .center, .right, .subnavbar, .fading');\n previousNavElements = previousNavbar.find('.left, .center, .right, .subnavbar, .fading');\n if (app.params.animateNavBackIcon) {\n activeNavBackIcon = activeNavbar.find('.left.sliding .back .icon');\n previousNavBackIcon = previousNavbar.find('.left.sliding .back .icon');\n }\n }\n \n // Close/Hide Any Picker\n if ($('.picker-modal.modal-in').length > 0) {\n app.closeModal($('.picker-modal.modal-in'));\n }\n }\n e.f7PreventPanelSwipe = true;\n isMoved = true;\n e.preventDefault();\n \n // RTL inverter\n var inverter = app.rtl ? -1 : 1;\n \n // Touches diff\n touchesDiff = (pageX - touchesStart.x - view.params.swipeBackPageThreshold) * inverter;\n if (touchesDiff < 0) touchesDiff = 0;\n var percentage = touchesDiff / viewContainerWidth;\n \n // Swipe Back Callback\n var callbackData = {\n percentage: percentage,\n activePage: activePage[0],\n previousPage: previousPage[0],\n activeNavbar: activeNavbar[0],\n previousNavbar: previousNavbar[0]\n };\n if (view.params.onSwipeBackMove) {\n view.params.onSwipeBackMove(callbackData);\n }\n container.trigger('swipeBackMove swipeback:move', callbackData);\n \n // Transform pages\n var activePageTranslate = touchesDiff * inverter;\n var previousPageTranslate = (touchesDiff / 5 - viewContainerWidth / 5) * inverter;\n if (app.device.pixelRatio === 1) {\n activePageTranslate = Math.round(activePageTranslate);\n previousPageTranslate = Math.round(previousPageTranslate);\n }\n \n activePage.transform('translate3d(' + activePageTranslate + 'px,0,0)');\n if (view.params.swipeBackPageAnimateShadow && !app.device.android) pageShadow[0].style.opacity = 1 - 1 * percentage;\n \n previousPage.transform('translate3d(' + previousPageTranslate + 'px,0,0)');\n if (view.params.swipeBackPageAnimateOpacity) pageOpacity[0].style.opacity = 1 - 1 * percentage;\n \n // Dynamic Navbars Animation\n if (dynamicNavbar) {\n var i;\n for (i = 0; i < activeNavElements.length; i++) {\n el = $(activeNavElements[i]);\n if (!el.is('.subnavbar.sliding')) el[0].style.opacity = (1 - percentage * 1.3);\n if (el[0].className.indexOf('sliding') >= 0) {\n var activeNavTranslate = percentage * el[0].f7NavbarRightOffset;\n if (app.device.pixelRatio === 1) activeNavTranslate = Math.round(activeNavTranslate);\n el.transform('translate3d(' + activeNavTranslate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (el[0].className.indexOf('left') >= 0 && activeNavBackIcon.length > 0) {\n activeNavBackIcon.transform('translate3d(' + -activeNavTranslate + 'px,0,0)');\n }\n }\n }\n }\n for (i = 0; i < previousNavElements.length; i++) {\n el = $(previousNavElements[i]);\n if (!el.is('.subnavbar.sliding')) el[0].style.opacity = percentage * 1.3 - 0.3;\n if (el[0].className.indexOf('sliding') >= 0) {\n var previousNavTranslate = el[0].f7NavbarLeftOffset * (1 - percentage);\n if (app.device.pixelRatio === 1) previousNavTranslate = Math.round(previousNavTranslate);\n el.transform('translate3d(' + previousNavTranslate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (el[0].className.indexOf('left') >= 0 && previousNavBackIcon.length > 0) {\n previousNavBackIcon.transform('translate3d(' + -previousNavTranslate + 'px,0,0)');\n }\n }\n }\n }\n }\n };\n \n view.handleTouchEnd = function (e) {\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n isTouched = false;\n isMoved = false;\n if (touchesDiff === 0) {\n $([activePage[0], previousPage[0]]).transform('');\n if (dynamicNavbar) {\n activeNavElements.transform('').css({opacity: ''});\n previousNavElements.transform('').css({opacity: ''});\n if (activeNavBackIcon && activeNavBackIcon.length > 0) activeNavBackIcon.transform('');\n if (previousNavBackIcon && activeNavBackIcon.length > 0) previousNavBackIcon.transform('');\n }\n return;\n }\n var timeDiff = (new Date()).getTime() - touchStartTime;\n var pageChanged = false;\n // Swipe back to previous page\n if (\n timeDiff < 300 && touchesDiff > 10 ||\n timeDiff >= 300 && touchesDiff > viewContainerWidth / 2\n ) {\n activePage.removeClass('page-on-center').addClass('page-on-right');\n previousPage.removeClass('page-on-left').addClass('page-on-center');\n if (dynamicNavbar) {\n activeNavbar.removeClass('navbar-on-center').addClass('navbar-on-right');\n previousNavbar.removeClass('navbar-on-left').addClass('navbar-on-center');\n }\n pageChanged = true;\n }\n // Reset custom styles\n // Add transitioning class for transition-duration\n $([activePage[0], previousPage[0]]).transform('').addClass('page-transitioning');\n if (dynamicNavbar) {\n activeNavElements.css({opacity: ''})\n .each(function () {\n var translate = pageChanged ? this.f7NavbarRightOffset : 0;\n var sliding = $(this);\n sliding.transform('translate3d(' + translate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && activeNavBackIcon.length > 0) {\n activeNavBackIcon.addClass('page-transitioning').transform('translate3d(' + -translate + 'px,0,0)');\n }\n }\n \n }).addClass('page-transitioning');\n \n previousNavElements.transform('').css({opacity: ''}).each(function () {\n var translate = pageChanged ? 0 : this.f7NavbarLeftOffset;\n var sliding = $(this);\n sliding.transform('translate3d(' + translate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && previousNavBackIcon.length > 0) {\n previousNavBackIcon.addClass('page-transitioning').transform('translate3d(' + -translate + 'px,0,0)');\n }\n }\n }).addClass('page-transitioning');\n }\n allowViewTouchMove = false;\n view.allowPageChange = false;\n // Swipe Back Callback\n var callbackData = {\n activePage: activePage[0],\n previousPage: previousPage[0],\n activeNavbar: activeNavbar[0],\n previousNavbar: previousNavbar[0]\n };\n if (pageChanged) {\n // Update View's URL\n var url = view.history[view.history.length - 2];\n view.url = url;\n \n // Page before animation callback\n app.pageBackCallback('before', view, {pageContainer: activePage[0], url: url, position: 'center', newPage: previousPage, oldPage: activePage, swipeBack: true});\n app.pageAnimCallback('before', view, {pageContainer: previousPage[0], url: url, position: 'left', newPage: previousPage, oldPage: activePage, swipeBack: true});\n \n if (view.params.onSwipeBackBeforeChange) {\n view.params.onSwipeBackBeforeChange(callbackData);\n }\n container.trigger('swipeBackBeforeChange swipeback:beforechange', callbackData);\n }\n else {\n if (view.params.onSwipeBackBeforeReset) {\n view.params.onSwipeBackBeforeReset(callbackData);\n }\n container.trigger('swipeBackBeforeReset swipeback:beforereset', callbackData);\n }\n \n activePage.transitionEnd(function () {\n $([activePage[0], previousPage[0]]).removeClass('page-transitioning');\n if (dynamicNavbar) {\n activeNavElements.removeClass('page-transitioning').css({opacity: ''});\n previousNavElements.removeClass('page-transitioning').css({opacity: ''});\n if (activeNavBackIcon && activeNavBackIcon.length > 0) activeNavBackIcon.removeClass('page-transitioning');\n if (previousNavBackIcon && previousNavBackIcon.length > 0) previousNavBackIcon.removeClass('page-transitioning');\n }\n allowViewTouchMove = true;\n view.allowPageChange = true;\n if (pageChanged) {\n if (app.params.pushState && view.main) history.back();\n // Page after animation callback\n app.pageBackCallback('after', view, {pageContainer: activePage[0], url: url, position: 'center', newPage: previousPage, oldPage: activePage, swipeBack: true});\n app.pageAnimCallback('after', view, {pageContainer: previousPage[0], url: url, position: 'left', newPage: previousPage, oldPage: activePage, swipeBack: true});\n app.router.afterBack(view, activePage, previousPage);\n \n if (view.params.onSwipeBackAfterChange) {\n view.params.onSwipeBackAfterChange(callbackData);\n }\n container.trigger('swipeBackAfterChange swipeback:afterchange', callbackData);\n }\n else {\n if (view.params.onSwipeBackAfterReset) {\n view.params.onSwipeBackAfterReset(callbackData);\n }\n container.trigger('swipeBackAfterReset swipeback:afterreset', callbackData);\n }\n if (pageShadow && pageShadow.length > 0) pageShadow.remove();\n if (pageOpacity && pageOpacity.length > 0) pageOpacity.remove();\n });\n };\n view.attachEvents = function (detach) {\n var action = detach ? 'off' : 'on';\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n container[action](app.touchEvents.start, view.handleTouchStart, passiveListener);\n container[action](app.touchEvents.move, view.handleTouchMove, activeListener);\n container[action](app.touchEvents.end, view.handleTouchEnd, passiveListener);\n };\n view.detachEvents = function () {\n view.attachEvents(true);\n };\n \n // Init\n if (view.params.swipeBackPage && !app.params.material) {\n view.attachEvents();\n }\n \n // Check view name to delete unwanted characters\n if (view.params.name) view.params.name = view.params.name.replace(/[^a-zA-Z]/g, '');\n \n // Add view to app\n app.views.push(view);\n if (view.main) {\n app.mainView = view;\n app.views.main = view;\n }\n else if(view.params.name) {\n app[view.params.name + 'View'] = view;\n app.views[view.params.name] = view;\n }\n \n // Router\n view.router = {\n load: function (options) {\n return app.router.load(view, options);\n },\n back: function (options) {\n return app.router.back(view, options);\n },\n // Shortcuts\n loadPage: function (options) {\n options = options || {};\n if (typeof options === 'string') {\n var url = options;\n options = {};\n if (url && url.indexOf('#') === 0 && view.params.domCache) {\n options.pageName = url.split('#')[1];\n }\n else options.url = url;\n }\n return app.router.load(view, options);\n },\n loadContent: function (content) {\n return app.router.load(view, {content: content});\n },\n reloadPage: function (url) {\n return app.router.load(view, {url: url, reload: true});\n },\n reloadContent: function (content) {\n return app.router.load(view, {content: content, reload: true});\n },\n reloadPreviousPage: function (url) {\n return app.router.load(view, {url: url, reloadPrevious: true, reload: true});\n },\n reloadPreviousContent: function (content) {\n return app.router.load(view, {content: content, reloadPrevious: true, reload: true});\n },\n refreshPage: function () {\n var options = {\n url: view.url,\n reload: true,\n ignoreCache: true\n };\n if (options.url && options.url.indexOf('#') === 0) {\n if (view.params.domCache && view.pagesCache[options.url]) {\n options.pageName = view.pagesCache[options.url];\n options.url = undefined;\n delete options.url;\n }\n else if (view.contentCache[options.url]) {\n options.content = view.contentCache[options.url];\n options.url = undefined;\n delete options.url;\n }\n }\n return app.router.load(view, options);\n },\n refreshPreviousPage: function () {\n var options = {\n url: view.history[view.history.length - 2],\n reload: true,\n reloadPrevious: true,\n ignoreCache: true\n };\n if (options.url && options.url.indexOf('#') === 0 && view.params.domCache && view.pagesCache[options.url]) {\n options.pageName = view.pagesCache[options.url];\n options.url = undefined;\n delete options.url;\n }\n return app.router.load(view, options);\n }\n };\n \n // Aliases for temporary backward compatibility\n view.loadPage = view.router.loadPage;\n view.loadContent = view.router.loadContent;\n view.reloadPage = view.router.reloadPage;\n view.reloadContent = view.router.reloadContent;\n view.reloadPreviousPage = view.router.reloadPreviousPage;\n view.reloadPreviousContent = view.router.reloadPreviousContent;\n view.refreshPage = view.router.refreshPage;\n view.refreshPreviousPage = view.router.refreshPreviousPage;\n view.back = view.router.back;\n \n // Bars methods\n view.hideNavbar = function (animated) {\n return app.hideNavbar(container.find('.navbar'), animated);\n };\n view.showNavbar = function (animated) {\n return app.showNavbar(container.find('.navbar'), animated);\n };\n view.hideToolbar = function (animated) {\n return app.hideToolbar(container.find('.toolbar'), animated);\n };\n view.showToolbar = function (animated) {\n return app.showToolbar(container.find('.toolbar'), animated);\n };\n \n // Push State on load\n if (app.params.pushState && app.params.pushStateOnLoad && view.main) {\n var pushStateUrl;\n var pushStateUrlSplit = docLocation.split(pushStateSeparator)[1];\n if (pushStateRoot) {\n pushStateUrl = docLocation.split(app.params.pushStateRoot + pushStateSeparator)[1];\n }\n else if (pushStateSeparator && docLocation.indexOf(pushStateSeparator) >= 0 && docLocation.indexOf(pushStateSeparator + '#') < 0) {\n pushStateUrl = pushStateUrlSplit;\n }\n var pushStateAnimatePages = app.params.pushStateNoAnimation ? false : undefined;\n var historyState = history.state;\n if (pushStateUrl) {\n if (pushStateUrl.indexOf('#') >= 0 && view.params.domCache && historyState && historyState.pageName && 'viewIndex' in historyState) {\n app.router.load(view, {pageName: historyState.pageName, url: historyState.url, animatePages: pushStateAnimatePages, pushState: false});\n }\n else if (pushStateUrl.indexOf('#') >= 0 && view.params.domCache && view.initialPagesUrl.indexOf(pushStateUrl) >= 0) {\n app.router.load(view, {pageName: pushStateUrl.replace('#',''), animatePages: pushStateAnimatePages, pushState: false});\n }\n else app.router.load(view, {url: pushStateUrl, animatePages: pushStateAnimatePages, pushState: false});\n }\n else if (view.params.domCache && docLocation.indexOf(pushStateSeparator + '#') >= 0) {\n if (historyState && historyState.pageName && 'viewIndex' in historyState) {\n app.router.load(view, {pageName: historyState.pageName, url: historyState.url, animatePages: pushStateAnimatePages, pushState: false});\n }\n else if (pushStateSeparator && pushStateUrlSplit.indexOf('#') === 0) {\n if (view.initialPagesUrl.indexOf(pushStateUrlSplit)) {\n app.router.load(view, {pageName: pushStateUrlSplit.replace('#', ''), animatePages: pushStateAnimatePages, pushState: false});\n }\n }\n }\n }\n \n // Destroy\n view.destroy = function () {\n view.detachEvents();\n if (view.main) {\n app.mainView = null;\n delete app.mainView;\n app.views.main = null;\n delete app.views.main;\n }\n else if(view.params.name) {\n app[view.params.name + 'View'] = null;\n delete app[view.params.name + 'View'];\n app.views[view.params.name] = null;\n delete app.views[view.params.name];\n }\n container.removeAttr('data-page');\n container[0].f7View = null;\n delete container[0].f7View;\n \n app.views.splice(app.views.indexOf(view), 1);\n \n // Delete props & methods\n for (var prop in view) {\n if (view.hasOwnProperty(prop)) {\n view[prop] = null;\n delete view[prop];\n }\n }\n view = null;\n };\n \n // Plugin hook\n app.pluginHook('addView', view);\n \n // Return view\n return view;\n };\n \n app.addView = function (selector, params) {\n return new View(selector, params);\n };\n \n app.getCurrentView = function (index) {\n var popoverView = $('.popover.modal-in .view');\n var popupView = $('.popup.modal-in .view');\n var panelView = $('.panel.active .view');\n var appViews = $('.views');\n // Find active view as tab\n var appView = appViews.children('.view');\n // Propably in tabs or split view\n if (appView.length > 1) {\n if (appView.hasClass('tab')) {\n // Tabs\n appView = appViews.children('.view.active');\n }\n else {\n // Split View, leave appView intact\n }\n }\n if (popoverView.length > 0 && popoverView[0].f7View) return popoverView[0].f7View;\n if (popupView.length > 0 && popupView[0].f7View) return popupView[0].f7View;\n if (panelView.length > 0 && panelView[0].f7View) return panelView[0].f7View;\n if (appView.length > 0) {\n if (appView.length === 1 && appView[0].f7View) return appView[0].f7View;\n if (appView.length > 1) {\n var currentViews = [];\n for (var i = 0; i < appView.length; i++) {\n if (appView[i].f7View) currentViews.push(appView[i].f7View);\n }\n if (currentViews.length > 0 && typeof index !== 'undefined') return currentViews[index];\n if (currentViews.length > 1) return currentViews;\n if (currentViews.length === 1) return currentViews[0];\n return undefined;\n }\n }\n return undefined;\n };\n \n"," /*======================================================\n ************ Navbars && Toolbars ************\n ======================================================*/\n // On Navbar Init Callback\n app.navbarInitCallback = function (view, pageContainer, navbarContainer, navbarInnerContainer) {\n if (!navbarContainer && navbarInnerContainer) navbarContainer = $(navbarInnerContainer).parent('.navbar')[0];\n if (!navbarInnerContainer || navbarInnerContainer.f7NavbarInitialized && view && !view.params.domCache) return;\n var navbarData = {\n container: navbarContainer,\n innerContainer: navbarInnerContainer\n };\n var pageData = pageContainer && pageContainer.f7PageData;\n \n var eventData = {\n page: pageData,\n navbar: navbarData\n };\n \n if (navbarInnerContainer.f7NavbarInitialized && ((view && view.params.domCache) || (!view && $(navbarContainer).parents('.popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal').length > 0))) {\n // Reinit Navbar\n app.reinitNavbar(navbarContainer, navbarInnerContainer);\n \n // Plugin hook\n app.pluginHook('navbarReinit', eventData);\n \n // Event\n $(navbarInnerContainer).trigger('navbarReinit navbar:reinit', eventData);\n return;\n }\n navbarInnerContainer.f7NavbarInitialized = true;\n // Before Init\n app.pluginHook('navbarBeforeInit', navbarData, pageData);\n $(navbarInnerContainer).trigger('navbarBeforeInit navbar:beforeinit', eventData);\n \n // Initialize Navbar\n app.initNavbar(navbarContainer, navbarInnerContainer);\n \n // On init\n app.pluginHook('navbarInit', navbarData, pageData);\n $(navbarInnerContainer).trigger('navbarInit navbar:init', eventData);\n };\n // Navbar Remove Callback\n app.navbarRemoveCallback = function (view, pageContainer, navbarContainer, navbarInnerContainer) {\n if (!navbarContainer && navbarInnerContainer) navbarContainer = $(navbarInnerContainer).parent('.navbar')[0];\n var navbarData = {\n container: navbarContainer,\n innerContainer: navbarInnerContainer\n };\n var pageData;\n if (pageContainer) {\n pageData = pageContainer.f7PageData;\n }\n \n var eventData = {\n page: pageData,\n navbar: navbarData\n };\n app.pluginHook('navbarBeforeRemove', navbarData, pageData);\n $(navbarInnerContainer).trigger('navbarBeforeRemove navbar:beforeremove', eventData);\n navbarData = null;\n pageData = null;\n };\n app.initNavbar = function (navbarContainer, navbarInnerContainer) {\n // Init Subnavbar Searchbar\n if (app.initSearchbar) app.initSearchbar(navbarInnerContainer);\n };\n app.reinitNavbar = function (navbarContainer, navbarInnerContainer) {\n // Re init navbar methods\n };\n app.initNavbarWithCallback = function (navbarContainer) {\n navbarContainer = $(navbarContainer);\n var viewContainer = navbarContainer.parents('.' + app.params.viewClass);\n var view;\n if (viewContainer.length === 0) return;\n if (navbarContainer.parents('.navbar-through').length === 0 && viewContainer.find('.navbar-through').length === 0) return;\n view = viewContainer[0].f7View || undefined;\n \n navbarContainer.find('.navbar-inner').each(function () {\n var navbarInnerContainer = this;\n var pageContainer;\n if ($(navbarInnerContainer).attr('data-page')) {\n // For dom cache\n pageContainer = viewContainer.find('.page[data-page=\"' + $(navbarInnerContainer).attr('data-page') + '\"]')[0];\n }\n if (!pageContainer) {\n var pages = viewContainer.find('.page');\n if (pages.length === 1) {\n pageContainer = pages[0];\n }\n else {\n viewContainer.find('.page').each(function () {\n if (this.f7PageData && this.f7PageData.navbarInnerContainer === navbarInnerContainer) {\n pageContainer = this;\n }\n });\n }\n }\n app.navbarInitCallback(view, pageContainer, navbarContainer[0], navbarInnerContainer);\n });\n };\n \n // Size Navbars\n app.sizeNavbars = function (viewContainer) {\n if (app.params.material) return;\n var navbarInner = viewContainer ? $(viewContainer).find('.navbar .navbar-inner:not(.cached)') : $('.navbar .navbar-inner:not(.cached)');\n navbarInner.each(function () {\n var n = $(this);\n if (n.hasClass('cached')) return;\n var left = app.rtl ? n.find('.right') : n.find('.left'),\n right = app.rtl ? n.find('.left') : n.find('.right'),\n center = n.find('.center'),\n subnavbar = n.find('.subnavbar'),\n noLeft = left.length === 0,\n noRight = right.length === 0,\n leftWidth = noLeft ? 0 : left.outerWidth(true),\n rightWidth = noRight ? 0 : right.outerWidth(true),\n centerWidth = center.outerWidth(true),\n navbarStyles = n.styles(),\n navbarWidth = n[0].offsetWidth - parseInt(navbarStyles.paddingLeft, 10) - parseInt(navbarStyles.paddingRight, 10),\n onLeft = n.hasClass('navbar-on-left'),\n currLeft, diff;\n \n if (noRight) {\n currLeft = navbarWidth - centerWidth;\n }\n if (noLeft) {\n currLeft = 0;\n }\n if (!noLeft && !noRight) {\n currLeft = (navbarWidth - rightWidth - centerWidth + leftWidth) / 2;\n }\n var requiredLeft = (navbarWidth - centerWidth) / 2;\n if (navbarWidth - leftWidth - rightWidth > centerWidth) {\n if (requiredLeft < leftWidth) {\n requiredLeft = leftWidth;\n }\n if (requiredLeft + centerWidth > navbarWidth - rightWidth) {\n requiredLeft = navbarWidth - rightWidth - centerWidth;\n }\n diff = requiredLeft - currLeft;\n }\n else {\n diff = 0;\n }\n // RTL inverter\n var inverter = app.rtl ? -1 : 1;\n \n if (center.hasClass('sliding')) {\n center[0].f7NavbarLeftOffset = -(currLeft + diff) * inverter;\n center[0].f7NavbarRightOffset = (navbarWidth - currLeft - diff - centerWidth) * inverter;\n if (onLeft) {\n if (app.params.animateNavBackIcon) {\n var activeNavbarBackLink = n.parent().find('.navbar-on-center').find('.left.sliding .back .icon ~ span');\n if (activeNavbarBackLink.length > 0) {\n center[0].f7NavbarLeftOffset += activeNavbarBackLink[0].offsetLeft;\n }\n }\n center.transform('translate3d(' + center[0].f7NavbarLeftOffset + 'px, 0, 0)');\n }\n }\n if (!noLeft && left.hasClass('sliding')) {\n if (app.rtl) {\n left[0].f7NavbarLeftOffset = -(navbarWidth - left[0].offsetWidth) / 2 * inverter;\n left[0].f7NavbarRightOffset = leftWidth * inverter;\n }\n else {\n left[0].f7NavbarLeftOffset = -leftWidth;\n left[0].f7NavbarRightOffset = (navbarWidth - left[0].offsetWidth) / 2;\n if (app.params.animateNavBackIcon && left.find('.back .icon').length > 0) {\n left[0].f7NavbarRightOffset -= left.find('.back .icon')[0].offsetWidth;\n }\n }\n if (onLeft) left.transform('translate3d(' + left[0].f7NavbarLeftOffset + 'px, 0, 0)');\n }\n if (!noRight && right.hasClass('sliding')) {\n if (app.rtl) {\n right[0].f7NavbarLeftOffset = -rightWidth * inverter;\n right[0].f7NavbarRightOffset = (navbarWidth - right[0].offsetWidth) / 2 * inverter;\n }\n else {\n right[0].f7NavbarLeftOffset = -(navbarWidth - right[0].offsetWidth) / 2;\n right[0].f7NavbarRightOffset = rightWidth;\n }\n if (onLeft) right.transform('translate3d(' + right[0].f7NavbarLeftOffset + 'px, 0, 0)');\n }\n if (subnavbar.length && subnavbar.hasClass('sliding')) {\n subnavbar[0].f7NavbarLeftOffset = app.rtl ? subnavbar[0].offsetWidth : -subnavbar[0].offsetWidth;\n subnavbar[0].f7NavbarRightOffset = -subnavbar[0].f7NavbarLeftOffset;\n }\n \n // Center left\n var centerLeft = diff;\n if (app.rtl && noLeft && noRight && center.length > 0) centerLeft = -centerLeft;\n center.css({left: centerLeft + 'px'});\n \n });\n };\n \n // Hide/Show Navbars/Toolbars\n app.hideNavbar = function (navbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n $(navbarContainer).addClass('navbar-hidden' + (!animated ? (' not-animated') : ''));\n return true;\n };\n app.showNavbar = function (navbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n var navbar = $(navbarContainer);\n if (animated) {\n navbar.removeClass('not-animated');\n navbar.addClass('navbar-hiding').removeClass('navbar-hidden').transitionEnd(function () {\n navbar.removeClass('navbar-hiding');\n });\n }\n else {\n navbar.removeClass('navbar-hidden navbar-hiding not-animated');\n }\n return true;\n };\n app.hideToolbar = function (toolbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n $(toolbarContainer).addClass('toolbar-hidden' + (!animated ? (' not-animated') : ''));\n return true;\n };\n app.showToolbar = function (toolbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n var toolbar = $(toolbarContainer);\n if (animated) {\n toolbar.removeClass('not-animated');\n toolbar.addClass('toolbar-hiding').removeClass('toolbar-hidden').transitionEnd(function () {\n toolbar.removeClass('toolbar-hiding' + (!animated ? (' not-animated') : ''));\n });\n }\n else {\n toolbar.removeClass('toolbar-hidden toolbar-hiding not-animated');\n }\n \n };\n \n"," /*======================================================\n ************ Searchbar ************\n ======================================================*/\n var Searchbar = function (container, params) {\n var defaults = {\n input: null,\n clearButton: null,\n cancelButton: null,\n searchList: null,\n searchIn: '.item-title',\n searchBy: '',\n found: null,\n notFound: null,\n overlay: null,\n ignore: '.searchbar-ignore',\n customSearch: false,\n removeDiacritics: false,\n hideDividers: true,\n hideGroups: true,\n /* Callbacks\n onSearch\n onEnable\n onDisable\n onClear\n */\n \n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined' || params[def] === null && defaults.hasOwnProperty(def)) {\n params[def] = defaults[def];\n }\n }\n \n // Instance\n var s = this;\n \n // Material\n s.material = app.params.material;\n \n // Params\n s.params = params;\n \n // Container\n container = $(container);\n s.container = container;\n \n // Active\n s.active = false;\n \n // Input\n s.input = s.params.input ? $(s.params.input) : s.container.find('input[type=\"search\"]');\n s.clearButton = s.params.clearButton ? $(s.params.clearButton) : s.container.find('.searchbar-clear');\n s.cancelButton = s.params.cancelButton ? $(s.params.cancelButton) : s.container.find('.searchbar-cancel');\n \n // Search List\n s.searchList = $(s.params.searchList);\n \n // Is Virtual List\n s.isVirtualList = s.searchList.hasClass('virtual-list');\n \n // Is In Page\n s.pageContainer = s.container.parents('.page').eq(0);\n \n // Overlay\n if (!s.params.overlay) {\n s.overlay = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-overlay') : $('.searchbar-overlay');\n }\n else {\n s.overlay = $(s.params.overlay);\n }\n // Found and not found\n if (!s.params.found) {\n s.found = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-found') : $('.searchbar-found');\n }\n else {\n s.found = $(s.params.found);\n }\n if (!s.params.notFound) {\n s.notFound = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-not-found') : $('.searchbar-not-found');\n }\n else {\n s.notFound = $(s.params.notFound);\n }\n \n // Set Cancel button\n var cancelMarginProp = app.rtl ? 'margin-left' : 'margin-right';\n var cancelButtonHasMargin = false;\n s.setCancelButtonMargin = function () {\n s.cancelButton.transition(0).show();\n s.cancelButton.css(cancelMarginProp, -s.cancelButton[0].offsetWidth + 'px');\n var clientLeft = s.cancelButton[0].clientLeft;\n s.cancelButton.transition('');\n cancelButtonHasMargin = true;\n };\n \n // Trigger\n s.triggerEvent = function (eventName, callbackName, eventData) {\n s.container.trigger(eventName, eventData);\n if (s.searchList.length > 0) s.searchList.trigger(eventName, eventData);\n if (callbackName && s.params[callbackName]) s.params[callbackName](s, eventData);\n };\n \n // Enable/disalbe\n s.enable = function (e) {\n function _enable() {\n if ((s.searchList.length || s.params.customSearch) && !s.container.hasClass('searchbar-active') && !s.query) s.overlay.addClass('searchbar-overlay-active');\n s.container.addClass('searchbar-active');\n if (s.cancelButton.length > 0 && !s.material) {\n if (!cancelButtonHasMargin) {\n s.setCancelButtonMargin();\n }\n s.cancelButton.css(cancelMarginProp, '0px');\n }\n s.triggerEvent('enableSearch searchbar:enable', 'onEnable');\n s.active = true;\n }\n if (app.device.ios && !app.params.material && e && e.type === 'focus') {\n setTimeout(function () {\n _enable();\n }, 400);\n }\n else {\n _enable();\n }\n };\n \n s.disable = function () {\n s.input.val('').trigger('change');\n s.container.removeClass('searchbar-active searchbar-not-empty');\n if (s.cancelButton.length > 0 && !s.material) s.cancelButton.css(cancelMarginProp, -s.cancelButton[0].offsetWidth + 'px');\n \n if (s.searchList.length || s.params.customSearch) s.overlay.removeClass('searchbar-overlay-active');\n \n s.active = false;\n function _disable() {\n s.input.blur();\n }\n if (app.device.ios) {\n setTimeout(function () {\n _disable();\n }, 400);\n }\n else {\n _disable();\n }\n s.triggerEvent('disableSearch searchbar:disable', 'onDisable');\n };\n \n // Clear\n s.clear = function (e) {\n if (!s.query && e && $(e.target).hasClass('searchbar-clear')) {\n s.disable();\n return;\n }\n var previousQuery = s.value;\n s.input.val('').trigger('change').focus();\n s.triggerEvent('clearSearch searchbar:clear', 'onClear', {previousQuery: previousQuery});\n };\n \n // Search\n s.handleInput = function () {\n setTimeout(function () {\n var value = s.input.val().trim();\n if ((s.searchList.length > 0 || s.params.customSearch) && (s.params.searchIn || s.isVirtualList)) s.search(value, true);\n }, 0);\n };\n \n var previousQuery = '';\n var virtualList;\n s.search = function (query, internal) {\n if (previousQuery && query.trim() === previousQuery) return;\n previousQuery = query.trim();\n \n if (!internal) {\n if (!s.active) {\n s.enable();\n }\n s.input.val(query);\n }\n s.query = s.value = query;\n // Add active/inactive classes on overlay\n if (query.length === 0) {\n s.container.removeClass('searchbar-not-empty');\n if (s.searchList.length && s.container.hasClass('searchbar-active')) s.overlay.addClass('searchbar-overlay-active');\n }\n else {\n s.container.addClass('searchbar-not-empty');\n if (s.searchList.length && s.container.hasClass('searchbar-active')) s.overlay.removeClass('searchbar-overlay-active');\n }\n \n if (s.params.customSearch) {\n s.triggerEvent('search searchbar:search', 'onSearch', {query: query});\n return;\n }\n \n var foundItems = [], _vlQuery;\n if (s.isVirtualList) {\n virtualList = s.searchList[0].f7VirtualList;\n if (query.trim() === '') {\n virtualList.resetFilter();\n s.notFound.hide();\n s.found.show();\n return;\n }\n _vlQuery = s.params.removeDiacritics ? $.removeDiacritics(query) : query;\n if (virtualList.params.searchAll) {\n foundItems = virtualList.params.searchAll(_vlQuery, virtualList.items) || [];\n }\n else if (virtualList.params.searchByItem) {\n for (var i = 0; i < virtualList.items.length; i++) {\n if(virtualList.params.searchByItem(_vlQuery, i, virtualList.params.items[i])) {\n foundItems.push(i);\n }\n }\n }\n }\n else {\n var values;\n if (s.params.removeDiacritics) values = $.removeDiacritics(query.trim().toLowerCase()).split(' ');\n else {\n values = query.trim().toLowerCase().split(' ');\n }\n s.searchList.find('li').removeClass('hidden-by-searchbar').each(function (index, el) {\n el = $(el);\n var compareWithText = [];\n el.find(s.params.searchIn).each(function () {\n var itemText = $(this).text().trim().toLowerCase();\n if (s.params.removeDiacritics) itemText = $.removeDiacritics(itemText);\n compareWithText.push(itemText);\n });\n compareWithText = compareWithText.join(' ');\n var wordsMatch = 0;\n for (var i = 0; i < values.length; i++) {\n if (compareWithText.indexOf(values[i]) >= 0) wordsMatch++;\n }\n if (wordsMatch !== values.length && !(s.params.ignore && el.is(s.params.ignore))) {\n el.addClass('hidden-by-searchbar');\n }\n else {\n foundItems.push(el[0]);\n }\n });\n \n if (s.params.hideDividers) {\n s.searchList.find('.item-divider, .list-group-title').each(function () {\n var title = $(this);\n var nextElements = title.nextAll('li');\n var hide = true;\n for (var i = 0; i < nextElements.length; i++) {\n var nextEl = $(nextElements[i]);\n if (nextEl.hasClass('list-group-title') || nextEl.hasClass('item-divider')) break;\n if (!nextEl.hasClass('hidden-by-searchbar')) {\n hide = false;\n }\n }\n var ignore = s.params.ignore && title.is(s.params.ignore);\n if (hide && !ignore) title.addClass('hidden-by-searchbar');\n else title.removeClass('hidden-by-searchbar');\n });\n }\n if (s.params.hideGroups) {\n s.searchList.find('.list-group').each(function () {\n var group = $(this);\n var ignore = s.params.ignore && group.is(s.params.ignore);\n var notHidden = group.find('li:not(.hidden-by-searchbar)');\n if (notHidden.length === 0 && !ignore) {\n group.addClass('hidden-by-searchbar');\n }\n else {\n group.removeClass('hidden-by-searchbar');\n }\n });\n }\n }\n s.triggerEvent('search searchbar:search', 'onSearch', {query: query, foundItems: foundItems});\n if (foundItems.length === 0) {\n s.notFound.show();\n s.found.hide();\n }\n else {\n s.notFound.hide();\n s.found.show();\n }\n if (s.isVirtualList) {\n virtualList.filterItems(foundItems);\n }\n };\n \n // Events\n function preventSubmit(e) {\n e.preventDefault();\n }\n \n s.attachEvents = function (destroy) {\n var method = destroy ? 'off' : 'on';\n s.container[method]('submit', preventSubmit);\n if (!s.material) s.cancelButton[method]('click', s.disable);\n s.overlay[method]('click', s.disable);\n s.input[method]('focus', s.enable);\n s.input[method]('change keydown keypress keyup compositionend', s.handleInput);\n s.clearButton[method]('click', s.clear);\n \n };\n s.detachEvents = function() {\n s.attachEvents(true);\n };\n \n // Init Destroy\n s.init = function () {\n s.attachEvents();\n };\n s.destroy = function () {\n if (!s) return;\n s.detachEvents();\n s = null;\n };\n \n // Init\n s.init();\n \n s.container[0].f7Searchbar = s;\n return s;\n \n };\n app.searchbar = function (container, params) {\n return new Searchbar(container, params);\n };\n app.initSearchbar = function (container) {\n container = $(container);\n var searchbar = container.hasClass('searchbar') ? container : container.find('.searchbar');\n if (searchbar.length === 0) return;\n if (!searchbar.hasClass('searchbar-init')) return;\n \n var sb = app.searchbar(searchbar, searchbar.dataset());\n \n function onBeforeRemove() {\n if (sb) sb.destroy();\n }\n if (container.hasClass('page')) {\n container.once('pageBeforeRemove', onBeforeRemove);\n }\n else if (container.hasClass('navbar-inner')) {\n container.once('navbarBeforeRemove', onBeforeRemove);\n }\n };\n \n"," /*======================================================\n ************ Messagebar ************\n ======================================================*/\n var Messagebar = function (container, params) {\n var defaults = {\n textarea: null,\n maxHeight: null,\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined' || params[def] === null) {\n params[def] = defaults[def];\n }\n }\n \n // Instance\n var m = this;\n \n // Params\n m.params = params;\n \n // Container\n m.container = $(container);\n if (m.container.length === 0) return;\n \n // Textarea\n m.textarea = m.params.textarea ? $(m.params.textarea) : m.container.find('textarea');\n \n // Is In Page\n m.pageContainer = m.container.parents('.page').eq(0);\n m.pageContent = m.pageContainer.find('.page-content');\n \n // Initial Sizes\n m.pageContentPadding = parseInt(m.pageContent.css('padding-bottom'));\n m.initialBarHeight = m.container[0].offsetHeight;\n m.initialAreaHeight = m.textarea[0].offsetHeight;\n \n \n // Resize textarea\n m.sizeTextarea = function () {\n // Reset\n m.textarea.css({'height': ''});\n \n var height = m.textarea[0].offsetHeight;\n var diff = height - m.textarea[0].clientHeight;\n var scrollHeight = m.textarea[0].scrollHeight;\n \n // Update\n if (scrollHeight + diff > height) {\n var newAreaHeight = scrollHeight + diff;\n var newBarHeight = m.initialBarHeight + (newAreaHeight - m.initialAreaHeight);\n var maxBarHeight = m.params.maxHeight || m.container.parents('.view')[0].offsetHeight - 88;\n if (newBarHeight > maxBarHeight) {\n newBarHeight = parseInt(maxBarHeight, 10);\n newAreaHeight = newBarHeight - m.initialBarHeight + m.initialAreaHeight;\n }\n m.textarea.css('height', newAreaHeight + 'px');\n m.container.css('height', newBarHeight + 'px');\n var onBottom = (m.pageContent[0].scrollTop === m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight);\n if (m.pageContent.length > 0) {\n m.pageContent.css('padding-bottom', newBarHeight + 'px');\n if (m.pageContent.find('.messages-new-first').length === 0 && onBottom) {\n m.pageContent.scrollTop(m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight);\n }\n }\n }\n else {\n if (m.pageContent.length > 0) {\n m.container.css({'height': '', 'bottom': ''});\n m.pageContent.css({'padding-bottom': ''});\n }\n }\n };\n \n // Clear\n m.clear = function () {\n m.textarea.val('').trigger('change');\n };\n m.value = function (value) {\n if (typeof value === 'undefined') return m.textarea.val();\n else m.textarea.val(value).trigger('change');\n };\n \n // Handle textarea\n m.textareaTimeout = undefined;\n m.handleTextarea = function (e) {\n clearTimeout(m.textareaTimeout);\n m.textareaTimeout = setTimeout(function () {\n m.sizeTextarea();\n }, 0);\n };\n \n //Events\n function preventSubmit(e) {\n e.preventDefault();\n }\n \n m.attachEvents = function (destroy) {\n var method = destroy ? 'off' : 'on';\n m.container[method]('submit', preventSubmit);\n m.textarea[method]('change keydown keypress keyup paste cut', m.handleTextarea);\n };\n m.detachEvents = function () {\n m.attachEvents(true);\n };\n \n // Init Destroy\n m.init = function () {\n m.attachEvents();\n };\n m.destroy = function () {\n m.detachEvents();\n m = null;\n };\n \n // Init\n m.init();\n \n m.container[0].f7Messagebar = m;\n return m;\n };\n app.messagebar = function (container, params) {\n return new Messagebar(container, params);\n };\n app.initPageMessagebar = function (pageContainer) {\n pageContainer = $(pageContainer);\n var messagebar = pageContainer.hasClass('messagebar') ? pageContainer : pageContainer.find('.messagebar');\n if (messagebar.length === 0) return;\n if (!messagebar.hasClass('messagebar-init')) return;\n var mb = app.messagebar(messagebar, messagebar.dataset());\n \n // Destroy on page remove\n function pageBeforeRemove() {\n mb.destroy();\n pageContainer.off('page:beforeremove', pageBeforeRemove);\n }\n if (pageContainer.hasClass('page')) {\n pageContainer.on('page:beforeremove', pageBeforeRemove);\n }\n };\n \n"," /*======================================================\n ************ XHR ************\n ======================================================*/\n // XHR Caching\n app.cache = [];\n app.removeFromCache = function (url) {\n var index = false;\n for (var i = 0; i < app.cache.length; i++) {\n if (app.cache[i].url === url) index = i;\n }\n if (index !== false) app.cache.splice(index, 1);\n };\n \n // XHR\n app.xhr = false;\n app.get = function (url, view, ignoreCache, callback) {\n // should we ignore get params or not\n var _url = url;\n if (app.params.cacheIgnoreGetParameters && url.indexOf('?') >= 0) {\n _url = url.split('?')[0];\n }\n if (app.params.cache && !ignoreCache && url.indexOf('nocache') < 0 && app.params.cacheIgnore.indexOf(_url) < 0) {\n // Check is the url cached\n for (var i = 0; i < app.cache.length; i++) {\n if (app.cache[i].url === _url) {\n // Check expiration\n if ((new Date()).getTime() - app.cache[i].time < app.params.cacheDuration) {\n // Load from cache\n callback(app.cache[i].content);\n return false;\n }\n }\n }\n }\n \n app.xhr = $.ajax({\n url: url,\n method: 'GET',\n beforeSend: app.params.onAjaxStart,\n complete: function (xhr, status) {\n if (status !== 'error' && status !== 'timeout' && (xhr.status >= 200 && xhr.status < 300) || xhr.status === 0) {\n if (app.params.cache && xhr.responseText !== '') {\n app.removeFromCache(_url);\n app.cache.push({\n url: _url,\n time: (new Date()).getTime(),\n content: xhr.responseText\n });\n }\n callback(xhr.responseText, false);\n }\n else {\n callback(xhr.responseText, true);\n }\n if (app.params.onAjaxComplete) app.params.onAjaxComplete(xhr);\n },\n error: function (xhr) {\n callback(xhr.responseText, true);\n if (app.params.onAjaxError) app.params.onAjaxError(xhr);\n }\n });\n if (view) view.xhr = app.xhr;\n \n return app.xhr;\n };\n \n"," /*======================================================\n ************ Pages ************\n ======================================================*/\n // Page Callbacks API\n app.pageCallbacks = {};\n \n app.onPage = function (callbackName, pageName, callback) {\n if (pageName && pageName.split(' ').length > 1) {\n var pageNames = pageName.split(' ');\n var returnCallbacks = [];\n for (var i = 0; i < pageNames.length; i++) {\n returnCallbacks.push(app.onPage(callbackName, pageNames[i], callback));\n }\n returnCallbacks.remove = function () {\n for (var i = 0; i < returnCallbacks.length; i++) {\n returnCallbacks[i].remove();\n }\n };\n returnCallbacks.trigger = function () {\n for (var i = 0; i < returnCallbacks.length; i++) {\n returnCallbacks[i].trigger();\n }\n };\n return returnCallbacks;\n }\n var callbacks = app.pageCallbacks[callbackName][pageName];\n if (!callbacks) {\n callbacks = app.pageCallbacks[callbackName][pageName] = [];\n }\n app.pageCallbacks[callbackName][pageName].push(callback);\n return {\n remove: function () {\n var removeIndex;\n for (var i = 0; i < callbacks.length; i++) {\n if (callbacks[i].toString() === callback.toString()) {\n removeIndex = i;\n }\n }\n if (typeof removeIndex !== 'undefined') callbacks.splice(removeIndex, 1);\n },\n trigger: callback\n };\n };\n \n //Create callbacks methods dynamically\n function createPageCallback(callbackName) {\n var capitalized = callbackName.replace(/^./, function (match) {\n return match.toUpperCase();\n });\n app['onPage' + capitalized] = function (pageName, callback) {\n return app.onPage(callbackName, pageName, callback);\n };\n }\n \n var pageCallbacksNames = ('beforeInit init reinit beforeAnimation afterAnimation back afterBack beforeRemove').split(' ');\n for (var i = 0; i < pageCallbacksNames.length; i++) {\n app.pageCallbacks[pageCallbacksNames[i]] = {};\n createPageCallback(pageCallbacksNames[i]);\n }\n \n app.triggerPageCallbacks = function (callbackName, pageName, pageData) {\n var allPagesCallbacks = app.pageCallbacks[callbackName]['*'];\n if (allPagesCallbacks) {\n for (var j = 0; j < allPagesCallbacks.length; j++) {\n allPagesCallbacks[j](pageData);\n }\n }\n var callbacks = app.pageCallbacks[callbackName][pageName];\n if (!callbacks || callbacks.length === 0) return;\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i](pageData);\n }\n };\n \n // On Page Init Callback\n app.pageInitCallback = function (view, params) {\n var pageContainer = params.pageContainer;\n if (!pageContainer) return;\n if (pageContainer.f7PageInitialized && view && !view.params.domCache) return;\n \n var pageQuery = params.query;\n if (!pageQuery) {\n if (params.url && params.url.indexOf('?') > 0) {\n pageQuery = $.parseUrlQuery(params.url || '');\n }\n else if (pageContainer.f7PageData && pageContainer.f7PageData.query) {\n pageQuery = pageContainer.f7PageData.query;\n }\n else {\n pageQuery = {};\n }\n }\n \n // Page Data\n var pageData = {\n container: pageContainer,\n url: params.url,\n query: pageQuery,\n name: $(pageContainer).attr('data-page'),\n view: view,\n from: params.position,\n context: params.context,\n navbarInnerContainer: params.navbarInnerContainer,\n fromPage: params.fromPage\n };\n if (params.fromPage && !params.fromPage.navbarInnerContainer && params.oldNavbarInnerContainer) {\n params.fromPage.navbarInnerContainer = params.oldNavbarInnerContainer;\n }\n \n if (pageContainer.f7PageInitialized && ((view && view.params.domCache) || (!view && $(pageContainer).parents('.popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal').length > 0))) {\n // Reinit Page\n app.reinitPage(pageContainer);\n \n // Callbacks\n app.pluginHook('pageReinit', pageData);\n if (app.params.onPageReinit) app.params.onPageReinit(app, pageData);\n app.triggerPageCallbacks('reinit', pageData.name, pageData);\n $(pageData.container).trigger('pageReinit page:reinit', {page: pageData});\n return;\n }\n pageContainer.f7PageInitialized = true;\n \n // Store pagedata in page\n pageContainer.f7PageData = pageData;\n \n // Update View's activePage\n if (view && !params.preloadOnly && !params.reloadPrevious) {\n // Add data-page on view\n $(view.container).attr('data-page', pageData.name);\n // Update View active page data\n view.activePage = pageData;\n }\n \n // Before Init Callbacks\n app.pluginHook('pageBeforeInit', pageData);\n if (app.params.onPageBeforeInit) app.params.onPageBeforeInit(app, pageData);\n app.triggerPageCallbacks('beforeInit', pageData.name, pageData);\n $(pageData.container).trigger('pageBeforeInit page:beforeinit', {page: pageData});\n \n // Init page\n app.initPage(pageContainer);\n \n // Init Callback\n app.pluginHook('pageInit', pageData);\n if (app.params.onPageInit) app.params.onPageInit(app, pageData);\n app.triggerPageCallbacks('init', pageData.name, pageData);\n $(pageData.container).trigger('pageInit page:init', {page: pageData});\n };\n app.pageRemoveCallback = function (view, pageContainer, position) {\n var pageContext;\n if (!pageContainer) return;\n if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context;\n // Page Data\n var pageData = {\n container: pageContainer,\n name: $(pageContainer).attr('data-page'),\n view: view,\n url: pageContainer.f7PageData && pageContainer.f7PageData.url,\n query: pageContainer.f7PageData && pageContainer.f7PageData.query,\n navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer,\n from: position,\n context: pageContext\n };\n // Before Init Callback\n app.pluginHook('pageBeforeRemove', pageData);\n if (app.params.onPageBeforeRemove) app.params.onPageBeforeRemove(app, pageData);\n app.triggerPageCallbacks('beforeRemove', pageData.name, pageData);\n $(pageData.container).trigger('pageBeforeRemove page:beforeremove', {page: pageData});\n pageData = null;\n };\n app.pageBackCallback = function (callback, view, params) {\n // Page Data\n var pageContainer = params.pageContainer;\n var pageContext;\n if (!pageContainer) return;\n if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context;\n \n var pageData = {\n container: pageContainer,\n name: $(pageContainer).attr('data-page'),\n url: pageContainer.f7PageData && pageContainer.f7PageData.url,\n query: pageContainer.f7PageData && pageContainer.f7PageData.query,\n view: view,\n from: params.position,\n context: pageContext,\n navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer,\n swipeBack: params.swipeBack\n };\n \n if (callback === 'after') {\n app.pluginHook('pageAfterBack', pageData);\n if (app.params.onPageAfterBack) app.params.onPageAfterBack(app, pageData);\n app.triggerPageCallbacks('afterBack', pageData.name, pageData);\n $(pageContainer).trigger('pageAfterBack page:afterback', {page: pageData});\n \n }\n if (callback === 'before') {\n app.pluginHook('pageBack', pageData);\n if (app.params.onPageBack) app.params.onPageBack(app, pageData);\n app.triggerPageCallbacks('back', pageData.name, pageData);\n $(pageData.container).trigger('pageBack page:back', {page: pageData});\n }\n };\n app.pageAnimCallback = function (callback, view, params) {\n var pageContainer = params.pageContainer;\n var pageContext;\n if (!pageContainer) return;\n if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context;\n \n var pageQuery = params.query;\n if (!pageQuery) {\n if (params.url && params.url.indexOf('?') > 0) {\n pageQuery = $.parseUrlQuery(params.url || '');\n }\n else if (pageContainer.f7PageData && pageContainer.f7PageData.query) {\n pageQuery = pageContainer.f7PageData.query;\n }\n else {\n pageQuery = {};\n }\n }\n // Page Data\n var pageData = {\n container: pageContainer,\n url: params.url,\n query: pageQuery,\n name: $(pageContainer).attr('data-page'),\n view: view,\n from: params.position,\n context: pageContext,\n swipeBack: params.swipeBack,\n navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer,\n fromPage: params.fromPage\n };\n var oldPage = params.oldPage,\n newPage = params.newPage;\n \n // Update page date\n pageContainer.f7PageData = pageData;\n \n if (callback === 'after') {\n app.pluginHook('pageAfterAnimation', pageData);\n if (app.params.onPageAfterAnimation) app.params.onPageAfterAnimation(app, pageData);\n app.triggerPageCallbacks('afterAnimation', pageData.name, pageData);\n $(pageData.container).trigger('pageAfterAnimation page:afteranimation', {page: pageData});\n \n }\n if (callback === 'before') {\n // Add data-page on view\n $(view.container).attr('data-page', pageData.name);\n \n // Update View's activePage\n if (view) view.activePage = pageData;\n \n // Hide/show navbar dynamically\n if (newPage.hasClass('no-navbar') && !oldPage.hasClass('no-navbar')) {\n view.hideNavbar();\n }\n if (!newPage.hasClass('no-navbar') && (oldPage.hasClass('no-navbar') || oldPage.hasClass('no-navbar-by-scroll'))) {\n view.showNavbar();\n }\n // Hide/show navbar toolbar\n if (newPage.hasClass('no-toolbar') && !oldPage.hasClass('no-toolbar')) {\n view.hideToolbar();\n }\n if (!newPage.hasClass('no-toolbar') && (oldPage.hasClass('no-toolbar') || oldPage.hasClass('no-toolbar-by-scroll'))) {\n view.showToolbar();\n }\n // Hide/show tabbar\n var tabBar;\n if (newPage.hasClass('no-tabbar') && !oldPage.hasClass('no-tabbar')) {\n tabBar = $(view.container).find('.tabbar');\n if (tabBar.length === 0) tabBar = $(view.container).parents('.' + app.params.viewsClass).find('.tabbar');\n app.hideToolbar(tabBar);\n }\n if (!newPage.hasClass('no-tabbar') && (oldPage.hasClass('no-tabbar') || oldPage.hasClass('no-tabbar-by-scroll'))) {\n tabBar = $(view.container).find('.tabbar');\n if (tabBar.length === 0) tabBar = $(view.container).parents('.' + app.params.viewsClass).find('.tabbar');\n app.showToolbar(tabBar);\n }\n \n oldPage.removeClass('no-navbar-by-scroll no-toolbar-by-scroll');\n // Callbacks\n app.pluginHook('pageBeforeAnimation', pageData);\n if (app.params.onPageBeforeAnimation) app.params.onPageBeforeAnimation(app, pageData);\n app.triggerPageCallbacks('beforeAnimation', pageData.name, pageData);\n $(pageData.container).trigger('pageBeforeAnimation page:beforeanimation', {page: pageData});\n }\n };\n \n // Init Page Events and Manipulations\n app.initPage = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length === 0) return;\n // Size navbars on page load\n if (app.sizeNavbars) app.sizeNavbars(pageContainer.parents('.' + app.params.viewClass)[0]);\n // Init messages\n if (app.initPageMessages) app.initPageMessages(pageContainer);\n // Init forms storage\n if (app.initFormsStorage) app.initFormsStorage(pageContainer);\n // Init smart select\n if (app.initSmartSelects) app.initSmartSelects(pageContainer);\n // Init slider\n if (app.initPageSwiper) app.initPageSwiper(pageContainer);\n // Init pull to refres\n if (app.initPullToRefresh) app.initPullToRefresh(pageContainer);\n // Init infinite scroll\n if (app.initPageInfiniteScroll) app.initPageInfiniteScroll(pageContainer);\n // Init searchbar\n if (app.initSearchbar) app.initSearchbar(pageContainer);\n // Init message bar\n if (app.initPageMessagebar) app.initPageMessagebar(pageContainer);\n // Init scroll toolbars\n if (app.initPageScrollToolbars) app.initPageScrollToolbars(pageContainer);\n // Init lazy images\n if (app.initImagesLazyLoad) app.initImagesLazyLoad(pageContainer);\n // Init progress bars\n if (app.initPageProgressbar) app.initPageProgressbar(pageContainer);\n // Init resizeable textareas\n if (app.initPageResizableTextarea) app.initPageResizableTextarea(pageContainer);\n // Init Data Table\n if (app.initPageDataTables) app.initPageDataTables(pageContainer);\n // Init Material Preloader\n if (app.params.material && app.initPageMaterialPreloader) app.initPageMaterialPreloader(pageContainer);\n // Init Material Inputs\n if (app.params.material && app.initPageMaterialInputs) app.initPageMaterialInputs(pageContainer);\n // Init Material Tabbar\n if (app.params.material && app.initPageMaterialTabbar) app.initPageMaterialTabbar(pageContainer);\n };\n app.reinitPage = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length === 0) return;\n // Size navbars on page reinit\n if (app.sizeNavbars) app.sizeNavbars(pageContainer.parents('.' + app.params.viewClass)[0]);\n // Reinit slider\n if (app.reinitPageSwiper) app.reinitPageSwiper(pageContainer);\n // Reinit lazy load\n if (app.reinitLazyLoad) app.reinitLazyLoad(pageContainer);\n };\n app.initPageWithCallback = function (pageContainer) {\n pageContainer = $(pageContainer);\n var viewContainer = pageContainer.parents('.' + app.params.viewClass);\n if (viewContainer.length === 0) return;\n var view = viewContainer[0].f7View || undefined;\n var url = view && view.url ? view.url : undefined;\n if (viewContainer && pageContainer.attr('data-page')) {\n viewContainer.attr('data-page', pageContainer.attr('data-page'));\n }\n app.pageInitCallback(view, {pageContainer: pageContainer[0], url: url, position: 'center'});\n };\n \n"," /*======================================================\n ************ Navigation / Router ************\n ======================================================*/\n app.router = {\n _remove: function (el) {\n if (app.params.routerRemoveTimeout || app.params.routerRemoveWithTimeout) {\n setTimeout(function () {\n $(el).remove();\n }, 0);\n }\n else $(el).remove();\n },\n _modalsSelector: '.popup, .modal, .popover, .actions-modal, .picker-modal, .login-screen',\n // Temporary DOM Element\n temporaryDom: document.createElement('div'),\n \n // Find page or navbar in passed container which are related to View\n findElement: function (selector, container, view, notCached) {\n container = $(container);\n if (notCached) selector = selector + ':not(.cached)';\n var found = container.find(selector).filter(function (index, el) {\n return $(el).parents(app.router._modalsSelector).length === 0;\n });\n if (found.length > 1) {\n if (typeof view.selector === 'string') {\n // Search in related view\n found = container.find(view.selector + ' ' + selector);\n }\n if (found.length > 1) {\n // Search in main view\n found = container.find('.' + app.params.viewMainClass + ' ' + selector);\n }\n }\n if (found.length === 1) return found;\n else {\n // Try to find non cached\n if (!notCached) found = app.router.findElement(selector, container, view, true);\n if (found && found.length === 1) return found;\n if (found && found.length > 1) return $(found[0]);\n else return undefined;\n }\n },\n \n // Set pages classes for animationEnd\n animatePages: function (leftPage, rightPage, direction) {\n // Loading new page\n var removeClasses = 'page-on-center page-on-right page-on-left';\n if (direction === 'to-left') {\n leftPage.removeClass(removeClasses).addClass('page-from-center-to-left');\n rightPage.removeClass(removeClasses).addClass('page-from-right-to-center');\n }\n // Go back\n if (direction === 'to-right') {\n leftPage.removeClass(removeClasses).addClass('page-from-left-to-center');\n rightPage.removeClass(removeClasses).addClass('page-from-center-to-right');\n \n }\n },\n \n // Prepare navbar before animarion\n prepareNavbar: function (newNavbarInner, oldNavbarInner, newNavbarPosition) {\n $(newNavbarInner).find('.sliding').each(function () {\n var sliding = $(this);\n var slidingOffset = newNavbarPosition === 'right' ? this.f7NavbarRightOffset : this.f7NavbarLeftOffset;\n \n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(' + (-slidingOffset) + 'px,0,0)');\n }\n }\n sliding.transform('translate3d(' + slidingOffset + 'px,0,0)');\n });\n },\n \n // Set navbars classes for animation\n animateNavbars: function (leftNavbarInner, rightNavbarInner, direction) {\n // Loading new page\n var removeClasses = 'navbar-on-right navbar-on-center navbar-on-left';\n if (direction === 'to-left') {\n rightNavbarInner.removeClass(removeClasses).addClass('navbar-from-right-to-center');\n rightNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n sliding.transform('translate3d(0px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(0px,0,0)');\n }\n }\n });\n \n leftNavbarInner.removeClass(removeClasses).addClass('navbar-from-center-to-left');\n leftNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n var rightText;\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('center') && rightNavbarInner.find('.sliding.left .back .icon').length > 0) {\n rightText = rightNavbarInner.find('.sliding.left .back span');\n if (rightText.length > 0) this.f7NavbarLeftOffset += rightText[0].offsetLeft;\n }\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(' + (-this.f7NavbarLeftOffset) + 'px,0,0)');\n }\n }\n sliding.transform('translate3d(' + (this.f7NavbarLeftOffset) + 'px,0,0)');\n });\n }\n // Go back\n if (direction === 'to-right') {\n leftNavbarInner.removeClass(removeClasses).addClass('navbar-from-left-to-center');\n leftNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n sliding.transform('translate3d(0px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(0px,0,0)');\n }\n }\n });\n \n rightNavbarInner.removeClass(removeClasses).addClass('navbar-from-center-to-right');\n rightNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(' + (-this.f7NavbarRightOffset) + 'px,0,0)');\n }\n }\n sliding.transform('translate3d(' + (this.f7NavbarRightOffset) + 'px,0,0)');\n });\n }\n },\n \n preprocess: function(view, content, url, next) {\n // Plugin hook\n app.pluginHook('routerPreprocess', view, content, url, next);\n \n // Preprocess by plugin\n content = app.pluginProcess('preprocess', content);\n \n if (view && view.params && view.params.preprocess) {\n content = view.params.preprocess(content, url, next);\n if (typeof content !== 'undefined') {\n next(content);\n }\n }\n else if (app.params.preprocess) {\n content = app.params.preprocess(content, url, next);\n if (typeof content !== 'undefined') {\n next(content);\n }\n }\n else {\n next(content);\n }\n },\n preroute: function(view, options, isBack) {\n if (isBack) options.isBack = true;\n app.pluginHook('routerPreroute', view, options);\n if ((app.params.preroute && app.params.preroute(view, options) === false) || (view && view.params.preroute && view.params.preroute(view, options) === false)) {\n return true;\n }\n else {\n return false;\n }\n },\n \n template7Render: function (view, options) {\n var url = options.url,\n content = options.content, //initial content\n t7_rendered_content = options.content, // will be rendered using Template7\n context = options.context, // Context data for Template7\n contextName = options.contextName,\n template = options.template; // Template 7 compiled template\n \n var t7_ctx, t7_template;\n if (typeof content === 'string') {\n if (url) {\n if (app.template7Cache[url] && !options.ignoreCache) t7_template = t7.cache[url];\n else {\n t7_template = t7.compile(content);\n t7.cache[url] = t7_template;\n }\n }\n else t7_template = t7.compile(content);\n }\n else if (template) {\n t7_template = template;\n }\n \n if (context) {\n t7_ctx = context;\n if (context && url) {\n view.contextCache[url] = context;\n }\n }\n else {\n if (contextName) {\n if (contextName.indexOf('.') >= 0) {\n var _ctx_path = contextName.split('.');\n var _ctx = t7.data[_ctx_path[0]];\n for (var i = 1; i < _ctx_path.length; i++) {\n if (_ctx_path[i]) _ctx = _ctx[_ctx_path[i]];\n }\n t7_ctx = _ctx;\n }\n else t7_ctx = t7.data[contextName];\n }\n if (!t7_ctx && url) {\n t7_ctx = t7.data['url:' + url];\n }\n if (!t7_ctx && typeof content === 'string' && !template) {\n //try to find by page name in content\n var pageNameMatch = content.match(/(data-page=[\"'][^\"^']*[\"'])/);\n if (pageNameMatch) {\n var page = pageNameMatch[0].split('data-page=')[1].replace(/['\"]/g, '');\n if (page) t7_ctx = t7.data['page:' + page];\n }\n }\n if (!t7_ctx && template && t7.templates) {\n // Try to find matched template name in t7.templates\n for (var templateName in t7.templates) {\n if (t7.templates[templateName] === template) t7_ctx = t7.data[templateName];\n }\n }\n if (!t7_ctx && url && url in view.contextCache) {\n t7_ctx = view.contextCache[url];\n }\n if (!t7_ctx) {\n t7_ctx = {};\n }\n }\n \n if (t7_template && t7_ctx) {\n if (typeof t7_ctx === 'function') t7_ctx = t7_ctx();\n if (url) {\n // Extend data with URL query\n var query = $.parseUrlQuery(url);\n t7_ctx.url_query = {};\n for (var key in query) {\n t7_ctx.url_query[key] = query[key];\n }\n }\n try {\n t7_rendered_content = t7_template(t7_ctx);\n }\n catch (e) {\n t7_rendered_content = '';\n if (window.console && window.console.error) {\n console.error(e);\n }\n }\n }\n \n return {content: t7_rendered_content, context: t7_ctx};\n }\n };\n \n \n app.router._load = function (view, options) {\n // Plugin hook\n app.pluginHook('routerLoad', view, options);\n \n var url = options.url,\n content = options.content, //initial content\n t7_rendered = {content: options.content},\n template = options.template, // Template 7 compiled template\n pageName = options.pageName,\n viewContainer = $(view.container),\n pagesContainer = $(view.pagesContainer),\n animatePages = options.animatePages,\n newPage, oldPage, pagesInView, i, oldNavbarInner, newNavbarInner, navbar, dynamicNavbar, reloadPosition,\n isDynamicPage = typeof url === 'undefined' && content || template,\n pushState = options.pushState,\n pageElement = options.pageElement;\n \n if (typeof animatePages === 'undefined') animatePages = view.params.animatePages;\n \n // Render with Template7\n if (app.params.template7Pages && typeof content === 'string' || template) {\n t7_rendered = app.router.template7Render(view, options);\n if (t7_rendered.content && !content) {\n content = t7_rendered.content;\n }\n }\n \n app.router.temporaryDom.innerHTML = '';\n \n // Parse DOM\n if (!pageName && !pageElement) {\n if ((typeof content === 'string') || (url && (typeof content === 'string'))) {\n app.router.temporaryDom.innerHTML = t7_rendered.content;\n } else {\n if ('length' in content && content.length > 1) {\n for (var ci = 0; ci < content.length; ci++) {\n $(app.router.temporaryDom).append(content[ci]);\n }\n } else {\n $(app.router.temporaryDom).append(content);\n }\n }\n }\n \n // Reload position\n reloadPosition = options.reload && (options.reloadPrevious ? 'left' : 'center');\n \n // Find new page\n if (pageName) newPage = pagesContainer.find('.page[data-page=\"' + pageName + '\"]');\n else {\n if (pageElement) newPage = $(pageElement);\n else newPage = app.router.findElement('.page', app.router.temporaryDom, view);\n }\n // If page not found exit\n if (!newPage || newPage.length === 0 || (pageName && view.activePage && view.activePage.name === pageName)) {\n view.allowPageChange = true;\n return;\n }\n \n newPage.addClass(options.reload ? 'page-on-' + reloadPosition : 'page-on-right');\n \n // Find old page (should be the last one) and remove older pages\n pagesInView = pagesContainer.children('.page:not(.cached)');\n if (pageElement) {\n pagesInView = pagesInView.filter(function (index, page) {\n if (page !== pageElement) return page;\n });\n }\n \n if (options.reload && options.reloadPrevious && pagesInView.length === 1) {\n view.allowPageChange = true;\n return;\n }\n \n if (options.reload) {\n oldPage = pagesInView.eq(pagesInView.length - 1);\n }\n else {\n if (pagesInView.length > 1) {\n for (i = 0; i < pagesInView.length - 2; i++) {\n if (!view.params.domCache) {\n app.pageRemoveCallback(view, pagesInView[i], 'left');\n app.router._remove(pagesInView[i]);\n }\n else {\n $(pagesInView[i]).addClass('cached');\n }\n }\n if (!view.params.domCache) {\n app.pageRemoveCallback(view, pagesInView[i], 'left');\n app.router._remove(pagesInView[i]);\n }\n else {\n $(pagesInView[i]).addClass('cached');\n }\n }\n oldPage = pagesContainer.children('.page:not(.cached)');\n }\n if (pageElement && oldPage.length > 1) {\n oldPage = oldPage.filter(function (index, page) {\n if (page !== pageElement) return page;\n });\n }\n if(view.params.domCache || pageElement) newPage.removeClass('cached');\n \n // Dynamic navbar\n if (view.params.dynamicNavbar) {\n dynamicNavbar = true;\n // Find navbar\n if (pageName) {\n newNavbarInner = viewContainer.find('.navbar-inner[data-page=\"' + pageName + '\"]');\n }\n else {\n newNavbarInner = app.router.findElement('.navbar-inner', app.router.temporaryDom, view);\n }\n if (!newNavbarInner || newNavbarInner.length === 0) {\n // Look in page\n newNavbarInner = newPage.find('.navbar-inner');\n if (!newNavbarInner || newNavbarInner.length === 0) {\n // Set false\n dynamicNavbar = false;\n }\n else {\n if (newNavbarInner.parent('.navbar').length > 0) {\n newNavbarInner.prependTo(newPage);\n }\n }\n }\n if (dynamicNavbar && newPage.find('.navbar').length > 0) {\n app.router._remove(newPage.find('.navbar').filter(function(index, el){\n return $(el).parents(app.router._modalsSelector).length === 0;\n }));\n }\n navbar = viewContainer.children('.navbar');\n if (options.reload) {\n oldNavbarInner = navbar.find('.navbar-inner:not(.cached):last-child');\n }\n else {\n oldNavbarInner = navbar.find('.navbar-inner:not(.cached)');\n \n if (oldNavbarInner.length > 0) {\n for (i = 0; i < oldNavbarInner.length - 1; i++) {\n if (!view.params.domCache) {\n app.navbarRemoveCallback(view, pagesInView[i], navbar[0], oldNavbarInner[i]);\n app.router._remove(oldNavbarInner[i]);\n }\n else\n $(oldNavbarInner[i]).addClass('cached');\n }\n if (!newNavbarInner && oldNavbarInner.length === 1) {\n if (!view.params.domCache) {\n app.navbarRemoveCallback(view, pagesInView[0], navbar[0], oldNavbarInner[0]);\n app.router._remove(oldNavbarInner[0]);\n }\n else\n $(oldNavbarInner[0]).addClass('cached');\n }\n oldNavbarInner = navbar.find('.navbar-inner:not(.cached)');\n }\n }\n }\n if (dynamicNavbar) {\n newNavbarInner.addClass(options.reload ? 'navbar-on-' + reloadPosition : 'navbar-on-right');\n if(view.params.domCache || pageElement) newNavbarInner.removeClass('cached');\n newPage[0].f7RelatedNavbar = newNavbarInner[0];\n newNavbarInner[0].f7RelatedPage = newPage[0];\n }\n \n // save content areas into view's cache\n if (!url) {\n var newPageName = pageName || newPage.attr('data-page');\n if (isDynamicPage) url = '#' + app.params.dynamicPageUrl.replace(/{{name}}/g, newPageName).replace(/{{index}}/g, view.history.length - (options.reload ? 1 : 0));\n else url = '#' + newPageName;\n if (!view.params.domCache) {\n view.contentCache[url] = content;\n }\n if (view.params.domCache && pageName) {\n view.pagesCache[url] = pageName;\n }\n }\n else if (url && pageElement) {\n view.pageElementsCache[url] = {\n page: newPage,\n navbarInner: newNavbarInner\n };\n }\n \n // Push State\n if (app.params.pushState && !options.reloadPrevious && view.main) {\n if (typeof pushState === 'undefined') pushState = true;\n var pushStateRoot = app.params.pushStateRoot || '';\n var method = options.reload ? 'replaceState' : 'pushState';\n if (pushState) {\n if (!isDynamicPage && !pageName) {\n history[method]({url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url);\n }\n else if (isDynamicPage && content) {\n history[method]({content: typeof content === 'string' ? content : '', url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url);\n }\n else if (pageName) {\n history[method]({pageName: pageName, url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url);\n }\n }\n }\n \n // Update View history\n view.url = url;\n if (options.reload) {\n var lastUrl = view.history[view.history.length - (options.reloadPrevious ? 2 : 1)];\n if (lastUrl &&\n lastUrl.indexOf('#') === 0 &&\n lastUrl in view.contentCache &&\n lastUrl !== url &&\n view.history.indexOf(lastUrl) === -1) {\n view.contentCache[lastUrl] = null;\n delete view.contentCache[lastUrl];\n }\n else if (lastUrl &&\n lastUrl in view.pageElementsCache &&\n lastUrl !== url &&\n (view.history.indexOf(lastUrl) === -1 || view.history.indexOf(lastUrl) === view.history.length - 1)) {\n view.pageElementsCache[lastUrl] = null;\n delete view.pageElementsCache[lastUrl];\n }\n if (lastUrl &&\n lastUrl in view.contextCache &&\n lastUrl !== url &&\n (view.history.indexOf(lastUrl) === -1 || view.history.indexOf(lastUrl) === view.history.length - 1)) {\n view.contextCache[lastUrl] = null;\n delete view.contextCache[lastUrl];\n }\n view.history[view.history.length - (options.reloadPrevious ? 2 : 1)] = url;\n }\n else {\n view.history.push(url);\n }\n \n // Unique history\n var historyBecameUnique = false;\n if (view.params.uniqueHistory) {\n var _history = view.history;\n var _url = url;\n if (view.params.uniqueHistoryIgnoreGetParameters) {\n _history = [];\n _url = url.split('?')[0];\n for (i = 0; i < view.history.length; i++) {\n _history.push(view.history[i].split('?')[0]);\n }\n }\n \n if (_history.indexOf(_url) !== _history.lastIndexOf(_url)) {\n view.history = view.history.slice(0, _history.indexOf(_url));\n view.history.push(url);\n historyBecameUnique = true;\n }\n }\n // Dom manipulations\n if (options.reloadPrevious) {\n oldPage = oldPage.prev('.page');\n newPage.insertBefore(oldPage);\n if (dynamicNavbar) {\n oldNavbarInner = oldNavbarInner.prev('.navbar-inner');\n newNavbarInner.insertAfter(oldNavbarInner);\n }\n }\n else {\n pagesContainer.append(newPage[0]);\n if (dynamicNavbar) navbar.append(newNavbarInner[0]);\n }\n // Remove Old Page And Navbar\n if (options.reload) {\n if (view.params.domCache && view.initialPages.indexOf(oldPage[0]) >= 0) {\n oldPage.addClass('cached');\n if (dynamicNavbar) oldNavbarInner.addClass('cached');\n }\n else {\n app.pageRemoveCallback(view, oldPage[0], reloadPosition);\n if (dynamicNavbar) app.navbarRemoveCallback(view, oldPage[0], navbar[0], oldNavbarInner[0]);\n app.router._remove(oldPage);\n if (dynamicNavbar) app.router._remove(oldNavbarInner);\n }\n }\n \n // Page Init Events\n app.pageInitCallback(view, {\n pageContainer: newPage[0],\n url: url,\n position: options.reload ? reloadPosition : 'right',\n navbarInnerContainer: dynamicNavbar ? newNavbarInner && newNavbarInner[0] : undefined,\n oldNavbarInnerContainer: dynamicNavbar ? oldNavbarInner && oldNavbarInner[0] : undefined,\n context: t7_rendered.context || options.context,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData,\n reload: options.reload,\n reloadPrevious: options.reloadPrevious\n });\n \n // Navbar init event\n if (dynamicNavbar) {\n app.navbarInitCallback(view, newPage[0], navbar[0], newNavbarInner[0], url, options.reload ? reloadPosition : 'right');\n }\n \n if (options.reload) {\n view.allowPageChange = true;\n if (historyBecameUnique) view.refreshPreviousPage();\n return;\n }\n \n if (dynamicNavbar && animatePages) {\n app.router.prepareNavbar(newNavbarInner, oldNavbarInner, 'right');\n }\n // Force reLayout\n var clientLeft = newPage[0].clientLeft;\n \n // Before Anim Callback\n app.pageAnimCallback('before', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'right',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n \n function afterAnimation() {\n view.allowPageChange = true;\n newPage.removeClass('page-from-right-to-center page-on-right page-on-left').addClass('page-on-center');\n oldPage.removeClass('page-from-center-to-left page-on-center page-on-right').addClass('page-on-left');\n if (dynamicNavbar) {\n newNavbarInner.removeClass('navbar-from-right-to-center navbar-on-left navbar-on-right').addClass('navbar-on-center');\n oldNavbarInner.removeClass('navbar-from-center-to-left navbar-on-center navbar-on-right').addClass('navbar-on-left');\n }\n app.pageAnimCallback('after', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'right',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n if (app.params.pushState && view.main) app.pushStateClearQueue();\n if (!(view.params.swipeBackPage || view.params.preloadPreviousPage)) {\n if (view.params.domCache) {\n oldPage.addClass('cached');\n if (dynamicNavbar) oldNavbarInner.addClass('cached');\n }\n else {\n if (!(url.indexOf('#') === 0 && newPage.attr('data-page').indexOf('smart-select-') === 0)) {\n app.pageRemoveCallback(view, oldPage[0], 'left');\n if (dynamicNavbar) app.navbarRemoveCallback(view, oldPage[0], navbar[0], oldNavbarInner[0]);\n app.router._remove(oldPage);\n if (dynamicNavbar) app.router._remove(oldNavbarInner);\n }\n }\n }\n if (view.params.uniqueHistory && historyBecameUnique) {\n view.refreshPreviousPage();\n }\n }\n if (animatePages) {\n // Set pages before animation\n if (app.params.material && app.params.materialPageLoadDelay) {\n setTimeout(function () {\n app.router.animatePages(oldPage, newPage, 'to-left', view);\n }, app.params.materialPageLoadDelay);\n }\n else {\n app.router.animatePages(oldPage, newPage, 'to-left', view);\n }\n \n // Dynamic navbar animation\n if (dynamicNavbar) {\n setTimeout(function() {\n app.router.animateNavbars(oldNavbarInner, newNavbarInner, 'to-left', view);\n }, 0);\n }\n newPage.animationEnd(function () {\n afterAnimation();\n });\n }\n else {\n if (dynamicNavbar) newNavbarInner.find('.sliding, .sliding .back .icon').transform('');\n afterAnimation();\n }\n \n };\n \n app.router.load = function (view, options) {\n options = options || {};\n if (app.routerPreOptions) {\n options = app.routerPreOptions(view, options) || {};\n }\n if (options.component && app.componentLoader) {\n try {\n app.componentLoader(view, options, function (newOptions) {\n app.router.load(view, newOptions);\n });\n } catch (e) {}\n return;\n }\n if (app.router.preroute(view, options)) {\n return false;\n }\n var url = options.url;\n var content = options.content;\n var pageName = options.pageName;\n var pageElement = options.pageElement;\n if (pageName) {\n if (pageName.indexOf('?') > 0) {\n options.query = $.parseUrlQuery(pageName);\n options.pageName = pageName = pageName.split('?')[0];\n }\n }\n var template = options.template;\n if (view.params.reloadPages === true) options.reload = true;\n \n if (!view.allowPageChange) return false;\n if (url && view.url === url && !options.reload && !view.params.allowDuplicateUrls) return false;\n view.allowPageChange = false;\n if (app.xhr && view.xhr && view.xhr === app.xhr) {\n app.xhr.abort();\n app.xhr = false;\n }\n function proceed(content) {\n app.router.preprocess(view, content, url, function (content) {\n options.content = content;\n app.router._load(view, options);\n });\n }\n if (content || pageName || pageElement) {\n proceed(content);\n return;\n }\n else if (template) {\n app.router._load(view, options);\n return;\n }\n \n if (!options.url || options.url === '#') {\n view.allowPageChange = true;\n return;\n }\n app.get(options.url, view, options.ignoreCache, function (content, error) {\n if (error) {\n view.allowPageChange = true;\n return;\n }\n proceed(content);\n });\n };\n \n app.router._back = function (view, options) {\n options = options || {};\n \n app.pluginHook('routerBack', view, options);\n \n var url = options.url,\n content = options.content,\n t7_rendered = {content: options.content}, // will be rendered using Template7\n template = options.template, // Template 7 compiled template\n animatePages = options.animatePages,\n preloadOnly = options.preloadOnly,\n pushState = options.pushState,\n ignoreCache = options.ignoreCache,\n force = options.force,\n pageName = options.pageName,\n pageElement = options.pageElement;\n \n var viewContainer = $(view.container),\n pagesContainer = $(view.pagesContainer),\n pagesInView = pagesContainer.children('.page:not(.cached)'),\n oldPage, newPage, oldNavbarInner, newNavbarInner, navbar, navbarInners, dynamicNavbar, manipulateDom = true;\n \n if (typeof animatePages === 'undefined') animatePages = view.params.animatePages;\n \n // Render with Template7\n if (app.params.template7Pages && typeof content === 'string' || template) {\n t7_rendered = app.router.template7Render(view, options);\n if (t7_rendered.content && !content) {\n content = t7_rendered.content;\n }\n }\n \n // Animation\n function afterAnimation() {\n app.pageBackCallback('after', view, {\n pageContainer: oldPage[0],\n url: url,\n position: 'center',\n oldPage: oldPage,\n newPage: newPage,\n });\n app.pageAnimCallback('after', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'left',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n app.router.afterBack(view, oldPage[0], newPage[0]);\n }\n function animateBack() {\n // Page before animation callback\n app.pageBackCallback('before', view, {\n pageContainer: oldPage[0],\n url: url,\n position: 'center',\n oldPage: oldPage,\n newPage: newPage,\n });\n app.pageAnimCallback('before', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'left',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n \n if (animatePages) {\n // Set pages before animation\n app.router.animatePages(newPage, oldPage, 'to-right', view);\n \n // Dynamic navbar animation\n if (dynamicNavbar) {\n setTimeout(function () {\n app.router.animateNavbars(newNavbarInner, oldNavbarInner, 'to-right', view);\n }, 0);\n }\n \n newPage.animationEnd(function () {\n afterAnimation();\n });\n }\n else {\n if (dynamicNavbar) newNavbarInner.find('.sliding, .sliding .back .icon').transform('');\n afterAnimation();\n }\n }\n \n function parseNewPage() {\n app.router.temporaryDom.innerHTML = '';\n // Parse DOM\n if ((typeof content === 'string') || (url && (typeof content === 'string'))) {\n app.router.temporaryDom.innerHTML = t7_rendered.content;\n } else {\n if ('length' in content && content.length > 1) {\n for (var ci = 0; ci < content.length; ci++) {\n $(app.router.temporaryDom).append(content[ci]);\n }\n } else {\n $(app.router.temporaryDom).append(content);\n }\n }\n if (pageElement) newPage = $(pageElement);\n else newPage = app.router.findElement('.page', app.router.temporaryDom, view);\n \n if (view.params.dynamicNavbar) {\n // Find navbar\n newNavbarInner = app.router.findElement('.navbar-inner', app.router.temporaryDom, view);\n }\n }\n function setPages() {\n // If pages not found or there are still more than one, exit\n if (!newPage || newPage.length === 0) {\n view.allowPageChange = true;\n return;\n }\n if (view.params.dynamicNavbar && typeof dynamicNavbar === 'undefined') {\n if (!newNavbarInner || newNavbarInner.length === 0) {\n dynamicNavbar = false;\n }\n else {\n dynamicNavbar = true;\n }\n }\n \n newPage.addClass('page-on-left').removeClass('cached');\n if (dynamicNavbar) {\n navbar = viewContainer.children('.navbar');\n navbarInners = navbar.find('.navbar-inner:not(.cached)');\n newNavbarInner.addClass('navbar-on-left').removeClass('cached');\n }\n // Remove/hide previous page in force mode\n if (force) {\n var pageToRemove, navbarToRemove;\n pageToRemove = $(pagesInView[pagesInView.length - 2]);\n \n if (dynamicNavbar) navbarToRemove = $(pageToRemove[0] && pageToRemove[0].f7RelatedNavbar || navbarInners[navbarInners.length - 2]);\n if (view.params.domCache && view.initialPages.indexOf(pageToRemove[0]) >= 0) {\n if (pageToRemove.length && pageToRemove[0] !== newPage[0]) pageToRemove.addClass('cached');\n if (dynamicNavbar && navbarToRemove.length && navbarToRemove[0] !== newNavbarInner[0]) {\n navbarToRemove.addClass('cached');\n }\n }\n else {\n var removeNavbar = dynamicNavbar && navbarToRemove.length;\n if (pageToRemove.length) {\n app.pageRemoveCallback(view, pageToRemove[0], 'right');\n if (removeNavbar) {\n app.navbarRemoveCallback(view, pageToRemove[0], navbar[0], navbarToRemove[0]);\n }\n app.router._remove(pageToRemove);\n if (removeNavbar) app.router._remove(navbarToRemove);\n }\n else if (removeNavbar) {\n app.navbarRemoveCallback(view, pageToRemove[0], navbar[0], navbarToRemove[0]);\n app.router._remove(navbarToRemove);\n }\n }\n pagesInView = pagesContainer.children('.page:not(.cached)');\n if (dynamicNavbar) {\n navbarInners = viewContainer.children('.navbar').find('.navbar-inner:not(.cached)');\n }\n if (view.history.indexOf(url) >= 0) {\n view.history = view.history.slice(0, view.history.indexOf(url) + 2);\n }\n else {\n if (view.history[[view.history.length - 2]]) {\n view.history[view.history.length - 2] = url;\n }\n else {\n view.history.unshift(url);\n }\n }\n }\n \n oldPage = $(pagesInView[pagesInView.length - 1]);\n if (view.params.domCache) {\n if (oldPage[0] === newPage[0]) {\n oldPage = pagesContainer.children('.page.page-on-center');\n if (oldPage.length === 0 && view.activePage) oldPage = $(view.activePage.container);\n }\n }\n \n if (dynamicNavbar && !oldNavbarInner) {\n oldNavbarInner = $(navbarInners[navbarInners.length - 1]);\n if (view.params.domCache) {\n if (oldNavbarInner[0] === newNavbarInner[0]) {\n oldNavbarInner = navbar.children('.navbar-inner.navbar-on-center:not(.cached)');\n }\n if (oldNavbarInner.length === 0) {\n oldNavbarInner = navbar.children('.navbar-inner[data-page=\"'+oldPage.attr('data-page')+'\"]');\n }\n }\n if (oldNavbarInner.length === 0 || newNavbarInner[0] === oldNavbarInner[0]) dynamicNavbar = false;\n }\n \n if (dynamicNavbar) {\n if (manipulateDom) newNavbarInner.insertBefore(oldNavbarInner);\n newNavbarInner[0].f7RelatedPage = newPage[0];\n newPage[0].f7RelatedNavbar = newNavbarInner[0];\n }\n if (manipulateDom) newPage.insertBefore(oldPage);\n \n // Page Init Events\n app.pageInitCallback(view, {\n pageContainer: newPage[0],\n url: url,\n position: 'left',\n navbarInnerContainer: dynamicNavbar ? newNavbarInner[0] : undefined,\n oldNavbarInnerContainer: dynamicNavbar ? oldNavbarInner && oldNavbarInner[0] : undefined,\n context: t7_rendered.context,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData,\n preloadOnly: preloadOnly\n });\n if (dynamicNavbar) {\n app.navbarInitCallback(view, newPage[0], navbar[0], newNavbarInner[0], url, 'right');\n }\n \n if (dynamicNavbar && newNavbarInner.hasClass('navbar-on-left') && animatePages) {\n app.router.prepareNavbar(newNavbarInner, oldNavbarInner, 'left');\n }\n \n if (preloadOnly) {\n view.allowPageChange = true;\n return;\n }\n \n // Update View's URL\n view.url = url;\n \n // Force reLayout\n var clientLeft = newPage[0].clientLeft;\n \n animateBack();\n \n // Push state\n if (app.params.pushState && view.main) {\n if (typeof pushState === 'undefined') pushState = true;\n if (!preloadOnly && history.state && pushState) {\n history.back();\n }\n }\n return;\n }\n \n // Simple go back when we have pages on left\n if (pagesInView.length > 1 && !force) {\n // Exit if only preloadOnly\n if (preloadOnly) {\n view.allowPageChange = true;\n return;\n }\n // Update View's URL\n view.url = view.history[view.history.length - 2];\n url = view.url;\n \n // Define old and new pages\n newPage = $(pagesInView[pagesInView.length - 2]);\n oldPage = $(pagesInView[pagesInView.length - 1]);\n \n // Dynamic navbar\n if (view.params.dynamicNavbar) {\n dynamicNavbar = true;\n // Find navbar\n navbarInners = viewContainer.children('.navbar').find('.navbar-inner:not(.cached)');\n newNavbarInner = $(navbarInners[0]);\n oldNavbarInner = $(navbarInners[1]);\n if (newNavbarInner.length === 0 || oldNavbarInner.length === 0 || oldNavbarInner[0] === newNavbarInner[0]) {\n dynamicNavbar = false;\n }\n }\n manipulateDom = false;\n setPages();\n return;\n }\n \n if (!force) {\n // Go back when there is no pages on left\n if (!preloadOnly) {\n view.url = view.history[view.history.length - 2];\n url = view.url;\n }\n \n if (content) {\n parseNewPage();\n setPages();\n return;\n }\n else if (pageName) {\n // Get dom cached pages\n newPage = $(viewContainer).find('.page[data-page=\"' + pageName + '\"]');\n if (view.params.dynamicNavbar) {\n newNavbarInner = $(viewContainer).children('.navbar').find('.navbar-inner[data-page=\"' + pageName + '\"]');\n if (newNavbarInner.length === 0 && newPage[0].f7RelatedNavbar) {\n newNavbarInner = $(newPage[0].f7RelatedNavbar);\n }\n if (newNavbarInner.length === 0 && newPage[0].f7PageData) {\n newNavbarInner = $(newPage[0].f7PageData.navbarInnerContainer);\n }\n }\n setPages();\n return;\n }\n else if (url && url in view.pageElementsCache) {\n newPage = view.pageElementsCache[url].page;\n newNavbarInner = view.pageElementsCache[url].navbarInner;\n setPages();\n return;\n }\n else {\n view.allowPageChange = true;\n return;\n }\n }\n else {\n if (url && url === view.url || pageName && view.activePage && view.activePage.name === pageName) {\n view.allowPageChange = true;\n return;\n }\n // Go back with force url\n if (content) {\n parseNewPage();\n setPages();\n return;\n }\n else if (pageName && view.params.domCache) {\n if (pageName) url = '#' + pageName;\n \n newPage = $(viewContainer).find('.page[data-page=\"' + pageName + '\"]');\n if (newPage[0].f7PageData && newPage[0].f7PageData.url) {\n url = newPage[0].f7PageData.url;\n }\n if (view.params.dynamicNavbar) {\n newNavbarInner = $(viewContainer).children('.navbar').find('.navbar-inner[data-page=\"' + pageName + '\"]');\n if (newNavbarInner.length === 0 && newPage[0].f7RelatedNavbar) {\n newNavbarInner = $(newPage[0].f7RelatedNavbar);\n }\n if (newNavbarInner.length === 0 && newPage[0].f7PageData) {\n newNavbarInner = $(newPage[0].f7PageData.navbarInnerContainer);\n }\n }\n setPages();\n return;\n }\n else if (pageElement && url) {\n newPage = $(pageElement);\n if (view.params.dynamicNavbar) {\n newNavbarInner = newPage.find('.navbar-inner').filter(function (index, el) {\n return $(el).parents(app.router._modalsSelector).length === 0;\n });\n if (newNavbarInner.length > 0) {\n newPage.prepend(newNavbarInner);\n app.router._remove(newPage.find('.navbar').filter(function (index, el) {\n return $(el).parents(app.router._modalsSelector).length === 0;\n }));\n }\n }\n setPages();\n return;\n }\n else {\n view.allowPageChange = true;\n return;\n }\n }\n \n };\n app.router.back = function (view, options) {\n options = options || {};\n if (app.routerPreOptions) {\n options = app.routerPreOptions(view, options) || {};\n }\n if (options.component && app.componentLoader) {\n try {\n app.componentLoader(view, options, function (newOptions) {\n app.router.load(view, newOptions);\n });\n } catch (e) {}\n return;\n }\n if (app.router.preroute(view, options, true)) {\n return false;\n }\n var url = options.url;\n var content = options.content;\n var pageName = options.pageName;\n var pageElement = options.pageElement;\n if (pageName) {\n if (pageName.indexOf('?') > 0) {\n options.query = $.parseUrlQuery(pageName);\n options.pageName = pageName = pageName.split('?')[0];\n }\n }\n var force = options.force;\n if (!view.allowPageChange) return false;\n view.allowPageChange = false;\n if (app.xhr && view.xhr && view.xhr === app.xhr) {\n app.xhr.abort();\n app.xhr = false;\n }\n var pagesInView = $(view.pagesContainer).find('.page:not(.cached)');\n \n function proceed(content) {\n app.router.preprocess(view, content, url, function (content) {\n options.content = content;\n app.router._back(view, options);\n });\n }\n if (pagesInView.length > 1 && !force) {\n // Simple go back to previos page in view\n app.router._back(view, options);\n return;\n }\n if (!force) {\n url = view.history[view.history.length - 2] || options.url;\n if (!options.url) options.url = url;\n if (!url) {\n view.allowPageChange = true;\n return;\n }\n if (url.indexOf('#') === 0 && view.contentCache[url]) {\n proceed(view.contentCache[url]);\n return;\n }\n else if (url.indexOf('#') === 0 && view.params.domCache) {\n if (!pageName) options.pageName = url.split('#')[1];\n proceed();\n return;\n }\n else if (url && url in view.pageElementsCache) {\n proceed();\n }\n else if (url.indexOf('#') !== 0) {\n // Load ajax page\n app.get(options.url, view, options.ignoreCache, function (content, error) {\n if (error) {\n view.allowPageChange = true;\n return;\n }\n proceed(content);\n });\n return;\n }\n }\n else {\n // Go back with force url\n if (!url && content) {\n proceed(content);\n return;\n }\n else if (!url && pageName) {\n if (pageName) url = '#' + pageName;\n proceed();\n return;\n }\n else if (url && pageElement) {\n proceed();\n return;\n }\n else if (url) {\n app.get(options.url, view, options.ignoreCache, function (content, error) {\n if (error) {\n view.allowPageChange = true;\n return;\n }\n proceed(content);\n });\n return;\n }\n }\n view.allowPageChange = true;\n return;\n };\n \n app.router.afterBack = function (view, oldPage, newPage) {\n // Remove old page and set classes on new one\n oldPage = $(oldPage);\n newPage = $(newPage);\n \n if (view.params.domCache && view.initialPages.indexOf(oldPage[0]) >= 0) {\n oldPage.removeClass('page-from-center-to-right').addClass('cached');\n }\n else {\n app.pageRemoveCallback(view, oldPage[0], 'right');\n app.router._remove(oldPage);\n }\n \n newPage.removeClass('page-from-left-to-center page-on-left').addClass('page-on-center');\n view.allowPageChange = true;\n \n // Update View's History\n var previousURL = view.history.pop();\n \n var newNavbar;\n \n // Updated dynamic navbar\n if (view.params.dynamicNavbar) {\n var inners = $(view.container).children('.navbar').find('.navbar-inner:not(.cached)');\n var oldNavbar = $(oldPage[0].f7RelatedNavbar || inners[1]);\n if (view.params.domCache && view.initialNavbars.indexOf(oldNavbar[0]) >= 0) {\n oldNavbar.removeClass('navbar-from-center-to-right').addClass('cached');\n }\n else {\n app.navbarRemoveCallback(view, oldPage[0], undefined, oldNavbar[0]);\n app.router._remove(oldNavbar);\n }\n newNavbar = $(inners[0]).removeClass('navbar-on-left navbar-from-left-to-center').addClass('navbar-on-center');\n }\n \n // Remove pages in dom cache\n if (view.params.domCache) {\n $(view.container).find('.page.cached').each(function () {\n var page = $(this);\n var pageUrl = page[0].f7PageData && page[0].f7PageData.url;\n if (pageUrl && view.history.indexOf(pageUrl) < 0 && view.initialPages.indexOf(this) < 0) {\n app.pageRemoveCallback(view, page[0], 'right');\n if (page[0].f7RelatedNavbar && view.params.dynamicNavbar) app.navbarRemoveCallback(view, page[0], undefined, page[0].f7RelatedNavbar);\n app.router._remove(page);\n if (page[0].f7RelatedNavbar && view.params.dynamicNavbar) app.router._remove(page[0].f7RelatedNavbar);\n }\n });\n }\n \n // Check previous page is content based only and remove it from content cache\n if (!view.params.domCache &&\n previousURL &&\n previousURL.indexOf('#') > -1 &&\n (previousURL in view.contentCache) &&\n // If the same page is in the history multiple times, don't remove it.\n view.history.indexOf(previousURL) === -1) {\n view.contentCache[previousURL] = null;\n delete view.contentCache[previousURL];\n }\n if (previousURL &&\n (previousURL in view.pageElementsCache) &&\n // If the same page is in the history multiple times, don't remove it.\n view.history.indexOf(previousURL) === -1) {\n view.pageElementsCache[previousURL] = null;\n delete view.pageElementsCache[previousURL];\n }\n // Check for context cache\n if (previousURL &&\n (previousURL in view.contextCache) &&\n // If the same page is in the history multiple times, don't remove it.\n view.history.indexOf(previousURL) === -1) {\n view.contextCache[previousURL] = null;\n delete view.contextCache[previousURL];\n }\n \n if (app.params.pushState && view.main) app.pushStateClearQueue();\n \n // Preload previous page\n if (view.params.preloadPreviousPage) {\n if (view.params.domCache && view.history.length > 1) {\n var preloadUrl = view.history[view.history.length - 2];\n var previousPage;\n var previousNavbar;\n if (preloadUrl && view.pagesCache[preloadUrl]) {\n // Load by page name\n previousPage = $(view.container).find('.page[data-page=\"' + view.pagesCache[preloadUrl] + '\"]');\n if (previousPage.next('.page')[0] !== newPage[0]) previousPage.insertBefore(newPage);\n if (newNavbar) {\n previousNavbar = $(view.container).children('.navbar').find('.navbar-inner[data-page=\"' + view.pagesCache[preloadUrl] + '\"]');\n if(!previousNavbar || previousNavbar.length === 0) previousNavbar = newNavbar.prev('.navbar-inner.cached');\n if (previousNavbar.next('.navbar-inner')[0] !== newNavbar[0]) previousNavbar.insertBefore(newNavbar);\n }\n }\n else {\n // Just load previous page\n previousPage = newPage.prev('.page.cached');\n if (newNavbar) previousNavbar = newNavbar.prev('.navbar-inner.cached');\n }\n if (previousPage && previousPage.length > 0) previousPage.removeClass('cached page-on-right page-on-center').addClass('page-on-left');\n if (previousNavbar && previousNavbar.length > 0) previousNavbar.removeClass('cached navbar-on-right navbar-on-center').addClass('navbar-on-left');\n }\n else {\n app.router.back(view, {preloadOnly: true});\n }\n }\n };\n \n"," /*======================================================\n ************ Modals ************\n ======================================================*/\n var _modalTemplateTempDiv = document.createElement('div');\n app.modalStack = [];\n app.modalStackClearQueue = function () {\n if (app.modalStack.length) {\n (app.modalStack.shift())();\n }\n };\n app.modal = function (params) {\n params = params || {};\n var modalHTML = '';\n if (app.params.modalTemplate) {\n if (!app._compiledTemplates.modal) app._compiledTemplates.modal = t7.compile(app.params.modalTemplate);\n modalHTML = app._compiledTemplates.modal(params);\n }\n else {\n var buttonsHTML = '';\n if (params.buttons && params.buttons.length > 0) {\n for (var i = 0; i < params.buttons.length; i++) {\n buttonsHTML += '' + params.buttons[i].text + '';\n }\n }\n var titleHTML = params.title ? '
                  ' + params.title + '
                  ' : '';\n var textHTML = params.text ? '
                  ' + params.text + '
                  ' : '';\n var afterTextHTML = params.afterText ? params.afterText : '';\n var noButtons = !params.buttons || params.buttons.length === 0 ? 'modal-no-buttons' : '';\n var verticalButtons = params.verticalButtons ? 'modal-buttons-vertical': '';\n var modalButtonsHTML = params.buttons && params.buttons.length > 0 ? '
                  ' + buttonsHTML + '
                  ' : '';\n modalHTML = '
                  ' + (titleHTML + textHTML + afterTextHTML) + '
                  ' + modalButtonsHTML + '
                  ';\n }\n \n _modalTemplateTempDiv.innerHTML = modalHTML;\n \n var modal = $(_modalTemplateTempDiv).children();\n \n app.root.append(modal[0]);\n \n // Add events on buttons\n modal.find('.modal-button').each(function (index, el) {\n $(el).on('click', function (e) {\n if (params.buttons[index].close !== false) app.closeModal(modal);\n if (params.buttons[index].onClick) params.buttons[index].onClick(modal, e);\n if (params.onClick) params.onClick(modal, index);\n });\n });\n app.openModal(modal);\n return modal[0];\n };\n app.alert = function (text, title, callbackOk) {\n if (typeof title === 'function') {\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n buttons: [ {text: app.params.modalButtonOk, bold: true, onClick: callbackOk} ]\n });\n };\n app.confirm = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n buttons: [\n {text: app.params.modalButtonCancel, onClick: callbackCancel},\n {text: app.params.modalButtonOk, bold: true, onClick: callbackOk}\n ]\n });\n };\n app.prompt = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n afterText: '
                  ',\n buttons: [\n {\n text: app.params.modalButtonCancel\n },\n {\n text: app.params.modalButtonOk,\n bold: true\n }\n ],\n onClick: function (modal, index) {\n if (index === 0 && callbackCancel) callbackCancel($(modal).find('.modal-text-input').val());\n if (index === 1 && callbackOk) callbackOk($(modal).find('.modal-text-input').val());\n }\n });\n };\n app.modalLogin = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n afterText: '
                  ',\n buttons: [\n {\n text: app.params.modalButtonCancel\n },\n {\n text: app.params.modalButtonOk,\n bold: true\n }\n ],\n onClick: function (modal, index) {\n var username = $(modal).find('.modal-text-input[name=\"modal-username\"]').val();\n var password = $(modal).find('.modal-text-input[name=\"modal-password\"]').val();\n if (index === 0 && callbackCancel) callbackCancel(username, password);\n if (index === 1 && callbackOk) callbackOk(username, password);\n }\n });\n };\n app.modalPassword = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n afterText: '
                  ',\n buttons: [\n {\n text: app.params.modalButtonCancel\n },\n {\n text: app.params.modalButtonOk,\n bold: true\n }\n ],\n onClick: function (modal, index) {\n var password = $(modal).find('.modal-text-input[name=\"modal-password\"]').val();\n if (index === 0 && callbackCancel) callbackCancel(password);\n if (index === 1 && callbackOk) callbackOk(password);\n }\n });\n };\n app.showPreloader = function (title) {\n return app.modal({\n title: title || app.params.modalPreloaderTitle,\n text: '
                  ' + (app.params.material ? app.params.materialPreloaderHtml : '') + '
                  ',\n cssClass: 'modal-preloader'\n });\n };\n app.hidePreloader = function () {\n app.closeModal('.modal-preloader');\n };\n app.showIndicator = function () {\n if ($('.preloader-indicator-overlay').length > 0) return;\n app.root.append('
                  ' + (app.params.material ? app.params.materialPreloaderHtml : '') + '
                  ');\n };\n app.hideIndicator = function () {\n $('.preloader-indicator-overlay, .preloader-indicator-modal').remove();\n };\n // Action Sheet\n app.actions = function (target, params, animated) {\n var toPopover = false, modal, groupSelector, buttonSelector;\n if (arguments.length === 1 || arguments.length === 2 && typeof arguments[1] === 'boolean') {\n // Actions\n params = arguments[0];\n animated = arguments[1];\n }\n else {\n // Popover\n if (app.device.ios) {\n if (app.device.ipad) toPopover = true;\n }\n else {\n if (app.width >= 768) toPopover = true;\n }\n }\n if (typeof animated === 'undefined') animated = true;\n \n params = params || [];\n \n if (params.length > 0 && !Array.isArray(params[0])) {\n params = [params];\n }\n var modalHTML;\n if (toPopover) {\n var actionsToPopoverTemplate = app.params.modalActionsToPopoverTemplate ||\n '
                  ' +\n '
                  ' +\n '{{#each this}}' +\n '
                  ' +\n '
                    ' +\n '{{#each this}}' +\n '{{#if label}}' +\n '
                  • {{text}}
                  • ' +\n '{{else}}' +\n '
                  • {{text}}
                  • ' +\n '{{/if}}' +\n '{{/each}}' +\n '
                  ' +\n '
                  ' +\n '{{/each}}' +\n '
                  ' +\n '
                  ';\n if (!app._compiledTemplates.actionsToPopover) {\n app._compiledTemplates.actionsToPopover = t7.compile(actionsToPopoverTemplate);\n }\n var popoverHTML = app._compiledTemplates.actionsToPopover(params);\n modal = $(app.popover(popoverHTML, target, true, animated));\n groupSelector = '.list-block ul';\n buttonSelector = '.list-button';\n }\n else {\n if (app.params.modalActionsTemplate) {\n if (!app._compiledTemplates.actions) app._compiledTemplates.actions = t7.compile(app.params.modalActionsTemplate);\n modalHTML = app._compiledTemplates.actions(params);\n }\n else {\n var buttonsHTML = '';\n for (var i = 0; i < params.length; i++) {\n for (var j = 0; j < params[i].length; j++) {\n if (j === 0) buttonsHTML += '
                  ';\n var button = params[i][j];\n var buttonClass = button.label ? 'actions-modal-label' : 'actions-modal-button';\n if (button.bold) buttonClass += ' actions-modal-button-bold';\n if (button.color) buttonClass += ' color-' + button.color;\n if (button.bg) buttonClass += ' bg-' + button.bg;\n if (button.disabled) buttonClass += ' disabled';\n buttonsHTML += '
                  ' + button.text + '
                  ';\n if (j === params[i].length - 1) buttonsHTML += '
                  ';\n }\n }\n modalHTML = '
                  ' + buttonsHTML + '
                  ';\n }\n _modalTemplateTempDiv.innerHTML = modalHTML;\n modal = $(_modalTemplateTempDiv).children();\n app.root.append(modal[0]);\n groupSelector = '.actions-modal-group';\n buttonSelector = '.actions-modal-button';\n }\n \n var groups = modal.find(groupSelector);\n groups.each(function (index, el) {\n var groupIndex = index;\n $(el).children().each(function (index, el) {\n var buttonIndex = index;\n var buttonParams = params[groupIndex][buttonIndex];\n var clickTarget;\n if (!toPopover && $(el).is(buttonSelector)) clickTarget = $(el);\n if (toPopover && $(el).find(buttonSelector).length > 0) clickTarget = $(el).find(buttonSelector);\n \n if (clickTarget) {\n clickTarget.on('click', function (e) {\n if (buttonParams.close !== false) app.closeModal(modal);\n if (buttonParams.onClick) buttonParams.onClick(modal, e);\n });\n }\n });\n });\n if (!toPopover) app.openModal(modal, animated);\n return modal[0];\n };\n app.popover = function (modal, target, removeOnClose, animated, closeByOutside) {\n if (typeof removeOnClose === 'undefined') removeOnClose = true;\n if (typeof closeByOutside === 'undefined') closeByOutside = true;\n if (typeof animated === 'undefined') animated = true;\n if (typeof modal === 'string' && modal.indexOf('<') >= 0) {\n var _modal = document.createElement('div');\n _modal.innerHTML = modal.trim();\n if (_modal.childNodes.length > 0) {\n modal = _modal.childNodes[0];\n if (removeOnClose) modal.classList.add('remove-on-close');\n if (!closeByOutside) modal.classList.add('ignore-close-by-outside');\n app.root.append(modal);\n }\n else return false; //nothing found\n }\n modal = $(modal);\n target = $(target);\n if (modal.length === 0 || target.length === 0) return false;\n if (modal.parents('body').length === 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n if (!closeByOutside) modal.addClass.add('ignore-close-by-outside');\n app.root.append(modal[0]);\n }\n if (modal.find('.popover-angle').length === 0 && !app.params.material) {\n modal.append('
                  ');\n }\n modal.show();\n \n var material = app.params.material;\n \n function sizePopover() {\n modal.css({left: '', top: ''});\n var modalWidth = modal.width();\n var modalHeight = modal.height(); // 13 - height of angle\n var modalAngle, modalAngleSize = 0, modalAngleLeft, modalAngleTop;\n if (!material) {\n modalAngle = modal.find('.popover-angle');\n modalAngleSize = modalAngle.width() / 2;\n modalAngle.removeClass('on-left on-right on-top on-bottom').css({left: '', top: ''});\n }\n else {\n modal.removeClass('popover-on-left popover-on-right popover-on-top popover-on-bottom').css({left: '', top: ''});\n }\n \n var targetWidth = target.outerWidth();\n var targetHeight = target.outerHeight();\n var targetOffset = target.offset();\n var targetOffsetLeft = targetOffset.left - app.left;\n var targetOffsetTop = targetOffset.top - app.top;\n var targetParentPage = target.parents('.page');\n if (targetParentPage.length > 0) {\n targetOffsetTop = targetOffsetTop - targetParentPage[0].scrollTop;\n }\n \n var modalTop = 0;\n var modalLeft = 0;\n var diff = 0;\n // Top Position\n var modalPosition = material ? 'bottom' : 'top';\n if (material) {\n if (modalHeight < app.height - targetOffsetTop - targetHeight) {\n // On bottom\n modalPosition = 'bottom';\n modalTop = targetOffsetTop;\n }\n else if (modalHeight < targetOffsetTop) {\n // On top\n modalTop = targetOffsetTop - modalHeight + targetHeight;\n modalPosition = 'top';\n }\n else {\n // On middle\n modalPosition = 'bottom';\n modalTop = targetOffsetTop;\n }\n \n if (modalTop <= 0) {\n modalTop = 8;\n }\n else if (modalTop + modalHeight >= app.height) {\n modalTop = app.height - modalHeight - 8;\n }\n \n // Horizontal Position\n modalLeft = targetOffsetLeft;\n if (modalLeft + modalWidth >= app.width - 8) {\n modalLeft = targetOffsetLeft + targetWidth - modalWidth - 8;\n }\n if (modalLeft < 8) {\n modalLeft = 8;\n }\n if (modalPosition === 'top') {\n modal.addClass('popover-on-top');\n }\n if (modalPosition === 'bottom') {\n modal.addClass('popover-on-bottom');\n }\n if (target.hasClass('floating-button-to-popover') && !modal.hasClass('modal-in')) {\n modal.addClass('popover-floating-button');\n var diffX = (modalLeft + modalWidth / 2) - (targetOffsetLeft + targetWidth / 2),\n diffY = (modalTop + modalHeight / 2) - (targetOffsetTop + targetHeight / 2);\n target\n .addClass('floating-button-to-popover-in')\n .transform('translate3d(' + diffX + 'px, ' + diffY + 'px,0)')\n .transitionEnd(function (e) {\n if (!target.hasClass('floating-button-to-popover-in')) return;\n target\n .addClass('floating-button-to-popover-scale')\n .transform('translate3d(' + diffX + 'px, ' + diffY + 'px,0) scale(' + (modalWidth/targetWidth) + ', ' + (modalHeight/targetHeight) + ')');\n });\n \n modal.once('popover:close', function () {\n target\n .removeClass('floating-button-to-popover-in floating-button-to-popover-scale')\n .addClass('floating-button-to-popover-out')\n .transform('')\n .transitionEnd(function (e) {\n target.removeClass('floating-button-to-popover-out');\n });\n });\n modal.once('popover:closed', function () {\n modal.removeClass('popover-floating-button');\n });\n }\n else if (target.hasClass('floating-button-to-popover') && modal.hasClass('modal-in')) {\n modalLeft = targetOffsetLeft;\n modalTop = targetOffsetTop;\n }\n \n }\n else {\n if ((modalHeight + modalAngleSize) < targetOffsetTop) {\n // On top\n modalTop = targetOffsetTop - modalHeight - modalAngleSize;\n }\n else if ((modalHeight + modalAngleSize) < app.height - targetOffsetTop - targetHeight) {\n // On bottom\n modalPosition = 'bottom';\n modalTop = targetOffsetTop + targetHeight + modalAngleSize;\n }\n else {\n // On middle\n modalPosition = 'middle';\n modalTop = targetHeight / 2 + targetOffsetTop - modalHeight / 2;\n diff = modalTop;\n if (modalTop <= 0) {\n modalTop = 5;\n }\n else if (modalTop + modalHeight >= app.height) {\n modalTop = app.height - modalHeight - 5;\n }\n diff = diff - modalTop;\n }\n \n // Horizontal Position\n if (modalPosition === 'top' || modalPosition === 'bottom') {\n modalLeft = targetWidth / 2 + targetOffsetLeft - modalWidth / 2;\n diff = modalLeft;\n if (modalLeft < 5) modalLeft = 5;\n if (modalLeft + modalWidth > app.width) modalLeft = app.width - modalWidth - 5;\n if (modalPosition === 'top') {\n modalAngle.addClass('on-bottom');\n }\n if (modalPosition === 'bottom') {\n modalAngle.addClass('on-top');\n }\n diff = diff - modalLeft;\n modalAngleLeft = (modalWidth / 2 - modalAngleSize + diff);\n modalAngleLeft = Math.max(Math.min(modalAngleLeft, modalWidth - modalAngleSize * 2 - 13), 13);\n modalAngle.css({left: modalAngleLeft + 'px'});\n \n }\n else if (modalPosition === 'middle') {\n modalLeft = targetOffsetLeft - modalWidth - modalAngleSize;\n modalAngle.addClass('on-right');\n if (modalLeft < 5 || (modalLeft + modalWidth > app.width)) {\n if (modalLeft < 5) modalLeft = targetOffsetLeft + targetWidth + modalAngleSize;\n if (modalLeft + modalWidth > app.width) modalLeft = app.width - modalWidth - 5;\n modalAngle.removeClass('on-right').addClass('on-left');\n }\n modalAngleTop = (modalHeight / 2 - modalAngleSize + diff);\n modalAngleTop = Math.max(Math.min(modalAngleTop, modalHeight - modalAngleSize * 2 - 13), 13);\n modalAngle.css({top: modalAngleTop + 'px'});\n }\n }\n \n \n // Apply Styles\n modal.css({top: modalTop + 'px', left: modalLeft + 'px'});\n }\n \n sizePopover();\n \n app.onResize(sizePopover);\n \n modal.on('popover:close', function () {\n app.offResize(sizePopover);\n });\n \n app.openModal(modal, animated);\n return modal[0];\n };\n app.popup = function (modal, removeOnClose, animated) {\n if (typeof removeOnClose === 'undefined') removeOnClose = true;\n if (typeof animated === 'undefined') animated = true;\n if (typeof modal === 'string' && modal.indexOf('<') >= 0) {\n var _modal = document.createElement('div');\n _modal.innerHTML = modal.trim();\n if (_modal.childNodes.length > 0) {\n modal = _modal.childNodes[0];\n if (removeOnClose) modal.classList.add('remove-on-close');\n app.root.append(modal);\n }\n else return false; //nothing found\n }\n modal = $(modal);\n if (modal.length === 0) return false;\n if (modal.parents('body').length === 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n app.root.append(modal[0]);\n }\n modal.show();\n \n app.openModal(modal, animated);\n return modal[0];\n };\n app.pickerModal = function (modal, removeOnClose, animated) {\n if (typeof removeOnClose === 'undefined') removeOnClose = true;\n if (typeof animated === 'undefined') animated = true;\n if (typeof modal === 'string' && modal.indexOf('<') >= 0) {\n modal = $(modal);\n if (modal.length > 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n app.root.append(modal[0]);\n }\n else return false; //nothing found\n }\n modal = $(modal);\n if (modal.length === 0) return false;\n if (modal.parents('body').length === 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n app.root.append(modal[0]);\n }\n if ($('.picker-modal.modal-in:not(.modal-out)').length > 0 && !modal.hasClass('modal-in')) {\n app.closeModal('.picker-modal.modal-in:not(.modal-out)');\n }\n modal.show();\n app.openModal(modal, animated);\n return modal[0];\n };\n app.loginScreen = function (modal, animated) {\n if (!modal) modal = '.login-screen';\n if (typeof animated === 'undefined') animated = true;\n modal = $(modal);\n if (modal.length === 0) return false;\n if ($('.login-screen.modal-in:not(.modal-out)').length > 0 && !modal.hasClass('modal-in')) {\n app.closeModal('.login-screen.modal-in:not(.modal-out)');\n }\n modal.show();\n \n app.openModal(modal, animated);\n return modal[0];\n };\n app.openModal = function (modal, animated) {\n if (typeof animated === 'undefined') animated = true;\n modal = $(modal);\n modal[animated ? 'removeClass' : 'addClass']('not-animated');\n \n var isModal = modal.hasClass('modal');\n var isPopover = modal.hasClass('popover');\n var isPopup = modal.hasClass('popup');\n var isLoginScreen = modal.hasClass('login-screen');\n var isPickerModal = modal.hasClass('picker-modal');\n var isActions = modal.hasClass('actions-modal');\n \n // Modal Event Prefix\n var modalType = 'modal';\n if (isPopover) modalType = 'popover';\n if (isPopup) modalType = 'popup';\n if (isLoginScreen) modalType = 'loginscreen';\n if (isPickerModal) modalType = 'picker';\n if (isActions) modalType = 'actions';\n \n if ($('.modal.modal-in:not(.modal-out)').length && app.params.modalStack && isModal) {\n app.modalStack.push(function () {\n app.openModal(modal);\n });\n return;\n }\n \n // do nothing if this modal already shown\n if (true === modal.data('f7-modal-shown')) {\n return;\n }\n modal.data('f7-modal-shown', true);\n \n // Move modal\n var modalParent = modal.parent();\n if (app.params.modalsMoveToRoot && !modalParent.is(app.root)) {\n app.root.append(modal);\n modal.once(modalType + ':closed', function() {\n modalParent.append(modal);\n });\n }\n \n modal.once(modalType + ':close', function() {\n modal.removeData('f7-modal-shown');\n });\n \n if (isModal) {\n modal.show();\n modal.css({\n marginTop: - Math.round(modal.outerHeight() / 2) + 'px'\n });\n }\n \n var overlay;\n if (!isLoginScreen && !isPickerModal) {\n if ($('.modal-overlay').length === 0 && !isPopup) {\n app.root.append('
                  ');\n }\n if ($('.popup-overlay').length === 0 && isPopup) {\n app.root.append('
                  ');\n }\n overlay = isPopup ? $('.popup-overlay') : $('.modal-overlay');\n }\n if (app.params.material && isPickerModal) {\n if (modal.hasClass('picker-calendar')) {\n if ($('.picker-modal-overlay').length === 0 && !isPopup) {\n app.root.append('
                  ');\n }\n overlay = $('.picker-modal-overlay');\n }\n }\n if (overlay) {\n overlay[animated ? 'removeClass' : 'addClass']('not-animated');\n }\n \n //Make sure that styles are applied, trigger relayout;\n var clientLeft = modal[0].clientLeft;\n \n // Trugger open event\n modal.trigger('open ' + modalType + ':open');\n \n // Picker modal body class\n if (isPickerModal) {\n $('body').addClass('with-picker-modal');\n }\n \n // Init Pages and Navbars in modal\n if (modal.find('.' + app.params.viewClass).length > 0) {\n modal.find('.page').each(function () {\n app.initPageWithCallback(this);\n });\n modal.find('.navbar').each(function () {\n app.initNavbarWithCallback(this);\n });\n }\n \n // Classes for transition in\n if (!isLoginScreen && !isPickerModal) overlay.addClass('modal-overlay-visible');\n if (app.params.material && isPickerModal && overlay) overlay.addClass('modal-overlay-visible');\n if (animated) {\n modal.removeClass('modal-out').addClass('modal-in').transitionEnd(function (e) {\n if (modal.hasClass('modal-out')) modal.trigger('closed ' + modalType + ':closed');\n else modal.trigger('opened ' + modalType + ':opened');\n });\n }\n else {\n modal.removeClass('modal-out').addClass('modal-in');\n modal.trigger('opened ' + modalType + ':opened');\n }\n return true;\n };\n app.closeModal = function (modal, animated) {\n if (typeof animated === 'undefined') animated = true;\n modal = $(modal || '.modal-in');\n if (typeof modal !== 'undefined' && modal.length === 0) {\n return;\n }\n modal[animated ? 'removeClass' : 'addClass']('not-animated');\n var isModal = modal.hasClass('modal');\n var isPopover = modal.hasClass('popover');\n var isPopup = modal.hasClass('popup');\n var isLoginScreen = modal.hasClass('login-screen');\n var isPickerModal = modal.hasClass('picker-modal');\n var isActions = modal.hasClass('actions-modal');\n \n // Modal Event Prefix\n var modalType = 'modal';\n if (isPopover) modalType = 'popover';\n if (isPopup) modalType = 'popup';\n if (isLoginScreen) modalType = 'loginscreen';\n if (isPickerModal) modalType = 'picker';\n if (isActions) modalType = 'actions';\n \n var removeOnClose = modal.hasClass('remove-on-close');\n \n // ignore close popover\n if (isPopover && !removeOnClose && modal.hasClass('ignore-close-by-outside')) {\n \treturn;\n }\n \n // For Actions\n var keepOnClose = modal.hasClass('keep-on-close');\n \n var overlay;\n \n if (isPopup) overlay = $('.popup-overlay');\n else {\n if (isPickerModal && app.params.material) overlay = $('.picker-modal-overlay');\n else if (!isPickerModal) overlay = $('.modal-overlay');\n }\n \n if (isPopup){\n if (modal.length === $('.popup.modal-in').length) {\n overlay.removeClass('modal-overlay-visible');\n }\n }\n else if (overlay && overlay.length > 0) {\n overlay.removeClass('modal-overlay-visible');\n }\n if (overlay) overlay[animated ? 'removeClass' : 'addClass']('not-animated');\n \n modal.trigger('close ' + modalType + ':close');\n \n // Picker modal body class\n if (isPickerModal) {\n $('body').removeClass('with-picker-modal');\n $('body').addClass('picker-modal-closing');\n }\n \n if (!(isPopover && !app.params.material)) {\n if (animated) {\n modal.removeClass('modal-in').addClass('modal-out').transitionEnd(function (e) {\n if (modal.hasClass('modal-out')) modal.trigger('closed ' + modalType + ':closed');\n else {\n modal.trigger('opened ' + modalType + ':opened');\n if (isPopover) return;\n }\n \n if (isPickerModal) {\n $('body').removeClass('picker-modal-closing');\n }\n if (isPopup || isLoginScreen || isPickerModal || isPopover) {\n modal.removeClass('modal-out').hide();\n if (removeOnClose && modal.length > 0) {\n modal.remove();\n }\n }\n else if (!keepOnClose) {\n modal.remove();\n }\n });\n }\n else {\n modal.trigger('closed ' + modalType + ':closed');\n modal.removeClass('modal-in modal-out');\n if (isPickerModal) {\n $('body').removeClass('picker-modal-closing');\n }\n if (isPopup || isLoginScreen || isPickerModal || isPopover) {\n modal.hide();\n if (removeOnClose && modal.length > 0) {\n modal.remove();\n }\n }\n else if (!keepOnClose) {\n modal.remove();\n }\n }\n if (isModal && app.params.modalStack) {\n app.modalStackClearQueue();\n }\n }\n else {\n modal.removeClass('modal-in modal-out not-animated').trigger('closed ' + modalType + ':closed').hide();\n if (removeOnClose) {\n modal.remove();\n }\n }\n return true;\n };\n \n"," /*===============================================================================\n ************ Progress Bar ************\n ===============================================================================*/\n app.setProgressbar = function (container, progress, speed) {\n container = $(container || app.root);\n if (container.length === 0) return;\n if (progress) progress = Math.min(Math.max(progress, 0), 100);\n var progressbar;\n if (container.hasClass('progressbar')) progressbar = container;\n else {\n progressbar = container.children('.progressbar');\n }\n if (progressbar.length === 0 || progressbar.hasClass('progressbar-infinite')) return;\n var clientLeft = progressbar[0].clientLeft;\n progressbar.children('span').transform('translate3d(' + (-100 + progress) + '%,0,0)');\n if (typeof speed !== 'undefined') {\n progressbar.children('span').transition(speed);\n }\n else {\n progressbar.children('span').transition('');\n }\n return progressbar[0];\n };\n app.showProgressbar = function (container, progress, color) {\n if (typeof container === 'number') {\n container = app.root;\n progress = arguments[0];\n color = arguments[1];\n }\n if (progress && typeof progress === 'string' && parseFloat(progress) !== progress * 1) {\n color = progress;\n progress = undefined;\n }\n container = $(container || app.root);\n if (container.length === 0) return;\n var progressbar;\n if (container.hasClass('progressbar')) progressbar = container;\n else {\n progressbar = container.children('.progressbar:not(.progressbar-out), .progressbar-infinite:not(.progressbar-out)');\n if (progressbar.length === 0) {\n // Create one\n if (typeof progress !== 'undefined') {\n // Determined\n progressbar = $('');\n }\n else {\n // Infinite\n progressbar = $('');\n }\n container.append(progressbar);\n }\n }\n if (progress) app.setProgressbar(container, progress);\n return progressbar[0];\n };\n app.hideProgressbar = function (container) {\n container = $(container || app.root);\n if (container.length === 0) return;\n var progressbar;\n if (container.hasClass('progressbar')) progressbar = container;\n else {\n progressbar = container.children('.progressbar, .progressbar-infinite');\n }\n if (progressbar.length === 0 || !progressbar.hasClass('progressbar-in') || progressbar.hasClass('progressbar-out')) return;\n progressbar.removeClass('progressbar-in').addClass('progressbar-out').animationEnd(function () {\n progressbar.remove();\n progressbar = null;\n });\n return;\n };\n app.initPageProgressbar = function (pageContainer) {\n pageContainer = $(pageContainer);\n pageContainer.find('.progressbar').each(function () {\n var p = $(this);\n if (p.children('span').length === 0) p.append('');\n if (p.attr('data-progress')) app.setProgressbar(p, p.attr('data-progress'));\n });\n };\n"," /*======================================================\n ************ Panels ************\n ======================================================*/\n app.allowPanelOpen = true;\n app.openPanel = function (panelPosition, animated) {\n if (typeof animated === 'undefined') animated = true;\n if (!app.allowPanelOpen) return false;\n var panel = $('.panel-' + panelPosition);\n if (panel.length === 0 || panel.hasClass('active') || panel.hasClass('panel-visible-by-breakpoint')) return false;\n app.closePanel(); // Close if some panel is opened\n app.allowPanelOpen = false;\n var effect = panel.hasClass('panel-reveal') ? 'reveal' : 'cover';\n panel[animated ? 'removeClass' : 'addClass']('not-animated');\n panel.css({display: 'block'}).addClass('active');\n panel.trigger('open panel:open');\n \n var panelOverlay = $('.panel-overlay');\n panelOverlay[animated ? 'removeClass' : 'addClass']('not-animated');\n panelOverlay.show();\n \n if (panel.find('.' + app.params.viewClass).length > 0) {\n if (app.sizeNavbars) app.sizeNavbars(panel.find('.' + app.params.viewClass)[0]);\n }\n \n // Trigger reLayout\n var clientLeft = panel[0].clientLeft;\n \n // Transition End;\n var transitionEndTarget = effect === 'reveal' ? $('.' + app.params.viewsClass) : panel;\n \n function panelTransitionEnd() {\n transitionEndTarget.transitionEnd(function (e) {\n if ($(e.target).is(transitionEndTarget)) {\n if (panel.hasClass('active')) {\n panel.trigger('opened panel:opened');\n }\n else {\n panel.trigger('closed panel:closed');\n }\n panelOverlay.css({display: ''});\n app.allowPanelOpen = true;\n }\n else panelTransitionEnd();\n });\n }\n if (animated) {\n panelTransitionEnd();\n }\n else {\n panel.trigger('opened panel:opened');\n panelOverlay.css({display: ''});\n app.allowPanelOpen = true;\n }\n \n $('body').addClass('with-panel-' + panelPosition + '-' + effect);\n return true;\n };\n app.closePanel = function (animated) {\n if (typeof animated === 'undefined') animated = true;\n var activePanel = $('.panel.active');\n if (activePanel.length === 0 || activePanel.hasClass('panel-visible-by-breakpoint')) return false;\n var effect = activePanel.hasClass('panel-reveal') ? 'reveal' : 'cover';\n var panelPosition = activePanel.hasClass('panel-left') ? 'left' : 'right';\n activePanel[animated ? 'removeClass' : 'addClass']('not-animated');\n activePanel.removeClass('active');\n \n var panelOverlay = $('.panel-overlay');\n panelOverlay.removeClass('not-animated');\n \n var transitionEndTarget = effect === 'reveal' ? $('.' + app.params.viewsClass) : activePanel;\n activePanel.trigger('close panel:close');\n app.allowPanelOpen = false;\n if (animated) {\n transitionEndTarget.transitionEnd(function () {\n if (activePanel.hasClass('active')) return;\n activePanel.css({display: ''});\n activePanel.trigger('closed panel:closed');\n $('body').removeClass('panel-closing');\n app.allowPanelOpen = true;\n });\n $('body').addClass('panel-closing').removeClass('with-panel-' + panelPosition + '-' + effect);\n }\n else {\n activePanel.css({display: ''});\n activePanel.trigger('closed panel:closed');\n activePanel.removeClass('not-animated');\n $('body').removeClass('with-panel-' + panelPosition + '-' + effect);\n app.allowPanelOpen = true;\n }\n };\n /*======================================================\n ************ Panels breakpoints ************\n ======================================================*/\n app.initPanelsBreakpoints = function () {\n var panelLeft = $('.panel-left');\n var panelRight = $('.panel-right');\n var views = app.root.children('.views');\n var wasVisible;\n function setPanels() {\n // Left Panel\n if (app.params.panelLeftBreakpoint && panelLeft.length > 0) {\n wasVisible = panelLeft.hasClass('panel-visible-by-breakpoint');\n if (app.width >= app.params.panelLeftBreakpoint) {\n if (!wasVisible) {\n $('body').removeClass('with-panel-left-reveal with-panel-left-cover');\n panelLeft.css('display', '').addClass('panel-visible-by-breakpoint').removeClass('active');\n panelLeft.trigger('open panel:open opened panel:opened');\n views.css({\n 'margin-left': panelLeft.width() + 'px'\n });\n app.allowPanelOpen = true;\n }\n }\n else {\n if (wasVisible) {\n panelLeft.css('display', '').removeClass('panel-visible-by-breakpoint active');\n panelLeft.trigger('close panel:close closed panel:closed');\n views.css({\n 'margin-left': ''\n });\n app.allowPanelOpen = true;\n }\n }\n }\n // Right Panel\n if (app.params.panelRightBreakpoint && panelRight.length > 0) {\n wasVisible = panelRight.hasClass('panel-visible-by-breakpoint');\n if (app.width >= app.params.panelRightBreakpoint) {\n if (!wasVisible) {\n $('body').removeClass('with-panel-right-reveal with-panel-right-cover');\n panelRight.css('display', '').addClass('panel-visible-by-breakpoint').removeClass('active');\n panelRight.trigger('open panel:open opened panel:opened');\n views.css({\n 'margin-right': panelRight.width() + 'px'\n });\n app.allowPanelOpen = true;\n }\n }\n else {\n if (wasVisible) {\n panelRight.css('display', '').removeClass('panel-visible-by-breakpoint active');\n panelRight.trigger('close panel:close closed panel:closed');\n views.css({\n 'margin-right': ''\n });\n app.allowPanelOpen = true;\n }\n }\n }\n }\n app.onResize(setPanels);\n setPanels();\n };\n /*======================================================\n ************ Swipe panels ************\n ======================================================*/\n app.initSwipePanels = function () {\n var panel, side;\n if (app.params.swipePanel) {\n panel = $('.panel.panel-' + app.params.swipePanel);\n side = app.params.swipePanel;\n if (panel.length === 0 && side !== 'both') return;\n }\n else {\n if (app.params.swipePanelOnlyClose) {\n if ($('.panel').length === 0) return;\n }\n else return;\n }\n \n var panelOverlay = $('.panel-overlay');\n var isTouched, isMoved, isScrolling, touchesStart = {}, touchStartTime, touchesDiff, translate, overlayOpacity, opened, panelWidth, effect, direction;\n var views = $('.' + app.params.viewsClass);\n \n function handleTouchStart(e) {\n if (!app.allowPanelOpen || (!app.params.swipePanel && !app.params.swipePanelOnlyClose) || isTouched) return;\n if ($('.modal-in, .photo-browser-in').length > 0) return;\n if (!(app.params.swipePanelCloseOpposite || app.params.swipePanelOnlyClose)) {\n if ($('.panel.active').length > 0 && !panel.hasClass('active')) return;\n }\n if (e.target && e.target.nodeName.toLowerCase() === 'input' && e.target.type === 'range') return;\n if ($(e.target).closest('.tabs-swipeable-wrap').length > 0) return;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n if (app.params.swipePanelCloseOpposite || app.params.swipePanelOnlyClose) {\n if ($('.panel.active').length > 0) {\n side = $('.panel.active').hasClass('panel-left') ? 'left' : 'right';\n }\n else {\n if (app.params.swipePanelOnlyClose) return;\n side = app.params.swipePanel;\n }\n if (!side) return;\n }\n panel = $('.panel.panel-' + side);\n opened = panel.hasClass('active');\n if (app.params.swipePanelActiveArea && !opened) {\n if (side === 'left') {\n if (touchesStart.x > app.params.swipePanelActiveArea) return;\n }\n if (side === 'right') {\n if (touchesStart.x < app.width - app.params.swipePanelActiveArea) return;\n }\n }\n isMoved = false;\n isTouched = true;\n isScrolling = undefined;\n \n touchStartTime = (new Date()).getTime();\n direction = undefined;\n }\n function handleTouchMove(e) {\n if (!isTouched) return;\n if (e.f7PreventPanelSwipe) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (isScrolling) {\n isTouched = false;\n return;\n }\n if (!direction) {\n if (pageX > touchesStart.x) {\n direction = 'to-right';\n }\n else {\n direction = 'to-left';\n }\n \n if(side === 'both'){\n if ($('.panel.active').length > 0) {\n side = $('.panel.active').hasClass('panel-left') ? 'left' : 'right';\n }\n else {\n side = direction === 'to-right' ? 'left' : 'right';\n }\n if (app.params.swipePanelActiveArea > 0) {\n if (side === 'left' && touchesStart.x > app.params.swipePanelActiveArea) {\n isTouched = false;\n return;\n }\n if (side === 'right' && touchesStart.x < app.width - app.params.swipePanelActiveArea) {\n isTouched = false;\n return;\n }\n }\n panel = $('.panel.panel-' + side);\n }\n if (panel.hasClass('panel-visible-by-breakpoint')) {\n isTouched = false;\n return;\n }\n \n if (\n side === 'left' &&\n (\n direction === 'to-left' && !panel.hasClass('active')\n ) ||\n side === 'right' &&\n (\n direction === 'to-right' && !panel.hasClass('active')\n )\n )\n {\n isTouched = false;\n return;\n }\n }\n \n if (app.params.swipePanelNoFollow) {\n var timeDiff = (new Date()).getTime() - touchStartTime;\n if (timeDiff < 300) {\n if (direction === 'to-left') {\n if (side === 'right') app.openPanel(side);\n if (side === 'left' && panel.hasClass('active')) app.closePanel();\n }\n if (direction === 'to-right') {\n if (side === 'left') app.openPanel(side);\n if (side === 'right' && panel.hasClass('active')) app.closePanel();\n }\n }\n isTouched = false;\n isMoved = false;\n return;\n }\n \n if (!isMoved) {\n effect = panel.hasClass('panel-cover') ? 'cover' : 'reveal';\n if (!opened) {\n panel.show();\n panelOverlay.show();\n }\n panelWidth = panel[0].offsetWidth;\n panel.transition(0);\n if (panel.find('.' + app.params.viewClass).length > 0) {\n if (app.sizeNavbars) app.sizeNavbars(panel.find('.' + app.params.viewClass)[0]);\n }\n }\n \n isMoved = true;\n \n e.preventDefault();\n var threshold = opened ? 0 : -app.params.swipePanelThreshold;\n if (side === 'right') threshold = -threshold;\n \n touchesDiff = pageX - touchesStart.x + threshold;\n \n if (side === 'right') {\n if (effect === 'cover') {\n translate = touchesDiff + (opened ? 0 : panelWidth);\n if (translate < 0) translate = 0;\n if (translate > panelWidth) {\n translate = panelWidth;\n }\n }\n else {\n translate = touchesDiff - (opened ? panelWidth : 0);\n if (translate > 0) translate = 0;\n if (translate < -panelWidth) {\n translate = -panelWidth;\n }\n }\n }\n else {\n translate = touchesDiff + (opened ? panelWidth : 0);\n if (translate < 0) translate = 0;\n if (translate > panelWidth) {\n translate = panelWidth;\n }\n }\n if (effect === 'reveal') {\n views.transform('translate3d(' + translate + 'px,0,0)').transition(0);\n panelOverlay.transform('translate3d(' + translate + 'px,0,0)').transition(0);\n \n panel.trigger('panel:swipe', {progress: Math.abs(translate / panelWidth)});\n app.pluginHook('swipePanelSetTransform', views[0], panel[0], Math.abs(translate / panelWidth));\n }\n else {\n if (side === 'left') translate = translate - panelWidth;\n panel.transform('translate3d(' + (translate) + 'px,0,0)').transition(0);\n \n panelOverlay.transition(0);\n overlayOpacity = 1 - Math.abs(translate/panelWidth);\n panelOverlay.css({opacity: overlayOpacity});\n \n panel.trigger('panel:swipe', {progress: Math.abs(translate / panelWidth)});\n app.pluginHook('swipePanelSetTransform', views[0], panel[0], Math.abs(translate / panelWidth));\n }\n }\n function handleTouchEnd(e) {\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n isTouched = false;\n isMoved = false;\n var timeDiff = (new Date()).getTime() - touchStartTime;\n var action;\n var edge = (translate === 0 || Math.abs(translate) === panelWidth);\n \n if (!opened) {\n if (effect === 'cover') {\n if (translate === 0) {\n action = 'swap'; //open\n }\n else if (timeDiff < 300 && Math.abs(translate) > 0) {\n action = 'swap'; //open\n }\n else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) {\n action = 'swap'; //open\n }\n else {\n action = 'reset'; //close\n }\n }\n else {\n if (translate === 0) {\n action = 'reset';\n }\n else if (\n timeDiff < 300 && Math.abs(translate) > 0 ||\n timeDiff >= 300 && (Math.abs(translate) >= panelWidth / 2)\n ) {\n action = 'swap';\n }\n else {\n action = 'reset';\n }\n }\n }\n else {\n if (effect === 'cover') {\n if (translate === 0) {\n action = 'reset'; //open\n }\n else if (timeDiff < 300 && Math.abs(translate) > 0) {\n action = 'swap'; //open\n }\n else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) {\n action = 'reset'; //open\n }\n else {\n action = 'swap'; //close\n }\n }\n else {\n if (translate === -panelWidth) {\n action = 'reset';\n }\n else if (\n timeDiff < 300 && Math.abs(translate) >= 0 ||\n timeDiff >= 300 && (Math.abs(translate) <= panelWidth / 2)\n ) {\n if (side === 'left' && translate === panelWidth) action = 'reset';\n else action = 'swap';\n }\n else {\n action = 'reset';\n }\n }\n }\n if (action === 'swap') {\n app.allowPanelOpen = true;\n if (opened) {\n app.closePanel();\n if (edge) {\n panel.css({display: ''});\n $('body').removeClass('panel-closing');\n }\n }\n else {\n app.openPanel(side);\n }\n if (edge) app.allowPanelOpen = true;\n }\n if (action === 'reset') {\n if (opened) {\n app.allowPanelOpen = true;\n app.openPanel(side);\n }\n else {\n app.closePanel();\n if (edge) {\n app.allowPanelOpen = true;\n panel.css({display: ''});\n }\n else {\n var target = effect === 'reveal' ? views : panel;\n panel.trigger('close panel:close');\n $('body').addClass('panel-closing');\n target.transitionEnd(function () {\n if (panel.hasClass('active')) return;\n panel.trigger('close panel:closed');\n panel.css({display: ''});\n $('body').removeClass('panel-closing');\n app.allowPanelOpen = true;\n });\n }\n }\n }\n if (effect === 'reveal') {\n views.transition('');\n views.transform('');\n }\n panel.transition('').transform('');\n panelOverlay.css({display: ''}).transform('').transition('').css('opacity', '');\n }\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n $(document).on(app.touchEvents.start, handleTouchStart, passiveListener);\n $(document).on(app.touchEvents.move, handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, handleTouchEnd, passiveListener);\n };\n \n"," /*======================================================\n ************ Image Lazy Loading ************\n ************ Based on solution by Marc Godard, https://github.com/MarcGodard ************\n ======================================================*/\n app.initImagesLazyLoad = function (pageContainer) {\n pageContainer = $(pageContainer);\n \n // Lazy images\n var lazyLoadImages;\n if (pageContainer.hasClass('lazy')) {\n lazyLoadImages = pageContainer;\n pageContainer = lazyLoadImages.parents('.page');\n }\n else {\n lazyLoadImages = pageContainer.find('.lazy');\n }\n if (lazyLoadImages.length === 0) return;\n \n // Scrollable page content\n var pageContent;\n if (pageContainer.hasClass('page-content')) {\n pageContent = pageContainer;\n pageContainer = pageContainer.parents('.page');\n }\n else {\n pageContent = pageContainer.find('.page-content');\n }\n if (pageContent.length === 0) return;\n \n // Placeholder\n var placeholderSrc = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEXCwsK592mkAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n if (typeof app.params.imagesLazyLoadPlaceholder === 'string') {\n placeholderSrc = app.params.imagesLazyLoadPlaceholder;\n }\n if (app.params.imagesLazyLoadPlaceholder !== false) lazyLoadImages.each(function(){\n if ($(this).attr('data-src') && !$(this).attr('src')) $(this).attr('src', placeholderSrc);\n });\n \n // load image\n var imagesSequence = [];\n var imageIsLoading = false;\n function loadImage(el) {\n el = $(el);\n \n var bg = el.attr('data-background');\n var src = bg ? bg : el.attr('data-src');\n if (!src) return;\n \n function onLoad() {\n el.removeClass('lazy').addClass('lazy-loaded');\n if (bg) {\n el.css('background-image', 'url(' + src + ')');\n }\n else {\n el.attr('src', src);\n }\n \n if (app.params.imagesLazyLoadSequential) {\n imageIsLoading = false;\n if (imagesSequence.length > 0) {\n loadImage(imagesSequence.shift());\n }\n }\n el.trigger('lazy-loaded');\n if (app.params.onLazyLoaded) app.params.onLazyLoaded(el);\n }\n \n function onError() {\n el.removeClass('lazy').addClass('lazy-loaded');\n if (bg) {\n el.css('background-image', 'url(' + placeholderSrc + ')');\n }\n else {\n el.attr('src', placeholderSrc);\n }\n \n if (app.params.imagesLazyLoadSequential) {\n imageIsLoading = false;\n if (imagesSequence.length > 0) {\n loadImage(imagesSequence.shift());\n }\n }\n el.trigger('lazy-error');\n if (app.params.onLazyError) app.params.onLazyError(el);\n }\n \n if (app.params.imagesLazyLoadSequential) {\n if (imageIsLoading) {\n if (imagesSequence.indexOf(el[0]) < 0) imagesSequence.push(el[0]);\n return;\n }\n }\n \n // Loading flag\n imageIsLoading = true;\n \n var image = new Image();\n image.onload = onLoad;\n image.onerror = onError;\n image.src =src;\n \n // Add loaded callback and events\n el.trigger('lazy-load');\n if (app.params.onLazyLoad && !el.hasClass('lazy-loaded')) app.params.onLazyLoad(el);\n }\n function lazyHandler() {\n lazyLoadImages = pageContainer.find('.lazy');\n lazyLoadImages.each(function(index, el) {\n el = $(el);\n if (el.parents('.tab:not(.active)').length > 0) {\n return;\n }\n if (isElementInViewport(el[0])) {\n loadImage(el);\n }\n });\n }\n \n function isElementInViewport (el) {\n var rect = el.getBoundingClientRect();\n var threshold = app.params.imagesLazyLoadThreshold || 0;\n return (\n rect.top >= (0 - threshold) &&\n rect.left >= (0 - threshold) &&\n rect.top <= (app.height + threshold) &&\n rect.left <= (app.width + threshold)\n );\n }\n \n function attachEvents(destroy) {\n var method = destroy ? 'off' : 'on';\n lazyLoadImages[method]('lazy', lazyHandler);\n lazyLoadImages.parents('.tab')[method]('show', lazyHandler);\n pageContainer[method]('lazy', lazyHandler);\n pageContent[method]('lazy', lazyHandler);\n pageContent[method]('scroll', lazyHandler);\n app[method === 'on' ? 'onResize' : 'offResize'](lazyHandler);\n }\n function detachEvents() {\n attachEvents(true);\n }\n \n // Store detach function\n pageContainer[0].f7DestroyImagesLazyLoad = detachEvents;\n \n // Attach events\n attachEvents();\n \n // Destroy on page remove\n if (pageContainer.hasClass('page')) {\n pageContainer.once('page:beforeremove', detachEvents);\n }\n \n // Run loader on page load/init\n lazyHandler();\n \n // Run after page animation\n pageContainer.once('page:afteranimation', lazyHandler);\n };\n app.destroyImagesLazyLoad = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length > 0 && pageContainer[0].f7DestroyImagesLazyLoad) {\n pageContainer[0].f7DestroyImagesLazyLoad();\n }\n };\n app.reinitImagesLazyLoad = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length > 0) {\n pageContainer.trigger('lazy');\n }\n };\n \n"," /*======================================================\n ************ Material Preloader ************\n ======================================================*/\n app.initPageMaterialPreloader = function (pageContainer) {\n $(pageContainer).find('.preloader').each(function () {\n if ($(this).children().length === 0) {\n $(this).html(app.params.materialPreloaderHtml);\n }\n });\n };\n"," /*======================================================\n ************ Messages ************\n ======================================================*/\n var Messages = function (container, params) {\n var defaults = {\n autoLayout: true,\n newMessagesFirst: false,\n scrollMessages: true,\n scrollMessagesOnlyOnEdge: false,\n messageTemplate:\n '{{#if day}}' +\n '
                  {{day}} {{#if time}}, {{time}}{{/if}}
                  ' +\n '{{/if}}' +\n '
                  ' +\n '{{#if name}}
                  {{name}}
                  {{/if}}' +\n '
                  {{text}}{{#if date}}
                  {{date}}
                  {{/if}}
                  ' +\n '{{#if avatar}}
                  {{/if}}' +\n '{{#if label}}
                  {{label}}
                  {{/if}}' +\n '
                  '\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined' || params[def] === null) {\n params[def] = defaults[def];\n }\n }\n \n // Instance\n var m = this;\n \n // Params\n m.params = params;\n \n // Container\n m.container = $(container);\n if (m.container.length === 0) return;\n \n // Autolayout\n if (m.params.autoLayout) m.container.addClass('messages-auto-layout');\n \n // New messages first\n if (m.params.newMessagesFirst) m.container.addClass('messages-new-first');\n \n // Is In Page\n m.pageContainer = m.container.parents('.page').eq(0);\n m.pageContent = m.pageContainer.find('.page-content');\n \n // Compiled template\n m.template = Template7.compile(m.params.messageTemplate);\n \n // Auto Layout\n m.layout = function () {\n if (!m.container.hasClass('messages-auto-layout')) m.container.addClass('messages-auto-layout');\n m.container.find('.message').each(function () {\n var message = $(this);\n if (message.find('.message-text img').length > 0) {\n var childNodes = message.find('.message-text')[0].childNodes;\n var onlyPic = true;\n for (var i = 0 ; i < childNodes.length; i++) {\n if (childNodes[i].nodeType === 1 && childNodes[i].nodeName.toLowerCase() !== 'img') onlyPic = false;\n if (childNodes[i].nodeType === 3 && childNodes[i].textContent.trim() !== '') onlyPic = false;\n }\n if (onlyPic) message.addClass('message-pic');\n else message.removeClass('message-pic');\n }\n if (message.find('.message-avatar').length > 0) message.addClass('message-with-avatar');\n });\n m.container.find('.message').each(function () {\n var message = $(this);\n var isSent = message.hasClass('message-sent');\n var next = message.next('.message-' + (isSent ? 'sent' : 'received'));\n var prev = message.prev('.message-' + (isSent ? 'sent' : 'received'));\n if (next.length === 0) {\n message.addClass('message-last message-with-tail');\n }\n else message.removeClass('message-last message-with-tail');\n \n if (prev.length === 0) {\n message.addClass('message-first');\n }\n else message.removeClass('message-first');\n \n if (prev.length > 0 && prev.find('.message-name').length > 0 && message.find('.message-name').length > 0) {\n if (prev.find('.message-name').text() !== message.find('.message-name').text()) {\n prev.addClass('message-last message-with-tail');\n message.addClass('message-first');\n }\n }\n });\n };\n \n // Add Message\n m.appendMessage = function (props, animate) {\n return m.addMessage(props, 'append', animate);\n };\n m.prependMessage = function (props, animate) {\n return m.addMessage(props, 'prepend', animate);\n };\n m.addMessage = function (props, method, animate) {\n return m.addMessages([props], method, animate);\n };\n m.addMessages = function (newMessages, method, animate) {\n if (typeof animate === 'undefined') {\n animate = true;\n }\n if (typeof method === 'undefined') {\n method = m.params.newMessagesFirst ? 'prepend' : 'append';\n }\n var newMessagesHTML = '', i;\n for (i = 0; i < newMessages.length; i++) {\n var props = newMessages[i] || {};\n props.type = props.type || 'sent';\n if (!props.text) continue;\n props.hasImage = props.text.indexOf('= 0;\n if (props.onlyImage === false) props.hasImage = false;\n if (animate) props.position = method === 'append' ? 'bottom' : 'top';\n \n newMessagesHTML += m.template(props);\n }\n var scrollHeightBefore = m.pageContent[0].scrollHeight,\n heightBefore = m.pageContent[0].offsetHeight,\n scrollBefore = m.pageContent[0].scrollTop;\n m.container[method](newMessagesHTML);\n if (m.params.autoLayout) m.layout();\n if (method === 'prepend') {\n m.pageContent[0].scrollTop = scrollBefore + (m.pageContent[0].scrollHeight - scrollHeightBefore);\n }\n if (m.params.scrollMessages && (method === 'append' && !m.params.newMessagesFirst) || (method === 'prepend' && m.params.newMessagesFirst)) {\n if (m.params.scrollMessagesOnlyOnEdge) {\n var onEdge = false;\n if (m.params.newMessagesFirst) {\n if (scrollBefore === 0) onEdge = true;\n }\n else {\n if (scrollBefore - (scrollHeightBefore - heightBefore) >= -10) onEdge = true;\n }\n if (onEdge) m.scrollMessages(animate ? undefined : 0);\n }\n else m.scrollMessages(animate ? undefined : 0);\n }\n var messages = m.container.find('.message');\n if (newMessages.length === 1) {\n return method === 'append' ? messages[messages.length - 1] : messages[0];\n }\n else {\n var messagesToReturn = [];\n if (method === 'append') {\n for (i = messages.length - newMessages.length; i < messages.length; i++) {\n messagesToReturn.push(messages[i]);\n }\n }\n else {\n for (i = 0; i < newMessages.length; i++) {\n messagesToReturn.push(messages[i]);\n }\n }\n return messagesToReturn;\n }\n \n };\n m.removeMessage = function (message) {\n message = $(message);\n if (message.length === 0) {\n return false;\n }\n else {\n message.remove();\n if (m.params.autoLayout) m.layout();\n return true;\n }\n };\n m.removeMessages = function (messages) {\n m.removeMessage(messages);\n };\n m.clean = function () {\n m.container.html('');\n };\n \n // Scroll\n m.scrollMessages = function (duration, scrollTop) {\n if (typeof duration === 'undefined') duration = 400;\n var currentScroll = m.pageContent[0].scrollTop;\n var newScroll;\n if (typeof scrollTop !== 'undefined') newScroll = scrollTop;\n else {\n newScroll = m.params.newMessagesFirst ? 0 : m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight;\n if (newScroll === currentScroll) return;\n }\n m.pageContent.scrollTop(newScroll, duration);\n };\n \n // Init Destroy\n m.init = function () {\n if (m.params.messages) {\n m.addMessages(m.params.messages, undefined, false);\n }\n else {\n if (m.params.autoLayout) m.layout();\n m.scrollMessages(0);\n }\n \n };\n m.destroy = function () {\n m = null;\n };\n \n // Init\n m.init();\n \n m.container[0].f7Messages = m;\n return m;\n };\n app.messages = function (container, params) {\n return new Messages (container, params);\n };\n app.initPageMessages = function (pageContainer) {\n pageContainer = $(pageContainer);\n var messages = pageContainer.find('.messages');\n if (messages.length === 0) return;\n if (!messages.hasClass('messages-init')) {\n return;\n }\n var m = app.messages(messages, messages.dataset());\n \n // Destroy on page remove\n function pageBeforeRemove() {\n m.destroy();\n pageContainer.off('page:beforeremove', pageBeforeRemove);\n }\n if (pageContainer.hasClass('page')) {\n pageContainer.on('page:beforeremove', pageBeforeRemove);\n }\n };\n \n"," /*===============================================================================\n ************ Swipeout Actions (Swipe to delete) ************\n ===============================================================================*/\n app.swipeoutOpenedEl = undefined;\n app.allowSwipeout = true;\n app.initSwipeout = function (swipeoutEl) {\n var isTouched, isMoved, isScrolling, touchesStart = {}, touchStartTime, touchesDiff, swipeOutEl, swipeOutContent, actionsRight, actionsLeft, actionsLeftWidth, actionsRightWidth, translate, opened, openedActions, buttonsLeft, buttonsRight, direction, overswipeLeftButton, overswipeRightButton, overswipeLeft, overswipeRight, noFoldLeft, noFoldRight;\n \n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n \n $(document).on(app.touchEvents.start, function (e) {\n if (app.swipeoutOpenedEl) {\n var target = $(e.target);\n if (!(\n app.swipeoutOpenedEl.is(target[0]) ||\n target.parents('.swipeout').is(app.swipeoutOpenedEl) ||\n target.hasClass('modal-in') ||\n target.hasClass('modal-overlay') ||\n target.hasClass('actions-modal') || \n target.parents('.actions-modal.modal-in, .modal.modal-in').length > 0\n )) {\n app.swipeoutClose(app.swipeoutOpenedEl);\n }\n }\n }, activeListener);\n \n function handleTouchStart(e) {\n if (!app.allowSwipeout) return;\n isMoved = false;\n isTouched = true;\n isScrolling = undefined;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n }\n function handleTouchMove(e) {\n if (!isTouched) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (isScrolling) {\n isTouched = false;\n return;\n }\n \n if (!isMoved) {\n if ($('.list-block.sortable-opened').length > 0) return;\n /*jshint validthis:true */\n swipeOutEl = $(this);\n swipeOutContent = swipeOutEl.find('.swipeout-content');\n actionsRight = swipeOutEl.find('.swipeout-actions-right');\n actionsLeft = swipeOutEl.find('.swipeout-actions-left');\n actionsLeftWidth = actionsRightWidth = buttonsLeft = buttonsRight = overswipeRightButton = overswipeLeftButton = null;\n noFoldLeft = actionsLeft.hasClass('swipeout-actions-no-fold') || app.params.swipeoutActionsNoFold;\n noFoldRight = actionsRight.hasClass('swipeout-actions-no-fold') || app.params.swipeoutActionsNoFold;\n if (actionsLeft.length > 0) {\n actionsLeftWidth = actionsLeft.outerWidth();\n buttonsLeft = actionsLeft.children('a');\n overswipeLeftButton = actionsLeft.find('.swipeout-overswipe');\n }\n if (actionsRight.length > 0) {\n actionsRightWidth = actionsRight.outerWidth();\n buttonsRight = actionsRight.children('a');\n overswipeRightButton = actionsRight.find('.swipeout-overswipe');\n }\n opened = swipeOutEl.hasClass('swipeout-opened');\n if (opened) {\n openedActions = swipeOutEl.find('.swipeout-actions-left.swipeout-actions-opened').length > 0 ? 'left' : 'right';\n }\n swipeOutEl.removeClass('transitioning');\n if (!app.params.swipeoutNoFollow) {\n swipeOutEl.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened');\n swipeOutEl.removeClass('swipeout-opened');\n }\n }\n isMoved = true;\n e.preventDefault();\n \n touchesDiff = pageX - touchesStart.x;\n translate = touchesDiff;\n \n if (opened) {\n if (openedActions === 'right') translate = translate - actionsRightWidth;\n else translate = translate + actionsLeftWidth;\n }\n \n if (translate > 0 && actionsLeft.length === 0 || translate < 0 && actionsRight.length === 0) {\n if (!opened) {\n isTouched = isMoved = false;\n swipeOutContent.transform('');\n if (buttonsRight && buttonsRight.length > 0) {\n buttonsRight.transform('');\n }\n if (buttonsLeft && buttonsLeft.length > 0) {\n buttonsLeft.transform('');\n }\n return;\n }\n translate = 0;\n }\n \n if (translate < 0) direction = 'to-left';\n else if (translate > 0) direction = 'to-right';\n else {\n if (!direction) direction = 'to-left';\n }\n \n var i, buttonOffset, progress;\n \n e.f7PreventPanelSwipe = true;\n if (app.params.swipeoutNoFollow) {\n if (opened) {\n if (openedActions === 'right' && touchesDiff > 0) {\n app.swipeoutClose(swipeOutEl);\n }\n if (openedActions === 'left' && touchesDiff < 0) {\n app.swipeoutClose(swipeOutEl);\n }\n }\n else {\n if (touchesDiff < 0 && actionsRight.length > 0) {\n app.swipeoutOpen(swipeOutEl, 'right');\n }\n if (touchesDiff > 0 && actionsLeft.length > 0) {\n app.swipeoutOpen(swipeOutEl, 'left');\n }\n }\n isTouched = false;\n isMoved = false;\n return;\n }\n overswipeLeft = false;\n overswipeRight = false;\n var $button;\n if (actionsRight.length > 0) {\n // Show right actions\n progress = translate / actionsRightWidth;\n if (translate < -actionsRightWidth) {\n translate = -actionsRightWidth - Math.pow(-translate - actionsRightWidth, 0.8);\n if (overswipeRightButton.length > 0) {\n overswipeRight = true;\n }\n }\n for (i = 0; i < buttonsRight.length; i++) {\n if (typeof buttonsRight[i]._buttonOffset === 'undefined') {\n buttonsRight[i]._buttonOffset = buttonsRight[i].offsetLeft;\n }\n buttonOffset = buttonsRight[i]._buttonOffset;\n $button = $(buttonsRight[i]);\n if (overswipeRightButton.length > 0 && $button.hasClass('swipeout-overswipe')) {\n $button.css({left: (overswipeRight ? -buttonOffset : 0) + 'px'});\n if (overswipeRight) {\n $button.addClass('swipeout-overswipe-active');\n }\n else {\n $button.removeClass('swipeout-overswipe-active'); \n }\n }\n $button.transform('translate3d(' + (translate - buttonOffset * (1 + Math.max(progress, -1))) + 'px,0,0)');\n }\n }\n if (actionsLeft.length > 0) {\n // Show left actions\n progress = translate / actionsLeftWidth;\n if (translate > actionsLeftWidth) {\n translate = actionsLeftWidth + Math.pow(translate - actionsLeftWidth, 0.8);\n if (overswipeLeftButton.length > 0) {\n overswipeLeft = true;\n }\n }\n for (i = 0; i < buttonsLeft.length; i++) {\n if (typeof buttonsLeft[i]._buttonOffset === 'undefined') {\n buttonsLeft[i]._buttonOffset = actionsLeftWidth - buttonsLeft[i].offsetLeft - buttonsLeft[i].offsetWidth;\n }\n buttonOffset = buttonsLeft[i]._buttonOffset;\n $button = $(buttonsLeft[i]);\n if (overswipeLeftButton.length > 0 && $button.hasClass('swipeout-overswipe')) {\n $button.css({left: (overswipeLeft ? buttonOffset : 0) + 'px'});\n if (overswipeLeft) {\n $button.addClass('swipeout-overswipe-active');\n }\n else {\n $button.removeClass('swipeout-overswipe-active'); \n }\n }\n if (buttonsLeft.length > 1) {\n $button.css('z-index', buttonsLeft.length - i); \n }\n $button.transform('translate3d(' + (translate + buttonOffset * (1 - Math.min(progress, 1))) + 'px,0,0)');\n }\n }\n swipeOutContent.transform('translate3d(' + translate + 'px,0,0)');\n }\n function handleTouchEnd(e) {\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n \n isTouched = false;\n isMoved = false;\n var timeDiff = (new Date()).getTime() - touchStartTime;\n var action, actionsWidth, actions, buttons, i;\n \n actions = direction === 'to-left' ? actionsRight : actionsLeft;\n actionsWidth = direction === 'to-left' ? actionsRightWidth : actionsLeftWidth;\n \n if (\n timeDiff < 300 && (touchesDiff < -10 && direction === 'to-left' || touchesDiff > 10 && direction === 'to-right') ||\n timeDiff >= 300 && Math.abs(translate) > actionsWidth / 2\n ) {\n action = 'open';\n }\n else {\n action = 'close';\n }\n if (timeDiff < 300) {\n if (Math.abs(translate) === 0) action = 'close';\n if (Math.abs(translate) === actionsWidth) action = 'open';\n }\n \n if (action === 'open') {\n app.swipeoutOpenedEl = swipeOutEl;\n swipeOutEl.trigger('open swipeout:open');\n swipeOutEl.addClass('swipeout-opened transitioning');\n var newTranslate = direction === 'to-left' ? -actionsWidth : actionsWidth;\n swipeOutContent.transform('translate3d(' + newTranslate + 'px,0,0)');\n actions.addClass('swipeout-actions-opened');\n buttons = direction === 'to-left' ? buttonsRight : buttonsLeft;\n if (buttons) {\n for (i = 0; i < buttons.length; i++) {\n $(buttons[i]).transform('translate3d(' + newTranslate + 'px,0,0)');\n }\n }\n if (overswipeRight) {\n actionsRight.find('.swipeout-overswipe')[0].click();\n }\n if (overswipeLeft) {\n actionsLeft.find('.swipeout-overswipe')[0].click();\n }\n }\n else {\n swipeOutEl.trigger('close swipeout:close');\n app.swipeoutOpenedEl = undefined;\n swipeOutEl.addClass('transitioning').removeClass('swipeout-opened');\n swipeOutContent.transform('');\n actions.removeClass('swipeout-actions-opened');\n }\n \n var buttonOffset;\n if (buttonsLeft && buttonsLeft.length > 0 && buttonsLeft !== buttons) {\n for (i = 0; i < buttonsLeft.length; i++) {\n buttonOffset = buttonsLeft[i]._buttonOffset;\n if (typeof buttonOffset === 'undefined') {\n buttonsLeft[i]._buttonOffset = actionsLeftWidth - buttonsLeft[i].offsetLeft - buttonsLeft[i].offsetWidth;\n }\n $(buttonsLeft[i]).transform('translate3d(' + (buttonOffset) + 'px,0,0)');\n }\n }\n if (buttonsRight && buttonsRight.length > 0 && buttonsRight !== buttons) {\n for (i = 0; i < buttonsRight.length; i++) {\n buttonOffset = buttonsRight[i]._buttonOffset;\n if (typeof buttonOffset === 'undefined') {\n buttonsRight[i]._buttonOffset = buttonsRight[i].offsetLeft;\n }\n $(buttonsRight[i]).transform('translate3d(' + (-buttonOffset) + 'px,0,0)');\n }\n }\n swipeOutContent.transitionEnd(function (e) {\n if (opened && action === 'open' || closed && action === 'close') return;\n swipeOutEl.trigger(action === 'open' ? 'opened' : 'closed');\n if (opened && action === 'close') {\n if (actionsRight.length > 0) {\n buttonsRight.transform('');\n }\n if (actionsLeft.length > 0) {\n buttonsLeft.transform('');\n }\n }\n });\n }\n if (swipeoutEl) {\n $(swipeoutEl).on(app.touchEvents.start, handleTouchStart, activeListener);\n $(swipeoutEl).on(app.touchEvents.move, handleTouchMove, activeListener);\n $(swipeoutEl).on(app.touchEvents.end, handleTouchEnd, activeListener);\n }\n else {\n $(document).on(app.touchEvents.start, '.list-block li.swipeout', handleTouchStart, activeListener);\n $(document).on(app.touchEvents.move, '.list-block li.swipeout', handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, '.list-block li.swipeout', handleTouchEnd, activeListener);\n }\n \n };\n app.swipeoutOpen = function (el, dir, callback) {\n el = $(el);\n if (arguments.length === 2) {\n if (typeof arguments[1] === 'function') {\n callback = dir;\n }\n }\n \n if (el.length === 0) return;\n if (el.length > 1) el = $(el[0]);\n if (!el.hasClass('swipeout') || el.hasClass('swipeout-opened')) return;\n if (!dir) {\n if (el.find('.swipeout-actions-right').length > 0) dir = 'right';\n else dir = 'left';\n }\n var swipeOutActions = el.find('.swipeout-actions-' + dir);\n if (swipeOutActions.length === 0) return;\n el.trigger('open swipeout:open').addClass('swipeout-opened').removeClass('transitioning');\n swipeOutActions.addClass('swipeout-actions-opened');\n var buttons = swipeOutActions.children('a');\n var swipeOutActionsWidth = swipeOutActions.outerWidth();\n var translate = dir === 'right' ? -swipeOutActionsWidth : swipeOutActionsWidth;\n var i;\n if (buttons.length > 1) {\n for (i = 0; i < buttons.length; i++) {\n if (dir === 'right') {\n $(buttons[i]).transform('translate3d(' + (- buttons[i].offsetLeft) + 'px,0,0)');\n }\n else {\n $(buttons[i]).css('z-index', buttons.length - i).transform('translate3d(' + (swipeOutActionsWidth - buttons[i].offsetWidth - buttons[i].offsetLeft) + 'px,0,0)');\n }\n }\n var clientLeft = buttons[1].clientLeft;\n }\n el.addClass('transitioning');\n for (i = 0; i < buttons.length; i++) {\n $(buttons[i]).transform('translate3d(' + (translate) + 'px,0,0)');\n }\n el.find('.swipeout-content').transform('translate3d(' + translate + 'px,0,0)').transitionEnd(function () {\n el.trigger('opened swipeout:opened');\n if (callback) callback.call(el[0]);\n });\n app.swipeoutOpenedEl = el;\n };\n app.swipeoutClose = function (el, callback) {\n el = $(el);\n if (el.length === 0) return;\n if (!el.hasClass('swipeout-opened')) return;\n var dir = el.find('.swipeout-actions-opened').hasClass('swipeout-actions-right') ? 'right' : 'left';\n var swipeOutActions = el.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened');\n var buttons = swipeOutActions.children('a');\n var swipeOutActionsWidth = swipeOutActions.outerWidth();\n app.allowSwipeout = false;\n el.trigger('close swipeout:close');\n el.removeClass('swipeout-opened').addClass('transitioning');\n \n var closeTO;\n function onSwipeoutClose() {\n app.allowSwipeout = true;\n if (el.hasClass('swipeout-opened')) return;\n el.removeClass('transitioning');\n buttons.transform('');\n el.trigger('closed swipeout:closed');\n if (callback) callback.call(el[0]);\n if (closeTO) clearTimeout(closeTO);\n }\n el.find('.swipeout-content').transform('').transitionEnd(onSwipeoutClose);\n closeTO = setTimeout(onSwipeoutClose, 500);\n \n for (var i = 0; i < buttons.length; i++) {\n if (dir === 'right') {\n $(buttons[i]).transform('translate3d(' + (-buttons[i].offsetLeft) + 'px,0,0)');\n }\n else {\n $(buttons[i]).transform('translate3d(' + (swipeOutActionsWidth - buttons[i].offsetWidth - buttons[i].offsetLeft) + 'px,0,0)');\n }\n $(buttons[i]).css({left:0 + 'px'}).removeClass('swipeout-overswipe-active');\n }\n if (app.swipeoutOpenedEl && app.swipeoutOpenedEl[0] === el[0]) app.swipeoutOpenedEl = undefined;\n };\n app.swipeoutDelete = function (el, callback) {\n el = $(el);\n if (el.length === 0) return;\n if (el.length > 1) el = $(el[0]);\n app.swipeoutOpenedEl = undefined;\n el.trigger('delete swipeout:delete');\n el.css({height: el.outerHeight() + 'px'});\n var clientLeft = el[0].clientLeft;\n el.css({height: 0 + 'px'}).addClass('deleting transitioning').transitionEnd(function () {\n el.trigger('deleted swipeout:deleted');\n if (callback) callback.call(el[0]);\n if (el.parents('.virtual-list').length > 0) {\n var virtualList = el.parents('.virtual-list')[0].f7VirtualList;\n var virtualIndex = el[0].f7VirtualListIndex;\n if (virtualList && typeof virtualIndex !== 'undefined') virtualList.deleteItem(virtualIndex);\n }\n else {\n if (app.params.swipeoutRemoveWithTimeout) {\n setTimeout(function () {\n el.remove();\n }, 0);\n }\n else el.remove();\n }\n });\n var translate = '-100%';\n el.find('.swipeout-content').transform('translate3d(' + translate + ',0,0)');\n };\n \n"," /*===============================================================================\n ************ Sortable ************\n ===============================================================================*/\n app.sortableToggle = function (sortableContainer) {\n sortableContainer = $(sortableContainer);\n if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable');\n sortableContainer.toggleClass('sortable-opened');\n if (sortableContainer.hasClass('sortable-opened')) {\n sortableContainer.trigger('open sortable:open');\n }\n else {\n sortableContainer.trigger('close sortable:close');\n }\n return sortableContainer;\n };\n app.sortableOpen = function (sortableContainer) {\n sortableContainer = $(sortableContainer);\n if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable');\n sortableContainer.addClass('sortable-opened');\n sortableContainer.trigger('open sortable:open');\n return sortableContainer;\n };\n app.sortableClose = function (sortableContainer) {\n sortableContainer = $(sortableContainer);\n if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable');\n sortableContainer.removeClass('sortable-opened');\n sortableContainer.trigger('close sortable:close');\n return sortableContainer;\n };\n app.initSortable = function () {\n var isTouched, isMoved, touchStartY, touchesDiff, sortingEl, sortingElHeight, sortingItems, minTop, maxTop, insertAfter, insertBefore, sortableContainer, startIndex;\n \n function handleTouchStart(e) {\n isMoved = false;\n isTouched = true;\n touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n /*jshint validthis:true */\n sortingEl = $(this).parent();\n startIndex = sortingEl.index();\n sortingItems = sortingEl.parent().children('li');\n sortableContainer = sortingEl.parents('.sortable');\n e.preventDefault();\n app.allowPanelOpen = app.allowSwipeout = false;\n }\n function handleTouchMove(e) {\n if (!isTouched || !sortingEl) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (!isMoved) {\n sortingEl.addClass('sorting');\n sortableContainer.addClass('sortable-sorting');\n minTop = sortingEl[0].offsetTop;\n maxTop = sortingEl.parent().height() - sortingEl[0].offsetTop - sortingEl.height();\n sortingElHeight = sortingEl[0].offsetHeight;\n }\n isMoved = true;\n \n e.preventDefault();\n e.f7PreventPanelSwipe = true;\n touchesDiff = pageY - touchStartY;\n var translate = touchesDiff;\n if (translate < -minTop) translate = -minTop;\n if (translate > maxTop) translate = maxTop;\n sortingEl.transform('translate3d(0,' + translate + 'px,0)');\n \n insertBefore = insertAfter = undefined;\n \n sortingItems.each(function () {\n var currentEl = $(this);\n if (currentEl[0] === sortingEl[0]) return;\n var currentElOffset = currentEl[0].offsetTop;\n var currentElHeight = currentEl.height();\n var sortingElOffset = sortingEl[0].offsetTop + translate;\n \n if ((sortingElOffset >= currentElOffset - currentElHeight / 2) && sortingEl.index() < currentEl.index()) {\n currentEl.transform('translate3d(0, '+(-sortingElHeight)+'px,0)');\n insertAfter = currentEl;\n insertBefore = undefined;\n }\n else if ((sortingElOffset <= currentElOffset + currentElHeight / 2) && sortingEl.index() > currentEl.index()) {\n currentEl.transform('translate3d(0, '+(sortingElHeight)+'px,0)');\n insertAfter = undefined;\n if (!insertBefore) insertBefore = currentEl;\n }\n else {\n $(this).transform('translate3d(0, 0%,0)');\n }\n });\n }\n function handleTouchEnd(e) {\n app.allowPanelOpen = app.allowSwipeout = true;\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n e.preventDefault();\n sortingItems.transform('');\n sortingEl.removeClass('sorting');\n sortableContainer.removeClass('sortable-sorting');\n var virtualList, oldIndex, newIndex;\n if (insertAfter) {\n sortingEl.insertAfter(insertAfter);\n sortingEl.trigger('sort sortable:sort', {startIndex: startIndex, newIndex: sortingEl.index()});\n }\n if (insertBefore) {\n sortingEl.insertBefore(insertBefore);\n sortingEl.trigger('sort sortable:sort', {startIndex: startIndex, newIndex: sortingEl.index()});\n }\n if ((insertAfter || insertBefore) && sortableContainer.hasClass('virtual-list')) {\n virtualList = sortableContainer[0].f7VirtualList;\n oldIndex = sortingEl[0].f7VirtualListIndex;\n newIndex = insertBefore ? insertBefore[0].f7VirtualListIndex : insertAfter[0].f7VirtualListIndex;\n if (virtualList) virtualList.moveItem(oldIndex, newIndex);\n }\n insertAfter = insertBefore = undefined;\n isTouched = false;\n isMoved = false;\n }\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n $(document).on(app.touchEvents.start, '.list-block.sortable .sortable-handler', handleTouchStart, activeListener);\n if (app.support.touch) {\n $(document).on(app.touchEvents.move, '.list-block.sortable .sortable-handler', handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, '.list-block.sortable .sortable-handler', handleTouchEnd, activeListener);\n }\n else {\n $(document).on(app.touchEvents.move, handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, handleTouchEnd, activeListener);\n }\n };\n \n"," /*===============================================================================\n ************ Smart Select ************\n ===============================================================================*/\n app.initSmartSelects = function (pageContainer) {\n pageContainer = $(pageContainer);\n var selects;\n if (pageContainer.is('.smart-select')) {\n selects = pageContainer;\n }\n else {\n selects = pageContainer.find('.smart-select');\n }\n if (selects.length === 0) return;\n \n selects.each(function () {\n var smartSelect = $(this);\n \n var $select = smartSelect.find('select');\n if ($select.length === 0) return;\n \n var select = $select[0];\n if (select.length === 0) return;\n \n var valueText = [];\n var displayAs;\n for (var i = 0; i < select.length; i++) {\n if (select[i].selected) {\n displayAs = select[i].dataset ? select[i].dataset.displayAs : $(select[i]).data('display-as');\n if (displayAs && typeof displayAs !== 'undefined') {\n \t\t\t\t\tvalueText.push(displayAs);\n \t\t\t\t} else {\n \t\t\t\t\tvalueText.push(select[i].textContent.trim());\n \t\t\t\t}\n \t\t\t}\n }\n \n var itemAfter = smartSelect.find('.item-after');\n if (itemAfter.length === 0) {\n smartSelect.find('.item-inner').append('
                  ' + valueText.join(', ') + '
                  ');\n }\n else {\n var selectedText = itemAfter.text();\n if (itemAfter.hasClass('smart-select-value')) {\n for (i = 0; i < select.length; i++) {\n select[i].selected = select[i].textContent.trim() === selectedText.trim();\n }\n } else {\n itemAfter.text(valueText.join(', '));\n }\n }\n \n $select.on('change', function () {\n var valueText = [];\n for (var i = 0; i < select.length; i++) {\n if (select[i].selected) {\n var displayAs = select[i].dataset ? select[i].dataset.displayAs : $(select[i]).data('display-as');\n \tif (displayAs && typeof displayAs !== 'undefined') {\n \t\t\t\t\t\tvalueText.push(displayAs);\n \t\t\t\t\t} else {\n \t\t\t\t\t\tvalueText.push(select[i].textContent.trim());\n \t\t\t\t\t}\n \t\t\t\t}\n }\n smartSelect.find('.item-after').text(valueText.join(', '));\n });\n \n });\n \n };\n app.smartSelectAddOption = function (select, option, index) {\n select = $(select);\n var smartSelect = select.parents('.smart-select');\n if (typeof index === 'undefined') {\n select.append(option);\n }\n else {\n $(option).insertBefore(select.find('option').eq(index));\n }\n app.initSmartSelects(smartSelect);\n var selectName = smartSelect.find('select').attr('name');\n var opened = $('.page.smart-select-page[data-select-name=\"' + selectName + '\"]').length > 0;\n if (opened) {\n app.smartSelectOpen(smartSelect, true);\n }\n };\n app.smartSelectOpen = function (smartSelect, reLayout) {\n smartSelect = $(smartSelect);\n if (smartSelect.length === 0) return;\n \n // Find related view\n var view = smartSelect.parents('.' + app.params.viewClass);\n if (view.length === 0) return;\n view = view[0].f7View;\n \n // Parameters\n var openIn = smartSelect.attr('data-open-in') || app.params.smartSelectOpenIn;\n if (openIn === 'popup') {\n if ($('.popup.smart-select-popup').length > 0) return;\n }\n else if (openIn === 'picker') {\n if ($('.picker-modal.modal-in').length > 0 && !reLayout){\n if (smartSelect[0].f7SmartSelectPicker !== $('.picker-modal.modal-in:not(.modal-out)')[0]) app.closeModal($('.picker-modal.modal-in:not(.modal-out)'));\n else return;\n }\n }\n else {\n if (!view) return;\n }\n \n var smartSelectData = smartSelect.dataset();\n var pageTitle = smartSelectData.pageTitle || smartSelect.find('.item-title').text();\n var backText = smartSelectData.backText || app.params.smartSelectBackText;\n var closeText;\n if (openIn === 'picker') {\n closeText = smartSelectData.pickerCloseText || smartSelectData.backText || app.params.smartSelectPickerCloseText ;\n }\n else {\n closeText = smartSelectData.popupCloseText || smartSelectData.backText || app.params.smartSelectPopupCloseText ;\n }\n var backOnSelect = smartSelectData.backOnSelect !== undefined ? smartSelectData.backOnSelect : app.params.smartSelectBackOnSelect;\n var formTheme = smartSelectData.formTheme || app.params.smartSelectFormTheme;\n var navbarTheme = smartSelectData.navbarTheme || app.params.smartSelectNavbarTheme;\n var toolbarTheme = smartSelectData.toolbarTheme || app.params.smartSelectToolbarTheme;\n var virtualList = smartSelectData.virtualList;\n var virtualListHeight = smartSelectData.virtualListHeight;\n var material = app.params.material;\n var pickerHeight = smartSelectData.pickerHeight || app.params.smartSelectPickerHeight;\n \n // Collect all options/values\n var select = smartSelect.find('select')[0];\n var $select = $(select);\n var $selectData = $select.dataset();\n if (select.disabled || smartSelect.hasClass('disabled') || $select.hasClass('disabled')) {\n return;\n }\n var values = [];\n var id = (new Date()).getTime();\n var inputType = select.multiple ? 'checkbox' : 'radio';\n var inputName = inputType + '-' + id;\n var maxLength = $select.attr('maxlength');\n var selectName = select.name;\n var option, optionHasMedia, optionImage, optionIcon, optionGroup, optionGroupLabel, optionPreviousGroup, optionIsLabel, previousGroup, optionColor, optionClassName, optionData;\n for (var i = 0; i < select.length; i++) {\n option = $(select[i]);\n optionData = option.dataset();\n optionImage = optionData.optionImage || $selectData.optionImage || smartSelectData.optionImage;\n optionIcon = optionData.optionIcon || $selectData.optionIcon || smartSelectData.optionIcon;\n optionHasMedia = optionImage || optionIcon || inputType === 'checkbox';\n if (material) optionHasMedia = optionImage || optionIcon;\n optionColor = optionData.optionColor;\n optionClassName = optionData.optionClass;\n if (option[0].disabled) optionClassName += ' disabled';\n optionGroup = option.parent('optgroup')[0];\n optionGroupLabel = optionGroup && optionGroup.label;\n optionIsLabel = false;\n if (optionGroup) {\n if (optionGroup !== previousGroup) {\n optionIsLabel = true;\n previousGroup = optionGroup;\n values.push({\n groupLabel: optionGroupLabel,\n isLabel: optionIsLabel\n });\n }\n }\n values.push({\n value: option[0].value,\n text: option[0].textContent.trim(),\n selected: option[0].selected,\n group: optionGroup,\n groupLabel: optionGroupLabel,\n image: optionImage,\n icon: optionIcon,\n color: optionColor,\n className: optionClassName,\n disabled: option[0].disabled,\n inputType: inputType,\n id: id,\n hasMedia: optionHasMedia,\n checkbox: inputType === 'checkbox',\n inputName: inputName,\n material: app.params.material\n });\n }\n \n \n // Item template/HTML\n if (!app._compiledTemplates.smartSelectItem) {\n app._compiledTemplates.smartSelectItem = t7.compile(app.params.smartSelectItemTemplate ||\n '{{#if isLabel}}' +\n '
                • {{groupLabel}}
                • ' +\n '{{else}}' +\n '' +\n '' +\n '' +\n '{{/if}}'\n );\n }\n var smartSelectItemTemplate = app._compiledTemplates.smartSelectItem;\n \n var inputsHTML = '';\n if (!virtualList) {\n for (var j = 0; j < values.length; j++) {\n inputsHTML += smartSelectItemTemplate(values[j]);\n }\n }\n \n // Toolbar / Navbar\n var toolbarHTML = '', navbarHTML;\n var noNavbar = '', noToolbar = '', noTabbar = '', navbarLayout;\n \n if (openIn === 'picker') {\n if (!app._compiledTemplates.smartSelectToolbar) {\n app._compiledTemplates.smartSelectToolbar = t7.compile(app.params.smartSelectToolbarTemplate ||\n '
                  ' +\n '
                  ' +\n '
                  ' +\n '' +\n '
                  ' +\n '
                  '\n );\n }\n \n toolbarHTML = app._compiledTemplates.smartSelectToolbar({\n pageTitle: pageTitle,\n closeText: closeText,\n openIn: openIn,\n toolbarTheme: toolbarTheme,\n inPicker: openIn === 'picker'\n });\n }\n else {\n // Navbar HTML\n if (!app._compiledTemplates.smartSelectNavbar) {\n app._compiledTemplates.smartSelectNavbar = t7.compile(app.params.smartSelectNavbarTemplate ||\n '
                  ' +\n '
                  ' +\n '{{leftTemplate}}' +\n '
                  {{pageTitle}}
                  ' +\n '
                  ' +\n '
                  '\n );\n }\n navbarHTML = app._compiledTemplates.smartSelectNavbar({\n pageTitle: pageTitle,\n backText: backText,\n closeText: closeText,\n openIn: openIn,\n navbarTheme: navbarTheme,\n inPopup: openIn === 'popup',\n inPage: openIn === 'page',\n leftTemplate: openIn === 'popup' ?\n (app.params.smartSelectPopupCloseTemplate || (material ? '
                  ' : '')).replace(/{{closeText}}/g, closeText) :\n (app.params.smartSelectBackTemplate || (material ? '
                  ' : '')).replace(/{{backText}}/g, backText)\n });\n // Determine navbar layout type - static/fixed/through\n if (openIn === 'page') {\n navbarLayout = 'static';\n if (smartSelect.parents('.navbar-through').length > 0) navbarLayout = 'through';\n if (smartSelect.parents('.navbar-fixed').length > 0) navbarLayout = 'fixed';\n noToolbar = smartSelect.parents('.page').hasClass('no-toolbar') ? 'no-toolbar' : '';\n noNavbar = smartSelect.parents('.page').hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout;\n noTabbar = smartSelect.parents('.page').hasClass('no-tabbar') ? 'no-tabbar' : '';\n }\n else {\n navbarLayout = 'fixed';\n }\n }\n \n \n // Page Layout\n var pageName = 'smart-select-' + inputName;\n \n var useSearchbar = typeof smartSelect.data('searchbar') === 'undefined' ? app.params.smartSelectSearchbar : (smartSelect.data('searchbar') === 'true' ? true : false);\n var searchbarPlaceholder, searchbarCancel;\n \n if (useSearchbar) {\n searchbarPlaceholder = smartSelect.data('searchbar-placeholder') || 'Search';\n searchbarCancel = smartSelect.data('searchbar-cancel') || 'Cancel';\n }\n \n var searchbarHTML = '
                  ' +\n '
                  ' +\n '' +\n '' +\n '
                  ' +\n (material ? '' : '' + searchbarCancel + '') +\n '
                  ' +\n '
                  ';\n \n var pageHTML =\n (openIn !== 'picker' && navbarLayout === 'through' ? navbarHTML : '') +\n '
                  ' +\n '
                  ' +\n (openIn !== 'picker' && navbarLayout === 'fixed' ? navbarHTML : '') +\n (useSearchbar ? searchbarHTML : '') +\n '
                  ' +\n (openIn !== 'picker' && navbarLayout === 'static' ? navbarHTML : '') +\n '
                  ' +\n '
                    ' +\n (virtualList ? '' : inputsHTML) +\n '
                  ' +\n '
                  ' +\n '
                  ' +\n '
                  ' +\n '
                  ';\n \n // Define popup and picker\n var popup, picker;\n \n // Scroll SS Picker To Input\n function scrollToInput() {\n var pageContent = smartSelect.parents('.page-content');\n if (pageContent.length === 0) return;\n var paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-bottom'), 10),\n pageHeight = pageContent[0].offsetHeight - paddingTop - picker.height(),\n pageScrollHeight = pageContent[0].scrollHeight - paddingTop - picker.height(),\n newPaddingBottom;\n var inputTop = smartSelect.offset().top - paddingTop + smartSelect[0].offsetHeight;\n if (inputTop > pageHeight) {\n var scrollTop = pageContent.scrollTop() + inputTop - pageHeight;\n if (scrollTop + pageHeight > pageScrollHeight) {\n newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom;\n if (pageHeight === pageScrollHeight) {\n newPaddingBottom = picker.height();\n }\n pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'});\n }\n pageContent.scrollTop(scrollTop, 300);\n }\n }\n // Close SS Picker on HTML Click\n function closeOnHTMLClick(e) {\n var close = true;\n if (e.target === smartSelect[0] || $(e.target).parents(smartSelect[0]).length > 0) {\n close = false;\n }\n if ($(e.target).parents('.picker-modal').length > 0) {\n close = false;\n }\n if (close) {\n app.closeModal('.smart-select-picker.modal-in');\n }\n }\n \n // Check max length\n function checkMaxLength(container) {\n if (select.selectedOptions.length >= maxLength) {\n container.find('input[type=\"checkbox\"]').each(function () {\n if (!this.checked) {\n $(this).parents('li').addClass('disabled');\n }\n else {\n $(this).parents('li').removeClass('disabled');\n }\n });\n }\n else {\n container.find('.disabled').removeClass('disabled');\n }\n }\n // Event Listeners on new page\n function handleInputs(container) {\n container = $(container);\n if (virtualList) {\n var virtualListInstance = app.virtualList(container.find('.virtual-list'), {\n items: values,\n template: smartSelectItemTemplate,\n height: virtualListHeight || undefined,\n searchByItem: function (query, index, item) {\n if (item.text && item.text.toLowerCase().indexOf(query.trim().toLowerCase()) >=0 ) return true;\n return false;\n }\n });\n container.once(openIn === 'popup' || openIn === 'picker' ? 'closed': 'pageBeforeRemove', function () {\n if (virtualListInstance && virtualListInstance.destroy) virtualListInstance.destroy();\n });\n }\n if (maxLength) {\n checkMaxLength(container);\n }\n if (backOnSelect) {\n container.find('input[type=\"radio\"][name=\"' + inputName + '\"]:checked').parents('label').once('click', function () {\n if (openIn === 'popup') app.closeModal(popup);\n else if (openIn === 'picker') app.closeModal(picker);\n else view.router.back();\n });\n }\n container.on('change', 'input[name=\"' + inputName + '\"]', function () {\n \t\t\tvar option, text;\n var input = this;\n var value = input.value;\n var optionText = [];\n var displayAs;\n if (input.type === 'checkbox') {\n var values = [];\n for (var i = 0; i < select.options.length; i++) {\n option = select.options[i];\n if (option.value === value) {\n option.selected = input.checked;\n }\n if (option.selected) {\n displayAs = option.dataset ? option.dataset.displayAs : $(option).data('display-as');\n text = displayAs && typeof displayAs !== 'undefined' ? displayAs : option.textContent;\n optionText.push(text.trim());\n }\n }\n if (maxLength) {\n checkMaxLength(container);\n }\n }\n else {\n option = smartSelect.find('option[value=\"' + value + '\"]')[0];\n displayAs = option.dataset ? option.dataset.displayAs : $(option).data('display-as');\n text = displayAs && typeof displayAs !== 'undefined' ? displayAs : option.textContent;\n optionText = [text];\n select.value = value;\n }\n \n $select.trigger('change');\n smartSelect.find('.item-after').text(optionText.join(', '));\n if (backOnSelect && inputType === 'radio') {\n if (openIn === 'popup') app.closeModal(popup);\n else if (openIn === 'picker') app.closeModal(picker);\n else view.router.back();\n }\n });\n }\n function pageInit(e) {\n var page = e.detail.page;\n if (page.name === pageName) {\n handleInputs(page.container);\n }\n }\n if (openIn === 'popup') {\n if (reLayout) {\n popup = $('.popup.smart-select-popup .view');\n popup.html(pageHTML);\n }\n else {\n popup = app.popup(\n '
                  ' +\n '
                  ' +\n pageHTML +\n '
                  ' +\n '
                  '\n );\n popup = $(popup);\n }\n app.initPage(popup.find('.page'));\n handleInputs(popup);\n }\n else if (openIn === 'picker') {\n if (reLayout) {\n picker = $('.picker-modal.smart-select-picker .view');\n picker.html(pageHTML);\n }\n else {\n picker = app.pickerModal(\n '
                  ' +\n toolbarHTML +\n '
                  ' +\n '
                  ' +\n pageHTML +\n '
                  ' +\n '
                  ' +\n '
                  '\n );\n picker = $(picker);\n \n // Scroll To Input\n scrollToInput();\n \n // Close On Click\n $('html').on('click', closeOnHTMLClick);\n \n // On Close\n picker.once('picker:close', function () {\n // Reset linked picker\n smartSelect[0].f7SmartSelectPicker = undefined;\n \n // Detach html click\n $('html').off('click', closeOnHTMLClick);\n \n // Restore page padding bottom\n smartSelect.parents('.page-content').css({paddingBottom: ''});\n });\n \n // Link Picker\n smartSelect[0].f7SmartSelectPicker = picker[0];\n }\n \n // Init Page\n app.initPage(picker.find('.page'));\n \n // Attach events\n handleInputs(picker);\n }\n else {\n $(document).once('page:init', '.smart-select-page', pageInit);\n view.router.load({\n content: pageHTML,\n reload: reLayout ? true : undefined\n });\n }\n };\n \n"," /*===============================================================================\n ************ Virtual List ************\n ===============================================================================*/\n var VirtualList = function (listBlock, params) {\n var defaults = {\n cols: 1,\n height: app.params.material ? 48 : 44,\n cache: true,\n dynamicHeightBufferSize: 1,\n showFilteredItemsOnly: false,\n renderExternal: undefined,\n template:\n '
                • ' +\n '
                  ' +\n '
                  ' +\n '
                  {{this}}
                  ' +\n '
                  ' +\n '
                  ' +\n '
                • '\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n \n // Preparation\n var vl = this;\n vl.listBlock = $(listBlock);\n vl.params = params;\n vl.items = vl.params.items;\n if (vl.params.showFilteredItemsOnly) {\n vl.filteredItems = [];\n }\n if (vl.params.template && !vl.params.renderItem) {\n if (typeof vl.params.template === 'string') vl.template = t7.compile(vl.params.template);\n else if (typeof vl.params.template === 'function') vl.template = vl.params.template;\n }\n vl.pageContent = vl.listBlock.parents('.page-content');\n \n // Bad scroll\n var updatableScroll;\n if (typeof vl.params.updatableScroll !== 'undefined') {\n updatableScroll = vl.params.updatableScroll;\n }\n else {\n updatableScroll = true;\n if (app.device.ios && app.device.osVersion.split('.')[0] < 8) {\n updatableScroll = false;\n }\n vl.params.updatableScroll = updatableScroll;\n }\n \n // Append
                    \n vl.ul = vl.params.ul ? $(vl.params.ul) : vl.listBlock.children('ul');\n if (vl.ul.length === 0) {\n vl.listBlock.append('
                      ');\n vl.ul = vl.listBlock.children('ul');\n }\n \n // DOM cached items\n vl.domCache = {};\n vl.displayDomCache = {};\n \n // Temporary DOM Element\n vl.tempDomElement = document.createElement('ul');\n \n // Last repain position\n vl.lastRepaintY = null;\n \n // Fragment\n vl.fragment = document.createDocumentFragment();\n \n // Filter\n vl.filterItems = function (indexes, resetScrollTop) {\n vl.filteredItems = [];\n var firstIndex = indexes[0];\n var lastIndex = indexes[indexes.length - 1];\n for (var i = 0; i < indexes.length; i++) {\n vl.filteredItems.push(vl.items[indexes[i]]);\n }\n if (typeof resetScrollTop === 'undefined') resetScrollTop = true;\n if (resetScrollTop) {\n vl.pageContent[0].scrollTop = 0;\n }\n vl.update();\n };\n vl.resetFilter = function () {\n if (vl.params.showFilteredItemsOnly) {\n vl.filteredItems = [];\n }\n else {\n vl.filteredItems = null;\n delete vl.filteredItems;\n }\n vl.update();\n };\n \n var pageHeight, rowsPerScreen, rowsBefore, rowsAfter, rowsToRender, maxBufferHeight = 0, listHeight;\n var dynamicHeight = typeof vl.params.height === 'function';\n \n // Set list size\n vl.setListSize = function () {\n var items = vl.filteredItems || vl.items;\n pageHeight = vl.pageContent[0].offsetHeight;\n if (dynamicHeight) {\n listHeight = 0;\n vl.heights = [];\n for (var i = 0; i < items.length; i++) {\n var itemHeight = vl.params.height(items[i]);\n listHeight += itemHeight;\n vl.heights.push(itemHeight);\n }\n }\n else {\n listHeight = Math.ceil(items.length / vl.params.cols) * vl.params.height;\n rowsPerScreen = Math.ceil(pageHeight / vl.params.height);\n rowsBefore = vl.params.rowsBefore || rowsPerScreen * 2;\n rowsAfter = vl.params.rowsAfter || rowsPerScreen;\n rowsToRender = (rowsPerScreen + rowsBefore + rowsAfter);\n maxBufferHeight = rowsBefore / 2 * vl.params.height;\n }\n \n if (updatableScroll) {\n vl.ul.css({height: listHeight + 'px'});\n }\n };\n \n // Render items\n vl.render = function (force, forceScrollTop) {\n if (force) vl.lastRepaintY = null;\n \n var scrollTop = -(vl.listBlock[0].getBoundingClientRect().top - vl.pageContent[0].getBoundingClientRect().top);\n \n if (typeof forceScrollTop !== 'undefined') scrollTop = forceScrollTop;\n \n if (vl.lastRepaintY === null || Math.abs(scrollTop - vl.lastRepaintY) > maxBufferHeight || (!updatableScroll && (vl.pageContent[0].scrollTop + pageHeight >= vl.pageContent[0].scrollHeight))) {\n vl.lastRepaintY = scrollTop;\n }\n else {\n return;\n }\n \n var items = vl.filteredItems || vl.items,\n fromIndex, toIndex, heightBeforeFirstItem = 0, heightBeforeLastItem = 0;\n if (dynamicHeight) {\n var itemTop = 0, j, itemHeight;\n maxBufferHeight = pageHeight;\n \n for (j = 0; j < vl.heights.length; j++) {\n itemHeight = vl.heights[j];\n if (typeof fromIndex === 'undefined') {\n if (itemTop + itemHeight >= scrollTop - pageHeight * 2 * vl.params.dynamicHeightBufferSize) fromIndex = j;\n else heightBeforeFirstItem += itemHeight;\n }\n \n if (typeof toIndex === 'undefined') {\n if (itemTop + itemHeight >= scrollTop + pageHeight * 2 * vl.params.dynamicHeightBufferSize || j === vl.heights.length - 1) toIndex = j + 1;\n heightBeforeLastItem += itemHeight;\n }\n itemTop += itemHeight;\n }\n toIndex = Math.min(toIndex, items.length);\n }\n else {\n fromIndex = (parseInt(scrollTop / vl.params.height) - rowsBefore) * vl.params.cols;\n if (fromIndex < 0) {\n fromIndex = 0;\n }\n toIndex = Math.min(fromIndex + rowsToRender * vl.params.cols, items.length);\n }\n \n var topPosition, renderExternalItems = [];\n vl.reachEnd = false;\n for (var i = fromIndex; i < toIndex; i++) {\n var item, index;\n // Define real item index\n index = vl.items.indexOf(items[i]);\n \n if (i === fromIndex) vl.currentFromIndex = index;\n if (i === toIndex - 1) vl.currentToIndex = index;\n if (vl.filteredItems) {\n if (vl.items[index] === vl.filteredItems[vl.filteredItems.length - 1]) vl.reachEnd = true;\n }\n else {\n if (index === vl.items.length - 1) vl.reachEnd = true;\n }\n \n // Find items\n if (vl.params.renderExternal) {\n renderExternalItems.push(items[i])\n }\n else {\n if (vl.domCache[index]) {\n item = vl.domCache[index];\n item.f7VirtualListIndex = index;\n }\n else {\n if (vl.template && !vl.params.renderItem) {\n vl.tempDomElement.innerHTML = vl.template(items[i], {index: index}).trim();\n }\n else if (vl.params.renderItem) {\n vl.tempDomElement.innerHTML = vl.params.renderItem(index, items[i]).trim();\n }\n else {\n vl.tempDomElement.innerHTML = items[i].toString().trim();\n }\n item = vl.tempDomElement.childNodes[0];\n if (vl.params.cache) vl.domCache[index] = item;\n item.f7VirtualListIndex = index;\n }\n }\n \n // Set item top position\n if (i === fromIndex) {\n if (dynamicHeight) {\n topPosition = heightBeforeFirstItem;\n }\n else {\n topPosition = (i * vl.params.height / vl.params.cols);\n }\n }\n if (!vl.params.renderExternal) {\n item.style.top = topPosition + 'px';\n \n // Before item insert\n if (vl.params.onItemBeforeInsert) vl.params.onItemBeforeInsert(vl, item);\n \n // Append item to fragment\n vl.fragment.appendChild(item);\n }\n }\n \n // Update list height with not updatable scroll\n if (!updatableScroll) {\n if (dynamicHeight) {\n vl.ul[0].style.height = heightBeforeLastItem + 'px';\n }\n else {\n vl.ul[0].style.height = i * vl.params.height / vl.params.cols + 'px';\n }\n }\n \n // Update list html\n if (vl.params.renderExternal) {\n if (items && items.length === 0) {\n vl.reachEnd = true;\n }\n }\n else {\n if (vl.params.onBeforeClear) vl.params.onBeforeClear(vl, vl.fragment);\n vl.ul[0].innerHTML = '';\n \n if (vl.params.onItemsBeforeInsert) vl.params.onItemsBeforeInsert(vl, vl.fragment);\n if (items && items.length === 0) {\n vl.reachEnd = true;\n if (vl.params.emptyTemplate) vl.ul[0].innerHTML = vl.params.emptyTemplate;\n }\n else {\n vl.ul[0].appendChild(vl.fragment);\n }\n \n if (vl.params.onItemsAfterInsert) vl.params.onItemsAfterInsert(vl, vl.fragment);\n }\n \n if (typeof forceScrollTop !== 'undefined' && force) {\n vl.pageContent.scrollTop(forceScrollTop, 0);\n }\n if (vl.params.renderExternal) {\n vl.params.renderExternal(vl, {\n fromIndex: fromIndex,\n toIndex: toIndex,\n listHeight: listHeight,\n topPosition: topPosition,\n items: renderExternalItems\n });\n }\n };\n \n vl.scrollToItem = function (index) {\n if (index > vl.items.length) return false;\n \n var itemTop = 0, listTop;\n if (dynamicHeight) {\n for (var i = 0; i < index; i++) {\n itemTop += vl.heights[i];\n }\n }\n else {\n itemTop = index * vl.params.height;\n }\n listTop = vl.listBlock[0].offsetTop;\n vl.render(true, listTop + itemTop - parseInt(vl.pageContent.css('padding-top'), 10));\n return true;\n };\n \n // Handle scroll event\n vl.handleScroll = function (e) {\n vl.render();\n };\n // Handle resize event\n vl._isVisible = function (el) {\n return !!( el.offsetWidth || el.offsetHeight || el.getClientRects().length );\n };\n vl.handleResize = function (e) {\n if (vl._isVisible(vl.listBlock[0])) {\n vl.setListSize();\n vl.render(true);\n }\n };\n \n vl.attachEvents = function (detach) {\n var action = detach ? 'off' : 'on';\n vl.pageContent[action]('scroll', vl.handleScroll);\n vl.listBlock.parents('.tab').eq(0)[action]('tab:show', vl.handleResize);\n vl.listBlock.parents('.panel').eq(0)[action]('panel:open', vl.handleResize);\n vl.listBlock.parents('.popup').eq(0)[action]('popup:open', vl.handleResize);\n app[action === 'on' ? 'onResize' : 'offResize'](vl.handleResize);\n };\n \n // Init Virtual List\n vl.init = function () {\n vl.attachEvents();\n vl.setListSize();\n vl.render();\n };\n \n // Append\n vl.appendItems = function (items) {\n for (var i = 0; i < items.length; i++) {\n vl.items.push(items[i]);\n }\n vl.update();\n };\n vl.appendItem = function (item) {\n vl.appendItems([item]);\n };\n // Replace\n vl.replaceAllItems = function (items) {\n vl.items = items;\n delete vl.filteredItems;\n vl.domCache = {};\n vl.update();\n };\n vl.replaceItem = function (index, item) {\n vl.items[index] = item;\n if (vl.params.cache) delete vl.domCache[index];\n vl.update();\n };\n // Prepend\n vl.prependItems = function (items) {\n for (var i = items.length - 1; i >= 0; i--) {\n vl.items.unshift(items[i]);\n }\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n newCache[parseInt(cached, 10) + items.length] = vl.domCache[cached];\n }\n vl.domCache = newCache;\n }\n vl.update();\n };\n vl.prependItem = function (item) {\n vl.prependItems([item]);\n };\n \n // Move\n vl.moveItem = function (oldIndex, newIndex) {\n if (oldIndex === newIndex) return;\n // remove item from array\n var item = vl.items.splice(oldIndex, 1)[0];\n if (newIndex >= vl.items.length) {\n // Add item to the end\n vl.items.push(item);\n newIndex = vl.items.length - 1;\n }\n else {\n // Add item to new index\n vl.items.splice(newIndex, 0, item);\n }\n // Update cache\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n var cachedIndex = parseInt(cached, 10);\n var leftIndex = oldIndex < newIndex ? oldIndex : newIndex;\n var rightIndex = oldIndex < newIndex ? newIndex : oldIndex;\n var indexShift = oldIndex < newIndex ? -1 : 1;\n if (cachedIndex < leftIndex || cachedIndex > rightIndex) newCache[cachedIndex] = vl.domCache[cachedIndex];\n if (cachedIndex === leftIndex) newCache[rightIndex] = vl.domCache[cachedIndex];\n if (cachedIndex > leftIndex && cachedIndex <= rightIndex) newCache[cachedIndex + indexShift] = vl.domCache[cachedIndex];\n }\n vl.domCache = newCache;\n }\n vl.update();\n };\n // Insert before\n vl.insertItemBefore = function (index, item) {\n if (index === 0) {\n vl.prependItem(item);\n return;\n }\n if (index >= vl.items.length) {\n vl.appendItem(item);\n return;\n }\n vl.items.splice(index, 0, item);\n // Update cache\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n var cachedIndex = parseInt(cached, 10);\n if (cachedIndex >= index) {\n newCache[cachedIndex + 1] = vl.domCache[cachedIndex];\n }\n }\n vl.domCache = newCache;\n }\n vl.update();\n };\n // Delete\n vl.deleteItems = function (indexes) {\n var prevIndex, indexShift = 0;\n for (var i = 0; i < indexes.length; i++) {\n var index = indexes[i];\n if (typeof prevIndex !== 'undefined') {\n if (index > prevIndex) {\n indexShift = -i;\n }\n }\n index = index + indexShift;\n prevIndex = indexes[i];\n // Delete item\n var deletedItem = vl.items.splice(index, 1)[0];\n \n // Delete from filtered\n if (vl.filteredItems && vl.filteredItems.indexOf(deletedItem) >= 0) {\n vl.filteredItems.splice(vl.filteredItems.indexOf(deletedItem), 1);\n }\n // Update cache\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n var cachedIndex = parseInt(cached, 10);\n if (cachedIndex === index) {\n delete vl.domCache[index];\n }\n else if (parseInt(cached, 10) > index) {\n newCache[cachedIndex - 1] = vl.domCache[cached];\n }\n else {\n newCache[cachedIndex] = vl.domCache[cached];\n }\n }\n vl.domCache = newCache;\n }\n }\n vl.update();\n };\n vl.deleteAllItems = function () {\n vl.items = [];\n delete vl.filteredItems;\n if (vl.params.cache) vl.domCache = {};\n vl.update();\n };\n vl.deleteItem = function (index) {\n vl.deleteItems([index]);\n };\n \n // Clear cache\n vl.clearCache = function () {\n vl.domCache = {};\n };\n \n // Update Virtual List\n vl.update = function () {\n vl.setListSize();\n vl.render(true);\n };\n \n // Destroy\n vl.destroy = function () {\n vl.attachEvents(true);\n delete vl.items;\n delete vl.domCache;\n };\n \n // Init Virtual List\n vl.init();\n \n // Store vl in container\n vl.listBlock[0].f7VirtualList = vl;\n return vl;\n };\n \n // App Method\n app.virtualList = function (listBlock, params) {\n return new VirtualList(listBlock, params);\n };\n \n app.reinitVirtualList = function (pageContainer) {\n var page = $(pageContainer);\n var vlists = page.find('.virtual-list');\n if (vlists.length === 0) return;\n for (var i = 0; i < vlists.length; i++) {\n var vlistInstance = vlists[i].f7VirtualList;\n if (vlistInstance) {\n vlistInstance.update();\n }\n }\n };\n \n"," /*======================================================\n ************ Pull To Refresh ************\n ======================================================*/\n app.initPullToRefresh = function (pageContainer) {\n var eventsTarget = $(pageContainer);\n if (!eventsTarget.hasClass('pull-to-refresh-content')) {\n eventsTarget = eventsTarget.find('.pull-to-refresh-content');\n }\n if (!eventsTarget || eventsTarget.length === 0) return;\n \n var touchId, isTouched, isMoved, touchesStart = {}, isScrolling, touchesDiff, touchStartTime, container, refresh = false, useTranslate = false, startTranslate = 0, translate, scrollTop, wasScrolled, layer, triggerDistance, dynamicTriggerDistance, pullStarted;\n var page = eventsTarget.hasClass('page') ? eventsTarget : eventsTarget.parents('.page');\n var hasNavbar = false;\n if (page.find('.navbar').length > 0 || page.parents('.navbar-fixed, .navbar-through').length > 0 || page.hasClass('navbar-fixed') || page.hasClass('navbar-through')) hasNavbar = true;\n if (page.hasClass('no-navbar')) hasNavbar = false;\n if (!hasNavbar) eventsTarget.addClass('pull-to-refresh-no-navbar');\n \n container = eventsTarget;\n \n // Define trigger distance\n if (container.attr('data-ptr-distance')) {\n dynamicTriggerDistance = true;\n }\n else {\n triggerDistance = 44;\n }\n \n function handleTouchStart(e) {\n if (isTouched) {\n if (app.device.os === 'android') {\n if ('targetTouches' in e && e.targetTouches.length > 1) return;\n }\n else return;\n }\n \n /*jshint validthis:true */\n container = $(this);\n if (container.hasClass('refreshing')) {\n return;\n }\n \n isMoved = false;\n pullStarted = false;\n isTouched = true;\n isScrolling = undefined;\n wasScrolled = undefined;\n if (e.type === 'touchstart') touchId = e.targetTouches[0].identifier;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n \n }\n \n function handleTouchMove(e) {\n if (!isTouched) return;\n var pageX, pageY, touch;\n if (e.type === 'touchmove') {\n if (touchId && e.touches) {\n for (var i = 0; i < e.touches.length; i++) {\n if (e.touches[i].identifier === touchId) {\n touch = e.touches[i];\n }\n }\n }\n if (!touch) touch = e.targetTouches[0];\n pageX = touch.pageX;\n pageY = touch.pageY;\n }\n else {\n pageX = e.pageX;\n pageY = e.pageY;\n }\n if (!pageX || !pageY) return;\n \n \n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (!isScrolling) {\n isTouched = false;\n return;\n }\n \n scrollTop = container[0].scrollTop;\n if (typeof wasScrolled === 'undefined' && scrollTop !== 0) wasScrolled = true;\n \n if (!isMoved) {\n /*jshint validthis:true */\n container.removeClass('transitioning');\n if (scrollTop > container[0].offsetHeight) {\n isTouched = false;\n return;\n }\n if (dynamicTriggerDistance) {\n triggerDistance = container.attr('data-ptr-distance');\n if (triggerDistance.indexOf('%') >= 0) triggerDistance = container[0].offsetHeight * parseInt(triggerDistance, 10) / 100;\n }\n startTranslate = container.hasClass('refreshing') ? triggerDistance : 0;\n if (container[0].scrollHeight === container[0].offsetHeight || app.device.os !== 'ios') {\n useTranslate = true;\n }\n else {\n useTranslate = false;\n }\n }\n isMoved = true;\n touchesDiff = pageY - touchesStart.y;\n \n if (touchesDiff > 0 && scrollTop <= 0 || scrollTop < 0) {\n // iOS 8 fix\n if (app.device.os === 'ios' && parseInt(app.device.osVersion.split('.')[0], 10) > 7 && scrollTop === 0 && !wasScrolled) useTranslate = true;\n \n if (useTranslate) {\n e.preventDefault();\n translate = (Math.pow(touchesDiff, 0.85) + startTranslate);\n container.transform('translate3d(0,' + translate + 'px,0)');\n }\n if ((useTranslate && Math.pow(touchesDiff, 0.85) > triggerDistance) || (!useTranslate && touchesDiff >= triggerDistance * 2)) {\n refresh = true;\n container.addClass('pull-up').removeClass('pull-down');\n }\n else {\n refresh = false;\n container.removeClass('pull-up').addClass('pull-down');\n }\n if (!pullStarted) {\n container.trigger('pullstart ptr:pullstart');\n pullStarted = true;\n }\n container.trigger('pullmove ptr:pullmove', {\n event: e,\n scrollTop: scrollTop,\n translate: translate,\n touchesDiff: touchesDiff\n });\n }\n else {\n pullStarted = false;\n container.removeClass('pull-up pull-down');\n refresh = false;\n return;\n }\n }\n function handleTouchEnd(e) {\n if (e.type === 'touchend' && e.changedTouches && e.changedTouches.length > 0 && touchId) {\n if (e.changedTouches[0].identifier !== touchId) return;\n }\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n if (translate) {\n container.addClass('transitioning');\n translate = 0;\n }\n container.transform('');\n if (refresh) {\n container.addClass('refreshing');\n container.trigger('refresh ptr:refresh', {\n done: function () {\n app.pullToRefreshDone(container);\n }\n });\n }\n else {\n container.removeClass('pull-down');\n }\n isTouched = false;\n isMoved = false;\n if (pullStarted) container.trigger('pullend ptr:pullend');\n }\n \n // Attach Events\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n eventsTarget.on(app.touchEvents.start, handleTouchStart, passiveListener);\n eventsTarget.on(app.touchEvents.move, handleTouchMove, activeListener);\n eventsTarget.on(app.touchEvents.end, handleTouchEnd, passiveListener);\n \n // Detach Events on page remove\n if (page.length === 0) return;\n function destroyPullToRefresh(destroyTarget) {\n destroyTarget.off(app.touchEvents.start, handleTouchStart, passiveListener);\n destroyTarget.off(app.touchEvents.move, handleTouchMove, activeListener);\n destroyTarget.off(app.touchEvents.end, handleTouchEnd, passiveListener);\n }\n for (var i = 0; i < eventsTarget.length; i++) {\n eventsTarget[i].f7DestroyPullToRefresh = destroyPullToRefresh;\n }\n function detachEvents() {\n destroyPullToRefresh(eventsTarget);\n page.off('page:beforeremove', detachEvents);\n }\n page.on('page:beforeremove', detachEvents);\n \n };\n \n app.pullToRefreshDone = function (container) {\n container = $(container);\n if (container.length === 0) container = $('.pull-to-refresh-content.refreshing');\n container.removeClass('refreshing').addClass('transitioning');\n container.transitionEnd(function () {\n container.removeClass('transitioning pull-up pull-down');\n container.trigger('refreshdone ptr:done');\n });\n };\n app.pullToRefreshTrigger = function (container) {\n container = $(container);\n if (container.length === 0) container = $('.pull-to-refresh-content');\n if (container.hasClass('refreshing')) return;\n container.addClass('transitioning refreshing');\n container.trigger('refresh ptr:refresh', {\n done: function () {\n app.pullToRefreshDone(container);\n }\n });\n };\n \n app.destroyPullToRefresh = function (pageContainer) {\n pageContainer = $(pageContainer);\n var pullToRefreshContent = pageContainer.hasClass('pull-to-refresh-content') ? pageContainer : pageContainer.find('.pull-to-refresh-content');\n if (pullToRefreshContent.length === 0) return;\n if (pullToRefreshContent[0].f7DestroyPullToRefresh) pullToRefreshContent[0].f7DestroyPullToRefresh(pageContainer);\n };\n \n"," /* ===============================================================================\n ************ Infinite Scroll ************\n =============================================================================== */\n function handleInfiniteScroll() {\n /*jshint validthis:true */\n var inf = $(this);\n var scrollTop = inf[0].scrollTop;\n var scrollHeight = inf[0].scrollHeight;\n var height = inf[0].offsetHeight;\n var distance = inf[0].getAttribute('data-distance');\n var virtualListContainer = inf.find('.virtual-list');\n var virtualList;\n var onTop = inf.hasClass('infinite-scroll-top');\n if (!distance) distance = 50;\n if (typeof distance === 'string' && distance.indexOf('%') >= 0) {\n distance = parseInt(distance, 10) / 100 * height;\n }\n if (distance > height) distance = height;\n if (onTop) {\n if (scrollTop < distance) {\n inf.trigger('infinite');\n }\n }\n else {\n if (scrollTop + height >= scrollHeight - distance) {\n if (virtualListContainer.length > 0) {\n virtualList = virtualListContainer.eq(-1)[0].f7VirtualList;\n if (virtualList && !virtualList.reachEnd && !virtualList.params.updatableScroll) {\n return;\n }\n }\n inf.trigger('infinite');\n }\n }\n \n }\n app.attachInfiniteScroll = function (infiniteContent) {\n $(infiniteContent).on('scroll', handleInfiniteScroll);\n };\n app.detachInfiniteScroll = function (infiniteContent) {\n $(infiniteContent).off('scroll', handleInfiniteScroll);\n };\n \n app.initPageInfiniteScroll = function (pageContainer) {\n pageContainer = $(pageContainer);\n var infiniteContent = pageContainer.find('.infinite-scroll');\n if (infiniteContent.length === 0) return;\n app.attachInfiniteScroll(infiniteContent);\n function detachEvents() {\n app.detachInfiniteScroll(infiniteContent);\n pageContainer.off('page:beforeremove', detachEvents);\n }\n pageContainer.on('page:beforeremove', detachEvents);\n };\n"," /*=============================================================\n ************ Hide/show Toolbar/Navbar on scroll ************\n =============================================================*/\n app.initPageScrollToolbars = function (pageContainer) {\n pageContainer = $(pageContainer);\n var scrollContent = pageContainer.find('.page-content');\n if (scrollContent.length === 0) return;\n var hideNavbar = (app.params.hideNavbarOnPageScroll || scrollContent.hasClass('hide-navbar-on-scroll') || scrollContent.hasClass('hide-bars-on-scroll')) && !(scrollContent.hasClass('keep-navbar-on-scroll') || scrollContent.hasClass('keep-bars-on-scroll'));\n var hideToolbar = (app.params.hideToolbarOnPageScroll || scrollContent.hasClass('hide-toolbar-on-scroll') || scrollContent.hasClass('hide-bars-on-scroll')) && !(scrollContent.hasClass('keep-toolbar-on-scroll') || scrollContent.hasClass('keep-bars-on-scroll'));\n var hideTabbar = (app.params.hideTabbarOnPageScroll || scrollContent.hasClass('hide-tabbar-on-scroll')) && !(scrollContent.hasClass('keep-tabbar-on-scroll'));\n \n if (!(hideNavbar || hideToolbar || hideTabbar)) return;\n \n var viewContainer = scrollContent.parents('.' + app.params.viewClass);\n if (viewContainer.length === 0) return;\n \n var navbar = viewContainer.find('.navbar'),\n toolbar = viewContainer.find('.toolbar'),\n tabbar;\n if (hideTabbar) {\n tabbar = viewContainer.find('.tabbar');\n if (tabbar.length === 0) tabbar = viewContainer.parents('.' + app.params.viewsClass).find('.tabbar');\n }\n \n var hasNavbar = navbar.length > 0,\n hasToolbar = toolbar.length > 0,\n hasTabbar = tabbar && tabbar.length > 0;\n \n var previousScroll, currentScroll;\n previousScroll = currentScroll = scrollContent[0].scrollTop;\n \n var scrollHeight, offsetHeight, reachEnd, action, navbarHidden, toolbarHidden, tabbarHidden;\n \n var toolbarHeight = (hasToolbar && hideToolbar) ? toolbar[0].offsetHeight : 0;\n var tabbarHeight = (hasTabbar && hideTabbar) ? tabbar[0].offsetHeight : 0;\n var bottomBarHeight = tabbarHeight || toolbarHeight;\n \n function handleScroll(e) {\n if (pageContainer.hasClass('page-on-left')) return;\n currentScroll = scrollContent[0].scrollTop;\n scrollHeight = scrollContent[0].scrollHeight;\n offsetHeight = scrollContent[0].offsetHeight;\n reachEnd = currentScroll + offsetHeight >= scrollHeight - bottomBarHeight;\n navbarHidden = navbar.hasClass('navbar-hidden');\n toolbarHidden = toolbar.hasClass('toolbar-hidden');\n tabbarHidden = tabbar && tabbar.hasClass('toolbar-hidden');\n \n if (reachEnd) {\n if (app.params.showBarsOnPageScrollEnd) {\n action = 'show';\n }\n }\n else if (previousScroll > currentScroll) {\n if (app.params.showBarsOnPageScrollTop || currentScroll <= 44) {\n action = 'show';\n }\n else {\n action = 'hide';\n }\n }\n else {\n if (currentScroll > 44) {\n action = 'hide';\n }\n else {\n action = 'show';\n }\n }\n \n if (action === 'show') {\n if (hasNavbar && hideNavbar && navbarHidden) {\n app.showNavbar(navbar);\n pageContainer.removeClass('no-navbar-by-scroll');\n navbarHidden = false;\n }\n if (hasToolbar && hideToolbar && toolbarHidden) {\n app.showToolbar(toolbar);\n pageContainer.removeClass('no-toolbar-by-scroll');\n toolbarHidden = false;\n }\n if (hasTabbar && hideTabbar && tabbarHidden) {\n app.showToolbar(tabbar);\n pageContainer.removeClass('no-tabbar-by-scroll');\n tabbarHidden = false;\n }\n }\n else {\n if (hasNavbar && hideNavbar && !navbarHidden) {\n app.hideNavbar(navbar);\n pageContainer.addClass('no-navbar-by-scroll');\n navbarHidden = true;\n }\n if (hasToolbar && hideToolbar && !toolbarHidden) {\n app.hideToolbar(toolbar);\n pageContainer.addClass('no-toolbar-by-scroll');\n toolbarHidden = true;\n }\n if (hasTabbar && hideTabbar && !tabbarHidden) {\n app.hideToolbar(tabbar);\n pageContainer.addClass('no-tabbar-by-scroll');\n tabbarHidden = true;\n }\n }\n \n previousScroll = currentScroll;\n }\n scrollContent.on('scroll', handleScroll);\n scrollContent[0].f7ScrollToolbarsHandler = handleScroll;\n };\n app.destroyScrollToolbars = function (pageContainer) {\n pageContainer = $(pageContainer);\n var scrollContent = pageContainer.find('.page-content');\n if (scrollContent.length === 0) return;\n var handler = scrollContent[0].f7ScrollToolbarsHandler;\n if (!handler) return;\n scrollContent.off('scroll', scrollContent[0].f7ScrollToolbarsHandler);\n };\n \n"," /*======================================================\n ************ Material Tabbar ************\n ======================================================*/\n app.materialTabbarSetHighlight = function (tabbar, activeLink) {\n $(tabbar).each(function () {\n var tabbar = $(this);\n activeLink = activeLink || tabbar.find('.tab-link.active');\n \n if (activeLink && activeLink.length > 0) {\n var tabLinkWidth, highlightTranslate;\n if (tabbar.hasClass('tabbar-scrollable')) {\n tabLinkWidth = activeLink[0].offsetWidth + 'px';\n highlightTranslate = activeLink[0].offsetLeft + 'px';\n }\n else {\n tabLinkWidth = 1 / tabbar.find('.tab-link').length * 100 + '%';\n highlightTranslate = (app.rtl ? - activeLink.index(): activeLink.index()) * 100 + '%';\n }\n \n tabbar.find('.tab-link-highlight')\n .css({width: tabLinkWidth})\n .transform('translate3d(' + highlightTranslate + ',0,0)');\n }\n });\n };\n app.initPageMaterialTabbar = function (pageContainer) {\n pageContainer = $(pageContainer);\n var tabbar = pageContainer.find('.tabbar');\n if (tabbar.length === 0 && pageContainer.hasClass('tabbar')) tabbar = pageContainer;\n \n function tabbarSetHighlight() {\n app.materialTabbarSetHighlight(tabbar);\n }\n if (tabbar.length > 0) {\n if (tabbar.find('.tab-link-highlight').length === 0) {\n tabbar.find('.toolbar-inner').append('');\n }\n \n tabbarSetHighlight();\n app.onResize(tabbarSetHighlight);\n pageContainer.once('page:beforeremove', function () {\n app.offResize(tabbarSetHighlight);\n });\n }\n };\n app.initMaterialTabbar = function (tabbar) {\n return app.initPageMaterialTabbar(tabbar);\n };\n \n"," /* ===============================================================================\n ************ Tabs ************\n =============================================================================== */\n app.showTab = function (tab, tabLink, animated, force) {\n var newTab = $(tab);\n if (arguments.length === 2 && typeof arguments[1] === 'boolean') {\n tab = arguments[0];\n animated = arguments[1];\n }\n if (arguments.length === 3 && typeof arguments[1] === 'boolean' && typeof arguments[2] === 'boolean') {\n tab = arguments[0];\n animated = arguments[1];\n force = arguments[2];\n }\n if (typeof animated === 'undefined') animated = true;\n if (newTab.length === 0) return false;\n if (newTab.hasClass('active')) {\n if (force) newTab.trigger('show tab:show');\n return false;\n }\n var tabs = newTab.parent('.tabs');\n if (tabs.length === 0) return false;\n \n // Return swipeouts in hidden tabs\n app.allowSwipeout = true;\n \n // Animated tabs\n var isAnimatedTabs = tabs.parent().hasClass('tabs-animated-wrap');\n if (isAnimatedTabs) {\n tabs.parent()[animated ? 'removeClass' : 'addClass']('not-animated');\n var tabTranslate = (app.rtl ? newTab.index() : -newTab.index()) * 100;\n tabs.transform('translate3d(' + tabTranslate + '%,0,0)');\n }\n \n // Swipeable tabs\n var isSwipeableTabs = tabs.parent().hasClass('tabs-swipeable-wrap'), swiper;\n if (isSwipeableTabs) {\n swiper = tabs.parent()[0].swiper;\n if (swiper.activeIndex !== newTab.index()) swiper.slideTo(newTab.index(), animated ? undefined : 0, false);\n }\n \n // Remove active class from old tabs\n var oldTab = tabs.children('.tab.active').removeClass('active').trigger('hide tab:hide');\n // Add active class to new tab\n newTab.addClass('active');\n // Trigger 'show' event on new tab\n newTab.trigger('show tab:show');\n \n // Update navbars in new tab\n if (!isAnimatedTabs && !isSwipeableTabs && newTab.find('.navbar').length > 0) {\n // Find tab's view\n var viewContainer;\n if (newTab.hasClass(app.params.viewClass)) viewContainer = newTab[0];\n else viewContainer = newTab.parents('.' + app.params.viewClass)[0];\n app.sizeNavbars(viewContainer);\n }\n \n // Find related link for new tab\n if (tabLink) tabLink = $(tabLink);\n else {\n // Search by id\n if (typeof tab === 'string') tabLink = $('.tab-link[href=\"' + tab + '\"]');\n else tabLink = $('.tab-link[href=\"#' + newTab.attr('id') + '\"]');\n // Search by data-tab\n if (!tabLink || tabLink && tabLink.length === 0) {\n $('[data-tab]').each(function () {\n if (newTab.is($(this).attr('data-tab'))) tabLink = $(this);\n });\n }\n }\n if (tabLink.length === 0) return;\n \n // Find related link for old tab\n var oldTabLink;\n if (oldTab && oldTab.length > 0) {\n // Search by id\n var oldTabId = oldTab.attr('id');\n if (oldTabId) oldTabLink = $('.tab-link[href=\"#' + oldTabId + '\"]');\n // Search by data-tab\n if (!oldTabLink || oldTabLink && oldTabLink.length === 0) {\n $('[data-tab]').each(function () {\n if (oldTab.is($(this).attr('data-tab'))) oldTabLink = $(this);\n });\n }\n }\n \n // Update links' classes\n if (tabLink && tabLink.length > 0) {\n tabLink.addClass('active');\n // Material Highlight\n if (app.params.material) {\n var tabbar = tabLink.parents('.tabbar');\n if (tabbar.length > 0) {\n if (tabbar.find('.tab-link-highlight').length === 0) {\n tabbar.find('.toolbar-inner').append('');\n }\n app.materialTabbarSetHighlight(tabbar, tabLink);\n }\n }\n }\n if (oldTabLink && oldTabLink.length > 0) oldTabLink.removeClass('active');\n \n return true;\n };\n"," /*===============================================================================\n ************ Accordion ************\n ===============================================================================*/\n app.accordionToggle = function (item) {\n item = $(item);\n if (item.length === 0) return;\n if (item.hasClass('accordion-item-expanded')) app.accordionClose(item);\n else app.accordionOpen(item);\n };\n app.accordionOpen = function (item) {\n item = $(item);\n var list = item.parents('.accordion-list').eq(0);\n var content = item.children('.accordion-item-content');\n if (content.length === 0) content = item.find('.accordion-item-content');\n var expandedItem = list.length > 0 && item.parent().children('.accordion-item-expanded');\n if (expandedItem.length > 0) {\n app.accordionClose(expandedItem);\n }\n content.css('height', content[0].scrollHeight + 'px').transitionEnd(function () {\n if (item.hasClass('accordion-item-expanded')) {\n content.transition(0);\n content.css('height', 'auto');\n var clientLeft = content[0].clientLeft;\n content.transition('');\n item.trigger('opened accordion:opened');\n }\n else {\n content.css('height', '');\n item.trigger('closed accordion:closed');\n }\n });\n item.trigger('open accordion:open');\n item.addClass('accordion-item-expanded');\n };\n app.accordionClose = function (item) {\n item = $(item);\n var content = item.children('.accordion-item-content');\n if (content.length === 0) content = item.find('.accordion-item-content');\n item.removeClass('accordion-item-expanded');\n content.transition(0);\n content.css('height', content[0].scrollHeight + 'px');\n // Relayout\n var clientLeft = content[0].clientLeft;\n // Close\n content.transition('');\n content.css('height', '').transitionEnd(function () {\n if (item.hasClass('accordion-item-expanded')) {\n content.transition(0);\n content.css('height', 'auto');\n var clientLeft = content[0].clientLeft;\n content.transition('');\n item.trigger('opened accordion:opened');\n }\n else {\n content.css('height', '');\n item.trigger('closed accordion:closed');\n }\n });\n item.trigger('close accordion:close');\n };\n"," /*===============================================================================\n ************ Fast Clicks ************\n ************ Inspired by https://github.com/ftlabs/fastclick ************\n ===============================================================================*/\n app.initFastClicks = function () {\n if (app.params.activeState) {\n $('html').addClass('watch-active-state');\n }\n if (app.device.ios && app.device.webView) {\n // Strange hack required for iOS 8 webview to work on inputs\n window.addEventListener('touchstart', function () {});\n }\n \n var touchStartX, touchStartY, touchStartTime, targetElement, trackClick, activeSelection, scrollParent, lastClickTime, isMoved, tapHoldFired, tapHoldTimeout;\n var activableElement, activeTimeout, needsFastClick, needsFastClickTimeOut;\n var rippleWave, rippleTarget, rippleTransform, rippleTimeout;\n function findActivableElement(el) {\n var target = $(el);\n var parents = target.parents(app.params.activeStateElements);\n var activable;\n if (target.is(app.params.activeStateElements)) {\n activable = target;\n }\n if (parents.length > 0) {\n activable = activable ? activable.add(parents) : parents;\n }\n return activable ? activable : target;\n }\n function isInsideScrollableView(el) {\n var pageContent = el.parents('.page-content, .panel');\n \n if (pageContent.length === 0) {\n return false;\n }\n \n // This event handler covers the \"tap to stop scrolling\".\n if (pageContent.prop('scrollHandlerSet') !== 'yes') {\n pageContent.on('scroll', function() {\n clearTimeout(activeTimeout);\n clearTimeout(rippleTimeout);\n });\n pageContent.prop('scrollHandlerSet', 'yes');\n }\n \n return true;\n }\n function addActive() {\n if (!activableElement) return;\n activableElement.addClass('active-state');\n }\n function removeActive(el) {\n if (!activableElement) return;\n activableElement.removeClass('active-state');\n activableElement = null;\n }\n function isFormElement(el) {\n var nodes = ('input select textarea label').split(' ');\n if (el.nodeName && nodes.indexOf(el.nodeName.toLowerCase()) >= 0) return true;\n return false;\n }\n function androidNeedsBlur(el) {\n var noBlur = ('button input textarea select').split(' ');\n if (document.activeElement && el !== document.activeElement && document.activeElement !== document.body) {\n if (noBlur.indexOf(el.nodeName.toLowerCase()) >= 0) {\n return false;\n }\n else {\n return true;\n }\n }\n else {\n return false;\n }\n }\n function targetNeedsFastClick(el) {\n var $el = $(el);\n if (el.nodeName.toLowerCase() === 'input' && (el.type === 'file' || el.type === 'range')) return false;\n if (el.nodeName.toLowerCase() === 'select' && app.device.android) return false;\n if ($el.hasClass('no-fastclick') || $el.parents('.no-fastclick').length > 0) return false;\n if (app.params.fastClicksExclude && $el.is(app.params.fastClicksExclude)) return false;\n return true;\n }\n function targetNeedsFocus(el) {\n if (document.activeElement === el) {\n return false;\n }\n var tag = el.nodeName.toLowerCase();\n var skipInputs = ('button checkbox file image radio submit').split(' ');\n if (el.disabled || el.readOnly) return false;\n if (tag === 'textarea') return true;\n if (tag === 'select') {\n if (app.device.android) return false;\n else return true;\n }\n if (tag === 'input' && skipInputs.indexOf(el.type) < 0) return true;\n }\n function targetNeedsPrevent(el) {\n el = $(el);\n var prevent = true;\n if (el.is('label') || el.parents('label').length > 0) {\n if (app.device.android) {\n prevent = false;\n }\n else if (app.device.ios && el.is('input')) {\n prevent = true;\n }\n else prevent = false;\n }\n return prevent;\n }\n \n // Mouse Handlers\n function handleMouseDown (e) {\n findActivableElement(e.target).addClass('active-state');\n if ('which' in e && e.which === 3) {\n setTimeout(function () {\n $('.active-state').removeClass('active-state');\n }, 0);\n }\n if (app.params.material && app.params.materialRipple) {\n touchStartX = e.pageX;\n touchStartY = e.pageY;\n rippleTouchStart(e.target, e.pageX, e.pageY);\n }\n }\n function handleMouseMove (e) {\n $('.active-state').removeClass('active-state');\n if (app.params.material && app.params.materialRipple) {\n rippleTouchMove();\n }\n }\n function handleMouseUp (e) {\n $('.active-state').removeClass('active-state');\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n }\n \n // Material Touch Ripple Effect\n function findRippleElement(el) {\n var needsRipple = app.params.materialRippleElements;\n var $el = $(el);\n if ($el.is(needsRipple)) {\n if ($el.hasClass('no-ripple')) {\n return false;\n }\n return $el;\n }\n else if ($el.parents(needsRipple).length > 0) {\n var rippleParent = $el.parents(needsRipple).eq(0);\n if (rippleParent.hasClass('no-ripple')) {\n return false;\n }\n return rippleParent;\n }\n else return false;\n }\n function createRipple(x, y, el) {\n if (!el) return;\n var box = el[0].getBoundingClientRect();\n var center = {\n x: x - box.left,\n y: y - box.top\n },\n height = box.height,\n width = box.width;\n var diameter = Math.max(Math.pow((Math.pow(height, 2) + Math.pow(width, 2)), 0.5), 48);\n \n rippleWave = $(\n '
                      '\n );\n el.prepend(rippleWave);\n var clientLeft = rippleWave[0].clientLeft;\n rippleTransform = 'translate3d('+(-center.x + width/2)+'px, '+(-center.y + height/2)+'px, 0) scale(1)';\n rippleWave.transform(rippleTransform);\n }\n \n function removeRipple() {\n if (!rippleWave) return;\n var toRemove = rippleWave;\n \n var removeTimeout = setTimeout(function () {\n toRemove.remove();\n }, 400);\n \n rippleWave\n .addClass('ripple-wave-fill')\n .transform(rippleTransform.replace('scale(1)', 'scale(1.01)'))\n .transitionEnd(function () {\n clearTimeout(removeTimeout);\n \n var rippleWave = $(this)\n .addClass('ripple-wave-out')\n .transform(rippleTransform.replace('scale(1)', 'scale(1.01)'));\n \n removeTimeout = setTimeout(function () {\n rippleWave.remove();\n }, 700);\n \n setTimeout(function () {\n rippleWave.transitionEnd(function(){\n clearTimeout(removeTimeout);\n $(this).remove();\n });\n }, 0);\n });\n \n rippleWave = rippleTarget = undefined;\n }\n \n function rippleTouchStart (el, x, y) {\n rippleTarget = findRippleElement(el);\n if (!rippleTarget || rippleTarget.length === 0) {\n rippleTarget = undefined;\n return;\n }\n if (!isInsideScrollableView(rippleTarget)) {\n createRipple(touchStartX, touchStartY, rippleTarget);\n }\n else {\n rippleTimeout = setTimeout(function () {\n createRipple(touchStartX, touchStartY, rippleTarget);\n }, 80);\n }\n }\n function rippleTouchMove() {\n clearTimeout(rippleTimeout);\n removeRipple();\n }\n function rippleTouchEnd() {\n if (rippleWave) {\n removeRipple();\n }\n else if (rippleTarget && !isMoved) {\n clearTimeout(rippleTimeout);\n createRipple(touchStartX, touchStartY, rippleTarget);\n setTimeout(removeRipple, 0);\n }\n else {\n removeRipple();\n }\n }\n \n // Send Click\n function sendClick(e) {\n var touch = e.changedTouches[0];\n var evt = document.createEvent('MouseEvents');\n var eventType = 'click';\n if (app.device.android && targetElement.nodeName.toLowerCase() === 'select') {\n eventType = 'mousedown';\n }\n evt.initMouseEvent(eventType, true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);\n evt.forwardedTouchEvent = true;\n targetElement.dispatchEvent(evt);\n }\n \n // Touch Handlers\n function handleTouchStart(e) {\n isMoved = false;\n tapHoldFired = false;\n if (e.targetTouches.length > 1) {\n if (activableElement) removeActive();\n return true;\n }\n if (e.touches.length > 1 && activableElement) {\n removeActive();\n }\n if (app.params.tapHold) {\n if (tapHoldTimeout) clearTimeout(tapHoldTimeout);\n tapHoldTimeout = setTimeout(function () {\n if (e && e.touches && e.touches.length > 1) return;\n tapHoldFired = true;\n e.preventDefault();\n $(e.target).trigger('taphold');\n }, app.params.tapHoldDelay);\n }\n if (needsFastClickTimeOut) clearTimeout(needsFastClickTimeOut);\n needsFastClick = targetNeedsFastClick(e.target);\n \n if (!needsFastClick) {\n trackClick = false;\n return true;\n }\n if (app.device.ios || (app.device.android && 'getSelection' in window)) {\n var selection = window.getSelection();\n if (selection.rangeCount && selection.focusNode !== document.body && (!selection.isCollapsed || document.activeElement === selection.focusNode)) {\n activeSelection = true;\n return true;\n }\n else {\n activeSelection = false;\n }\n }\n if (app.device.android) {\n if (androidNeedsBlur(e.target)) {\n document.activeElement.blur();\n }\n }\n \n trackClick = true;\n targetElement = e.target;\n touchStartTime = (new Date()).getTime();\n touchStartX = e.targetTouches[0].pageX;\n touchStartY = e.targetTouches[0].pageY;\n \n // Detect scroll parent\n if (app.device.ios) {\n scrollParent = undefined;\n $(targetElement).parents().each(function () {\n var parent = this;\n if (parent.scrollHeight > parent.offsetHeight && !scrollParent) {\n scrollParent = parent;\n scrollParent.f7ScrollTop = scrollParent.scrollTop;\n }\n });\n }\n if ((e.timeStamp - lastClickTime) < app.params.fastClicksDelayBetweenClicks) {\n e.preventDefault();\n }\n \n if (app.params.activeState) {\n activableElement = findActivableElement(targetElement);\n // If it's inside a scrollable view, we don't trigger active-state yet,\n // because it can be a scroll instead. Based on the link:\n // http://labnote.beedesk.com/click-scroll-and-pseudo-active-on-mobile-webk\n if (!isInsideScrollableView(activableElement)) {\n addActive();\n } else {\n activeTimeout = setTimeout(addActive, 80);\n }\n }\n if (app.params.material && app.params.materialRipple) {\n rippleTouchStart(targetElement, touchStartX, touchStartY);\n }\n }\n function handleTouchMove(e) {\n if (!trackClick) return;\n var _isMoved = false;\n var distance = app.params.fastClicksDistanceThreshold;\n if (distance) {\n var pageX = e.targetTouches[0].pageX;\n var pageY = e.targetTouches[0].pageY;\n if (Math.abs(pageX - touchStartX) > distance || Math.abs(pageY - touchStartY) > distance) {\n _isMoved = true;\n }\n }\n else {\n _isMoved = true;\n }\n if (_isMoved) {\n trackClick = false;\n targetElement = null;\n isMoved = true;\n if (app.params.tapHold) {\n clearTimeout(tapHoldTimeout);\n }\n \t\t\tif (app.params.activeState) {\n \t\t\t\tclearTimeout(activeTimeout);\n \t\t\t\tremoveActive();\n \t\t\t}\n if (app.params.material && app.params.materialRipple) {\n rippleTouchMove();\n }\n }\n }\n function handleTouchEnd(e) {\n clearTimeout(activeTimeout);\n clearTimeout(tapHoldTimeout);\n \n if (!trackClick) {\n if (!activeSelection && needsFastClick) {\n if (!(app.device.android && !e.cancelable)) {\n e.preventDefault();\n }\n }\n return true;\n }\n \n if (document.activeElement === e.target) {\n if (app.params.activeState) removeActive();\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n return true;\n }\n \n if (!activeSelection) {\n e.preventDefault();\n }\n \n if ((e.timeStamp - lastClickTime) < app.params.fastClicksDelayBetweenClicks) {\n setTimeout(removeActive, 0);\n return true;\n }\n \n lastClickTime = e.timeStamp;\n \n trackClick = false;\n \n if (app.device.ios && scrollParent) {\n if (scrollParent.scrollTop !== scrollParent.f7ScrollTop) {\n return false;\n }\n }\n \n // Add active-state here because, in a very fast tap, the timeout didn't\n // have the chance to execute. Removing active-state in a timeout gives\n // the chance to the animation execute.\n if (app.params.activeState) {\n addActive();\n setTimeout(removeActive, 0);\n }\n // Remove Ripple\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n \n // Trigger focus when required\n if (targetNeedsFocus(targetElement)) {\n if (app.device.ios && app.device.webView) {\n if ((event.timeStamp - touchStartTime) > 159) {\n targetElement = null;\n return false;\n }\n targetElement.focus();\n return false;\n }\n else {\n targetElement.focus();\n }\n }\n \n // Blur active elements\n if (document.activeElement && targetElement !== document.activeElement && document.activeElement !== document.body && targetElement.nodeName.toLowerCase() !== 'label') {\n document.activeElement.blur();\n }\n \n // Send click\n e.preventDefault();\n sendClick(e);\n return false;\n }\n function handleTouchCancel(e) {\n trackClick = false;\n targetElement = null;\n \n // Remove Active State\n clearTimeout(activeTimeout);\n clearTimeout(tapHoldTimeout);\n if (app.params.activeState) {\n removeActive();\n }\n \n // Remove Ripple\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n }\n \n function handleClick(e) {\n var allowClick = false;\n \n if (trackClick) {\n targetElement = null;\n trackClick = false;\n return true;\n }\n if (e.target.type === 'submit' && e.detail === 0 || e.target.type === 'file') {\n return true;\n }\n if (!targetElement) {\n if (!isFormElement(e.target)) {\n allowClick = true;\n }\n }\n if (!needsFastClick) {\n allowClick = true;\n }\n if (document.activeElement === targetElement) {\n allowClick = true;\n }\n if (e.forwardedTouchEvent) {\n allowClick = true;\n }\n if (!e.cancelable) {\n allowClick = true;\n }\n if (app.params.tapHold && app.params.tapHoldPreventClicks && tapHoldFired) {\n allowClick = false;\n }\n if (!allowClick) {\n e.stopImmediatePropagation();\n e.stopPropagation();\n if (targetElement) {\n if (targetNeedsPrevent(targetElement) || isMoved) {\n e.preventDefault();\n }\n }\n else {\n e.preventDefault();\n }\n targetElement = null;\n }\n needsFastClickTimeOut = setTimeout(function () {\n needsFastClick = false;\n }, (app.device.ios || app.device.androidChrome ? 100 : 400));\n \n if (app.params.tapHold) {\n tapHoldTimeout = setTimeout(function () {\n tapHoldFired = false;\n }, (app.device.ios || app.device.androidChrome ? 100 : 400));\n }\n \n return allowClick;\n }\n if (app.support.touch) {\n document.addEventListener('click', handleClick, true);\n \n document.addEventListener('touchstart', handleTouchStart);\n document.addEventListener('touchmove', handleTouchMove);\n document.addEventListener('touchend', handleTouchEnd);\n document.addEventListener('touchcancel', handleTouchCancel);\n }\n else {\n if (app.params.activeState) {\n document.addEventListener('mousedown', handleMouseDown);\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n }\n }\n if (app.params.material && app.params.materialRipple) {\n document.addEventListener('contextmenu', function (e) {\n if (activableElement) removeActive();\n rippleTouchEnd();\n });\n }\n \n };\n \n"," /*===============================================================================\n ************ Handle clicks and make them fast (on tap); ************\n ===============================================================================*/\n app.initClickEvents = function () {\n function handleScrollTop(e) {\n /*jshint validthis:true */\n var clicked = $(this);\n var target = $(e.target);\n var isLink = clicked[0].nodeName.toLowerCase() === 'a' ||\n clicked.parents('a').length > 0 ||\n target[0].nodeName.toLowerCase() === 'a' ||\n target.parents('a').length > 0;\n \n if (isLink) return;\n var pageContent, page;\n if (app.params.scrollTopOnNavbarClick && clicked.is('.navbar .center')) {\n // Find active page\n var navbar = clicked.parents('.navbar');\n \n // Static Layout\n pageContent = navbar.parents('.page-content');\n \n if (pageContent.length === 0) {\n // Fixed Layout\n if (navbar.parents('.page').length > 0) {\n pageContent = navbar.parents('.page').find('.page-content');\n }\n // Through Layout\n if (pageContent.length === 0) {\n if (navbar.nextAll('.pages').length > 0) {\n pageContent = navbar.nextAll('.pages').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n }\n }\n }\n if (app.params.scrollTopOnStatusbarClick && clicked.is('.statusbar-overlay')) {\n if ($('.popup.modal-in').length > 0) {\n // Check for opened popup\n pageContent = $('.popup.modal-in').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n else if ($('.panel.active').length > 0) {\n // Check for opened panel\n pageContent = $('.panel.active').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n else if ($('.views > .view.active').length > 0) {\n // View in tab bar app layout\n pageContent = $('.views > .view.active').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n else {\n // Usual case\n pageContent = $('.views').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n }\n \n if (pageContent && pageContent.length > 0) {\n // Check for tab\n if (pageContent.hasClass('tab')) {\n pageContent = pageContent.parent('.tabs').children('.page-content.active');\n }\n if (pageContent.length > 0) pageContent.scrollTop(0, 300);\n }\n }\n function handleClicks(e) {\n /*jshint validthis:true */\n var clicked = $(this);\n var url = clicked.attr('href');\n var isLink = clicked[0].nodeName.toLowerCase() === 'a';\n \n // Check if link is external\n if (isLink) {\n if (clicked.is(app.params.externalLinks) || (url && url.indexOf('javascript:') >= 0)) {\n if(url && clicked.attr('target') === '_system') {\n e.preventDefault();\n window.open(url, '_system');\n }\n return;\n }\n }\n \n // Collect Clicked data- attributes\n var clickedData = clicked.dataset();\n \n // Smart Select\n if (clicked.hasClass('smart-select')) {\n if (app.smartSelectOpen) app.smartSelectOpen(clicked);\n }\n \n // Open Panel\n if (clicked.hasClass('open-panel')) {\n if ($('.panel').length === 1) {\n if ($('.panel').hasClass('panel-left')) app.openPanel('left');\n else app.openPanel('right');\n }\n else {\n if (clickedData.panel === 'right') app.openPanel('right');\n else app.openPanel('left');\n }\n }\n \n // Close Panel\n if (clicked.hasClass('close-panel')) {\n app.closePanel();\n }\n \n // Panel Overlay\n if (clicked.hasClass('panel-overlay')) {\n $('.panel.active').trigger('panel:overlay-click');\n if (app.params.panelsCloseByOutside) app.closePanel();\n }\n \n // Popover\n if (clicked.hasClass('open-popover')) {\n var popover;\n if (clickedData.popover) {\n popover = clickedData.popover;\n }\n else popover = '.popover';\n app.popover(popover, clicked);\n }\n if (clicked.hasClass('close-popover')) {\n app.closeModal('.popover.modal-in');\n }\n // Popup\n var popup;\n if (clicked.hasClass('open-popup')) {\n if (clickedData.popup) {\n popup = clickedData.popup;\n }\n else popup = '.popup';\n app.popup(popup);\n }\n if (clicked.hasClass('close-popup')) {\n if (clickedData.popup) {\n popup = clickedData.popup;\n }\n else popup = '.popup.modal-in';\n app.closeModal(popup);\n }\n // Login Screen\n var loginScreen;\n if (clicked.hasClass('open-login-screen')) {\n if (clickedData.loginScreen) {\n loginScreen = clickedData.loginScreen;\n }\n else loginScreen = '.login-screen';\n app.loginScreen(loginScreen);\n }\n if (clicked.hasClass('close-login-screen')) {\n app.closeModal('.login-screen.modal-in');\n }\n // Close Modal\n if (clicked.hasClass('modal-overlay')) {\n if ($('.modal.modal-in').length > 0 && app.params.modalCloseByOutside)\n app.closeModal('.modal.modal-in');\n if ($('.actions-modal.modal-in').length > 0 && app.params.actionsCloseByOutside)\n app.closeModal('.actions-modal.modal-in');\n \n if ($('.popover.modal-in').length > 0 && app.params.popoverCloseByOutside)\n app.closeModal('.popover.modal-in');\n }\n if (clicked.hasClass('popup-overlay')) {\n if ($('.popup.modal-in').length > 0 && app.params.popupCloseByOutside)\n app.closeModal('.popup.modal-in');\n }\n if (clicked.hasClass('picker-modal-overlay')) {\n if ($('.picker-modal.modal-in').length > 0)\n app.closeModal('.picker-modal.modal-in');\n }\n \n // Picker\n if (clicked.hasClass('close-picker')) {\n var pickerToClose = $('.picker-modal.modal-in');\n if (pickerToClose.length > 0) {\n app.closeModal(pickerToClose);\n }\n else {\n pickerToClose = $('.popover.modal-in .picker-modal');\n if (pickerToClose.length > 0) {\n app.closeModal(pickerToClose.parents('.popover'));\n }\n }\n }\n if (clicked.hasClass('open-picker')) {\n var pickerToOpen;\n if (clickedData.picker) {\n pickerToOpen = clickedData.picker;\n }\n else pickerToOpen = '.picker-modal';\n app.pickerModal(pickerToOpen, clicked);\n }\n \n // Tabs\n var isTabLink;\n if (clicked.hasClass('tab-link')) {\n isTabLink = true;\n app.showTab(clickedData.tab || clicked.attr('href'), clicked);\n }\n // Swipeout Close\n if (clicked.hasClass('swipeout-close')) {\n app.swipeoutClose(clicked.parents('.swipeout-opened'));\n }\n // Swipeout Delete\n if (clicked.hasClass('swipeout-delete')) {\n if (clickedData.confirm) {\n var text = clickedData.confirm;\n var title = clickedData.confirmTitle;\n if (title) {\n app.confirm(text, title, function () {\n app.swipeoutDelete(clicked.parents('.swipeout'));\n }, function () {\n if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout'));\n });\n }\n else {\n app.confirm(text, function () {\n app.swipeoutDelete(clicked.parents('.swipeout'));\n }, function () {\n if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout'));\n });\n }\n }\n else {\n app.swipeoutDelete(clicked.parents('.swipeout'));\n }\n \n }\n // Sortable\n if (clicked.hasClass('toggle-sortable')) {\n app.sortableToggle(clickedData.sortable);\n }\n if (clicked.hasClass('open-sortable')) {\n app.sortableOpen(clickedData.sortable);\n }\n if (clicked.hasClass('close-sortable')) {\n app.sortableClose(clickedData.sortable);\n }\n // Accordion\n if (clicked.hasClass('accordion-item-toggle') || (clicked.hasClass('item-link') && clicked.parent().hasClass('accordion-item'))) {\n var accordionItem = clicked.parent('.accordion-item');\n if (accordionItem.length === 0) accordionItem = clicked.parents('.accordion-item');\n if (accordionItem.length === 0) accordionItem = clicked.parents('li');\n app.accordionToggle(accordionItem);\n }\n \n // Speed Dial\n if (clicked.hasClass('floating-button') && clicked.parent().hasClass('speed-dial')) {\n clicked.parent().toggleClass('speed-dial-opened');\n }\n if (clicked.hasClass('close-speed-dial')) {\n $('.speed-dial-opened').removeClass('speed-dial-opened');\n }\n \n // Load Page\n if (app.params.ajaxLinks && !clicked.is(app.params.ajaxLinks) || !isLink || !app.params.router) {\n return;\n }\n if (isLink) {\n e.preventDefault();\n }\n \n var validUrl = url && url.length > 0 && url !== '#' && !isTabLink;\n var template = clickedData.template;\n if (validUrl || clicked.hasClass('back') || template) {\n var view;\n if (clickedData.view) {\n view = $(clickedData.view)[0].f7View;\n }\n else {\n view = clicked.parents('.' + app.params.viewClass)[0] && clicked.parents('.' + app.params.viewClass)[0].f7View;\n if (view && view.params.linksView) {\n if (typeof view.params.linksView === 'string') view = $(view.params.linksView)[0].f7View;\n else if (view.params.linksView instanceof View) view = view.params.linksView;\n }\n }\n if (!view) {\n if (app.mainView) view = app.mainView;\n }\n if (!view) return;\n \n var pageName;\n if (!template) {\n if (url && url.indexOf('#') === 0 && url !== '#') {\n if (view.params.domCache) {\n pageName = url.split('#')[1];\n }\n else return;\n }\n if (url === '#' && !clicked.hasClass('back')) return;\n }\n else {\n url = undefined;\n }\n \n var animatePages;\n if (typeof clickedData.animatePages !== 'undefined') {\n animatePages = clickedData.animatePages;\n }\n else {\n if (clicked.hasClass('with-animation')) animatePages = true;\n if (clicked.hasClass('no-animation')) animatePages = false;\n }\n \n var options = {\n animatePages: animatePages,\n ignoreCache: clickedData.ignoreCache,\n force: clickedData.force,\n reload: clickedData.reload,\n reloadPrevious: clickedData.reloadPrevious,\n pageName: pageName,\n pushState: clickedData.pushState,\n url: url\n };\n \n if (app.params.template7Pages) {\n options.contextName = clickedData.contextName;\n var context = clickedData.context;\n if (context) {\n options.context = JSON.parse(context);\n }\n }\n if (template && template in t7.templates) {\n options.template = t7.templates[template];\n }\n \n if (clicked.hasClass('back')) view.router.back(options);\n else view.router.load(options);\n }\n }\n $(document).on('click', 'a, .open-panel, .close-panel, .panel-overlay, .modal-overlay, .popup-overlay, .swipeout-delete, .swipeout-close, .close-popup, .open-popup, .open-popover, .open-login-screen, .close-login-screen .smart-select, .toggle-sortable, .open-sortable, .close-sortable, .accordion-item-toggle, .close-picker, .picker-modal-overlay', handleClicks);\n if (app.params.scrollTopOnNavbarClick || app.params.scrollTopOnStatusbarClick) {\n $(document).on('click', '.statusbar-overlay, .navbar .center', handleScrollTop);\n }\n \n // Prevent scrolling on overlays\n function preventScrolling(e) {\n e.preventDefault();\n }\n if (app.support.touch && !app.device.android) {\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n $(document).on((app.params.fastClicks ? 'touchstart' : 'touchmove'), '.panel-overlay, .modal-overlay, .preloader-indicator-overlay, .popup-overlay, .searchbar-overlay', preventScrolling, activeListener);\n }\n };\n \n"," /*======================================================\n ************ App Resize Actions ************\n ======================================================*/\n // Prevent iPad horizontal body scrolling when soft keyboard is opened\n function _fixIpadBodyScrolLeft() {\n if (app.device.ipad) {\n document.body.scrollLeft = 0;\n setTimeout(function () {\n document.body.scrollLeft = 0;\n }, 0);\n }\n }\n var appResizeCallbacks = [];\n app.getSize = function () {\n var offset = app.root.offset();\n app.width = app.root[0].offsetWidth;\n app.height = app.root[0].offsetHeight;\n app.left = offset.left;\n app.top = offset.top;\n };\n app.onResize = function (callback) {\n appResizeCallbacks.push(callback);\n };\n app.offResize = function (callback) {\n for (var i = 0; i < appResizeCallbacks.length; i++) {\n if (appResizeCallbacks[i] === callback) {\n appResizeCallbacks.splice(i, 1);\n }\n }\n };\n app.resize = function () {\n _fixIpadBodyScrolLeft();\n app.getSize();\n if (app.sizeNavbars) app.sizeNavbars();\n for (var i = 0; i < appResizeCallbacks.length; i++) {\n appResizeCallbacks[i]();\n }\n };\n app.orientationchange = function () {\n if (app.device && app.device.minimalUi) {\n if (window.orientation === 90 || window.orientation === -90) document.body.scrollTop = 0;\n }\n _fixIpadBodyScrolLeft();\n };\n app.initResize = function () {\n $(window).on('resize', app.resize);\n $(window).on('orientationchange', app.orientationchange);\n app.getSize();\n };\n \n"," /*===============================================================================\n ************ Store and parse forms data ************\n ===============================================================================*/\n app.formsData = {};\n app.formStoreData = function (formId, formJSON) {\n // Store form data in app.formsData\n app.formsData[formId] = formJSON;\n \n // Store form data in local storage also\n app.ls['f7form-' + formId] = JSON.stringify(formJSON);\n };\n app.formDeleteData = function (formId) {\n // Delete form data from app.formsData\n if (app.formsData[formId]) {\n app.formsData[formId] = '';\n delete app.formsData[formId];\n }\n \n // Delete form data from local storage also\n if (app.ls['f7form-' + formId]) {\n app.ls['f7form-' + formId] = '';\n app.ls.removeItem('f7form-' + formId);\n }\n };\n app.formGetData = function (formId) {\n // First of all check in local storage\n if (app.ls['f7form-' + formId]) {\n return JSON.parse(app.ls['f7form-' + formId]);\n }\n // Try to get it from formsData obj\n else if (app.formsData[formId]) return app.formsData[formId];\n };\n app.formToData = function (form) {\n form = $(form);\n if (form.length !== 1) return false;\n \n // Form data\n var formData = {};\n \n // Skip input types\n var skipTypes = ['submit', 'image', 'button', 'file'];\n var skipNames = [];\n form.find('input, select, textarea').each(function () {\n var input = $(this);\n var name = input.attr('name');\n var type = input.attr('type');\n var tag = this.nodeName.toLowerCase();\n if (skipTypes.indexOf(type) >= 0) return;\n if (skipNames.indexOf(name) >= 0 || !name) return;\n if (tag === 'select' && input.prop('multiple')) {\n skipNames.push(name);\n formData[name] = [];\n form.find('select[name=\"' + name + '\"] option').each(function () {\n if (this.selected) formData[name].push(this.value);\n });\n }\n else {\n switch (type) {\n case 'checkbox' :\n skipNames.push(name);\n formData[name] = [];\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (this.checked) formData[name].push(this.value);\n });\n break;\n case 'radio' :\n skipNames.push(name);\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (this.checked) formData[name] = this.value;\n });\n break;\n default :\n formData[name] = input.val();\n break;\n }\n }\n });\n form.trigger('formToJSON formToData form:todata', {formData: formData});\n \n return formData;\n };\n app.formToJSON = app.formToData;\n app.formFromData = function (form, formData) {\n form = $(form);\n if (form.length !== 1) return false;\n \n // Skip input types\n var skipTypes = ['submit', 'image', 'button', 'file'];\n var skipNames = [];\n \n form.find('input, select, textarea').each(function () {\n var input = $(this);\n var name = input.attr('name');\n var type = input.attr('type');\n var tag = this.nodeName.toLowerCase();\n if (typeof formData[name] === 'undefined' || formData[name] === null) return;\n if (skipTypes.indexOf(type) >= 0) return;\n if (skipNames.indexOf(name) >= 0 || !name) return;\n if (tag === 'select' && input.prop('multiple')) {\n skipNames.push(name);\n form.find('select[name=\"' + name + '\"] option').each(function () {\n if (formData[name].indexOf(this.value) >= 0) this.selected = true;\n else this.selected = false;\n });\n }\n else {\n switch (type) {\n case 'checkbox' :\n skipNames.push(name);\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (formData[name].indexOf(this.value) >= 0) this.checked = true;\n else this.checked = false;\n });\n break;\n case 'radio' :\n skipNames.push(name);\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (formData[name] === this.value) this.checked = true;\n else this.checked = false;\n });\n break;\n default :\n input.val(formData[name]);\n break;\n }\n }\n if (tag === 'select' || tag === 'input' || tag === 'textarea') {\n input.trigger('change');\n }\n });\n form.trigger('formFromJSON formFromData form:fromdata', {formData: formData});\n };\n app.formFromJSON = app.formFromData;\n \n app.initFormsStorage = function (pageContainer) {\n pageContainer = $(pageContainer);\n var forms = pageContainer.find('form.store-data');\n if (forms.length === 0) return;\n \n // Parse forms data and fill form if there is such data\n forms.each(function () {\n var id = this.getAttribute('id');\n if (!id) return;\n var formData = app.formGetData(id);\n if (formData) app.formFromData(this, formData);\n });\n // Update forms data on inputs change\n function storeForm() {\n /*jshint validthis:true */\n var form = $(this);\n var formId = form[0].id;\n if (!formId) return;\n var formJSON = app.formToData(form);\n if (!formJSON) return;\n app.formStoreData(formId, formJSON);\n form.trigger('store form:storedata', {data: formJSON});\n }\n forms.on('change submit', storeForm);\n \n // Detach Listeners\n function pageBeforeRemove() {\n forms.off('change submit', storeForm);\n pageContainer.off('page:beforeremove', pageBeforeRemove);\n }\n pageContainer.on('page:beforeremove', pageBeforeRemove);\n };\n"," /*===============================================================================\n ************ Ajax submit for forms ************\n ===============================================================================*/\n // Ajax submit on forms\n $(document).on('submit change', 'form.ajax-submit, form.ajax-submit-onchange', function (e) {\n var form = $(this);\n if (e.type === 'change' && !form.hasClass('ajax-submit-onchange')) return;\n if (e.type === 'submit') e.preventDefault();\n \n var method = (form.attr('method') || 'GET').toUpperCase();\n var contentType = form.prop('enctype') || form.attr('enctype');\n \n var url = form.attr('action');\n if (!url) return;\n \n var data;\n if (method === 'POST') data = new FormData(form[0]);\n else data = $.serializeObject(app.formToJSON(form[0]));\n \n var xhr = $.ajax({\n method: method,\n url: url,\n contentType: contentType,\n data: data,\n beforeSend: function (xhr) {\n form.trigger('beforeSubmit form:beforesend', {data:data, xhr: xhr});\n },\n error: function (xhr) {\n form.trigger('submitError form:error', {data:data, xhr: xhr});\n },\n success: function (data) {\n form.trigger('submitted form:success', {data: data, xhr: xhr});\n }\n });\n });\n \n \n"," /*===============================================================================\n ************ Resizable textarea ************\n ===============================================================================*/\n app.resizeTextarea = function (textarea) {\n textarea = $(textarea);\n if (!textarea.hasClass('resizable')) {\n return;\n }\n textarea.css({'height': ''});\n var height = textarea[0].offsetHeight;\n var diff = height - textarea[0].clientHeight;\n var scrollHeight = textarea[0].scrollHeight;\n \n if (scrollHeight + diff > height) {\n var newAreaHeight = scrollHeight + diff;\n textarea.css('height', newAreaHeight + 'px');\n }\n };\n app.resizableTextarea = function (textarea) {\n textarea = $(textarea);\n if (textarea.length === 0) return;\n var textareaTimeout;\n function handleTextarea() {\n clearTimeout(textareaTimeout);\n textareaTimeout = setTimeout(function () {\n app.resizeTextarea(textarea);\n }, 0);\n }\n textarea[0].f7DestroyResizableTextarea = function () {\n textarea.off('change keydown keypress keyup paste cut', handleTextarea);\n };\n return textarea.on('change keydown keypress keyup paste cut', handleTextarea);\n };\n app.destroyResizableTextarea = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length > 0 && pageContainer.is('textarea') && pageContainer[0].f7DestroyResizableTextarea) {\n pageContainer[0].f7DestroyResizableTextarea();\n }\n else if (pageContainer.length > 0) {\n pageContainer.find('textarea.resiable').each(function () {\n var textarea = this;\n if (textarea.f7DestroyResizableTextarea) {\n textarea.f7DestroyResizableTextarea ();\n }\n });\n }\n };\n app.initPageResizableTextarea = function (pageContainer) {\n pageContainer = $(pageContainer);\n var textareas = pageContainer.find('textarea.resizable');\n textareas.each(function () {\n app.resizableTextarea(this);\n });\n };\n"," /*======================================================\n ************ Material Text Inputs ************\n ======================================================*/\n app.initPageMaterialInputs = function (pageContainer) {\n pageContainer = $(pageContainer);\n var textareas = pageContainer.find('textarea.resizable');\n pageContainer.find('.item-input').each(function () {\n var itemInput = $(this);\n var notInputs = ['checkbox', 'button', 'submit', 'range', 'radio', 'image'];\n itemInput.find('input, select, textarea').each(function () {\n var input = $(this);\n if (notInputs.indexOf(input.attr('type')) < 0) {\n itemInput.addClass('item-input-field');\n if (input.val().trim() !== '') {\n input.parents('.item-input, .input-field').add(input.parents('.item-inner')).addClass('not-empty-state');\n }\n }\n });\n if (itemInput.parents('.input-item, .inputs-list').length > 0) return;\n itemInput.parents('.list-block').eq(0).addClass('inputs-list');\n });\n };\n /*======================================================\n ************ Material Focus Inputs ************\n ======================================================*/\n app.initMaterialWatchInputs = function () {\n var notInputs = ['checkbox', 'button', 'submit', 'range', 'radio', 'image'];\n function addFocusState(e) {\n /*jshint validthis:true*/\n var i = $(this);\n var type = i.attr('type');\n if (notInputs.indexOf(type) >= 0) return;\n var els = i.add(i.parents('.item-input, .input-field')).add(i.parents('.item-inner').eq(0));\n els.removeClass('not-empty-state').addClass('focus-state');\n }\n function removeFocusState(e) {\n /*jshint validthis:true*/\n var i = $(this), value = i.val();\n var type = i.attr('type');\n if (notInputs.indexOf(type) >= 0) return;\n var els = i.add(i.parents('.item-input, .input-field')).add(i.parents('.item-inner').eq(0));\n els.removeClass('focus-state');\n if (value && value.trim() !== '') {\n els.removeClass('focus-state').addClass('not-empty-state');\n }\n else {\n els.removeClass('not-empty-state');\n }\n }\n function watchChangeState(e) {\n /*jshint validthis:true*/\n var input = $(this),\n value = input.val();\n var type = input.attr('type');\n if (notInputs.indexOf(type) >= 0) return;\n var els = input.add(input.parents('.item-input, .input-field')).add(input.parents('.item-inner').eq(0));\n if (els.length === 0) return;\n if (value && (typeof value === 'string' && value.trim() !== '') || (Array.isArray(value) && value.length > 0)) {\n els.addClass('not-empty-state');\n }\n else {\n els.removeClass('not-empty-state');\n }\n }\n $(document).on('change', 'input, textarea, select', watchChangeState, true);\n $(document).on('focus', 'input, textarea, select', addFocusState, true);\n $(document).on('blur', 'input, textarea, select', removeFocusState, true);\n };\n \n"," /*======================================================\n ************ Handle Browser's History ************\n ======================================================*/\n app.pushStateQueue = [];\n app.pushStateClearQueue = function () {\n if (app.pushStateQueue.length === 0) return;\n var queue = app.pushStateQueue.pop();\n var animatePages;\n if (app.params.pushStateNoAnimation === true) animatePages = false;\n if (queue.action === 'back') {\n app.router.back(queue.view, {animatePages: animatePages});\n }\n if (queue.action === 'loadPage') {\n app.router.load(queue.view, {url: queue.stateUrl, animatePages: animatePages, pushState: false});\n }\n if (queue.action === 'loadContent') {\n app.router.load(queue.view, {content: queue.stateContent, animatePages: animatePages, pushState: false});\n }\n if (queue.action === 'loadPageName') {\n app.router.load(queue.view, {pageName: queue.statePageName, url: queue.stateUrl, animatePages: animatePages, pushState: false});\n }\n };\n \n app.initPushState = function () {\n var blockPopstate = true;\n $(window).on('load', function () {\n setTimeout(function () {\n blockPopstate = false;\n }, 0);\n });\n \n if (document.readyState && document.readyState === 'complete') {\n blockPopstate = false;\n }\n \n function handlePopState(e) {\n if (blockPopstate) return;\n var mainView = app.mainView;\n if (!mainView) return;\n var state = e.state;\n if (!state) {\n state = {\n viewIndex: app.views.indexOf(mainView),\n url : mainView.history[0]\n };\n }\n if (state.viewIndex < 0) return;\n var view = app.views[state.viewIndex];\n var stateUrl = state && state.url || undefined;\n var stateContent = state && state.content || undefined;\n var statePageName = state && state.pageName || undefined;\n var animatePages;\n \n if (app.params.pushStateNoAnimation === true) animatePages = false;\n \n if (stateUrl !== view.url) {\n if (view.history.indexOf(stateUrl) >= 0) {\n // Go Back\n if (view.allowPageChange) {\n app.router.back(view, {url:undefined, animatePages: animatePages, pushState: false, preloadOnly:false});\n }\n else {\n app.pushStateQueue.push({\n action: 'back',\n view: view\n });\n }\n }\n else if (stateContent) {\n // Load Page\n if (view.allowPageChange) {\n app.router.load(view, {content:stateContent, animatePages: animatePages, pushState: false});\n }\n else {\n app.pushStateQueue.unshift({\n action: 'loadContent',\n stateContent: stateContent,\n view: view\n });\n }\n \n }\n else if (statePageName) {\n // Load Page by page name with Dom Cache\n if (view.allowPageChange) {\n app.router.load(view, {pageName:statePageName, url: stateUrl, animatePages: animatePages, pushState: false});\n }\n else {\n app.pushStateQueue.unshift({\n action: 'loadPageName',\n statePageName: statePageName,\n view: view\n });\n }\n }\n else {\n // Load Page\n if (view.allowPageChange) {\n app.router.load(view, {url:stateUrl, animatePages: animatePages, pushState: false});\n }\n else {\n app.pushStateQueue.unshift({\n action: 'loadPage',\n stateUrl: stateUrl,\n view: view\n });\n }\n }\n }\n }\n $(window).on('popstate', handlePopState);\n };\n \n"," /*===========================\n Framework7 Swiper Additions\n ===========================*/\n app.swiper = function (container, params) {\n return new Swiper(container, params);\n };\n app.initPageSwiper = function (pageContainer) {\n pageContainer = $(pageContainer);\n var swipers = pageContainer.find('.swiper-init, .tabs-swipeable-wrap');\n if (swipers.length === 0) return;\n function destroySwiperOnRemove(slider) {\n function destroySwiper() {\n slider.destroy();\n pageContainer.off('page:beforeremove', destroySwiper);\n }\n pageContainer.on('page:beforeremove', destroySwiper);\n }\n swipers.each(function () {\n var swiper = $(this), initialSlide;\n var params;\n if (swiper.hasClass('tabs-swipeable-wrap')) {\n swiper.addClass('swiper-container').children('.tabs').addClass('swiper-wrapper').children('.tab').addClass('swiper-slide');\n initialSlide = swiper.children('.tabs').children('.tab.active').index();\n }\n if (swiper.data('swiper')) {\n params = JSON.parse(swiper.data('swiper'));\n }\n else {\n params = swiper.dataset();\n }\n if (typeof params.initialSlide === 'undefined' && typeof initialSlide !== 'undefined') {\n params.initialSlide = initialSlide;\n }\n if (swiper.hasClass('tabs-swipeable-wrap')) {\n params.onSlideChangeStart = function (s) {\n app.showTab(s.slides.eq(s.activeIndex));\n };\n }\n var _slider = app.swiper(swiper[0], params);\n destroySwiperOnRemove(_slider);\n });\n };\n app.reinitPageSwiper = function (pageContainer) {\n pageContainer = $(pageContainer);\n var sliders = pageContainer.find('.swiper-init, .tabs-swipeable-wrap');\n if (sliders.length === 0) return;\n for (var i = 0; i < sliders.length; i++) {\n var sliderInstance = sliders[0].swiper;\n if (sliderInstance) {\n sliderInstance.update(true);\n }\n }\n };\n \n"," /*======================================================\n ************ Photo Browser ************\n ======================================================*/\n var PhotoBrowser = function (params) {\n var pb = this, i;\n \n var defaults = {\n photos : [],\n initialSlide: 0,\n spaceBetween: 20,\n speed: 300,\n zoom: true,\n zoomMax: 3,\n zoomMin: 1,\n exposition: true,\n expositionHideCaptions: false,\n type: 'standalone',\n navbar: true,\n toolbar: true,\n theme: 'light',\n swipeToClose: true,\n backLinkText: 'Close',\n ofText: 'of',\n loop: false,\n lazyLoading: false,\n lazyLoadingInPrevNext: false,\n lazyLoadingOnTransitionStart: false,\n material: app.params.material,\n materialPreloaderSvg: app.params.materialPreloaderSvg,\n materialPreloaderHtml: app.params.materialPreloaderHtml,\n /*\n Callbacks:\n onLazyImageLoad(pb, slide, img)\n onLazyImageReady(pb, slide, img)\n onOpen(pb)\n onClose(pb)\n onTransitionStart(swiper)\n onTransitionEnd(swiper)\n onSlideChangeStart(swiper)\n onSlideChangeEnd(swiper)\n onTap(swiper, e)\n onClick(swiper, e)\n onDoubleTap(swiper, e)\n onSwipeToClose(pb)\n */\n };\n \n params = params || {};\n if (!params.backLinkText && app.params.material) defaults.backLinkText = '';\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n if (params.maxZoom) {\n params.zoomMax = params.maxZoom;\n }\n if (params.minZoom) {\n params.zoomMin = params.minZoom;\n }\n \n pb.params = params;\n pb.params.iconsColorClass = pb.params.iconsColor ? 'color-' + pb.params.iconsColor : (pb.params.theme === 'dark' ? 'color-white' : '');\n pb.params.preloaderColorClass = pb.params.theme === 'dark' ? 'preloader-white' : '';\n \n // Templates\n var photoTemplate = pb.params.photoTemplate ||\n '
                      ' +\n '' +\n '' +\n '' +\n '
                      ';\n var photoLazyTemplate = pb.params.lazyPhotoTemplate ||\n '
                      ' +\n '
                      {{#if @root.material}}{{@root.materialPreloaderHtml}}{{/if}}
                      ' +\n '' +\n '' +\n '' +\n '
                      ';\n var objectTemplate = pb.params.objectTemplate ||\n '
                      {{js \"this.html || this\"}}
                      ';\n var captionTemplate = pb.params.captionTemplate ||\n '
                      ' +\n '{{caption}}' +\n '
                      ';\n var navbarTemplate = pb.params.navbarTemplate ||\n '
                      ' +\n '
                      ' +\n '' +\n '
                      ' +\n ' ' +\n '{{ofText}} ' +\n '' +\n '
                      ' +\n '
                      ' +\n '
                      ' +\n '
                      ';\n var toolbarTemplate = pb.params.toolbarTemplate ||\n '
                      ' +\n '
                      ' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '
                      ' +\n '
                      ';\n \n var htmlTemplate = t7.compile('
                      ' +\n '
                      ' +\n '{{#unless material}}{{#if navbar}}' +\n navbarTemplate +\n '{{/if}}{{/unless}}' +\n '
                      ' +\n '{{#if material}}{{#if navbar}}' +\n navbarTemplate +\n '{{/if}}{{/if}}' +\n '{{#if toolbar}}' +\n toolbarTemplate +\n '{{/if}}' +\n '
                      ' +\n '{{#each photos}}{{#if caption}}' +\n captionTemplate +\n '{{/if}}{{/each}}' +\n '
                      ' +\n '
                      ' +\n '
                      ' +\n '{{#each photos}}' +\n '{{#js_compare \"this.html || ((typeof this === \\'string\\' || this instanceof String) && (this.indexOf(\\'<\\') >= 0 || this.indexOf(\\'>\\') >= 0))\"}}' +\n objectTemplate +\n '{{else}}' +\n '{{#if @root.lazyLoading}}' +\n photoLazyTemplate +\n '{{else}}' +\n photoTemplate +\n '{{/if}}' +\n '{{/js_compare}}' +\n '{{/each}}' +\n '
                      ' +\n '
                      ' +\n '
                      ' +\n '
                      ' +\n '
                      ')(pb.params);\n \n pb.activeIndex = pb.params.initialSlide;\n pb.openIndex = pb.activeIndex;\n pb.opened = false;\n \n pb.open = function (index) {\n if (typeof index === 'undefined') index = pb.activeIndex;\n index = parseInt(index, 10);\n if (pb.opened && pb.swiper) {\n pb.swiper.slideTo(index);\n return;\n }\n pb.opened = true;\n pb.openIndex = index;\n if (pb.params.type === 'standalone') {\n app.root.append(htmlTemplate);\n }\n if (pb.params.type === 'popup') {\n pb.popup = app.popup('
                      ' + htmlTemplate + '
                      ');\n $(pb.popup).on('popup:closed', pb.onPopupClose);\n }\n if (pb.params.type === 'page') {\n $(document).once('page:beforeinit', pb.onPageBeforeInit);\n $(document).once('page:beforeremove', pb.onPageBeforeRemove);\n if (!pb.params.view) pb.params.view = app.mainView;\n pb.params.view.loadContent(htmlTemplate);\n return;\n }\n pb.layout(pb.openIndex);\n if (pb.params.onOpen) {\n pb.params.onOpen(pb);\n }\n \n };\n pb.close = function () {\n pb.opened = false;\n if (!pb.swiperContainer || pb.swiperContainer.length === 0) {\n return;\n }\n if (pb.params.onClose) {\n pb.params.onClose(pb);\n }\n // Detach events\n pb.attachEvents(true);\n // Delete from DOM\n if (pb.params.type === 'standalone') {\n pb.container.removeClass('photo-browser-in').addClass('photo-browser-out').animationEnd(function () {\n pb.container.remove();\n });\n }\n // Destroy slider\n pb.swiper.destroy();\n // Delete references\n pb.swiper = pb.swiperContainer = pb.swiperWrapper = pb.slides = undefined; //gestureSlide = gestureImg = gestureImgWrap = undefined;\n };\n \n pb.onPopupClose = function (e) {\n pb.close();\n $(pb.popup).off('page:beforeinit', pb.onPopupClose);\n };\n pb.onPageBeforeInit = function (e) {\n if (e.detail.page.name === 'photo-browser-slides') {\n pb.layout(pb.openIndex);\n if (pb.params.onOpen) {\n pb.params.onOpen(pb);\n }\n }\n };\n pb.onPageBeforeRemove = function (e) {\n if (e.detail.page.name === 'photo-browser-slides') {\n pb.close();\n }\n };\n \n pb.onSliderTransitionStart = function (swiper) {\n pb.activeIndex = swiper.activeIndex;\n \n var current = swiper.activeIndex + 1;\n var total = swiper.slides.length;\n if (pb.params.loop) {\n total = total - 2;\n current = current - swiper.loopedSlides;\n if (current < 1) current = total + current;\n if (current > total) current = current - total;\n }\n pb.container.find('.photo-browser-current').text(current);\n pb.container.find('.photo-browser-total').text(total);\n \n $('.photo-browser-prev, .photo-browser-next').removeClass('photo-browser-link-inactive');\n \n if (swiper.isBeginning && !pb.params.loop) {\n $('.photo-browser-prev').addClass('photo-browser-link-inactive');\n }\n if (swiper.isEnd && !pb.params.loop) {\n $('.photo-browser-next').addClass('photo-browser-link-inactive');\n }\n \n // Update captions\n if (pb.captions.length > 0) {\n pb.captionsContainer.find('.photo-browser-caption-active').removeClass('photo-browser-caption-active');\n var captionIndex = pb.params.loop ? swiper.slides.eq(swiper.activeIndex).attr('data-swiper-slide-index') : pb.activeIndex;\n pb.captionsContainer.find('[data-caption-index=\"' + captionIndex + '\"]').addClass('photo-browser-caption-active');\n }\n \n \n // Stop Video\n var previousSlideVideo = swiper.slides.eq(swiper.previousIndex).find('video');\n if (previousSlideVideo.length > 0) {\n if ('pause' in previousSlideVideo[0]) previousSlideVideo[0].pause();\n }\n // Callback\n if (pb.params.onTransitionStart) pb.params.onTransitionStart(swiper);\n };\n pb.onSliderTransitionEnd = function (swiper) {\n if (pb.params.onTransitionEnd) pb.params.onTransitionEnd(swiper);\n };\n \n pb.layout = function (index) {\n if (pb.params.type === 'page') {\n pb.container = $('.photo-browser-swiper-container').parents('.view');\n }\n else {\n pb.container = $('.photo-browser');\n }\n if (pb.params.type === 'standalone') {\n pb.container.addClass('photo-browser-in');\n app.sizeNavbars(pb.container);\n }\n pb.swiperContainer = pb.container.find('.photo-browser-swiper-container');\n pb.swiperWrapper = pb.container.find('.photo-browser-swiper-wrapper');\n pb.slides = pb.container.find('.photo-browser-slide');\n pb.captionsContainer = pb.container.find('.photo-browser-captions');\n pb.captions = pb.container.find('.photo-browser-caption');\n \n var sliderSettings = {\n nextButton: pb.params.nextButton || '.photo-browser-next',\n prevButton: pb.params.prevButton || '.photo-browser-prev',\n indexButton: pb.params.indexButton,\n initialSlide: index,\n spaceBetween: pb.params.spaceBetween,\n speed: pb.params.speed,\n loop: pb.params.loop,\n lazyLoading: pb.params.lazyLoading,\n lazyLoadingInPrevNext: pb.params.lazyLoadingInPrevNext,\n lazyLoadingOnTransitionStart: pb.params.lazyLoadingOnTransitionStart,\n preloadImages: pb.params.lazyLoading ? false : true,\n zoom: pb.params.zoom,\n zoomMax: pb.params.zoomMax,\n zoomMin: pb.params.zoomMin,\n onTap: function (swiper, e) {\n if (pb.params.onTap) pb.params.onTap(swiper, e);\n },\n onClick: function (swiper, e) {\n if (pb.params.exposition) pb.toggleExposition();\n if (pb.params.onClick) pb.params.onClick(swiper, e);\n },\n onDoubleTap: function (swiper, e) {\n // pb.toggleZoom(e);\n if (pb.params.onDoubleTap) pb.params.onDoubleTap(swiper, e);\n },\n onTransitionStart: function (swiper) {\n pb.onSliderTransitionStart(swiper);\n },\n onTransitionEnd: function (swiper) {\n pb.onSliderTransitionEnd(swiper);\n },\n onSlideChangeStart: pb.params.onSlideChangeStart,\n onSlideChangeEnd: pb.params.onSlideChangeEnd,\n onLazyImageLoad: function (swiper, slide, img) {\n if (pb.params.onLazyImageLoad) pb.params.onLazyImageLoad(pb, slide, img);\n },\n onLazyImageReady: function (swiper, slide, img) {\n $(slide).removeClass('photo-browser-slide-lazy');\n if (pb.params.onLazyImageReady) pb.params.onLazyImageReady(pb, slide, img);\n }\n };\n \n if (pb.params.swipeToClose && pb.params.type !== 'page') {\n sliderSettings.onTouchStart = pb.swipeCloseTouchStart;\n sliderSettings.onTouchMoveOpposite = pb.swipeCloseTouchMove;\n sliderSettings.onTouchEnd = pb.swipeCloseTouchEnd;\n }\n \n pb.swiper = app.swiper(pb.swiperContainer, sliderSettings);\n if (index === 0) {\n pb.onSliderTransitionStart(pb.swiper);\n }\n pb.attachEvents();\n };\n pb.attachEvents = function (detach) {\n var action = detach ? 'off' : 'on';\n pb.container.find('.photo-browser-close-link')[action]('click', pb.close);\n };\n \n \n // Expose\n pb.exposed = false;\n pb.toggleExposition = function () {\n if (pb.container) pb.container.toggleClass('photo-browser-exposed');\n if (pb.params.expositionHideCaptions) pb.captionsContainer.toggleClass('photo-browser-captions-exposed');\n pb.exposed = !pb.exposed;\n };\n pb.enableExposition = function () {\n if (pb.container) pb.container.addClass('photo-browser-exposed');\n if (pb.params.expositionHideCaptions) pb.captionsContainer.addClass('photo-browser-captions-exposed');\n pb.exposed = true;\n };\n pb.disableExposition = function () {\n if (pb.container) pb.container.removeClass('photo-browser-exposed');\n if (pb.params.expositionHideCaptions) pb.captionsContainer.removeClass('photo-browser-captions-exposed');\n pb.exposed = false;\n };\n \n // Swipe Up To Close\n var swipeToCloseIsTouched = false;\n var allowSwipeToClose = true;\n var swipeToCloseDiff, swipeToCloseStart, swipeToCloseCurrent, swipeToCloseStarted = false, swipeToCloseActiveSlide, swipeToCloseTimeStart;\n pb.swipeCloseTouchStart = function (swiper, e) {\n if (!allowSwipeToClose) return;\n swipeToCloseIsTouched = true;\n };\n pb.swipeCloseTouchMove = function (swiper, e) {\n if (!swipeToCloseIsTouched) return;\n if (!swipeToCloseStarted) {\n swipeToCloseStarted = true;\n swipeToCloseStart = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n swipeToCloseActiveSlide = pb.swiper.slides.eq(pb.swiper.activeIndex);\n swipeToCloseTimeStart = (new Date()).getTime();\n }\n e.preventDefault();\n swipeToCloseCurrent = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n swipeToCloseDiff = swipeToCloseStart - swipeToCloseCurrent;\n var opacity = 1 - Math.abs(swipeToCloseDiff) / 300;\n swipeToCloseActiveSlide.transform('translate3d(0,' + (-swipeToCloseDiff) + 'px,0)');\n pb.swiper.container.css('opacity', opacity).transition(0);\n };\n pb.swipeCloseTouchEnd = function (swiper, e) {\n swipeToCloseIsTouched = false;\n if (!swipeToCloseStarted) {\n swipeToCloseStarted = false;\n return;\n }\n swipeToCloseStarted = false;\n allowSwipeToClose = false;\n var diff = Math.abs(swipeToCloseDiff);\n var timeDiff = (new Date()).getTime() - swipeToCloseTimeStart;\n if ((timeDiff < 300 && diff > 20) || (timeDiff >= 300 && diff > 100)) {\n setTimeout(function () {\n if (pb.params.type === 'standalone') {\n pb.close();\n }\n if (pb.params.type === 'popup') {\n app.closeModal(pb.popup);\n }\n if (pb.params.onSwipeToClose) {\n pb.params.onSwipeToClose(pb);\n }\n allowSwipeToClose = true;\n }, 0);\n return;\n }\n if (diff !== 0) {\n swipeToCloseActiveSlide.addClass('transitioning').transitionEnd(function () {\n allowSwipeToClose = true;\n swipeToCloseActiveSlide.removeClass('transitioning');\n });\n }\n else {\n allowSwipeToClose = true;\n }\n pb.swiper.container.css('opacity', '').transition('');\n swipeToCloseActiveSlide.transform('');\n };\n \n return pb;\n };\n \n app.photoBrowser = function (params) {\n return new PhotoBrowser(params);\n };\n \n"," /*===============================================================================\n ************ Autocomplete ************\n ===============================================================================*/\n var Autocomplete = function (params) {\n var a = this;\n \n // Params\n var defaults = {\n // Standalone Options\n /*\n opener: undefined,\n */\n popupCloseText: 'Close',\n backText: 'Back',\n searchbarPlaceholderText: 'Search...',\n searchbarCancelText: 'Cancel',\n openWithAnimation: true,\n // When opened in page should the searchbar be focused by default\n autoFocus: false,\n openIn: 'page',\n backOnSelect: false,\n notFoundText: 'Nothing found',\n requestSourceOnOpen: false,\n /*\n pageTitle: undefined,\n */\n \n // Handle Data\n /*\n source: undefined,\n limit: undefined,\n */\n valueProperty: 'id',\n textProperty: 'text',\n \n // Dropdown Options\n highlightMatches: true,\n \n /*\n dropdownPlaceholderText: 'Type anything...',\n */\n updateInputValueOnSelect: true,\n expandInput: false,\n \n // Preloader\n preloaderColor: false,\n preloader: false,\n \n // Templates\n /*\n itemTemplate: undefined,\n navbarTemplate: undefined,\n dropdownTemplate: undefined\n dropdownItemTemplate: undefined,\n dropdownPlaceholderTemplate: undefined\n */\n \n // Color themes\n /*\n navbarTheme: undefined,\n formTheme: undefined,\n */\n \n // Callbacks\n /*\n onChange: function (a, value) - for not dropdown\n onOpen: function (a)\n onClose: function (a)\n */\n };\n \n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n a.params = params;\n \n // Opener Link & View\n if (a.params.opener) {\n a.opener = $(a.params.opener);\n }\n var view = a.params.view;\n if (!a.params.view && a.opener && a.opener.length) {\n // Find related view\n view = a.opener.parents('.' + app.params.viewClass);\n if (view.length === 0) return;\n view = view[0].f7View;\n }\n \n // Input\n if (a.params.input) {\n a.input = $(a.params.input);\n if (a.input.length === 0 && a.params.openIn === 'dropdown') return;\n }\n \n // Array with selected items\n a.value = a.params.value || [];\n \n // ID & Inputs\n a.id = (new Date()).getTime();\n a.inputType = a.params.multiple ? 'checkbox' : 'radio';\n a.inputName = a.inputType + '-' + a.id;\n \n // Is Material\n var material = app.params.material;\n \n // Back On Select\n var backOnSelect = a.params.backOnSelect;\n \n if (a.params.openIn !== 'dropdown') {\n // Item Template\n a.itemTemplate = t7.compile(a.params.itemTemplate ||\n '
                    • ' +\n '' +\n '
                    • '\n );\n // Page Layout\n var pageTitle = a.params.pageTitle || '';\n if (!pageTitle && a.opener && a.opener.length) {\n pageTitle = a.opener.find('.item-title').text();\n }\n var pageName = 'autocomplete-' + a.inputName;\n \n var navbarTheme = a.params.navbarTheme,\n formTheme = a.params.formTheme;\n \n // Navbar HTML\n var navbarHTML;\n var noNavbar = '', noToolbar = '', navbarLayout;\n \n a.navbarTemplate = t7.compile(a.params.navbarTemplate ||\n '
                      ' +\n '
                      ' +\n '
                      ' +\n '{{#if material}}' +\n '' +\n '{{else}}' +\n '' +\n '' +\n '{{#if inPopup}}' +\n '{{popupCloseText}}' +\n '{{else}}' +\n '{{backText}}' +\n '{{/if}}' +\n '' +\n '{{/if}}' +\n '
                      ' +\n '
                      {{pageTitle}}
                      ' +\n '{{#if preloader}}' +\n '
                      ' +\n '
                      ' +\n '
                      ' +\n '{{/if}}' +\n '
                      ' +\n '
                      '\n );\n navbarHTML = a.navbarTemplate({\n pageTitle: pageTitle,\n backText: a.params.backText,\n popupCloseText: a.params.popupCloseText,\n openIn: a.params.openIn,\n navbarTheme: navbarTheme,\n inPopup: a.params.openIn === 'popup',\n inPage: a.params.openIn === 'page',\n material: material,\n preloader: a.params.preloader,\n preloaderColor: a.params.preloaderColor,\n animated: a.params.openWithAnimation\n });\n \n // Determine navbar layout type - static/fixed/through\n if (a.params.openIn === 'page') {\n navbarLayout = 'static';\n if (a.opener) {\n if (a.opener.parents('.navbar-through').length > 0) navbarLayout = 'through';\n if (a.opener.parents('.navbar-fixed').length > 0) navbarLayout = 'fixed';\n noToolbar = a.opener.parents('.page').hasClass('no-toolbar') ? 'no-toolbar' : '';\n noNavbar = a.opener.parents('.page').hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout;\n }\n else if (view.container) {\n if ($(view.container).hasClass('navbar-through') || $(view.container).find('.navbar-through').length > 0) navbarLayout = 'through';\n if ($(view.container).hasClass('navbar-fixed') || $(view.container).find('.navbar-fixed').length > 0) navbarLayout = 'fixed';\n noToolbar = $(view.activePage.container).hasClass('no-toolbar') ? 'no-toolbar' : '';\n noNavbar = $(view.activePage.container).hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout;\n }\n }\n else {\n navbarLayout = 'fixed';\n }\n var searchbarHTML =\n '
                      ' +\n '
                      ' +\n '' +\n '' +\n '
                      ' +\n (material ? '' : '' + a.params.searchbarCancelText + '') +\n '
                      ' +\n '
                      ';\n var pageHTML =\n (navbarLayout === 'through' ? navbarHTML : '') +\n '
                      ' +\n '
                      ' +\n (navbarLayout === 'fixed' ? navbarHTML : '') +\n searchbarHTML +\n '
                      ' +\n (navbarLayout === 'static' ? navbarHTML : '') +\n '
                      ' +\n '
                        ' +\n '
                        ' +\n '
                        ' +\n '
                        • ' + a.params.notFoundText + '
                        ' +\n '
                        ' +\n '
                        ' +\n '
                          ' +\n '
                          ' +\n '
                          ' +\n '
                          ' +\n '
                          ';\n }\n else {\n a.dropdownItemTemplate = t7.compile(a.params.dropdownItemTemplate ||\n '
                        • ' +\n '' +\n '
                        • '\n );\n a.dropdownPlaceholderTemplate = t7.compile(a.params.dropdownPlaceholderTemplate ||\n '
                        • ' +\n '
                          ' +\n '
                          ' +\n '
                          {{text}}
                          ' +\n '
                          ' +\n '' +\n '
                        • '\n );\n a.dropdownTemplate = t7.compile(a.params.dropdownTemplate ||\n '
                          ' +\n '
                          ' +\n '
                          ' +\n '
                            ' +\n '
                            ' +\n '
                            ' +\n '{{#if preloader}}' +\n '
                            {{#if material}}{{materialPreloaderHtml}}{{/if}}
                            ' +\n '{{/if}}' +\n '
                            '\n );\n }\n \n // Define popup\n a.popup = undefined;\n \n // Define Dropdown\n a.dropdown = undefined;\n \n // Handle Input Value Change\n function handleInputValue (e) {\n var query = a.input.val();\n if (a.params.source) {\n a.params.source(a, query, function (items) {\n var itemsHTML = '';\n var limit = a.params.limit ? Math.min(a.params.limit, items.length) : items.length;\n a.items = items;\n var i, j, regExp;\n if (a.params.highlightMatches) {\n query = query.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n regExp = new RegExp('('+query+')', 'i');\n }\n \n for (i = 0; i < limit; i++) {\n var itemValue = typeof items[i] === 'object' ? items[i][a.params.valueProperty] : items[i];\n var itemText = typeof items[i] !== 'object' ? items[i] : items[i][a.params.textProperty];\n itemsHTML += a.dropdownItemTemplate({\n value: itemValue,\n text: a.params.highlightMatches ? itemText.replace(regExp, '$1') : itemText\n });\n }\n if (itemsHTML === '' && query === '' && a.params.dropdownPlaceholderText) {\n itemsHTML += a.dropdownPlaceholderTemplate({\n text: a.params.dropdownPlaceholderText,\n });\n }\n a.dropdown.find('ul').html(itemsHTML);\n });\n }\n }\n // Handle Drop Down Click\n function handleDropdownClick (e) {\n /*jshint validthis:true */\n var clicked = $(this);\n var clickedItem;\n for (var i = 0; i < a.items.length; i++) {\n var itemValue = typeof a.items[i] === 'object' ? a.items[i][a.params.valueProperty] : a.items[i];\n var value = clicked.attr('data-value');\n if (itemValue === value || itemValue * 1 === value * 1) {\n clickedItem = a.items[i];\n }\n }\n if (a.params.updateInputValueOnSelect) {\n a.input.val(typeof clickedItem === 'object' ? clickedItem[a.params.valueProperty] : clickedItem);\n a.input.trigger('input change');\n }\n \n if (a.params.onChange) {\n a.params.onChange(a, clickedItem);\n }\n \n a.close();\n }\n \n // Handle HTML Click to close Dropdown\n function closeOnHTMLClick (e) {\n var target = $(e.target);\n if (!(target.is(a.input[0]) || a.dropdown && target.parents(a.dropdown[0]).length > 0)) {\n a.close();\n }\n }\n \n a.positionDropDown = function () {\n var listBlock = a.input.parents('.list-block'),\n pageContent = a.input.parents('.page-content'),\n paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-top'), 10),\n // inputOffset = a.input.offset(),\n listBlockOffsetLeft = listBlock.length > 0 ? listBlock.offset().left - listBlock.parent().offset().left : 0,\n inputOffsetLeft = a.input.offset().left - (listBlock.length > 0 ? listBlock.offset().left : 0),\n inputOffsetTop = a.input.offset().top - (pageContent.offset().top - pageContent[0].scrollTop),\n maxHeight = pageContent[0].scrollHeight - paddingBottom - (inputOffsetTop + pageContent[0].scrollTop) - a.input[0].offsetHeight;\n \n a.dropdown.css({\n left: (listBlock.length > 0 ? listBlockOffsetLeft : inputOffsetLeft) + 'px',\n top: inputOffsetTop + pageContent[0].scrollTop + a.input[0].offsetHeight + 'px',\n width: (listBlock.length > 0 ? listBlock[0].offsetWidth : a.input[0].offsetWidth) + 'px'\n });\n a.dropdown.children('.autocomplete-dropdown-inner').css({\n maxHeight: maxHeight + 'px',\n paddingLeft: listBlock.length > 0 && !a.params.expandInput ? inputOffsetLeft - (material ? 16 : 15) + 'px' : ''\n });\n };\n \n a.pageInit = function (e) {\n var page = e.detail.page;\n a.page = $(page.container);\n a.pageData = page;\n if (page.name !== pageName) {\n return;\n }\n var container = $(page.container);\n \n // Source\n function onSource(query) {\n if (!a.params.source) return;\n var i, j, k;\n \n a.params.source(a, query, function(items) {\n var itemsHTML = '';\n var limit = a.params.limit ? Math.min(a.params.limit, items.length) : items.length;\n a.items = items;\n for (i = 0; i < limit; i++) {\n var selected = false;\n var itemValue = typeof items[i] === 'object' ? items[i][a.params.valueProperty] : items[i];\n for (j = 0; j < a.value.length; j++) {\n var aValue = typeof a.value[j] === 'object' ? a.value[j][a.params.valueProperty] : a.value[j];\n if (aValue === itemValue || aValue * 1 === itemValue * 1) selected = true;\n }\n itemsHTML += a.itemTemplate({\n value: itemValue,\n text: typeof items[i] !== 'object' ? items[i] : items[i][a.params.textProperty],\n inputType: a.inputType,\n id: a.id,\n inputName: a.inputName,\n selected: selected,\n checkbox: a.inputType === 'checkbox',\n material: material\n });\n }\n container.find('.autocomplete-found ul').html(itemsHTML);\n if (items.length === 0) {\n if (query.length !== 0) {\n container.find('.autocomplete-not-found').show();\n container.find('.autocomplete-found, .autocomplete-values').hide();\n }\n else {\n container.find('.autocomplete-values').show();\n container.find('.autocomplete-found, .autocomplete-not-found').hide();\n }\n }\n else {\n container.find('.autocomplete-found').show();\n container.find('.autocomplete-not-found, .autocomplete-values').hide();\n }\n });\n }\n \n // Init Search Bar\n var searchbar = app.searchbar(container.find('.searchbar'), {\n customSearch: true,\n onSearch: function (searchbar, data) {\n if (data.query.length === 0 && searchbar.active) {\n searchbar.overlay.addClass('searchbar-overlay-active');\n }\n else {\n searchbar.overlay.removeClass('searchbar-overlay-active');\n }\n \n onSource(data.query);\n }\n });\n \n // Save searchbar instance\n a.searchbar = searchbar;\n \n // Update values\n function updateValues() {\n var valuesHTML = '';\n var i;\n for (i = 0; i < a.value.length; i++) {\n \n valuesHTML += a.itemTemplate({\n value: typeof a.value[i] === 'object' ? a.value[i][a.params.valueProperty] : a.value[i],\n text: typeof a.value[i] === 'object' ? a.value[i][a.params.textProperty]: a.value[i],\n inputType: a.inputType,\n id: a.id,\n inputName: a.inputName + '-checked',\n checkbox: a.inputType === 'checkbox',\n material: material,\n selected: true\n });\n }\n container.find('.autocomplete-values ul').html(valuesHTML);\n }\n \n // Handle Inputs\n if (!a.params.multiple && a.params.backOnSelect) {\n container.once('click', '.list-block label', function () {\n if (a.params.openIn === 'popup') app.closeModal(a.popup);\n else view.router.back({animatePages: a.params.openWithAnimation});\n });\n }\n container.on('change', 'input[type=\"radio\"], input[type=\"checkbox\"]', function () {\n var i;\n var input = this;\n var value = input.value;\n var text = $(input).parents('li').find('.item-title').text();\n var isValues = $(input).parents('.autocomplete-values').length > 0;\n var item, itemValue, aValue;\n if (isValues) {\n if (a.inputType === 'checkbox' && !input.checked) {\n for (i = 0; i < a.value.length; i++) {\n aValue = typeof a.value[i] === 'string' ? a.value[i] : a.value[i][a.params.valueProperty];\n if (aValue === value || aValue * 1 === value * 1) {\n a.value.splice(i, 1);\n }\n }\n updateValues();\n if (a.params.onChange) a.params.onChange(a, a.value);\n }\n return;\n }\n \n // Find Related Item\n for (i = 0; i < a.items.length; i++) {\n itemValue = typeof a.items[i] === 'string' ? a.items[i] : a.items[i][a.params.valueProperty];\n if (itemValue === value || itemValue * 1 === value * 1) item = a.items[i];\n }\n // Update Selected Value\n if (a.inputType === 'radio') {\n a.value = [item];\n }\n else {\n if (input.checked) {\n a.value.push(item);\n }\n else {\n for (i = 0; i < a.value.length; i++) {\n aValue = typeof a.value[i] === 'string' ? a.value[i] : a.value[i][a.params.valueProperty];\n if (aValue === value || aValue * 1 === value * 1) {\n a.value.splice(i, 1);\n }\n }\n }\n }\n \n // Update Values Block\n updateValues();\n \n // On Select Callback\n if ((a.inputType === 'radio' && input.checked || a.inputType === 'checkbox') && a.params.onChange ) {\n a.params.onChange(a, a.value);\n }\n });\n \n // Update Values On Page Init\n updateValues();\n \n // Source on load\n if (a.params.requestSourceOnOpen) onSource('');\n \n // On Open Callback\n if (a.params.onOpen) a.params.onOpen(a);\n };\n \n // Show Hide Preloader\n a.showPreloader = function () {\n if (a.params.openIn === 'dropdown') {\n if (a.dropdown) a.dropdown.find('.autocomplete-preloader').addClass('autocomplete-preloader-visible');\n }\n else $('.autocomplete-preloader').addClass('autocomplete-preloader-visible');\n };\n \n a.hidePreloader = function () {\n if (a.params.openIn === 'dropdown') {\n if (a.dropdown) a.dropdown.find('.autocomplete-preloader').removeClass('autocomplete-preloader-visible');\n }\n else $('.autocomplete-preloader').removeClass('autocomplete-preloader-visible');\n };\n \n // Autofocus\n a.autoFocus = function (e) {\n var self = this;\n setTimeout(function () {\n $(self).find('input[type=search]').focus();\n }, 0);\n };\n \n // Open Autocomplete Page/Popup\n a.open = function () {\n if (a.opened) return;\n a.opened = true;\n if (a.params.openIn === 'dropdown') {\n if (!a.dropdown) {\n a.dropdown = $(a.dropdownTemplate({\n preloader: a.params.preloader,\n preloaderColor: a.params.preloaderColor,\n material: material,\n materialPreloaderHtml: app.params.materialPreloaderHtml\n }));\n a.dropdown.on('click', 'label', handleDropdownClick);\n \n }\n var listBlock = a.input.parents('.list-block');\n if (listBlock.length && a.input.parents('.item-content').length > 0 && a.params.expandInput) {\n a.input.parents('.item-content').addClass('item-content-dropdown-expand');\n }\n a.positionDropDown();\n a.input.parents('.page-content').append(a.dropdown);\n a.dropdown.addClass('autocomplete-dropdown-in');\n a.input.trigger('input');\n app.onResize(a.positionDropDown);\n if (a.params.onOpen) a.params.onOpen(a);\n }\n else {\n $(document).once('page:init', '.autocomplete-page', a.pageInit);\n if (a.params.openIn === 'popup') {\n a.popup = app.popup(\n '
                            ' +\n '
                            ' +\n pageHTML +\n '
                            ' +\n '
                            ',\n true,\n a.params.openWithAnimation\n );\n a.popup = $(a.popup);\n if (a.params.autoFocus) {\n if (a.params.openWithAnimation) a.popup.once('popup:opened', a.autoFocus);\n else a.autoFocus.bind(a.popup)();\n }\n a.popup.once('popup:closed', function () {\n a.popup = undefined;\n a.opened = false;\n if (a.params.onClose) a.params.onClose(a);\n });\n }\n else {\n if (a.params.autoFocus) {\n $(document).once(a.params.openWithAnimation ? 'page:afteranimation' : 'page:init', '.autocomplete-page', a.autoFocus);\n }\n view.router.load({\n content: pageHTML,\n animatePages: a.params.openWithAnimation\n });\n $(document).once('page:back', '.autocomplete-page', function () {\n a.opened = false;\n if (a.params.onClose) a.params.onClose(a);\n });\n }\n }\n };\n a.close = function (e) {\n if (!a.opened) return;\n if (a.params.openIn === 'dropdown') {\n if (e && e.type === 'blur' && a.dropdown.find('label.active-state').length > 0) return;\n a.dropdown.removeClass('autocomplete-dropdown-in').remove();\n a.input.parents('.item-content-dropdown-expand').removeClass('item-content-dropdown-expand');\n a.opened = false;\n app.offResize(a.positionDropDown);\n if (a.params.onClose) a.params.onClose(a);\n }\n if (a.params.openIn === 'popup') {\n if (a.popup) app.closeModal(a.popup);\n }\n };\n \n // Init Events\n a.initEvents = function (detach) {\n var method = detach ? 'off' : 'on';\n if (a.params.openIn !== 'dropdown' && a.opener) {\n a.opener[method]('click', a.open);\n }\n if (a.params.openIn === 'dropdown' && a.input) {\n a.input[method]('focus', a.open);\n a.input[method]('input', handleInputValue);\n if (app.device.android) {\n $('html')[method]('click', closeOnHTMLClick);\n }\n else {\n a.input[method]('blur', a.close);\n }\n }\n if (detach && a.dropdown) {\n a.dropdown = null;\n }\n };\n \n // Init/Destroy Methods\n a.init = function () {\n a.initEvents();\n };\n a.destroy = function () {\n a.initEvents(true);\n a = null;\n };\n \n // Init\n a.init();\n \n return a;\n };\n app.autocomplete = function (params) {\n return new Autocomplete(params);\n };\n \n"," /*======================================================\n ************ Picker ************\n ======================================================*/\n var Picker = function (params) {\n var p = this;\n var defaults = {\n updateValuesOnMomentum: false,\n updateValuesOnTouchmove: true,\n rotateEffect: false,\n momentumRatio: 7,\n freeMode: false,\n // Common settings\n closeByOutsideClick: true,\n scrollToInput: true,\n inputReadOnly: true,\n convertToPopover: true,\n onlyInPopover: false,\n toolbar: true,\n toolbarCloseText: 'Done',\n toolbarTemplate:\n '
                            ' +\n '
                            ' +\n '
                            ' +\n '
                            ' +\n '{{closeText}}' +\n '
                            ' +\n '
                            ' +\n '
                            '\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n p.params = params;\n p.cols = [];\n p.initialized = false;\n \n // Inline flag\n p.inline = p.params.container ? true : false;\n \n // 3D Transforms origin bug, only on safari\n var originBug = app.device.ios || (navigator.userAgent.toLowerCase().indexOf('safari') >= 0 && navigator.userAgent.toLowerCase().indexOf('chrome') < 0) && !app.device.android;\n \n // Should be converted to popover\n function isPopover() {\n var toPopover = false;\n if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover;\n if (!p.inline && p.params.input) {\n if (p.params.onlyInPopover) toPopover = true;\n else {\n if (app.device.ios) {\n toPopover = app.device.ipad ? true : false;\n }\n else {\n if (app.width >= 768) toPopover = true;\n }\n }\n }\n return toPopover;\n }\n function inPopover() {\n if (p.opened && p.container && p.container.length > 0 && p.container.parents('.popover').length > 0) return true;\n else return false;\n }\n \n // Value\n p.setValue = function (arrValues, transition) {\n var valueIndex = 0;\n if (p.cols.length === 0) {\n p.value = arrValues;\n p.updateValue(arrValues);\n return;\n }\n for (var i = 0; i < p.cols.length; i++) {\n if (p.cols[i] && !p.cols[i].divider) {\n p.cols[i].setValue(arrValues[valueIndex], transition);\n valueIndex++;\n }\n }\n };\n p.updateValue = function (forceValues) {\n var newValue = forceValues || [];\n var newDisplayValue = [], i, column;\n if (p.cols.length === 0) {\n for (i = 0; i < p.params.cols.length; i++) {\n column = p.params.cols[i];\n if (column.displayValues !== undefined && column.values !== undefined && column.values.indexOf(newValue[i]) !== undefined) {\n newDisplayValue.push(column.displayValues[column.values.indexOf(newValue[i])]);\n }\n else {\n newDisplayValue.push(newValue[i]);\n }\n }\n }\n else {\n for (i = 0; i < p.cols.length; i++) {\n if (!p.cols[i].divider) {\n newValue.push(p.cols[i].value);\n newDisplayValue.push(p.cols[i].displayValue);\n }\n }\n }\n \n if (newValue.indexOf(undefined) >= 0) {\n return;\n }\n p.value = newValue;\n p.displayValue = newDisplayValue;\n if (p.params.onChange) {\n p.params.onChange(p, p.value, p.displayValue);\n }\n if (p.input && p.input.length > 0) {\n $(p.input).val(p.params.formatValue ? p.params.formatValue(p, p.value, p.displayValue) : p.value.join(' '));\n $(p.input).trigger('change');\n }\n };\n \n // Columns Handlers\n p.initPickerCol = function (colElement, updateItems) {\n var colContainer = $(colElement);\n var colIndex = colContainer.index();\n var col = p.cols[colIndex];\n if (col.divider) return;\n col.container = colContainer;\n col.wrapper = col.container.find('.picker-items-col-wrapper');\n col.items = col.wrapper.find('.picker-item');\n \n var i, j;\n var wrapperHeight, itemHeight, itemsHeight, minTranslate, maxTranslate;\n col.replaceValues = function (values, displayValues) {\n col.destroyEvents();\n col.values = values;\n col.displayValues = displayValues;\n var newItemsHTML = p.columnHTML(col, true);\n col.wrapper.html(newItemsHTML);\n col.items = col.wrapper.find('.picker-item');\n col.calcSize();\n col.setValue(col.values[0], 0, true);\n col.initEvents();\n };\n var resizeTimeout;\n col.calcSize = function () {\n if (p.params.rotateEffect) {\n col.container.removeClass('picker-items-col-absolute');\n if (!col.width) col.container.css({width:''});\n }\n var colWidth, colHeight;\n colWidth = 0;\n colHeight = col.container[0].offsetHeight;\n wrapperHeight = col.wrapper[0].offsetHeight;\n itemHeight = col.items[0].offsetHeight;\n itemsHeight = itemHeight * col.items.length;\n minTranslate = colHeight / 2 - itemsHeight + itemHeight / 2;\n maxTranslate = colHeight / 2 - itemHeight / 2;\n if (col.width) {\n colWidth = col.width;\n if (parseInt(colWidth, 10) === colWidth) colWidth = colWidth + 'px';\n col.container.css({width: colWidth});\n }\n if (p.params.rotateEffect) {\n if (!col.width) {\n col.items.each(function () {\n var item = $(this).children('span');\n colWidth = Math.max(colWidth, item[0].offsetWidth);\n });\n col.container.css({width: (colWidth + 2) + 'px'});\n }\n col.container.addClass('picker-items-col-absolute');\n }\n };\n col.calcSize();\n \n col.wrapper.transform('translate3d(0,' + maxTranslate + 'px,0)').transition(0);\n \n \n var activeIndex = 0;\n var animationFrameId;\n \n // Set Value Function\n col.setValue = function (newValue, transition, valueCallbacks) {\n if (typeof transition === 'undefined') transition = '';\n var newActiveIndex = col.wrapper.find('.picker-item[data-picker-value=\"' + newValue + '\"]').index();\n if(typeof newActiveIndex === 'undefined' || newActiveIndex === -1) {\n return;\n }\n var newTranslate = -newActiveIndex * itemHeight + maxTranslate;\n // Update wrapper\n col.wrapper.transition(transition);\n col.wrapper.transform('translate3d(0,' + (newTranslate) + 'px,0)');\n \n // Watch items\n if (p.params.updateValuesOnMomentum && col.activeIndex && col.activeIndex !== newActiveIndex ) {\n $.cancelAnimationFrame(animationFrameId);\n col.wrapper.transitionEnd(function(){\n $.cancelAnimationFrame(animationFrameId);\n });\n updateDuringScroll();\n }\n \n // Update items\n col.updateItems(newActiveIndex, newTranslate, transition, valueCallbacks);\n };\n \n col.updateItems = function (activeIndex, translate, transition, valueCallbacks) {\n if (typeof translate === 'undefined') {\n translate = $.getTranslate(col.wrapper[0], 'y');\n }\n if(typeof activeIndex === 'undefined') activeIndex = -Math.round((translate - maxTranslate)/itemHeight);\n if (activeIndex < 0) activeIndex = 0;\n if (activeIndex >= col.items.length) activeIndex = col.items.length - 1;\n var previousActiveIndex = col.activeIndex;\n col.activeIndex = activeIndex;\n col.wrapper.find('.picker-selected').removeClass('picker-selected');\n \n col.items.transition(transition);\n \n var selectedItem = col.items.eq(activeIndex).addClass('picker-selected').transform('');\n \n // Set 3D rotate effect\n if (p.params.rotateEffect) {\n var percentage = (translate - (Math.floor((translate - maxTranslate)/itemHeight) * itemHeight + maxTranslate)) / itemHeight;\n \n col.items.each(function () {\n var item = $(this);\n var itemOffsetTop = item.index() * itemHeight;\n var translateOffset = maxTranslate - translate;\n var itemOffset = itemOffsetTop - translateOffset;\n var percentage = itemOffset / itemHeight;\n \n var itemsFit = Math.ceil(col.height / itemHeight / 2) + 1;\n \n var angle = (-18*percentage);\n if (angle > 180) angle = 180;\n if (angle < -180) angle = -180;\n // Far class\n if (Math.abs(percentage) > itemsFit) item.addClass('picker-item-far');\n else item.removeClass('picker-item-far');\n // Set transform\n item.transform('translate3d(0, ' + (-translate + maxTranslate) + 'px, ' + (originBug ? -110 : 0) + 'px) rotateX(' + angle + 'deg)');\n });\n }\n \n if (valueCallbacks || typeof valueCallbacks === 'undefined') {\n // Update values\n col.value = selectedItem.attr('data-picker-value');\n col.displayValue = col.displayValues ? col.displayValues[activeIndex] : col.value;\n // On change callback\n if (previousActiveIndex !== activeIndex) {\n if (col.onChange) {\n col.onChange(p, col.value, col.displayValue);\n }\n p.updateValue();\n }\n }\n };\n \n function updateDuringScroll() {\n animationFrameId = $.requestAnimationFrame(function () {\n col.updateItems(undefined, undefined, 0);\n updateDuringScroll();\n });\n }\n \n // Update items on init\n if (updateItems) col.updateItems(0, maxTranslate, 0);\n \n var allowItemClick = true;\n var isTouched, isMoved, touchStartY, touchCurrentY, touchStartTime, touchEndTime, startTranslate, returnTo, currentTranslate, prevTranslate, velocityTranslate, velocityTime;\n function handleTouchStart (e) {\n if (isMoved || isTouched) return;\n e.preventDefault();\n isTouched = true;\n touchStartY = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n \n allowItemClick = true;\n startTranslate = currentTranslate = $.getTranslate(col.wrapper[0], 'y');\n }\n function handleTouchMove (e) {\n if (!isTouched) return;\n e.preventDefault();\n allowItemClick = false;\n touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (!isMoved) {\n // First move\n $.cancelAnimationFrame(animationFrameId);\n isMoved = true;\n startTranslate = currentTranslate = $.getTranslate(col.wrapper[0], 'y');\n col.wrapper.transition(0);\n }\n \n var diff = touchCurrentY - touchStartY;\n currentTranslate = startTranslate + diff;\n returnTo = undefined;\n \n // Normalize translate\n if (currentTranslate < minTranslate) {\n currentTranslate = minTranslate - Math.pow(minTranslate - currentTranslate, 0.8);\n returnTo = 'min';\n }\n if (currentTranslate > maxTranslate) {\n currentTranslate = maxTranslate + Math.pow(currentTranslate - maxTranslate, 0.8);\n returnTo = 'max';\n }\n // Transform wrapper\n col.wrapper.transform('translate3d(0,' + currentTranslate + 'px,0)');\n \n // Update items\n col.updateItems(undefined, currentTranslate, 0, p.params.updateValuesOnTouchmove);\n \n // Calc velocity\n velocityTranslate = currentTranslate - prevTranslate || currentTranslate;\n velocityTime = (new Date()).getTime();\n prevTranslate = currentTranslate;\n }\n function handleTouchEnd (e) {\n if (!isTouched || !isMoved) {\n isTouched = isMoved = false;\n return;\n }\n isTouched = isMoved = false;\n col.wrapper.transition('');\n if (returnTo) {\n if (returnTo === 'min') {\n col.wrapper.transform('translate3d(0,' + minTranslate + 'px,0)');\n }\n else col.wrapper.transform('translate3d(0,' + maxTranslate + 'px,0)');\n }\n touchEndTime = new Date().getTime();\n var velocity, newTranslate;\n if (touchEndTime - touchStartTime > 300) {\n newTranslate = currentTranslate;\n }\n else {\n velocity = Math.abs(velocityTranslate / (touchEndTime - velocityTime));\n newTranslate = currentTranslate + velocityTranslate * p.params.momentumRatio;\n }\n \n newTranslate = Math.max(Math.min(newTranslate, maxTranslate), minTranslate);\n \n // Active Index\n var activeIndex = -Math.floor((newTranslate - maxTranslate)/itemHeight);\n \n // Normalize translate\n if (!p.params.freeMode) newTranslate = -activeIndex * itemHeight + maxTranslate;\n \n // Transform wrapper\n col.wrapper.transform('translate3d(0,' + (parseInt(newTranslate,10)) + 'px,0)');\n \n // Update items\n col.updateItems(activeIndex, newTranslate, '', true);\n \n // Watch items\n if (p.params.updateValuesOnMomentum) {\n updateDuringScroll();\n col.wrapper.transitionEnd(function(){\n $.cancelAnimationFrame(animationFrameId);\n });\n }\n \n // Allow click\n setTimeout(function () {\n allowItemClick = true;\n }, 100);\n }\n \n function handleClick(e) {\n if (!allowItemClick) return;\n $.cancelAnimationFrame(animationFrameId);\n /*jshint validthis:true */\n var value = $(this).attr('data-picker-value');\n col.setValue(value);\n }\n \n col.initEvents = function (detach) {\n var method = detach ? 'off' : 'on';\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n col.container[method](app.touchEvents.start, handleTouchStart, activeListener);\n col.container[method](app.touchEvents.move, handleTouchMove, activeListener);\n col.container[method](app.touchEvents.end, handleTouchEnd, activeListener);\n col.items[method]('click', handleClick);\n };\n col.destroyEvents = function () {\n col.initEvents(true);\n };\n \n col.container[0].f7DestroyPickerCol = function () {\n col.destroyEvents();\n };\n \n col.initEvents();\n \n };\n p.destroyPickerCol = function (colContainer) {\n colContainer = $(colContainer);\n if ('f7DestroyPickerCol' in colContainer[0]) colContainer[0].f7DestroyPickerCol();\n };\n // Resize cols\n function resizeCols() {\n if (!p.opened) return;\n for (var i = 0; i < p.cols.length; i++) {\n if (!p.cols[i].divider) {\n p.cols[i].calcSize();\n p.cols[i].setValue(p.cols[i].value, 0, false);\n }\n }\n }\n app.onResize(resizeCols);\n \n // HTML Layout\n p.columnHTML = function (col, onlyItems) {\n var columnItemsHTML = '';\n var columnHTML = '';\n if (col.divider) {\n columnHTML += '
                            ' + col.content + '
                            ';\n }\n else {\n for (var j = 0; j < col.values.length; j++) {\n columnItemsHTML += '
                            ' + (col.displayValues ? col.displayValues[j] : col.values[j]) + '
                            ';\n }\n columnHTML += '
                            ' + columnItemsHTML + '
                            ';\n }\n return onlyItems ? columnItemsHTML : columnHTML;\n };\n p.layout = function () {\n var pickerHTML = '';\n var pickerClass = '';\n var i;\n p.cols = [];\n var colsHTML = '';\n for (i = 0; i < p.params.cols.length; i++) {\n var col = p.params.cols[i];\n colsHTML += p.columnHTML(p.params.cols[i]);\n p.cols.push(col);\n }\n pickerClass = 'picker-modal picker-columns ' + (p.params.cssClass || '') + (p.params.rotateEffect ? ' picker-3d' : '');\n pickerHTML =\n '
                            ' +\n (p.params.toolbar ? p.params.toolbarTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : '') +\n '
                            ' +\n colsHTML +\n '
                            ' +\n '
                            ' +\n '
                            ';\n \n p.pickerHTML = pickerHTML;\n };\n \n // Input Events\n function openOnInput(e) {\n e.preventDefault();\n if (p.opened) return;\n p.open();\n if (p.params.scrollToInput && !isPopover()) {\n var pageContent = p.input.parents('.page-content');\n if (pageContent.length === 0) return;\n \n var paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-bottom'), 10),\n pageHeight = pageContent[0].offsetHeight - paddingTop - p.container.height(),\n pageScrollHeight = pageContent[0].scrollHeight - paddingTop - p.container.height(),\n newPaddingBottom;\n var inputTop = p.input.offset().top - paddingTop + p.input[0].offsetHeight;\n if (inputTop > pageHeight) {\n var scrollTop = pageContent.scrollTop() + inputTop - pageHeight;\n if (scrollTop + pageHeight > pageScrollHeight) {\n newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom;\n if (pageHeight === pageScrollHeight) {\n newPaddingBottom = p.container.height();\n }\n pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'});\n }\n pageContent.scrollTop(scrollTop, 300);\n }\n }\n }\n function closeOnHTMLClick(e) {\n if (inPopover()) return;\n if (p.input && p.input.length > 0) {\n if (e.target !== p.input[0] && $(e.target).parents('.picker-modal').length === 0) p.close();\n }\n else {\n if ($(e.target).parents('.picker-modal').length === 0) p.close();\n }\n }\n \n if (p.params.input) {\n p.input = $(p.params.input);\n if (p.input.length > 0) {\n if (p.params.inputReadOnly) p.input.prop('readOnly', true);\n if (!p.inline) {\n p.input.on('click', openOnInput);\n }\n if (p.params.inputReadOnly) {\n p.input.on('focus mousedown', function (e) {\n e.preventDefault();\n });\n }\n }\n \n }\n \n if (!p.inline && p.params.closeByOutsideClick) $('html').on('click', closeOnHTMLClick);\n \n // Open\n function onPickerClose() {\n p.opened = false;\n if (p.input && p.input.length > 0) {\n p.input.parents('.page-content').css({'padding-bottom': ''});\n if (app.params.material) p.input.trigger('blur');\n }\n if (p.params.onClose) p.params.onClose(p);\n \n // Destroy events\n p.container.find('.picker-items-col').each(function () {\n p.destroyPickerCol(this);\n });\n }\n \n p.opened = false;\n p.open = function () {\n var toPopover = isPopover();\n \n if (!p.opened) {\n \n // Layout\n p.layout();\n \n // Append\n if (toPopover) {\n p.pickerHTML = '
                            ' + p.pickerHTML + '
                            ';\n p.popover = app.popover(p.pickerHTML, p.params.input, true);\n p.container = $(p.popover).find('.picker-modal');\n $(p.popover).on('popover:close', function () {\n onPickerClose();\n });\n }\n else if (p.inline) {\n p.container = $(p.pickerHTML);\n p.container.addClass('picker-modal-inline');\n $(p.params.container).append(p.container);\n }\n else {\n p.container = $(app.pickerModal(p.pickerHTML));\n $(p.container)\n .on('picker:close', function () {\n onPickerClose();\n });\n }\n \n // Store picker instance\n p.container[0].f7Picker = p;\n \n // Init Events\n p.container.find('.picker-items-col').each(function () {\n var updateItems = true;\n if ((!p.initialized && p.params.value) || (p.initialized && p.value)) updateItems = false;\n p.initPickerCol(this, updateItems);\n });\n \n // Set value\n if (!p.initialized) {\n if (p.value) p.setValue(p.value, 0);\n else if (p.params.value) {\n p.setValue(p.params.value, 0);\n }\n }\n else {\n if (p.value) p.setValue(p.value, 0);\n }\n \n // Material Focus\n if (p.input && p.input.length > 0 && app.params.material) {\n p.input.trigger('focus');\n }\n }\n \n // Set flag\n p.opened = true;\n p.initialized = true;\n \n if (p.params.onOpen) p.params.onOpen(p);\n };\n \n // Close\n p.close = function () {\n if (!p.opened || p.inline) return;\n if (inPopover()) {\n app.closeModal(p.popover);\n return;\n }\n else {\n app.closeModal(p.container);\n return;\n }\n };\n \n // Destroy\n p.destroy = function () {\n p.close();\n if (p.params.input && p.input.length > 0) {\n p.input.off('click focus', openOnInput);\n }\n $('html').off('click', closeOnHTMLClick);\n app.offResize(resizeCols);\n };\n \n if (p.inline) {\n p.open();\n }\n else {\n if (!p.initialized && p.params.value) p.setValue(p.params.value);\n }\n \n return p;\n };\n app.picker = function (params) {\n return new Picker(params);\n };\n \n"," /*======================================================\n ************ Calendar ************\n ======================================================*/\n var Calendar = function (params) {\n var p = this;\n var defaults = {\n monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August' , 'September' , 'October', 'November', 'December'],\n monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n firstDay: 1, // First day of the week, Monday\n weekendDays: [0, 6], // Sunday and Saturday\n multiple: false,\n rangePicker: false,\n dateFormat: 'yyyy-mm-dd',\n direction: 'horizontal', // or 'vertical'\n minDate: null,\n maxDate: null,\n disabled: null, // dates range of disabled days\n events: null, // dates range of days with events\n rangesClasses: null, //array with custom classes date ranges\n touchMove: true,\n animate: true,\n closeOnSelect: false,\n monthPicker: true,\n monthPickerTemplate:\n '
                            ' +\n '' +\n '' +\n '' +\n '
                            ',\n yearPicker: true,\n yearPickerTemplate:\n '
                            ' +\n '' +\n '' +\n '' +\n '
                            ',\n weekHeader: true,\n // Common settings\n closeByOutsideClick: true,\n scrollToInput: true,\n inputReadOnly: true,\n convertToPopover: true,\n onlyInPopover: false,\n toolbar: true,\n toolbarCloseText: 'Done',\n headerPlaceholder: 'Select date',\n header: app.params.material,\n footer: app.params.material,\n toolbarTemplate:\n '
                            ' +\n '
                            ' +\n '{{monthPicker}}' +\n '{{yearPicker}}' +\n '
                            ' +\n '
                            ',\n headerTemplate:\n '
                            ' +\n '
                            {{placeholder}}
                            ' +\n '
                            ',\n footerTemplate:\n '
                            ' +\n '{{closeText}}' +\n '
                            ',\n \n /* Callbacks\n onMonthAdd\n onChange\n onOpen\n onClose\n onDayClick\n onMonthYearChangeStart\n onMonthYearChangeEnd\n */\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n p.params = params;\n p.initialized = false;\n \n // Inline flag\n p.inline = p.params.container ? true : false;\n \n // Is horizontal\n p.isH = p.params.direction === 'horizontal';\n \n // RTL inverter\n var inverter = p.isH ? (app.rtl ? -1 : 1) : 1;\n \n // Animating flag\n p.animating = false;\n \n // Should be converted to popover\n function isPopover() {\n var toPopover = false;\n if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover;\n if (!p.inline && p.params.input) {\n if (p.params.onlyInPopover) toPopover = true;\n else {\n if (app.device.ios) {\n toPopover = app.device.ipad ? true : false;\n }\n else {\n if (app.width >= 768) toPopover = true;\n }\n }\n }\n return toPopover;\n }\n function inPopover() {\n if (p.opened && p.container && p.container.length > 0 && p.container.parents('.popover').length > 0) return true;\n else return false;\n }\n \n // Format date\n function formatDate(date) {\n date = new Date(date);\n var year = date.getFullYear();\n var month = date.getMonth();\n var month1 = month + 1;\n var day = date.getDate();\n var weekDay = date.getDay();\n \n return p.params.dateFormat\n .replace(/yyyy/g, year)\n .replace(/yy/g, (year + '').substring(2))\n .replace(/mm/g, month1 < 10 ? '0' + month1 : month1)\n .replace(/m(\\W+)/g, month1 + '$1')\n .replace(/MM/g, p.params.monthNames[month])\n .replace(/M(\\W+)/g, p.params.monthNamesShort[month] + '$1')\n .replace(/dd/g, day < 10 ? '0' + day : day)\n .replace(/d(\\W+)/g, day + '$1')\n .replace(/DD/g, p.params.dayNames[weekDay])\n .replace(/D(\\W+)/g, p.params.dayNamesShort[weekDay] + '$1');\n }\n \n \n // Value\n p.addValue = function (value) {\n if (p.params.multiple) {\n if (!p.value) p.value = [];\n var inValuesIndex;\n for (var i = 0; i < p.value.length; i++) {\n if (new Date(value).getTime() === new Date(p.value[i]).getTime()) {\n inValuesIndex = i;\n }\n }\n if (typeof inValuesIndex === 'undefined') {\n p.value.push(value);\n }\n else {\n p.value.splice(inValuesIndex, 1);\n }\n p.updateValue();\n }\n else if (p.params.rangePicker) {\n if (!p.value) p.value = [];\n if (p.value.length === 2 || p.value.length === 0) {\n p.value = [];\n }\n if (p.value[0] !== value) p.value.push(value);\n else p.value = [];\n p.value.sort(function (a,b) {\n return a - b;\n });\n p.updateValue();\n }\n else {\n p.value = [value];\n p.updateValue();\n }\n };\n p.setValue = function (arrValues) {\n p.value = arrValues;\n p.updateValue();\n };\n p.updateValue = function (onlyHeader) {\n var i, inputValue;\n if (p.container && p.container.length > 0) {\n p.wrapper.find('.picker-calendar-day-selected').removeClass('picker-calendar-day-selected');\n var valueDate;\n if (p.params.rangePicker && p.value.length === 2) {\n for (i = new Date(p.value[0]).getTime(); i <= new Date(p.value[1]).getTime(); i += 24*60*60*1000) {\n valueDate = new Date(i);\n p.wrapper.find('.picker-calendar-day[data-date=\"' + valueDate.getFullYear() + '-' + valueDate.getMonth() + '-' + valueDate.getDate() + '\"]').addClass('picker-calendar-day-selected');\n }\n }\n else {\n for (i = 0; i < p.value.length; i++) {\n valueDate = new Date(p.value[i]);\n p.wrapper.find('.picker-calendar-day[data-date=\"' + valueDate.getFullYear() + '-' + valueDate.getMonth() + '-' + valueDate.getDate() + '\"]').addClass('picker-calendar-day-selected');\n }\n }\n }\n \n if (p.params.onChange) {\n p.params.onChange(p, p.value);\n }\n if ((p.input && p.input.length > 0) || (app.params.material && p.params.header)) {\n if (p.params.formatValue) inputValue = p.params.formatValue(p, p.value);\n else {\n inputValue = [];\n for (i = 0; i < p.value.length; i++) {\n inputValue.push(formatDate(p.value[i]));\n }\n inputValue = inputValue.join(p.params.rangePicker ? ' - ' : ', ');\n }\n if (app.params.material && p.params.header && p.container && p.container.length > 0) {\n p.container.find('.picker-calendar-selected-date').text(inputValue);\n }\n if (p.input && p.input.length > 0 && !onlyHeader) {\n $(p.input).val(inputValue);\n $(p.input).trigger('change');\n }\n \n }\n };\n \n // Columns Handlers\n p.initCalendarEvents = function () {\n var col;\n var allowItemClick = true;\n var isTouched, isMoved, touchStartX, touchStartY, touchCurrentX, touchCurrentY, touchStartTime, touchEndTime, startTranslate, currentTranslate, wrapperWidth, wrapperHeight, percentage, touchesDiff, isScrolling;\n function handleTouchStart (e) {\n if (isMoved || isTouched) return;\n // e.preventDefault();\n isTouched = true;\n touchStartX = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchStartY = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n percentage = 0;\n allowItemClick = true;\n isScrolling = undefined;\n startTranslate = currentTranslate = p.monthsTranslate;\n }\n function handleTouchMove (e) {\n if (!isTouched) return;\n \n touchCurrentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(touchCurrentY - touchStartY) > Math.abs(touchCurrentX - touchStartX));\n }\n if (p.isH && isScrolling) {\n isTouched = false;\n return;\n }\n e.preventDefault();\n if (p.animating) {\n isTouched = false;\n return;\n }\n allowItemClick = false;\n if (!isMoved) {\n // First move\n isMoved = true;\n wrapperWidth = p.wrapper[0].offsetWidth;\n wrapperHeight = p.wrapper[0].offsetHeight;\n p.wrapper.transition(0);\n }\n \n touchesDiff = p.isH ? touchCurrentX - touchStartX : touchCurrentY - touchStartY;\n percentage = touchesDiff/(p.isH ? wrapperWidth : wrapperHeight);\n currentTranslate = (p.monthsTranslate * inverter + percentage) * 100;\n \n // Transform wrapper\n p.wrapper.transform('translate3d(' + (p.isH ? currentTranslate : 0) + '%, ' + (p.isH ? 0 : currentTranslate) + '%, 0)');\n \n }\n function handleTouchEnd (e) {\n if (!isTouched || !isMoved) {\n isTouched = isMoved = false;\n return;\n }\n isTouched = isMoved = false;\n \n touchEndTime = new Date().getTime();\n if (touchEndTime - touchStartTime < 300) {\n if (Math.abs(touchesDiff) < 10) {\n p.resetMonth();\n }\n else if (touchesDiff >= 10) {\n if (app.rtl) p.nextMonth();\n else p.prevMonth();\n }\n else {\n if (app.rtl) p.prevMonth();\n else p.nextMonth();\n }\n }\n else {\n if (percentage <= -0.5) {\n if (app.rtl) p.prevMonth();\n else p.nextMonth();\n }\n else if (percentage >= 0.5) {\n if (app.rtl) p.nextMonth();\n else p.prevMonth();\n }\n else {\n p.resetMonth();\n }\n }\n \n // Allow click\n setTimeout(function () {\n allowItemClick = true;\n }, 100);\n }\n \n function handleDayClick(e) {\n if (!allowItemClick) return;\n var day = $(e.target).parents('.picker-calendar-day');\n if (day.length === 0 && $(e.target).hasClass('picker-calendar-day')) {\n day = $(e.target);\n }\n if (day.length === 0) return;\n if (day.hasClass('picker-calendar-day-disabled')) return;\n if (!p.params.rangePicker) {\n if (day.hasClass('picker-calendar-day-next')) p.nextMonth();\n if (day.hasClass('picker-calendar-day-prev')) p.prevMonth();\n }\n var dateYear = day.attr('data-year');\n var dateMonth = day.attr('data-month');\n var dateDay = day.attr('data-day');\n if (p.params.onDayClick) {\n p.params.onDayClick(p, day[0], dateYear, dateMonth, dateDay);\n }\n if (!day.hasClass('picker-calendar-day-selected') || p.params.multiple || p.params.rangePicker) {\n p.addValue(new Date(dateYear, dateMonth, dateDay, 0, 0, 0));\n }\n if (p.params.closeOnSelect) {\n if (p.params.rangePicker && p.value.length === 2 || !p.params.rangePicker) p.close();\n }\n }\n \n p.container.find('.picker-calendar-prev-month').on('click', p.prevMonth);\n p.container.find('.picker-calendar-next-month').on('click', p.nextMonth);\n p.container.find('.picker-calendar-prev-year').on('click', p.prevYear);\n p.container.find('.picker-calendar-next-year').on('click', p.nextYear);\n p.wrapper.on('click', handleDayClick);\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n if (p.params.touchMove) {\n p.wrapper.on(app.touchEvents.start, handleTouchStart, passiveListener);\n p.wrapper.on(app.touchEvents.move, handleTouchMove, activeListener);\n p.wrapper.on(app.touchEvents.end, handleTouchEnd, passiveListener);\n }\n \n p.container[0].f7DestroyCalendarEvents = function () {\n p.container.find('.picker-calendar-prev-month').off('click', p.prevMonth);\n p.container.find('.picker-calendar-next-month').off('click', p.nextMonth);\n p.container.find('.picker-calendar-prev-year').off('click', p.prevYear);\n p.container.find('.picker-calendar-next-year').off('click', p.nextYear);\n p.wrapper.off('click', handleDayClick);\n if (p.params.touchMove) {\n p.wrapper.off(app.touchEvents.start, handleTouchStart, passiveListener);\n p.wrapper.off(app.touchEvents.move, handleTouchMove, activeListener);\n p.wrapper.off(app.touchEvents.end, handleTouchEnd, passiveListener);\n }\n };\n \n \n };\n p.destroyCalendarEvents = function (colContainer) {\n if ('f7DestroyCalendarEvents' in p.container[0]) p.container[0].f7DestroyCalendarEvents();\n };\n \n // Scan Dates Range\n p.dateInRange = function (dayDate, range) {\n var match = false;\n var i;\n if (!range) return false;\n if (Array.isArray(range)) {\n for (i = 0; i < range.length; i ++) {\n if (range[i].from || range[i].to) {\n if (range[i].from && range[i].to) {\n if ((dayDate <= new Date(range[i].to).getTime()) && (dayDate >= new Date(range[i].from).getTime())) {\n match = true;\n }\n }\n else if (range[i].from) {\n if (dayDate >= new Date(range[i].from).getTime()) {\n match = true;\n }\n }\n else if (range[i].to) {\n if (dayDate <= new Date(range[i].to).getTime()) {\n match = true;\n }\n }\n } else if (dayDate === new Date(range[i]).getTime()) {\n match = true;\n }\n }\n }\n else if (range.from || range.to) {\n if (range.from && range.to) {\n if ((dayDate <= new Date(range.to).getTime()) && (dayDate >= new Date(range.from).getTime())) {\n match = true;\n }\n }\n else if (range.from) {\n if (dayDate >= new Date(range.from).getTime()) {\n match = true;\n }\n }\n else if (range.to) {\n if (dayDate <= new Date(range.to).getTime()) {\n match = true;\n }\n }\n }\n else if (typeof range === 'function') {\n match = range(new Date(dayDate));\n }\n return match;\n };\n // Calendar Methods\n p.daysInMonth = function (date) {\n var d = new Date(date);\n return new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();\n };\n p.monthHTML = function (date, offset) {\n date = new Date(date);\n var year = date.getFullYear(),\n month = date.getMonth(),\n day = date.getDate();\n if (offset === 'next') {\n if (month === 11) date = new Date(year + 1, 0);\n else date = new Date(year, month + 1, 1);\n }\n if (offset === 'prev') {\n if (month === 0) date = new Date(year - 1, 11);\n else date = new Date(year, month - 1, 1);\n }\n if (offset === 'next' || offset === 'prev') {\n month = date.getMonth();\n year = date.getFullYear();\n }\n var daysInPrevMonth = p.daysInMonth(new Date(date.getFullYear(), date.getMonth()).getTime() - 10 * 24 * 60 * 60 * 1000),\n daysInMonth = p.daysInMonth(date),\n firstDayOfMonthIndex = new Date(date.getFullYear(), date.getMonth()).getDay();\n if (firstDayOfMonthIndex === 0) firstDayOfMonthIndex = 7;\n \n var dayDate, currentValues = [], i, j, k,\n rows = 6, cols = 7,\n monthHTML = '',\n dayIndex = 0 + (p.params.firstDay - 1),\n today = new Date().setHours(0,0,0,0),\n minDate = p.params.minDate ? new Date(p.params.minDate).getTime() : null,\n maxDate = p.params.maxDate ? new Date(p.params.maxDate).getTime() : null,\n disabled,\n hasEvent;\n \n if (p.value && p.value.length) {\n for (i = 0; i < p.value.length; i++) {\n currentValues.push(new Date(p.value[i]).setHours(0,0,0,0));\n }\n }\n \n for (i = 1; i <= rows; i++) {\n var rowHTML = '';\n var row = i;\n for (j = 1; j <= cols; j++) {\n var col = j;\n dayIndex ++;\n var dayNumber = dayIndex - firstDayOfMonthIndex;\n var weekDayIndex = (col - 1 + p.params.firstDay > 6) ? (col - 1 - 7 + p.params.firstDay) : (col - 1 + p.params.firstDay);\n var addClass = '';\n if (dayNumber < 0) {\n dayNumber = daysInPrevMonth + dayNumber + 1;\n addClass += ' picker-calendar-day-prev';\n dayDate = new Date(month - 1 < 0 ? year - 1 : year, month - 1 < 0 ? 11 : month - 1, dayNumber).getTime();\n }\n else {\n dayNumber = dayNumber + 1;\n if (dayNumber > daysInMonth) {\n dayNumber = dayNumber - daysInMonth;\n addClass += ' picker-calendar-day-next';\n dayDate = new Date(month + 1 > 11 ? year + 1 : year, month + 1 > 11 ? 0 : month + 1, dayNumber).getTime();\n }\n else {\n dayDate = new Date(year, month, dayNumber).getTime();\n }\n }\n // Today\n if (dayDate === today) addClass += ' picker-calendar-day-today';\n // Selected\n if (p.params.rangePicker && currentValues.length === 2) {\n if (dayDate >= currentValues[0] && dayDate <= currentValues[1]) addClass += ' picker-calendar-day-selected';\n }\n else {\n if (currentValues.indexOf(dayDate) >= 0) addClass += ' picker-calendar-day-selected';\n }\n // Weekend\n if (p.params.weekendDays.indexOf(weekDayIndex) >= 0) {\n addClass += ' picker-calendar-day-weekend';\n }\n // Has Events\n hasEvent = false;\n if (p.params.events) {\n if (p.dateInRange(dayDate, p.params.events)) {\n hasEvent = true;\n }\n }\n if (hasEvent) {\n addClass += ' picker-calendar-day-has-events';\n }\n // Custom Ranges\n if (p.params.rangesClasses) {\n for (k = 0; k < p.params.rangesClasses.length; k++) {\n if (p.dateInRange(dayDate, p.params.rangesClasses[k].range)) {\n addClass += ' ' + p.params.rangesClasses[k].cssClass;\n }\n }\n }\n // Disabled\n disabled = false;\n if ((minDate && dayDate < minDate) || (maxDate && dayDate > maxDate)) {\n disabled = true;\n }\n if (p.params.disabled) {\n if (p.dateInRange(dayDate, p.params.disabled)) {\n disabled = true;\n }\n }\n if (disabled) {\n addClass += ' picker-calendar-day-disabled';\n }\n \n \n dayDate = new Date(dayDate);\n var dayYear = dayDate.getFullYear();\n var dayMonth = dayDate.getMonth();\n rowHTML += '
                            '+dayNumber+'
                            ';\n }\n monthHTML += '
                            ' + rowHTML + '
                            ';\n }\n monthHTML = '
                            ' + monthHTML + '
                            ';\n return monthHTML;\n };\n p.animating = false;\n p.updateCurrentMonthYear = function (dir) {\n if (typeof dir === 'undefined') {\n p.currentMonth = parseInt(p.months.eq(1).attr('data-month'), 10);\n p.currentYear = parseInt(p.months.eq(1).attr('data-year'), 10);\n }\n else {\n p.currentMonth = parseInt(p.months.eq(dir === 'next' ? (p.months.length - 1) : 0).attr('data-month'), 10);\n p.currentYear = parseInt(p.months.eq(dir === 'next' ? (p.months.length - 1) : 0).attr('data-year'), 10);\n }\n p.container.find('.current-month-value').text(p.params.monthNames[p.currentMonth]);\n p.container.find('.current-year-value').text(p.currentYear);\n \n };\n p.onMonthChangeStart = function (dir) {\n p.updateCurrentMonthYear(dir);\n p.months.removeClass('picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next');\n var currentIndex = dir === 'next' ? p.months.length - 1 : 0;\n \n p.months.eq(currentIndex).addClass('picker-calendar-month-current');\n p.months.eq(dir === 'next' ? currentIndex - 1 : currentIndex + 1).addClass(dir === 'next' ? 'picker-calendar-month-prev' : 'picker-calendar-month-next');\n \n if (p.params.onMonthYearChangeStart) {\n p.params.onMonthYearChangeStart(p, p.currentYear, p.currentMonth);\n }\n };\n p.onMonthChangeEnd = function (dir, rebuildBoth) {\n p.animating = false;\n var nextMonthHTML, prevMonthHTML, newMonthHTML;\n p.wrapper.find('.picker-calendar-month:not(.picker-calendar-month-prev):not(.picker-calendar-month-current):not(.picker-calendar-month-next)').remove();\n \n if (typeof dir === 'undefined') {\n dir = 'next';\n rebuildBoth = true;\n }\n if (!rebuildBoth) {\n newMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), dir);\n }\n else {\n p.wrapper.find('.picker-calendar-month-next, .picker-calendar-month-prev').remove();\n prevMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), 'prev');\n nextMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), 'next');\n }\n if (dir === 'next' || rebuildBoth) {\n p.wrapper.append(newMonthHTML || nextMonthHTML);\n }\n if (dir === 'prev' || rebuildBoth) {\n p.wrapper.prepend(newMonthHTML || prevMonthHTML);\n }\n p.months = p.wrapper.find('.picker-calendar-month');\n p.setMonthsTranslate(p.monthsTranslate);\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, dir === 'next' ? p.months.eq(p.months.length - 1)[0] : p.months.eq(0)[0]);\n }\n if (p.params.onMonthYearChangeEnd) {\n p.params.onMonthYearChangeEnd(p, p.currentYear, p.currentMonth);\n }\n };\n p.setMonthsTranslate = function (translate) {\n translate = translate || p.monthsTranslate || 0;\n if (typeof p.monthsTranslate === 'undefined') p.monthsTranslate = translate;\n p.months.removeClass('picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next');\n var prevMonthTranslate = -(translate + 1) * 100 * inverter;\n var currentMonthTranslate = -translate * 100 * inverter;\n var nextMonthTranslate = -(translate - 1) * 100 * inverter;\n p.months.eq(0).transform('translate3d(' + (p.isH ? prevMonthTranslate : 0) + '%, ' + (p.isH ? 0 : prevMonthTranslate) + '%, 0)').addClass('picker-calendar-month-prev');\n p.months.eq(1).transform('translate3d(' + (p.isH ? currentMonthTranslate : 0) + '%, ' + (p.isH ? 0 : currentMonthTranslate) + '%, 0)').addClass('picker-calendar-month-current');\n p.months.eq(2).transform('translate3d(' + (p.isH ? nextMonthTranslate : 0) + '%, ' + (p.isH ? 0 : nextMonthTranslate) + '%, 0)').addClass('picker-calendar-month-next');\n };\n p.nextMonth = function (transition) {\n if (typeof transition === 'undefined' || typeof transition === 'object') {\n transition = '';\n if (!p.params.animate) transition = 0;\n }\n var nextMonth = parseInt(p.months.eq(p.months.length - 1).attr('data-month'), 10);\n var nextYear = parseInt(p.months.eq(p.months.length - 1).attr('data-year'), 10);\n var nextDate = new Date(nextYear, nextMonth);\n var nextDateTime = nextDate.getTime();\n var transitionEndCallback = p.animating ? false : true;\n if (p.params.maxDate) {\n if (nextDateTime > new Date(p.params.maxDate).getTime()) {\n return p.resetMonth();\n }\n }\n p.monthsTranslate --;\n if (nextMonth === p.currentMonth) {\n var nextMonthTranslate = -(p.monthsTranslate) * 100 * inverter;\n var nextMonthHTML = $(p.monthHTML(nextDateTime, 'next')).transform('translate3d(' + (p.isH ? nextMonthTranslate : 0) + '%, ' + (p.isH ? 0 : nextMonthTranslate) + '%, 0)').addClass('picker-calendar-month-next');\n p.wrapper.append(nextMonthHTML[0]);\n p.months = p.wrapper.find('.picker-calendar-month');\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, p.months.eq(p.months.length - 1)[0]);\n }\n }\n p.animating = true;\n p.onMonthChangeStart('next');\n var translate = (p.monthsTranslate * 100) * inverter;\n \n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)');\n if (transitionEndCallback) {\n p.wrapper.transitionEnd(function () {\n p.onMonthChangeEnd('next');\n });\n }\n if (!p.params.animate) {\n p.onMonthChangeEnd('next');\n }\n };\n p.prevMonth = function (transition) {\n if (typeof transition === 'undefined' || typeof transition === 'object') {\n transition = '';\n if (!p.params.animate) transition = 0;\n }\n var prevMonth = parseInt(p.months.eq(0).attr('data-month'), 10);\n var prevYear = parseInt(p.months.eq(0).attr('data-year'), 10);\n var prevDate = new Date(prevYear, prevMonth + 1, -1);\n var prevDateTime = prevDate.getTime();\n var transitionEndCallback = p.animating ? false : true;\n if (p.params.minDate) {\n if (prevDateTime < new Date(p.params.minDate).getTime()) {\n return p.resetMonth();\n }\n }\n p.monthsTranslate ++;\n if (prevMonth === p.currentMonth) {\n var prevMonthTranslate = -(p.monthsTranslate) * 100 * inverter;\n var prevMonthHTML = $(p.monthHTML(prevDateTime, 'prev')).transform('translate3d(' + (p.isH ? prevMonthTranslate : 0) + '%, ' + (p.isH ? 0 : prevMonthTranslate) + '%, 0)').addClass('picker-calendar-month-prev');\n p.wrapper.prepend(prevMonthHTML[0]);\n p.months = p.wrapper.find('.picker-calendar-month');\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, p.months.eq(0)[0]);\n }\n }\n p.animating = true;\n p.onMonthChangeStart('prev');\n var translate = (p.monthsTranslate * 100) * inverter;\n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)');\n if (transitionEndCallback) {\n p.wrapper.transitionEnd(function () {\n p.onMonthChangeEnd('prev');\n });\n }\n if (!p.params.animate) {\n p.onMonthChangeEnd('prev');\n }\n };\n p.resetMonth = function (transition) {\n if (typeof transition === 'undefined') transition = '';\n var translate = (p.monthsTranslate * 100) * inverter;\n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)');\n };\n p.setYearMonth = function (year, month, transition) {\n if (typeof year === 'undefined') year = p.currentYear;\n if (typeof month === 'undefined') month = p.currentMonth;\n if (typeof transition === 'undefined' || typeof transition === 'object') {\n transition = '';\n if (!p.params.animate) transition = 0;\n }\n var targetDate;\n if (year < p.currentYear) {\n targetDate = new Date(year, month + 1, -1).getTime();\n }\n else {\n targetDate = new Date(year, month).getTime();\n }\n if (p.params.maxDate && targetDate > new Date(p.params.maxDate).getTime()) {\n return false;\n }\n if (p.params.minDate && targetDate < new Date(p.params.minDate).getTime()) {\n return false;\n }\n var currentDate = new Date(p.currentYear, p.currentMonth).getTime();\n var dir = targetDate > currentDate ? 'next' : 'prev';\n var newMonthHTML = p.monthHTML(new Date(year, month));\n p.monthsTranslate = p.monthsTranslate || 0;\n var prevTranslate = p.monthsTranslate;\n var monthTranslate, wrapperTranslate;\n var transitionEndCallback = p.animating ? false : true;\n if (targetDate > currentDate) {\n // To next\n p.monthsTranslate --;\n if (!p.animating) p.months.eq(p.months.length - 1).remove();\n p.wrapper.append(newMonthHTML);\n p.months = p.wrapper.find('.picker-calendar-month');\n monthTranslate = -(prevTranslate - 1) * 100 * inverter;\n p.months.eq(p.months.length - 1).transform('translate3d(' + (p.isH ? monthTranslate : 0) + '%, ' + (p.isH ? 0 : monthTranslate) + '%, 0)').addClass('picker-calendar-month-next');\n }\n else {\n // To prev\n p.monthsTranslate ++;\n if (!p.animating) p.months.eq(0).remove();\n p.wrapper.prepend(newMonthHTML);\n p.months = p.wrapper.find('.picker-calendar-month');\n monthTranslate = -(prevTranslate + 1) * 100 * inverter;\n p.months.eq(0).transform('translate3d(' + (p.isH ? monthTranslate : 0) + '%, ' + (p.isH ? 0 : monthTranslate) + '%, 0)').addClass('picker-calendar-month-prev');\n }\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, dir === 'next' ? p.months.eq(p.months.length - 1)[0] : p.months.eq(0)[0]);\n }\n p.animating = true;\n p.onMonthChangeStart(dir);\n wrapperTranslate = (p.monthsTranslate * 100) * inverter;\n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? wrapperTranslate : 0) + '%, ' + (p.isH ? 0 : wrapperTranslate) + '%, 0)');\n if (transitionEndCallback) {\n p.wrapper.transitionEnd(function () {\n p.onMonthChangeEnd(dir, true);\n });\n }\n if (!p.params.animate) {\n p.onMonthChangeEnd(dir);\n }\n };\n p.nextYear = function () {\n p.setYearMonth(p.currentYear + 1);\n };\n p.prevYear = function () {\n p.setYearMonth(p.currentYear - 1);\n };\n \n \n // HTML Layout\n p.layout = function () {\n var pickerHTML = '';\n var pickerClass = '';\n var i;\n \n var layoutDate = p.value && p.value.length ? p.value[0] : new Date().setHours(0,0,0,0);\n var prevMonthHTML = p.monthHTML(layoutDate, 'prev');\n var currentMonthHTML = p.monthHTML(layoutDate);\n var nextMonthHTML = p.monthHTML(layoutDate, 'next');\n var monthsHTML = '
                            ' + (prevMonthHTML + currentMonthHTML + nextMonthHTML) + '
                            ';\n // Week days header\n var weekHeaderHTML = '';\n if (p.params.weekHeader) {\n for (i = 0; i < 7; i++) {\n var weekDayIndex = (i + p.params.firstDay > 6) ? (i - 7 + p.params.firstDay) : (i + p.params.firstDay);\n var dayName = p.params.dayNamesShort[weekDayIndex];\n weekHeaderHTML += '
                            = 0) ? 'picker-calendar-week-day-weekend' : '') + '\"> ' + dayName + '
                            ';\n \n }\n weekHeaderHTML = '
                            ' + weekHeaderHTML + '
                            ';\n }\n pickerClass = 'picker-modal picker-calendar' +\n (p.params.rangePicker ? ' picker-calendar-range' : '') +\n (p.params.cssClass ? ' ' + p.params.cssClass : '');\n var toolbarHTML = p.params.toolbar ? p.params.toolbarTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : '';\n if (p.params.toolbar) {\n toolbarHTML = p.params.toolbarTemplate\n .replace(/{{closeText}}/g, p.params.toolbarCloseText)\n .replace(/{{monthPicker}}/g, (p.params.monthPicker ? p.params.monthPickerTemplate : ''))\n .replace(/{{yearPicker}}/g, (p.params.yearPicker ? p.params.yearPickerTemplate : ''));\n }\n var headerHTML = p.params.header ? p.params.headerTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText).replace(/{{placeholder}}/g, p.params.headerPlaceholder) : '';\n var footerHTML = p.params.footer ? p.params.footerTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : '';\n \n pickerHTML =\n '
                            ' +\n headerHTML +\n footerHTML +\n toolbarHTML +\n '
                            ' +\n weekHeaderHTML +\n monthsHTML +\n '
                            ' +\n '
                            ';\n \n \n p.pickerHTML = pickerHTML;\n };\n \n // Input Events\n function openOnInput(e) {\n e.preventDefault();\n if (p.opened) return;\n p.open();\n if (p.params.scrollToInput && !isPopover() && !app.params.material) {\n var pageContent = p.input.parents('.page-content');\n if (pageContent.length === 0) return;\n \n var paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-bottom'), 10),\n pageHeight = pageContent[0].offsetHeight - paddingTop - p.container.height(),\n pageScrollHeight = pageContent[0].scrollHeight - paddingTop - p.container.height(),\n newPaddingBottom;\n \n var inputTop = p.input.offset().top - paddingTop + p.input[0].offsetHeight;\n if (inputTop > pageHeight) {\n var scrollTop = pageContent.scrollTop() + inputTop - pageHeight;\n if (scrollTop + pageHeight > pageScrollHeight) {\n newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom;\n if (pageHeight === pageScrollHeight) {\n newPaddingBottom = p.container.height();\n }\n pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'});\n }\n pageContent.scrollTop(scrollTop, 300);\n }\n }\n }\n function closeOnHTMLClick(e) {\n if (inPopover()) return;\n if (p.input && p.input.length > 0) {\n if (e.target !== p.input[0] && $(e.target).parents('.picker-modal').length === 0) p.close();\n }\n else {\n if ($(e.target).parents('.picker-modal').length === 0) p.close();\n }\n }\n \n if (p.params.input) {\n p.input = $(p.params.input);\n if (p.input.length > 0) {\n if (p.params.inputReadOnly) p.input.prop('readOnly', true);\n if (!p.inline) {\n p.input.on('click', openOnInput);\n }\n if (p.params.inputReadOnly) {\n p.input.on('focus mousedown', function (e) {\n e.preventDefault();\n });\n }\n }\n \n }\n \n if (!p.inline && p.params.closeByOutsideClick) $('html').on('click', closeOnHTMLClick);\n \n // Open\n function onPickerClose() {\n p.opened = false;\n if (p.input && p.input.length > 0) {\n p.input.parents('.page-content').css({'padding-bottom': ''});\n if (app.params.material) p.input.trigger('blur');\n }\n if (p.params.onClose) p.params.onClose(p);\n \n // Destroy events\n p.destroyCalendarEvents();\n }\n \n p.opened = false;\n p.open = function () {\n var toPopover = isPopover();\n var updateValue = false;\n if (!p.opened) {\n // Set date value\n if (!p.value) {\n if (p.params.value) {\n p.value = p.params.value;\n updateValue = true;\n }\n }\n \n // Layout\n p.layout();\n \n // Append\n if (toPopover) {\n p.pickerHTML = '
                            ' + p.pickerHTML + '
                            ';\n p.popover = app.popover(p.pickerHTML, p.params.input, true);\n p.container = $(p.popover).find('.picker-modal');\n $(p.popover).on('popover:close', function () {\n onPickerClose();\n });\n }\n else if (p.inline) {\n p.container = $(p.pickerHTML);\n p.container.addClass('picker-modal-inline');\n $(p.params.container).append(p.container);\n }\n else {\n p.container = $(app.pickerModal(p.pickerHTML));\n $(p.container)\n .on('picker:close', function () {\n onPickerClose();\n });\n }\n \n // Store calendar instance\n p.container[0].f7Calendar = p;\n p.wrapper = p.container.find('.picker-calendar-months-wrapper');\n \n // Months\n p.months = p.wrapper.find('.picker-calendar-month');\n \n // Update current month and year\n p.updateCurrentMonthYear();\n \n // Set initial translate\n p.monthsTranslate = 0;\n p.setMonthsTranslate();\n \n // Init events\n p.initCalendarEvents();\n \n // Update input value\n if (updateValue) p.updateValue();\n else if (app.params.material && p.value) p.updateValue(true);\n \n // Material Focus\n if (p.input && p.input.length > 0 && app.params.material) {\n p.input.trigger('focus');\n }\n \n }\n \n // Set flag\n p.opened = true;\n p.initialized = true;\n if (p.params.onMonthAdd) {\n p.months.each(function () {\n p.params.onMonthAdd(p, this);\n });\n }\n if (p.params.onOpen) p.params.onOpen(p);\n };\n \n // Close\n p.close = function () {\n if (!p.opened || p.inline) return;\n if (inPopover()) {\n app.closeModal(p.popover);\n return;\n }\n else {\n app.closeModal(p.container);\n return;\n }\n };\n \n // Destroy\n p.destroy = function () {\n p.close();\n if (p.params.input && p.input.length > 0) {\n p.input.off('click focus', openOnInput);\n }\n $('html').off('click', closeOnHTMLClick);\n };\n \n if (p.inline) {\n p.open();\n }\n else {\n if (!p.initialized && p.params.value) p.setValue(p.params.value);\n }\n \n return p;\n };\n app.calendar = function (params) {\n return new Calendar(params);\n };\n \n"," /*======================================================\n ************ Notifications ************\n ======================================================*/\n var _tempNotificationElement;\n app.addNotification = function (params) {\n if (!params) return;\n \n if (typeof params.media === 'undefined') params.media = app.params.notificationMedia;\n if (typeof params.title === 'undefined') params.title = app.params.notificationTitle;\n if (typeof params.subtitle === 'undefined') params.subtitle = app.params.notificationSubtitle;\n if (typeof params.closeIcon === 'undefined') params.closeIcon = app.params.notificationCloseIcon;\n if (typeof params.hold === 'undefined') params.hold = app.params.notificationHold;\n if (typeof params.closeOnClick === 'undefined') params.closeOnClick = app.params.notificationCloseOnClick;\n if (typeof params.button === 'undefined') params.button = app.params.notificationCloseButtonText && {\n text: app.params.notificationCloseButtonText,\n close: true\n };\n \n if (!_tempNotificationElement) _tempNotificationElement = document.createElement('div');\n \n params.material = app.params.material;\n \n var container = $('.notifications');\n if (container.length === 0) {\n app.root.append('
                              ');\n container = $('.notifications');\n }\n var list = container.children('ul');\n \n var notificationTemplate = app.params.notificationTemplate || \n '{{#if custom}}' +\n '
                            • {{custom}}
                            • ' +\n '{{else}}' +\n '
                            • ' +\n '
                              ' +\n '{{#if material}}' +\n '
                              ' +\n '
                              {{js \"this.message || this.title || this.subtitle\"}}
                              ' +\n '{{#if ../button}}{{#button}}' +\n '
                              ' +\n '{{text}}' +\n '
                              ' +\n '{{/button}}{{/if}}' +\n '
                              ' +\n '{{else}}' +\n '{{#if media}}' +\n '
                              {{media}}
                              ' +\n '{{/if}}' +\n '
                              ' +\n '
                              ' +\n '{{#if title}}' +\n '
                              {{title}}
                              ' +\n '{{/if}}' +\n '{{#if closeIcon}}' +\n '
                              ' +\n '{{/if}}' +\n '
                              ' +\n '{{#if subtitle}}' +\n '
                              {{subtitle}}
                              ' +\n '{{/if}}' +\n '{{#if message}}' +\n '
                              {{message}}
                              ' +\n '
                              ' +\n '{{/if}}' +\n '{{/if}}' +\n '
                              ' +\n '
                            • ' +\n '{{/if}}';\n if (!app._compiledTemplates.notification) {\n app._compiledTemplates.notification = t7.compile(notificationTemplate);\n }\n _tempNotificationElement.innerHTML = app._compiledTemplates.notification(params);\n \n var item = $(_tempNotificationElement).children();\n \n item.on('click', function (e) {\n var close = false;\n var target = $(e.target);\n if (params.material && target.hasClass('button')) {\n if (params.button && params.button.onClick) params.button.onClick.call(target[0], e, item[0]);\n }\n if (target.is('.close-notification') || $(e.target).parents('.close-notification').length > 0) {\n close = true;\n }\n else {\n if (params.onClick) params.onClick(e, item[0]);\n if (params.closeOnClick) close = true;\n }\n if (close) app.closeNotification(item[0], e);\n });\n if (params.onClose) {\n item.data('f7NotificationOnClose', function (e) {\n params.onClose(item[0], e);\n });\n }\n if (params.additionalClass) {\n item.addClass(params.additionalClass);\n }\n if (params.hold) {\n setTimeout(function () {\n if (item.length > 0) app.closeNotification(item[0]);\n }, params.hold);\n }\n \n if (!app.params.material) {\n app.closeNotification(list.children('li.notification-item:last-child'));\n }\n list.append(item[0]);\n container.show();\n \n var itemHeight = item.outerHeight(), clientLeft;\n if (params.material) {\n container.transform('translate3d(0, '+itemHeight+'px, 0)');\n container.transition(0);\n \n clientLeft = item[0].clientLeft;\n \n container.transform('translate3d(0, 0, 0)');\n container.transition('');\n }\n else {\n item.transform('translate3d(0,' + (-itemHeight) + 'px,0)');\n item.transition(0);\n \n clientLeft = item[0].clientLeft;\n \n item.transition('');\n item.transform('translate3d(0,0px,0)');\n }\n \n container.transform('translate3d(0, 0,0)');\n item.removeClass('notification-hidden');\n \n return item[0];\n };\n app.closeNotification = function (item, event) {\n item = $(item);\n if (item.length === 0) return;\n if (item.hasClass('notification-item-removing')) return;\n var container = $('.notifications');\n \n var itemHeight = item.outerHeight();\n item.css('height', itemHeight + 'px').transition(0).addClass('notification-item-removing');\n var clientLeft = item[0].clientLeft;\n \n item.css({\n height: '0px',\n marginBottom: '0px'\n }).transition('');\n \n if (item.data('f7NotificationOnClose')) item.data('f7NotificationOnClose')(event);\n \n if (container.find('.notification-item:not(.notification-item-removing)').length === 0) {\n container.transform('');\n }\n \n item.addClass('notification-hidden').transitionEnd(function () {\n item.remove();\n if (container.find('.notification-item').length === 0) {\n container.hide();\n }\n });\n };\n"," /*===============================================================================\n ************ Data Table ************\n ===============================================================================*/\n app.initDataTable = function (table) {\n table = $(table);\n var tableHeader = table.find('.data-table-header');\n var tableHeaderSelected = table.find('.data-table-header-selected');\n \n // Handle selected\n function checkSelectedHeader() {\n if (tableHeader.length > 0 && tableHeaderSelected.length > 0) {\n var checkedItems = table.find('tbody .checkbox-cell input:checked').length;\n table[checkedItems > 0 ? 'addClass' : 'removeClass']('data-table-has-checked');\n tableHeaderSelected.find('.data-table-selected-count').text(checkedItems);\n }\n }\n table.on('change', '.checkbox-cell input[type=\"checkbox\"]', function (e) {\n if (e.detail && e.detail._sentByF7DataTable) {\n // Scripted event, don't do anything\n return;\n }\n var input = $(this);\n var checked = input[0].checked;\n if (input.parents('thead').length > 0) {\n table\n .find('tbody tr')[checked ? 'addClass': 'removeClass']('data-table-row-selected')\n .find('input').prop('checked', checked).trigger('change', {_sentByF7DataTable: true});\n }\n else {\n input.parents('tr')[checked ? 'addClass': 'removeClass']('data-table-row-selected');\n if (!checked) {\n table.find('thead .checkbox-cell input[type=\"checkbox\"]').prop('checked', false);\n }\n else {\n // Check for all checked\n if (table.find('tbody .checkbox-cell input[type=\"checkbox\"]:checked').length === table.find('tbody tr').length) {\n table.find('thead .checkbox-cell input[type=\"checkbox\"]').prop('checked', true).trigger('change', {_sentByF7DataTable: true});\n }\n }\n }\n checkSelectedHeader();\n });\n checkSelectedHeader();\n \n // Sortable\n table.find('thead .sortable-cell').on('click', function () {\n var cell = $(this);\n var isActive = cell.hasClass('sortable-active');\n var currentSort;\n if (isActive) {\n currentSort = cell.hasClass('sortable-desc') ? 'desc' : 'asc';\n cell.removeClass('sortable-desc sortable-asc').addClass('sortable-' + (currentSort === 'desc' ? 'asc' : 'desc'));\n }\n else {\n table.find('thead .sortable-active').removeClass('sortable-active');\n cell.addClass('sortable-active');\n }\n });\n \n // Collapsible\n if (table.hasClass('data-table-collapsible')) {\n table.find('tbody td:not(.checkbox-cell)').each(function () {\n var index = $(this).index();\n var collpsibleTitle = $(this).attr('data-collapsible-title');\n if (!collpsibleTitle && collpsibleTitle !== '') {\n $(this).attr('data-collapsible-title', table.find('thead th').eq(index).text());\n }\n });\n }\n };\n app.initPageDataTables = function (pageContainer) {\n pageContainer = $(pageContainer);\n var dataTables = pageContainer.find('.data-table-init');\n if (dataTables.length === 0 && pageContainer.hasClass('data-table-init')) {\n dataTables = pageContainer;\n }\n dataTables.each(function () {\n app.initDataTable(this);\n });\n };\n \n"," /*===========================\n Compile Template7 Templates On App Init\n ===========================*/\n app.initTemplate7Templates = function () {\n if (!window.Template7) return;\n Template7.templates = Template7.templates || app.params.templates || {};\n Template7.data = Template7.data || app.params.template7Data || {};\n Template7.cache = Template7.cache || {};\n \n app.templates = Template7.templates;\n app.template7Data = Template7.data;\n app.template7Cache = Template7.cache;\n \n // Precompile templates on app init\n if (!app.params.precompileTemplates) return;\n $('script[type=\"text/template7\"]').each(function () {\n var id = $(this).attr('id');\n if (!id) return;\n Template7.templates[id] = Template7.compile($(this).html());\n });\n };\n \n"," /*=======================================\n ************ Plugins API ************\n =======================================*/\n var _plugins = [];\n app.initPlugins = function () {\n // Initialize plugins\n for (var plugin in app.plugins) {\n var p = app.plugins[plugin](app, app.params[plugin]);\n if (p) _plugins.push(p);\n }\n };\n // Plugin Hooks\n app.pluginHook = function (hook) {\n for (var i = 0; i < _plugins.length; i++) {\n if (_plugins[i].hooks && hook in _plugins[i].hooks) {\n _plugins[i].hooks[hook](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n }\n };\n // Prevented by plugin\n app.pluginPrevent = function (action) {\n var prevent = false;\n for (var i = 0; i < _plugins.length; i++) {\n if (_plugins[i].prevents && action in _plugins[i].prevents) {\n if (_plugins[i].prevents[action](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5])) prevent = true;\n }\n }\n return prevent;\n };\n // Preprocess content by plugin\n app.pluginProcess = function (process, data) {\n var processed = data;\n for (var i = 0; i < _plugins.length; i++) {\n if (_plugins[i].preprocess && process in _plugins[i].preprocess) {\n processed = _plugins[i].preprocess[process](data, arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]);\n }\n }\n return processed;\n };\n \n \n"," /*======================================================\n ************ App Init ************\n ======================================================*/\n app.init = function () {\n // Compile Template7 templates on app load\n if (app.initTemplate7Templates) app.initTemplate7Templates();\n \n // Init Plugins\n if (app.initPlugins) app.initPlugins();\n \n // Init Device\n if (app.getDeviceInfo) app.getDeviceInfo();\n \n // Init resize events and calc app sizes\n if (app.initResize) app.initResize();\n \n // Init Panels Breakpoints\n if (app.initPanelsBreakpoints && (app.params.panelLeftBreakpoint || app.params.panelRightBreakpoint)) app.initPanelsBreakpoints();\n \n // Init Click events\n if (app.initFastClicks && app.params.fastClicks) app.initFastClicks();\n if (app.initClickEvents) app.initClickEvents();\n \n // Init each page callbacks\n $('.page:not(.cached)').each(function () {\n app.initPageWithCallback(this);\n });\n \n // Init each navbar callbacks\n $('.navbar:not(.cached)').each(function () {\n app.initNavbarWithCallback(this);\n });\n \n // Init push state\n if (app.initPushState && app.params.pushState) app.initPushState();\n \n // Init Live Swipeouts events\n if (app.initSwipeout && app.params.swipeout) app.initSwipeout();\n \n // Init Live Sortable events\n if (app.initSortable && app.params.sortable) app.initSortable();\n \n // Init Live Swipe Panels\n if (app.initSwipePanels && (app.params.swipePanel || app.params.swipePanelOnlyClose)) app.initSwipePanels();\n \n // Init Material Inputs\n if (app.params.material && app.initMaterialWatchInputs) app.initMaterialWatchInputs();\n \n // Init Material Tabbar\n if (app.params.material) {\n $('.tabbar').each(function (index, el) {\n if ($(el).parents('.page').length === 0) {\n app.initMaterialTabbar(el);\n }\n });\n }\n \n // App Init callback\n if (app.params.onAppInit) app.params.onAppInit();\n \n // Plugin app init hook\n app.pluginHook('appInit');\n };\n if (app.params.init) app.init();\n \n"," //Return instance\n return app;\n };\n \n // Save Dom7\n Framework7.$ = window.Dom7;\n \n"," /*===========================\n Features Support Detection\n ===========================*/\n Framework7.prototype.support = (function () {\n var support = {\n touch: !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch),\n passiveListener: (function () {\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function() {\n supportsPassive = true;\n }\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {}\n return supportsPassive;\n })()\n };\n \n // Export object\n return support;\n })();\n \n"," /*===========================\n Device/OS Detection\n ===========================*/\n Framework7.prototype.device = (function () {\n var device = {};\n var ua = navigator.userAgent;\n var $ = Dom7;\n \n var windows = ua.match(/(Windows Phone);?[\\s\\/]+([\\d.]+)?/);\n var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);\n var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n var iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n \n device.ios = device.android = device.windows = device.iphone = device.ipod = device.ipad = device.androidChrome = false;\n \n // Windows\n if (windows) {\n device.os = 'windows';\n device.osVersion = windows[2];\n device.windows = true;\n }\n // Android\n if (android && !windows) {\n device.os = 'android';\n device.osVersion = android[2];\n device.android = true;\n device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;\n }\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n }\n // iOS\n if (iphone && !ipod) {\n device.osVersion = iphone[2].replace(/_/g, '.');\n device.iphone = true;\n }\n if (ipad) {\n device.osVersion = ipad[2].replace(/_/g, '.');\n device.ipad = true;\n }\n if (ipod) {\n device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;\n device.iphone = true;\n }\n // iOS 8+ changed UA\n if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {\n if (device.osVersion.split('.')[0] === '10') {\n device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];\n }\n }\n \n // Webview\n device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i);\n \n // Minimal UI\n if (device.os && device.os === 'ios') {\n var osVersionArr = device.osVersion.split('.');\n device.minimalUi = !device.webView &&\n (ipod || iphone) &&\n (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7) &&\n $('meta[name=\"viewport\"]').length > 0 && $('meta[name=\"viewport\"]').attr('content').indexOf('minimal-ui') >= 0;\n }\n \n // Check for status bar and fullscreen app mode\n var windowWidth = $(window).width();\n var windowHeight = $(window).height();\n \n device.needsStatusBar = function () {\n if (device.webView && (windowWidth * windowHeight === screen.width * screen.height)) {\n return true;\n }\n return false;\n };\n device.statusBar = device.needsStatusBar();\n \n // Classes\n var classNames = [];\n \n // Pixel Ratio\n device.pixelRatio = window.devicePixelRatio || 1;\n classNames.push('pixel-ratio-' + Math.floor(device.pixelRatio));\n if (device.pixelRatio >= 2) {\n classNames.push('retina');\n }\n \n // OS classes\n if (device.os) {\n classNames.push(device.os, device.os + '-' + device.osVersion.split('.')[0], device.os + '-' + device.osVersion.replace(/\\./g, '-'));\n if (device.os === 'ios') {\n var major = parseInt(device.osVersion.split('.')[0], 10);\n for (var i = major - 1; i >= 6; i--) {\n classNames.push('ios-gt-' + i);\n }\n }\n \n }\n // Status bar classes\n if (device.statusBar) {\n classNames.push('with-statusbar-overlay');\n }\n else {\n $('html').removeClass('with-statusbar-overlay');\n }\n \n // Add html classes\n if (classNames.length > 0) $('html').addClass(classNames.join(' '));\n \n // Export object\n return device;\n })();\n \n"," /*===========================\n Plugins prototype\n ===========================*/\n Framework7.prototype.plugins = {};\n \n"," /*===========================\n Swiper\n ===========================*/\n window.Swiper = function (container, params) {\n if (!(this instanceof Swiper)) return new Swiper(container, params);\n \n var defaults = {\n direction: 'horizontal',\n touchEventsTarget: 'container',\n initialSlide: 0,\n speed: 300,\n // autoplay\n autoplay: false,\n autoplayDisableOnInteraction: true,\n autoplayStopOnLast: false,\n // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).\n iOSEdgeSwipeDetection: false,\n iOSEdgeSwipeThreshold: 20,\n // Free mode\n freeMode: false,\n freeModeMomentum: true,\n freeModeMomentumRatio: 1,\n freeModeMomentumBounce: true,\n freeModeMomentumBounceRatio: 1,\n freeModeMomentumVelocityRatio: 1,\n freeModeSticky: false,\n freeModeMinimumVelocity: 0.02,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n coverflow: {\n rotate: 50,\n stretch: 0,\n depth: 100,\n modifier: 1,\n slideShadows : true\n },\n flip: {\n slideShadows : true,\n limitRotation: true\n },\n cube: {\n slideShadows: true,\n shadow: true,\n shadowOffset: 20,\n shadowScale: 0.94\n },\n fade: {\n crossFade: false\n },\n // Parallax\n parallax: false,\n // Zoom\n zoom: false,\n zoomMax: 3,\n zoomMin: 1,\n zoomToggle: true,\n // Scrollbar\n scrollbar: null,\n scrollbarHide: true,\n scrollbarDraggable: false,\n scrollbarSnapOnRelease: false,\n // Keyboard Mousewheel\n keyboardControl: false,\n mousewheelControl: false,\n mousewheelReleaseOnEdges: false,\n mousewheelInvert: false,\n mousewheelForceToAxis: false,\n mousewheelSensitivity: 1,\n mousewheelEventsTarged: 'container',\n // Hash Navigation\n hashnav: false,\n hashnavWatchState: false,\n // History\n history: false,\n // Commong Nav State\n replaceState: false,\n // Breakpoints\n breakpoints: undefined,\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerColumn: 1,\n slidesPerColumnFill: 'column',\n slidesPerGroup: 1,\n centeredSlides: false,\n slidesOffsetBefore: 0, // in px\n slidesOffsetAfter: 0, // in px\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n onlyExternal: false,\n threshold: 0,\n touchMoveStopPropagation: true,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Pagination\n pagination: null,\n paginationElement: 'span',\n paginationClickable: false,\n paginationHide: false,\n paginationBulletRender: null,\n paginationProgressRender: null,\n paginationFractionRender: null,\n paginationCustomRender: null,\n paginationType: 'bullets', // 'bullets' or 'progress' or 'fraction' or 'custom'\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Next/prev buttons\n nextButton: null,\n prevButton: null,\n // Progress\n watchSlidesProgress: false,\n watchSlidesVisibility: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // Lazy Loading\n lazyLoading: false,\n lazyLoadingInPrevNext: false,\n lazyLoadingInPrevNextAmount: 1,\n lazyLoadingOnTransitionStart: false,\n // Images\n preloadImages: true,\n updateOnImagesReady: true,\n // loop\n loop: false,\n loopAdditionalSlides: 0,\n loopedSlides: null,\n // Control\n control: undefined,\n controlInverse: false,\n controlBy: 'slide', //or 'container'\n normalizeSlideIndex: true,\n // Swiping/no swiping\n allowSwipeToPrev: true,\n allowSwipeToNext: true,\n swipeHandler: null, //'.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n // Passive Listeners\n passiveListeners: true,\n // NS\n containerModifierClass: 'swiper-container-', // NEW\n slideClass: 'swiper-slide',\n slideActiveClass: 'swiper-slide-active',\n slideDuplicateActiveClass: 'swiper-slide-duplicate-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideDuplicateClass: 'swiper-slide-duplicate',\n slideNextClass: 'swiper-slide-next',\n slideDuplicateNextClass: 'swiper-slide-duplicate-next',\n slidePrevClass: 'swiper-slide-prev',\n slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',\n wrapperClass: 'swiper-wrapper',\n bulletClass: 'swiper-pagination-bullet',\n bulletActiveClass: 'swiper-pagination-bullet-active',\n buttonDisabledClass: 'swiper-button-disabled',\n paginationCurrentClass: 'swiper-pagination-current',\n paginationTotalClass: 'swiper-pagination-total',\n paginationHiddenClass: 'swiper-pagination-hidden',\n paginationProgressbarClass: 'swiper-pagination-progressbar',\n paginationClickableClass: 'swiper-pagination-clickable', // NEW\n paginationModifierClass: 'swiper-pagination-', // NEW\n lazyLoadingClass: 'swiper-lazy',\n lazyStatusLoadingClass: 'swiper-lazy-loading',\n lazyStatusLoadedClass: 'swiper-lazy-loaded',\n lazyPreloaderClass: 'swiper-lazy-preloader',\n notificationClass: 'swiper-notification',\n preloaderClass: 'preloader',\n zoomContainerClass: 'swiper-zoom-container',\n \n // Observer\n observer: false,\n observeParents: false,\n // Accessibility\n a11y: false,\n prevSlideMessage: 'Previous slide',\n nextSlideMessage: 'Next slide',\n firstSlideMessage: 'This is the first slide',\n lastSlideMessage: 'This is the last slide',\n paginationBulletMessage: 'Go to slide {{index}}',\n // Callbacks\n runCallbacksOnInit: true\n /*\n Callbacks:\n onInit: function (swiper)\n onDestroy: function (swiper)\n onBeforeResize: function (swiper)\n onAfterResize: function (swiper)\n onClick: function (swiper, e)\n onTap: function (swiper, e)\n onDoubleTap: function (swiper, e)\n onSliderMove: function (swiper, e)\n onSlideChangeStart: function (swiper)\n onSlideChangeEnd: function (swiper)\n onTransitionStart: function (swiper)\n onTransitionEnd: function (swiper)\n onImagesReady: function (swiper)\n onProgress: function (swiper, progress)\n onTouchStart: function (swiper, e)\n onTouchMove: function (swiper, e)\n onTouchMoveOpposite: function (swiper, e)\n onTouchEnd: function (swiper, e)\n onReachBeginning: function (swiper)\n onReachEnd: function (swiper)\n onSetTransition: function (swiper, duration)\n onSetTranslate: function (swiper, translate)\n onAutoplayStart: function (swiper)\n onAutoplayStop: function (swiper),\n onLazyImageLoad: function (swiper, slide, image)\n onLazyImageReady: function (swiper, slide, image)\n onKeyPress: function (swiper, keyCode)\n */\n \n };\n var initialVirtualTranslate = params && params.virtualTranslate;\n \n params = params || {};\n var originalParams = {};\n for (var param in params) {\n if (typeof params[param] === 'object' && params[param] !== null && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) {\n originalParams[param] = {};\n for (var deepParam in params[param]) {\n originalParams[param][deepParam] = params[param][deepParam];\n }\n }\n else {\n originalParams[param] = params[param];\n }\n }\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n else if (typeof params[def] === 'object') {\n for (var deepDef in defaults[def]) {\n if (typeof params[def][deepDef] === 'undefined') {\n params[def][deepDef] = defaults[def][deepDef];\n }\n }\n }\n }\n \n // Swiper\n var s = this;\n \n // Params\n s.params = params;\n s.originalParams = originalParams;\n \n // Classname\n s.classNames = [];\n /*=========================\n Dom Library and plugins\n ===========================*/\n var $ = $;\n if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){\n $ = Dom7;\n }\n if (typeof $ === 'undefined') {\n if (typeof Dom7 === 'undefined') {\n $ = window.Dom7 || window.Zepto || window.jQuery;\n }\n else {\n $ = Dom7;\n }\n if (!$) return;\n }\n // Export it to Swiper instance\n s.$ = $;\n \n /*=========================\n Breakpoints\n ===========================*/\n s.currentBreakpoint = undefined;\n s.getActiveBreakpoint = function () {\n //Get breakpoint for window width\n if (!s.params.breakpoints) return false;\n var breakpoint = false;\n var points = [], point;\n for ( point in s.params.breakpoints ) {\n if (s.params.breakpoints.hasOwnProperty(point)) {\n points.push(point);\n }\n }\n points.sort(function (a, b) {\n return parseInt(a, 10) > parseInt(b, 10);\n });\n for (var i = 0; i < points.length; i++) {\n point = points[i];\n if (point >= window.innerWidth && !breakpoint) {\n breakpoint = point;\n }\n }\n return breakpoint || 'max';\n };\n s.setBreakpoint = function () {\n //Set breakpoint for window width and update parameters\n var breakpoint = s.getActiveBreakpoint();\n if (breakpoint && s.currentBreakpoint !== breakpoint) {\n var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams;\n var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView);\n for ( var param in breakPointsParams ) {\n s.params[param] = breakPointsParams[param];\n }\n s.currentBreakpoint = breakpoint;\n if(needsReLoop && s.destroyLoop) {\n s.reLoop(true);\n }\n }\n };\n // Set breakpoint on load\n if (s.params.breakpoints) {\n s.setBreakpoint();\n }\n \n /*=========================\n Preparation - Define Container, Wrapper and Pagination\n ===========================*/\n s.container = $(container);\n if (s.container.length === 0) return;\n if (s.container.length > 1) {\n var swipers = [];\n s.container.each(function () {\n var container = this;\n swipers.push(new Swiper(this, params));\n });\n return swipers;\n }\n \n // Save instance in container HTML Element and in data\n s.container[0].swiper = s;\n s.container.data('swiper', s);\n \n s.classNames.push(s.params.containerModifierClass + s.params.direction);\n \n if (s.params.freeMode) {\n s.classNames.push(s.params.containerModifierClass + 'free-mode');\n }\n if (!s.support.flexbox) {\n s.classNames.push(s.params.containerModifierClass + 'no-flexbox');\n s.params.slidesPerColumn = 1;\n }\n if (s.params.autoHeight) {\n s.classNames.push(s.params.containerModifierClass + 'autoheight');\n }\n // Enable slides progress when required\n if (s.params.parallax || s.params.watchSlidesVisibility) {\n s.params.watchSlidesProgress = true;\n }\n // Max resistance when touchReleaseOnEdges\n if (s.params.touchReleaseOnEdges) {\n s.params.resistanceRatio = 0;\n }\n // Coverflow / 3D\n if (['cube', 'coverflow', 'flip'].indexOf(s.params.effect) >= 0) {\n if (s.support.transforms3d) {\n s.params.watchSlidesProgress = true;\n s.classNames.push(s.params.containerModifierClass + '3d');\n }\n else {\n s.params.effect = 'slide';\n }\n }\n if (s.params.effect !== 'slide') {\n s.classNames.push(s.params.containerModifierClass + s.params.effect);\n }\n if (s.params.effect === 'cube') {\n s.params.resistanceRatio = 0;\n s.params.slidesPerView = 1;\n s.params.slidesPerColumn = 1;\n s.params.slidesPerGroup = 1;\n s.params.centeredSlides = false;\n s.params.spaceBetween = 0;\n s.params.virtualTranslate = true;\n }\n if (s.params.effect === 'fade' || s.params.effect === 'flip') {\n s.params.slidesPerView = 1;\n s.params.slidesPerColumn = 1;\n s.params.slidesPerGroup = 1;\n s.params.watchSlidesProgress = true;\n s.params.spaceBetween = 0;\n if (typeof initialVirtualTranslate === 'undefined') {\n s.params.virtualTranslate = true;\n }\n }\n \n // Grab Cursor\n if (s.params.grabCursor && s.support.touch) {\n s.params.grabCursor = false;\n }\n \n // Wrapper\n s.wrapper = s.container.children('.' + s.params.wrapperClass);\n \n // Pagination\n if (s.params.pagination) {\n s.paginationContainer = $(s.params.pagination);\n if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) {\n s.paginationContainer = s.container.find(s.params.pagination);\n }\n \n if (s.params.paginationType === 'bullets' && s.params.paginationClickable) {\n s.paginationContainer.addClass(s.params.paginationModifierClass + 'clickable');\n }\n else {\n s.params.paginationClickable = false;\n }\n s.paginationContainer.addClass(s.params.paginationModifierClass + s.params.paginationType);\n }\n // Next/Prev Buttons\n if (s.params.nextButton || s.params.prevButton) {\n if (s.params.nextButton) {\n s.nextButton = $(s.params.nextButton);\n if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) {\n s.nextButton = s.container.find(s.params.nextButton);\n }\n }\n if (s.params.prevButton) {\n s.prevButton = $(s.params.prevButton);\n if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) {\n s.prevButton = s.container.find(s.params.prevButton);\n }\n }\n }\n \n // Is Horizontal\n s.isHorizontal = function () {\n return s.params.direction === 'horizontal';\n };\n // s.isH = isH;\n \n // RTL\n s.rtl = s.isHorizontal() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl');\n if (s.rtl) {\n s.classNames.push(s.params.containerModifierClass + 'rtl');\n }\n \n // Wrong RTL support\n if (s.rtl) {\n s.wrongRTL = s.wrapper.css('display') === '-webkit-box';\n }\n \n // Columns\n if (s.params.slidesPerColumn > 1) {\n s.classNames.push(s.params.containerModifierClass + 'multirow');\n }\n \n // Check for Android\n if (s.device.android) {\n s.classNames.push(s.params.containerModifierClass + 'android');\n }\n \n // Add classes\n s.container.addClass(s.classNames.join(' '));\n \n // Translate\n s.translate = 0;\n \n // Progress\n s.progress = 0;\n \n // Velocity\n s.velocity = 0;\n \n /*=========================\n Locks, unlocks\n ===========================*/\n s.lockSwipeToNext = function () {\n s.params.allowSwipeToNext = false;\n if (s.params.allowSwipeToPrev === false && s.params.grabCursor) {\n s.unsetGrabCursor();\n }\n };\n s.lockSwipeToPrev = function () {\n s.params.allowSwipeToPrev = false;\n if (s.params.allowSwipeToNext === false && s.params.grabCursor) {\n s.unsetGrabCursor();\n }\n };\n s.lockSwipes = function () {\n s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false;\n if (s.params.grabCursor) s.unsetGrabCursor();\n };\n s.unlockSwipeToNext = function () {\n s.params.allowSwipeToNext = true;\n if (s.params.allowSwipeToPrev === true && s.params.grabCursor) {\n s.setGrabCursor();\n }\n };\n s.unlockSwipeToPrev = function () {\n s.params.allowSwipeToPrev = true;\n if (s.params.allowSwipeToNext === true && s.params.grabCursor) {\n s.setGrabCursor();\n }\n };\n s.unlockSwipes = function () {\n s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true;\n if (s.params.grabCursor) s.setGrabCursor();\n };\n \n /*=========================\n Round helper\n ===========================*/\n function round(a) {\n return Math.floor(a);\n }\n /*=========================\n Set grab cursor\n ===========================*/\n s.setGrabCursor = function(moving) {\n s.container[0].style.cursor = 'move';\n s.container[0].style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';\n s.container[0].style.cursor = moving ? '-moz-grabbin' : '-moz-grab';\n s.container[0].style.cursor = moving ? 'grabbing': 'grab';\n };\n s.unsetGrabCursor = function () {\n s.container[0].style.cursor = '';\n };\n if (s.params.grabCursor) {\n s.setGrabCursor();\n }\n /*=========================\n Update on Images Ready\n ===========================*/\n s.imagesToLoad = [];\n s.imagesLoaded = 0;\n \n s.loadImage = function (imgElement, src, srcset, sizes, checkForComplete, callback) {\n var image;\n function onReady () {\n if (callback) callback();\n }\n if (!imgElement.complete || !checkForComplete) {\n if (src) {\n image = new window.Image();\n image.onload = onReady;\n image.onerror = onReady;\n if (sizes) {\n image.sizes = sizes;\n }\n if (srcset) {\n image.srcset = srcset;\n }\n if (src) {\n image.src = src;\n }\n } else {\n onReady();\n }\n \n } else {//image already loaded...\n onReady();\n }\n };\n s.preloadImages = function () {\n s.imagesToLoad = s.container.find('img');\n function _onReady() {\n if (typeof s === 'undefined' || s === null || !s) return;\n if (s.imagesLoaded !== undefined) s.imagesLoaded++;\n if (s.imagesLoaded === s.imagesToLoad.length) {\n if (s.params.updateOnImagesReady) s.update();\n s.emit('onImagesReady', s);\n }\n }\n for (var i = 0; i < s.imagesToLoad.length; i++) {\n s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), s.imagesToLoad[i].sizes || s.imagesToLoad[i].getAttribute('sizes'), true, _onReady);\n }\n };\n \n /*=========================\n Autoplay\n ===========================*/\n s.autoplayTimeoutId = undefined;\n s.autoplaying = false;\n s.autoplayPaused = false;\n function autoplay() {\n var autoplayDelay = s.params.autoplay;\n var activeSlide = s.slides.eq(s.activeIndex);\n if (activeSlide.attr('data-swiper-autoplay')) {\n autoplayDelay = activeSlide.attr('data-swiper-autoplay') || s.params.autoplay;\n }\n s.autoplayTimeoutId = setTimeout(function () {\n if (s.params.loop) {\n s.fixLoop();\n s._slideNext();\n s.emit('onAutoplay', s);\n }\n else {\n if (!s.isEnd) {\n s._slideNext();\n s.emit('onAutoplay', s);\n }\n else {\n if (!params.autoplayStopOnLast) {\n s._slideTo(0);\n s.emit('onAutoplay', s);\n }\n else {\n s.stopAutoplay();\n }\n }\n }\n }, autoplayDelay);\n }\n s.startAutoplay = function () {\n if (typeof s.autoplayTimeoutId !== 'undefined') return false;\n if (!s.params.autoplay) return false;\n if (s.autoplaying) return false;\n s.autoplaying = true;\n s.emit('onAutoplayStart', s);\n autoplay();\n };\n s.stopAutoplay = function (internal) {\n if (!s.autoplayTimeoutId) return;\n if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);\n s.autoplaying = false;\n s.autoplayTimeoutId = undefined;\n s.emit('onAutoplayStop', s);\n };\n s.pauseAutoplay = function (speed) {\n if (s.autoplayPaused) return;\n if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);\n s.autoplayPaused = true;\n if (speed === 0) {\n s.autoplayPaused = false;\n autoplay();\n }\n else {\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.autoplayPaused = false;\n if (!s.autoplaying) {\n s.stopAutoplay();\n }\n else {\n autoplay();\n }\n });\n }\n };\n /*=========================\n Min/Max Translate\n ===========================*/\n s.minTranslate = function () {\n return (-s.snapGrid[0]);\n };\n s.maxTranslate = function () {\n return (-s.snapGrid[s.snapGrid.length - 1]);\n };\n /*=========================\n Slider/slides sizes\n ===========================*/\n s.updateAutoHeight = function () {\n var activeSlides = [];\n var newHeight = 0;\n var i;\n \n // Find slides currently in view\n if(s.params.slidesPerView !== 'auto' && s.params.slidesPerView > 1) {\n for (i = 0; i < Math.ceil(s.params.slidesPerView); i++) {\n var index = s.activeIndex + i;\n if(index > s.slides.length) break;\n activeSlides.push(s.slides.eq(index)[0]);\n }\n } else {\n activeSlides.push(s.slides.eq(s.activeIndex)[0]);\n }\n \n // Find new height from heighest slide in view\n for (i = 0; i < activeSlides.length; i++) {\n if (typeof activeSlides[i] !== 'undefined') {\n var height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n }\n \n // Update Height\n if (newHeight) s.wrapper.css('height', newHeight + 'px');\n };\n s.updateContainerSize = function () {\n var width, height;\n if (typeof s.params.width !== 'undefined') {\n width = s.params.width;\n }\n else {\n width = s.container[0].clientWidth;\n }\n if (typeof s.params.height !== 'undefined') {\n height = s.params.height;\n }\n else {\n height = s.container[0].clientHeight;\n }\n if (width === 0 && s.isHorizontal() || height === 0 && !s.isHorizontal()) {\n return;\n }\n \n //Subtract paddings\n width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10);\n height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10);\n \n // Store values\n s.width = width;\n s.height = height;\n s.size = s.isHorizontal() ? s.width : s.height;\n };\n \n s.updateSlidesSize = function () {\n s.slides = s.wrapper.children('.' + s.params.slideClass);\n s.snapGrid = [];\n s.slidesGrid = [];\n s.slidesSizesGrid = [];\n \n var spaceBetween = s.params.spaceBetween,\n slidePosition = -s.params.slidesOffsetBefore,\n i,\n prevSlideSize = 0,\n index = 0;\n if (typeof s.size === 'undefined') return;\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size;\n }\n \n s.virtualSize = -spaceBetween;\n // reset margins\n if (s.rtl) s.slides.css({marginLeft: '', marginTop: ''});\n else s.slides.css({marginRight: '', marginBottom: ''});\n \n var slidesNumberEvenToRows;\n if (s.params.slidesPerColumn > 1) {\n if (Math.floor(s.slides.length / s.params.slidesPerColumn) === s.slides.length / s.params.slidesPerColumn) {\n slidesNumberEvenToRows = s.slides.length;\n }\n else {\n slidesNumberEvenToRows = Math.ceil(s.slides.length / s.params.slidesPerColumn) * s.params.slidesPerColumn;\n }\n if (s.params.slidesPerView !== 'auto' && s.params.slidesPerColumnFill === 'row') {\n slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, s.params.slidesPerView * s.params.slidesPerColumn);\n }\n }\n \n // Calc slides\n var slideSize;\n var slidesPerColumn = s.params.slidesPerColumn;\n var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;\n var numFullColumns = slidesPerRow - (s.params.slidesPerColumn * slidesPerRow - s.slides.length);\n for (i = 0; i < s.slides.length; i++) {\n slideSize = 0;\n var slide = s.slides.eq(i);\n if (s.params.slidesPerColumn > 1) {\n // Set slides order\n var newSlideOrderIndex;\n var column, row;\n if (s.params.slidesPerColumnFill === 'column') {\n column = Math.floor(i / slidesPerColumn);\n row = i - column * slidesPerColumn;\n if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn-1)) {\n if (++row >= slidesPerColumn) {\n row = 0;\n column++;\n }\n }\n newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn;\n slide\n .css({\n '-webkit-box-ordinal-group': newSlideOrderIndex,\n '-moz-box-ordinal-group': newSlideOrderIndex,\n '-ms-flex-order': newSlideOrderIndex,\n '-webkit-order': newSlideOrderIndex,\n 'order': newSlideOrderIndex\n });\n }\n else {\n row = Math.floor(i / slidesPerRow);\n column = i - row * slidesPerRow;\n }\n slide\n .css(\n 'margin-' + (s.isHorizontal() ? 'top' : 'left'),\n (row !== 0 && s.params.spaceBetween) && (s.params.spaceBetween + 'px')\n )\n .attr('data-swiper-column', column)\n .attr('data-swiper-row', row);\n \n }\n if (slide.css('display') === 'none') continue;\n if (s.params.slidesPerView === 'auto') {\n slideSize = s.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);\n if (s.params.roundLengths) slideSize = round(slideSize);\n }\n else {\n slideSize = (s.size - (s.params.slidesPerView - 1) * spaceBetween) / s.params.slidesPerView;\n if (s.params.roundLengths) slideSize = round(slideSize);\n \n if (s.isHorizontal()) {\n s.slides[i].style.width = slideSize + 'px';\n }\n else {\n s.slides[i].style.height = slideSize + 'px';\n }\n }\n s.slides[i].swiperSlideSize = slideSize;\n s.slidesSizesGrid.push(slideSize);\n \n \n if (s.params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if(prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);\n s.slidesGrid.push(slidePosition);\n }\n else {\n if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);\n s.slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n \n s.virtualSize += slideSize + spaceBetween;\n \n prevSlideSize = slideSize;\n \n index ++;\n }\n s.virtualSize = Math.max(s.virtualSize, s.size) + s.params.slidesOffsetAfter;\n var newSlidesGrid;\n \n if (\n s.rtl && s.wrongRTL && (s.params.effect === 'slide' || s.params.effect === 'coverflow')) {\n s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n }\n if (!s.support.flexbox || s.params.setWrapperSize) {\n if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});\n }\n \n if (s.params.slidesPerColumn > 1) {\n s.virtualSize = (slideSize + s.params.spaceBetween) * slidesNumberEvenToRows;\n s.virtualSize = Math.ceil(s.virtualSize / s.params.slidesPerColumn) - s.params.spaceBetween;\n if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});\n if (s.params.centeredSlides) {\n newSlidesGrid = [];\n for (i = 0; i < s.snapGrid.length; i++) {\n if (s.snapGrid[i] < s.virtualSize + s.snapGrid[0]) newSlidesGrid.push(s.snapGrid[i]);\n }\n s.snapGrid = newSlidesGrid;\n }\n }\n \n // Remove last grid elements depending on width\n if (!s.params.centeredSlides) {\n newSlidesGrid = [];\n for (i = 0; i < s.snapGrid.length; i++) {\n if (s.snapGrid[i] <= s.virtualSize - s.size) {\n newSlidesGrid.push(s.snapGrid[i]);\n }\n }\n s.snapGrid = newSlidesGrid;\n if (Math.floor(s.virtualSize - s.size) - Math.floor(s.snapGrid[s.snapGrid.length - 1]) > 1) {\n s.snapGrid.push(s.virtualSize - s.size);\n }\n }\n if (s.snapGrid.length === 0) s.snapGrid = [0];\n \n if (s.params.spaceBetween !== 0) {\n if (s.isHorizontal()) {\n if (s.rtl) s.slides.css({marginLeft: spaceBetween + 'px'});\n else s.slides.css({marginRight: spaceBetween + 'px'});\n }\n else s.slides.css({marginBottom: spaceBetween + 'px'});\n }\n if (s.params.watchSlidesProgress) {\n s.updateSlidesOffset();\n }\n };\n s.updateSlidesOffset = function () {\n for (var i = 0; i < s.slides.length; i++) {\n s.slides[i].swiperSlideOffset = s.isHorizontal() ? s.slides[i].offsetLeft : s.slides[i].offsetTop;\n }\n };\n \n /*=========================\n Dynamic Slides Per View\n ===========================*/\n s.currentSlidesPerView = function () {\n var spv = 1, i, j;\n if (s.params.centeredSlides) {\n var size = s.slides[s.activeIndex].swiperSlideSize;\n var breakLoop;\n for (i = s.activeIndex + 1; i < s.slides.length; i++) {\n if (s.slides[i] && !breakLoop) {\n size += s.slides[i].swiperSlideSize;\n spv ++;\n if (size > s.size) breakLoop = true;\n }\n }\n for (j = s.activeIndex - 1; j >= 0; j--) {\n if (s.slides[j] && !breakLoop) {\n size += s.slides[j].swiperSlideSize;\n spv ++;\n if (size > s.size) breakLoop = true;\n }\n }\n }\n else {\n for (i = s.activeIndex + 1; i < s.slides.length; i++) {\n if (s.slidesGrid[i] - s.slidesGrid[s.activeIndex] < s.size) {\n spv++;\n }\n }\n }\n return spv;\n };\n /*=========================\n Slider/slides progress\n ===========================*/\n s.updateSlidesProgress = function (translate) {\n if (typeof translate === 'undefined') {\n translate = s.translate || 0;\n }\n if (s.slides.length === 0) return;\n if (typeof s.slides[0].swiperSlideOffset === 'undefined') s.updateSlidesOffset();\n \n var offsetCenter = -translate;\n if (s.rtl) offsetCenter = translate;\n \n // Visible Slides\n s.slides.removeClass(s.params.slideVisibleClass);\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides[i];\n var slideProgress = (offsetCenter + (s.params.centeredSlides ? s.minTranslate() : 0) - slide.swiperSlideOffset) / (slide.swiperSlideSize + s.params.spaceBetween);\n if (s.params.watchSlidesVisibility) {\n var slideBefore = -(offsetCenter - slide.swiperSlideOffset);\n var slideAfter = slideBefore + s.slidesSizesGrid[i];\n var isVisible =\n (slideBefore >= 0 && slideBefore < s.size) ||\n (slideAfter > 0 && slideAfter <= s.size) ||\n (slideBefore <= 0 && slideAfter >= s.size);\n if (isVisible) {\n s.slides.eq(i).addClass(s.params.slideVisibleClass);\n }\n }\n slide.progress = s.rtl ? -slideProgress : slideProgress;\n }\n };\n s.updateProgress = function (translate) {\n if (typeof translate === 'undefined') {\n translate = s.translate || 0;\n }\n var translatesDiff = s.maxTranslate() - s.minTranslate();\n var wasBeginning = s.isBeginning;\n var wasEnd = s.isEnd;\n if (translatesDiff === 0) {\n s.progress = 0;\n s.isBeginning = s.isEnd = true;\n }\n else {\n s.progress = (translate - s.minTranslate()) / (translatesDiff);\n s.isBeginning = s.progress <= 0;\n s.isEnd = s.progress >= 1;\n }\n if (s.isBeginning && !wasBeginning) s.emit('onReachBeginning', s);\n if (s.isEnd && !wasEnd) s.emit('onReachEnd', s);\n \n if (s.params.watchSlidesProgress) s.updateSlidesProgress(translate);\n s.emit('onProgress', s, s.progress);\n };\n s.updateActiveIndex = function () {\n var translate = s.rtl ? s.translate : -s.translate;\n var newActiveIndex, i, snapIndex;\n for (i = 0; i < s.slidesGrid.length; i ++) {\n if (typeof s.slidesGrid[i + 1] !== 'undefined') {\n if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1] - (s.slidesGrid[i + 1] - s.slidesGrid[i]) / 2) {\n newActiveIndex = i;\n }\n else if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1]) {\n newActiveIndex = i + 1;\n }\n }\n else {\n if (translate >= s.slidesGrid[i]) {\n newActiveIndex = i;\n }\n }\n }\n // Normalize slideIndex\n if(s.params.normalizeSlideIndex){\n if (newActiveIndex < 0 || typeof newActiveIndex === 'undefined') newActiveIndex = 0;\n }\n // for (i = 0; i < s.slidesGrid.length; i++) {\n // if (- translate >= s.slidesGrid[i]) {\n // newActiveIndex = i;\n // }\n // }\n snapIndex = Math.floor(newActiveIndex / s.params.slidesPerGroup);\n if (snapIndex >= s.snapGrid.length) snapIndex = s.snapGrid.length - 1;\n \n if (newActiveIndex === s.activeIndex) {\n return;\n }\n s.snapIndex = snapIndex;\n s.previousIndex = s.activeIndex;\n s.activeIndex = newActiveIndex;\n s.updateClasses();\n s.updateRealIndex();\n };\n s.updateRealIndex = function(){\n s.realIndex = parseInt(s.slides.eq(s.activeIndex).attr('data-swiper-slide-index') || s.activeIndex, 10);\n };\n \n /*=========================\n Classes\n ===========================*/\n s.updateClasses = function () {\n s.slides.removeClass(s.params.slideActiveClass + ' ' + s.params.slideNextClass + ' ' + s.params.slidePrevClass + ' ' + s.params.slideDuplicateActiveClass + ' ' + s.params.slideDuplicateNextClass + ' ' + s.params.slideDuplicatePrevClass);\n var activeSlide = s.slides.eq(s.activeIndex);\n // Active classes\n activeSlide.addClass(s.params.slideActiveClass);\n if (params.loop) {\n // Duplicate to all looped slides\n if (activeSlide.hasClass(s.params.slideDuplicateClass)) {\n s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index=\"' + s.realIndex + '\"]').addClass(s.params.slideDuplicateActiveClass);\n }\n else {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + s.realIndex + '\"]').addClass(s.params.slideDuplicateActiveClass);\n }\n }\n // Next Slide\n var nextSlide = activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass);\n if (s.params.loop && nextSlide.length === 0) {\n nextSlide = s.slides.eq(0);\n nextSlide.addClass(s.params.slideNextClass);\n }\n // Prev Slide\n var prevSlide = activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass);\n if (s.params.loop && prevSlide.length === 0) {\n prevSlide = s.slides.eq(-1);\n prevSlide.addClass(s.params.slidePrevClass);\n }\n if (params.loop) {\n // Duplicate to all looped slides\n if (nextSlide.hasClass(s.params.slideDuplicateClass)) {\n s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index=\"' + nextSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicateNextClass);\n }\n else {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + nextSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicateNextClass);\n }\n if (prevSlide.hasClass(s.params.slideDuplicateClass)) {\n s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index=\"' + prevSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicatePrevClass);\n }\n else {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + prevSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicatePrevClass);\n }\n }\n \n // Pagination\n if (s.paginationContainer && s.paginationContainer.length > 0) {\n // Current/Total\n var current,\n total = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;\n if (s.params.loop) {\n current = Math.ceil((s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup);\n if (current > s.slides.length - 1 - s.loopedSlides * 2) {\n current = current - (s.slides.length - s.loopedSlides * 2);\n }\n if (current > total - 1) current = current - total;\n if (current < 0 && s.params.paginationType !== 'bullets') current = total + current;\n }\n else {\n if (typeof s.snapIndex !== 'undefined') {\n current = s.snapIndex;\n }\n else {\n current = s.activeIndex || 0;\n }\n }\n // Types\n if (s.params.paginationType === 'bullets' && s.bullets && s.bullets.length > 0) {\n s.bullets.removeClass(s.params.bulletActiveClass);\n if (s.paginationContainer.length > 1) {\n s.bullets.each(function () {\n if ($(this).index() === current) $(this).addClass(s.params.bulletActiveClass);\n });\n }\n else {\n s.bullets.eq(current).addClass(s.params.bulletActiveClass);\n }\n }\n if (s.params.paginationType === 'fraction') {\n s.paginationContainer.find('.' + s.params.paginationCurrentClass).text(current + 1);\n s.paginationContainer.find('.' + s.params.paginationTotalClass).text(total);\n }\n if (s.params.paginationType === 'progress') {\n var scale = (current + 1) / total,\n scaleX = scale,\n scaleY = 1;\n if (!s.isHorizontal()) {\n scaleY = scale;\n scaleX = 1;\n }\n s.paginationContainer.find('.' + s.params.paginationProgressbarClass).transform('translate3d(0,0,0) scaleX(' + scaleX + ') scaleY(' + scaleY + ')').transition(s.params.speed);\n }\n if (s.params.paginationType === 'custom' && s.params.paginationCustomRender) {\n s.paginationContainer.html(s.params.paginationCustomRender(s, current + 1, total));\n s.emit('onPaginationRendered', s, s.paginationContainer[0]);\n }\n }\n \n // Next/active buttons\n if (!s.params.loop) {\n if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {\n if (s.isBeginning) {\n s.prevButton.addClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.disable(s.prevButton);\n }\n else {\n s.prevButton.removeClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.enable(s.prevButton);\n }\n }\n if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {\n if (s.isEnd) {\n s.nextButton.addClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.disable(s.nextButton);\n }\n else {\n s.nextButton.removeClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.enable(s.nextButton);\n }\n }\n }\n };\n \n /*=========================\n Pagination\n ===========================*/\n s.updatePagination = function () {\n if (!s.params.pagination) return;\n if (s.paginationContainer && s.paginationContainer.length > 0) {\n var paginationHTML = '';\n if (s.params.paginationType === 'bullets') {\n var numberOfBullets = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;\n for (var i = 0; i < numberOfBullets; i++) {\n if (s.params.paginationBulletRender) {\n paginationHTML += s.params.paginationBulletRender(s, i, s.params.bulletClass);\n }\n else {\n paginationHTML += '<' + s.params.paginationElement+' class=\"' + s.params.bulletClass + '\">';\n }\n }\n s.paginationContainer.html(paginationHTML);\n s.bullets = s.paginationContainer.find('.' + s.params.bulletClass);\n if (s.params.paginationClickable && s.params.a11y && s.a11y) {\n s.a11y.initPagination();\n }\n }\n if (s.params.paginationType === 'fraction') {\n if (s.params.paginationFractionRender) {\n paginationHTML = s.params.paginationFractionRender(s, s.params.paginationCurrentClass, s.params.paginationTotalClass);\n }\n else {\n paginationHTML =\n '' +\n ' / ' +\n '';\n }\n s.paginationContainer.html(paginationHTML);\n }\n if (s.params.paginationType === 'progress') {\n if (s.params.paginationProgressRender) {\n paginationHTML = s.params.paginationProgressRender(s, s.params.paginationProgressbarClass);\n }\n else {\n paginationHTML = '';\n }\n s.paginationContainer.html(paginationHTML);\n }\n if (s.params.paginationType !== 'custom') {\n s.emit('onPaginationRendered', s, s.paginationContainer[0]);\n }\n }\n };\n /*=========================\n Common update method\n ===========================*/\n s.update = function (updateTranslate) {\n if (!s) return;\n s.updateContainerSize();\n s.updateSlidesSize();\n s.updateProgress();\n s.updatePagination();\n s.updateClasses();\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.set();\n }\n var newTranslate;\n function forceSetTranslate() {\n var translate = s.rtl ? -s.translate : s.translate;\n newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());\n s.setWrapperTranslate(newTranslate);\n s.updateActiveIndex();\n s.updateClasses();\n }\n if (updateTranslate) {\n var translated;\n if (s.controller && s.controller.spline) {\n s.controller.spline = undefined;\n }\n if (s.params.freeMode) {\n forceSetTranslate();\n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n }\n else {\n if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {\n translated = s.slideTo(s.slides.length - 1, 0, false, true);\n }\n else {\n translated = s.slideTo(s.activeIndex, 0, false, true);\n }\n if (!translated) {\n forceSetTranslate();\n }\n }\n }\n else if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n };\n \n /*=========================\n Resize Handler\n ===========================*/\n s.onResize = function (forceUpdatePagination) {\n if (s.params.onBeforeResize) s.params.onBeforeResize(s);\n //Breakpoints\n if (s.params.breakpoints) {\n s.setBreakpoint();\n }\n \n // Disable locks on resize\n var allowSwipeToPrev = s.params.allowSwipeToPrev;\n var allowSwipeToNext = s.params.allowSwipeToNext;\n s.params.allowSwipeToPrev = s.params.allowSwipeToNext = true;\n \n s.updateContainerSize();\n s.updateSlidesSize();\n if (s.params.slidesPerView === 'auto' || s.params.freeMode || forceUpdatePagination) s.updatePagination();\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.set();\n }\n if (s.controller && s.controller.spline) {\n s.controller.spline = undefined;\n }\n var slideChangedBySlideTo = false;\n if (s.params.freeMode) {\n var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());\n s.setWrapperTranslate(newTranslate);\n s.updateActiveIndex();\n s.updateClasses();\n \n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n }\n else {\n s.updateClasses();\n if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {\n slideChangedBySlideTo = s.slideTo(s.slides.length - 1, 0, false, true);\n }\n else {\n slideChangedBySlideTo = s.slideTo(s.activeIndex, 0, false, true);\n }\n }\n if (s.params.lazyLoading && !slideChangedBySlideTo && s.lazy) {\n s.lazy.load();\n }\n // Return locks after resize\n s.params.allowSwipeToPrev = allowSwipeToPrev;\n s.params.allowSwipeToNext = allowSwipeToNext;\n if (s.params.onAfterResize) s.params.onAfterResize(s);\n };\n \n /*=========================\n Events\n ===========================*/\n \n //Define Touch Events\n s.touchEventsDesktop = {start: 'mousedown', move: 'mousemove', end: 'mouseup'};\n if (window.navigator.pointerEnabled) s.touchEventsDesktop = {start: 'pointerdown', move: 'pointermove', end: 'pointerup'};\n else if (window.navigator.msPointerEnabled) s.touchEventsDesktop = {start: 'MSPointerDown', move: 'MSPointerMove', end: 'MSPointerUp'};\n s.touchEvents = {\n start : s.support.touch || !s.params.simulateTouch ? 'touchstart' : s.touchEventsDesktop.start,\n move : s.support.touch || !s.params.simulateTouch ? 'touchmove' : s.touchEventsDesktop.move,\n end : s.support.touch || !s.params.simulateTouch ? 'touchend' : s.touchEventsDesktop.end\n };\n \n \n // WP8 Touch Events Fix\n if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) {\n (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction);\n }\n \n // Attach/detach events\n s.initEvents = function (detach) {\n var actionDom = detach ? 'off' : 'on';\n var action = detach ? 'removeEventListener' : 'addEventListener';\n var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0];\n var target = s.support.touch ? touchEventsTarget : document;\n \n var moveCapture = s.params.nested ? true : false;\n \n //Touch Events\n if (s.browser.ie) {\n touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false);\n target[action](s.touchEvents.move, s.onTouchMove, moveCapture);\n target[action](s.touchEvents.end, s.onTouchEnd, false);\n }\n else {\n if (s.support.touch) {\n var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false;\n touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, passiveListener);\n touchEventsTarget[action](s.touchEvents.move, s.onTouchMove, moveCapture);\n touchEventsTarget[action](s.touchEvents.end, s.onTouchEnd, passiveListener);\n }\n if ((params.simulateTouch && !s.device.ios && !s.device.android) || (params.simulateTouch && !s.support.touch && s.device.ios)) {\n touchEventsTarget[action]('mousedown', s.onTouchStart, false);\n document[action]('mousemove', s.onTouchMove, moveCapture);\n document[action]('mouseup', s.onTouchEnd, false);\n }\n }\n window[action]('resize', s.onResize);\n \n // Next, Prev, Index\n if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {\n s.nextButton[actionDom]('click', s.onClickNext);\n if (s.params.a11y && s.a11y) s.nextButton[actionDom]('keydown', s.a11y.onEnterKey);\n }\n if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {\n s.prevButton[actionDom]('click', s.onClickPrev);\n if (s.params.a11y && s.a11y) s.prevButton[actionDom]('keydown', s.a11y.onEnterKey);\n }\n if (s.params.pagination && s.params.paginationClickable) {\n s.paginationContainer[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex);\n if (s.params.a11y && s.a11y) s.paginationContainer[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey);\n }\n \n // Prevent Links Clicks\n if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true);\n };\n s.attachEvents = function () {\n s.initEvents();\n };\n s.detachEvents = function () {\n s.initEvents(true);\n };\n \n /*=========================\n Handle Clicks\n ===========================*/\n // Prevent Clicks\n s.allowClick = true;\n s.preventClicks = function (e) {\n if (!s.allowClick) {\n if (s.params.preventClicks) e.preventDefault();\n if (s.params.preventClicksPropagation && s.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n };\n // Clicks\n s.onClickNext = function (e) {\n e.preventDefault();\n if (s.isEnd && !s.params.loop) return;\n s.slideNext();\n };\n s.onClickPrev = function (e) {\n e.preventDefault();\n if (s.isBeginning && !s.params.loop) return;\n s.slidePrev();\n };\n s.onClickIndex = function (e) {\n e.preventDefault();\n var index = $(this).index() * s.params.slidesPerGroup;\n if (s.params.loop) index = index + s.loopedSlides;\n s.slideTo(index);\n };\n \n /*=========================\n Handle Touches\n ===========================*/\n function findElementInEvent(e, selector) {\n var el = $(e.target);\n if (!el.is(selector)) {\n if (typeof selector === 'string') {\n el = el.parents(selector);\n }\n else if (selector.nodeType) {\n var found;\n el.parents().each(function (index, _el) {\n if (_el === selector) found = selector;\n });\n if (!found) return undefined;\n else return selector;\n }\n }\n if (el.length === 0) {\n return undefined;\n }\n return el[0];\n }\n s.updateClickedSlide = function (e) {\n var slide = findElementInEvent(e, '.' + s.params.slideClass);\n var slideFound = false;\n if (slide) {\n for (var i = 0; i < s.slides.length; i++) {\n if (s.slides[i] === slide) slideFound = true;\n }\n }\n \n if (slide && slideFound) {\n s.clickedSlide = slide;\n s.clickedIndex = $(slide).index();\n }\n else {\n s.clickedSlide = undefined;\n s.clickedIndex = undefined;\n return;\n }\n if (s.params.slideToClickedSlide && s.clickedIndex !== undefined && s.clickedIndex !== s.activeIndex) {\n var slideToIndex = s.clickedIndex,\n realIndex,\n duplicatedSlides,\n slidesPerView = s.params.slidesPerView === 'auto' ? s.currentSlidesPerView() : s.params.slidesPerView;\n if (s.params.loop) {\n if (s.animating) return;\n realIndex = parseInt($(s.clickedSlide).attr('data-swiper-slide-index'), 10);\n if (s.params.centeredSlides) {\n if ((slideToIndex < s.loopedSlides - slidesPerView/2) || (slideToIndex > s.slides.length - s.loopedSlides + slidesPerView/2)) {\n s.fixLoop();\n slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index=\"' + realIndex + '\"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index();\n setTimeout(function () {\n s.slideTo(slideToIndex);\n }, 0);\n }\n else {\n s.slideTo(slideToIndex);\n }\n }\n else {\n if (slideToIndex > s.slides.length - slidesPerView) {\n s.fixLoop();\n slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index=\"' + realIndex + '\"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index();\n setTimeout(function () {\n s.slideTo(slideToIndex);\n }, 0);\n }\n else {\n s.slideTo(slideToIndex);\n }\n }\n }\n else {\n s.slideTo(slideToIndex);\n }\n }\n };\n \n var isTouched,\n isMoved,\n allowTouchCallbacks,\n touchStartTime,\n isScrolling,\n currentTranslate,\n startTranslate,\n allowThresholdMove,\n // Form elements to match\n formElements = 'input, select, textarea, button, video',\n // Last click time\n lastClickTime = Date.now(), clickTimeout,\n //Velocities\n velocities = [],\n allowMomentumBounce;\n \n // Animating Flag\n s.animating = false;\n \n // Touches information\n s.touches = {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n };\n \n // Touch handlers\n var isTouchEvent, startMoving;\n s.onTouchStart = function (e) {\n if (e.originalEvent) e = e.originalEvent;\n isTouchEvent = e.type === 'touchstart';\n if (!isTouchEvent && 'which' in e && e.which === 3) return;\n if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) {\n s.allowClick = true;\n return;\n }\n if (s.params.swipeHandler) {\n if (!findElementInEvent(e, s.params.swipeHandler)) return;\n }\n \n var startX = s.touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n var startY = s.touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n \n // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore\n if(s.device.ios && s.params.iOSEdgeSwipeDetection && startX <= s.params.iOSEdgeSwipeThreshold) {\n return;\n }\n \n isTouched = true;\n isMoved = false;\n allowTouchCallbacks = true;\n isScrolling = undefined;\n startMoving = undefined;\n s.touches.startX = startX;\n s.touches.startY = startY;\n touchStartTime = Date.now();\n s.allowClick = true;\n s.updateContainerSize();\n s.swipeDirection = undefined;\n if (s.params.threshold > 0) allowThresholdMove = false;\n if (e.type !== 'touchstart') {\n var preventDefault = true;\n if ($(e.target).is(formElements)) preventDefault = false;\n if (document.activeElement && $(document.activeElement).is(formElements)) {\n document.activeElement.blur();\n }\n if (preventDefault) {\n e.preventDefault();\n }\n }\n s.emit('onTouchStart', s, e);\n };\n \n s.onTouchMove = function (e) {\n if (e.originalEvent) e = e.originalEvent;\n if (isTouchEvent && e.type === 'mousemove') return;\n if (e.preventedByNestedSwiper) {\n s.touches.startX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n s.touches.startY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n return;\n }\n if (s.params.onlyExternal) {\n // isMoved = true;\n s.allowClick = false;\n if (isTouched) {\n s.touches.startX = s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n s.touches.startY = s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = Date.now();\n }\n return;\n }\n if (isTouchEvent && s.params.touchReleaseOnEdges && !s.params.loop) {\n if (!s.isHorizontal()) {\n // Vertical\n if (\n (s.touches.currentY < s.touches.startY && s.translate <= s.maxTranslate()) ||\n (s.touches.currentY > s.touches.startY && s.translate >= s.minTranslate())\n ) {\n return;\n }\n }\n else {\n if (\n (s.touches.currentX < s.touches.startX && s.translate <= s.maxTranslate()) ||\n (s.touches.currentX > s.touches.startX && s.translate >= s.minTranslate())\n ) {\n return;\n }\n }\n }\n if (isTouchEvent && document.activeElement) {\n if (e.target === document.activeElement && $(e.target).is(formElements)) {\n isMoved = true;\n s.allowClick = false;\n return;\n }\n }\n if (allowTouchCallbacks) {\n s.emit('onTouchMove', s, e);\n }\n if (e.targetTouches && e.targetTouches.length > 1) return;\n \n s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n \n if (typeof isScrolling === 'undefined') {\n var touchAngle;\n if (s.isHorizontal() && s.touches.currentY === s.touches.startY || !s.isHorizontal() && s.touches.currentX === s.touches.startX) {\n isScrolling = false;\n }\n else {\n touchAngle = Math.atan2(Math.abs(s.touches.currentY - s.touches.startY), Math.abs(s.touches.currentX - s.touches.startX)) * 180 / Math.PI;\n isScrolling = s.isHorizontal() ? touchAngle > s.params.touchAngle : (90 - touchAngle > s.params.touchAngle);\n }\n }\n if (isScrolling) {\n s.emit('onTouchMoveOpposite', s, e);\n }\n if (typeof startMoving === 'undefined') {\n if (s.touches.currentX !== s.touches.startX || s.touches.currentY !== s.touches.startY) {\n startMoving = true;\n }\n }\n if (!isTouched) return;\n if (isScrolling) {\n isTouched = false;\n return;\n }\n if (!startMoving) {\n return;\n }\n s.allowClick = false;\n s.emit('onSliderMove', s, e);\n e.preventDefault();\n if (s.params.touchMoveStopPropagation && !s.params.nested) {\n e.stopPropagation();\n }\n \n if (!isMoved) {\n if (params.loop) {\n s.fixLoop();\n }\n startTranslate = s.getWrapperTranslate();\n s.setWrapperTransition(0);\n if (s.animating) {\n s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd');\n }\n if (s.params.autoplay && s.autoplaying) {\n if (s.params.autoplayDisableOnInteraction) {\n s.stopAutoplay();\n }\n else {\n s.pauseAutoplay();\n }\n }\n allowMomentumBounce = false;\n //Grab Cursor\n if (s.params.grabCursor && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) {\n s.setGrabCursor(true);\n }\n }\n isMoved = true;\n \n var diff = s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;\n \n diff = diff * s.params.touchRatio;\n if (s.rtl) diff = -diff;\n \n s.swipeDirection = diff > 0 ? 'prev' : 'next';\n currentTranslate = diff + startTranslate;\n \n var disableParentSwiper = true;\n if ((diff > 0 && currentTranslate > s.minTranslate())) {\n disableParentSwiper = false;\n if (s.params.resistance) currentTranslate = s.minTranslate() - 1 + Math.pow(-s.minTranslate() + startTranslate + diff, s.params.resistanceRatio);\n }\n else if (diff < 0 && currentTranslate < s.maxTranslate()) {\n disableParentSwiper = false;\n if (s.params.resistance) currentTranslate = s.maxTranslate() + 1 - Math.pow(s.maxTranslate() - startTranslate - diff, s.params.resistanceRatio);\n }\n \n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n }\n \n // Directions locks\n if (!s.params.allowSwipeToNext && s.swipeDirection === 'next' && currentTranslate < startTranslate) {\n currentTranslate = startTranslate;\n }\n if (!s.params.allowSwipeToPrev && s.swipeDirection === 'prev' && currentTranslate > startTranslate) {\n currentTranslate = startTranslate;\n }\n \n \n // Threshold\n if (s.params.threshold > 0) {\n if (Math.abs(diff) > s.params.threshold || allowThresholdMove) {\n if (!allowThresholdMove) {\n allowThresholdMove = true;\n s.touches.startX = s.touches.currentX;\n s.touches.startY = s.touches.currentY;\n currentTranslate = startTranslate;\n s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;\n return;\n }\n }\n else {\n currentTranslate = startTranslate;\n return;\n }\n }\n \n if (!s.params.followFinger) return;\n \n // Update active index in free mode\n if (s.params.freeMode || s.params.watchSlidesProgress) {\n s.updateActiveIndex();\n }\n if (s.params.freeMode) {\n //Velocity\n if (velocities.length === 0) {\n velocities.push({\n position: s.touches[s.isHorizontal() ? 'startX' : 'startY'],\n time: touchStartTime\n });\n }\n velocities.push({\n position: s.touches[s.isHorizontal() ? 'currentX' : 'currentY'],\n time: (new window.Date()).getTime()\n });\n }\n // Update progress\n s.updateProgress(currentTranslate);\n // Update translate\n s.setWrapperTranslate(currentTranslate);\n };\n s.onTouchEnd = function (e) {\n if (e.originalEvent) e = e.originalEvent;\n if (allowTouchCallbacks) {\n s.emit('onTouchEnd', s, e);\n }\n allowTouchCallbacks = false;\n if (!isTouched) return;\n //Return Grab Cursor\n if (s.params.grabCursor && isMoved && isTouched && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) {\n s.setGrabCursor(false);\n }\n \n // Time diff\n var touchEndTime = Date.now();\n var timeDiff = touchEndTime - touchStartTime;\n \n // Tap, doubleTap, Click\n if (s.allowClick) {\n s.updateClickedSlide(e);\n s.emit('onTap', s, e);\n if (timeDiff < 300 && (touchEndTime - lastClickTime) > 300) {\n if (clickTimeout) clearTimeout(clickTimeout);\n clickTimeout = setTimeout(function () {\n if (!s) return;\n if (s.params.paginationHide && s.paginationContainer.length > 0 && !$(e.target).hasClass(s.params.bulletClass)) {\n s.paginationContainer.toggleClass(s.params.paginationHiddenClass);\n }\n s.emit('onClick', s, e);\n }, 300);\n \n }\n if (timeDiff < 300 && (touchEndTime - lastClickTime) < 300) {\n if (clickTimeout) clearTimeout(clickTimeout);\n s.emit('onDoubleTap', s, e);\n }\n }\n \n lastClickTime = Date.now();\n setTimeout(function () {\n if (s) s.allowClick = true;\n }, 0);\n \n if (!isTouched || !isMoved || !s.swipeDirection || s.touches.diff === 0 || currentTranslate === startTranslate) {\n isTouched = isMoved = false;\n return;\n }\n isTouched = isMoved = false;\n \n var currentPos;\n if (s.params.followFinger) {\n currentPos = s.rtl ? s.translate : -s.translate;\n }\n else {\n currentPos = -currentTranslate;\n }\n if (s.params.freeMode) {\n if (currentPos < -s.minTranslate()) {\n s.slideTo(s.activeIndex);\n return;\n }\n else if (currentPos > -s.maxTranslate()) {\n if (s.slides.length < s.snapGrid.length) {\n s.slideTo(s.snapGrid.length - 1);\n }\n else {\n s.slideTo(s.slides.length - 1);\n }\n return;\n }\n \n if (s.params.freeModeMomentum) {\n if (velocities.length > 1) {\n var lastMoveEvent = velocities.pop(), velocityEvent = velocities.pop();\n \n var distance = lastMoveEvent.position - velocityEvent.position;\n var time = lastMoveEvent.time - velocityEvent.time;\n s.velocity = distance / time;\n s.velocity = s.velocity / 2;\n if (Math.abs(s.velocity) < s.params.freeModeMinimumVelocity) {\n s.velocity = 0;\n }\n // this implies that the user stopped moving a finger then released.\n // There would be no events with distance zero, so the last event is stale.\n if (time > 150 || (new window.Date().getTime() - lastMoveEvent.time) > 300) {\n s.velocity = 0;\n }\n } else {\n s.velocity = 0;\n }\n s.velocity = s.velocity * s.params.freeModeMomentumVelocityRatio;\n \n velocities.length = 0;\n var momentumDuration = 1000 * s.params.freeModeMomentumRatio;\n var momentumDistance = s.velocity * momentumDuration;\n \n var newPosition = s.translate + momentumDistance;\n if (s.rtl) newPosition = - newPosition;\n var doBounce = false;\n var afterBouncePosition;\n var bounceAmount = Math.abs(s.velocity) * 20 * s.params.freeModeMomentumBounceRatio;\n if (newPosition < s.maxTranslate()) {\n if (s.params.freeModeMomentumBounce) {\n if (newPosition + s.maxTranslate() < -bounceAmount) {\n newPosition = s.maxTranslate() - bounceAmount;\n }\n afterBouncePosition = s.maxTranslate();\n doBounce = true;\n allowMomentumBounce = true;\n }\n else {\n newPosition = s.maxTranslate();\n }\n }\n else if (newPosition > s.minTranslate()) {\n if (s.params.freeModeMomentumBounce) {\n if (newPosition - s.minTranslate() > bounceAmount) {\n newPosition = s.minTranslate() + bounceAmount;\n }\n afterBouncePosition = s.minTranslate();\n doBounce = true;\n allowMomentumBounce = true;\n }\n else {\n newPosition = s.minTranslate();\n }\n }\n else if (s.params.freeModeSticky) {\n var j = 0,\n nextSlide;\n for (j = 0; j < s.snapGrid.length; j += 1) {\n if (s.snapGrid[j] > -newPosition) {\n nextSlide = j;\n break;\n }\n \n }\n if (Math.abs(s.snapGrid[nextSlide] - newPosition) < Math.abs(s.snapGrid[nextSlide - 1] - newPosition) || s.swipeDirection === 'next') {\n newPosition = s.snapGrid[nextSlide];\n } else {\n newPosition = s.snapGrid[nextSlide - 1];\n }\n if (!s.rtl) newPosition = - newPosition;\n }\n //Fix duration\n if (s.velocity !== 0) {\n if (s.rtl) {\n momentumDuration = Math.abs((-newPosition - s.translate) / s.velocity);\n }\n else {\n momentumDuration = Math.abs((newPosition - s.translate) / s.velocity);\n }\n }\n else if (s.params.freeModeSticky) {\n s.slideReset();\n return;\n }\n \n if (s.params.freeModeMomentumBounce && doBounce) {\n s.updateProgress(afterBouncePosition);\n s.setWrapperTransition(momentumDuration);\n s.setWrapperTranslate(newPosition);\n s.onTransitionStart();\n s.animating = true;\n s.wrapper.transitionEnd(function () {\n if (!s || !allowMomentumBounce) return;\n s.emit('onMomentumBounce', s);\n \n s.setWrapperTransition(s.params.speed);\n s.setWrapperTranslate(afterBouncePosition);\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.onTransitionEnd();\n });\n });\n } else if (s.velocity) {\n s.updateProgress(newPosition);\n s.setWrapperTransition(momentumDuration);\n s.setWrapperTranslate(newPosition);\n s.onTransitionStart();\n if (!s.animating) {\n s.animating = true;\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.onTransitionEnd();\n });\n }\n \n } else {\n s.updateProgress(newPosition);\n }\n \n s.updateActiveIndex();\n }\n if (!s.params.freeModeMomentum || timeDiff >= s.params.longSwipesMs) {\n s.updateProgress();\n s.updateActiveIndex();\n }\n return;\n }\n \n // Find current slide\n var i, stopIndex = 0, groupSize = s.slidesSizesGrid[0];\n for (i = 0; i < s.slidesGrid.length; i += s.params.slidesPerGroup) {\n if (typeof s.slidesGrid[i + s.params.slidesPerGroup] !== 'undefined') {\n if (currentPos >= s.slidesGrid[i] && currentPos < s.slidesGrid[i + s.params.slidesPerGroup]) {\n stopIndex = i;\n groupSize = s.slidesGrid[i + s.params.slidesPerGroup] - s.slidesGrid[i];\n }\n }\n else {\n if (currentPos >= s.slidesGrid[i]) {\n stopIndex = i;\n groupSize = s.slidesGrid[s.slidesGrid.length - 1] - s.slidesGrid[s.slidesGrid.length - 2];\n }\n }\n }\n \n // Find current slide size\n var ratio = (currentPos - s.slidesGrid[stopIndex]) / groupSize;\n \n if (timeDiff > s.params.longSwipesMs) {\n // Long touches\n if (!s.params.longSwipes) {\n s.slideTo(s.activeIndex);\n return;\n }\n if (s.swipeDirection === 'next') {\n if (ratio >= s.params.longSwipesRatio) s.slideTo(stopIndex + s.params.slidesPerGroup);\n else s.slideTo(stopIndex);\n \n }\n if (s.swipeDirection === 'prev') {\n if (ratio > (1 - s.params.longSwipesRatio)) s.slideTo(stopIndex + s.params.slidesPerGroup);\n else s.slideTo(stopIndex);\n }\n }\n else {\n // Short swipes\n if (!s.params.shortSwipes) {\n s.slideTo(s.activeIndex);\n return;\n }\n if (s.swipeDirection === 'next') {\n s.slideTo(stopIndex + s.params.slidesPerGroup);\n \n }\n if (s.swipeDirection === 'prev') {\n s.slideTo(stopIndex);\n }\n }\n };\n /*=========================\n Transitions\n ===========================*/\n s._slideTo = function (slideIndex, speed) {\n return s.slideTo(slideIndex, speed, true, true);\n };\n s.slideTo = function (slideIndex, speed, runCallbacks, internal) {\n if (typeof runCallbacks === 'undefined') runCallbacks = true;\n if (typeof slideIndex === 'undefined') slideIndex = 0;\n if (slideIndex < 0) slideIndex = 0;\n s.snapIndex = Math.floor(slideIndex / s.params.slidesPerGroup);\n if (s.snapIndex >= s.snapGrid.length) s.snapIndex = s.snapGrid.length - 1;\n \n var translate = - s.snapGrid[s.snapIndex];\n // Stop autoplay\n if (s.params.autoplay && s.autoplaying) {\n if (internal || !s.params.autoplayDisableOnInteraction) {\n s.pauseAutoplay(speed);\n }\n else {\n s.stopAutoplay();\n }\n }\n // Update progress\n s.updateProgress(translate);\n \n // Normalize slideIndex\n if(s.params.normalizeSlideIndex){\n for (var i = 0; i < s.slidesGrid.length; i++) {\n if (- Math.floor(translate * 100) >= Math.floor(s.slidesGrid[i] * 100)) {\n slideIndex = i;\n }\n }\n }\n \n // Directions locks\n if (!s.params.allowSwipeToNext && translate < s.translate && translate < s.minTranslate()) {\n return false;\n }\n if (!s.params.allowSwipeToPrev && translate > s.translate && translate > s.maxTranslate()) {\n if ((s.activeIndex || 0) !== slideIndex ) return false;\n }\n \n // Update Index\n if (typeof speed === 'undefined') speed = s.params.speed;\n s.previousIndex = s.activeIndex || 0;\n s.activeIndex = slideIndex;\n s.updateRealIndex();\n if ((s.rtl && -translate === s.translate) || (!s.rtl && translate === s.translate)) {\n // Update Height\n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n s.updateClasses();\n if (s.params.effect !== 'slide') {\n s.setWrapperTranslate(translate);\n }\n return false;\n }\n s.updateClasses();\n s.onTransitionStart(runCallbacks);\n \n if (speed === 0 || s.browser.lteIE9) {\n s.setWrapperTranslate(translate);\n s.setWrapperTransition(0);\n s.onTransitionEnd(runCallbacks);\n }\n else {\n s.setWrapperTranslate(translate);\n s.setWrapperTransition(speed);\n if (!s.animating) {\n s.animating = true;\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.onTransitionEnd(runCallbacks);\n });\n }\n \n }\n \n return true;\n };\n \n s.onTransitionStart = function (runCallbacks) {\n if (typeof runCallbacks === 'undefined') runCallbacks = true;\n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n if (s.lazy) s.lazy.onTransitionStart();\n if (runCallbacks) {\n s.emit('onTransitionStart', s);\n if (s.activeIndex !== s.previousIndex) {\n s.emit('onSlideChangeStart', s);\n if (s.activeIndex > s.previousIndex) {\n s.emit('onSlideNextStart', s);\n }\n else {\n s.emit('onSlidePrevStart', s);\n }\n }\n \n }\n };\n s.onTransitionEnd = function (runCallbacks) {\n s.animating = false;\n s.setWrapperTransition(0);\n if (typeof runCallbacks === 'undefined') runCallbacks = true;\n if (s.lazy) s.lazy.onTransitionEnd();\n if (runCallbacks) {\n s.emit('onTransitionEnd', s);\n if (s.activeIndex !== s.previousIndex) {\n s.emit('onSlideChangeEnd', s);\n if (s.activeIndex > s.previousIndex) {\n s.emit('onSlideNextEnd', s);\n }\n else {\n s.emit('onSlidePrevEnd', s);\n }\n }\n }\n if (s.params.history && s.history) {\n s.history.setHistory(s.params.history, s.activeIndex);\n }\n if (s.params.hashnav && s.hashnav) {\n s.hashnav.setHash();\n }\n \n };\n s.slideNext = function (runCallbacks, speed, internal) {\n if (s.params.loop) {\n if (s.animating) return false;\n s.fixLoop();\n var clientLeft = s.container[0].clientLeft;\n return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);\n }\n else return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);\n };\n s._slideNext = function (speed) {\n return s.slideNext(true, speed, true);\n };\n s.slidePrev = function (runCallbacks, speed, internal) {\n if (s.params.loop) {\n if (s.animating) return false;\n s.fixLoop();\n var clientLeft = s.container[0].clientLeft;\n return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);\n }\n else return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);\n };\n s._slidePrev = function (speed) {\n return s.slidePrev(true, speed, true);\n };\n s.slideReset = function (runCallbacks, speed, internal) {\n return s.slideTo(s.activeIndex, speed, runCallbacks);\n };\n \n s.disableTouchControl = function () {\n s.params.onlyExternal = true;\n return true;\n };\n s.enableTouchControl = function () {\n s.params.onlyExternal = false;\n return true;\n };\n \n /*=========================\n Translate/transition helpers\n ===========================*/\n s.setWrapperTransition = function (duration, byController) {\n s.wrapper.transition(duration);\n if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n s.effects[s.params.effect].setTransition(duration);\n }\n if (s.params.parallax && s.parallax) {\n s.parallax.setTransition(duration);\n }\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.setTransition(duration);\n }\n if (s.params.control && s.controller) {\n s.controller.setTransition(duration, byController);\n }\n s.emit('onSetTransition', s, duration);\n };\n s.setWrapperTranslate = function (translate, updateActiveIndex, byController) {\n var x = 0, y = 0, z = 0;\n if (s.isHorizontal()) {\n x = s.rtl ? -translate : translate;\n }\n else {\n y = translate;\n }\n \n if (s.params.roundLengths) {\n x = round(x);\n y = round(y);\n }\n \n if (!s.params.virtualTranslate) {\n if (s.support.transforms3d) s.wrapper.transform('translate3d(' + x + 'px, ' + y + 'px, ' + z + 'px)');\n else s.wrapper.transform('translate(' + x + 'px, ' + y + 'px)');\n }\n \n s.translate = s.isHorizontal() ? x : y;\n \n // Check if we need to update progress\n var progress;\n var translatesDiff = s.maxTranslate() - s.minTranslate();\n if (translatesDiff === 0) {\n progress = 0;\n }\n else {\n progress = (translate - s.minTranslate()) / (translatesDiff);\n }\n if (progress !== s.progress) {\n s.updateProgress(translate);\n }\n \n if (updateActiveIndex) s.updateActiveIndex();\n if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n s.effects[s.params.effect].setTranslate(s.translate);\n }\n if (s.params.parallax && s.parallax) {\n s.parallax.setTranslate(s.translate);\n }\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.setTranslate(s.translate);\n }\n if (s.params.control && s.controller) {\n s.controller.setTranslate(s.translate, byController);\n }\n s.emit('onSetTranslate', s, s.translate);\n };\n \n s.getTranslate = function (el, axis) {\n var matrix, curTransform, curStyle, transformMatrix;\n \n // automatic axis detection\n if (typeof axis === 'undefined') {\n axis = 'x';\n }\n \n if (s.params.virtualTranslate) {\n return s.rtl ? -s.translate : s.translate;\n }\n \n curStyle = window.getComputedStyle(el, null);\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(function(a){\n return a.replace(',','.');\n }).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n }\n else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n \n if (axis === 'x') {\n //Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix)\n curTransform = transformMatrix.m41;\n //Crazy IE10 Matrix\n else if (matrix.length === 16)\n curTransform = parseFloat(matrix[12]);\n //Normal Browsers\n else\n curTransform = parseFloat(matrix[4]);\n }\n if (axis === 'y') {\n //Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix)\n curTransform = transformMatrix.m42;\n //Crazy IE10 Matrix\n else if (matrix.length === 16)\n curTransform = parseFloat(matrix[13]);\n //Normal Browsers\n else\n curTransform = parseFloat(matrix[5]);\n }\n if (s.rtl && curTransform) curTransform = -curTransform;\n return curTransform || 0;\n };\n s.getWrapperTranslate = function (axis) {\n if (typeof axis === 'undefined') {\n axis = s.isHorizontal() ? 'x' : 'y';\n }\n return s.getTranslate(s.wrapper[0], axis);\n };\n \n /*=========================\n Observer\n ===========================*/\n s.observers = [];\n function initObserver(target, options) {\n options = options || {};\n // create an observer instance\n var ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n var observer = new ObserverFunc(function (mutations) {\n mutations.forEach(function (mutation) {\n s.onResize(true);\n s.emit('onObserverUpdate', s, mutation);\n });\n });\n \n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n \n s.observers.push(observer);\n }\n s.initObservers = function () {\n if (s.params.observeParents) {\n var containerParents = s.container.parents();\n for (var i = 0; i < containerParents.length; i++) {\n initObserver(containerParents[i]);\n }\n }\n \n // Observe container\n initObserver(s.container[0], {childList: false});\n \n // Observe wrapper\n initObserver(s.wrapper[0], {attributes: false});\n };\n s.disconnectObservers = function () {\n for (var i = 0; i < s.observers.length; i++) {\n s.observers[i].disconnect();\n }\n s.observers = [];\n };\n /*=========================\n Loop\n ===========================*/\n // Create looped slides\n s.createLoop = function () {\n // Remove duplicated slides\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();\n \n var slides = s.wrapper.children('.' + s.params.slideClass);\n \n if(s.params.slidesPerView === 'auto' && !s.params.loopedSlides) s.params.loopedSlides = slides.length;\n \n s.loopedSlides = parseInt(s.params.loopedSlides || s.params.slidesPerView, 10);\n s.loopedSlides = s.loopedSlides + s.params.loopAdditionalSlides;\n if (s.loopedSlides > slides.length) {\n s.loopedSlides = slides.length;\n }\n \n var prependSlides = [], appendSlides = [], i;\n slides.each(function (index, el) {\n var slide = $(this);\n if (index < s.loopedSlides) appendSlides.push(el);\n if (index < slides.length && index >= slides.length - s.loopedSlides) prependSlides.push(el);\n slide.attr('data-swiper-slide-index', index);\n });\n for (i = 0; i < appendSlides.length; i++) {\n s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));\n }\n for (i = prependSlides.length - 1; i >= 0; i--) {\n s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));\n }\n };\n s.destroyLoop = function () {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();\n s.slides.removeAttr('data-swiper-slide-index');\n };\n s.reLoop = function (updatePosition) {\n var oldIndex = s.activeIndex - s.loopedSlides;\n s.destroyLoop();\n s.createLoop();\n s.updateSlidesSize();\n if (updatePosition) {\n s.slideTo(oldIndex + s.loopedSlides, 0, false);\n }\n \n };\n s.fixLoop = function () {\n var newIndex;\n //Fix For Negative Oversliding\n if (s.activeIndex < s.loopedSlides) {\n newIndex = s.slides.length - s.loopedSlides * 3 + s.activeIndex;\n newIndex = newIndex + s.loopedSlides;\n s.slideTo(newIndex, 0, false, true);\n }\n //Fix For Positive Oversliding\n else if ((s.params.slidesPerView === 'auto' && s.activeIndex >= s.loopedSlides * 2) || (s.activeIndex > s.slides.length - s.params.slidesPerView * 2)) {\n newIndex = -s.slides.length + s.activeIndex + s.loopedSlides;\n newIndex = newIndex + s.loopedSlides;\n s.slideTo(newIndex, 0, false, true);\n }\n };\n /*=========================\n Append/Prepend/Remove Slides\n ===========================*/\n s.appendSlide = function (slides) {\n if (s.params.loop) {\n s.destroyLoop();\n }\n if (typeof slides === 'object' && slides.length) {\n for (var i = 0; i < slides.length; i++) {\n if (slides[i]) s.wrapper.append(slides[i]);\n }\n }\n else {\n s.wrapper.append(slides);\n }\n if (s.params.loop) {\n s.createLoop();\n }\n if (!(s.params.observer && s.support.observer)) {\n s.update(true);\n }\n };\n s.prependSlide = function (slides) {\n if (s.params.loop) {\n s.destroyLoop();\n }\n var newActiveIndex = s.activeIndex + 1;\n if (typeof slides === 'object' && slides.length) {\n for (var i = 0; i < slides.length; i++) {\n if (slides[i]) s.wrapper.prepend(slides[i]);\n }\n newActiveIndex = s.activeIndex + slides.length;\n }\n else {\n s.wrapper.prepend(slides);\n }\n if (s.params.loop) {\n s.createLoop();\n }\n if (!(s.params.observer && s.support.observer)) {\n s.update(true);\n }\n s.slideTo(newActiveIndex, 0, false);\n };\n s.removeSlide = function (slidesIndexes) {\n if (s.params.loop) {\n s.destroyLoop();\n s.slides = s.wrapper.children('.' + s.params.slideClass);\n }\n var newActiveIndex = s.activeIndex,\n indexToRemove;\n if (typeof slidesIndexes === 'object' && slidesIndexes.length) {\n for (var i = 0; i < slidesIndexes.length; i++) {\n indexToRemove = slidesIndexes[i];\n if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex--;\n }\n newActiveIndex = Math.max(newActiveIndex, 0);\n }\n else {\n indexToRemove = slidesIndexes;\n if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex--;\n newActiveIndex = Math.max(newActiveIndex, 0);\n }\n \n if (s.params.loop) {\n s.createLoop();\n }\n \n if (!(s.params.observer && s.support.observer)) {\n s.update(true);\n }\n if (s.params.loop) {\n s.slideTo(newActiveIndex + s.loopedSlides, 0, false);\n }\n else {\n s.slideTo(newActiveIndex, 0, false);\n }\n \n };\n s.removeAllSlides = function () {\n var slidesIndexes = [];\n for (var i = 0; i < s.slides.length; i++) {\n slidesIndexes.push(i);\n }\n s.removeSlide(slidesIndexes);\n };\n \n \n /*=========================\n Effects\n ===========================*/\n s.effects = {\n fade: {\n setTranslate: function () {\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides.eq(i);\n var offset = slide[0].swiperSlideOffset;\n var tx = -offset;\n if (!s.params.virtualTranslate) tx = tx - s.translate;\n var ty = 0;\n if (!s.isHorizontal()) {\n ty = tx;\n tx = 0;\n }\n var slideOpacity = s.params.fade.crossFade ?\n Math.max(1 - Math.abs(slide[0].progress), 0) :\n 1 + Math.min(Math.max(slide[0].progress, -1), 0);\n slide\n .css({\n opacity: slideOpacity\n })\n .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)');\n \n }\n \n },\n setTransition: function (duration) {\n s.slides.transition(duration);\n if (s.params.virtualTranslate && duration !== 0) {\n var eventTriggered = false;\n s.slides.transitionEnd(function () {\n if (eventTriggered) return;\n if (!s) return;\n eventTriggered = true;\n s.animating = false;\n var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];\n for (var i = 0; i < triggerEvents.length; i++) {\n s.wrapper.trigger(triggerEvents[i]);\n }\n });\n }\n }\n },\n flip: {\n setTranslate: function () {\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides.eq(i);\n var progress = slide[0].progress;\n if (s.params.flip.limitRotation) {\n progress = Math.max(Math.min(slide[0].progress, 1), -1);\n }\n var offset = slide[0].swiperSlideOffset;\n var rotate = -180 * progress,\n rotateY = rotate,\n rotateX = 0,\n tx = -offset,\n ty = 0;\n if (!s.isHorizontal()) {\n ty = tx;\n tx = 0;\n rotateX = -rotateY;\n rotateY = 0;\n }\n else if (s.rtl) {\n rotateY = -rotateY;\n }\n \n slide[0].style.zIndex = -Math.abs(Math.round(progress)) + s.slides.length;\n \n if (s.params.flip.slideShadows) {\n //Set shadows\n var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = $('
                              ');\n slide.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = $('
                              ');\n slide.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n \n slide\n .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)');\n }\n },\n setTransition: function (duration) {\n s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n if (s.params.virtualTranslate && duration !== 0) {\n var eventTriggered = false;\n s.slides.eq(s.activeIndex).transitionEnd(function () {\n if (eventTriggered) return;\n if (!s) return;\n if (!$(this).hasClass(s.params.slideActiveClass)) return;\n eventTriggered = true;\n s.animating = false;\n var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];\n for (var i = 0; i < triggerEvents.length; i++) {\n s.wrapper.trigger(triggerEvents[i]);\n }\n });\n }\n }\n },\n cube: {\n setTranslate: function () {\n var wrapperRotate = 0, cubeShadow;\n if (s.params.cube.shadow) {\n if (s.isHorizontal()) {\n cubeShadow = s.wrapper.find('.swiper-cube-shadow');\n if (cubeShadow.length === 0) {\n cubeShadow = $('
                              ');\n s.wrapper.append(cubeShadow);\n }\n cubeShadow.css({height: s.width + 'px'});\n }\n else {\n cubeShadow = s.container.find('.swiper-cube-shadow');\n if (cubeShadow.length === 0) {\n cubeShadow = $('
                              ');\n s.container.append(cubeShadow);\n }\n }\n }\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides.eq(i);\n var slideAngle = i * 90;\n var round = Math.floor(slideAngle / 360);\n if (s.rtl) {\n slideAngle = -slideAngle;\n round = Math.floor(-slideAngle / 360);\n }\n var progress = Math.max(Math.min(slide[0].progress, 1), -1);\n var tx = 0, ty = 0, tz = 0;\n if (i % 4 === 0) {\n tx = - round * 4 * s.size;\n tz = 0;\n }\n else if ((i - 1) % 4 === 0) {\n tx = 0;\n tz = - round * 4 * s.size;\n }\n else if ((i - 2) % 4 === 0) {\n tx = s.size + round * 4 * s.size;\n tz = s.size;\n }\n else if ((i - 3) % 4 === 0) {\n tx = - s.size;\n tz = 3 * s.size + s.size * 4 * round;\n }\n if (s.rtl) {\n tx = -tx;\n }\n \n if (!s.isHorizontal()) {\n ty = tx;\n tx = 0;\n }\n \n var transform = 'rotateX(' + (s.isHorizontal() ? 0 : -slideAngle) + 'deg) rotateY(' + (s.isHorizontal() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)';\n if (progress <= 1 && progress > -1) {\n wrapperRotate = i * 90 + progress * 90;\n if (s.rtl) wrapperRotate = -i * 90 - progress * 90;\n }\n slide.transform(transform);\n if (s.params.cube.slideShadows) {\n //Set shadows\n var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = $('
                              ');\n slide.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = $('
                              ');\n slide.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n }\n s.wrapper.css({\n '-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n '-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n '-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n 'transform-origin': '50% 50% -' + (s.size / 2) + 'px'\n });\n \n if (s.params.cube.shadow) {\n if (s.isHorizontal()) {\n cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')');\n }\n else {\n var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;\n var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);\n var scale1 = s.params.cube.shadowScale,\n scale2 = s.params.cube.shadowScale / multiplier,\n offset = s.params.cube.shadowOffset;\n cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)');\n }\n }\n var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0;\n s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (s.isHorizontal() ? 0 : wrapperRotate) + 'deg) rotateY(' + (s.isHorizontal() ? -wrapperRotate : 0) + 'deg)');\n },\n setTransition: function (duration) {\n s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n if (s.params.cube.shadow && !s.isHorizontal()) {\n s.container.find('.swiper-cube-shadow').transition(duration);\n }\n }\n },\n coverflow: {\n setTranslate: function () {\n var transform = s.translate;\n var center = s.isHorizontal() ? -transform + s.width / 2 : -transform + s.height / 2;\n var rotate = s.isHorizontal() ? s.params.coverflow.rotate: -s.params.coverflow.rotate;\n var translate = s.params.coverflow.depth;\n //Each slide offset from center\n for (var i = 0, length = s.slides.length; i < length; i++) {\n var slide = s.slides.eq(i);\n var slideSize = s.slidesSizesGrid[i];\n var slideOffset = slide[0].swiperSlideOffset;\n var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier;\n \n var rotateY = s.isHorizontal() ? rotate * offsetMultiplier : 0;\n var rotateX = s.isHorizontal() ? 0 : rotate * offsetMultiplier;\n // var rotateZ = 0\n var translateZ = -translate * Math.abs(offsetMultiplier);\n \n var translateY = s.isHorizontal() ? 0 : s.params.coverflow.stretch * (offsetMultiplier);\n var translateX = s.isHorizontal() ? s.params.coverflow.stretch * (offsetMultiplier) : 0;\n \n //Fix for ultra small values\n if (Math.abs(translateX) < 0.001) translateX = 0;\n if (Math.abs(translateY) < 0.001) translateY = 0;\n if (Math.abs(translateZ) < 0.001) translateZ = 0;\n if (Math.abs(rotateY) < 0.001) rotateY = 0;\n if (Math.abs(rotateX) < 0.001) rotateX = 0;\n \n var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)';\n \n slide.transform(slideTransform);\n slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n if (s.params.coverflow.slideShadows) {\n //Set shadows\n var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = $('
                              ');\n slide.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = $('
                              ');\n slide.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;\n }\n }\n \n //Set correct perspective for IE10\n if (s.browser.ie) {\n var ws = s.wrapper[0].style;\n ws.perspectiveOrigin = center + 'px 50%';\n }\n },\n setTransition: function (duration) {\n s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n }\n }\n };\n \n \n /*=========================\n Images Lazy Loading\n ===========================*/\n s.lazy = {\n initialImageLoaded: false,\n loadImageInSlide: function (index, loadInDuplicate) {\n if (typeof index === 'undefined') return;\n if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true;\n if (s.slides.length === 0) return;\n \n var slide = s.slides.eq(index);\n var img = slide.find('.' + s.params.lazyLoadingClass + ':not(.' + s.params.lazyStatusLoadedClass + '):not(.' + s.params.lazyStatusLoadingClass + ')');\n if (slide.hasClass(s.params.lazyLoadingClass) && !slide.hasClass(s.params.lazyStatusLoadedClass) && !slide.hasClass(s.params.lazyStatusLoadingClass)) {\n img = img.add(slide[0]);\n }\n if (img.length === 0) return;\n \n img.each(function () {\n var _img = $(this);\n _img.addClass(s.params.lazyStatusLoadingClass);\n var background = _img.attr('data-background');\n var src = _img.attr('data-src'),\n srcset = _img.attr('data-srcset'),\n sizes = _img.attr('data-sizes');\n s.loadImage(_img[0], (src || background), srcset, sizes, false, function () {\n if (typeof s === 'undefined' || s === null || !s) return;\n if (background) {\n _img.css('background-image', 'url(\"' + background + '\")');\n _img.removeAttr('data-background');\n }\n else {\n if (srcset) {\n _img.attr('srcset', srcset);\n _img.removeAttr('data-srcset');\n }\n if (sizes) {\n _img.attr('sizes', sizes);\n _img.removeAttr('data-sizes');\n }\n if (src) {\n _img.attr('src', src);\n _img.removeAttr('data-src');\n }\n \n }\n \n _img.addClass(s.params.lazyStatusLoadedClass).removeClass(s.params.lazyStatusLoadingClass);\n slide.find('.' + s.params.lazyPreloaderClass + ', .' + s.params.preloaderClass).remove();\n if (s.params.loop && loadInDuplicate) {\n var slideOriginalIndex = slide.attr('data-swiper-slide-index');\n if (slide.hasClass(s.params.slideDuplicateClass)) {\n var originalSlide = s.wrapper.children('[data-swiper-slide-index=\"' + slideOriginalIndex + '\"]:not(.' + s.params.slideDuplicateClass + ')');\n s.lazy.loadImageInSlide(originalSlide.index(), false);\n }\n else {\n var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + slideOriginalIndex + '\"]');\n s.lazy.loadImageInSlide(duplicatedSlide.index(), false);\n }\n }\n s.emit('onLazyImageReady', s, slide[0], _img[0]);\n });\n \n s.emit('onLazyImageLoad', s, slide[0], _img[0]);\n });\n \n },\n load: function () {\n var i;\n var slidesPerView = s.params.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = 0;\n }\n if (!s.lazy.initialImageLoaded) s.lazy.initialImageLoaded = true;\n if (s.params.watchSlidesVisibility) {\n s.wrapper.children('.' + s.params.slideVisibleClass).each(function () {\n s.lazy.loadImageInSlide($(this).index());\n });\n }\n else {\n if (slidesPerView > 1) {\n for (i = s.activeIndex; i < s.activeIndex + slidesPerView ; i++) {\n if (s.slides[i]) s.lazy.loadImageInSlide(i);\n }\n }\n else {\n s.lazy.loadImageInSlide(s.activeIndex);\n }\n }\n if (s.params.lazyLoadingInPrevNext) {\n if (slidesPerView > 1 || (s.params.lazyLoadingInPrevNextAmount && s.params.lazyLoadingInPrevNextAmount > 1)) {\n var amount = s.params.lazyLoadingInPrevNextAmount;\n var spv = slidesPerView;\n var maxIndex = Math.min(s.activeIndex + spv + Math.max(amount, spv), s.slides.length);\n var minIndex = Math.max(s.activeIndex - Math.max(spv, amount), 0);\n // Next Slides\n for (i = s.activeIndex + slidesPerView; i < maxIndex; i++) {\n if (s.slides[i]) s.lazy.loadImageInSlide(i);\n }\n // Prev Slides\n for (i = minIndex; i < s.activeIndex ; i++) {\n if (s.slides[i]) s.lazy.loadImageInSlide(i);\n }\n }\n else {\n var nextSlide = s.wrapper.children('.' + s.params.slideNextClass);\n if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index());\n \n var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass);\n if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index());\n }\n }\n },\n onTransitionStart: function () {\n if (s.params.lazyLoading) {\n if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) {\n s.lazy.load();\n }\n }\n },\n onTransitionEnd: function () {\n if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) {\n s.lazy.load();\n }\n }\n };\n \n \n /*=========================\n Scrollbar\n ===========================*/\n s.scrollbar = {\n isTouched: false,\n setDragPosition: function (e) {\n var sb = s.scrollbar;\n var x = 0, y = 0;\n var translate;\n var pointerPosition = s.isHorizontal() ?\n ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) :\n ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ;\n var position = (pointerPosition) - sb.track.offset()[s.isHorizontal() ? 'left' : 'top'] - sb.dragSize / 2;\n var positionMin = -s.minTranslate() * sb.moveDivider;\n var positionMax = -s.maxTranslate() * sb.moveDivider;\n if (position < positionMin) {\n position = positionMin;\n }\n else if (position > positionMax) {\n position = positionMax;\n }\n position = -position / sb.moveDivider;\n s.updateProgress(position);\n s.setWrapperTranslate(position, true);\n },\n dragStart: function (e) {\n var sb = s.scrollbar;\n sb.isTouched = true;\n e.preventDefault();\n e.stopPropagation();\n \n sb.setDragPosition(e);\n clearTimeout(sb.dragTimeout);\n \n sb.track.transition(0);\n if (s.params.scrollbarHide) {\n sb.track.css('opacity', 1);\n }\n s.wrapper.transition(100);\n sb.drag.transition(100);\n s.emit('onScrollbarDragStart', s);\n },\n dragMove: function (e) {\n var sb = s.scrollbar;\n if (!sb.isTouched) return;\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n sb.setDragPosition(e);\n s.wrapper.transition(0);\n sb.track.transition(0);\n sb.drag.transition(0);\n s.emit('onScrollbarDragMove', s);\n },\n dragEnd: function (e) {\n var sb = s.scrollbar;\n if (!sb.isTouched) return;\n sb.isTouched = false;\n if (s.params.scrollbarHide) {\n clearTimeout(sb.dragTimeout);\n sb.dragTimeout = setTimeout(function () {\n sb.track.css('opacity', 0);\n sb.track.transition(400);\n }, 1000);\n \n }\n s.emit('onScrollbarDragEnd', s);\n if (s.params.scrollbarSnapOnRelease) {\n s.slideReset();\n }\n },\n draggableEvents: (function () {\n if ((s.params.simulateTouch === false && !s.support.touch)) return s.touchEventsDesktop;\n else return s.touchEvents;\n })(),\n enableDraggable: function () {\n var sb = s.scrollbar;\n var target = s.support.touch ? sb.track : document;\n $(sb.track).on(sb.draggableEvents.start, sb.dragStart);\n $(target).on(sb.draggableEvents.move, sb.dragMove);\n $(target).on(sb.draggableEvents.end, sb.dragEnd);\n },\n disableDraggable: function () {\n var sb = s.scrollbar;\n var target = s.support.touch ? sb.track : document;\n $(sb.track).off(sb.draggableEvents.start, sb.dragStart);\n $(target).off(sb.draggableEvents.move, sb.dragMove);\n $(target).off(sb.draggableEvents.end, sb.dragEnd);\n },\n set: function () {\n if (!s.params.scrollbar) return;\n var sb = s.scrollbar;\n sb.track = $(s.params.scrollbar);\n if (s.params.uniqueNavElements && typeof s.params.scrollbar === 'string' && sb.track.length > 1 && s.container.find(s.params.scrollbar).length === 1) {\n sb.track = s.container.find(s.params.scrollbar);\n }\n sb.drag = sb.track.find('.swiper-scrollbar-drag');\n if (sb.drag.length === 0) {\n sb.drag = $('
                              ');\n sb.track.append(sb.drag);\n }\n sb.drag[0].style.width = '';\n sb.drag[0].style.height = '';\n sb.trackSize = s.isHorizontal() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight;\n \n sb.divider = s.size / s.virtualSize;\n sb.moveDivider = sb.divider * (sb.trackSize / s.size);\n sb.dragSize = sb.trackSize * sb.divider;\n \n if (s.isHorizontal()) {\n sb.drag[0].style.width = sb.dragSize + 'px';\n }\n else {\n sb.drag[0].style.height = sb.dragSize + 'px';\n }\n \n if (sb.divider >= 1) {\n sb.track[0].style.display = 'none';\n }\n else {\n sb.track[0].style.display = '';\n }\n if (s.params.scrollbarHide) {\n sb.track[0].style.opacity = 0;\n }\n },\n setTranslate: function () {\n if (!s.params.scrollbar) return;\n var diff;\n var sb = s.scrollbar;\n var translate = s.translate || 0;\n var newPos;\n \n var newSize = sb.dragSize;\n newPos = (sb.trackSize - sb.dragSize) * s.progress;\n if (s.rtl && s.isHorizontal()) {\n newPos = -newPos;\n if (newPos > 0) {\n newSize = sb.dragSize - newPos;\n newPos = 0;\n }\n else if (-newPos + sb.dragSize > sb.trackSize) {\n newSize = sb.trackSize + newPos;\n }\n }\n else {\n if (newPos < 0) {\n newSize = sb.dragSize + newPos;\n newPos = 0;\n }\n else if (newPos + sb.dragSize > sb.trackSize) {\n newSize = sb.trackSize - newPos;\n }\n }\n if (s.isHorizontal()) {\n if (s.support.transforms3d) {\n sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)');\n }\n else {\n sb.drag.transform('translateX(' + (newPos) + 'px)');\n }\n sb.drag[0].style.width = newSize + 'px';\n }\n else {\n if (s.support.transforms3d) {\n sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)');\n }\n else {\n sb.drag.transform('translateY(' + (newPos) + 'px)');\n }\n sb.drag[0].style.height = newSize + 'px';\n }\n if (s.params.scrollbarHide) {\n clearTimeout(sb.timeout);\n sb.track[0].style.opacity = 1;\n sb.timeout = setTimeout(function () {\n sb.track[0].style.opacity = 0;\n sb.track.transition(400);\n }, 1000);\n }\n },\n setTransition: function (duration) {\n if (!s.params.scrollbar) return;\n s.scrollbar.drag.transition(duration);\n }\n };\n \n \n /*=========================\n Controller\n ===========================*/\n s.controller = {\n LinearSpline: function (x, y) {\n var binarySearch = (function() {\n var maxIndex, minIndex, guess;\n return function(array, val) {\n minIndex = -1;\n maxIndex = array.length;\n while (maxIndex - minIndex > 1)\n if (array[guess = maxIndex + minIndex >> 1] <= val) {\n minIndex = guess;\n } else {\n maxIndex = guess;\n }\n return maxIndex;\n };\n })();\n this.x = x;\n this.y = y;\n this.lastIndex = x.length - 1;\n // Given an x value (x2), return the expected y2 value:\n // (x1,y1) is the known point before given value,\n // (x3,y3) is the known point after given value.\n var i1, i3;\n var l = this.x.length;\n \n this.interpolate = function (x2) {\n if (!x2) return 0;\n \n // Get the indexes of x1 and x3 (the array indexes before and after given x2):\n i3 = binarySearch(this.x, x2);\n i1 = i3 - 1;\n \n // We have our indexes i1 & i3, so we can calculate already:\n // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1\n return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1];\n };\n },\n //xxx: for now i will just save one spline function to to\n getInterpolateFunction: function(c){\n if(!s.controller.spline) s.controller.spline = s.params.loop ?\n new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) :\n new s.controller.LinearSpline(s.snapGrid, c.snapGrid);\n },\n setTranslate: function (translate, byController) {\n var controlled = s.params.control;\n var multiplier, controlledTranslate;\n function setControlledTranslate(c) {\n // this will create an Interpolate function based on the snapGrids\n // x is the Grid of the scrolled scroller and y will be the controlled scroller\n // it makes sense to create this only once and recall it for the interpolation\n // the function does a lot of value caching for performance\n translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate;\n if (s.params.controlBy === 'slide') {\n s.controller.getInterpolateFunction(c);\n // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid\n // but it did not work out\n controlledTranslate = -s.controller.spline.interpolate(-translate);\n }\n \n if(!controlledTranslate || s.params.controlBy === 'container'){\n multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate());\n controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate();\n }\n \n if (s.params.controlInverse) {\n controlledTranslate = c.maxTranslate() - controlledTranslate;\n }\n c.updateProgress(controlledTranslate);\n c.setWrapperTranslate(controlledTranslate, false, s);\n c.updateActiveIndex();\n }\n if (Array.isArray(controlled)) {\n for (var i = 0; i < controlled.length; i++) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTranslate(controlled[i]);\n }\n }\n }\n else if (controlled instanceof Swiper && byController !== controlled) {\n \n setControlledTranslate(controlled);\n }\n },\n setTransition: function (duration, byController) {\n var controlled = s.params.control;\n var i;\n function setControlledTransition(c) {\n c.setWrapperTransition(duration, s);\n if (duration !== 0) {\n c.onTransitionStart();\n c.wrapper.transitionEnd(function(){\n if (!controlled) return;\n if (c.params.loop && s.params.controlBy === 'slide') {\n c.fixLoop();\n }\n c.onTransitionEnd();\n \n });\n }\n }\n if (Array.isArray(controlled)) {\n for (i = 0; i < controlled.length; i++) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTransition(controlled[i]);\n }\n }\n }\n else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTransition(controlled);\n }\n }\n };\n \n \n /*=========================\n Parallax\n ===========================*/\n function setParallaxTransform(el, progress) {\n el = $(el);\n var p, pX, pY;\n var rtlFactor = s.rtl ? -1 : 1;\n \n p = el.attr('data-swiper-parallax') || '0';\n pX = el.attr('data-swiper-parallax-x');\n pY = el.attr('data-swiper-parallax-y');\n if (pX || pY) {\n pX = pX || '0';\n pY = pY || '0';\n }\n else {\n if (s.isHorizontal()) {\n pX = p;\n pY = '0';\n }\n else {\n pY = p;\n pX = '0';\n }\n }\n \n if ((pX).indexOf('%') >= 0) {\n pX = parseInt(pX, 10) * progress * rtlFactor + '%';\n }\n else {\n pX = pX * progress * rtlFactor + 'px' ;\n }\n if ((pY).indexOf('%') >= 0) {\n pY = parseInt(pY, 10) * progress + '%';\n }\n else {\n pY = pY * progress + 'px' ;\n }\n \n el.transform('translate3d(' + pX + ', ' + pY + ',0px)');\n }\n s.parallax = {\n setTranslate: function () {\n s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){\n setParallaxTransform(this, s.progress);\n \n });\n s.slides.each(function () {\n var slide = $(this);\n slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () {\n var progress = Math.min(Math.max(slide[0].progress, -1), 1);\n setParallaxTransform(this, progress);\n });\n });\n },\n setTransition: function (duration) {\n if (typeof duration === 'undefined') duration = s.params.speed;\n s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){\n var el = $(this);\n var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration;\n if (duration === 0) parallaxDuration = 0;\n el.transition(parallaxDuration);\n });\n }\n };\n \n \n /*=========================\n Zoom\n ===========================*/\n s.zoom = {\n // \"Global\" Props\n scale: 1,\n currentScale: 1,\n isScaling: false,\n gesture: {\n slide: undefined,\n slideWidth: undefined,\n slideHeight: undefined,\n image: undefined,\n imageWrap: undefined,\n zoomMax: s.params.zoomMax\n },\n image: {\n isTouched: undefined,\n isMoved: undefined,\n currentX: undefined,\n currentY: undefined,\n minX: undefined,\n minY: undefined,\n maxX: undefined,\n maxY: undefined,\n width: undefined,\n height: undefined,\n startX: undefined,\n startY: undefined,\n touchesStart: {},\n touchesCurrent: {}\n },\n velocity: {\n x: undefined,\n y: undefined,\n prevPositionX: undefined,\n prevPositionY: undefined,\n prevTime: undefined\n },\n // Calc Scale From Multi-touches\n getDistanceBetweenTouches: function (e) {\n if (e.targetTouches.length < 2) return 1;\n var x1 = e.targetTouches[0].pageX,\n y1 = e.targetTouches[0].pageY,\n x2 = e.targetTouches[1].pageX,\n y2 = e.targetTouches[1].pageY;\n var distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n return distance;\n },\n // Events\n onGestureStart: function (e) {\n var z = s.zoom;\n if (!s.support.gestures) {\n if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) {\n return;\n }\n z.gesture.scaleStart = z.getDistanceBetweenTouches(e);\n }\n if (!z.gesture.slide || !z.gesture.slide.length) {\n z.gesture.slide = $(this);\n if (z.gesture.slide.length === 0) z.gesture.slide = s.slides.eq(s.activeIndex);\n z.gesture.image = z.gesture.slide.find('img, svg, canvas');\n z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass);\n z.gesture.zoomMax = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax ;\n if (z.gesture.imageWrap.length === 0) {\n z.gesture.image = undefined;\n return;\n }\n }\n z.gesture.image.transition(0);\n z.isScaling = true;\n },\n onGestureChange: function (e) {\n var z = s.zoom;\n if (!s.support.gestures) {\n if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) {\n return;\n }\n z.gesture.scaleMove = z.getDistanceBetweenTouches(e);\n }\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n if (s.support.gestures) {\n z.scale = e.scale * z.currentScale;\n }\n else {\n z.scale = (z.gesture.scaleMove / z.gesture.scaleStart) * z.currentScale;\n }\n if (z.scale > z.gesture.zoomMax) {\n z.scale = z.gesture.zoomMax - 1 + Math.pow((z.scale - z.gesture.zoomMax + 1), 0.5);\n }\n if (z.scale < s.params.zoomMin) {\n z.scale = s.params.zoomMin + 1 - Math.pow((s.params.zoomMin - z.scale + 1), 0.5);\n }\n z.gesture.image.transform('translate3d(0,0,0) scale(' + z.scale + ')');\n },\n onGestureEnd: function (e) {\n var z = s.zoom;\n if (!s.support.gestures) {\n if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2) {\n return;\n }\n }\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n z.scale = Math.max(Math.min(z.scale, z.gesture.zoomMax), s.params.zoomMin);\n z.gesture.image.transition(s.params.speed).transform('translate3d(0,0,0) scale(' + z.scale + ')');\n z.currentScale = z.scale;\n z.isScaling = false;\n if (z.scale === 1) z.gesture.slide = undefined;\n },\n onTouchStart: function (s, e) {\n var z = s.zoom;\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n if (z.image.isTouched) return;\n if (s.device.os === 'android') e.preventDefault();\n z.image.isTouched = true;\n z.image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n z.image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n },\n onTouchMove: function (e) {\n var z = s.zoom;\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n s.allowClick = false;\n if (!z.image.isTouched || !z.gesture.slide) return;\n \n if (!z.image.isMoved) {\n z.image.width = z.gesture.image[0].offsetWidth;\n z.image.height = z.gesture.image[0].offsetHeight;\n z.image.startX = s.getTranslate(z.gesture.imageWrap[0], 'x') || 0;\n z.image.startY = s.getTranslate(z.gesture.imageWrap[0], 'y') || 0;\n z.gesture.slideWidth = z.gesture.slide[0].offsetWidth;\n z.gesture.slideHeight = z.gesture.slide[0].offsetHeight;\n z.gesture.imageWrap.transition(0);\n if (s.rtl) z.image.startX = -z.image.startX;\n if (s.rtl) z.image.startY = -z.image.startY;\n }\n // Define if we need image drag\n var scaledWidth = z.image.width * z.scale;\n var scaledHeight = z.image.height * z.scale;\n \n if (scaledWidth < z.gesture.slideWidth && scaledHeight < z.gesture.slideHeight) return;\n \n z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0);\n z.image.maxX = -z.image.minX;\n z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0);\n z.image.maxY = -z.image.minY;\n \n z.image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n z.image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n \n if (!z.image.isMoved && !z.isScaling) {\n if (s.isHorizontal() &&\n (Math.floor(z.image.minX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x < z.image.touchesStart.x) ||\n (Math.floor(z.image.maxX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x > z.image.touchesStart.x)\n ) {\n z.image.isTouched = false;\n return;\n }\n else if (!s.isHorizontal() &&\n (Math.floor(z.image.minY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y < z.image.touchesStart.y) ||\n (Math.floor(z.image.maxY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y > z.image.touchesStart.y)\n ) {\n z.image.isTouched = false;\n return;\n }\n }\n e.preventDefault();\n e.stopPropagation();\n \n z.image.isMoved = true;\n z.image.currentX = z.image.touchesCurrent.x - z.image.touchesStart.x + z.image.startX;\n z.image.currentY = z.image.touchesCurrent.y - z.image.touchesStart.y + z.image.startY;\n \n if (z.image.currentX < z.image.minX) {\n z.image.currentX = z.image.minX + 1 - Math.pow((z.image.minX - z.image.currentX + 1), 0.8);\n }\n if (z.image.currentX > z.image.maxX) {\n z.image.currentX = z.image.maxX - 1 + Math.pow((z.image.currentX - z.image.maxX + 1), 0.8);\n }\n \n if (z.image.currentY < z.image.minY) {\n z.image.currentY = z.image.minY + 1 - Math.pow((z.image.minY - z.image.currentY + 1), 0.8);\n }\n if (z.image.currentY > z.image.maxY) {\n z.image.currentY = z.image.maxY - 1 + Math.pow((z.image.currentY - z.image.maxY + 1), 0.8);\n }\n \n //Velocity\n if (!z.velocity.prevPositionX) z.velocity.prevPositionX = z.image.touchesCurrent.x;\n if (!z.velocity.prevPositionY) z.velocity.prevPositionY = z.image.touchesCurrent.y;\n if (!z.velocity.prevTime) z.velocity.prevTime = Date.now();\n z.velocity.x = (z.image.touchesCurrent.x - z.velocity.prevPositionX) / (Date.now() - z.velocity.prevTime) / 2;\n z.velocity.y = (z.image.touchesCurrent.y - z.velocity.prevPositionY) / (Date.now() - z.velocity.prevTime) / 2;\n if (Math.abs(z.image.touchesCurrent.x - z.velocity.prevPositionX) < 2) z.velocity.x = 0;\n if (Math.abs(z.image.touchesCurrent.y - z.velocity.prevPositionY) < 2) z.velocity.y = 0;\n z.velocity.prevPositionX = z.image.touchesCurrent.x;\n z.velocity.prevPositionY = z.image.touchesCurrent.y;\n z.velocity.prevTime = Date.now();\n \n z.gesture.imageWrap.transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)');\n },\n onTouchEnd: function (s, e) {\n var z = s.zoom;\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n if (!z.image.isTouched || !z.image.isMoved) {\n z.image.isTouched = false;\n z.image.isMoved = false;\n return;\n }\n z.image.isTouched = false;\n z.image.isMoved = false;\n var momentumDurationX = 300;\n var momentumDurationY = 300;\n var momentumDistanceX = z.velocity.x * momentumDurationX;\n var newPositionX = z.image.currentX + momentumDistanceX;\n var momentumDistanceY = z.velocity.y * momentumDurationY;\n var newPositionY = z.image.currentY + momentumDistanceY;\n \n //Fix duration\n if (z.velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - z.image.currentX) / z.velocity.x);\n if (z.velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - z.image.currentY) / z.velocity.y);\n var momentumDuration = Math.max(momentumDurationX, momentumDurationY);\n \n z.image.currentX = newPositionX;\n z.image.currentY = newPositionY;\n \n // Define if we need image drag\n var scaledWidth = z.image.width * z.scale;\n var scaledHeight = z.image.height * z.scale;\n z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0);\n z.image.maxX = -z.image.minX;\n z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0);\n z.image.maxY = -z.image.minY;\n z.image.currentX = Math.max(Math.min(z.image.currentX, z.image.maxX), z.image.minX);\n z.image.currentY = Math.max(Math.min(z.image.currentY, z.image.maxY), z.image.minY);\n \n z.gesture.imageWrap.transition(momentumDuration).transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)');\n },\n onTransitionEnd: function (s) {\n var z = s.zoom;\n if (z.gesture.slide && s.previousIndex !== s.activeIndex) {\n z.gesture.image.transform('translate3d(0,0,0) scale(1)');\n z.gesture.imageWrap.transform('translate3d(0,0,0)');\n z.gesture.slide = z.gesture.image = z.gesture.imageWrap = undefined;\n z.scale = z.currentScale = 1;\n }\n },\n // Toggle Zoom\n toggleZoom: function (s, e) {\n var z = s.zoom;\n if (!z.gesture.slide) {\n z.gesture.slide = s.clickedSlide ? $(s.clickedSlide) : s.slides.eq(s.activeIndex);\n z.gesture.image = z.gesture.slide.find('img, svg, canvas');\n z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass);\n }\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n \n var touchX, touchY, offsetX, offsetY, diffX, diffY, translateX, translateY, imageWidth, imageHeight, scaledWidth, scaledHeight, translateMinX, translateMinY, translateMaxX, translateMaxY, slideWidth, slideHeight;\n \n if (typeof z.image.touchesStart.x === 'undefined' && e) {\n touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;\n touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;\n }\n else {\n touchX = z.image.touchesStart.x;\n touchY = z.image.touchesStart.y;\n }\n \n if (z.scale && z.scale !== 1) {\n // Zoom Out\n z.scale = z.currentScale = 1;\n z.gesture.imageWrap.transition(300).transform('translate3d(0,0,0)');\n z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(1)');\n z.gesture.slide = undefined;\n }\n else {\n // Zoom In\n z.scale = z.currentScale = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax;\n if (e) {\n slideWidth = z.gesture.slide[0].offsetWidth;\n slideHeight = z.gesture.slide[0].offsetHeight;\n offsetX = z.gesture.slide.offset().left;\n offsetY = z.gesture.slide.offset().top;\n diffX = offsetX + slideWidth/2 - touchX;\n diffY = offsetY + slideHeight/2 - touchY;\n \n imageWidth = z.gesture.image[0].offsetWidth;\n imageHeight = z.gesture.image[0].offsetHeight;\n scaledWidth = imageWidth * z.scale;\n scaledHeight = imageHeight * z.scale;\n \n translateMinX = Math.min((slideWidth / 2 - scaledWidth / 2), 0);\n translateMinY = Math.min((slideHeight / 2 - scaledHeight / 2), 0);\n translateMaxX = -translateMinX;\n translateMaxY = -translateMinY;\n \n translateX = diffX * z.scale;\n translateY = diffY * z.scale;\n \n if (translateX < translateMinX) {\n translateX = translateMinX;\n }\n if (translateX > translateMaxX) {\n translateX = translateMaxX;\n }\n \n if (translateY < translateMinY) {\n translateY = translateMinY;\n }\n if (translateY > translateMaxY) {\n translateY = translateMaxY;\n }\n }\n else {\n translateX = 0;\n translateY = 0;\n }\n z.gesture.imageWrap.transition(300).transform('translate3d(' + translateX + 'px, ' + translateY + 'px,0)');\n z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(' + z.scale + ')');\n }\n },\n // Attach/Detach Events\n attachEvents: function (detach) {\n var action = detach ? 'off' : 'on';\n \n if (s.params.zoom) {\n var target = s.slides;\n var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false;\n // Scale image\n if (s.support.gestures) {\n s.slides[action]('gesturestart', s.zoom.onGestureStart, passiveListener);\n s.slides[action]('gesturechange', s.zoom.onGestureChange, passiveListener);\n s.slides[action]('gestureend', s.zoom.onGestureEnd, passiveListener);\n }\n else if (s.touchEvents.start === 'touchstart') {\n s.slides[action](s.touchEvents.start, s.zoom.onGestureStart, passiveListener);\n s.slides[action](s.touchEvents.move, s.zoom.onGestureChange, passiveListener);\n s.slides[action](s.touchEvents.end, s.zoom.onGestureEnd, passiveListener);\n }\n \n // Move image\n s[action]('touchStart', s.zoom.onTouchStart);\n s.slides.each(function (index, slide){\n if ($(slide).find('.' + s.params.zoomContainerClass).length > 0) {\n $(slide)[action](s.touchEvents.move, s.zoom.onTouchMove);\n }\n });\n s[action]('touchEnd', s.zoom.onTouchEnd);\n \n // Scale Out\n s[action]('transitionEnd', s.zoom.onTransitionEnd);\n if (s.params.zoomToggle) {\n s.on('doubleTap', s.zoom.toggleZoom);\n }\n }\n },\n init: function () {\n s.zoom.attachEvents();\n },\n destroy: function () {\n s.zoom.attachEvents(true);\n }\n };\n \n \n /*=========================\n Plugins API. Collect all and init all plugins\n ===========================*/\n s._plugins = [];\n for (var plugin in s.plugins) {\n var p = s.plugins[plugin](s, s.params[plugin]);\n if (p) s._plugins.push(p);\n }\n // Method to call all plugins event/method\n s.callPlugins = function (eventName) {\n for (var i = 0; i < s._plugins.length; i++) {\n if (eventName in s._plugins[i]) {\n s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n }\n };\n \n \n /*=========================\n Events/Callbacks/Plugins Emitter\n ===========================*/\n function normalizeEventName (eventName) {\n if (eventName.indexOf('on') !== 0) {\n if (eventName[0] !== eventName[0].toUpperCase()) {\n eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1);\n }\n else {\n eventName = 'on' + eventName;\n }\n }\n return eventName;\n }\n s.emitterEventListeners = {\n \n };\n s.emit = function (eventName) {\n // Trigger callbacks\n if (s.params[eventName]) {\n s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n var i;\n // Trigger events\n if (s.emitterEventListeners[eventName]) {\n for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {\n s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n }\n // Trigger plugins\n if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n };\n s.on = function (eventName, handler) {\n eventName = normalizeEventName(eventName);\n if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = [];\n s.emitterEventListeners[eventName].push(handler);\n return s;\n };\n s.off = function (eventName, handler) {\n var i;\n eventName = normalizeEventName(eventName);\n if (typeof handler === 'undefined') {\n // Remove all handlers for such event\n s.emitterEventListeners[eventName] = [];\n return s;\n }\n if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return;\n for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {\n if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1);\n }\n return s;\n };\n s.once = function (eventName, handler) {\n eventName = normalizeEventName(eventName);\n var _handler = function () {\n handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);\n s.off(eventName, _handler);\n };\n s.on(eventName, _handler);\n return s;\n };\n \n \n // Accessibility tools\n s.a11y = {\n makeFocusable: function ($el) {\n $el.attr('tabIndex', '0');\n return $el;\n },\n addRole: function ($el, role) {\n $el.attr('role', role);\n return $el;\n },\n \n addLabel: function ($el, label) {\n $el.attr('aria-label', label);\n return $el;\n },\n \n disable: function ($el) {\n $el.attr('aria-disabled', true);\n return $el;\n },\n \n enable: function ($el) {\n $el.attr('aria-disabled', false);\n return $el;\n },\n \n onEnterKey: function (event) {\n if (event.keyCode !== 13) return;\n if ($(event.target).is(s.params.nextButton)) {\n s.onClickNext(event);\n if (s.isEnd) {\n s.a11y.notify(s.params.lastSlideMessage);\n }\n else {\n s.a11y.notify(s.params.nextSlideMessage);\n }\n }\n else if ($(event.target).is(s.params.prevButton)) {\n s.onClickPrev(event);\n if (s.isBeginning) {\n s.a11y.notify(s.params.firstSlideMessage);\n }\n else {\n s.a11y.notify(s.params.prevSlideMessage);\n }\n }\n if ($(event.target).is('.' + s.params.bulletClass)) {\n $(event.target)[0].click();\n }\n },\n \n liveRegion: $(''),\n \n notify: function (message) {\n var notification = s.a11y.liveRegion;\n if (notification.length === 0) return;\n notification.html('');\n notification.html(message);\n },\n init: function () {\n // Setup accessibility\n if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {\n s.a11y.makeFocusable(s.nextButton);\n s.a11y.addRole(s.nextButton, 'button');\n s.a11y.addLabel(s.nextButton, s.params.nextSlideMessage);\n }\n if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {\n s.a11y.makeFocusable(s.prevButton);\n s.a11y.addRole(s.prevButton, 'button');\n s.a11y.addLabel(s.prevButton, s.params.prevSlideMessage);\n }\n \n $(s.container).append(s.a11y.liveRegion);\n },\n initPagination: function () {\n if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) {\n s.bullets.each(function () {\n var bullet = $(this);\n s.a11y.makeFocusable(bullet);\n s.a11y.addRole(bullet, 'button');\n s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1));\n });\n }\n },\n destroy: function () {\n if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove();\n }\n };\n \n \n /*=========================\n Init/Destroy\n ===========================*/\n s.init = function () {\n if (s.params.loop) s.createLoop();\n s.updateContainerSize();\n s.updateSlidesSize();\n s.updatePagination();\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.set();\n if (s.params.scrollbarDraggable) {\n s.scrollbar.enableDraggable();\n }\n }\n if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n if (!s.params.loop) s.updateProgress();\n s.effects[s.params.effect].setTranslate();\n }\n if (s.params.loop) {\n s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit);\n }\n else {\n s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit);\n if (s.params.initialSlide === 0) {\n if (s.parallax && s.params.parallax) s.parallax.setTranslate();\n if (s.lazy && s.params.lazyLoading) {\n s.lazy.load();\n s.lazy.initialImageLoaded = true;\n }\n }\n }\n s.attachEvents();\n if (s.params.observer && s.support.observer) {\n s.initObservers();\n }\n if (s.params.preloadImages && !s.params.lazyLoading) {\n s.preloadImages();\n }\n if (s.params.zoom && s.zoom) {\n s.zoom.init();\n }\n if (s.params.autoplay) {\n s.startAutoplay();\n }\n if (s.params.keyboardControl) {\n if (s.enableKeyboardControl) s.enableKeyboardControl();\n }\n if (s.params.mousewheelControl) {\n if (s.enableMousewheelControl) s.enableMousewheelControl();\n }\n // Deprecated hashnavReplaceState changed to replaceState for use in hashnav and history\n if (s.params.hashnavReplaceState) {\n s.params.replaceState = s.params.hashnavReplaceState;\n }\n if (s.params.history) {\n if (s.history) s.history.init();\n }\n if (s.params.hashnav) {\n if (s.hashnav) s.hashnav.init();\n }\n if (s.params.a11y && s.a11y) s.a11y.init();\n s.emit('onInit', s);\n };\n \n // Cleanup dynamic styles\n s.cleanupStyles = function () {\n // Container\n s.container.removeClass(s.classNames.join(' ')).removeAttr('style');\n \n // Wrapper\n s.wrapper.removeAttr('style');\n \n // Slides\n if (s.slides && s.slides.length) {\n s.slides\n .removeClass([\n s.params.slideVisibleClass,\n s.params.slideActiveClass,\n s.params.slideNextClass,\n s.params.slidePrevClass\n ].join(' '))\n .removeAttr('style')\n .removeAttr('data-swiper-column')\n .removeAttr('data-swiper-row');\n }\n \n // Pagination/Bullets\n if (s.paginationContainer && s.paginationContainer.length) {\n s.paginationContainer.removeClass(s.params.paginationHiddenClass);\n }\n if (s.bullets && s.bullets.length) {\n s.bullets.removeClass(s.params.bulletActiveClass);\n }\n \n // Buttons\n if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);\n if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);\n \n // Scrollbar\n if (s.params.scrollbar && s.scrollbar) {\n if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style');\n if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style');\n }\n };\n \n // Destroy\n s.destroy = function (deleteInstance, cleanupStyles) {\n // Detach evebts\n s.detachEvents();\n // Stop autoplay\n s.stopAutoplay();\n // Disable draggable\n if (s.params.scrollbar && s.scrollbar) {\n if (s.params.scrollbarDraggable) {\n s.scrollbar.disableDraggable();\n }\n }\n // Destroy loop\n if (s.params.loop) {\n s.destroyLoop();\n }\n // Cleanup styles\n if (cleanupStyles) {\n s.cleanupStyles();\n }\n // Disconnect observer\n s.disconnectObservers();\n \n // Destroy zoom\n if (s.params.zoom && s.zoom) {\n s.zoom.destroy();\n }\n // Disable keyboard/mousewheel\n if (s.params.keyboardControl) {\n if (s.disableKeyboardControl) s.disableKeyboardControl();\n }\n if (s.params.mousewheelControl) {\n if (s.disableMousewheelControl) s.disableMousewheelControl();\n }\n // Disable a11y\n if (s.params.a11y && s.a11y) s.a11y.destroy();\n // Delete history popstate\n if (s.params.history && !s.params.replaceState) {\n window.removeEventListener('popstate', s.history.setHistoryPopState);\n }\n if (s.params.hashnav && s.hashnav) {\n s.hashnav.destroy();\n }\n // Destroy callback\n s.emit('onDestroy');\n // Delete instance\n if (deleteInstance !== false) s = null;\n };\n \n s.init();\n \n \n \n // Return swiper instance\n return s;\n };\n \n /*==================================================\n Prototype\n ====================================================*/\n Swiper.prototype = {\n isSafari: (function () {\n var ua = window.navigator.userAgent.toLowerCase();\n return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);\n })(),\n isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),\n isArray: function (arr) {\n return Object.prototype.toString.apply(arr) === '[object Array]';\n },\n /*==================================================\n Browser\n ====================================================*/\n browser: {\n ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled,\n ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1),\n lteIE9: (function() {\n // create temporary DIV\n var div = document.createElement('div');\n // add content to tmp DIV which is wrapped into the IE HTML conditional statement\n div.innerHTML = '';\n // return true / false value based on what will browser render\n return div.getElementsByTagName('i').length === 1;\n })()\n },\n /*==================================================\n Devices\n ====================================================*/\n device: (function () {\n var ua = window.navigator.userAgent;\n var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);\n var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n var iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n return {\n ios: ipad || iphone || ipod,\n android: android\n };\n })(),\n /*==================================================\n Feature Detection\n ====================================================*/\n support: {\n touch : (window.Modernizr && Modernizr.touch === true) || (function () {\n return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch);\n })(),\n \n transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () {\n var div = document.createElement('div').style;\n return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div);\n })(),\n \n flexbox: (function () {\n var div = document.createElement('div').style;\n var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');\n for (var i = 0; i < styles.length; i++) {\n if (styles[i] in div) return true;\n }\n })(),\n \n observer: (function () {\n return ('MutationObserver' in window || 'WebkitMutationObserver' in window);\n })(),\n \n passiveListener: (function () {\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function() {\n supportsPassive = true;\n }\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {}\n return supportsPassive;\n })(),\n \n gestures: (function () {\n return 'ongesturestart' in window;\n })()\n },\n /*==================================================\n Plugins\n ====================================================*/\n plugins: {}\n };\n \n","})();\n"]} \ No newline at end of file diff --git a/bower_components/framework7/dist/js/framework7.min.js b/bower_components/framework7/dist/js/framework7.min.js new file mode 100644 index 00000000..e4860d01 --- /dev/null +++ b/bower_components/framework7/dist/js/framework7.min.js @@ -0,0 +1,26 @@ +/** + * Framework7 1.6.2 + * Full featured mobile HTML framework for building iOS & Android apps + * + * http://framework7.io/ + * + * Copyright 2017, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: May 29, 2017 + */ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):e.Dom7=a()}(this,function(){"use strict";function e(e,a){var t=[],r=0;if(e&&!a&&e instanceof n)return e;if(e)if("string"==typeof e){var i,s,o=e.trim();if(o.indexOf("<")>=0&&o.indexOf(">")>=0){var l="div";for(0===o.indexOf(":~]/)?(a||document).querySelectorAll(e.trim()):[document.getElementById(e.trim().split("#")[1])],r=0;r0&&e[0].nodeType)for(r=0;r=0?"&":"?",o=a.method.toUpperCase();if(("GET"===o||"HEAD"===o||"OPTIONS"===o||"DELETE"===o)&&a.data){var l;l="string"==typeof a.data?a.data.indexOf("?")>=0?a.data.split("?")[1]:a.data:d.serializeObject(a.data),l.length&&(a.url+=s+l,"?"===s&&(s="&"))}if("json"===a.dataType&&a.url.indexOf("callback=")>=0){var p,u="f7jsonp_"+(Date.now()+(m+=1)),h=a.url.split("callback="),f=h[0]+"callback="+u;if(h[1].indexOf("&")>=0){var g=h[1].split("&").filter(function(e){return e.indexOf("=")>0}).join("&");g.length>0&&(f+="&"+g)}var v=document.createElement("script");return v.type="text/javascript",v.onerror=function(){clearTimeout(p),t(void 0,void 0,"error",null,"scripterror"),t("ajaxComplete ajax:complete",{scripterror:!0},"complete",null,"scripterror")},v.src=f,window[u]=function(e){clearTimeout(p),t(void 0,void 0,"success",e),v.parentNode.removeChild(v),v=null,delete window[u]},document.querySelector("head").appendChild(v),void(a.timeout>0&&(p=setTimeout(function(){v.parentNode.removeChild(v),v=null,t(void 0,void 0,"error",null,"timeout")},a.timeout)))}"GET"!==o&&"HEAD"!==o&&"OPTIONS"!==o&&"DELETE"!==o||!1===a.cache&&(a.url+=s+"_nocache"+Date.now());var b=new XMLHttpRequest;b.requestUrl=a.url,b.requestParameters=a,b.open(o,a.url,a.async,a.user,a.password);var w=null;if(("POST"===o||"PUT"===o||"PATCH"===o)&&a.data)if(a.processData){var C=[ArrayBuffer,Blob,Document,FormData];if(C.indexOf(a.data.constructor)>=0)w=a.data;else{var y="---------------------------"+Date.now().toString(16);"multipart/form-data"===a.contentType?b.setRequestHeader("Content-Type","multipart/form-data; boundary="+y):b.setRequestHeader("Content-Type",a.contentType),w="";var x=d.serializeObject(a.data);if("multipart/form-data"===a.contentType){y="---------------------------"+Date.now().toString(16),x=x.split("&");for(var T=[],k=0;k=200&&b.status<300||0===b.status){var r;if("json"===a.dataType)try{r=JSON.parse(b.responseText),t("ajaxSuccess ajax:success",{xhr:b},"success",r,b.status,b)}catch(e){t("ajaxError ajax:error",{xhr:b,parseerror:!0},"error",b,"parseerror")}else r="text"===b.responseType||""===b.responseType?b.responseText:b.response,t("ajaxSuccess ajax:success",{xhr:b},"success",r,b.status,b)}else t("ajaxError ajax:error",{xhr:b},"error",b,b.status);a.statusCode&&(i.statusCode&&i.statusCode[b.status]&&i.statusCode[b.status](b),a.statusCode[b.status]&&a.statusCode[b.status](b)),t("ajaxComplete ajax:complete",{xhr:b},"complete",b,b.status)},b.onerror=function(e){P&&clearTimeout(P),t("ajaxError ajax:error",{xhr:b},"error",b,b.status),t("ajaxComplete ajax:complete",{xhr:b,error:!0},"complete",b,"error")},t("ajaxStart ajax:start",{xhr:b},"start",b),t(void 0,void 0,"beforeSend",b),a.timeout>0&&(b.onabort=function(){P&&clearTimeout(P)},P=setTimeout(function(){b.abort(),t("ajaxError ajax:error",{xhr:b,timeout:!0},"error",b,"timeout"),t("ajaxComplete ajax:complete",{xhr:b,timeout:!0},"complete",b,"timeout")},a.timeout)),b.send(w),b}function t(a,t){var r=this,n={props:e.extend({},a),params:e.extend({duration:300,easing:"swing"},t),elements:r,animating:!1,que:[],easingProgress:function(e,a){return"swing"===e?.5-Math.cos(a*Math.PI)/2:"function"==typeof e?e(a):a},stop:function(){n.frameId&&d.cancelAnimationFrame(n.frameId),n.animating=!1,n.elements.each(function(e,a){delete a.dom7AnimateInstance}),n.que=[]},done:function(e){if(n.animating=!1,n.elements.each(function(e,a){delete a.dom7AnimateInstance}),e&&e(r),n.que.length>0){var a=n.que.shift();n.animate(a[0],a[1])}},animate:function(e,a){function t(){s=(new Date).getTime();var u,h;m||(m=!0,a.begin&&a.begin(r)),null===l&&(l=s),a.progress&&a.progress(r,Math.max(Math.min((s-l)/a.duration,1),0),l+a.duration-s<0?0:l+a.duration-s,l),i.forEach(function(t){var r=t;o||r.done||Object.keys(e).forEach(function(t){if(!o&&!r.done){u=Math.max(Math.min((s-l)/a.duration,1),0),h=n.easingProgress(a.easing,u);var d=r[t],m=d.initialValue,f=d.finalValue,g=d.unit;r[t].currentValue=m+h*(f-m);var v=r[t].currentValue;if((f>m&&v>=f||f-1?s.replace(/\S*\?/,""):"",t=s.split("&").filter(function(e){return""!==e}),n=t.length,a=0;a0){for(var t="",r=0;r6&&(r=r.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),n=new window.WebKitCSSMatrix("none"===r?"":r)):(n=i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=n.toString().split(",")),"x"===a&&(r=window.WebKitCSSMatrix?n.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(r=window.WebKitCSSMatrix?n.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),r||0},requestAnimationFrame:function(e){return window.requestAnimationFrame?window.requestAnimationFrame(e):window.webkitRequestAnimationFrame?window.webkitRequestAnimationFrame(e):window.setTimeout(e,1e3/60)},cancelAnimationFrame:function(e){return window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.webkitCancelAnimationFrame?window.webkitCancelAnimationFrame(e):window.clearTimeout(e)},supportTouch:!!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),removeDiacritics:function(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return s[e]||e})},extend:function(){for(var e=[],a=arguments.length;a--;)e[a]=arguments[a];for(var t=Object(e[0]),r=1;rs&&u>=c&&(f.scrollTop=c,a=!0),g&&co&&h>=m&&(f.scrollLeft=m,a=!0),v&&m0||0===a,v=e>0||0===e;if(void 0===r&&(r="swing"),g&&(s=f.scrollTop,t||(f.scrollTop=a)),v&&(o=f.scrollLeft,t||(f.scrollLeft=e)),t){g&&(l=f.scrollHeight-f.offsetHeight,c=Math.max(Math.min(a,l),0)),v&&(p=f.scrollWidth-f.offsetWidth,m=Math.max(Math.min(e,p),0));var b=null;g&&c===s&&(g=!1),v&&m===o&&(v=!1),d.requestAnimationFrame(i)}})},scrollTop:function(e,a,t,r){3===arguments.length&&"function"==typeof t&&(r=t,t=void 0);var n=this;return void 0===e?n.length>0?n[0].scrollTop:null:n.scrollTo(void 0,e,a,t,r)},scrollLeft:function(e,a,t,r){3===arguments.length&&"function"==typeof t&&(r=t,t=void 0);var n=this;return void 0===e?n.length>0?n[0].scrollLeft:null:n.scrollTo(e,void 0,a,t,r)}},h={addClass:function(e){var a=this;if(void 0===e)return this;for(var t=e.split(" "),r=0;r=0&&(a[d.toCamelCase(n.name.split("data-")[1])]=n.value)}for(var i in a)"false"===a[i]?a[i]=!1:"true"===a[i]?a[i]=!0:parseFloat(a[i])===1*a[i]&&(a[i]*=1);return a}},val:function(e){var a=this;{if(void 0!==e){for(var t=0;t0}),e[s].dispatchEvent(o),e[s].dom7EventData=[],delete e[s].dom7EventData}return this},transitionEnd:function(e){function a(i){if(i.target===this)for(e.call(this,i),t=0;t0?parseFloat(this.css("width")):null},outerWidth:function(e){if(this.length>0){if(e){var a=this.styles();return this[0].offsetWidth+parseFloat(a.getPropertyValue("margin-right"))+parseFloat(a.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},height:function(){return this[0]===window?window.innerHeight:this.length>0?parseFloat(this.css("height")):null},outerHeight:function(e){if(this.length>0){if(e){var a=this.styles();return this[0].offsetHeight+parseFloat(a.getPropertyValue("margin-top"))+parseFloat(a.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(this.length>0){var e=this[0],a=e.getBoundingClientRect(),t=document.body,r=e.clientTop||t.clientTop||0,n=e.clientLeft||t.clientLeft||0,i=e===window?window.scrollY:e.scrollTop,s=e===window?window.scrollX:e.scrollLeft;return{top:a.top+i-r,left:a.left+s-n}}return null},hide:function(){for(var e=this,a=0;at-1?new n([]):e<0?(a=t+e,new n(a<0?[]:[this[a]])):new n([this[e]])},append:function(){for(var e=this,a=[],t=arguments.length;t--;)a[t]=arguments[t];for(var r,i=0;i=0;t-=1)r[a].insertBefore(i.childNodes[t],r[a].childNodes[0])}else if(e instanceof n)for(t=0;t1)for(var i=0;i1)for(var i=0;i0?a?this[0].nextElementSibling&&e(this[0].nextElementSibling).is(a)?[this[0].nextElementSibling]:[]:this[0].nextElementSibling?[this[0].nextElementSibling]:[]:[])},nextAll:function(a){var t=[],r=this[0];if(!r)return new n([]);for(;r.nextElementSibling;){var i=r.nextElementSibling;a?e(i).is(a)&&t.push(i):t.push(i),r=i}return new n(t)},prev:function(a){if(this.length>0){var t=this[0];return new n(a?t.previousElementSibling&&e(t.previousElementSibling).is(a)?[t.previousElementSibling]:[]:t.previousElementSibling?[t.previousElementSibling]:[])}return new n([])},prevAll:function(a){var t=[],r=this[0];if(!r)return new n([]);for(;r.previousElementSibling;){var i=r.previousElementSibling;a?e(i).is(a)&&t.push(i):t.push(i),r=i}return new n(t)},siblings:function(e){return this.nextAll(e).add(this.prevAll(e))},parent:function(a){for(var t=this,r=[],n=0;n/g,">").replace(/"/g,""")}function r(e){var a,t,r,n=e.replace(/[{}#}]/g,"").split(" "),i=[];for(t=0;t=0){a=r,i.push(s);break}a&&(t=a)}else if(s.indexOf("=")>0){var c=s.split("="),m=c[0],u=c[1];if(p||(p=0===u.indexOf('"')?l:o,d=0===u.indexOf('"')?'"':"'"),2!==u.match(p).length){for(a=0,r=t+1;r=0){a=r;break}a&&(t=a)}var h=[m,u.replace(p,"")];i.push(h)}else i.push(s)}return i}function n(a){var t,n,i=[];if(!a)return[];var s=a.split(/({{[^{^}]*}})/);for(t=0;t=0)continue;if(o.indexOf("{#")<0&&o.indexOf(" ")<0&&o.indexOf("else")<0){i.push({type:"variable",contextName:o.replace(/[{}]/g,"")});continue}var l=r(o),p=l[0],d=">"===p,c=[],m={};for(n=1;n=0){var h="",f="",g=0,v=void 0,b=!1,w=!1,C=0;for(n=t+1;n=0&&(C+=1),s[n].indexOf("{{/")>=0&&(C-=1),s[n].indexOf("{{#"+p)>=0)h+=s[n],w&&(f+=s[n]),g+=1;else if(s[n].indexOf("{{/"+p)>=0){if(!(g>0)){v=n,b=!0;break}g-=1,h+=s[n],w&&(f+=s[n])}else s[n].indexOf("else")>=0&&0===C?w=!0:(w||(h+=s[n]),w&&(f+=s[n]));b&&(v&&(t=v),i.push({type:"helper",helperName:p,contextName:c,content:h,inverseContent:f,hash:m}))}else o.indexOf(" ")>0&&(d&&(p="_partial",c[0]&&(c[0]='"'+c[0].replace(/"|'/g,"")+'"')),i.push({type:"helper",helperName:p,contextName:c,hash:m}))}}return i}function i(e,a){if(2===arguments.length){var t=new p(e),r=t.compile()(a);return t=null,r}return new p(e)}var s;s="undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0;var o=new RegExp("'","g"),l=new RegExp('"',"g"),p=function(e){function a(e,a){var t,r=a,n=0;if(0===e.indexOf("../")){var i=r.split("_")[1]-n;n=e.split("../").length-1,r="ctx_"+(i>=1?i:1),t=e.split("../")[n].split(".")}else 0===e.indexOf("@global")?(r="Template7.global",t=e.split("@global.")[1].split(".")):0===e.indexOf("@root")?(r="root",t=e.split("@root.")[1].split(".")):t=e.split(".");for(var s=0;s0?r+="[(data && data."+o.replace("@","")+")]":r="(data && data."+e.replace("@","")+")":isFinite(o)?r+="["+o+"]":"this"===o||o.indexOf("this.")>=0||o.indexOf("this[")>=0||o.indexOf("this(")>=0?r=o.replace("this",a):r+="."+o}return r}function t(e,t){for(var r=[],n=0;n0)throw new Error('Template7: Missing helper: "'+h.helperName+'"');f=a(h.helperName,c),m+="if ("+f+") {",m+="if (isArray("+f+")) {",m+="r += (Template7.helpers.each).call("+c+", "+f+", {hash:"+JSON.stringify(h.hash)+", data: data || {}, fn: "+l(h,o+1)+", inverse: "+p(h,o+1)+", root: root});",m+="}else {",m+="r += (Template7.helpers.with).call("+c+", "+f+", {hash:"+JSON.stringify(h.hash)+", data: data || {}, fn: "+l(h,o+1)+", inverse: "+p(h,o+1)+", root: root});",m+="}}"}}else m+="r +='"+h.content.replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/'/g,"\\'")+"';"}return m+="\nreturn r;})",eval.call(s,m)}var i=this;i.template=e,i.compile=function(e){return i.compiled||(i.compiled=r(e)),i.compiled}};return p.prototype={options:{},partials:{},helpers:{_partial:function(e,a){var t=p.prototype.partials[e];if(!t||t&&!t.template)return"";t.compiled||(t.compiled=new p(t.template).compile());var r=this;for(var n in a.hash)r[n]=a.hash[n];return t.compiled(r,a.data,a.root)},escape:function(e,a){if("string"!=typeof e)throw new Error('Template7: Passed context to "escape" helper should be a string');return t(e)},if:function(e,t){var r=e;return a(r)&&(r=r.call(this)),r?t.fn(this,t.data):t.inverse(this,t.data)},unless:function(e,t){var r=e;return a(r)&&(r=r.call(this)),r?t.inverse(this,t.data):t.fn(this,t.data)},each:function(t,r){var n=t,i="",s=0;if(a(n)&&(n=n.call(this)),e(n)){for(r.hash.reverse&&(n=n.reverse()),s=0;s0?i:r.inverse(this)},with:function(e,t){var r=e;return a(r)&&(r=e.call(this)),t.fn(r)},join:function(e,t){var r=e;return a(r)&&(r=r.call(this)),r.join(t.hash.delimiter||t.hash.delimeter)},js:function(e,a){var t;return t=e.indexOf("return")>=0?"(function(){"+e+"})":"(function(){return ("+e+")})",eval.call(this,t).call(this)},js_compare:function(e,a){var t;return t=e.indexOf("return")>=0?"(function(){"+e+"})":"(function(){return ("+e+")})",eval.call(this,t).call(this)?a.fn(this,a.data):a.inverse(this,a.data)}}},i.registerHelper=function(e,a){p.prototype.helpers[e]=a},i.unregisterHelper=function(e){p.prototype.helpers[e]=void 0,delete p.prototype.helpers[e]},i.registerPartial=function(e,a){p.prototype.partials[e]={template:a}},i.unregisterPartial=function(e){p.prototype.partials[e]&&(p.prototype.partials[e]=void 0,delete p.prototype.partials[e])},i.compile=function(e,a){return new p(e,a).compile()},i.options=p.prototype.options,i.helpers=p.prototype.helpers,i.partials=p.prototype.partials,i}),function(){"use strict";window.Framework7=function(e){function a(){var e,a=i(this),t=a[0].scrollTop,r=a[0].scrollHeight,n=a[0].offsetHeight,s=a[0].getAttribute("data-distance"),o=a.find(".virtual-list"),l=a.hasClass("infinite-scroll-top");if(s||(s=50),"string"==typeof s&&s.indexOf("%")>=0&&(s=parseInt(s,10)/100*n),s>n&&(s=n),l)t=r-s){if(o.length>0&&(e=o.eq(-1)[0].f7VirtualList)&&!e.reachEnd&&!e.params.updatableScroll)return;a.trigger("infinite")}}function t(){r.device.ipad&&(document.body.scrollLeft=0,setTimeout(function(){document.body.scrollLeft=0},0))}var r=this;r.version="1.6.0",r.params={root:"body",cache:!0,cacheIgnore:[],cacheIgnoreGetParameters:!1,cacheDuration:6e5,preloadPreviousPage:!0,uniqueHistory:!1,uniqueHistoryIgnoreGetParameters:!1,dynamicPageUrl:"content-{{index}}",allowDuplicateUrls:!1,router:!0,routerRemoveTimeout:!1,routerRemoveWithTimeout:!1,pushState:!1,pushStateRoot:void 0,pushStateNoAnimation:!1,pushStateSeparator:"#!/",pushStateOnLoad:!0,fastClicks:!0,fastClicksDistanceThreshold:10,fastClicksDelayBetweenClicks:50,fastClicksExclude:"",tapHold:!1,tapHoldDelay:750,tapHoldPreventClicks:!0,activeState:!0,activeStateElements:"a, button, label, span",animateNavBackIcon:!1,swipeBackPage:!0,swipeBackPageThreshold:0,swipeBackPageActiveArea:30,swipeBackPageAnimateShadow:!0,swipeBackPageAnimateOpacity:!0,ajaxLinks:void 0,externalLinks:".external",sortable:!0,hideNavbarOnPageScroll:!1,hideToolbarOnPageScroll:!1,hideTabbarOnPageScroll:!1,showBarsOnPageScrollEnd:!0,showBarsOnPageScrollTop:!0,swipeout:!0,swipeoutActionsNoFold:!1,swipeoutNoFollow:!1,swipeoutRemoveWithTimeout:!1,smartSelectOpenIn:"page",smartSelectBackText:"Back",smartSelectPopupCloseText:"Close",smartSelectPickerCloseText:"Done",smartSelectSearchbar:!1,smartSelectBackOnSelect:!1,scrollTopOnNavbarClick:!1,scrollTopOnStatusbarClick:!1,panelLeftBreakpoint:null,panelRightBreakpoint:null,swipePanel:!1,swipePanelActiveArea:0,swipePanelCloseOpposite:!0,swipePanelOnlyClose:!1,swipePanelNoFollow:!1,swipePanelThreshold:0,panelsCloseByOutside:!0,modalButtonOk:"OK",modalButtonCancel:"Cancel",modalUsernamePlaceholder:"Username",modalPasswordPlaceholder:"Password",modalTitle:"Framework7",modalCloseByOutside:!1,actionsCloseByOutside:!0,popupCloseByOutside:!0,popoverCloseByOutside:!0,modalPreloaderTitle:"Loading... ",modalStack:!0,modalsMoveToRoot:!0,imagesLazyLoadThreshold:0,imagesLazyLoadSequential:!0,viewClass:"view",viewMainClass:"view-main",viewsClass:"views",notificationCloseOnClick:!1,notificationCloseIcon:!0,notificationCloseButtonText:"Close",animatePages:!0,templates:{},template7Data:{},template7Pages:!1,precompileTemplates:!1,material:!1,materialPageLoadDelay:0,materialPreloaderSvg:'',materialPreloaderHtml:'',materialRipple:!0,materialRippleElements:".ripple, a.link, a.item-link, .button, .modal-button, .tab-link, .label-radio, .label-checkbox, .actions-modal-button, a.searchbar-clear, a.floating-button, .floating-button > a, .speed-dial-buttons a, .form-checkbox, .form-radio, .data-table .sortable-cell",init:!0};for(var n in e)r.params[n]=e[n];var i=Dom7,s=Template7;r._compiledTemplates={},r.root=i(r.params.root),r.root.eq(0).addClass("framework7-root"),r.touchEvents={start:r.support.touch?"touchstart":"mousedown",move:r.support.touch?"touchmove":"mousemove",end:r.support.touch?"touchend":"mouseup"},r.ls=window.localStorage,r.rtl="rtl"===i("body").css("direction"),r.rtl&&i("html").attr("dir","rtl"),void 0!==r.params.statusbarOverlay?r.params.statusbarOverlay?i("html").addClass("with-statusbar-overlay"):i("html").removeClass("with-statusbar-overlay"):r.device.ios&&(window.cordova||window.phonegap)&&i(document).on("resume",function(){r.device.needsStatusBar()&&i("html").addClass("with-statusbar-overlay")},!1),r.views=[];var o=function(e,a){var t,n={dynamicNavbar:!1,domCache:!1,linksView:void 0,reloadPages:!1,uniqueHistory:r.params.uniqueHistory,uniqueHistoryIgnoreGetParameters:r.params.uniqueHistoryIgnoreGetParameters,allowDuplicateUrls:r.params.allowDuplicateUrls,swipeBackPage:r.params.swipeBackPage,swipeBackPageAnimateShadow:r.params.swipeBackPageAnimateShadow,swipeBackPageAnimateOpacity:r.params.swipeBackPageAnimateOpacity,swipeBackPageActiveArea:r.params.swipeBackPageActiveArea,swipeBackPageThreshold:r.params.swipeBackPageThreshold,animatePages:r.params.animatePages,preloadPreviousPage:r.params.preloadPreviousPage};a=a||{},a.dynamicNavbar&&r.params.material&&(a.dynamicNavbar=!1);for(var s in n)void 0===a[s]&&(a[s]=n[s]);var o=this;o.params=a,o.selector=e;var l=i(e);if(o.container=l[0],"string"!=typeof e&&(e=(l.attr("id")?"#"+l.attr("id"):"")+(l.attr("class")?"."+l.attr("class").replace(/ /g,".").replace(".active",""):""),o.selector=e),o.main=l.hasClass(r.params.viewMainClass),o.contentCache={},o.contextCache={},o.pagesCache={},o.pageElementsCache={},l[0].f7View=o,o.pagesContainer=l.find(".pages")[0],o.initialPages=[],o.initialPagesUrl=[],o.initialNavbars=[],o.params.domCache){var p=l.find(".page");for(t=0;t=0&&m.indexOf(u+"#")<0&&(m=m.split(u)[0]));var f,g;o.activePage||(f=i(o.pagesContainer).find(".page-on-center"),0===f.length&&(f=i(o.pagesContainer).find(".page:not(.cached)"),f=f.eq(f.length-1)),f.length>0&&(g=f[0].f7PageData)),o.params.domCache&&f?(o.url=l.attr("data-url")||o.params.url||"#"+f.attr("data-page"),o.pagesCache[o.url]=f.attr("data-page")):o.url=l.attr("data-url")||o.params.url||m,g&&(g.view=o,g.url=o.url,o.params.domCache&&o.params.dynamicNavbar&&!g.navbarInnerContainer&&(g.navbarInnerContainer=o.initialNavbars[o.initialPages.indexOf(g.container)]),o.activePage=g,f[0].f7PageData=g),o.url&&o.history.push(o.url);var v,b,w,C,y,x,T,k,P,S,M,I,E=!1,O=!1,D={},L=[],z=[],B=!0,N=[],A=[];if(o.handleTouchStart=function(e){B&&o.params.swipeBackPage&&!E&&!r.swipeoutOpenedEl&&o.allowPageChange&&(O=!1,E=!0,v=void 0,D.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,D.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,C=(new Date).getTime(),P=o.params.dynamicNavbar&&l.find(".navbar-inner").length>1)},o.handleTouchMove=function(e){if(E){var a="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,t="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY;if(void 0===v&&(v=!!(v||Math.abs(t-D.y)>Math.abs(a-D.x))),v||e.f7PreventSwipeBack||r.preventSwipeBack)return void(E=!1);if(!O){var n=!1;b=l.width();var s=i(e.target),p=s.hasClass("swipeout")?s:s.parents(".swipeout");p.length>0&&(!r.rtl&&p.find(".swipeout-actions-left").length>0&&(n=!0),r.rtl&&p.find(".swipeout-actions-right").length>0&&(n=!0)),L=s.is(".page")?s:s.parents(".page"),L.hasClass("no-swipeback")&&(n=!0),z=l.find(".page-on-left:not(.cached)");var d=D.x-l.offset().left>o.params.swipeBackPageActiveArea;if(d=r.rtl?D.xo.params.swipeBackPageActiveArea,d&&(n=!0),0!==z.length&&0!==L.length||(n=!0),n)return void(E=!1);o.params.swipeBackPageAnimateShadow&&!r.device.android&&(S=L.find(".swipeback-page-shadow"),0===S.length&&(S=i('
                              '),L.append(S))),o.params.swipeBackPageAnimateOpacity&&(M=z.find(".swipeback-page-opacity"),0===M.length&&(M=i('
                              '),z.append(M))),P&&(N=l.find(".navbar-on-center:not(.cached)"),A=l.find(".navbar-on-left:not(.cached)"),y=N.find(".left, .center, .right, .subnavbar, .fading"),x=A.find(".left, .center, .right, .subnavbar, .fading"),r.params.animateNavBackIcon&&(T=N.find(".left.sliding .back .icon"),k=A.find(".left.sliding .back .icon"))),i(".picker-modal.modal-in").length>0&&r.closeModal(i(".picker-modal.modal-in"))}e.f7PreventPanelSwipe=!0,O=!0,e.preventDefault();var c=r.rtl?-1:1;w=(a-D.x-o.params.swipeBackPageThreshold)*c,w<0&&(w=0);var m=w/b,u={percentage:m,activePage:L[0],previousPage:z[0],activeNavbar:N[0],previousNavbar:A[0]};o.params.onSwipeBackMove&&o.params.onSwipeBackMove(u),l.trigger("swipeBackMove swipeback:move",u);var h=w*c,f=(w/5-b/5)*c;if(1===r.device.pixelRatio&&(h=Math.round(h),f=Math.round(f)),L.transform("translate3d("+h+"px,0,0)"),o.params.swipeBackPageAnimateShadow&&!r.device.android&&(S[0].style.opacity=1-1*m),z.transform("translate3d("+f+"px,0,0)"),o.params.swipeBackPageAnimateOpacity&&(M[0].style.opacity=1-1*m),P){var g;for(g=0;g=0){var C=m*I[0].f7NavbarRightOffset;1===r.device.pixelRatio&&(C=Math.round(C)),I.transform("translate3d("+C+"px,0,0)"),r.params.animateNavBackIcon&&I[0].className.indexOf("left")>=0&&T.length>0&&T.transform("translate3d("+-C+"px,0,0)")}for(g=0;g=0){var B=I[0].f7NavbarLeftOffset*(1-m);1===r.device.pixelRatio&&(B=Math.round(B)),I.transform("translate3d("+B+"px,0,0)"),r.params.animateNavBackIcon&&I[0].className.indexOf("left")>=0&&k.length>0&&k.transform("translate3d("+-B+"px,0,0)")}}}},o.handleTouchEnd=function(e){if(!E||!O)return E=!1,void(O=!1);if(E=!1,O=!1,0===w)return i([L[0],z[0]]).transform(""),void(P&&(y.transform("").css({opacity:""}),x.transform("").css({opacity:""}),T&&T.length>0&&T.transform(""),k&&T.length>0&&k.transform("")));var a=(new Date).getTime()-C,t=!1;(a<300&&w>10||a>=300&&w>b/2)&&(L.removeClass("page-on-center").addClass("page-on-right"),z.removeClass("page-on-left").addClass("page-on-center"),P&&(N.removeClass("navbar-on-center").addClass("navbar-on-right"),A.removeClass("navbar-on-left").addClass("navbar-on-center")),t=!0),i([L[0],z[0]]).transform("").addClass("page-transitioning"),P&&(y.css({opacity:""}).each(function(){var e=t?this.f7NavbarRightOffset:0,a=i(this);a.transform("translate3d("+e+"px,0,0)"),r.params.animateNavBackIcon&&a.hasClass("left")&&T.length>0&&T.addClass("page-transitioning").transform("translate3d("+-e+"px,0,0)")}).addClass("page-transitioning"),x.transform("").css({opacity:""}).each(function(){var e=t?0:this.f7NavbarLeftOffset,a=i(this);a.transform("translate3d("+e+"px,0,0)"),r.params.animateNavBackIcon&&a.hasClass("left")&&k.length>0&&k.addClass("page-transitioning").transform("translate3d("+-e+"px,0,0)")}).addClass("page-transitioning")),B=!1,o.allowPageChange=!1;var n={activePage:L[0],previousPage:z[0],activeNavbar:N[0],previousNavbar:A[0]};if(t){var s=o.history[o.history.length-2];o.url=s,r.pageBackCallback("before",o,{pageContainer:L[0],url:s,position:"center",newPage:z,oldPage:L,swipeBack:!0}),r.pageAnimCallback("before",o,{pageContainer:z[0],url:s,position:"left",newPage:z,oldPage:L,swipeBack:!0}),o.params.onSwipeBackBeforeChange&&o.params.onSwipeBackBeforeChange(n),l.trigger("swipeBackBeforeChange swipeback:beforechange",n)}else o.params.onSwipeBackBeforeReset&&o.params.onSwipeBackBeforeReset(n),l.trigger("swipeBackBeforeReset swipeback:beforereset",n);L.transitionEnd(function(){i([L[0],z[0]]).removeClass("page-transitioning"),P&&(y.removeClass("page-transitioning").css({opacity:""}),x.removeClass("page-transitioning").css({opacity:""}),T&&T.length>0&&T.removeClass("page-transitioning"),k&&k.length>0&&k.removeClass("page-transitioning")),B=!0,o.allowPageChange=!0,t?(r.params.pushState&&o.main&&history.back(),r.pageBackCallback("after",o,{pageContainer:L[0],url:s,position:"center",newPage:z,oldPage:L,swipeBack:!0}),r.pageAnimCallback("after",o,{pageContainer:z[0],url:s,position:"left",newPage:z,oldPage:L,swipeBack:!0}),r.router.afterBack(o,L,z),o.params.onSwipeBackAfterChange&&o.params.onSwipeBackAfterChange(n),l.trigger("swipeBackAfterChange swipeback:afterchange",n)):(o.params.onSwipeBackAfterReset&&o.params.onSwipeBackAfterReset(n),l.trigger("swipeBackAfterReset swipeback:afterreset",n)),S&&S.length>0&&S.remove(),M&&M.length>0&&M.remove()})},o.attachEvents=function(e){var a=e?"off":"on",t=!("touchstart"!==r.touchEvents.start||!r.support.passiveListener)&&{passive:!0,capture:!1},n=!!r.support.passiveListener&&{passive:!1,capture:!1};l[a](r.touchEvents.start,o.handleTouchStart,t),l[a](r.touchEvents.move,o.handleTouchMove,n),l[a](r.touchEvents.end,o.handleTouchEnd,t)},o.detachEvents=function(){o.attachEvents(!0)},o.params.swipeBackPage&&!r.params.material&&o.attachEvents(),o.params.name&&(o.params.name=o.params.name.replace(/[^a-zA-Z]/g,"")),r.views.push(o),o.main?(r.mainView=o,r.views.main=o):o.params.name&&(r[o.params.name+"View"]=o,r.views[o.params.name]=o),o.router={load:function(e){return r.router.load(o,e)},back:function(e){return r.router.back(o,e)},loadPage:function(e){if("string"==typeof(e=e||{})){var a=e;e={},a&&0===a.indexOf("#")&&o.params.domCache?e.pageName=a.split("#")[1]:e.url=a}return r.router.load(o,e)},loadContent:function(e){return r.router.load(o,{content:e})},reloadPage:function(e){return r.router.load(o,{url:e,reload:!0})},reloadContent:function(e){return r.router.load(o,{content:e,reload:!0})},reloadPreviousPage:function(e){return r.router.load(o,{url:e,reloadPrevious:!0,reload:!0})},reloadPreviousContent:function(e){return r.router.load(o,{content:e,reloadPrevious:!0,reload:!0})},refreshPage:function(){var e={url:o.url,reload:!0,ignoreCache:!0};return e.url&&0===e.url.indexOf("#")&&(o.params.domCache&&o.pagesCache[e.url]?(e.pageName=o.pagesCache[e.url],e.url=void 0,delete e.url):o.contentCache[e.url]&&(e.content=o.contentCache[e.url],e.url=void 0,delete e.url)),r.router.load(o,e)},refreshPreviousPage:function(){var e={url:o.history[o.history.length-2],reload:!0,reloadPrevious:!0,ignoreCache:!0};return e.url&&0===e.url.indexOf("#")&&o.params.domCache&&o.pagesCache[e.url]&&(e.pageName=o.pagesCache[e.url],e.url=void 0,delete e.url),r.router.load(o,e)}},o.loadPage=o.router.loadPage,o.loadContent=o.router.loadContent,o.reloadPage=o.router.reloadPage,o.reloadContent=o.router.reloadContent,o.reloadPreviousPage=o.router.reloadPreviousPage,o.reloadPreviousContent=o.router.reloadPreviousContent,o.refreshPage=o.router.refreshPage,o.refreshPreviousPage=o.router.refreshPreviousPage,o.back=o.router.back,o.hideNavbar=function(e){return r.hideNavbar(l.find(".navbar"),e)},o.showNavbar=function(e){return r.showNavbar(l.find(".navbar"),e)},o.hideToolbar=function(e){return r.hideToolbar(l.find(".toolbar"),e)},o.showToolbar=function(e){return r.showToolbar(l.find(".toolbar"),e)},r.params.pushState&&r.params.pushStateOnLoad&&o.main){var H,R=c.split(u)[1];h?H=c.split(r.params.pushStateRoot+u)[1]:u&&c.indexOf(u)>=0&&c.indexOf(u+"#")<0&&(H=R);var V=!r.params.pushStateNoAnimation&&void 0,Y=history.state;H?H.indexOf("#")>=0&&o.params.domCache&&Y&&Y.pageName&&"viewIndex"in Y?r.router.load(o,{pageName:Y.pageName,url:Y.url,animatePages:V,pushState:!1}):H.indexOf("#")>=0&&o.params.domCache&&o.initialPagesUrl.indexOf(H)>=0?r.router.load(o,{pageName:H.replace("#",""),animatePages:V,pushState:!1}):r.router.load(o,{url:H,animatePages:V,pushState:!1}):o.params.domCache&&c.indexOf(u+"#")>=0&&(Y&&Y.pageName&&"viewIndex"in Y?r.router.load(o,{pageName:Y.pageName,url:Y.url,animatePages:V,pushState:!1}):u&&0===R.indexOf("#")&&o.initialPagesUrl.indexOf(R)&&r.router.load(o,{pageName:R.replace("#",""),animatePages:V,pushState:!1}))}return o.destroy=function(){o.detachEvents(),o.main?(r.mainView=null,delete r.mainView,r.views.main=null,delete r.views.main):o.params.name&&(r[o.params.name+"View"]=null,delete r[o.params.name+"View"],r.views[o.params.name]=null,delete r.views[o.params.name]),l.removeAttr("data-page"),l[0].f7View=null,delete l[0].f7View,r.views.splice(r.views.indexOf(o),1);for(var e in o)o.hasOwnProperty(e)&&(o[e]=null,delete o[e]);o=null},r.pluginHook("addView",o),o};r.addView=function(e,a){return new o(e,a)},r.getCurrentView=function(e){var a=i(".popover.modal-in .view"),t=i(".popup.modal-in .view"),r=i(".panel.active .view"),n=i(".views"),s=n.children(".view");if(s.length>1&&s.hasClass("tab")&&(s=n.children(".view.active")),a.length>0&&a[0].f7View)return a[0].f7View;if(t.length>0&&t[0].f7View)return t[0].f7View;if(r.length>0&&r[0].f7View)return r[0].f7View;if(s.length>0){if(1===s.length&&s[0].f7View)return s[0].f7View;if(s.length>1){for(var o=[],l=0;l0&&void 0!==e)return o[e];if(o.length>1)return o;if(1===o.length)return o[0];return}}},r.navbarInitCallback=function(e,a,t,n){if(!t&&n&&(t=i(n).parent(".navbar")[0]),n&&(!n.f7NavbarInitialized||!e||e.params.domCache)){var s={container:t,innerContainer:n},o=a&&a.f7PageData,l={page:o,navbar:s};if(n.f7NavbarInitialized&&(e&&e.params.domCache||!e&&i(t).parents(".popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal").length>0))return r.reinitNavbar(t,n),r.pluginHook("navbarReinit",l),void i(n).trigger("navbarReinit navbar:reinit",l);n.f7NavbarInitialized=!0,r.pluginHook("navbarBeforeInit",s,o),i(n).trigger("navbarBeforeInit navbar:beforeinit",l),r.initNavbar(t,n),r.pluginHook("navbarInit",s,o),i(n).trigger("navbarInit navbar:init",l)}},r.navbarRemoveCallback=function(e,a,t,n){!t&&n&&(t=i(n).parent(".navbar")[0]);var s,o={container:t,innerContainer:n};a&&(s=a.f7PageData);var l={page:s,navbar:o};r.pluginHook("navbarBeforeRemove",o,s),i(n).trigger("navbarBeforeRemove navbar:beforeremove",l),o=null,s=null},r.initNavbar=function(e,a){r.initSearchbar&&r.initSearchbar(a)},r.reinitNavbar=function(e,a){},r.initNavbarWithCallback=function(e){e=i(e);var a,t=e.parents("."+r.params.viewClass);0!==t.length&&(0===e.parents(".navbar-through").length&&0===t.find(".navbar-through").length||(a=t[0].f7View||void 0,e.find(".navbar-inner").each(function(){var n,s=this;if(i(s).attr("data-page")&&(n=t.find('.page[data-page="'+i(s).attr("data-page")+'"]')[0]),!n){var o=t.find(".page");1===o.length?n=o[0]:t.find(".page").each(function(){this.f7PageData&&this.f7PageData.navbarInnerContainer===s&&(n=this)})}r.navbarInitCallback(a,n,e[0],s)})))},r.sizeNavbars=function(e){if(!r.params.material){(e?i(e).find(".navbar .navbar-inner:not(.cached)"):i(".navbar .navbar-inner:not(.cached)")).each(function(){var e=i(this);if(!e.hasClass("cached")){var a,t,n=r.rtl?e.find(".right"):e.find(".left"),s=r.rtl?e.find(".left"):e.find(".right"),o=e.find(".center"),l=e.find(".subnavbar"),p=0===n.length,d=0===s.length,c=p?0:n.outerWidth(!0),m=d?0:s.outerWidth(!0),u=o.outerWidth(!0),h=e.styles(),f=e[0].offsetWidth-parseInt(h.paddingLeft,10)-parseInt(h.paddingRight,10),g=e.hasClass("navbar-on-left");d&&(a=f-u),p&&(a=0),p||d||(a=(f-m-u+c)/2);var v=(f-u)/2;f-c-m>u?(vf-m&&(v=f-m-u),t=v-a):t=0;var b=r.rtl?-1:1;if(o.hasClass("sliding")&&(o[0].f7NavbarLeftOffset=-(a+t)*b,o[0].f7NavbarRightOffset=(f-a-t-u)*b,g)){if(r.params.animateNavBackIcon){var w=e.parent().find(".navbar-on-center").find(".left.sliding .back .icon ~ span");w.length>0&&(o[0].f7NavbarLeftOffset+=w[0].offsetLeft)}o.transform("translate3d("+o[0].f7NavbarLeftOffset+"px, 0, 0)")}!p&&n.hasClass("sliding")&&(r.rtl?(n[0].f7NavbarLeftOffset=-(f-n[0].offsetWidth)/2*b,n[0].f7NavbarRightOffset=c*b):(n[0].f7NavbarLeftOffset=-c,n[0].f7NavbarRightOffset=(f-n[0].offsetWidth)/2,r.params.animateNavBackIcon&&n.find(".back .icon").length>0&&(n[0].f7NavbarRightOffset-=n.find(".back .icon")[0].offsetWidth)),g&&n.transform("translate3d("+n[0].f7NavbarLeftOffset+"px, 0, 0)")),!d&&s.hasClass("sliding")&&(r.rtl?(s[0].f7NavbarLeftOffset=-m*b,s[0].f7NavbarRightOffset=(f-s[0].offsetWidth)/2*b):(s[0].f7NavbarLeftOffset=-(f-s[0].offsetWidth)/2,s[0].f7NavbarRightOffset=m),g&&s.transform("translate3d("+s[0].f7NavbarLeftOffset+"px, 0, 0)")),l.length&&l.hasClass("sliding")&&(l[0].f7NavbarLeftOffset=r.rtl?l[0].offsetWidth:-l[0].offsetWidth,l[0].f7NavbarRightOffset=-l[0].f7NavbarLeftOffset);var C=t;r.rtl&&p&&d&&o.length>0&&(C=-C),o.css({left:C+"px"})}})}},r.hideNavbar=function(e,a){return void 0===a&&(a=!0),i(e).addClass("navbar-hidden"+(a?"":" not-animated")),!0},r.showNavbar=function(e,a){void 0===a&&(a=!0);var t=i(e);return a?(t.removeClass("not-animated"),t.addClass("navbar-hiding").removeClass("navbar-hidden").transitionEnd(function(){t.removeClass("navbar-hiding")})):t.removeClass("navbar-hidden navbar-hiding not-animated"),!0},r.hideToolbar=function(e,a){return void 0===a&&(a=!0),i(e).addClass("toolbar-hidden"+(a?"":" not-animated")),!0},r.showToolbar=function(e,a){void 0===a&&(a=!0);var t=i(e);a?(t.removeClass("not-animated"),t.addClass("toolbar-hiding").removeClass("toolbar-hidden").transitionEnd(function(){t.removeClass("toolbar-hiding"+(a?"":" not-animated"))})):t.removeClass("toolbar-hidden toolbar-hiding not-animated")};var l=function(e,a){function t(e){e.preventDefault()}var n={input:null,clearButton:null,cancelButton:null,searchList:null,searchIn:".item-title",searchBy:"",found:null,notFound:null,overlay:null,ignore:".searchbar-ignore",customSearch:!1,removeDiacritics:!1,hideDividers:!0,hideGroups:!0};a=a||{};for(var s in n)(void 0===a[s]||null===a[s]&&n.hasOwnProperty(s))&&(a[s]=n[s]);var o=this;o.material=r.params.material,o.params=a,e=i(e),o.container=e,o.active=!1,o.input=o.params.input?i(o.params.input):o.container.find('input[type="search"]'),o.clearButton=o.params.clearButton?i(o.params.clearButton):o.container.find(".searchbar-clear"),o.cancelButton=o.params.cancelButton?i(o.params.cancelButton):o.container.find(".searchbar-cancel"),o.searchList=i(o.params.searchList),o.isVirtualList=o.searchList.hasClass("virtual-list"),o.pageContainer=o.container.parents(".page").eq(0),o.params.overlay?o.overlay=i(o.params.overlay):o.overlay=o.pageContainer.length>0?o.pageContainer.find(".searchbar-overlay"):i(".searchbar-overlay"),o.params.found?o.found=i(o.params.found):o.found=o.pageContainer.length>0?o.pageContainer.find(".searchbar-found"):i(".searchbar-found"),o.params.notFound?o.notFound=i(o.params.notFound):o.notFound=o.pageContainer.length>0?o.pageContainer.find(".searchbar-not-found"):i(".searchbar-not-found");var l=r.rtl?"margin-left":"margin-right",p=!1;o.setCancelButtonMargin=function(){o.cancelButton.transition(0).show(),o.cancelButton.css(l,-o.cancelButton[0].offsetWidth+"px");o.cancelButton[0].clientLeft;o.cancelButton.transition(""),p=!0},o.triggerEvent=function(e,a,t){o.container.trigger(e,t),o.searchList.length>0&&o.searchList.trigger(e,t),a&&o.params[a]&&o.params[a](o,t)},o.enable=function(e){function a(){!o.searchList.length&&!o.params.customSearch||o.container.hasClass("searchbar-active")||o.query||o.overlay.addClass("searchbar-overlay-active"),o.container.addClass("searchbar-active"),o.cancelButton.length>0&&!o.material&&(p||o.setCancelButtonMargin(),o.cancelButton.css(l,"0px")),o.triggerEvent("enableSearch searchbar:enable","onEnable"),o.active=!0}r.device.ios&&!r.params.material&&e&&"focus"===e.type?setTimeout(function(){a()},400):a()},o.disable=function(){function e(){o.input.blur()}o.input.val("").trigger("change"),o.container.removeClass("searchbar-active searchbar-not-empty"),o.cancelButton.length>0&&!o.material&&o.cancelButton.css(l,-o.cancelButton[0].offsetWidth+"px"),(o.searchList.length||o.params.customSearch)&&o.overlay.removeClass("searchbar-overlay-active"),o.active=!1,r.device.ios?setTimeout(function(){e()},400):e(),o.triggerEvent("disableSearch searchbar:disable","onDisable")},o.clear=function(e){if(!o.query&&e&&i(e.target).hasClass("searchbar-clear"))return void o.disable();var a=o.value;o.input.val("").trigger("change").focus(),o.triggerEvent("clearSearch searchbar:clear","onClear",{previousQuery:a})},o.handleInput=function(){setTimeout(function(){var e=o.input.val().trim();(o.searchList.length>0||o.params.customSearch)&&(o.params.searchIn||o.isVirtualList)&&o.search(e,!0)},0)};var d,c="";return o.search=function(e,a){if(!c||e.trim()!==c){if(c=e.trim(),a||(o.active||o.enable(),o.input.val(e)),o.query=o.value=e,0===e.length?(o.container.removeClass("searchbar-not-empty"),o.searchList.length&&o.container.hasClass("searchbar-active")&&o.overlay.addClass("searchbar-overlay-active")):(o.container.addClass("searchbar-not-empty"),o.searchList.length&&o.container.hasClass("searchbar-active")&&o.overlay.removeClass("searchbar-overlay-active")),o.params.customSearch)return void o.triggerEvent("search searchbar:search","onSearch",{query:e});var t,r=[];if(o.isVirtualList){if(d=o.searchList[0].f7VirtualList,""===e.trim())return d.resetFilter(),o.notFound.hide(),void o.found.show();if(t=o.params.removeDiacritics?i.removeDiacritics(e):e,d.params.searchAll)r=d.params.searchAll(t,d.items)||[];else if(d.params.searchByItem)for(var n=0;n=0&&n++;n===s.length||o.params.ignore&&a.is(o.params.ignore)?r.push(a[0]):a.addClass("hidden-by-searchbar")}),o.params.hideDividers&&o.searchList.find(".item-divider, .list-group-title").each(function(){for(var e=i(this),a=e.nextAll("li"),t=!0,r=0;re){var r=t+a,n=s.initialBarHeight+(r-s.initialAreaHeight),i=s.params.maxHeight||s.container.parents(".view")[0].offsetHeight-88;n>i&&(n=parseInt(i,10),r=n-s.initialBarHeight+s.initialAreaHeight),s.textarea.css("height",r+"px"),s.container.css("height",n+"px");var o=s.pageContent[0].scrollTop===s.pageContent[0].scrollHeight-s.pageContent[0].offsetHeight;s.pageContent.length>0&&(s.pageContent.css("padding-bottom",n+"px"),0===s.pageContent.find(".messages-new-first").length&&o&&s.pageContent.scrollTop(s.pageContent[0].scrollHeight-s.pageContent[0].offsetHeight))}else s.pageContent.length>0&&(s.container.css({height:"",bottom:""}),s.pageContent.css({"padding-bottom":""}))},s.clear=function(){s.textarea.val("").trigger("change")},s.value=function(e){if(void 0===e)return s.textarea.val();s.textarea.val(e).trigger("change")},s.textareaTimeout=void 0,s.handleTextarea=function(e){clearTimeout(s.textareaTimeout),s.textareaTimeout=setTimeout(function(){s.sizeTextarea()},0)},s.attachEvents=function(e){var a=e?"off":"on";s.container[a]("submit",t),s.textarea[a]("change keydown keypress keyup paste cut",s.handleTextarea)},s.detachEvents=function(){s.attachEvents(!0)},s.init=function(){s.attachEvents()},s.destroy=function(){s.detachEvents(),s=null},s.init(), +s.container[0].f7Messagebar=s,s};r.messagebar=function(e,a){return new p(e,a)},r.initPageMessagebar=function(e){function a(){n.destroy(),e.off("page:beforeremove",a)}e=i(e);var t=e.hasClass("messagebar")?e:e.find(".messagebar");if(0!==t.length&&t.hasClass("messagebar-init")){var n=r.messagebar(t,t.dataset());e.hasClass("page")&&e.on("page:beforeremove",a)}},r.cache=[],r.removeFromCache=function(e){for(var a=!1,t=0;t=0&&(s=e.split("?")[0]),r.params.cache&&!t&&e.indexOf("nocache")<0&&r.params.cacheIgnore.indexOf(s)<0)for(var o=0;o=200&&e.status<300||0===e.status?(r.params.cache&&""!==e.responseText&&(r.removeFromCache(s),r.cache.push({url:s,time:(new Date).getTime(),content:e.responseText})),n(e.responseText,!1)):n(e.responseText,!0),r.params.onAjaxComplete&&r.params.onAjaxComplete(e)},error:function(e){n(e.responseText,!0),r.params.onAjaxError&&r.params.onAjaxError(e)}}),a&&(a.xhr=r.xhr),r.xhr},r.pageCallbacks={},r.onPage=function(e,a,t){if(a&&a.split(" ").length>1){for(var n=a.split(" "),i=[],s=0;s0?i.parseUrlQuery(a.url||""):t.f7PageData&&t.f7PageData.query?t.f7PageData.query:{});var s={container:t,url:a.url,query:n,name:i(t).attr("data-page"),view:e,from:a.position,context:a.context,navbarInnerContainer:a.navbarInnerContainer,fromPage:a.fromPage};if(a.fromPage&&!a.fromPage.navbarInnerContainer&&a.oldNavbarInnerContainer&&(a.fromPage.navbarInnerContainer=a.oldNavbarInnerContainer),t.f7PageInitialized&&(e&&e.params.domCache||!e&&i(t).parents(".popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal").length>0))return r.reinitPage(t),r.pluginHook("pageReinit",s),r.params.onPageReinit&&r.params.onPageReinit(r,s),r.triggerPageCallbacks("reinit",s.name,s),void i(s.container).trigger("pageReinit page:reinit",{page:s});t.f7PageInitialized=!0,t.f7PageData=s,!e||a.preloadOnly||a.reloadPrevious||(i(e.container).attr("data-page",s.name),e.activePage=s),r.pluginHook("pageBeforeInit",s),r.params.onPageBeforeInit&&r.params.onPageBeforeInit(r,s),r.triggerPageCallbacks("beforeInit",s.name,s),i(s.container).trigger("pageBeforeInit page:beforeinit",{page:s}),r.initPage(t),r.pluginHook("pageInit",s),r.params.onPageInit&&r.params.onPageInit(r,s),r.triggerPageCallbacks("init",s.name,s),i(s.container).trigger("pageInit page:init",{page:s})}},r.pageRemoveCallback=function(e,a,t){var n;if(a){a.f7PageData&&(n=a.f7PageData.context);var s={container:a,name:i(a).attr("data-page"),view:e,url:a.f7PageData&&a.f7PageData.url,query:a.f7PageData&&a.f7PageData.query,navbarInnerContainer:a.f7PageData&&a.f7PageData.navbarInnerContainer,from:t,context:n};r.pluginHook("pageBeforeRemove",s),r.params.onPageBeforeRemove&&r.params.onPageBeforeRemove(r,s),r.triggerPageCallbacks("beforeRemove",s.name,s),i(s.container).trigger("pageBeforeRemove page:beforeremove",{page:s}),s=null}},r.pageBackCallback=function(e,a,t){var n,s=t.pageContainer;if(s){s.f7PageData&&(n=s.f7PageData.context);var o={container:s,name:i(s).attr("data-page"),url:s.f7PageData&&s.f7PageData.url,query:s.f7PageData&&s.f7PageData.query,view:a,from:t.position,context:n,navbarInnerContainer:s.f7PageData&&s.f7PageData.navbarInnerContainer,swipeBack:t.swipeBack};"after"===e&&(r.pluginHook("pageAfterBack",o),r.params.onPageAfterBack&&r.params.onPageAfterBack(r,o),r.triggerPageCallbacks("afterBack",o.name,o),i(s).trigger("pageAfterBack page:afterback",{page:o})),"before"===e&&(r.pluginHook("pageBack",o),r.params.onPageBack&&r.params.onPageBack(r,o),r.triggerPageCallbacks("back",o.name,o),i(o.container).trigger("pageBack page:back",{page:o}))}},r.pageAnimCallback=function(e,a,t){var n,s=t.pageContainer;if(s){s.f7PageData&&(n=s.f7PageData.context);var o=t.query;o||(o=t.url&&t.url.indexOf("?")>0?i.parseUrlQuery(t.url||""):s.f7PageData&&s.f7PageData.query?s.f7PageData.query:{});var l={container:s,url:t.url,query:o,name:i(s).attr("data-page"),view:a,from:t.position,context:n,swipeBack:t.swipeBack,navbarInnerContainer:s.f7PageData&&s.f7PageData.navbarInnerContainer,fromPage:t.fromPage},p=t.oldPage,d=t.newPage;if(s.f7PageData=l,"after"===e&&(r.pluginHook("pageAfterAnimation",l),r.params.onPageAfterAnimation&&r.params.onPageAfterAnimation(r,l),r.triggerPageCallbacks("afterAnimation",l.name,l),i(l.container).trigger("pageAfterAnimation page:afteranimation",{page:l})),"before"===e){i(a.container).attr("data-page",l.name),a&&(a.activePage=l),d.hasClass("no-navbar")&&!p.hasClass("no-navbar")&&a.hideNavbar(),d.hasClass("no-navbar")||!p.hasClass("no-navbar")&&!p.hasClass("no-navbar-by-scroll")||a.showNavbar(),d.hasClass("no-toolbar")&&!p.hasClass("no-toolbar")&&a.hideToolbar(),d.hasClass("no-toolbar")||!p.hasClass("no-toolbar")&&!p.hasClass("no-toolbar-by-scroll")||a.showToolbar();var c;d.hasClass("no-tabbar")&&!p.hasClass("no-tabbar")&&(c=i(a.container).find(".tabbar"),0===c.length&&(c=i(a.container).parents("."+r.params.viewsClass).find(".tabbar")),r.hideToolbar(c)),d.hasClass("no-tabbar")||!p.hasClass("no-tabbar")&&!p.hasClass("no-tabbar-by-scroll")||(c=i(a.container).find(".tabbar"),0===c.length&&(c=i(a.container).parents("."+r.params.viewsClass).find(".tabbar")),r.showToolbar(c)),p.removeClass("no-navbar-by-scroll no-toolbar-by-scroll"),r.pluginHook("pageBeforeAnimation",l),r.params.onPageBeforeAnimation&&r.params.onPageBeforeAnimation(r,l),r.triggerPageCallbacks("beforeAnimation",l.name,l),i(l.container).trigger("pageBeforeAnimation page:beforeanimation",{page:l})}}},r.initPage=function(e){e=i(e),0!==e.length&&(r.sizeNavbars&&r.sizeNavbars(e.parents("."+r.params.viewClass)[0]),r.initPageMessages&&r.initPageMessages(e),r.initFormsStorage&&r.initFormsStorage(e),r.initSmartSelects&&r.initSmartSelects(e),r.initPageSwiper&&r.initPageSwiper(e),r.initPullToRefresh&&r.initPullToRefresh(e),r.initPageInfiniteScroll&&r.initPageInfiniteScroll(e),r.initSearchbar&&r.initSearchbar(e),r.initPageMessagebar&&r.initPageMessagebar(e),r.initPageScrollToolbars&&r.initPageScrollToolbars(e),r.initImagesLazyLoad&&r.initImagesLazyLoad(e),r.initPageProgressbar&&r.initPageProgressbar(e),r.initPageResizableTextarea&&r.initPageResizableTextarea(e),r.initPageDataTables&&r.initPageDataTables(e),r.params.material&&r.initPageMaterialPreloader&&r.initPageMaterialPreloader(e),r.params.material&&r.initPageMaterialInputs&&r.initPageMaterialInputs(e),r.params.material&&r.initPageMaterialTabbar&&r.initPageMaterialTabbar(e))},r.reinitPage=function(e){e=i(e),0!==e.length&&(r.sizeNavbars&&r.sizeNavbars(e.parents("."+r.params.viewClass)[0]),r.reinitPageSwiper&&r.reinitPageSwiper(e),r.reinitLazyLoad&&r.reinitLazyLoad(e))},r.initPageWithCallback=function(e){e=i(e);var a=e.parents("."+r.params.viewClass);if(0!==a.length){var t=a[0].f7View||void 0,n=t&&t.url?t.url:void 0;a&&e.attr("data-page")&&a.attr("data-page",e.attr("data-page")),r.pageInitCallback(t,{pageContainer:e[0],url:n,position:"center"})}},r.router={_remove:function(e){r.params.routerRemoveTimeout||r.params.routerRemoveWithTimeout?setTimeout(function(){i(e).remove()},0):i(e).remove()},_modalsSelector:".popup, .modal, .popover, .actions-modal, .picker-modal, .login-screen",temporaryDom:document.createElement("div"),findElement:function(e,a,t,n){a=i(a),n&&(e+=":not(.cached)");var s=a.find(e).filter(function(e,a){return 0===i(a).parents(r.router._modalsSelector).length});return s.length>1&&("string"==typeof t.selector&&(s=a.find(t.selector+" "+e)),s.length>1&&(s=a.find("."+r.params.viewMainClass+" "+e))),1===s.length?s:(n||(s=r.router.findElement(e,a,t,!0)),s&&1===s.length?s:s&&s.length>1?i(s[0]):void 0)},animatePages:function(e,a,t){var r="page-on-center page-on-right page-on-left";"to-left"===t&&(e.removeClass(r).addClass("page-from-center-to-left"),a.removeClass(r).addClass("page-from-right-to-center")),"to-right"===t&&(e.removeClass(r).addClass("page-from-left-to-center"),a.removeClass(r).addClass("page-from-center-to-right"))},prepareNavbar:function(e,a,t){i(e).find(".sliding").each(function(){var e=i(this),a="right"===t?this.f7NavbarRightOffset:this.f7NavbarLeftOffset;r.params.animateNavBackIcon&&e.hasClass("left")&&e.find(".back .icon").length>0&&e.find(".back .icon").transform("translate3d("+-a+"px,0,0)"),e.transform("translate3d("+a+"px,0,0)")})},animateNavbars:function(e,a,t){var n="navbar-on-right navbar-on-center navbar-on-left";"to-left"===t&&(a.removeClass(n).addClass("navbar-from-right-to-center"),a.find(".sliding").each(function(){var e=i(this);e.transform("translate3d(0px,0,0)"),r.params.animateNavBackIcon&&e.hasClass("left")&&e.find(".back .icon").length>0&&e.find(".back .icon").transform("translate3d(0px,0,0)")}),e.removeClass(n).addClass("navbar-from-center-to-left"),e.find(".sliding").each(function(){var e,t=i(this);r.params.animateNavBackIcon&&(t.hasClass("center")&&a.find(".sliding.left .back .icon").length>0&&(e=a.find(".sliding.left .back span"),e.length>0&&(this.f7NavbarLeftOffset+=e[0].offsetLeft)),t.hasClass("left")&&t.find(".back .icon").length>0&&t.find(".back .icon").transform("translate3d("+-this.f7NavbarLeftOffset+"px,0,0)")),t.transform("translate3d("+this.f7NavbarLeftOffset+"px,0,0)")})),"to-right"===t&&(e.removeClass(n).addClass("navbar-from-left-to-center"),e.find(".sliding").each(function(){var e=i(this);e.transform("translate3d(0px,0,0)"),r.params.animateNavBackIcon&&e.hasClass("left")&&e.find(".back .icon").length>0&&e.find(".back .icon").transform("translate3d(0px,0,0)")}),a.removeClass(n).addClass("navbar-from-center-to-right"),a.find(".sliding").each(function(){var e=i(this);r.params.animateNavBackIcon&&e.hasClass("left")&&e.find(".back .icon").length>0&&e.find(".back .icon").transform("translate3d("+-this.f7NavbarRightOffset+"px,0,0)"),e.transform("translate3d("+this.f7NavbarRightOffset+"px,0,0)")}))},preprocess:function(e,a,t,n){r.pluginHook("routerPreprocess",e,a,t,n),a=r.pluginProcess("preprocess",a),e&&e.params&&e.params.preprocess?void 0!==(a=e.params.preprocess(a,t,n))&&n(a):r.params.preprocess?void 0!==(a=r.params.preprocess(a,t,n))&&n(a):n(a)},preroute:function(e,a,t){return t&&(a.isBack=!0),r.pluginHook("routerPreroute",e,a),!!(r.params.preroute&&!1===r.params.preroute(e,a)||e&&e.params.preroute&&!1===e.params.preroute(e,a))},template7Render:function(e,a){var t,n,o=a.url,l=a.content,p=a.content,d=a.context,c=a.contextName,m=a.template;if("string"==typeof l?o?r.template7Cache[o]&&!a.ignoreCache?n=s.cache[o]:(n=s.compile(l),s.cache[o]=n):n=s.compile(l):m&&(n=m),d)t=d,d&&o&&(e.contextCache[o]=d);else{if(c)if(c.indexOf(".")>=0){for(var u=c.split("."),h=s.data[u[0]],f=1;f1)for(var P=0;P1){for(l=0;l1&&(s=s.filter(function(e,a){if(a!==k)return a})),(e.params.domCache||k)&&n.removeClass("cached"),e.params.dynamicNavbar)if(m=!0,d=b?w.find('.navbar-inner[data-page="'+b+'"]'):r.router.findElement(".navbar-inner",r.router.temporaryDom,e),d&&0!==d.length||(d=n.find(".navbar-inner"),d&&0!==d.length?d.parent(".navbar").length>0&&d.prependTo(n):m=!1),m&&n.find(".navbar").length>0&&r.router._remove(n.find(".navbar").filter(function(e,a){return 0===i(a).parents(r.router._modalsSelector).length})),c=w.children(".navbar"),a.reload)p=c.find(".navbar-inner:not(.cached):last-child");else if(p=c.find(".navbar-inner:not(.cached)"),p.length>0){for(l=0;l=0?(s.addClass("cached"),m&&p.addClass("cached")):(r.pageRemoveCallback(e,s[0],u),m&&r.navbarRemoveCallback(e,s[0],c[0],p[0]),r.router._remove(s),m&&r.router._remove(p))),r.pageInitCallback(e,{pageContainer:n[0],url:h,position:a.reload?u:"right",navbarInnerContainer:m?d&&d[0]:void 0,oldNavbarInnerContainer:m?p&&p[0]:void 0,context:g.context||a.context,query:a.query,fromPage:s&&s.length&&s[0].f7PageData,reload:a.reload,reloadPrevious:a.reloadPrevious}),m&&r.navbarInitCallback(e,n[0],c[0],d[0],h,a.reload?u:"right"),a.reload)return e.allowPageChange=!0,void(O&&e.refreshPreviousPage());m&&y&&r.router.prepareNavbar(d,p,"right");n[0].clientLeft;r.pageAnimCallback("before",e,{pageContainer:n[0],url:h,position:"right",oldPage:s,newPage:n,query:a.query,fromPage:s&&s.length&&s[0].f7PageData}),y?(r.params.material&&r.params.materialPageLoadDelay?setTimeout(function(){r.router.animatePages(s,n,"to-left",e)},r.params.materialPageLoadDelay):r.router.animatePages(s,n,"to-left",e),m&&setTimeout(function(){r.router.animateNavbars(p,d,"to-left",e)},0),n.animationEnd(function(){t()})):(m&&d.find(".sliding, .sliding .back .icon").transform(""),t())},r.router.load=function(e,a){function t(t){r.router.preprocess(e,t,n,function(t){a.content=t,r.router._load(e,a)})}if(a=a||{},r.routerPreOptions&&(a=r.routerPreOptions(e,a)||{}),!a.component||!r.componentLoader){if(r.router.preroute(e,a))return!1;var n=a.url,s=a.content,o=a.pageName,l=a.pageElement;o&&o.indexOf("?")>0&&(a.query=i.parseUrlQuery(o),a.pageName=o=o.split("?")[0]);var p=a.template;return!0===e.params.reloadPages&&(a.reload=!0),e.allowPageChange?!(n&&e.url===n&&!a.reload&&!e.params.allowDuplicateUrls)&&(e.allowPageChange=!1,r.xhr&&e.xhr&&e.xhr===r.xhr&&(r.xhr.abort(),r.xhr=!1),s||o||l?void t(s):p?void r.router._load(e,a):a.url&&"#"!==a.url?void r.get(a.url,e,a.ignoreCache,function(a,r){if(r)return void(e.allowPageChange=!0);t(a)}):void(e.allowPageChange=!0)):!1}try{r.componentLoader(e,a,function(a){r.router.load(e,a)})}catch(e){}},r.router._back=function(e,a){function t(){r.pageBackCallback("after",e,{pageContainer:l[0],url:f,position:"center",oldPage:l,newPage:p}),r.pageAnimCallback("after",e,{pageContainer:p[0],url:f,position:"left",oldPage:l,newPage:p,query:a.query,fromPage:l&&l.length&&l[0].f7PageData}),r.router.afterBack(e,l[0],p[0])}function n(){r.pageBackCallback("before",e,{pageContainer:l[0],url:f,position:"center",oldPage:l,newPage:p}),r.pageAnimCallback("before",e,{pageContainer:p[0],url:f,position:"left",oldPage:l,newPage:p,query:a.query,fromPage:l&&l.length&&l[0].f7PageData}),w?(r.router.animatePages(p,l,"to-right",e),h&&setTimeout(function(){r.router.animateNavbars(c,d,"to-right",e)},0),p.animationEnd(function(){t()})):(h&&c.find(".sliding, .sliding .back .icon").transform(""),t())}function s(){if(r.router.temporaryDom.innerHTML="","string"==typeof g||f&&"string"==typeof g)r.router.temporaryDom.innerHTML=v.content;else if("length"in g&&g.length>1)for(var a=0;a=0)t.length&&t[0]!==p[0]&&t.addClass("cached"),h&&s.length&&s[0]!==c[0]&&s.addClass("cached");else{var o=h&&s.length;t.length?(r.pageRemoveCallback(e,t[0],"right"),o&&r.navbarRemoveCallback(e,t[0],m[0],s[0]),r.router._remove(t),o&&r.router._remove(s)):o&&(r.navbarRemoveCallback(e,t[0],m[0],s[0]),r.router._remove(s))}M=S.children(".page:not(.cached)"),h&&(u=P.children(".navbar").find(".navbar-inner:not(.cached)")),e.history.indexOf(f)>=0?e.history=e.history.slice(0,e.history.indexOf(f)+2):e.history[[e.history.length-2]]?e.history[e.history.length-2]=f:e.history.unshift(f)}if(l=i(M[M.length-1]),e.params.domCache&&l[0]===p[0]&&(l=S.children(".page.page-on-center"),0===l.length&&e.activePage&&(l=i(e.activePage.container))),h&&!d&&(d=i(u[u.length-1]),e.params.domCache&&(d[0]===c[0]&&(d=m.children(".navbar-inner.navbar-on-center:not(.cached)")),0===d.length&&(d=m.children('.navbar-inner[data-page="'+l.attr("data-page")+'"]'))),0!==d.length&&c[0]!==d[0]||(h=!1)),h&&(I&&c.insertBefore(d),c[0].f7RelatedPage=p[0],p[0].f7RelatedNavbar=c[0]),I&&p.insertBefore(l),r.pageInitCallback(e,{pageContainer:p[0],url:f,position:"left",navbarInnerContainer:h?c[0]:void 0,oldNavbarInnerContainer:h?d&&d[0]:void 0,context:v.context,query:a.query,fromPage:l&&l.length&&l[0].f7PageData,preloadOnly:C}),h&&r.navbarInitCallback(e,p[0],m[0],c[0],f,"right"),h&&c.hasClass("navbar-on-left")&&w&&r.router.prepareNavbar(c,d,"left"),C)return void(e.allowPageChange=!0);e.url=f;p[0].clientLeft;n(),r.params.pushState&&e.main&&(void 0===y&&(y=!0),!C&&history.state&&y&&history.back())}a=a||{},r.pluginHook("routerBack",e,a);var l,p,d,c,m,u,h,f=a.url,g=a.content,v={content:a.content},b=a.template,w=a.animatePages,C=a.preloadOnly,y=a.pushState,x=(a.ignoreCache,a.force),T=a.pageName,k=a.pageElement,P=i(e.container),S=i(e.pagesContainer),M=S.children(".page:not(.cached)"),I=!0;return void 0===w&&(w=e.params.animatePages),(r.params.template7Pages&&"string"==typeof g||b)&&(v=r.router.template7Render(e,a),v.content&&!g&&(g=v.content)),M.length>1&&!x?C?void(e.allowPageChange=!0):(e.url=e.history[e.history.length-2],f=e.url,p=i(M[M.length-2]),l=i(M[M.length-1]),e.params.dynamicNavbar&&(h=!0,u=P.children(".navbar").find(".navbar-inner:not(.cached)"),c=i(u[0]),d=i(u[1]),0!==c.length&&0!==d.length&&d[0]!==c[0]||(h=!1)),I=!1,void o()):x?f&&f===e.url||T&&e.activePage&&e.activePage.name===T?void(e.allowPageChange=!0):g?(s(),void o()):T&&e.params.domCache?(T&&(f="#"+T),p=i(P).find('.page[data-page="'+T+'"]'),p[0].f7PageData&&p[0].f7PageData.url&&(f=p[0].f7PageData.url),e.params.dynamicNavbar&&(c=i(P).children(".navbar").find('.navbar-inner[data-page="'+T+'"]'),0===c.length&&p[0].f7RelatedNavbar&&(c=i(p[0].f7RelatedNavbar)),0===c.length&&p[0].f7PageData&&(c=i(p[0].f7PageData.navbarInnerContainer))),void o()):k&&f?(p=i(k),e.params.dynamicNavbar&&(c=p.find(".navbar-inner").filter(function(e,a){return 0===i(a).parents(r.router._modalsSelector).length}),c.length>0&&(p.prepend(c),r.router._remove(p.find(".navbar").filter(function(e,a){return 0===i(a).parents(r.router._modalsSelector).length})))),void o()):void(e.allowPageChange=!0):(C||(e.url=e.history[e.history.length-2],f=e.url),g?(s(),void o()):T?(p=i(P).find('.page[data-page="'+T+'"]'),e.params.dynamicNavbar&&(c=i(P).children(".navbar").find('.navbar-inner[data-page="'+T+'"]'),0===c.length&&p[0].f7RelatedNavbar&&(c=i(p[0].f7RelatedNavbar)),0===c.length&&p[0].f7PageData&&(c=i(p[0].f7PageData.navbarInnerContainer))),void o()):f&&f in e.pageElementsCache?(p=e.pageElementsCache[f].page,c=e.pageElementsCache[f].navbarInner,void o()):void(e.allowPageChange=!0))},r.router.back=function(e,a){function t(t){r.router.preprocess(e,t,n,function(t){a.content=t,r.router._back(e,a)})}if(a=a||{},r.routerPreOptions&&(a=r.routerPreOptions(e,a)||{}),a.component&&r.componentLoader)try{r.componentLoader(e,a,function(a){r.router.load(e,a)})}catch(e){}else{if(r.router.preroute(e,a,!0))return!1;var n=a.url,s=a.content,o=a.pageName,l=a.pageElement;o&&o.indexOf("?")>0&&(a.query=i.parseUrlQuery(o),a.pageName=o=o.split("?")[0]);var p=a.force;if(!e.allowPageChange)return!1;e.allowPageChange=!1,r.xhr&&e.xhr&&e.xhr===r.xhr&&(r.xhr.abort(),r.xhr=!1);if(i(e.pagesContainer).find(".page:not(.cached)").length>1&&!p)return void r.router._back(e,a);if(p){if(!n&&s)return void t(s);if(!n&&o)return o&&(n="#"+o),void t();if(n&&l)return void t();if(n)return void r.get(a.url,e,a.ignoreCache,function(a,r){if(r)return void(e.allowPageChange=!0);t(a)})}else{if(n=e.history[e.history.length-2]||a.url,a.url||(a.url=n),!n)return void(e.allowPageChange=!0);if(0===n.indexOf("#")&&e.contentCache[n])return void t(e.contentCache[n]);if(0===n.indexOf("#")&&e.params.domCache)return o||(a.pageName=n.split("#")[1]),void t();if(n&&n in e.pageElementsCache)t();else if(0!==n.indexOf("#"))return void r.get(a.url,e,a.ignoreCache,function(a,r){if(r)return void(e.allowPageChange=!0);t(a)})}e.allowPageChange=!0}},r.router.afterBack=function(e,a,t){a=i(a),t=i(t),e.params.domCache&&e.initialPages.indexOf(a[0])>=0?a.removeClass("page-from-center-to-right").addClass("cached"):(r.pageRemoveCallback(e,a[0],"right"),r.router._remove(a)),t.removeClass("page-from-left-to-center page-on-left").addClass("page-on-center"),e.allowPageChange=!0;var n,s=e.history.pop();if(e.params.dynamicNavbar){var o=i(e.container).children(".navbar").find(".navbar-inner:not(.cached)"),l=i(a[0].f7RelatedNavbar||o[1]);e.params.domCache&&e.initialNavbars.indexOf(l[0])>=0?l.removeClass("navbar-from-center-to-right").addClass("cached"):(r.navbarRemoveCallback(e,a[0],void 0,l[0]),r.router._remove(l)),n=i(o[0]).removeClass("navbar-on-left navbar-from-left-to-center").addClass("navbar-on-center")}if(e.params.domCache&&i(e.container).find(".page.cached").each(function(){var a=i(this),t=a[0].f7PageData&&a[0].f7PageData.url;t&&e.history.indexOf(t)<0&&e.initialPages.indexOf(this)<0&&(r.pageRemoveCallback(e,a[0],"right"),a[0].f7RelatedNavbar&&e.params.dynamicNavbar&&r.navbarRemoveCallback(e,a[0],void 0,a[0].f7RelatedNavbar),r.router._remove(a),a[0].f7RelatedNavbar&&e.params.dynamicNavbar&&r.router._remove(a[0].f7RelatedNavbar))}),!e.params.domCache&&s&&s.indexOf("#")>-1&&s in e.contentCache&&-1===e.history.indexOf(s)&&(e.contentCache[s]=null,delete e.contentCache[s]),s&&s in e.pageElementsCache&&-1===e.history.indexOf(s)&&(e.pageElementsCache[s]=null,delete e.pageElementsCache[s]),s&&s in e.contextCache&&-1===e.history.indexOf(s)&&(e.contextCache[s]=null,delete e.contextCache[s]),r.params.pushState&&e.main&&r.pushStateClearQueue(),e.params.preloadPreviousPage)if(e.params.domCache&&e.history.length>1){var p,d,c=e.history[e.history.length-2];c&&e.pagesCache[c]?(p=i(e.container).find('.page[data-page="'+e.pagesCache[c]+'"]'),p.next(".page")[0]!==t[0]&&p.insertBefore(t),n&&(d=i(e.container).children(".navbar").find('.navbar-inner[data-page="'+e.pagesCache[c]+'"]'),d&&0!==d.length||(d=n.prev(".navbar-inner.cached")),d.next(".navbar-inner")[0]!==n[0]&&d.insertBefore(n))):(p=t.prev(".page.cached"),n&&(d=n.prev(".navbar-inner.cached"))),p&&p.length>0&&p.removeClass("cached page-on-right page-on-center").addClass("page-on-left"),d&&d.length>0&&d.removeClass("cached navbar-on-right navbar-on-center").addClass("navbar-on-left")}else r.router.back(e,{preloadOnly:!0})};var m=document.createElement("div");r.modalStack=[],r.modalStackClearQueue=function(){r.modalStack.length&&r.modalStack.shift()()},r.modal=function(e){e=e||{};var a="";if(r.params.modalTemplate)r._compiledTemplates.modal||(r._compiledTemplates.modal=s.compile(r.params.modalTemplate)),a=r._compiledTemplates.modal(e);else{var t="";if(e.buttons&&e.buttons.length>0)for(var n=0;n'+e.buttons[n].text+"";var o=e.title?'":"",l=e.text?'":"",p=e.afterText?e.afterText:"",d=e.buttons&&0!==e.buttons.length?"":"modal-no-buttons",c=e.verticalButtons?"modal-buttons-vertical":"",u=e.buttons&&e.buttons.length>0?'":"";a='"}m.innerHTML=a;var h=i(m).children();return r.root.append(h[0]),h.find(".modal-button").each(function(a,t){i(t).on("click",function(t){!1!==e.buttons[a].close&&r.closeModal(h),e.buttons[a].onClick&&e.buttons[a].onClick(h,t),e.onClick&&e.onClick(h,a)})}),r.openModal(h),h[0]},r.alert=function(e,a,t){return"function"==typeof a&&(t=arguments[1],a=void 0),r.modal({text:e||"",title:void 0===a?r.params.modalTitle:a,buttons:[{text:r.params.modalButtonOk,bold:!0,onClick:t}]})},r.confirm=function(e,a,t,n){return"function"==typeof a&&(n=arguments[2],t=arguments[1],a=void 0),r.modal({text:e||"",title:void 0===a?r.params.modalTitle:a,buttons:[{text:r.params.modalButtonCancel,onClick:n},{text:r.params.modalButtonOk,bold:!0,onClick:t}]})},r.prompt=function(e,a,t,n){return"function"==typeof a&&(n=arguments[2],t=arguments[1],a=void 0),r.modal({text:e||"",title:void 0===a?r.params.modalTitle:a,afterText:'
                              ',buttons:[{text:r.params.modalButtonCancel},{text:r.params.modalButtonOk,bold:!0}],onClick:function(e,a){0===a&&n&&n(i(e).find(".modal-text-input").val()),1===a&&t&&t(i(e).find(".modal-text-input").val())}})},r.modalLogin=function(e,a,t,n){return"function"==typeof a&&(n=arguments[2],t=arguments[1],a=void 0),r.modal({text:e||"",title:void 0===a?r.params.modalTitle:a,afterText:'',buttons:[{text:r.params.modalButtonCancel},{text:r.params.modalButtonOk,bold:!0}],onClick:function(e,a){var r=i(e).find('.modal-text-input[name="modal-username"]').val(),s=i(e).find('.modal-text-input[name="modal-password"]').val();0===a&&n&&n(r,s),1===a&&t&&t(r,s)}})},r.modalPassword=function(e,a,t,n){return"function"==typeof a&&(n=arguments[2],t=arguments[1],a=void 0),r.modal({text:e||"",title:void 0===a?r.params.modalTitle:a, +afterText:'
                              ',buttons:[{text:r.params.modalButtonCancel},{text:r.params.modalButtonOk,bold:!0}],onClick:function(e,a){var r=i(e).find('.modal-text-input[name="modal-password"]').val();0===a&&n&&n(r),1===a&&t&&t(r)}})},r.showPreloader=function(e){return r.modal({title:e||r.params.modalPreloaderTitle,text:'
                              '+(r.params.material?r.params.materialPreloaderHtml:"")+"
                              ",cssClass:"modal-preloader"})},r.hidePreloader=function(){r.closeModal(".modal-preloader")},r.showIndicator=function(){i(".preloader-indicator-overlay").length>0||r.root.append('
                              '+(r.params.material?r.params.materialPreloaderHtml:"")+"
                              ")},r.hideIndicator=function(){i(".preloader-indicator-overlay, .preloader-indicator-modal").remove()},r.actions=function(e,a,t){var n,o,l,p=!1;1===arguments.length||2===arguments.length&&"boolean"==typeof arguments[1]?(a=arguments[0],t=arguments[1]):r.device.ios?r.device.ipad&&(p=!0):r.width>=768&&(p=!0),void 0===t&&(t=!0),a=a||[],a.length>0&&!Array.isArray(a[0])&&(a=[a]);var d;if(p){var c=r.params.modalActionsToPopoverTemplate||'
                              {{#each this}}
                                {{#each this}}{{#if label}}
                              • {{text}}
                              • {{else}}
                              • {{text}}
                              • {{/if}}{{/each}}
                              {{/each}}
                              ';r._compiledTemplates.actionsToPopover||(r._compiledTemplates.actionsToPopover=s.compile(c));var u=r._compiledTemplates.actionsToPopover(a);n=i(r.popover(u,e,!0,t)),o=".list-block ul",l=".list-button"}else{if(r.params.modalActionsTemplate)r._compiledTemplates.actions||(r._compiledTemplates.actions=s.compile(r.params.modalActionsTemplate)),d=r._compiledTemplates.actions(a);else{for(var h="",f=0;f');var v=a[f][g],b=v.label?"actions-modal-label":"actions-modal-button";v.bold&&(b+=" actions-modal-button-bold"),v.color&&(b+=" color-"+v.color),v.bg&&(b+=" bg-"+v.bg),v.disabled&&(b+=" disabled"),h+='
                              '+v.text+"
                              ",g===a[f].length-1&&(h+="
                        ")}d='
                        '+h+"
                        "}m.innerHTML=d,n=i(m).children(),r.root.append(n[0]),o=".actions-modal-group",l=".actions-modal-button"}return n.find(o).each(function(e,t){var s=e;i(t).children().each(function(e,t){var o,d=e,c=a[s][d];!p&&i(t).is(l)&&(o=i(t)),p&&i(t).find(l).length>0&&(o=i(t).find(l)),o&&o.on("click",function(e){!1!==c.close&&r.closeModal(n),c.onClick&&c.onClick(n,e)})})}),p||r.openModal(n,t),n[0]},r.popover=function(e,a,t,n,s){function o(){e.css({left:"",top:""});var t,n,i,s=e.width(),o=e.height(),l=0;p?e.removeClass("popover-on-left popover-on-right popover-on-top popover-on-bottom").css({left:"",top:""}):(t=e.find(".popover-angle"),l=t.width()/2,t.removeClass("on-left on-right on-top on-bottom").css({left:"",top:""}));var d=a.outerWidth(),c=a.outerHeight(),m=a.offset(),u=m.left-r.left,h=m.top-r.top,f=a.parents(".page");f.length>0&&(h-=f[0].scrollTop);var g=0,v=0,b=0,w=p?"bottom":"top";if(p)if(o=r.height&&(g=r.height-o-8),v=u,v+s>=r.width-8&&(v=u+d-s-8),v<8&&(v=8),"top"===w&&e.addClass("popover-on-top"),"bottom"===w&&e.addClass("popover-on-bottom"),a.hasClass("floating-button-to-popover")&&!e.hasClass("modal-in")){e.addClass("popover-floating-button");var C=v+s/2-(u+d/2),y=g+o/2-(h+c/2);a.addClass("floating-button-to-popover-in").transform("translate3d("+C+"px, "+y+"px,0)").transitionEnd(function(e){a.hasClass("floating-button-to-popover-in")&&a.addClass("floating-button-to-popover-scale").transform("translate3d("+C+"px, "+y+"px,0) scale("+s/d+", "+o/c+")")}),e.once("popover:close",function(){a.removeClass("floating-button-to-popover-in floating-button-to-popover-scale").addClass("floating-button-to-popover-out").transform("").transitionEnd(function(e){a.removeClass("floating-button-to-popover-out")})}),e.once("popover:closed",function(){e.removeClass("popover-floating-button")})}else a.hasClass("floating-button-to-popover")&&e.hasClass("modal-in")&&(v=u,g=h);else o+l=r.height&&(g=r.height-o-5),b-=g),"top"===w||"bottom"===w?(v=d/2+u-s/2,b=v,v<5&&(v=5),v+s>r.width&&(v=r.width-s-5),"top"===w&&t.addClass("on-bottom"),"bottom"===w&&t.addClass("on-top"),b-=v,n=s/2-l+b,n=Math.max(Math.min(n,s-2*l-13),13),t.css({left:n+"px"})):"middle"===w&&(v=u-s-l,t.addClass("on-right"),(v<5||v+s>r.width)&&(v<5&&(v=u+d+l),v+s>r.width&&(v=r.width-s-5),t.removeClass("on-right").addClass("on-left")),i=o/2-l+b,i=Math.max(Math.min(i,o-2*l-13),13),t.css({top:i+"px"}));e.css({top:g+"px",left:v+"px"})}if(void 0===t&&(t=!0),void 0===s&&(s=!0),void 0===n&&(n=!0),"string"==typeof e&&e.indexOf("<")>=0){var l=document.createElement("div");if(l.innerHTML=e.trim(),!(l.childNodes.length>0))return!1;e=l.childNodes[0],t&&e.classList.add("remove-on-close"),s||e.classList.add("ignore-close-by-outside"),r.root.append(e)}if(e=i(e),a=i(a),0===e.length||0===a.length)return!1;0===e.parents("body").length&&(t&&e.addClass("remove-on-close"),s||e.addClass.add("ignore-close-by-outside"),r.root.append(e[0])),0!==e.find(".popover-angle").length||r.params.material||e.append('
                        '),e.show();var p=r.params.material;return o(),r.onResize(o),e.on("popover:close",function(){r.offResize(o)}),r.openModal(e,n),e[0]},r.popup=function(e,a,t){if(void 0===a&&(a=!0),void 0===t&&(t=!0),"string"==typeof e&&e.indexOf("<")>=0){var n=document.createElement("div");if(n.innerHTML=e.trim(),!(n.childNodes.length>0))return!1;e=n.childNodes[0],a&&e.classList.add("remove-on-close"),r.root.append(e)}return e=i(e),0!==e.length&&(0===e.parents("body").length&&(a&&e.addClass("remove-on-close"),r.root.append(e[0])),e.show(),r.openModal(e,t),e[0])},r.pickerModal=function(e,a,t){if(void 0===a&&(a=!0),void 0===t&&(t=!0),"string"==typeof e&&e.indexOf("<")>=0){if(e=i(e),!(e.length>0))return!1;a&&e.addClass("remove-on-close"),r.root.append(e[0])}return e=i(e),0!==e.length&&(0===e.parents("body").length&&(a&&e.addClass("remove-on-close"),r.root.append(e[0])),i(".picker-modal.modal-in:not(.modal-out)").length>0&&!e.hasClass("modal-in")&&r.closeModal(".picker-modal.modal-in:not(.modal-out)"),e.show(),r.openModal(e,t),e[0])},r.loginScreen=function(e,a){return e||(e=".login-screen"),void 0===a&&(a=!0),e=i(e),0!==e.length&&(i(".login-screen.modal-in:not(.modal-out)").length>0&&!e.hasClass("modal-in")&&r.closeModal(".login-screen.modal-in:not(.modal-out)"),e.show(),r.openModal(e,a),e[0])},r.openModal=function(e,a){void 0===a&&(a=!0),e=i(e),e[a?"removeClass":"addClass"]("not-animated");var t=e.hasClass("modal"),n=e.hasClass("popover"),s=e.hasClass("popup"),o=e.hasClass("login-screen"),l=e.hasClass("picker-modal"),p=e.hasClass("actions-modal"),d="modal";if(n&&(d="popover"),s&&(d="popup"),o&&(d="loginscreen"),l&&(d="picker"),p&&(d="actions"),i(".modal.modal-in:not(.modal-out)").length&&r.params.modalStack&&t)return void r.modalStack.push(function(){r.openModal(e)});if(!0!==e.data("f7-modal-shown")){e.data("f7-modal-shown",!0);var c=e.parent();r.params.modalsMoveToRoot&&!c.is(r.root)&&(r.root.append(e),e.once(d+":closed",function(){c.append(e)})),e.once(d+":close",function(){e.removeData("f7-modal-shown")}),t&&(e.show(),e.css({marginTop:-Math.round(e.outerHeight()/2)+"px"}));var m;o||l||(0!==i(".modal-overlay").length||s||r.root.append(''),0===i(".popup-overlay").length&&s&&r.root.append(''),m=i(s?".popup-overlay":".modal-overlay")),r.params.material&&l&&e.hasClass("picker-calendar")&&(0!==i(".picker-modal-overlay").length||s||r.root.append('
                        '),m=i(".picker-modal-overlay")),m&&m[a?"removeClass":"addClass"]("not-animated");e[0].clientLeft;return e.trigger("open "+d+":open"),l&&i("body").addClass("with-picker-modal"),e.find("."+r.params.viewClass).length>0&&(e.find(".page").each(function(){r.initPageWithCallback(this)}),e.find(".navbar").each(function(){r.initNavbarWithCallback(this)})),o||l||m.addClass("modal-overlay-visible"),r.params.material&&l&&m&&m.addClass("modal-overlay-visible"),a?e.removeClass("modal-out").addClass("modal-in").transitionEnd(function(a){e.hasClass("modal-out")?e.trigger("closed "+d+":closed"):e.trigger("opened "+d+":opened")}):(e.removeClass("modal-out").addClass("modal-in"),e.trigger("opened "+d+":opened")),!0}},r.closeModal=function(e,a){if(void 0===a&&(a=!0),void 0===(e=i(e||".modal-in"))||0!==e.length){e[a?"removeClass":"addClass"]("not-animated");var t=e.hasClass("modal"),n=e.hasClass("popover"),s=e.hasClass("popup"),o=e.hasClass("login-screen"),l=e.hasClass("picker-modal"),p=e.hasClass("actions-modal"),d="modal";n&&(d="popover"),s&&(d="popup"),o&&(d="loginscreen"),l&&(d="picker"),p&&(d="actions");var c=e.hasClass("remove-on-close");if(!n||c||!e.hasClass("ignore-close-by-outside")){var m,u=e.hasClass("keep-on-close");return s?m=i(".popup-overlay"):l&&r.params.material?m=i(".picker-modal-overlay"):l||(m=i(".modal-overlay")),s?e.length===i(".popup.modal-in").length&&m.removeClass("modal-overlay-visible"):m&&m.length>0&&m.removeClass("modal-overlay-visible"),m&&m[a?"removeClass":"addClass"]("not-animated"),e.trigger("close "+d+":close"),l&&(i("body").removeClass("with-picker-modal"),i("body").addClass("picker-modal-closing")),!n||r.params.material?(a?e.removeClass("modal-in").addClass("modal-out").transitionEnd(function(a){if(e.hasClass("modal-out"))e.trigger("closed "+d+":closed");else if(e.trigger("opened "+d+":opened"),n)return;l&&i("body").removeClass("picker-modal-closing"),s||o||l||n?(e.removeClass("modal-out").hide(),c&&e.length>0&&e.remove()):u||e.remove()}):(e.trigger("closed "+d+":closed"),e.removeClass("modal-in modal-out"),l&&i("body").removeClass("picker-modal-closing"),s||o||l||n?(e.hide(),c&&e.length>0&&e.remove()):u||e.remove()),t&&r.params.modalStack&&r.modalStackClearQueue()):(e.removeClass("modal-in modal-out not-animated").trigger("closed "+d+":closed").hide(),c&&e.remove()),!0}}},r.setProgressbar=function(e,a,t){if(e=i(e||r.root),0!==e.length){a&&(a=Math.min(Math.max(a,0),100));var n;if(n=e.hasClass("progressbar")?e:e.children(".progressbar"),0!==n.length&&!n.hasClass("progressbar-infinite")){n[0].clientLeft;return n.children("span").transform("translate3d("+(-100+a)+"%,0,0)"),void 0!==t?n.children("span").transition(t):n.children("span").transition(""),n[0]}}},r.showProgressbar=function(e,a,t){if("number"==typeof e&&(e=r.root,a=arguments[0],t=arguments[1]),a&&"string"==typeof a&&parseFloat(a)!==1*a&&(t=a,a=void 0),e=i(e||r.root),0!==e.length){var n;return e.hasClass("progressbar")?n=e:(n=e.children(".progressbar:not(.progressbar-out), .progressbar-infinite:not(.progressbar-out)"),0===n.length&&(n=i(void 0!==a?'':''),e.append(n))),a&&r.setProgressbar(e,a),n[0]}},r.hideProgressbar=function(e){if(e=i(e||r.root),0!==e.length){var a;a=e.hasClass("progressbar")?e:e.children(".progressbar, .progressbar-infinite"),0!==a.length&&a.hasClass("progressbar-in")&&!a.hasClass("progressbar-out")&&a.removeClass("progressbar-in").addClass("progressbar-out").animationEnd(function(){a.remove(),a=null})}},r.initPageProgressbar=function(e){e=i(e),e.find(".progressbar").each(function(){var e=i(this);0===e.children("span").length&&e.append(""),e.attr("data-progress")&&r.setProgressbar(e,e.attr("data-progress"))})},r.allowPanelOpen=!0,r.openPanel=function(e,a){function t(){l.transitionEnd(function(e){i(e.target).is(l)?(n.hasClass("active")?n.trigger("opened panel:opened"):n.trigger("closed panel:closed"),o.css({display:""}),r.allowPanelOpen=!0):t()})}if(void 0===a&&(a=!0),!r.allowPanelOpen)return!1;var n=i(".panel-"+e);if(0===n.length||n.hasClass("active")||n.hasClass("panel-visible-by-breakpoint"))return!1;r.closePanel(),r.allowPanelOpen=!1;var s=n.hasClass("panel-reveal")?"reveal":"cover";n[a?"removeClass":"addClass"]("not-animated"),n.css({display:"block"}).addClass("active"),n.trigger("open panel:open");var o=i(".panel-overlay");o[a?"removeClass":"addClass"]("not-animated"),o.show(),n.find("."+r.params.viewClass).length>0&&r.sizeNavbars&&r.sizeNavbars(n.find("."+r.params.viewClass)[0]);var l=(n[0].clientLeft,"reveal"===s?i("."+r.params.viewsClass):n);return a?t():(n.trigger("opened panel:opened"),o.css({display:""}),r.allowPanelOpen=!0),i("body").addClass("with-panel-"+e+"-"+s),!0},r.closePanel=function(e){void 0===e&&(e=!0);var a=i(".panel.active");if(0===a.length||a.hasClass("panel-visible-by-breakpoint"))return!1;var t=a.hasClass("panel-reveal")?"reveal":"cover",n=a.hasClass("panel-left")?"left":"right";a[e?"removeClass":"addClass"]("not-animated"),a.removeClass("active"),i(".panel-overlay").removeClass("not-animated");var s="reveal"===t?i("."+r.params.viewsClass):a;a.trigger("close panel:close"),r.allowPanelOpen=!1,e?(s.transitionEnd(function(){a.hasClass("active")||(a.css({display:""}),a.trigger("closed panel:closed"),i("body").removeClass("panel-closing"),r.allowPanelOpen=!0)}),i("body").addClass("panel-closing").removeClass("with-panel-"+n+"-"+t)):(a.css({display:""}),a.trigger("closed panel:closed"),a.removeClass("not-animated"),i("body").removeClass("with-panel-"+n+"-"+t),r.allowPanelOpen=!0)},r.initPanelsBreakpoints=function(){function e(){r.params.panelLeftBreakpoint&&t.length>0&&(a=t.hasClass("panel-visible-by-breakpoint"),r.width>=r.params.panelLeftBreakpoint?a||(i("body").removeClass("with-panel-left-reveal with-panel-left-cover"),t.css("display","").addClass("panel-visible-by-breakpoint").removeClass("active"),t.trigger("open panel:open opened panel:opened"),s.css({"margin-left":t.width()+"px"}),r.allowPanelOpen=!0):a&&(t.css("display","").removeClass("panel-visible-by-breakpoint active"),t.trigger("close panel:close closed panel:closed"),s.css({"margin-left":""}),r.allowPanelOpen=!0)),r.params.panelRightBreakpoint&&n.length>0&&(a=n.hasClass("panel-visible-by-breakpoint"),r.width>=r.params.panelRightBreakpoint?a||(i("body").removeClass("with-panel-right-reveal with-panel-right-cover"),n.css("display","").addClass("panel-visible-by-breakpoint").removeClass("active"),n.trigger("open panel:open opened panel:opened"),s.css({"margin-right":n.width()+"px"}),r.allowPanelOpen=!0):a&&(n.css("display","").removeClass("panel-visible-by-breakpoint active"),n.trigger("close panel:close closed panel:closed"),s.css({"margin-right":""}),r.allowPanelOpen=!0))}var a,t=i(".panel-left"),n=i(".panel-right"),s=r.root.children(".views");r.onResize(e),e()},r.initSwipePanels=function(){function e(e){if(r.allowPanelOpen&&(r.params.swipePanel||r.params.swipePanelOnlyClose)&&!o&&!(i(".modal-in, .photo-browser-in").length>0)&&(r.params.swipePanelCloseOpposite||r.params.swipePanelOnlyClose||!(i(".panel.active").length>0)||n.hasClass("active"))&&!(e.target&&"input"===e.target.nodeName.toLowerCase()&&"range"===e.target.type||i(e.target).closest(".tabs-swipeable-wrap").length>0)){if(w.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,w.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,r.params.swipePanelCloseOpposite||r.params.swipePanelOnlyClose){if(i(".panel.active").length>0)s=i(".panel.active").hasClass("panel-left")?"left":"right";else{if(r.params.swipePanelOnlyClose)return;s=r.params.swipePanel}if(!s)return}if(n=i(".panel.panel-"+s),h=n.hasClass("active"),r.params.swipePanelActiveArea&&!h){if("left"===s&&w.x>r.params.swipePanelActiveArea)return;if("right"===s&&w.xMath.abs(a-w.x))),p)return void(o=!1);if(!v){if(v=a>w.x?"to-right":"to-left","both"===s){if(s=i(".panel.active").length>0?i(".panel.active").hasClass("panel-left")?"left":"right":"to-right"===v?"left":"right",r.params.swipePanelActiveArea>0){if("left"===s&&w.x>r.params.swipePanelActiveArea)return void(o=!1);if("right"===s&&w.x0&&r.sizeNavbars&&r.sizeNavbars(n.find("."+r.params.viewClass)[0])),l=!0,e.preventDefault();var y=h?0:-r.params.swipePanelThreshold;"right"===s&&(y=-y),c=a-w.x+y,"right"===s?"cover"===g?(m=c+(h?0:f),m<0&&(m=0),m>f&&(m=f)):(m=c-(h?f:0),m>0&&(m=0),m<-f&&(m=-f)):(m=c+(h?f:0),m<0&&(m=0),m>f&&(m=f)),"reveal"===g?(C.transform("translate3d("+m+"px,0,0)").transition(0),b.transform("translate3d("+m+"px,0,0)").transition(0),n.trigger("panel:swipe",{progress:Math.abs(m/f)}),r.pluginHook("swipePanelSetTransform",C[0],n[0],Math.abs(m/f))):("left"===s&&(m-=f),n.transform("translate3d("+m+"px,0,0)").transition(0),b.transition(0),u=1-Math.abs(m/f),b.css({opacity:u}),n.trigger("panel:swipe",{progress:Math.abs(m/f)}),r.pluginHook("swipePanelSetTransform",C[0],n[0],Math.abs(m/f)))}}function t(e){if(!o||!l)return o=!1,void(l=!1);o=!1,l=!1;var a,t=(new Date).getTime()-d,p=0===m||Math.abs(m)===f;if(a=h?"cover"===g?0===m?"reset":t<300&&Math.abs(m)>0?"swap":t>=300&&Math.abs(m)=0||t>=300&&Math.abs(m)<=f/2?"left"===s&&m===f?"reset":"swap":"reset":"cover"===g?0===m?"swap":t<300&&Math.abs(m)>0?"swap":t>=300&&Math.abs(m)0||t>=300&&Math.abs(m)>=f/2?"swap":"reset","swap"===a&&(r.allowPanelOpen=!0,h?(r.closePanel(),p&&(n.css({display:""}),i("body").removeClass("panel-closing"))):r.openPanel(s),p&&(r.allowPanelOpen=!0)),"reset"===a)if(h)r.allowPanelOpen=!0,r.openPanel(s);else if(r.closePanel(),p)r.allowPanelOpen=!0,n.css({display:""});else{var c="reveal"===g?C:n;n.trigger("close panel:close"),i("body").addClass("panel-closing"),c.transitionEnd(function(){n.hasClass("active")||(n.trigger("close panel:closed"),n.css({display:""}),i("body").removeClass("panel-closing"),r.allowPanelOpen=!0)})}"reveal"===g&&(C.transition(""),C.transform("")),n.transition("").transform(""),b.css({display:""}).transform("").transition("").css("opacity","")}var n,s;if(r.params.swipePanel){if(n=i(".panel.panel-"+r.params.swipePanel),s=r.params.swipePanel,0===n.length&&"both"!==s)return}else{if(!r.params.swipePanelOnlyClose)return;if(0===i(".panel").length)return}var o,l,p,d,c,m,u,h,f,g,v,b=i(".panel-overlay"),w={},C=i("."+r.params.viewsClass),y=!("touchstart"!==r.touchEvents.start||!r.support.passiveListener)&&{passive:!0,capture:!1},x=!!r.support.passiveListener&&{passive:!1,capture:!1};i(document).on(r.touchEvents.start,e,y),i(document).on(r.touchEvents.move,a,x),i(document).on(r.touchEvents.end,t,y)},r.initImagesLazyLoad=function(e){function a(e){function t(){e.removeClass("lazy").addClass("lazy-loaded"),s?e.css("background-image","url("+o+")"):e.attr("src",o),r.params.imagesLazyLoadSequential&&(m=!1,c.length>0&&a(c.shift())),e.trigger("lazy-loaded"),r.params.onLazyLoaded&&r.params.onLazyLoaded(e)}function n(){e.removeClass("lazy").addClass("lazy-loaded"),s?e.css("background-image","url("+d+")"):e.attr("src",d),r.params.imagesLazyLoadSequential&&(m=!1,c.length>0&&a(c.shift())),e.trigger("lazy-error"),r.params.onLazyError&&r.params.onLazyError(e)}e=i(e);var s=e.attr("data-background"),o=s||e.attr("data-src");if(o){if(r.params.imagesLazyLoadSequential&&m)return void(c.indexOf(e[0])<0&&c.push(e[0]));m=!0;var l=new Image;l.onload=t,l.onerror=n,l.src=o,e.trigger("lazy-load"),r.params.onLazyLoad&&!e.hasClass("lazy-loaded")&&r.params.onLazyLoad(e)}}function t(){l=e.find(".lazy"),l.each(function(e,t){t=i(t),t.parents(".tab:not(.active)").length>0||n(t[0])&&a(t)})}function n(e){var a=e.getBoundingClientRect(),t=r.params.imagesLazyLoadThreshold||0;return a.top>=0-t&&a.left>=0-t&&a.top<=r.height+t&&a.left<=r.width+t}function s(a){var n=a?"off":"on";l[n]("lazy",t),l.parents(".tab")[n]("show",t),e[n]("lazy",t),p[n]("lazy",t),p[n]("scroll",t),r["on"===n?"onResize":"offResize"](t)}function o(){s(!0)}e=i(e);var l;if(e.hasClass("lazy")?(l=e,e=l.parents(".page")):l=e.find(".lazy"),0!==l.length){var p;if(e.hasClass("page-content")?(p=e,e=e.parents(".page")):p=e.find(".page-content"),0!==p.length){var d="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEXCwsK592mkAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==";"string"==typeof r.params.imagesLazyLoadPlaceholder&&(d=r.params.imagesLazyLoadPlaceholder),!1!==r.params.imagesLazyLoadPlaceholder&&l.each(function(){i(this).attr("data-src")&&!i(this).attr("src")&&i(this).attr("src",d)});var c=[],m=!1;e[0].f7DestroyImagesLazyLoad=o,s(),e.hasClass("page")&&e.once("page:beforeremove",o),t(),e.once("page:afteranimation",t)}}},r.destroyImagesLazyLoad=function(e){e=i(e),e.length>0&&e[0].f7DestroyImagesLazyLoad&&e[0].f7DestroyImagesLazyLoad()},r.reinitImagesLazyLoad=function(e){e=i(e),e.length>0&&e.trigger("lazy")},r.initPageMaterialPreloader=function(e){i(e).find(".preloader").each(function(){0===i(this).children().length&&i(this).html(r.params.materialPreloaderHtml)})};var u=function(e,a){var t={autoLayout:!0,newMessagesFirst:!1,scrollMessages:!0,scrollMessagesOnlyOnEdge:!1,messageTemplate:'{{#if day}}
                        {{day}} {{#if time}}, {{time}}{{/if}}
                        {{/if}}
                        {{#if name}}
                        {{name}}
                        {{/if}}
                        {{text}}{{#if date}}
                        {{date}}
                        {{/if}}
                        {{#if avatar}}
                        {{/if}}{{#if label}}
                        {{label}}
                        {{/if}}
                        '};a=a||{};for(var r in t)void 0!==a[r]&&null!==a[r]||(a[r]=t[r]);var n=this;if(n.params=a,n.container=i(e),0!==n.container.length)return n.params.autoLayout&&n.container.addClass("messages-auto-layout"),n.params.newMessagesFirst&&n.container.addClass("messages-new-first"),n.pageContainer=n.container.parents(".page").eq(0),n.pageContent=n.pageContainer.find(".page-content"),n.template=Template7.compile(n.params.messageTemplate),n.layout=function(){n.container.hasClass("messages-auto-layout")||n.container.addClass("messages-auto-layout"),n.container.find(".message").each(function(){var e=i(this);if(e.find(".message-text img").length>0){for(var a=e.find(".message-text")[0].childNodes,t=!0,r=0;r0&&e.addClass("message-with-avatar")}),n.container.find(".message").each(function(){var e=i(this),a=e.hasClass("message-sent"),t=e.next(".message-"+(a?"sent":"received")),r=e.prev(".message-"+(a?"sent":"received"));0===t.length?e.addClass("message-last message-with-tail"):e.removeClass("message-last message-with-tail"),0===r.length?e.addClass("message-first"):e.removeClass("message-first"),r.length>0&&r.find(".message-name").length>0&&e.find(".message-name").length>0&&r.find(".message-name").text()!==e.find(".message-name").text()&&(r.addClass("message-last message-with-tail"),e.addClass("message-first"))})},n.appendMessage=function(e,a){return n.addMessage(e,"append",a)},n.prependMessage=function(e,a){return n.addMessage(e,"prepend",a)},n.addMessage=function(e,a,t){return n.addMessages([e],a,t)},n.addMessages=function(e,a,t){void 0===t&&(t=!0),void 0===a&&(a=n.params.newMessagesFirst?"prepend":"append");var r,i="";for(r=0;r=0,!1===s.onlyImage&&(s.hasImage=!1),t&&(s.position="append"===a?"bottom":"top"),i+=n.template(s))}var o=n.pageContent[0].scrollHeight,l=n.pageContent[0].offsetHeight,p=n.pageContent[0].scrollTop;if(n.container[a](i),n.params.autoLayout&&n.layout(),"prepend"===a&&(n.pageContent[0].scrollTop=p+(n.pageContent[0].scrollHeight-o)),n.params.scrollMessages&&"append"===a&&!n.params.newMessagesFirst||"prepend"===a&&n.params.newMessagesFirst)if(n.params.scrollMessagesOnlyOnEdge){var d=!1;n.params.newMessagesFirst?0===p&&(d=!0):p-(o-l)>=-10&&(d=!0),d&&n.scrollMessages(t?void 0:0)}else n.scrollMessages(t?void 0:0);var c=n.container.find(".message");if(1===e.length)return"append"===a?c[c.length-1]:c[0];var m=[];if("append"===a)for(r=c.length-e.length;rMath.abs(a-E.x))),l)return void(s=!1);if(!o){if(i(".list-block.sortable-opened").length>0)return;c=i(this),m=c.find(".swipeout-content"),u=c.find(".swipeout-actions-right"),h=c.find(".swipeout-actions-left"),f=g=C=y=k=T=null,M=h.hasClass("swipeout-actions-no-fold")||r.params.swipeoutActionsNoFold,I=u.hasClass("swipeout-actions-no-fold")||r.params.swipeoutActionsNoFold,h.length>0&&(f=h.outerWidth(),C=h.children("a"),T=h.find(".swipeout-overswipe")),u.length>0&&(g=u.outerWidth(),y=u.children("a"),k=u.find(".swipeout-overswipe")),b=c.hasClass("swipeout-opened"),b&&(w=c.find(".swipeout-actions-left.swipeout-actions-opened").length>0?"left":"right"),c.removeClass("transitioning"),r.params.swipeoutNoFollow||(c.find(".swipeout-actions-opened").removeClass("swipeout-actions-opened"),c.removeClass("swipeout-opened"))}if(o=!0,e.preventDefault(),d=a-E.x,v=d,b&&("right"===w?v-=g:v+=f),v>0&&0===h.length||v<0&&0===u.length){if(!b)return s=o=!1,m.transform(""),y&&y.length>0&&y.transform(""),void(C&&C.length>0&&C.transform(""));v=0}v<0?x="to-left":v>0?x="to-right":x||(x="to-left");var n,p,O;if(e.f7PreventPanelSwipe=!0,r.params.swipeoutNoFollow)return b?("right"===w&&d>0&&r.swipeoutClose(c),"left"===w&&d<0&&r.swipeoutClose(c)):(d<0&&u.length>0&&r.swipeoutOpen(c,"right"),d>0&&h.length>0&&r.swipeoutOpen(c,"left")),s=!1,void(o=!1);P=!1,S=!1;var D;if(u.length>0)for(O=v/g,v<-g&&(v=-g-Math.pow(-v-g,.8),k.length>0&&(S=!0)),n=0;n0&&D.hasClass("swipeout-overswipe")&&(D.css({left:(S?-p:0)+"px"}),S?D.addClass("swipeout-overswipe-active"):D.removeClass("swipeout-overswipe-active")),D.transform("translate3d("+(v-p*(1+Math.max(O,-1)))+"px,0,0)");if(h.length>0)for(O=v/f,v>f&&(v=f+Math.pow(v-f,.8),T.length>0&&(P=!0)),n=0;n0&&D.hasClass("swipeout-overswipe")&&(D.css({left:(P?p:0)+"px"}),P?D.addClass("swipeout-overswipe-active"):D.removeClass("swipeout-overswipe-active")),C.length>1&&D.css("z-index",C.length-n),D.transform("translate3d("+(v+p*(1-Math.min(O,1)))+"px,0,0)");m.transform("translate3d("+v+"px,0,0)")}}function n(e){if(!s||!o)return s=!1,void(o=!1);s=!1,o=!1;var a,t,n,l,w,T=(new Date).getTime()-p;if(n="to-left"===x?u:h,t="to-left"===x?g:f,a=T<300&&(d<-10&&"to-left"===x||d>10&&"to-right"===x)||T>=300&&Math.abs(v)>t/2?"open":"close",T<300&&(0===Math.abs(v)&&(a="close"),Math.abs(v)===t&&(a="open")),"open"===a){r.swipeoutOpenedEl=c,c.trigger("open swipeout:open"),c.addClass("swipeout-opened transitioning");var k="to-left"===x?-t:t;if(m.transform("translate3d("+k+"px,0,0)"),n.addClass("swipeout-actions-opened"),l="to-left"===x?y:C)for(w=0;w0&&C!==l)for(w=0;w0&&y!==l)for(w=0;w0&&y.transform(""),h.length>0&&C.transform("")))})}var s,o,l,p,d,c,m,u,h,f,g,v,b,w,C,y,x,T,k,P,S,M,I,E={},O=!!r.support.passiveListener&&{passive:!1,capture:!1};i(document).on(r.touchEvents.start,function(e){if(r.swipeoutOpenedEl){var a=i(e.target);r.swipeoutOpenedEl.is(a[0])||a.parents(".swipeout").is(r.swipeoutOpenedEl)||a.hasClass("modal-in")||a.hasClass("modal-overlay")||a.hasClass("actions-modal")||a.parents(".actions-modal.modal-in, .modal.modal-in").length>0||r.swipeoutClose(r.swipeoutOpenedEl)}},O),e?(i(e).on(r.touchEvents.start,a,O),i(e).on(r.touchEvents.move,t,O),i(e).on(r.touchEvents.end,n,O)):(i(document).on(r.touchEvents.start,".list-block li.swipeout",a,O),i(document).on(r.touchEvents.move,".list-block li.swipeout",t,O),i(document).on(r.touchEvents.end,".list-block li.swipeout",n,O))},r.swipeoutOpen=function(e,a,t){if(e=i(e),2===arguments.length&&"function"==typeof arguments[1]&&(t=a),0!==e.length&&(e.length>1&&(e=i(e[0])),e.hasClass("swipeout")&&!e.hasClass("swipeout-opened"))){a||(a=e.find(".swipeout-actions-right").length>0?"right":"left");var n=e.find(".swipeout-actions-"+a);if(0!==n.length){ +e.trigger("open swipeout:open").addClass("swipeout-opened").removeClass("transitioning"),n.addClass("swipeout-actions-opened");var s,o=n.children("a"),l=n.outerWidth(),p="right"===a?-l:l;if(o.length>1){for(s=0;s1&&(e=i(e[0])),r.swipeoutOpenedEl=void 0,e.trigger("delete swipeout:delete"),e.css({height:e.outerHeight()+"px"});e[0].clientLeft;e.css({height:"0px"}).addClass("deleting transitioning").transitionEnd(function(){if(e.trigger("deleted swipeout:deleted"),a&&a.call(e[0]),e.parents(".virtual-list").length>0){var t=e.parents(".virtual-list")[0].f7VirtualList,n=e[0].f7VirtualListIndex;t&&void 0!==n&&t.deleteItem(n)}else r.params.swipeoutRemoveWithTimeout?setTimeout(function(){e.remove()},0):e.remove()});e.find(".swipeout-content").transform("translate3d(-100%,0,0)")}},r.sortableToggle=function(e){return e=i(e),0===e.length&&(e=i(".list-block.sortable")),e.toggleClass("sortable-opened"),e.hasClass("sortable-opened")?e.trigger("open sortable:open"):e.trigger("close sortable:close"),e},r.sortableOpen=function(e){return e=i(e),0===e.length&&(e=i(".list-block.sortable")),e.addClass("sortable-opened"),e.trigger("open sortable:open"),e},r.sortableClose=function(e){return e=i(e),0===e.length&&(e=i(".list-block.sortable")),e.removeClass("sortable-opened"),e.trigger("close sortable:close"),e},r.initSortable=function(){function e(e){s=!1,n=!0,o="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,p=i(this).parent(),v=p.index(),c=p.parent().children("li"),g=p.parents(".sortable"),e.preventDefault(),r.allowPanelOpen=r.allowSwipeout=!1}function a(e){if(n&&p){var a=("touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY);s||(p.addClass("sorting"),g.addClass("sortable-sorting"),m=p[0].offsetTop,u=p.parent().height()-p[0].offsetTop-p.height(),d=p[0].offsetHeight),s=!0,e.preventDefault(),e.f7PreventPanelSwipe=!0,l=a-o;var t=l;t<-m&&(t=-m),t>u&&(t=u),p.transform("translate3d(0,"+t+"px,0)"),f=h=void 0,c.each(function(){var e=i(this);if(e[0]!==p[0]){var a=e[0].offsetTop,r=e.height(),n=p[0].offsetTop+t;n>=a-r/2&&p.index()e.index()?(e.transform("translate3d(0, "+d+"px,0)"),h=void 0,f||(f=e)):i(this).transform("translate3d(0, 0%,0)")}})}}function t(e){if(r.allowPanelOpen=r.allowSwipeout=!0,!n||!s)return n=!1,void(s=!1);e.preventDefault(),c.transform(""),p.removeClass("sorting"),g.removeClass("sortable-sorting");var a,t,i;h&&(p.insertAfter(h),p.trigger("sort sortable:sort",{startIndex:v,newIndex:p.index()})),f&&(p.insertBefore(f),p.trigger("sort sortable:sort",{startIndex:v,newIndex:p.index()})),(h||f)&&g.hasClass("virtual-list")&&(a=g[0].f7VirtualList,t=p[0].f7VirtualListIndex,i=f?f[0].f7VirtualListIndex:h[0].f7VirtualListIndex,a&&a.moveItem(t,i)),h=f=void 0,n=!1,s=!1}var n,s,o,l,p,d,c,m,u,h,f,g,v,b=!!r.support.passiveListener&&{passive:!1,capture:!1};i(document).on(r.touchEvents.start,".list-block.sortable .sortable-handler",e,b),r.support.touch?(i(document).on(r.touchEvents.move,".list-block.sortable .sortable-handler",a,b),i(document).on(r.touchEvents.end,".list-block.sortable .sortable-handler",t,b)):(i(document).on(r.touchEvents.move,a,b),i(document).on(r.touchEvents.end,t,b))},r.initSmartSelects=function(e){e=i(e);var a;a=e.is(".smart-select")?e:e.find(".smart-select"),0!==a.length&&a.each(function(){var e=i(this),a=e.find("select");if(0!==a.length){var t=a[0];if(0!==t.length){for(var r,n=[],s=0;s'+n.join(", ")+"");else{var l=o.text();if(o.hasClass("smart-select-value"))for(s=0;s0&&r.smartSelectOpen(n,!0)},r.smartSelectOpen=function(e,a){function t(a){var t=!0;(a.target===e[0]||i(a.target).parents(e[0]).length>0)&&(t=!1),i(a.target).parents(".picker-modal").length>0&&(t=!1),t&&r.closeModal(".smart-select-picker.modal-in")}function n(e){T.selectedOptions.length>=q?e.find('input[type="checkbox"]').each(function(){this.checked?i(this).parents("li").removeClass("disabled"):i(this).parents("li").addClass("disabled")}):e.find(".disabled").removeClass("disabled")}function o(a){if(a=i(a),w){var t=r.virtualList(a.find(".virtual-list"),{items:H,template:W,height:C||void 0,searchByItem:function(e,a,t){return!!(t.text&&t.text.toLowerCase().indexOf(e.trim().toLowerCase())>=0)}});a.once("popup"===d||"picker"===d?"closed":"pageBeforeRemove",function(){t&&t.destroy&&t.destroy()})}q&&n(a),f&&a.find('input[type="radio"][name="'+Y+'"]:checked').parents("label").once("click",function(){"popup"===d?r.closeModal(re):"picker"===d?r.closeModal(ne):p.router.back()}),a.on("change",'input[name="'+Y+'"]',function(){var t,s,o,l=this,c=l.value,m=[];if("checkbox"===l.type){for(var u=0;u0)return}else if("picker"===d){if(i(".picker-modal.modal-in").length>0&&!a){if(e[0].f7SmartSelectPicker===i(".picker-modal.modal-in:not(.modal-out)")[0])return;r.closeModal(i(".picker-modal.modal-in:not(.modal-out)"))}}else if(!p)return;var c,m=e.dataset(),u=m.pageTitle||e.find(".item-title").text(),h=m.backText||r.params.smartSelectBackText;c="picker"===d?m.pickerCloseText||m.backText||r.params.smartSelectPickerCloseText:m.popupCloseText||m.backText||r.params.smartSelectPopupCloseText;var f=void 0!==m.backOnSelect?m.backOnSelect:r.params.smartSelectBackOnSelect,g=m.formTheme||r.params.smartSelectFormTheme,v=m.navbarTheme||r.params.smartSelectNavbarTheme,b=m.toolbarTheme||r.params.smartSelectToolbarTheme,w=m.virtualList,C=m.virtualListHeight,y=r.params.material,x=m.pickerHeight||r.params.smartSelectPickerHeight,T=e.find("select")[0],k=i(T),P=k.dataset();if(!(T.disabled||e.hasClass("disabled")||k.hasClass("disabled"))){for(var S,M,I,E,O,D,L,z,B,N,A,H=[],R=(new Date).getTime(),V=T.multiple?"checkbox":"radio",Y=V+"-"+R,q=k.attr("maxlength"),F=T.name,j=0;j{{groupLabel}}{{else}}{{/if}}'));var W=r._compiledTemplates.smartSelectItem,X="";if(!w)for(var G=0;G')),Q=r._compiledTemplates.smartSelectToolbar({pageTitle:u,closeText:c,openIn:d,toolbarTheme:b,inPicker:"picker"===d})):(r._compiledTemplates.smartSelectNavbar||(r._compiledTemplates.smartSelectNavbar=s.compile(r.params.smartSelectNavbarTemplate||'')),_=r._compiledTemplates.smartSelectNavbar({pageTitle:u,backText:h,closeText:c,openIn:d,navbarTheme:v,inPopup:"popup"===d,inPage:"page"===d,leftTemplate:"popup"===d?(r.params.smartSelectPopupCloseTemplate||(y?'
                        ':'')).replace(/{{closeText}}/g,c):(r.params.smartSelectBackTemplate||(y?'
                        ':'')).replace(/{{backText}}/g,h)}),"page"===d?(U="static",e.parents(".navbar-through").length>0&&(U="through"),e.parents(".navbar-fixed").length>0&&(U="fixed"),K=e.parents(".page").hasClass("no-toolbar")?"no-toolbar":"",J=e.parents(".page").hasClass("no-navbar")?"no-navbar":"navbar-"+U,Z=e.parents(".page").hasClass("no-tabbar")?"no-tabbar":""):U="fixed");var $,ee,ae="smart-select-"+Y,te=void 0===e.data("searchbar")?r.params.smartSelectSearchbar:"true"===e.data("searchbar");te&&($=e.data("searchbar-placeholder")||"Search",ee=e.data("searchbar-cancel")||"Cancel");var re,ne,ie='
                        ',se=("picker"!==d&&"through"===U?_:"")+'
                        '+("picker"!==d&&"fixed"===U?_:"")+(te?ie:"")+'
                        '+("picker"!==d&&"static"===U?_:"")+'
                          '+(w?"":X)+"
                        ";"popup"===d?(a?(re=i(".popup.smart-select-popup .view"),re.html(se)):(re=r.popup('"),re=i(re)),r.initPage(re.find(".page")),o(re)):"picker"===d?(a?(ne=i(".picker-modal.smart-select-picker .view"),ne.html(se)):(ne=r.pickerModal('
                        "+Q+'
                        '+se+"
                        "),ne=i(ne),function(){var a=e.parents(".page-content");if(0!==a.length){var t,r=parseInt(a.css("padding-top"),10),n=parseInt(a.css("padding-bottom"),10),i=a[0].offsetHeight-r-ne.height(),s=a[0].scrollHeight-r-ne.height(),o=e.offset().top-r+e[0].offsetHeight;if(o>i){var l=a.scrollTop()+o-i;l+i>s&&(t=l+i-s+n,i===s&&(t=ne.height()),a.css({"padding-bottom":t+"px"})),a.scrollTop(l,300)}}}(),i("html").on("click",t),ne.once("picker:close",function(){e[0].f7SmartSelectPicker=void 0,i("html").off("click",t),e.parents(".page-content").css({paddingBottom:""})}),e[0].f7SmartSelectPicker=ne[0]),r.initPage(ne.find(".page")),o(ne)):(i(document).once("page:init",".smart-select-page",l),p.router.load({content:se,reload:!!a||void 0}))}}}};var h=function(e,a){var t={cols:1,height:r.params.material?48:44,cache:!0,dynamicHeightBufferSize:1,showFilteredItemsOnly:!1,renderExternal:void 0,template:'
                      • {{this}}
                      • '};a=a||{};for(var n in t)void 0===a[n]&&(a[n]=t[n]);var o=this;o.listBlock=i(e),o.params=a,o.items=o.params.items,o.params.showFilteredItemsOnly&&(o.filteredItems=[]),o.params.template&&!o.params.renderItem&&("string"==typeof o.params.template?o.template=s.compile(o.params.template):"function"==typeof o.params.template&&(o.template=o.params.template)),o.pageContent=o.listBlock.parents(".page-content");var l;void 0!==o.params.updatableScroll?l=o.params.updatableScroll:(l=!0,r.device.ios&&r.device.osVersion.split(".")[0]<8&&(l=!1),o.params.updatableScroll=l),o.ul=o.params.ul?i(o.params.ul):o.listBlock.children("ul"),0===o.ul.length&&(o.listBlock.append("
                          "),o.ul=o.listBlock.children("ul")),o.domCache={},o.displayDomCache={},o.tempDomElement=document.createElement("ul"),o.lastRepaintY=null,o.fragment=document.createDocumentFragment(),o.filterItems=function(e,a){o.filteredItems=[];for(var t=(e[0],e[e.length-1],0);tf||!l&&o.pageContent[0].scrollTop+p>=o.pageContent[0].scrollHeight){o.lastRepaintY=t;var r,n,i=o.filteredItems||o.items,s=0,d=0;if(g){var m,v,b=0;for(f=p,m=0;m=t-2*p*o.params.dynamicHeightBufferSize?r=m:s+=v),void 0===n&&((b+v>=t+2*p*o.params.dynamicHeightBufferSize||m===o.heights.length-1)&&(n=m+1),d+=v),b+=v;n=Math.min(n,i.length)}else r=(parseInt(t/o.params.height)-c)*o.params.cols,r<0&&(r=0),n=Math.min(r+u*o.params.cols,i.length);var w,C=[];o.reachEnd=!1;for(var y=r;yo.items.length)return!1;var a,t=0;if(g)for(var r=0;r=0;a--)o.items.unshift(e[a]);if(o.params.cache){var t={};for(var r in o.domCache)t[parseInt(r,10)+e.length]=o.domCache[r];o.domCache=t}o.update()},o.prependItem=function(e){o.prependItems([e])},o.moveItem=function(e,a){if(e!==a){var t=o.items.splice(e,1)[0];if(a>=o.items.length?(o.items.push(t),a=o.items.length-1):o.items.splice(a,0,t),o.params.cache){var r={};for(var n in o.domCache){var i=parseInt(n,10),s=el)&&(r[i]=o.domCache[i]),i===s&&(r[l]=o.domCache[i]),i>s&&i<=l&&(r[i+p]=o.domCache[i])}o.domCache=r}o.update()}},o.insertItemBefore=function(e,a){if(0===e)return void o.prependItem(a);if(e>=o.items.length)return void o.appendItem(a);if(o.items.splice(e,0,a),o.params.cache){var t={};for(var r in o.domCache){var n=parseInt(r,10);n>=e&&(t[n+1]=o.domCache[n])}o.domCache=t}o.update()},o.deleteItems=function(e){for(var a,t=0,r=0;ra&&(t=-r),n+=t,a=e[r];var i=o.items.splice(n,1)[0];if(o.filteredItems&&o.filteredItems.indexOf(i)>=0&&o.filteredItems.splice(o.filteredItems.indexOf(i),1),o.params.cache){var s={};for(var l in o.domCache){var p=parseInt(l,10);p===n?delete o.domCache[n]:parseInt(l,10)>n?s[p-1]=o.domCache[l]:s[p]=o.domCache[l]}o.domCache=s}}o.update()},o.deleteAllItems=function(){o.items=[],delete o.filteredItems,o.params.cache&&(o.domCache={}),o.update()},o.deleteItem=function(e){o.deleteItems([e])},o.clearCache=function(){o.domCache={}},o.update=function(){o.setListSize(),o.render(!0)},o.destroy=function(){o.attachEvents(!0),delete o.items,delete o.domCache},o.init(),o.listBlock[0].f7VirtualList=o,o};r.virtualList=function(e,a){return new h(e,a)},r.reinitVirtualList=function(e){var a=i(e),t=a.find(".virtual-list");if(0!==t.length)for(var r=0;r1)return}f=i(this),f.hasClass("refreshing")||(c=!1,y=!1,d=!0,m=void 0,b=void 0,"touchstart"===e.type&&(p=e.targetTouches[0].identifier),x.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,x.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,h=(new Date).getTime())}function t(e){if(d){var a,t,n;if("touchmove"===e.type){if(p&&e.touches)for(var i=0;iMath.abs(a-x.x))),!m)return void(d=!1);if(v=f[0].scrollTop,void 0===b&&0!==v&&(b=!0),!c){if(f.removeClass("transitioning"),v>f[0].offsetHeight)return void(d=!1);C&&(w=f.attr("data-ptr-distance"),w.indexOf("%")>=0&&(w=f[0].offsetHeight*parseInt(w,10)/100)),P=f.hasClass("refreshing")?w:0,k=f[0].scrollHeight===f[0].offsetHeight||"ios"!==r.device.os}if(c=!0,!((u=t-x.y)>0&&v<=0||v<0))return y=!1,f.removeClass("pull-up pull-down"),void(T=!1);"ios"===r.device.os&&parseInt(r.device.osVersion.split(".")[0],10)>7&&0===v&&!b&&(k=!0),k&&(e.preventDefault(),g=Math.pow(u,.85)+P,f.transform("translate3d(0,"+g+"px,0)")),k&&Math.pow(u,.85)>w||!k&&u>=2*w?(T=!0,f.addClass("pull-up").removeClass("pull-down")):(T=!1,f.removeClass("pull-up").addClass("pull-down")),y||(f.trigger("pullstart ptr:pullstart"),y=!0),f.trigger("pullmove ptr:pullmove",{event:e,scrollTop:v,translate:g,touchesDiff:u})}}}function n(e){if(!("touchend"===e.type&&e.changedTouches&&e.changedTouches.length>0&&p&&e.changedTouches[0].identifier!==p)){if(!d||!c)return d=!1,void(c=!1);g&&(f.addClass("transitioning"),g=0),f.transform(""),T?(f.addClass("refreshing"),f.trigger("refresh ptr:refresh",{done:function(){r.pullToRefreshDone(f)}})):f.removeClass("pull-down"),d=!1,c=!1,y&&f.trigger("pullend ptr:pullend")}}function s(e){e.off(r.touchEvents.start,a,I),e.off(r.touchEvents.move,t,E),e.off(r.touchEvents.end,n,I)}function o(){s(l),S.off("page:beforeremove",o)}var l=i(e);if(l.hasClass("pull-to-refresh-content")||(l=l.find(".pull-to-refresh-content")),l&&0!==l.length){var p,d,c,m,u,h,f,g,v,b,w,C,y,x={},T=!1,k=!1,P=0,S=l.hasClass("page")?l:l.parents(".page"),M=!1;(S.find(".navbar").length>0||S.parents(".navbar-fixed, .navbar-through").length>0||S.hasClass("navbar-fixed")||S.hasClass("navbar-through"))&&(M=!0),S.hasClass("no-navbar")&&(M=!1),M||l.addClass("pull-to-refresh-no-navbar"),f=l,f.attr("data-ptr-distance")?C=!0:w=44;var I=!("touchstart"!==r.touchEvents.start||!r.support.passiveListener)&&{passive:!0,capture:!1},E=!!r.support.passiveListener&&{passive:!1,capture:!1};if(l.on(r.touchEvents.start,a,I),l.on(r.touchEvents.move,t,E),l.on(r.touchEvents.end,n,I),0!==S.length){for(var O=0;O=v-S,y=d.hasClass("navbar-hidden"),x=c.hasClass("toolbar-hidden"),T=p&&p.hasClass("toolbar-hidden"),w?r.params.showBarsOnPageScrollEnd&&(C="show"):C=m>u?r.params.showBarsOnPageScrollTop||u<=44?"show":"hide":u>44?"hide":"show","show"===C?(h&&n&&y&&(r.showNavbar(d),e.removeClass("no-navbar-by-scroll"),y=!1),f&&s&&x&&(r.showToolbar(c),e.removeClass("no-toolbar-by-scroll"),x=!1),g&&o&&T&&(r.showToolbar(p),e.removeClass("no-tabbar-by-scroll"),T=!1)):(h&&n&&!y&&(r.hideNavbar(d),e.addClass("no-navbar-by-scroll"),y=!0),f&&s&&!x&&(r.hideToolbar(c),e.addClass("no-toolbar-by-scroll"),x=!0),g&&o&&!T&&(r.hideToolbar(p),e.addClass("no-tabbar-by-scroll"),T=!0)),m=u)}e=i(e);var t=e.find(".page-content");if(0!==t.length){var n=(r.params.hideNavbarOnPageScroll||t.hasClass("hide-navbar-on-scroll")||t.hasClass("hide-bars-on-scroll"))&&!(t.hasClass("keep-navbar-on-scroll")||t.hasClass("keep-bars-on-scroll")),s=(r.params.hideToolbarOnPageScroll||t.hasClass("hide-toolbar-on-scroll")||t.hasClass("hide-bars-on-scroll"))&&!(t.hasClass("keep-toolbar-on-scroll")||t.hasClass("keep-bars-on-scroll")),o=(r.params.hideTabbarOnPageScroll||t.hasClass("hide-tabbar-on-scroll"))&&!t.hasClass("keep-tabbar-on-scroll");if(n||s||o){var l=t.parents("."+r.params.viewClass);if(0!==l.length){var p,d=l.find(".navbar"),c=l.find(".toolbar");o&&(p=l.find(".tabbar"),0===p.length&&(p=l.parents("."+r.params.viewsClass).find(".tabbar")));var m,u,h=d.length>0,f=c.length>0,g=p&&p.length>0;m=u=t[0].scrollTop;var v,b,w,C,y,x,T,k=f&&s?c[0].offsetHeight:0,P=g&&o?p[0].offsetHeight:0,S=P||k;t.on("scroll",a),t[0].f7ScrollToolbarsHandler=a}}}},r.destroyScrollToolbars=function(e){e=i(e);var a=e.find(".page-content");if(0!==a.length){a[0].f7ScrollToolbarsHandler&&a.off("scroll",a[0].f7ScrollToolbarsHandler)}},r.materialTabbarSetHighlight=function(e,a){i(e).each(function(){var e=i(this);if((a=a||e.find(".tab-link.active"))&&a.length>0){var t,n;e.hasClass("tabbar-scrollable")?(t=a[0].offsetWidth+"px",n=a[0].offsetLeft+"px"):(t=1/e.find(".tab-link").length*100+"%",n=100*(r.rtl?-a.index():a.index())+"%"),e.find(".tab-link-highlight").css({width:t}).transform("translate3d("+n+",0,0)")}})},r.initPageMaterialTabbar=function(e){function a(){r.materialTabbarSetHighlight(t)}e=i(e);var t=e.find(".tabbar");0===t.length&&e.hasClass("tabbar")&&(t=e),t.length>0&&(0===t.find(".tab-link-highlight").length&&t.find(".toolbar-inner").append(''),a(),r.onResize(a),e.once("page:beforeremove",function(){r.offResize(a)}))},r.initMaterialTabbar=function(e){return r.initPageMaterialTabbar(e)},r.showTab=function(e,a,t,n){var s=i(e);if(2===arguments.length&&"boolean"==typeof arguments[1]&&(e=arguments[0],t=arguments[1]),3===arguments.length&&"boolean"==typeof arguments[1]&&"boolean"==typeof arguments[2]&&(e=arguments[0],t=arguments[1],n=arguments[2]),void 0===t&&(t=!0),0===s.length)return!1;if(s.hasClass("active"))return n&&s.trigger("show tab:show"),!1;var o=s.parent(".tabs");if(0===o.length)return!1;r.allowSwipeout=!0;var l=o.parent().hasClass("tabs-animated-wrap");if(l){o.parent()[t?"removeClass":"addClass"]("not-animated");var p=100*(r.rtl?s.index():-s.index());o.transform("translate3d("+p+"%,0,0)")}var d,c=o.parent().hasClass("tabs-swipeable-wrap");c&&(d=o.parent()[0].swiper,d.activeIndex!==s.index()&&d.slideTo(s.index(),t?void 0:0,!1));var m=o.children(".tab.active").removeClass("active").trigger("hide tab:hide");if(s.addClass("active"),s.trigger("show tab:show"),!l&&!c&&s.find(".navbar").length>0){var u;u=s.hasClass(r.params.viewClass)?s[0]:s.parents("."+r.params.viewClass)[0],r.sizeNavbars(u)}if(a?a=i(a):(!(a=i("string"==typeof e?'.tab-link[href="'+e+'"]':'.tab-link[href="#'+s.attr("id")+'"]'))||a&&0===a.length)&&i("[data-tab]").each(function(){s.is(i(this).attr("data-tab"))&&(a=i(this))}),0!==a.length){var h;if(m&&m.length>0){var f=m.attr("id");f&&(h=i('.tab-link[href="#'+f+'"]')),(!h||h&&0===h.length)&&i("[data-tab]").each(function(){m.is(i(this).attr("data-tab"))&&(h=i(this))})}if(a&&a.length>0&&(a.addClass("active"),r.params.material)){var g=a.parents(".tabbar");g.length>0&&(0===g.find(".tab-link-highlight").length&&g.find(".toolbar-inner").append(''),r.materialTabbarSetHighlight(g,a))}return h&&h.length>0&&h.removeClass("active"),!0}},r.accordionToggle=function(e){e=i(e),0!==e.length&&(e.hasClass("accordion-item-expanded")?r.accordionClose(e):r.accordionOpen(e))},r.accordionOpen=function(e){e=i(e);var a=e.parents(".accordion-list").eq(0),t=e.children(".accordion-item-content");0===t.length&&(t=e.find(".accordion-item-content"));var n=a.length>0&&e.parent().children(".accordion-item-expanded");n.length>0&&r.accordionClose(n),t.css("height",t[0].scrollHeight+"px").transitionEnd(function(){if(e.hasClass("accordion-item-expanded")){t.transition(0),t.css("height","auto");t[0].clientLeft;t.transition(""),e.trigger("opened accordion:opened")}else t.css("height",""),e.trigger("closed accordion:closed")}),e.trigger("open accordion:open"),e.addClass("accordion-item-expanded")},r.accordionClose=function(e){e=i(e);var a=e.children(".accordion-item-content");0===a.length&&(a=e.find(".accordion-item-content")),e.removeClass("accordion-item-expanded"),a.transition(0),a.css("height",a[0].scrollHeight+"px");a[0].clientLeft;a.transition(""),a.css("height","").transitionEnd(function(){if(e.hasClass("accordion-item-expanded")){a.transition(0),a.css("height","auto");a[0].clientLeft;a.transition(""),e.trigger("opened accordion:opened")}else a.css("height",""),e.trigger("closed accordion:closed")}),e.trigger("close accordion:close")},r.initFastClicks=function(){function e(e){var a,t=i(e),n=t.parents(r.params.activeStateElements);return t.is(r.params.activeStateElements)&&(a=t), +n.length>0&&(a=a?a.add(n):n),a||t}function a(e){var a=e.parents(".page-content, .panel");return 0!==a.length&&("yes"!==a.prop("scrollHandlerSet")&&(a.on("scroll",function(){clearTimeout(R),clearTimeout(W)}),a.prop("scrollHandlerSet","yes")),!0)}function t(){H&&H.addClass("active-state")}function n(e){H&&(H.removeClass("active-state"),H=null)}function s(e){var a="input select textarea label".split(" ");return!!(e.nodeName&&a.indexOf(e.nodeName.toLowerCase())>=0)}function o(e){var a="button input textarea select".split(" ");return!(!document.activeElement||e===document.activeElement||document.activeElement===document.body)&&!(a.indexOf(e.nodeName.toLowerCase())>=0)}function l(e){var a=i(e);return("input"!==e.nodeName.toLowerCase()||"file"!==e.type&&"range"!==e.type)&&(("select"!==e.nodeName.toLowerCase()||!r.device.android)&&(!(a.hasClass("no-fastclick")||a.parents(".no-fastclick").length>0)&&(!r.params.fastClicksExclude||!a.is(r.params.fastClicksExclude))))}function p(e){if(document.activeElement===e)return!1;var a=e.nodeName.toLowerCase(),t="button checkbox file image radio submit".split(" ");return!e.disabled&&!e.readOnly&&("textarea"===a||("select"===a?!r.device.android:"input"===a&&t.indexOf(e.type)<0||void 0))}function d(e){e=i(e);var a=!0;return(e.is("label")||e.parents("label").length>0)&&(a=!r.device.android&&!(!r.device.ios||!e.is("input"))),a}function c(a){e(a.target).addClass("active-state"),"which"in a&&3===a.which&&setTimeout(function(){i(".active-state").removeClass("active-state")},0),r.params.material&&r.params.materialRipple&&(S=a.pageX,M=a.pageY,v(a.target,a.pageX,a.pageY))}function m(e){i(".active-state").removeClass("active-state"),r.params.material&&r.params.materialRipple&&b()}function u(e){i(".active-state").removeClass("active-state"),r.params.material&&r.params.materialRipple&&w()}function h(e){var a=r.params.materialRippleElements,t=i(e);if(t.is(a))return!t.hasClass("no-ripple")&&t;if(t.parents(a).length>0){var n=t.parents(a).eq(0);return!n.hasClass("no-ripple")&&n}return!1}function f(e,a,t){if(t){var r=t[0].getBoundingClientRect(),n={x:e-r.left,y:a-r.top},s=r.height,o=r.width,l=Math.max(Math.pow(Math.pow(s,2)+Math.pow(o,2),.5),48);q=i('
                          '),t.prepend(q);q[0].clientLeft;j="translate3d("+(o/2-n.x)+"px, "+(s/2-n.y)+"px, 0) scale(1)",q.transform(j)}}function g(){if(q){var e=q,a=setTimeout(function(){e.remove()},400);q.addClass("ripple-wave-fill").transform(j.replace("scale(1)","scale(1.01)")).transitionEnd(function(){clearTimeout(a);var e=i(this).addClass("ripple-wave-out").transform(j.replace("scale(1)","scale(1.01)"));a=setTimeout(function(){e.remove()},700),setTimeout(function(){e.transitionEnd(function(){clearTimeout(a),i(this).remove()})},0)}),q=F=void 0}}function v(e,t,r){if(!(F=h(e))||0===F.length)return void(F=void 0);a(F)?W=setTimeout(function(){f(S,M,F)},80):f(S,M,F)}function b(){clearTimeout(W),g()}function w(){q?g():F&&!B?(clearTimeout(W),f(S,M,F),setTimeout(g,0)):g()}function C(e){var a=e.changedTouches[0],t=document.createEvent("MouseEvents"),n="click";r.device.android&&"select"===E.nodeName.toLowerCase()&&(n="mousedown"),t.initMouseEvent(n,!0,!0,window,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),t.forwardedTouchEvent=!0,E.dispatchEvent(t)}function y(s){if(B=!1,N=!1,s.targetTouches.length>1)return H&&n(),!0;if(s.touches.length>1&&H&&n(),r.params.tapHold&&(A&&clearTimeout(A),A=setTimeout(function(){s&&s.touches&&s.touches.length>1||(N=!0,s.preventDefault(),i(s.target).trigger("taphold"))},r.params.tapHoldDelay)),Y&&clearTimeout(Y),!(V=l(s.target)))return O=!1,!0;if(r.device.ios||r.device.android&&"getSelection"in window){var p=window.getSelection();if(p.rangeCount&&p.focusNode!==document.body&&(!p.isCollapsed||document.activeElement===p.focusNode))return D=!0,!0;D=!1}r.device.android&&o(s.target)&&document.activeElement.blur(),O=!0,E=s.target,I=(new Date).getTime(),S=s.targetTouches[0].pageX,M=s.targetTouches[0].pageY,r.device.ios&&(L=void 0,i(E).parents().each(function(){var e=this;e.scrollHeight>e.offsetHeight&&!L&&(L=e,L.f7ScrollTop=L.scrollTop)})),s.timeStamp-zt||Math.abs(s-M)>t)&&(a=!0)}else a=!0;a&&(O=!1,E=null,B=!0,r.params.tapHold&&clearTimeout(A),r.params.activeState&&(clearTimeout(R),n()),r.params.material&&r.params.materialRipple&&b())}}function T(e){if(clearTimeout(R),clearTimeout(A),!O)return!D&&V&&(r.device.android&&!e.cancelable||e.preventDefault()),!0;if(document.activeElement===e.target)return r.params.activeState&&n(),r.params.material&&r.params.materialRipple&&w(),!0;if(D||e.preventDefault(),e.timeStamp-z159?(E=null,!1):(E.focus(),!1);E.focus()}return document.activeElement&&E!==document.activeElement&&document.activeElement!==document.body&&"label"!==E.nodeName.toLowerCase()&&document.activeElement.blur(),e.preventDefault(),C(e),!1}function k(e){O=!1,E=null,clearTimeout(R),clearTimeout(A),r.params.activeState&&n(),r.params.material&&r.params.materialRipple&&w()}function P(e){var a=!1;return O?(E=null,O=!1,!0):"submit"===e.target.type&&0===e.detail||"file"===e.target.type||(E||s(e.target)||(a=!0),V||(a=!0),document.activeElement===E&&(a=!0),e.forwardedTouchEvent&&(a=!0),e.cancelable||(a=!0),r.params.tapHold&&r.params.tapHoldPreventClicks&&N&&(a=!1),a||(e.stopImmediatePropagation(),e.stopPropagation(),E?(d(E)||B)&&e.preventDefault():e.preventDefault(),E=null),Y=setTimeout(function(){V=!1},r.device.ios||r.device.androidChrome?100:400),r.params.tapHold&&(A=setTimeout(function(){N=!1},r.device.ios||r.device.androidChrome?100:400)),a)}r.params.activeState&&i("html").addClass("watch-active-state"),r.device.ios&&r.device.webView&&window.addEventListener("touchstart",function(){});var S,M,I,E,O,D,L,z,B,N,A,H,R,V,Y,q,F,j,W;r.support.touch?(document.addEventListener("click",P,!0),document.addEventListener("touchstart",y),document.addEventListener("touchmove",x),document.addEventListener("touchend",T),document.addEventListener("touchcancel",k)):r.params.activeState&&(document.addEventListener("mousedown",c),document.addEventListener("mousemove",m),document.addEventListener("mouseup",u)),r.params.material&&r.params.materialRipple&&document.addEventListener("contextmenu",function(e){H&&n(),w()})},r.initClickEvents=function(){function e(e){var a=i(this),t=i(e.target);if(!("a"===a[0].nodeName.toLowerCase()||a.parents("a").length>0||"a"===t[0].nodeName.toLowerCase()||t.parents("a").length>0)){var n;if(r.params.scrollTopOnNavbarClick&&a.is(".navbar .center")){var s=a.parents(".navbar");n=s.parents(".page-content"),0===n.length&&(s.parents(".page").length>0&&(n=s.parents(".page").find(".page-content")),0===n.length&&s.nextAll(".pages").length>0&&(n=s.nextAll(".pages").find(".page:not(.page-on-left):not(.page-on-right):not(.cached)").find(".page-content")))}r.params.scrollTopOnStatusbarClick&&a.is(".statusbar-overlay")&&(n=i(".popup.modal-in").length>0?i(".popup.modal-in").find(".page:not(.page-on-left):not(.page-on-right):not(.cached)").find(".page-content"):i(".panel.active").length>0?i(".panel.active").find(".page:not(.page-on-left):not(.page-on-right):not(.cached)").find(".page-content"):i(".views > .view.active").length>0?i(".views > .view.active").find(".page:not(.page-on-left):not(.page-on-right):not(.cached)").find(".page-content"):i(".views").find(".page:not(.page-on-left):not(.page-on-right):not(.cached)").find(".page-content")),n&&n.length>0&&(n.hasClass("tab")&&(n=n.parent(".tabs").children(".page-content.active")),n.length>0&&n.scrollTop(0,300))}}function a(e){var a=i(this),t=a.attr("href"),n="a"===a[0].nodeName.toLowerCase();if(n&&(a.is(r.params.externalLinks)||t&&t.indexOf("javascript:")>=0))return void(t&&"_system"===a.attr("target")&&(e.preventDefault(),window.open(t,"_system")));var l=a.dataset();if(a.hasClass("smart-select")&&r.smartSelectOpen&&r.smartSelectOpen(a),a.hasClass("open-panel")&&(1===i(".panel").length?i(".panel").hasClass("panel-left")?r.openPanel("left"):r.openPanel("right"):"right"===l.panel?r.openPanel("right"):r.openPanel("left")),a.hasClass("close-panel")&&r.closePanel(),a.hasClass("panel-overlay")&&(i(".panel.active").trigger("panel:overlay-click"),r.params.panelsCloseByOutside&&r.closePanel()),a.hasClass("open-popover")){var p;p=l.popover?l.popover:".popover",r.popover(p,a)}a.hasClass("close-popover")&&r.closeModal(".popover.modal-in");var d;a.hasClass("open-popup")&&(d=l.popup?l.popup:".popup",r.popup(d)),a.hasClass("close-popup")&&(d=l.popup?l.popup:".popup.modal-in",r.closeModal(d));var c;if(a.hasClass("open-login-screen")&&(c=l.loginScreen?l.loginScreen:".login-screen",r.loginScreen(c)),a.hasClass("close-login-screen")&&r.closeModal(".login-screen.modal-in"),a.hasClass("modal-overlay")&&(i(".modal.modal-in").length>0&&r.params.modalCloseByOutside&&r.closeModal(".modal.modal-in"),i(".actions-modal.modal-in").length>0&&r.params.actionsCloseByOutside&&r.closeModal(".actions-modal.modal-in"),i(".popover.modal-in").length>0&&r.params.popoverCloseByOutside&&r.closeModal(".popover.modal-in")),a.hasClass("popup-overlay")&&i(".popup.modal-in").length>0&&r.params.popupCloseByOutside&&r.closeModal(".popup.modal-in"),a.hasClass("picker-modal-overlay")&&i(".picker-modal.modal-in").length>0&&r.closeModal(".picker-modal.modal-in"),a.hasClass("close-picker")){var m=i(".picker-modal.modal-in");m.length>0?r.closeModal(m):(m=i(".popover.modal-in .picker-modal"),m.length>0&&r.closeModal(m.parents(".popover")))}if(a.hasClass("open-picker")){var u;u=l.picker?l.picker:".picker-modal",r.pickerModal(u,a)}var h;if(a.hasClass("tab-link")&&(h=!0,r.showTab(l.tab||a.attr("href"),a)),a.hasClass("swipeout-close")&&r.swipeoutClose(a.parents(".swipeout-opened")),a.hasClass("swipeout-delete"))if(l.confirm){var f=l.confirm,g=l.confirmTitle;g?r.confirm(f,g,function(){r.swipeoutDelete(a.parents(".swipeout"))},function(){l.closeOnCancel&&r.swipeoutClose(a.parents(".swipeout"))}):r.confirm(f,function(){r.swipeoutDelete(a.parents(".swipeout"))},function(){l.closeOnCancel&&r.swipeoutClose(a.parents(".swipeout"))})}else r.swipeoutDelete(a.parents(".swipeout"));if(a.hasClass("toggle-sortable")&&r.sortableToggle(l.sortable),a.hasClass("open-sortable")&&r.sortableOpen(l.sortable),a.hasClass("close-sortable")&&r.sortableClose(l.sortable),a.hasClass("accordion-item-toggle")||a.hasClass("item-link")&&a.parent().hasClass("accordion-item")){var v=a.parent(".accordion-item");0===v.length&&(v=a.parents(".accordion-item")),0===v.length&&(v=a.parents("li")),r.accordionToggle(v)}if(a.hasClass("floating-button")&&a.parent().hasClass("speed-dial")&&a.parent().toggleClass("speed-dial-opened"),a.hasClass("close-speed-dial")&&i(".speed-dial-opened").removeClass("speed-dial-opened"),(!r.params.ajaxLinks||a.is(r.params.ajaxLinks))&&n&&r.params.router){n&&e.preventDefault();var b=t&&t.length>0&&"#"!==t&&!h,w=l.template;if(b||a.hasClass("back")||w){var C;if(l.view?C=i(l.view)[0].f7View:(C=a.parents("."+r.params.viewClass)[0]&&a.parents("."+r.params.viewClass)[0].f7View)&&C.params.linksView&&("string"==typeof C.params.linksView?C=i(C.params.linksView)[0].f7View:C.params.linksView instanceof o&&(C=C.params.linksView)),C||r.mainView&&(C=r.mainView),!C)return;var y;if(w)t=void 0;else{if(t&&0===t.indexOf("#")&&"#"!==t){if(!C.params.domCache)return;y=t.split("#")[1]}if("#"===t&&!a.hasClass("back"))return}var x;void 0!==l.animatePages?x=l.animatePages:(a.hasClass("with-animation")&&(x=!0),a.hasClass("no-animation")&&(x=!1));var T={animatePages:x,ignoreCache:l.ignoreCache,force:l.force,reload:l.reload,reloadPrevious:l.reloadPrevious,pageName:y,pushState:l.pushState,url:t};if(r.params.template7Pages){T.contextName=l.contextName;var k=l.context;k&&(T.context=JSON.parse(k))}w&&w in s.templates&&(T.template=s.templates[w]),a.hasClass("back")?C.router.back(T):C.router.load(T)}}}function t(e){e.preventDefault()}if(i(document).on("click","a, .open-panel, .close-panel, .panel-overlay, .modal-overlay, .popup-overlay, .swipeout-delete, .swipeout-close, .close-popup, .open-popup, .open-popover, .open-login-screen, .close-login-screen .smart-select, .toggle-sortable, .open-sortable, .close-sortable, .accordion-item-toggle, .close-picker, .picker-modal-overlay",a),(r.params.scrollTopOnNavbarClick||r.params.scrollTopOnStatusbarClick)&&i(document).on("click",".statusbar-overlay, .navbar .center",e),r.support.touch&&!r.device.android){var n=!!r.support.passiveListener&&{passive:!1,capture:!1};i(document).on(r.params.fastClicks?"touchstart":"touchmove",".panel-overlay, .modal-overlay, .preloader-indicator-overlay, .popup-overlay, .searchbar-overlay",t,n)}};var f=[];r.getSize=function(){var e=r.root.offset();r.width=r.root[0].offsetWidth,r.height=r.root[0].offsetHeight,r.left=e.left,r.top=e.top},r.onResize=function(e){f.push(e)},r.offResize=function(e){for(var a=0;a=0)&&!(r.indexOf(s)>=0)&&s)if("select"===l&&n.prop("multiple"))r.push(s),a[s]=[],e.find('select[name="'+s+'"] option').each(function(){this.selected&&a[s].push(this.value)});else switch(o){case"checkbox":r.push(s),a[s]=[],e.find('input[name="'+s+'"]').each(function(){this.checked&&a[s].push(this.value)});break;case"radio":r.push(s),e.find('input[name="'+s+'"]').each(function(){this.checked&&(a[s]=this.value)});break;default:a[s]=n.val()}}),e.trigger("formToJSON formToData form:todata",{formData:a}),a},r.formToJSON=r.formToData,r.formFromData=function(e,a){if(e=i(e),1!==e.length)return!1;var t=["submit","image","button","file"],r=[];e.find("input, select, textarea").each(function(){var n=i(this),s=n.attr("name"),o=n.attr("type"),l=this.nodeName.toLowerCase();if(void 0!==a[s]&&null!==a[s]&&!(t.indexOf(o)>=0)&&!(r.indexOf(s)>=0)&&s){if("select"===l&&n.prop("multiple"))r.push(s),e.find('select[name="'+s+'"] option').each(function(){a[s].indexOf(this.value)>=0?this.selected=!0:this.selected=!1});else switch(o){case"checkbox":r.push(s),e.find('input[name="'+s+'"]').each(function(){a[s].indexOf(this.value)>=0?this.checked=!0:this.checked=!1});break;case"radio":r.push(s),e.find('input[name="'+s+'"]').each(function(){a[s]===this.value?this.checked=!0:this.checked=!1});break;default:n.val(a[s])}"select"!==l&&"input"!==l&&"textarea"!==l||n.trigger("change")}}),e.trigger("formFromJSON formFromData form:fromdata",{formData:a})},r.formFromJSON=r.formFromData,r.initFormsStorage=function(e){function a(){var e=i(this),a=e[0].id;if(a){var t=r.formToData(e);t&&(r.formStoreData(a,t),e.trigger("store form:storedata",{data:t}))}}function t(){n.off("change submit",a),e.off("page:beforeremove",t)}e=i(e);var n=e.find("form.store-data");0!==n.length&&(n.each(function(){var e=this.getAttribute("id");if(e){var a=r.formGetData(e);a&&r.formFromData(this,a)}}),n.on("change submit",a),e.on("page:beforeremove",t))},i(document).on("submit change","form.ajax-submit, form.ajax-submit-onchange",function(e){var a=i(this);if("change"!==e.type||a.hasClass("ajax-submit-onchange")){"submit"===e.type&&e.preventDefault();var t=(a.attr("method")||"GET").toUpperCase(),n=a.prop("enctype")||a.attr("enctype"),s=a.attr("action");if(s){var o;o="POST"===t?new FormData(a[0]):i.serializeObject(r.formToJSON(a[0]));var l=i.ajax({method:t,url:s,contentType:n,data:o,beforeSend:function(e){a.trigger("beforeSubmit form:beforesend",{data:o,xhr:e})},error:function(e){a.trigger("submitError form:error",{data:o,xhr:e})},success:function(e){a.trigger("submitted form:success",{data:e,xhr:l})}})}}}),r.resizeTextarea=function(e){if(e=i(e),e.hasClass("resizable")){e.css({height:""});var a=e[0].offsetHeight,t=a-e[0].clientHeight,r=e[0].scrollHeight;if(r+t>a){var n=r+t;e.css("height",n+"px")}}},r.resizableTextarea=function(e){function a(){clearTimeout(t),t=setTimeout(function(){r.resizeTextarea(e)},0)}if(e=i(e),0!==e.length){var t;return e[0].f7DestroyResizableTextarea=function(){e.off("change keydown keypress keyup paste cut",a)},e.on("change keydown keypress keyup paste cut",a)}},r.destroyResizableTextarea=function(e){e=i(e),e.length>0&&e.is("textarea")&&e[0].f7DestroyResizableTextarea?e[0].f7DestroyResizableTextarea():e.length>0&&e.find("textarea.resiable").each(function(){var e=this;e.f7DestroyResizableTextarea&&e.f7DestroyResizableTextarea()})},r.initPageResizableTextarea=function(e){e=i(e),e.find("textarea.resizable").each(function(){r.resizableTextarea(this)})},r.initPageMaterialInputs=function(e){e=i(e);e.find("textarea.resizable");e.find(".item-input").each(function(){var e=i(this),a=["checkbox","button","submit","range","radio","image"];e.find("input, select, textarea").each(function(){var t=i(this);a.indexOf(t.attr("type"))<0&&(e.addClass("item-input-field"),""!==t.val().trim()&&t.parents(".item-input, .input-field").add(t.parents(".item-inner")).addClass("not-empty-state"))}),e.parents(".input-item, .inputs-list").length>0||e.parents(".list-block").eq(0).addClass("inputs-list")})},r.initMaterialWatchInputs=function(){function e(e){var a=i(this),t=a.attr("type");if(!(r.indexOf(t)>=0)){a.add(a.parents(".item-input, .input-field")).add(a.parents(".item-inner").eq(0)).removeClass("not-empty-state").addClass("focus-state")}}function a(e){var a=i(this),t=a.val(),n=a.attr("type");if(!(r.indexOf(n)>=0)){var s=a.add(a.parents(".item-input, .input-field")).add(a.parents(".item-inner").eq(0));s.removeClass("focus-state"),t&&""!==t.trim()?s.removeClass("focus-state").addClass("not-empty-state"):s.removeClass("not-empty-state")}}function t(e){var a=i(this),t=a.val(),n=a.attr("type");if(!(r.indexOf(n)>=0)){var s=a.add(a.parents(".item-input, .input-field")).add(a.parents(".item-inner").eq(0));0!==s.length&&(t&&"string"==typeof t&&""!==t.trim()||Array.isArray(t)&&t.length>0?s.addClass("not-empty-state"):s.removeClass("not-empty-state"))}}var r=["checkbox","button","submit","range","radio","image"];i(document).on("change","input, textarea, select",t,!0),i(document).on("focus","input, textarea, select",e,!0),i(document).on("blur","input, textarea, select",a,!0)},r.pushStateQueue=[],r.pushStateClearQueue=function(){if(0!==r.pushStateQueue.length){var e,a=r.pushStateQueue.pop();!0===r.params.pushStateNoAnimation&&(e=!1),"back"===a.action&&r.router.back(a.view,{animatePages:e}),"loadPage"===a.action&&r.router.load(a.view,{url:a.stateUrl,animatePages:e,pushState:!1}),"loadContent"===a.action&&r.router.load(a.view,{content:a.stateContent,animatePages:e,pushState:!1}),"loadPageName"===a.action&&r.router.load(a.view,{pageName:a.statePageName,url:a.stateUrl,animatePages:e,pushState:!1})}},r.initPushState=function(){function e(e){if(!a){var t=r.mainView;if(t){var n=e.state;if(n||(n={viewIndex:r.views.indexOf(t),url:t.history[0]}),!(n.viewIndex<0)){var i,s=r.views[n.viewIndex],o=n&&n.url||void 0,l=n&&n.content||void 0,p=n&&n.pageName||void 0;!0===r.params.pushStateNoAnimation&&(i=!1),o!==s.url&&(s.history.indexOf(o)>=0?s.allowPageChange?r.router.back(s,{url:void 0,animatePages:i,pushState:!1,preloadOnly:!1}):r.pushStateQueue.push({action:"back",view:s}):l?s.allowPageChange?r.router.load(s,{content:l,animatePages:i,pushState:!1}):r.pushStateQueue.unshift({action:"loadContent",stateContent:l,view:s}):p?s.allowPageChange?r.router.load(s,{pageName:p,url:o,animatePages:i,pushState:!1}):r.pushStateQueue.unshift({action:"loadPageName",statePageName:p,view:s}):s.allowPageChange?r.router.load(s,{url:o,animatePages:i,pushState:!1}):r.pushStateQueue.unshift({action:"loadPage",stateUrl:o,view:s}))}}}}var a=!0;i(window).on("load",function(){setTimeout(function(){a=!1},0)}),document.readyState&&"complete"===document.readyState&&(a=!1),i(window).on("popstate",e)},r.swiper=function(e,a){return new Swiper(e,a)},r.initPageSwiper=function(e){function a(a){function t(){a.destroy(),e.off("page:beforeremove",t)}e.on("page:beforeremove",t)}e=i(e);var t=e.find(".swiper-init, .tabs-swipeable-wrap");0!==t.length&&t.each(function(){var e,t,n=i(this);n.hasClass("tabs-swipeable-wrap")&&(n.addClass("swiper-container").children(".tabs").addClass("swiper-wrapper").children(".tab").addClass("swiper-slide"),e=n.children(".tabs").children(".tab.active").index()),t=n.data("swiper")?JSON.parse(n.data("swiper")):n.dataset(),void 0===t.initialSlide&&void 0!==e&&(t.initialSlide=e),n.hasClass("tabs-swipeable-wrap")&&(t.onSlideChangeStart=function(e){r.showTab(e.slides.eq(e.activeIndex))}),a(r.swiper(n[0],t))})},r.reinitPageSwiper=function(e){e=i(e);var a=e.find(".swiper-init, .tabs-swipeable-wrap");if(0!==a.length)for(var t=0;t',l=a.params.lazyPhotoTemplate||'
                          {{#if @root.material}}{{@root.materialPreloaderHtml}}{{/if}}
                          ',p=a.params.objectTemplate||'
                          {{js "this.html || this"}}
                          ',d=a.params.captionTemplate||'
                          {{caption}}
                          ',c=a.params.navbarTemplate||'',m=a.params.toolbarTemplate||'
                          ',u=s.compile('
                          ")(a.params);a.activeIndex=a.params.initialSlide,a.openIndex=a.activeIndex,a.opened=!1,a.open=function(e){return void 0===e&&(e=a.activeIndex),e=parseInt(e,10),a.opened&&a.swiper?void a.swiper.slideTo(e):(a.opened=!0,a.openIndex=e,"standalone"===a.params.type&&r.root.append(u),"popup"===a.params.type&&(a.popup=r.popup('"),i(a.popup).on("popup:closed",a.onPopupClose)),"page"===a.params.type?(i(document).once("page:beforeinit",a.onPageBeforeInit),i(document).once("page:beforeremove",a.onPageBeforeRemove),a.params.view||(a.params.view=r.mainView),void a.params.view.loadContent(u)):(a.layout(a.openIndex),void(a.params.onOpen&&a.params.onOpen(a))))},a.close=function(){a.opened=!1,a.swiperContainer&&0!==a.swiperContainer.length&&(a.params.onClose&&a.params.onClose(a),a.attachEvents(!0),"standalone"===a.params.type&&a.container.removeClass("photo-browser-in").addClass("photo-browser-out").animationEnd(function(){a.container.remove()}),a.swiper.destroy(),a.swiper=a.swiperContainer=a.swiperWrapper=a.slides=void 0)},a.onPopupClose=function(e){a.close(),i(a.popup).off("page:beforeinit",a.onPopupClose)},a.onPageBeforeInit=function(e){"photo-browser-slides"===e.detail.page.name&&(a.layout(a.openIndex),a.params.onOpen&&a.params.onOpen(a))},a.onPageBeforeRemove=function(e){"photo-browser-slides"===e.detail.page.name&&a.close()},a.onSliderTransitionStart=function(e){a.activeIndex=e.activeIndex;var t=e.activeIndex+1,r=e.slides.length;if(a.params.loop&&(r-=2,t-=e.loopedSlides,t<1&&(t=r+t),t>r&&(t-=r)),a.container.find(".photo-browser-current").text(t),a.container.find(".photo-browser-total").text(r),i(".photo-browser-prev, .photo-browser-next").removeClass("photo-browser-link-inactive"),e.isBeginning&&!a.params.loop&&i(".photo-browser-prev").addClass("photo-browser-link-inactive"),e.isEnd&&!a.params.loop&&i(".photo-browser-next").addClass("photo-browser-link-inactive"),a.captions.length>0){a.captionsContainer.find(".photo-browser-caption-active").removeClass("photo-browser-caption-active");var n=a.params.loop?e.slides.eq(e.activeIndex).attr("data-swiper-slide-index"):a.activeIndex;a.captionsContainer.find('[data-caption-index="'+n+'"]').addClass("photo-browser-caption-active")}var s=e.slides.eq(e.previousIndex).find("video");s.length>0&&"pause"in s[0]&&s[0].pause(),a.params.onTransitionStart&&a.params.onTransitionStart(e)},a.onSliderTransitionEnd=function(e){a.params.onTransitionEnd&&a.params.onTransitionEnd(e)},a.layout=function(e){"page"===a.params.type?a.container=i(".photo-browser-swiper-container").parents(".view"):a.container=i(".photo-browser"),"standalone"===a.params.type&&(a.container.addClass("photo-browser-in"),r.sizeNavbars(a.container)),a.swiperContainer=a.container.find(".photo-browser-swiper-container"),a.swiperWrapper=a.container.find(".photo-browser-swiper-wrapper"),a.slides=a.container.find(".photo-browser-slide"),a.captionsContainer=a.container.find(".photo-browser-captions"),a.captions=a.container.find(".photo-browser-caption");var t={nextButton:a.params.nextButton||".photo-browser-next",prevButton:a.params.prevButton||".photo-browser-prev",indexButton:a.params.indexButton,initialSlide:e,spaceBetween:a.params.spaceBetween,speed:a.params.speed,loop:a.params.loop,lazyLoading:a.params.lazyLoading,lazyLoadingInPrevNext:a.params.lazyLoadingInPrevNext,lazyLoadingOnTransitionStart:a.params.lazyLoadingOnTransitionStart,preloadImages:!a.params.lazyLoading,zoom:a.params.zoom,zoomMax:a.params.zoomMax,zoomMin:a.params.zoomMin,onTap:function(e,t){a.params.onTap&&a.params.onTap(e,t)},onClick:function(e,t){a.params.exposition&&a.toggleExposition(),a.params.onClick&&a.params.onClick(e,t)},onDoubleTap:function(e,t){a.params.onDoubleTap&&a.params.onDoubleTap(e,t)},onTransitionStart:function(e){a.onSliderTransitionStart(e)},onTransitionEnd:function(e){a.onSliderTransitionEnd(e)},onSlideChangeStart:a.params.onSlideChangeStart,onSlideChangeEnd:a.params.onSlideChangeEnd,onLazyImageLoad:function(e,t,r){a.params.onLazyImageLoad&&a.params.onLazyImageLoad(a,t,r)},onLazyImageReady:function(e,t,r){i(t).removeClass("photo-browser-slide-lazy"),a.params.onLazyImageReady&&a.params.onLazyImageReady(a,t,r)}};a.params.swipeToClose&&"page"!==a.params.type&&(t.onTouchStart=a.swipeCloseTouchStart,t.onTouchMoveOpposite=a.swipeCloseTouchMove,t.onTouchEnd=a.swipeCloseTouchEnd),a.swiper=r.swiper(a.swiperContainer,t),0===e&&a.onSliderTransitionStart(a.swiper),a.attachEvents()},a.attachEvents=function(e){var t=e?"off":"on";a.container.find(".photo-browser-close-link")[t]("click",a.close)},a.exposed=!1,a.toggleExposition=function(){a.container&&a.container.toggleClass("photo-browser-exposed"),a.params.expositionHideCaptions&&a.captionsContainer.toggleClass("photo-browser-captions-exposed"),a.exposed=!a.exposed},a.enableExposition=function(){a.container&&a.container.addClass("photo-browser-exposed"),a.params.expositionHideCaptions&&a.captionsContainer.addClass("photo-browser-captions-exposed"),a.exposed=!0},a.disableExposition=function(){a.container&&a.container.removeClass("photo-browser-exposed"),a.params.expositionHideCaptions&&a.captionsContainer.removeClass("photo-browser-captions-exposed"),a.exposed=!1};var h,f,g,v,b,w=!1,C=!0,y=!1;return a.swipeCloseTouchStart=function(e,a){C&&(w=!0)},a.swipeCloseTouchMove=function(e,t){if(w){y||(y=!0,f="touchmove"===t.type?t.targetTouches[0].pageY:t.pageY,v=a.swiper.slides.eq(a.swiper.activeIndex),b=(new Date).getTime()),t.preventDefault(),g="touchmove"===t.type?t.targetTouches[0].pageY:t.pageY,h=f-g;var r=1-Math.abs(h)/300;v.transform("translate3d(0,"+-h+"px,0)"),a.swiper.container.css("opacity",r).transition(0)}},a.swipeCloseTouchEnd=function(e,t){if(w=!1,!y)return void(y=!1);y=!1,C=!1;var n=Math.abs(h),i=(new Date).getTime()-b;if(i<300&&n>20||i>=300&&n>100)return void setTimeout(function(){"standalone"===a.params.type&&a.close(),"popup"===a.params.type&&r.closeModal(a.popup),a.params.onSwipeToClose&&a.params.onSwipeToClose(a),C=!0},0);0!==n?v.addClass("transitioning").transitionEnd(function(){C=!0,v.removeClass("transitioning")}):C=!0,a.swiper.container.css("opacity","").transition(""),v.transform("")},a};r.photoBrowser=function(e){return new g(e)};var v=function(e){function a(e){var a=o.input.val();o.params.source&&o.params.source(o,a,function(e){var t="",r=o.params.limit?Math.min(o.params.limit,e.length):e.length;o.items=e;var n,i +;for(o.params.highlightMatches&&(a=a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),i=new RegExp("("+a+")","i")),n=0;n$1"):l})}""===t&&""===a&&o.params.dropdownPlaceholderText&&(t+=o.dropdownPlaceholderTemplate({text:o.params.dropdownPlaceholderText})),o.dropdown.find("ul").html(t)})}function t(e){for(var a,t=i(this),r=0;r0||o.close()}var o=this,l={popupCloseText:"Close",backText:"Back",searchbarPlaceholderText:"Search...",searchbarCancelText:"Cancel",openWithAnimation:!0,autoFocus:!1,openIn:"page",backOnSelect:!1,notFoundText:"Nothing found",requestSourceOnOpen:!1,valueProperty:"id",textProperty:"text",highlightMatches:!0,updateInputValueOnSelect:!0,expandInput:!1,preloaderColor:!1,preloader:!1};e=e||{};for(var p in l)void 0===e[p]&&(e[p]=l[p]);o.params=e,o.params.opener&&(o.opener=i(o.params.opener));var d=o.params.view;if(!o.params.view&&o.opener&&o.opener.length){if(d=o.opener.parents("."+r.params.viewClass),0===d.length)return;d=d[0].f7View}if(!o.params.input||(o.input=i(o.params.input),0!==o.input.length||"dropdown"!==o.params.openIn)){o.value=o.params.value||[],o.id=(new Date).getTime(),o.inputType=o.params.multiple?"checkbox":"radio",o.inputName=o.inputType+"-"+o.id;var c=r.params.material;o.params.backOnSelect;if("dropdown"!==o.params.openIn){o.itemTemplate=s.compile(o.params.itemTemplate||'
                        • ');var m=o.params.pageTitle||"";!m&&o.opener&&o.opener.length&&(m=o.opener.find(".item-title").text());var u,h,f="autocomplete-"+o.inputName,g=o.params.navbarTheme,v=o.params.formTheme,b="",w="";o.navbarTemplate=s.compile(o.params.navbarTemplate||''),u=o.navbarTemplate({pageTitle:m,backText:o.params.backText,popupCloseText:o.params.popupCloseText,openIn:o.params.openIn,navbarTheme:g,inPopup:"popup"===o.params.openIn,inPage:"page"===o.params.openIn,material:c,preloader:o.params.preloader,preloaderColor:o.params.preloaderColor,animated:o.params.openWithAnimation}),"page"===o.params.openIn?(h="static",o.opener?(o.opener.parents(".navbar-through").length>0&&(h="through"),o.opener.parents(".navbar-fixed").length>0&&(h="fixed"),w=o.opener.parents(".page").hasClass("no-toolbar")?"no-toolbar":"",b=o.opener.parents(".page").hasClass("no-navbar")?"no-navbar":"navbar-"+h):d.container&&((i(d.container).hasClass("navbar-through")||i(d.container).find(".navbar-through").length>0)&&(h="through"),(i(d.container).hasClass("navbar-fixed")||i(d.container).find(".navbar-fixed").length>0)&&(h="fixed"),w=i(d.activePage.container).hasClass("no-toolbar")?"no-toolbar":"",b=i(d.activePage.container).hasClass("no-navbar")?"no-navbar":"navbar-"+h)):h="fixed";var C='
                          ',y=("through"===h?u:"")+'
                          '+("fixed"===h?u:"")+C+'
                          '+("static"===h?u:"")+'
                            • '+o.params.notFoundText+'
                              '}else o.dropdownItemTemplate=s.compile(o.params.dropdownItemTemplate||'
                            • '),o.dropdownPlaceholderTemplate=s.compile(o.params.dropdownPlaceholderTemplate||'
                            • {{text}}
                            • '),o.dropdownTemplate=s.compile(o.params.dropdownTemplate||'
                                {{#if preloader}}
                                {{#if material}}{{materialPreloaderHtml}}{{/if}}
                                {{/if}}
                                ');return o.popup=void 0,o.dropdown=void 0,o.positionDropDown=function(){var e=o.input.parents(".list-block"),a=o.input.parents(".page-content"),t=(parseInt(a.css("padding-top"),10),parseInt(a.css("padding-top"),10)),r=e.length>0?e.offset().left-e.parent().offset().left:0,n=o.input.offset().left-(e.length>0?e.offset().left:0),i=o.input.offset().top-(a.offset().top-a[0].scrollTop),s=a[0].scrollHeight-t-(i+a[0].scrollTop)-o.input[0].offsetHeight;o.dropdown.css({left:(e.length>0?r:n)+"px",top:i+a[0].scrollTop+o.input[0].offsetHeight+"px",width:(e.length>0?e[0].offsetWidth:o.input[0].offsetWidth)+"px"}),o.dropdown.children(".autocomplete-dropdown-inner").css({maxHeight:s+"px",paddingLeft:e.length>0&&!o.params.expandInput?n-(c?16:15)+"px":""})},o.pageInit=function(e){function a(e){if(o.params.source){var a,t;o.params.source(o,e,function(r){var n="",i=o.params.limit?Math.min(o.params.limit,r.length):r.length;for(o.items=r,a=0;a0);if(p){if("checkbox"===o.inputType&&!s.checked){for(e=0;e0&&o.params.expandInput&&o.input.parents(".item-content").addClass("item-content-dropdown-expand"),o.positionDropDown(),o.input.parents(".page-content").append(o.dropdown),o.dropdown.addClass("autocomplete-dropdown-in"),o.input.trigger("input"),r.onResize(o.positionDropDown),o.params.onOpen&&o.params.onOpen(o)}else i(document).once("page:init",".autocomplete-page",o.pageInit),"popup"===o.params.openIn?(o.popup=r.popup('",!0,o.params.openWithAnimation),o.popup=i(o.popup),o.params.autoFocus&&(o.params.openWithAnimation?o.popup.once("popup:opened",o.autoFocus):o.autoFocus.bind(o.popup)()),o.popup.once("popup:closed",function(){o.popup=void 0,o.opened=!1,o.params.onClose&&o.params.onClose(o)})):(o.params.autoFocus&&i(document).once(o.params.openWithAnimation?"page:afteranimation":"page:init",".autocomplete-page",o.autoFocus),d.router.load({content:y,animatePages:o.params.openWithAnimation}),i(document).once("page:back",".autocomplete-page",function(){o.opened=!1,o.params.onClose&&o.params.onClose(o)}))},o.close=function(e){if(o.opened){if("dropdown"===o.params.openIn){if(e&&"blur"===e.type&&o.dropdown.find("label.active-state").length>0)return;o.dropdown.removeClass("autocomplete-dropdown-in").remove(),o.input.parents(".item-content-dropdown-expand").removeClass("item-content-dropdown-expand"),o.opened=!1,r.offResize(o.positionDropDown),o.params.onClose&&o.params.onClose(o)}"popup"===o.params.openIn&&o.popup&&r.closeModal(o.popup)}},o.initEvents=function(e){var t=e?"off":"on";"dropdown"!==o.params.openIn&&o.opener&&o.opener[t]("click",o.open),"dropdown"===o.params.openIn&&o.input&&(o.input[t]("focus",o.open),o.input[t]("input",a),r.device.android?i("html")[t]("click",n):o.input[t]("blur",o.close)),e&&o.dropdown&&(o.dropdown=null)},o.init=function(){o.initEvents()},o.destroy=function(){o.initEvents(!0),o=null},o.init(),o}};r.autocomplete=function(e){return new v(e)};var b=function(e){function a(){var e=!1;return p.params.convertToPopover||p.params.onlyInPopover?(!p.inline&&p.params.input&&(p.params.onlyInPopover?e=!0:r.device.ios?e=!!r.device.ipad:r.width>=768&&(e=!0)),e):e}function t(){return!!(p.opened&&p.container&&p.container.length>0&&p.container.parents(".popover").length>0)}function n(){if(p.opened)for(var e=0;es){var d=t.scrollTop()+l-s;d+s>o&&(r=d+s-o+i,s===o&&(r=p.container.height()),t.css({"padding-bottom":r+"px"})),t.scrollTop(d,300)}}}function o(e){t()||(p.input&&p.input.length>0?e.target!==p.input[0]&&0===i(e.target).parents(".picker-modal").length&&p.close():0===i(e.target).parents(".picker-modal").length&&p.close())}function l(){p.opened=!1,p.input&&p.input.length>0&&(p.input.parents(".page-content").css({"padding-bottom":""}),r.params.material&&p.input.trigger("blur")),p.params.onClose&&p.params.onClose(p),p.container.find(".picker-items-col").each(function(){p.destroyPickerCol(this)})}var p=this,d={updateValuesOnMomentum:!1,updateValuesOnTouchmove:!0,rotateEffect:!1,momentumRatio:7,freeMode:!1,closeByOutsideClick:!0,scrollToInput:!0,inputReadOnly:!0,convertToPopover:!0,onlyInPopover:!1,toolbar:!0,toolbarCloseText:"Done",toolbarTemplate:''};e=e||{};for(var c in d)void 0===e[c]&&(e[c]=d[c]);p.params=e,p.cols=[],p.initialized=!1,p.inline=!!p.params.container;var m=r.device.ios||navigator.userAgent.toLowerCase().indexOf("safari")>=0&&navigator.userAgent.toLowerCase().indexOf("chrome")<0&&!r.device.android;return p.setValue=function(e,a){var t=0;if(0===p.cols.length)return p.value=e,void p.updateValue(e);for(var r=0;r=0||(p.value=r,p.displayValue=n,p.params.onChange&&p.params.onChange(p,p.value,p.displayValue),p.input&&p.input.length>0&&(i(p.input).val(p.params.formatValue?p.params.formatValue(p,p.value,p.displayValue):p.value.join(" ")),i(p.input).trigger("change")))},p.initPickerCol=function(e,a){function t(){w=i.requestAnimationFrame(function(){u.updateItems(void 0,void 0,0),t()})}function n(e){y||C||(e.preventDefault(),C=!0,x=T="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,k=(new Date).getTime(),L=!0,S=I=i.getTranslate(u.wrapper[0],"y"))}function s(e){if(C){e.preventDefault(),L=!1,T="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,y||(i.cancelAnimationFrame(w),y=!0,S=I=i.getTranslate(u.wrapper[0],"y"),u.wrapper.transition(0));I=S+(T-x),M=void 0,Ib&&(I=b+Math.pow(I-b,.8),M="max"),u.wrapper.transform("translate3d(0,"+I+"px,0)"),u.updateItems(void 0,I,0,p.params.updateValuesOnTouchmove),O=I-E||I,D=(new Date).getTime(),E=I}}function o(e){if(!C||!y)return void(C=y=!1);C=y=!1,u.wrapper.transition(""),M&&("min"===M?u.wrapper.transform("translate3d(0,"+v+"px,0)"):u.wrapper.transform("translate3d(0,"+b+"px,0)")),P=(new Date).getTime();var a;P-k>300?a=I:(Math.abs(O/(P-D)),a=I+O*p.params.momentumRatio),a=Math.max(Math.min(a,b),v);var r=-Math.floor((a-b)/f);p.params.freeMode||(a=-r*f+b),u.wrapper.transform("translate3d(0,"+parseInt(a,10)+"px,0)"),u.updateItems(r,a,"",!0),p.params.updateValuesOnMomentum&&(t(),u.wrapper.transitionEnd(function(){i.cancelAnimationFrame(w)})),setTimeout(function(){L=!0},100)}function l(e){if(L){i.cancelAnimationFrame(w);var a=i(this).attr("data-picker-value");u.setValue(a)}}var d=i(e),c=d.index(),u=p.cols[c];if(!u.divider){u.container=d,u.wrapper=u.container.find(".picker-items-col-wrapper"),u.items=u.wrapper.find(".picker-item");var h,f,g,v,b;u.replaceValues=function(e,a){u.destroyEvents(),u.values=e,u.displayValues=a;var t=p.columnHTML(u,!0);u.wrapper.html(t),u.items=u.wrapper.find(".picker-item"),u.calcSize(),u.setValue(u.values[0],0,!0),u.initEvents()};u.calcSize=function(){p.params.rotateEffect&&(u.container.removeClass("picker-items-col-absolute"),u.width||u.container.css({width:""}));var e,a;e=0,a=u.container[0].offsetHeight,h=u.wrapper[0].offsetHeight,f=u.items[0].offsetHeight,g=f*u.items.length,v=a/2-g+f/2,b=a/2-f/2,u.width&&(e=u.width,parseInt(e,10)===e&&(e+="px"),u.container.css({width:e})),p.params.rotateEffect&&(u.width||(u.items.each(function(){var a=i(this).children("span");e=Math.max(e,a[0].offsetWidth)}),u.container.css({width:e+2+"px"})),u.container.addClass("picker-items-col-absolute"))},u.calcSize(),u.wrapper.transform("translate3d(0,"+b+"px,0)").transition(0);var w;u.setValue=function(e,a,r){void 0===a&&(a="");var n=u.wrapper.find('.picker-item[data-picker-value="'+e+'"]').index();if(void 0!==n&&-1!==n){var s=-n*f+b;u.wrapper.transition(a),u.wrapper.transform("translate3d(0,"+s+"px,0)"),p.params.updateValuesOnMomentum&&u.activeIndex&&u.activeIndex!==n&&(i.cancelAnimationFrame(w),u.wrapper.transitionEnd(function(){i.cancelAnimationFrame(w)}),t()),u.updateItems(n,s,a,r)}},u.updateItems=function(e,a,t,r){void 0===a&&(a=i.getTranslate(u.wrapper[0],"y")),void 0===e&&(e=-Math.round((a-b)/f)),e<0&&(e=0),e>=u.items.length&&(e=u.items.length-1);var n=u.activeIndex;u.activeIndex=e,u.wrapper.find(".picker-selected").removeClass("picker-selected"),u.items.transition(t);var s=u.items.eq(e).addClass("picker-selected").transform("");if(p.params.rotateEffect){Math.floor((a-b)/f);u.items.each(function(){var e=i(this),t=e.index()*f,r=b-a,n=t-r,s=n/f,o=Math.ceil(u.height/f/2)+1,l=-18*s;l>180&&(l=180),l<-180&&(l=-180),Math.abs(s)>o?e.addClass("picker-item-far"):e.removeClass("picker-item-far"),e.transform("translate3d(0, "+(-a+b)+"px, "+(m?-110:0)+"px) rotateX("+l+"deg)")})}(r||void 0===r)&&(u.value=s.attr("data-picker-value"),u.displayValue=u.displayValues?u.displayValues[e]:u.value,n!==e&&(u.onChange&&u.onChange(p,u.value,u.displayValue),p.updateValue()))},a&&u.updateItems(0,b,0);var C,y,x,T,k,P,S,M,I,E,O,D,L=!0;u.initEvents=function(e){var a=e?"off":"on",t=!!r.support.passiveListener&&{passive:!1,capture:!1};u.container[a](r.touchEvents.start,n,t),u.container[a](r.touchEvents.move,s,t),u.container[a](r.touchEvents.end,o,t),u.items[a]("click",l)},u.destroyEvents=function(){u.initEvents(!0)},u.container[0].f7DestroyPickerCol=function(){u.destroyEvents()},u.initEvents()}},p.destroyPickerCol=function(e){e=i(e),"f7DestroyPickerCol"in e[0]&&e[0].f7DestroyPickerCol()},r.onResize(n),p.columnHTML=function(e,a){var t="",r="";if(e.divider)r+='
                                '+e.content+"
                                ";else{for(var n=0;n'+(e.displayValues?e.displayValues[n]:e.values[n])+"";r+='
                                '+t+"
                                "}return a?t:r},p.layout=function(){var e,a="",t="";p.cols=[];var r="";for(e=0;e'+(p.params.toolbar?p.params.toolbarTemplate.replace(/{{closeText}}/g,p.params.toolbarCloseText):"")+'
                                '+r+'
                                ',p.pickerHTML=a},p.params.input&&(p.input=i(p.params.input),p.input.length>0&&(p.params.inputReadOnly&&p.input.prop("readOnly",!0),p.inline||p.input.on("click",s),p.params.inputReadOnly&&p.input.on("focus mousedown",function(e){e.preventDefault()}))),!p.inline&&p.params.closeByOutsideClick&&i("html").on("click",o),p.opened=!1,p.open=function(){var e=a();p.opened||(p.layout(),e?(p.pickerHTML='
                                '+p.pickerHTML+"
                                ",p.popover=r.popover(p.pickerHTML,p.params.input,!0),p.container=i(p.popover).find(".picker-modal"),i(p.popover).on("popover:close",function(){l()})):p.inline?(p.container=i(p.pickerHTML),p.container.addClass("picker-modal-inline"),i(p.params.container).append(p.container)):(p.container=i(r.pickerModal(p.pickerHTML)),i(p.container).on("picker:close",function(){l()})),p.container[0].f7Picker=p,p.container.find(".picker-items-col").each(function(){var e=!0;(!p.initialized&&p.params.value||p.initialized&&p.value)&&(e=!1),p.initPickerCol(this,e)}),p.initialized?p.value&&p.setValue(p.value,0):p.value?p.setValue(p.value,0):p.params.value&&p.setValue(p.params.value,0),p.input&&p.input.length>0&&r.params.material&&p.input.trigger("focus")),p.opened=!0,p.initialized=!0,p.params.onOpen&&p.params.onOpen(p)},p.close=function(){if(p.opened&&!p.inline)return t()?void r.closeModal(p.popover):void r.closeModal(p.container)},p.destroy=function(){p.close(),p.params.input&&p.input.length>0&&p.input.off("click focus",s),i("html").off("click",o),r.offResize(n)},p.inline?p.open():!p.initialized&&p.params.value&&p.setValue(p.params.value),p};r.picker=function(e){return new b(e)};var w=function(e){function a(){var e=!1;return p.params.convertToPopover||p.params.onlyInPopover?(!p.inline&&p.params.input&&(p.params.onlyInPopover?e=!0:r.device.ios?e=!!r.device.ipad:r.width>=768&&(e=!0)),e):e}function t(){return!!(p.opened&&p.container&&p.container.length>0&&p.container.parents(".popover").length>0)}function n(e){e=new Date(e);var a=e.getFullYear(),t=e.getMonth(),r=t+1,n=e.getDate(),i=e.getDay();return p.params.dateFormat.replace(/yyyy/g,a).replace(/yy/g,(a+"").substring(2)).replace(/mm/g,r<10?"0"+r:r).replace(/m(\W+)/g,r+"$1").replace(/MM/g,p.params.monthNames[t]).replace(/M(\W+)/g,p.params.monthNamesShort[t]+"$1").replace(/dd/g,n<10?"0"+n:n).replace(/d(\W+)/g,n+"$1").replace(/DD/g,p.params.dayNames[i]).replace(/D(\W+)/g,p.params.dayNamesShort[i]+"$1")}function s(e){if(e.preventDefault(),!p.opened&&(p.open(),p.params.scrollToInput&&!a()&&!r.params.material)){var t=p.input.parents(".page-content");if(0===t.length)return;var n,i=parseInt(t.css("padding-top"),10),s=parseInt(t.css("padding-bottom"),10),o=t[0].offsetHeight-i-p.container.height(),l=t[0].scrollHeight-i-p.container.height(),d=p.input.offset().top-i+p.input[0].offsetHeight;if(d>o){var c=t.scrollTop()+d-o;c+o>l&&(n=c+o-l+s,o===l&&(n=p.container.height()),t.css({"padding-bottom":n+"px"})),t.scrollTop(c,300)}}}function o(e){t()||(p.input&&p.input.length>0?e.target!==p.input[0]&&0===i(e.target).parents(".picker-modal").length&&p.close():0===i(e.target).parents(".picker-modal").length&&p.close())}function l(){p.opened=!1,p.input&&p.input.length>0&&(p.input.parents(".page-content").css({"padding-bottom":""}),r.params.material&&p.input.trigger("blur")),p.params.onClose&&p.params.onClose(p),p.destroyCalendarEvents()}var p=this,d={monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDay:1,weekendDays:[0,6],multiple:!1,rangePicker:!1,dateFormat:"yyyy-mm-dd",direction:"horizontal",minDate:null,maxDate:null,disabled:null,events:null,rangesClasses:null,touchMove:!0,animate:!0,closeOnSelect:!1,monthPicker:!0,monthPickerTemplate:'
                                ',yearPicker:!0,yearPickerTemplate:'
                                ',weekHeader:!0,closeByOutsideClick:!0,scrollToInput:!0,inputReadOnly:!0,convertToPopover:!0,onlyInPopover:!1,toolbar:!0,toolbarCloseText:"Done",headerPlaceholder:"Select date",header:r.params.material,footer:r.params.material,toolbarTemplate:'
                                {{monthPicker}}{{yearPicker}}
                                ',headerTemplate:'
                                {{placeholder}}
                                ',footerTemplate:''};e=e||{};for(var c in d)void 0===e[c]&&(e[c]=d[c]);p.params=e,p.initialized=!1,p.inline=!!p.params.container,p.isH="horizontal"===p.params.direction;var m=p.isH&&r.rtl?-1:1;return p.animating=!1,p.addValue=function(e){if(p.params.multiple){p.value||(p.value=[]);for(var a,t=0;t0){p.wrapper.find(".picker-calendar-day-selected").removeClass("picker-calendar-day-selected");var s;if(p.params.rangePicker&&2===p.value.length)for(a=new Date(p.value[0]).getTime();a<=new Date(p.value[1]).getTime();a+=864e5)s=new Date(a),p.wrapper.find('.picker-calendar-day[data-date="'+s.getFullYear()+"-"+s.getMonth()+"-"+s.getDate()+'"]').addClass("picker-calendar-day-selected");else for(a=0;a0||r.params.material&&p.params.header){if(p.params.formatValue)t=p.params.formatValue(p,p.value);else{for(t=[],a=0;a0&&p.container.find(".picker-calendar-selected-date").text(t),p.input&&p.input.length>0&&!e&&(i(p.input).val(t),i(p.input).trigger("change"))}},p.initCalendarEvents=function(){function e(e){o||s||(s=!0,l=u="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,d=u="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,h=(new Date).getTime(),C=0,T=!0,x=void 0,g=v=p.monthsTranslate)}function a(e){if(s){if(c="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,u="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,void 0===x&&(x=!!(x||Math.abs(u-d)>Math.abs(c-l))),p.isH&&x)return void(s=!1);if(e.preventDefault(),p.animating)return void(s=!1);T=!1,o||(o=!0,b=p.wrapper[0].offsetWidth,w=p.wrapper[0].offsetHeight,p.wrapper.transition(0)),y=p.isH?c-l:u-d,C=y/(p.isH?b:w),v=100*(p.monthsTranslate*m+C),p.wrapper.transform("translate3d("+(p.isH?v:0)+"%, "+(p.isH?0:v)+"%, 0)")}}function t(e){if(!s||!o)return void(s=o=!1);s=o=!1,f=(new Date).getTime(),f-h<300?Math.abs(y)<10?p.resetMonth():y>=10?r.rtl?p.nextMonth():p.prevMonth():r.rtl?p.prevMonth():p.nextMonth():C<=-.5?r.rtl?p.prevMonth():p.nextMonth():C>=.5?r.rtl?p.nextMonth():p.prevMonth():p.resetMonth(),setTimeout(function(){T=!0},100)}function n(e){if(T){var a=i(e.target).parents(".picker-calendar-day");if(0===a.length&&i(e.target).hasClass("picker-calendar-day")&&(a=i(e.target)),0!==a.length&&!a.hasClass("picker-calendar-day-disabled")){p.params.rangePicker||(a.hasClass("picker-calendar-day-next")&&p.nextMonth(),a.hasClass("picker-calendar-day-prev")&&p.prevMonth());var t=a.attr("data-year"),r=a.attr("data-month"),n=a.attr("data-day");p.params.onDayClick&&p.params.onDayClick(p,a[0],t,r,n),(!a.hasClass("picker-calendar-day-selected")||p.params.multiple||p.params.rangePicker)&&p.addValue(new Date(t,r,n,0,0,0)),p.params.closeOnSelect&&(p.params.rangePicker&&2===p.value.length||!p.params.rangePicker)&&p.close()}}}var s,o,l,d,c,u,h,f,g,v,b,w,C,y,x,T=!0;p.container.find(".picker-calendar-prev-month").on("click",p.prevMonth),p.container.find(".picker-calendar-next-month").on("click",p.nextMonth),p.container.find(".picker-calendar-prev-year").on("click",p.prevYear),p.container.find(".picker-calendar-next-year").on("click",p.nextYear),p.wrapper.on("click",n);var k=!("touchstart"!==r.touchEvents.start||!r.support.passiveListener)&&{passive:!0,capture:!1},P=!!r.support.passiveListener&&{passive:!1,capture:!1};p.params.touchMove&&(p.wrapper.on(r.touchEvents.start,e,k),p.wrapper.on(r.touchEvents.move,a,P),p.wrapper.on(r.touchEvents.end,t,k)),p.container[0].f7DestroyCalendarEvents=function(){p.container.find(".picker-calendar-prev-month").off("click",p.prevMonth),p.container.find(".picker-calendar-next-month").off("click",p.nextMonth),p.container.find(".picker-calendar-prev-year").off("click",p.prevYear),p.container.find(".picker-calendar-next-year").off("click",p.nextYear),p.wrapper.off("click",n),p.params.touchMove&&(p.wrapper.off(r.touchEvents.start,e,k),p.wrapper.off(r.touchEvents.move,a,P),p.wrapper.off(r.touchEvents.end,t,k))}},p.destroyCalendarEvents=function(e){"f7DestroyCalendarEvents"in p.container[0]&&p.container[0].f7DestroyCalendarEvents()},p.dateInRange=function(e,a){var t,r=!1;if(!a)return!1;if(Array.isArray(a))for(t=0;t=new Date(a[t].from).getTime()&&(r=!0):a[t].from?e>=new Date(a[t].from).getTime()&&(r=!0):a[t].to&&e<=new Date(a[t].to).getTime()&&(r=!0):e===new Date(a[t]).getTime()&&(r=!0);else a.from||a.to?a.from&&a.to?e<=new Date(a.to).getTime()&&e>=new Date(a.from).getTime()&&(r=!0):a.from?e>=new Date(a.from).getTime()&&(r=!0):a.to&&e<=new Date(a.to).getTime()&&(r=!0):"function"==typeof a&&(r=a(new Date(e)));return r},p.daysInMonth=function(e){var a=new Date(e);return new Date(a.getFullYear(),a.getMonth()+1,0).getDate()},p.monthHTML=function(e,a){e=new Date(e);var t=e.getFullYear(),r=e.getMonth();e.getDate();"next"===a&&(e=11===r?new Date(t+1,0):new Date(t,r+1,1)),"prev"===a&&(e=0===r?new Date(t-1,11):new Date(t,r-1,1)), +"next"!==a&&"prev"!==a||(r=e.getMonth(),t=e.getFullYear());var n=p.daysInMonth(new Date(e.getFullYear(),e.getMonth()).getTime()-864e6),i=p.daysInMonth(e),s=new Date(e.getFullYear(),e.getMonth()).getDay();0===s&&(s=7);var o,l,d,c,m,u,h=[],f="",g=p.params.firstDay-1+0,v=(new Date).setHours(0,0,0,0),b=p.params.minDate?new Date(p.params.minDate).getTime():null,w=p.params.maxDate?new Date(p.params.maxDate).getTime():null;if(p.value&&p.value.length)for(l=0;l6?y-1-7+p.params.firstDay:y-1+p.params.firstDay,k="";if(x<0?(x=n+x+1,k+=" picker-calendar-day-prev",o=new Date(r-1<0?t-1:t,r-1<0?11:r-1,x).getTime()):(x+=1,x>i?(x-=i,k+=" picker-calendar-day-next",o=new Date(r+1>11?t+1:t,r+1>11?0:r+1,x).getTime()):o=new Date(t,r,x).getTime()),o===v&&(k+=" picker-calendar-day-today"),p.params.rangePicker&&2===h.length?o>=h[0]&&o<=h[1]&&(k+=" picker-calendar-day-selected"):h.indexOf(o)>=0&&(k+=" picker-calendar-day-selected"),p.params.weekendDays.indexOf(T)>=0&&(k+=" picker-calendar-day-weekend"),u=!1,p.params.events&&p.dateInRange(o,p.params.events)&&(u=!0),u&&(k+=" picker-calendar-day-has-events"),p.params.rangesClasses)for(c=0;cw)&&(m=!0),p.params.disabled&&p.dateInRange(o,p.params.disabled)&&(m=!0),m&&(k+=" picker-calendar-day-disabled"),o=new Date(o);var P=o.getFullYear(),S=o.getMonth();C+='
                                '+x+"
                                "}f+='
                                '+C+"
                                "}return f='
                                '+f+"
                                "},p.animating=!1,p.updateCurrentMonthYear=function(e){void 0===e?(p.currentMonth=parseInt(p.months.eq(1).attr("data-month"),10),p.currentYear=parseInt(p.months.eq(1).attr("data-year"),10)):(p.currentMonth=parseInt(p.months.eq("next"===e?p.months.length-1:0).attr("data-month"),10),p.currentYear=parseInt(p.months.eq("next"===e?p.months.length-1:0).attr("data-year"),10)),p.container.find(".current-month-value").text(p.params.monthNames[p.currentMonth]),p.container.find(".current-year-value").text(p.currentYear)},p.onMonthChangeStart=function(e){p.updateCurrentMonthYear(e),p.months.removeClass("picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next");var a="next"===e?p.months.length-1:0;p.months.eq(a).addClass("picker-calendar-month-current"),p.months.eq("next"===e?a-1:a+1).addClass("next"===e?"picker-calendar-month-prev":"picker-calendar-month-next"),p.params.onMonthYearChangeStart&&p.params.onMonthYearChangeStart(p,p.currentYear,p.currentMonth)},p.onMonthChangeEnd=function(e,a){p.animating=!1;var t,r,n;p.wrapper.find(".picker-calendar-month:not(.picker-calendar-month-prev):not(.picker-calendar-month-current):not(.picker-calendar-month-next)").remove(),void 0===e&&(e="next",a=!0),a?(p.wrapper.find(".picker-calendar-month-next, .picker-calendar-month-prev").remove(),r=p.monthHTML(new Date(p.currentYear,p.currentMonth),"prev"),t=p.monthHTML(new Date(p.currentYear,p.currentMonth),"next")):n=p.monthHTML(new Date(p.currentYear,p.currentMonth),e),("next"===e||a)&&p.wrapper.append(n||t),("prev"===e||a)&&p.wrapper.prepend(n||r),p.months=p.wrapper.find(".picker-calendar-month"),p.setMonthsTranslate(p.monthsTranslate),p.params.onMonthAdd&&p.params.onMonthAdd(p,"next"===e?p.months.eq(p.months.length-1)[0]:p.months.eq(0)[0]),p.params.onMonthYearChangeEnd&&p.params.onMonthYearChangeEnd(p,p.currentYear,p.currentMonth)},p.setMonthsTranslate=function(e){e=e||p.monthsTranslate||0,void 0===p.monthsTranslate&&(p.monthsTranslate=e),p.months.removeClass("picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next");var a=100*-(e+1)*m,t=100*-e*m,r=100*-(e-1)*m;p.months.eq(0).transform("translate3d("+(p.isH?a:0)+"%, "+(p.isH?0:a)+"%, 0)").addClass("picker-calendar-month-prev"),p.months.eq(1).transform("translate3d("+(p.isH?t:0)+"%, "+(p.isH?0:t)+"%, 0)").addClass("picker-calendar-month-current"),p.months.eq(2).transform("translate3d("+(p.isH?r:0)+"%, "+(p.isH?0:r)+"%, 0)").addClass("picker-calendar-month-next")},p.nextMonth=function(e){void 0!==e&&"object"!=typeof e||(e="",p.params.animate||(e=0));var a=parseInt(p.months.eq(p.months.length-1).attr("data-month"),10),t=parseInt(p.months.eq(p.months.length-1).attr("data-year"),10),r=new Date(t,a),n=r.getTime(),s=!p.animating;if(p.params.maxDate&&n>new Date(p.params.maxDate).getTime())return p.resetMonth();if(p.monthsTranslate--,a===p.currentMonth){var o=100*-p.monthsTranslate*m,l=i(p.monthHTML(n,"next")).transform("translate3d("+(p.isH?o:0)+"%, "+(p.isH?0:o)+"%, 0)").addClass("picker-calendar-month-next");p.wrapper.append(l[0]),p.months=p.wrapper.find(".picker-calendar-month"),p.params.onMonthAdd&&p.params.onMonthAdd(p,p.months.eq(p.months.length-1)[0])}p.animating=!0,p.onMonthChangeStart("next");var d=100*p.monthsTranslate*m;p.wrapper.transition(e).transform("translate3d("+(p.isH?d:0)+"%, "+(p.isH?0:d)+"%, 0)"),s&&p.wrapper.transitionEnd(function(){p.onMonthChangeEnd("next")}),p.params.animate||p.onMonthChangeEnd("next")},p.prevMonth=function(e){void 0!==e&&"object"!=typeof e||(e="",p.params.animate||(e=0));var a=parseInt(p.months.eq(0).attr("data-month"),10),t=parseInt(p.months.eq(0).attr("data-year"),10),r=new Date(t,a+1,-1),n=r.getTime(),s=!p.animating;if(p.params.minDate&&nnew Date(p.params.maxDate).getTime())return!1;if(p.params.minDate&&rn?"next":"prev",s=p.monthHTML(new Date(e,a));p.monthsTranslate=p.monthsTranslate||0;var o,l,d=p.monthsTranslate,c=!p.animating;r>n?(p.monthsTranslate--,p.animating||p.months.eq(p.months.length-1).remove(),p.wrapper.append(s),p.months=p.wrapper.find(".picker-calendar-month"),o=100*-(d-1)*m,p.months.eq(p.months.length-1).transform("translate3d("+(p.isH?o:0)+"%, "+(p.isH?0:o)+"%, 0)").addClass("picker-calendar-month-next")):(p.monthsTranslate++,p.animating||p.months.eq(0).remove(),p.wrapper.prepend(s),p.months=p.wrapper.find(".picker-calendar-month"),o=100*-(d+1)*m,p.months.eq(0).transform("translate3d("+(p.isH?o:0)+"%, "+(p.isH?0:o)+"%, 0)").addClass("picker-calendar-month-prev")),p.params.onMonthAdd&&p.params.onMonthAdd(p,"next"===i?p.months.eq(p.months.length-1)[0]:p.months.eq(0)[0]),p.animating=!0,p.onMonthChangeStart(i),l=100*p.monthsTranslate*m,p.wrapper.transition(t).transform("translate3d("+(p.isH?l:0)+"%, "+(p.isH?0:l)+"%, 0)"),c&&p.wrapper.transitionEnd(function(){p.onMonthChangeEnd(i,!0)}),p.params.animate||p.onMonthChangeEnd(i)},p.nextYear=function(){p.setYearMonth(p.currentYear+1)},p.prevYear=function(){p.setYearMonth(p.currentYear-1)},p.layout=function(){var e,a="",t="",r=p.value&&p.value.length?p.value[0]:(new Date).setHours(0,0,0,0),n=p.monthHTML(r,"prev"),i=p.monthHTML(r),s=p.monthHTML(r,"next"),o='
                                '+(n+i+s)+"
                                ",l="";if(p.params.weekHeader){for(e=0;e<7;e++){var d=e+p.params.firstDay>6?e-7+p.params.firstDay:e+p.params.firstDay,c=p.params.dayNamesShort[d];l+='
                                '+c+"
                                "}l='
                                '+l+"
                                "}t="picker-modal picker-calendar"+(p.params.rangePicker?" picker-calendar-range":"")+(p.params.cssClass?" "+p.params.cssClass:"");var m=p.params.toolbar?p.params.toolbarTemplate.replace(/{{closeText}}/g,p.params.toolbarCloseText):"";p.params.toolbar&&(m=p.params.toolbarTemplate.replace(/{{closeText}}/g,p.params.toolbarCloseText).replace(/{{monthPicker}}/g,p.params.monthPicker?p.params.monthPickerTemplate:"").replace(/{{yearPicker}}/g,p.params.yearPicker?p.params.yearPickerTemplate:"")),a='
                                '+(p.params.header?p.params.headerTemplate.replace(/{{closeText}}/g,p.params.toolbarCloseText).replace(/{{placeholder}}/g,p.params.headerPlaceholder):"")+(p.params.footer?p.params.footerTemplate.replace(/{{closeText}}/g,p.params.toolbarCloseText):"")+m+'
                                '+l+o+"
                                ",p.pickerHTML=a},p.params.input&&(p.input=i(p.params.input),p.input.length>0&&(p.params.inputReadOnly&&p.input.prop("readOnly",!0),p.inline||p.input.on("click",s),p.params.inputReadOnly&&p.input.on("focus mousedown",function(e){e.preventDefault()}))),!p.inline&&p.params.closeByOutsideClick&&i("html").on("click",o),p.opened=!1,p.open=function(){var e=a(),t=!1;p.opened||(p.value||p.params.value&&(p.value=p.params.value,t=!0),p.layout(),e?(p.pickerHTML='
                                '+p.pickerHTML+"
                                ",p.popover=r.popover(p.pickerHTML,p.params.input,!0),p.container=i(p.popover).find(".picker-modal"),i(p.popover).on("popover:close",function(){l()})):p.inline?(p.container=i(p.pickerHTML),p.container.addClass("picker-modal-inline"),i(p.params.container).append(p.container)):(p.container=i(r.pickerModal(p.pickerHTML)),i(p.container).on("picker:close",function(){l()})),p.container[0].f7Calendar=p,p.wrapper=p.container.find(".picker-calendar-months-wrapper"),p.months=p.wrapper.find(".picker-calendar-month"),p.updateCurrentMonthYear(),p.monthsTranslate=0,p.setMonthsTranslate(),p.initCalendarEvents(),t?p.updateValue():r.params.material&&p.value&&p.updateValue(!0),p.input&&p.input.length>0&&r.params.material&&p.input.trigger("focus")),p.opened=!0,p.initialized=!0,p.params.onMonthAdd&&p.months.each(function(){p.params.onMonthAdd(p,this)}),p.params.onOpen&&p.params.onOpen(p)},p.close=function(){if(p.opened&&!p.inline)return t()?void r.closeModal(p.popover):void r.closeModal(p.container)},p.destroy=function(){p.close(),p.params.input&&p.input.length>0&&p.input.off("click focus",s),i("html").off("click",o)},p.inline?p.open():!p.initialized&&p.params.value&&p.setValue(p.params.value),p};r.calendar=function(e){return new w(e)};var C;r.addNotification=function(e){if(e){void 0===e.media&&(e.media=r.params.notificationMedia),void 0===e.title&&(e.title=r.params.notificationTitle),void 0===e.subtitle&&(e.subtitle=r.params.notificationSubtitle),void 0===e.closeIcon&&(e.closeIcon=r.params.notificationCloseIcon),void 0===e.hold&&(e.hold=r.params.notificationHold),void 0===e.closeOnClick&&(e.closeOnClick=r.params.notificationCloseOnClick),void 0===e.button&&(e.button=r.params.notificationCloseButtonText&&{text:r.params.notificationCloseButtonText,close:!0}),C||(C=document.createElement("div")),e.material=r.params.material;var a=i(".notifications");0===a.length&&(r.root.append('
                                  '),a=i(".notifications"));var t=a.children("ul"),n=r.params.notificationTemplate||'{{#if custom}}
                                • {{custom}}
                                • {{else}}
                                • {{#if material}}
                                  {{js "this.message || this.title || this.subtitle"}}
                                  {{#if ../button}}{{#button}}{{/button}}{{/if}}
                                  {{else}}{{#if media}}
                                  {{media}}
                                  {{/if}}
                                  {{#if title}}
                                  {{title}}
                                  {{/if}}{{#if closeIcon}}
                                  {{/if}}
                                  {{#if subtitle}}
                                  {{subtitle}}
                                  {{/if}}{{#if message}}
                                  {{message}}
                                  {{/if}}{{/if}}
                                • {{/if}}';r._compiledTemplates.notification||(r._compiledTemplates.notification=s.compile(n)),C.innerHTML=r._compiledTemplates.notification(e);var o=i(C).children();o.on("click",function(a){var t=!1,n=i(a.target);e.material&&n.hasClass("button")&&e.button&&e.button.onClick&&e.button.onClick.call(n[0],a,o[0]),n.is(".close-notification")||i(a.target).parents(".close-notification").length>0?t=!0:(e.onClick&&e.onClick(a,o[0]),e.closeOnClick&&(t=!0)),t&&r.closeNotification(o[0],a)}),e.onClose&&o.data("f7NotificationOnClose",function(a){e.onClose(o[0],a)}),e.additionalClass&&o.addClass(e.additionalClass),e.hold&&setTimeout(function(){o.length>0&&r.closeNotification(o[0])},e.hold),r.params.material||r.closeNotification(t.children("li.notification-item:last-child")),t.append(o[0]),a.show();var l=o.outerHeight();return e.material?(a.transform("translate3d(0, "+l+"px, 0)"),a.transition(0),o[0].clientLeft,a.transform("translate3d(0, 0, 0)"),a.transition("")):(o.transform("translate3d(0,"+-l+"px,0)"),o.transition(0),o[0].clientLeft,o.transition(""),o.transform("translate3d(0,0px,0)")),a.transform("translate3d(0, 0,0)"),o.removeClass("notification-hidden"),o[0]}},r.closeNotification=function(e,a){if(e=i(e),0!==e.length&&!e.hasClass("notification-item-removing")){var t=i(".notifications"),r=e.outerHeight();e.css("height",r+"px").transition(0).addClass("notification-item-removing");e[0].clientLeft;e.css({height:"0px",marginBottom:"0px"}).transition(""),e.data("f7NotificationOnClose")&&e.data("f7NotificationOnClose")(a),0===t.find(".notification-item:not(.notification-item-removing)").length&&t.transform(""),e.addClass("notification-hidden").transitionEnd(function(){e.remove(),0===t.find(".notification-item").length&&t.hide()})}},r.initDataTable=function(e){function a(){if(t.length>0&&r.length>0){var a=e.find("tbody .checkbox-cell input:checked").length;e[a>0?"addClass":"removeClass"]("data-table-has-checked"),r.find(".data-table-selected-count").text(a)}}e=i(e);var t=e.find(".data-table-header"),r=e.find(".data-table-header-selected");e.on("change",'.checkbox-cell input[type="checkbox"]',function(t){if(!t.detail||!t.detail._sentByF7DataTable){var r=i(this),n=r[0].checked;r.parents("thead").length>0?e.find("tbody tr")[n?"addClass":"removeClass"]("data-table-row-selected").find("input").prop("checked",n).trigger("change",{_sentByF7DataTable:!0}):(r.parents("tr")[n?"addClass":"removeClass"]("data-table-row-selected"),n?e.find('tbody .checkbox-cell input[type="checkbox"]:checked').length===e.find("tbody tr").length&&e.find('thead .checkbox-cell input[type="checkbox"]').prop("checked",!0).trigger("change",{_sentByF7DataTable:!0}):e.find('thead .checkbox-cell input[type="checkbox"]').prop("checked",!1)),a()}}),a(),e.find("thead .sortable-cell").on("click",function(){var a,t=i(this),r=t.hasClass("sortable-active");r?(a=t.hasClass("sortable-desc")?"desc":"asc",t.removeClass("sortable-desc sortable-asc").addClass("sortable-"+("desc"===a?"asc":"desc"))):(e.find("thead .sortable-active").removeClass("sortable-active"),t.addClass("sortable-active"))}),e.hasClass("data-table-collapsible")&&e.find("tbody td:not(.checkbox-cell)").each(function(){var a=i(this).index(),t=i(this).attr("data-collapsible-title");t||""===t||i(this).attr("data-collapsible-title",e.find("thead th").eq(a).text())})},r.initPageDataTables=function(e){e=i(e);var a=e.find(".data-table-init");0===a.length&&e.hasClass("data-table-init")&&(a=e),a.each(function(){r.initDataTable(this)})},r.initTemplate7Templates=function(){window.Template7&&(Template7.templates=Template7.templates||r.params.templates||{},Template7.data=Template7.data||r.params.template7Data||{},Template7.cache=Template7.cache||{},r.templates=Template7.templates,r.template7Data=Template7.data,r.template7Cache=Template7.cache,r.params.precompileTemplates&&i('script[type="text/template7"]').each(function(){var e=i(this).attr("id");e&&(Template7.templates[e]=Template7.compile(i(this).html()))}))};var y=[];return r.initPlugins=function(){for(var e in r.plugins){var a=r.plugins[e](r,r.params[e]);a&&y.push(a)}},r.pluginHook=function(e){for(var a=0;a=0),(i||o||s)&&(e.os="ios",e.ios=!0),o&&!s&&(e.osVersion=o[2].replace(/_/g,"."),e.iphone=!0),i&&(e.osVersion=i[2].replace(/_/g,"."),e.ipad=!0),s&&(e.osVersion=s[3]?s[3].replace(/_/g,"."):null,e.iphone=!0),e.ios&&e.osVersion&&a.indexOf("Version/")>=0&&"10"===e.osVersion.split(".")[0]&&(e.osVersion=a.toLowerCase().split("version/")[1].split(" ")[0]),e.webView=(o||i||s)&&a.match(/.*AppleWebKit(?!.*Safari)/i),e.os&&"ios"===e.os){var l=e.osVersion.split(".");e.minimalUi=!e.webView&&(s||o)&&(1*l[0]==7?1*l[1]>=1:1*l[0]>7)&&t('meta[name="viewport"]').length>0&&t('meta[name="viewport"]').attr("content").indexOf("minimal-ui")>=0}var p=t(window).width(),d=t(window).height();e.needsStatusBar=function(){return!(!e.webView||p*d!=screen.width*screen.height)},e.statusBar=e.needsStatusBar();var c=[];if(e.pixelRatio=window.devicePixelRatio||1,c.push("pixel-ratio-"+Math.floor(e.pixelRatio)),e.pixelRatio>=2&&c.push("retina"),e.os&&(c.push(e.os,e.os+"-"+e.osVersion.split(".")[0],e.os+"-"+e.osVersion.replace(/\./g,"-")),"ios"===e.os))for(var m=parseInt(e.osVersion.split(".")[0],10),u=m-1;u>=6;u--)c.push("ios-gt-"+u);return e.statusBar?c.push("with-statusbar-overlay"):t("html").removeClass("with-statusbar-overlay"),c.length>0&&t("html").addClass(c.join(" ")),e}(),Framework7.prototype.plugins={},window.Swiper=function(e,a){function t(e){return Math.floor(e)}function r(){var e=f.params.autoplay,t=f.slides.eq(f.activeIndex);t.attr("data-swiper-autoplay")&&(e=t.attr("data-swiper-autoplay")||f.params.autoplay),f.autoplayTimeoutId=setTimeout(function(){f.params.loop?(f.fixLoop(),f._slideNext(),f.emit("onAutoplay",f)):f.isEnd?a.autoplayStopOnLast?f.stopAutoplay():(f._slideTo(0),f.emit("onAutoplay",f)):(f._slideNext(),f.emit("onAutoplay",f))},e)}function n(e,a){var t=g(e.target);if(!t.is(a))if("string"==typeof a)t=t.parents(a);else if(a.nodeType){var r;return t.parents().each(function(e,t){t===a&&(r=a)}),r?a:void 0}if(0!==t.length)return t[0]}function i(e,a){a=a||{};var t=window.MutationObserver||window.WebkitMutationObserver,r=new t(function(e){e.forEach(function(e){f.onResize(!0),f.emit("onObserverUpdate",f,e)})});r.observe(e,{attributes:void 0===a.attributes||a.attributes,childList:void 0===a.childList||a.childList,characterData:void 0===a.characterData||a.characterData}),f.observers.push(r)}function s(e,a){e=g(e);var t,r,n,i=f.rtl?-1:1;t=e.attr("data-swiper-parallax")||"0",r=e.attr("data-swiper-parallax-x"),n=e.attr("data-swiper-parallax-y"),r||n?(r=r||"0",n=n||"0"):f.isHorizontal()?(r=t,n="0"):(n=t,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*a*i+"%":r*a*i+"px",n=n.indexOf("%")>=0?parseInt(n,10)*a+"%":n*a+"px",e.transform("translate3d("+r+", "+n+",0px)")}function o(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof Swiper))return new Swiper(e,a);var l={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},p=a&&a.virtualTranslate;a=a||{};var d={};for(var c in a)if("object"!=typeof a[c]||null===a[c]||(a[c].nodeType||a[c]===window||a[c]===document||"undefined"!=typeof Dom7&&a[c]instanceof Dom7||"undefined"!=typeof jQuery&&a[c]instanceof jQuery))d[c]=a[c];else{d[c]={};for(var m in a[c])d[c][m]=a[c][m]}for(var u in l)if(void 0===a[u])a[u]=l[u];else if("object"==typeof a[u])for(var h in l[u])void 0===a[u][h]&&(a[u][h]=l[u][h]);var f=this;f.params=a,f.originalParams=d,f.classNames=[];var g=g;if(void 0!==g&&"undefined"!=typeof Dom7&&(g=Dom7),(void 0!==g||(g="undefined"==typeof Dom7?window.Dom7||window.Zepto||window.jQuery:Dom7))&&(f.$=g,f.currentBreakpoint=void 0,f.getActiveBreakpoint=function(){if(!f.params.breakpoints)return!1;var e,a=!1,t=[];for(e in f.params.breakpoints)f.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var r=0;r=window.innerWidth&&!a&&(a=e);return a||"max"},f.setBreakpoint=function(){var e=f.getActiveBreakpoint();if(e&&f.currentBreakpoint!==e){var a=e in f.params.breakpoints?f.params.breakpoints[e]:f.originalParams,t=f.params.loop&&a.slidesPerView!==f.params.slidesPerView;for(var r in a)f.params[r]=a[r];f.currentBreakpoint=e,t&&f.destroyLoop&&f.reLoop(!0)}},f.params.breakpoints&&f.setBreakpoint(),f.container=g(e),0!==f.container.length)){if(f.container.length>1){var v=[];return f.container.each(function(){v.push(new Swiper(this,a))}),v}f.container[0].swiper=f,f.container.data("swiper",f),f.classNames.push(f.params.containerModifierClass+f.params.direction),f.params.freeMode&&f.classNames.push(f.params.containerModifierClass+"free-mode"),f.support.flexbox||(f.classNames.push(f.params.containerModifierClass+"no-flexbox"),f.params.slidesPerColumn=1),f.params.autoHeight&&f.classNames.push(f.params.containerModifierClass+"autoheight"),(f.params.parallax||f.params.watchSlidesVisibility)&&(f.params.watchSlidesProgress=!0),f.params.touchReleaseOnEdges&&(f.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(f.params.effect)>=0&&(f.support.transforms3d?(f.params.watchSlidesProgress=!0,f.classNames.push(f.params.containerModifierClass+"3d")):f.params.effect="slide"),"slide"!==f.params.effect&&f.classNames.push(f.params.containerModifierClass+f.params.effect),"cube"===f.params.effect&&(f.params.resistanceRatio=0,f.params.slidesPerView=1,f.params.slidesPerColumn=1,f.params.slidesPerGroup=1,f.params.centeredSlides=!1,f.params.spaceBetween=0,f.params.virtualTranslate=!0),"fade"!==f.params.effect&&"flip"!==f.params.effect||(f.params.slidesPerView=1,f.params.slidesPerColumn=1,f.params.slidesPerGroup=1,f.params.watchSlidesProgress=!0,f.params.spaceBetween=0,void 0===p&&(f.params.virtualTranslate=!0)),f.params.grabCursor&&f.support.touch&&(f.params.grabCursor=!1),f.wrapper=f.container.children("."+f.params.wrapperClass),f.params.pagination&&(f.paginationContainer=g(f.params.pagination),f.params.uniqueNavElements&&"string"==typeof f.params.pagination&&f.paginationContainer.length>1&&1===f.container.find(f.params.pagination).length&&(f.paginationContainer=f.container.find(f.params.pagination)),"bullets"===f.params.paginationType&&f.params.paginationClickable?f.paginationContainer.addClass(f.params.paginationModifierClass+"clickable"):f.params.paginationClickable=!1,f.paginationContainer.addClass(f.params.paginationModifierClass+f.params.paginationType)),(f.params.nextButton||f.params.prevButton)&&(f.params.nextButton&&(f.nextButton=g(f.params.nextButton),f.params.uniqueNavElements&&"string"==typeof f.params.nextButton&&f.nextButton.length>1&&1===f.container.find(f.params.nextButton).length&&(f.nextButton=f.container.find(f.params.nextButton))),f.params.prevButton&&(f.prevButton=g(f.params.prevButton),f.params.uniqueNavElements&&"string"==typeof f.params.prevButton&&f.prevButton.length>1&&1===f.container.find(f.params.prevButton).length&&(f.prevButton=f.container.find(f.params.prevButton)))),f.isHorizontal=function(){return"horizontal"===f.params.direction},f.rtl=f.isHorizontal()&&("rtl"===f.container[0].dir.toLowerCase()||"rtl"===f.container.css("direction")),f.rtl&&f.classNames.push(f.params.containerModifierClass+"rtl"),f.rtl&&(f.wrongRTL="-webkit-box"===f.wrapper.css("display")),f.params.slidesPerColumn>1&&f.classNames.push(f.params.containerModifierClass+"multirow"),f.device.android&&f.classNames.push(f.params.containerModifierClass+"android"),f.container.addClass(f.classNames.join(" ")),f.translate=0,f.progress=0,f.velocity=0,f.lockSwipeToNext=function(){f.params.allowSwipeToNext=!1,!1===f.params.allowSwipeToPrev&&f.params.grabCursor&&f.unsetGrabCursor()},f.lockSwipeToPrev=function(){f.params.allowSwipeToPrev=!1,!1===f.params.allowSwipeToNext&&f.params.grabCursor&&f.unsetGrabCursor()},f.lockSwipes=function(){f.params.allowSwipeToNext=f.params.allowSwipeToPrev=!1,f.params.grabCursor&&f.unsetGrabCursor()},f.unlockSwipeToNext=function(){f.params.allowSwipeToNext=!0,!0===f.params.allowSwipeToPrev&&f.params.grabCursor&&f.setGrabCursor()},f.unlockSwipeToPrev=function(){f.params.allowSwipeToPrev=!0,!0===f.params.allowSwipeToNext&&f.params.grabCursor&&f.setGrabCursor()},f.unlockSwipes=function(){f.params.allowSwipeToNext=f.params.allowSwipeToPrev=!0,f.params.grabCursor&&f.setGrabCursor()},f.setGrabCursor=function(e){f.container[0].style.cursor="move",f.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",f.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",f.container[0].style.cursor=e?"grabbing":"grab"},f.unsetGrabCursor=function(){f.container[0].style.cursor=""},f.params.grabCursor&&f.setGrabCursor(),f.imagesToLoad=[],f.imagesLoaded=0,f.loadImage=function(e,a,t,r,n,i){function s(){i&&i()}var o;e.complete&&n?s():a?(o=new window.Image,o.onload=s,o.onerror=s,r&&(o.sizes=r),t&&(o.srcset=t),a&&(o.src=a)):s()},f.preloadImages=function(){function e(){void 0!==f&&null!==f&&f&&(void 0!==f.imagesLoaded&&f.imagesLoaded++, +f.imagesLoaded===f.imagesToLoad.length&&(f.params.updateOnImagesReady&&f.update(),f.emit("onImagesReady",f)))}f.imagesToLoad=f.container.find("img");for(var a=0;a1)for(e=0;ef.slides.length)break;a.push(f.slides.eq(r)[0])}else a.push(f.slides.eq(f.activeIndex)[0]);for(e=0;et?n:t}t&&f.wrapper.css("height",t+"px")},f.updateContainerSize=function(){var e,a;e=void 0!==f.params.width?f.params.width:f.container[0].clientWidth,a=void 0!==f.params.height?f.params.height:f.container[0].clientHeight,0===e&&f.isHorizontal()||0===a&&!f.isHorizontal()||(e=e-parseInt(f.container.css("padding-left"),10)-parseInt(f.container.css("padding-right"),10),a=a-parseInt(f.container.css("padding-top"),10)-parseInt(f.container.css("padding-bottom"),10),f.width=e,f.height=a,f.size=f.isHorizontal()?f.width:f.height)},f.updateSlidesSize=function(){f.slides=f.wrapper.children("."+f.params.slideClass),f.snapGrid=[],f.slidesGrid=[],f.slidesSizesGrid=[];var e,a=f.params.spaceBetween,r=-f.params.slidesOffsetBefore,n=0,i=0;if(void 0!==f.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*f.size),f.virtualSize=-a,f.rtl?f.slides.css({marginLeft:"",marginTop:""}):f.slides.css({marginRight:"",marginBottom:""});var s;f.params.slidesPerColumn>1&&(s=Math.floor(f.slides.length/f.params.slidesPerColumn)===f.slides.length/f.params.slidesPerColumn?f.slides.length:Math.ceil(f.slides.length/f.params.slidesPerColumn)*f.params.slidesPerColumn,"auto"!==f.params.slidesPerView&&"row"===f.params.slidesPerColumnFill&&(s=Math.max(s,f.params.slidesPerView*f.params.slidesPerColumn)));var o,l=f.params.slidesPerColumn,p=s/l,d=p-(f.params.slidesPerColumn*p-f.slides.length);for(e=0;e1){var m,u,h;"column"===f.params.slidesPerColumnFill?(u=Math.floor(e/l),h=e-u*l,(u>d||u===d&&h===l-1)&&++h>=l&&(h=0,u++),m=u+h*s/l,c.css({"-webkit-box-ordinal-group":m,"-moz-box-ordinal-group":m,"-ms-flex-order":m,"-webkit-order":m,order:m})):(h=Math.floor(e/p),u=e-h*p),c.css("margin-"+(f.isHorizontal()?"top":"left"),0!==h&&f.params.spaceBetween&&f.params.spaceBetween+"px").attr("data-swiper-column",u).attr("data-swiper-row",h)}"none"!==c.css("display")&&("auto"===f.params.slidesPerView?(o=f.isHorizontal()?c.outerWidth(!0):c.outerHeight(!0),f.params.roundLengths&&(o=t(o))):(o=(f.size-(f.params.slidesPerView-1)*a)/f.params.slidesPerView,f.params.roundLengths&&(o=t(o)),f.isHorizontal()?f.slides[e].style.width=o+"px":f.slides[e].style.height=o+"px"),f.slides[e].swiperSlideSize=o,f.slidesSizesGrid.push(o),f.params.centeredSlides?(r=r+o/2+n/2+a,0===n&&0!==e&&(r=r-f.size/2-a),0===e&&(r=r-f.size/2-a),Math.abs(r)<.001&&(r=0),i%f.params.slidesPerGroup==0&&f.snapGrid.push(r),f.slidesGrid.push(r)):(i%f.params.slidesPerGroup==0&&f.snapGrid.push(r),f.slidesGrid.push(r),r=r+o+a),f.virtualSize+=o+a,n=o,i++)}f.virtualSize=Math.max(f.virtualSize,f.size)+f.params.slidesOffsetAfter;var g;if(f.rtl&&f.wrongRTL&&("slide"===f.params.effect||"coverflow"===f.params.effect)&&f.wrapper.css({width:f.virtualSize+f.params.spaceBetween+"px"}),f.support.flexbox&&!f.params.setWrapperSize||(f.isHorizontal()?f.wrapper.css({width:f.virtualSize+f.params.spaceBetween+"px"}):f.wrapper.css({height:f.virtualSize+f.params.spaceBetween+"px"})),f.params.slidesPerColumn>1&&(f.virtualSize=(o+f.params.spaceBetween)*s,f.virtualSize=Math.ceil(f.virtualSize/f.params.slidesPerColumn)-f.params.spaceBetween,f.isHorizontal()?f.wrapper.css({width:f.virtualSize+f.params.spaceBetween+"px"}):f.wrapper.css({height:f.virtualSize+f.params.spaceBetween+"px"}),f.params.centeredSlides)){for(g=[],e=0;e1&&f.snapGrid.push(f.virtualSize-f.size)}0===f.snapGrid.length&&(f.snapGrid=[0]),0!==f.params.spaceBetween&&(f.isHorizontal()?f.rtl?f.slides.css({marginLeft:a+"px"}):f.slides.css({marginRight:a+"px"}):f.slides.css({marginBottom:a+"px"})),f.params.watchSlidesProgress&&f.updateSlidesOffset()}},f.updateSlidesOffset=function(){for(var e=0;ef.size&&(r=!0));for(a=f.activeIndex-1;a>=0;a--)f.slides[a]&&!r&&(n+=f.slides[a].swiperSlideSize,t++,n>f.size&&(r=!0))}else for(e=f.activeIndex+1;e=0&&i0&&s<=f.size||i<=0&&s>=f.size)&&f.slides.eq(t).addClass(f.params.slideVisibleClass)}r.progress=f.rtl?-n:n}}},f.updateProgress=function(e){void 0===e&&(e=f.translate||0);var a=f.maxTranslate()-f.minTranslate(),t=f.isBeginning,r=f.isEnd;0===a?(f.progress=0,f.isBeginning=f.isEnd=!0):(f.progress=(e-f.minTranslate())/a,f.isBeginning=f.progress<=0,f.isEnd=f.progress>=1),f.isBeginning&&!t&&f.emit("onReachBeginning",f),f.isEnd&&!r&&f.emit("onReachEnd",f),f.params.watchSlidesProgress&&f.updateSlidesProgress(e),f.emit("onProgress",f,f.progress)},f.updateActiveIndex=function(){var e,a,t,r=f.rtl?f.translate:-f.translate;for(a=0;a=f.slidesGrid[a]&&r=f.slidesGrid[a]&&r=f.slidesGrid[a]&&(e=a);f.params.normalizeSlideIndex&&(e<0||void 0===e)&&(e=0),t=Math.floor(e/f.params.slidesPerGroup),t>=f.snapGrid.length&&(t=f.snapGrid.length-1),e!==f.activeIndex&&(f.snapIndex=t,f.previousIndex=f.activeIndex,f.activeIndex=e,f.updateClasses(),f.updateRealIndex())},f.updateRealIndex=function(){f.realIndex=parseInt(f.slides.eq(f.activeIndex).attr("data-swiper-slide-index")||f.activeIndex,10)},f.updateClasses=function(){f.slides.removeClass(f.params.slideActiveClass+" "+f.params.slideNextClass+" "+f.params.slidePrevClass+" "+f.params.slideDuplicateActiveClass+" "+f.params.slideDuplicateNextClass+" "+f.params.slideDuplicatePrevClass);var e=f.slides.eq(f.activeIndex);e.addClass(f.params.slideActiveClass),a.loop&&(e.hasClass(f.params.slideDuplicateClass)?f.wrapper.children("."+f.params.slideClass+":not(."+f.params.slideDuplicateClass+')[data-swiper-slide-index="'+f.realIndex+'"]').addClass(f.params.slideDuplicateActiveClass):f.wrapper.children("."+f.params.slideClass+"."+f.params.slideDuplicateClass+'[data-swiper-slide-index="'+f.realIndex+'"]').addClass(f.params.slideDuplicateActiveClass));var t=e.next("."+f.params.slideClass).addClass(f.params.slideNextClass);f.params.loop&&0===t.length&&(t=f.slides.eq(0),t.addClass(f.params.slideNextClass));var r=e.prev("."+f.params.slideClass).addClass(f.params.slidePrevClass);if(f.params.loop&&0===r.length&&(r=f.slides.eq(-1),r.addClass(f.params.slidePrevClass)),a.loop&&(t.hasClass(f.params.slideDuplicateClass)?f.wrapper.children("."+f.params.slideClass+":not(."+f.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(f.params.slideDuplicateNextClass):f.wrapper.children("."+f.params.slideClass+"."+f.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(f.params.slideDuplicateNextClass),r.hasClass(f.params.slideDuplicateClass)?f.wrapper.children("."+f.params.slideClass+":not(."+f.params.slideDuplicateClass+')[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(f.params.slideDuplicatePrevClass):f.wrapper.children("."+f.params.slideClass+"."+f.params.slideDuplicateClass+'[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(f.params.slideDuplicatePrevClass)),f.paginationContainer&&f.paginationContainer.length>0){var n,i=f.params.loop?Math.ceil((f.slides.length-2*f.loopedSlides)/f.params.slidesPerGroup):f.snapGrid.length;if(f.params.loop?(n=Math.ceil((f.activeIndex-f.loopedSlides)/f.params.slidesPerGroup),n>f.slides.length-1-2*f.loopedSlides&&(n-=f.slides.length-2*f.loopedSlides),n>i-1&&(n-=i),n<0&&"bullets"!==f.params.paginationType&&(n=i+n)):n=void 0!==f.snapIndex?f.snapIndex:f.activeIndex||0,"bullets"===f.params.paginationType&&f.bullets&&f.bullets.length>0&&(f.bullets.removeClass(f.params.bulletActiveClass),f.paginationContainer.length>1?f.bullets.each(function(){g(this).index()===n&&g(this).addClass(f.params.bulletActiveClass)}):f.bullets.eq(n).addClass(f.params.bulletActiveClass)),"fraction"===f.params.paginationType&&(f.paginationContainer.find("."+f.params.paginationCurrentClass).text(n+1),f.paginationContainer.find("."+f.params.paginationTotalClass).text(i)),"progress"===f.params.paginationType){var s=(n+1)/i,o=s,l=1;f.isHorizontal()||(l=s,o=1),f.paginationContainer.find("."+f.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+o+") scaleY("+l+")").transition(f.params.speed)}"custom"===f.params.paginationType&&f.params.paginationCustomRender&&(f.paginationContainer.html(f.params.paginationCustomRender(f,n+1,i)),f.emit("onPaginationRendered",f,f.paginationContainer[0]))}f.params.loop||(f.params.prevButton&&f.prevButton&&f.prevButton.length>0&&(f.isBeginning?(f.prevButton.addClass(f.params.buttonDisabledClass),f.params.a11y&&f.a11y&&f.a11y.disable(f.prevButton)):(f.prevButton.removeClass(f.params.buttonDisabledClass),f.params.a11y&&f.a11y&&f.a11y.enable(f.prevButton))),f.params.nextButton&&f.nextButton&&f.nextButton.length>0&&(f.isEnd?(f.nextButton.addClass(f.params.buttonDisabledClass),f.params.a11y&&f.a11y&&f.a11y.disable(f.nextButton)):(f.nextButton.removeClass(f.params.buttonDisabledClass),f.params.a11y&&f.a11y&&f.a11y.enable(f.nextButton))))},f.updatePagination=function(){if(f.params.pagination&&f.paginationContainer&&f.paginationContainer.length>0){var e="";if("bullets"===f.params.paginationType){for(var a=f.params.loop?Math.ceil((f.slides.length-2*f.loopedSlides)/f.params.slidesPerGroup):f.snapGrid.length,t=0;t";f.paginationContainer.html(e),f.bullets=f.paginationContainer.find("."+f.params.bulletClass),f.params.paginationClickable&&f.params.a11y&&f.a11y&&f.a11y.initPagination()}"fraction"===f.params.paginationType&&(e=f.params.paginationFractionRender?f.params.paginationFractionRender(f,f.params.paginationCurrentClass,f.params.paginationTotalClass):' / ',f.paginationContainer.html(e)),"progress"===f.params.paginationType&&(e=f.params.paginationProgressRender?f.params.paginationProgressRender(f,f.params.paginationProgressbarClass):'',f.paginationContainer.html(e)),"custom"!==f.params.paginationType&&f.emit("onPaginationRendered",f,f.paginationContainer[0])}},f.update=function(e){function a(){f.rtl,f.translate;t=Math.min(Math.max(f.translate,f.maxTranslate()),f.minTranslate()),f.setWrapperTranslate(t),f.updateActiveIndex(),f.updateClasses()}if(f){f.updateContainerSize(),f.updateSlidesSize(),f.updateProgress(),f.updatePagination(),f.updateClasses(),f.params.scrollbar&&f.scrollbar&&f.scrollbar.set();var t;if(e){f.controller&&f.controller.spline&&(f.controller.spline=void 0),f.params.freeMode?(a(),f.params.autoHeight&&f.updateAutoHeight()):(("auto"===f.params.slidesPerView||f.params.slidesPerView>1)&&f.isEnd&&!f.params.centeredSlides?f.slideTo(f.slides.length-1,0,!1,!0):f.slideTo(f.activeIndex,0,!1,!0))||a()}else f.params.autoHeight&&f.updateAutoHeight()}},f.onResize=function(e){f.params.onBeforeResize&&f.params.onBeforeResize(f),f.params.breakpoints&&f.setBreakpoint();var a=f.params.allowSwipeToPrev,t=f.params.allowSwipeToNext;f.params.allowSwipeToPrev=f.params.allowSwipeToNext=!0,f.updateContainerSize(),f.updateSlidesSize(),("auto"===f.params.slidesPerView||f.params.freeMode||e)&&f.updatePagination(),f.params.scrollbar&&f.scrollbar&&f.scrollbar.set(),f.controller&&f.controller.spline&&(f.controller.spline=void 0);var r=!1;if(f.params.freeMode){var n=Math.min(Math.max(f.translate,f.maxTranslate()),f.minTranslate());f.setWrapperTranslate(n),f.updateActiveIndex(),f.updateClasses(),f.params.autoHeight&&f.updateAutoHeight()}else f.updateClasses(),r=("auto"===f.params.slidesPerView||f.params.slidesPerView>1)&&f.isEnd&&!f.params.centeredSlides?f.slideTo(f.slides.length-1,0,!1,!0):f.slideTo(f.activeIndex,0,!1,!0);f.params.lazyLoading&&!r&&f.lazy&&f.lazy.load(),f.params.allowSwipeToPrev=a,f.params.allowSwipeToNext=t,f.params.onAfterResize&&f.params.onAfterResize(f)},f.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?f.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(f.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),f.touchEvents={start:f.support.touch||!f.params.simulateTouch?"touchstart":f.touchEventsDesktop.start,move:f.support.touch||!f.params.simulateTouch?"touchmove":f.touchEventsDesktop.move,end:f.support.touch||!f.params.simulateTouch?"touchend":f.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===f.params.touchEventsTarget?f.container:f.wrapper).addClass("swiper-wp8-"+f.params.direction),f.initEvents=function(e){var t=e?"off":"on",r=e?"removeEventListener":"addEventListener",n="container"===f.params.touchEventsTarget?f.container[0]:f.wrapper[0],i=f.support.touch?n:document,s=!!f.params.nested;if(f.browser.ie)n[r](f.touchEvents.start,f.onTouchStart,!1),i[r](f.touchEvents.move,f.onTouchMove,s),i[r](f.touchEvents.end,f.onTouchEnd,!1);else{if(f.support.touch){var o=!("touchstart"!==f.touchEvents.start||!f.support.passiveListener||!f.params.passiveListeners)&&{passive:!0,capture:!1};n[r](f.touchEvents.start,f.onTouchStart,o),n[r](f.touchEvents.move,f.onTouchMove,s),n[r](f.touchEvents.end,f.onTouchEnd,o)}(a.simulateTouch&&!f.device.ios&&!f.device.android||a.simulateTouch&&!f.support.touch&&f.device.ios)&&(n[r]("mousedown",f.onTouchStart,!1),document[r]("mousemove",f.onTouchMove,s),document[r]("mouseup",f.onTouchEnd,!1))}window[r]("resize",f.onResize),f.params.nextButton&&f.nextButton&&f.nextButton.length>0&&(f.nextButton[t]("click",f.onClickNext),f.params.a11y&&f.a11y&&f.nextButton[t]("keydown",f.a11y.onEnterKey)),f.params.prevButton&&f.prevButton&&f.prevButton.length>0&&(f.prevButton[t]("click",f.onClickPrev),f.params.a11y&&f.a11y&&f.prevButton[t]("keydown",f.a11y.onEnterKey)),f.params.pagination&&f.params.paginationClickable&&(f.paginationContainer[t]("click","."+f.params.bulletClass,f.onClickIndex),f.params.a11y&&f.a11y&&f.paginationContainer[t]("keydown","."+f.params.bulletClass,f.a11y.onEnterKey)),(f.params.preventClicks||f.params.preventClicksPropagation)&&n[r]("click",f.preventClicks,!0)},f.attachEvents=function(){f.initEvents()},f.detachEvents=function(){f.initEvents(!0)},f.allowClick=!0,f.preventClicks=function(e){f.allowClick||(f.params.preventClicks&&e.preventDefault(),f.params.preventClicksPropagation&&f.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},f.onClickNext=function(e){e.preventDefault(),f.isEnd&&!f.params.loop||f.slideNext()},f.onClickPrev=function(e){e.preventDefault(),f.isBeginning&&!f.params.loop||f.slidePrev()},f.onClickIndex=function(e){e.preventDefault();var a=g(this).index()*f.params.slidesPerGroup;f.params.loop&&(a+=f.loopedSlides),f.slideTo(a)},f.updateClickedSlide=function(e){var a=n(e,"."+f.params.slideClass),t=!1;if(a)for(var r=0;rf.slides.length-f.loopedSlides+o/2?(f.fixLoop(),s=f.wrapper.children("."+f.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+f.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){f.slideTo(s)},0)):f.slideTo(s):s>f.slides.length-o?(f.fixLoop(),s=f.wrapper.children("."+f.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+f.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){f.slideTo(s)},0)):f.slideTo(s)}else f.slideTo(s)}};var b,w,C,y,x,T,k,P,S,M,I="input, select, textarea, button, video",E=Date.now(),O=[];f.animating=!1,f.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var D,L;f.onTouchStart=function(e){if(e.originalEvent&&(e=e.originalEvent),(D="touchstart"===e.type)||!("which"in e)||3!==e.which){if(f.params.noSwiping&&n(e,"."+f.params.noSwipingClass))return void(f.allowClick=!0);if(!f.params.swipeHandler||n(e,f.params.swipeHandler)){var a=f.touches.currentX="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,t=f.touches.currentY="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY;if(!(f.device.ios&&f.params.iOSEdgeSwipeDetection&&a<=f.params.iOSEdgeSwipeThreshold)){if(b=!0,w=!1,C=!0,x=void 0,L=void 0,f.touches.startX=a,f.touches.startY=t,y=Date.now(),f.allowClick=!0,f.updateContainerSize(),f.swipeDirection=void 0,f.params.threshold>0&&(P=!1),"touchstart"!==e.type){var r=!0;g(e.target).is(I)&&(r=!1),document.activeElement&&g(document.activeElement).is(I)&&document.activeElement.blur(),r&&e.preventDefault()}f.emit("onTouchStart",f,e)}}}},f.onTouchMove=function(e){if(e.originalEvent&&(e=e.originalEvent),!D||"mousemove"!==e.type){if(e.preventedByNestedSwiper)return f.touches.startX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,void(f.touches.startY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY);if(f.params.onlyExternal)return f.allowClick=!1,void(b&&(f.touches.startX=f.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,f.touches.startY=f.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,y=Date.now()));if(D&&f.params.touchReleaseOnEdges&&!f.params.loop)if(f.isHorizontal()){if(f.touches.currentXf.touches.startX&&f.translate>=f.minTranslate())return}else if(f.touches.currentYf.touches.startY&&f.translate>=f.minTranslate())return;if(D&&document.activeElement&&e.target===document.activeElement&&g(e.target).is(I))return w=!0,void(f.allowClick=!1);if(C&&f.emit("onTouchMove",f,e),!(e.targetTouches&&e.targetTouches.length>1)){if(f.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,f.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,void 0===x){var t;f.isHorizontal()&&f.touches.currentY===f.touches.startY||!f.isHorizontal()&&f.touches.currentX===f.touches.startX?x=!1:(t=180*Math.atan2(Math.abs(f.touches.currentY-f.touches.startY),Math.abs(f.touches.currentX-f.touches.startX))/Math.PI,x=f.isHorizontal()?t>f.params.touchAngle:90-t>f.params.touchAngle)}if(x&&f.emit("onTouchMoveOpposite",f,e),void 0===L&&(f.touches.currentX===f.touches.startX&&f.touches.currentY===f.touches.startY||(L=!0)),b){if(x)return void(b=!1);if(L){f.allowClick=!1,f.emit("onSliderMove",f,e),e.preventDefault(),f.params.touchMoveStopPropagation&&!f.params.nested&&e.stopPropagation(),w||(a.loop&&f.fixLoop(),k=f.getWrapperTranslate(),f.setWrapperTransition(0),f.animating&&f.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),f.params.autoplay&&f.autoplaying&&(f.params.autoplayDisableOnInteraction?f.stopAutoplay():f.pauseAutoplay()),M=!1,!f.params.grabCursor||!0!==f.params.allowSwipeToNext&&!0!==f.params.allowSwipeToPrev||f.setGrabCursor(!0)),w=!0;var r=f.touches.diff=f.isHorizontal()?f.touches.currentX-f.touches.startX:f.touches.currentY-f.touches.startY;r*=f.params.touchRatio,f.rtl&&(r=-r),f.swipeDirection=r>0?"prev":"next",T=r+k;var n=!0;if(r>0&&T>f.minTranslate()?(n=!1,f.params.resistance&&(T=f.minTranslate()-1+Math.pow(-f.minTranslate()+k+r,f.params.resistanceRatio))):r<0&&Tk&&(T=k),f.params.threshold>0){if(!(Math.abs(r)>f.params.threshold||P))return void(T=k);if(!P)return P=!0,f.touches.startX=f.touches.currentX,f.touches.startY=f.touches.currentY,T=k,void(f.touches.diff=f.isHorizontal()?f.touches.currentX-f.touches.startX:f.touches.currentY-f.touches.startY)}f.params.followFinger&&((f.params.freeMode||f.params.watchSlidesProgress)&&f.updateActiveIndex(),f.params.freeMode&&(0===O.length&&O.push({position:f.touches[f.isHorizontal()?"startX":"startY"],time:y}),O.push({position:f.touches[f.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),f.updateProgress(T),f.setWrapperTranslate(T))}}}}},f.onTouchEnd=function(e){if(e.originalEvent&&(e=e.originalEvent),C&&f.emit("onTouchEnd",f,e),C=!1,b){f.params.grabCursor&&w&&b&&(!0===f.params.allowSwipeToNext||!0===f.params.allowSwipeToPrev)&&f.setGrabCursor(!1);var a=Date.now(),t=a-y;if(f.allowClick&&(f.updateClickedSlide(e),f.emit("onTap",f,e),t<300&&a-E>300&&(S&&clearTimeout(S),S=setTimeout(function(){f&&(f.params.paginationHide&&f.paginationContainer.length>0&&!g(e.target).hasClass(f.params.bulletClass)&&f.paginationContainer.toggleClass(f.params.paginationHiddenClass),f.emit("onClick",f,e))},300)),t<300&&a-E<300&&(S&&clearTimeout(S),f.emit("onDoubleTap",f,e))),E=Date.now(),setTimeout(function(){f&&(f.allowClick=!0)},0),!b||!w||!f.swipeDirection||0===f.touches.diff||T===k)return void(b=w=!1);b=w=!1;var r;if(r=f.params.followFinger?f.rtl?f.translate:-f.translate:-T,f.params.freeMode){if(r<-f.minTranslate())return void f.slideTo(f.activeIndex);if(r>-f.maxTranslate())return void(f.slides.length1){var n=O.pop(),i=O.pop(),s=n.position-i.position,o=n.time-i.time;f.velocity=s/o,f.velocity=f.velocity/2,Math.abs(f.velocity)150||(new window.Date).getTime()-n.time>300)&&(f.velocity=0)}else f.velocity=0;f.velocity=f.velocity*f.params.freeModeMomentumVelocityRatio,O.length=0;var l=1e3*f.params.freeModeMomentumRatio,p=f.velocity*l,d=f.translate+p;f.rtl&&(d=-d);var c,m=!1,u=20*Math.abs(f.velocity)*f.params.freeModeMomentumBounceRatio;if(df.minTranslate())f.params.freeModeMomentumBounce?(d-f.minTranslate()>u&&(d=f.minTranslate()+u),c=f.minTranslate(),m=!0,M=!0):d=f.minTranslate();else if(f.params.freeModeSticky){var h,v=0;for(v=0;v-d){h=v;break}d=Math.abs(f.snapGrid[h]-d)=f.params.longSwipesMs)&&(f.updateProgress(),f.updateActiveIndex()))}var x,P=0,I=f.slidesSizesGrid[0];for(x=0;x=f.slidesGrid[x]&&r=f.slidesGrid[x]&&(P=x,I=f.slidesGrid[f.slidesGrid.length-1]-f.slidesGrid[f.slidesGrid.length-2]);var D=(r-f.slidesGrid[P])/I;if(t>f.params.longSwipesMs){if(!f.params.longSwipes)return void f.slideTo(f.activeIndex);"next"===f.swipeDirection&&(D>=f.params.longSwipesRatio?f.slideTo(P+f.params.slidesPerGroup):f.slideTo(P)),"prev"===f.swipeDirection&&(D>1-f.params.longSwipesRatio?f.slideTo(P+f.params.slidesPerGroup):f.slideTo(P))}else{if(!f.params.shortSwipes)return void f.slideTo(f.activeIndex);"next"===f.swipeDirection&&f.slideTo(P+f.params.slidesPerGroup),"prev"===f.swipeDirection&&f.slideTo(P)}}},f._slideTo=function(e,a){return f.slideTo(e,a,!0,!0)},f.slideTo=function(e,a,t,r){void 0===t&&(t=!0),void 0===e&&(e=0),e<0&&(e=0),f.snapIndex=Math.floor(e/f.params.slidesPerGroup),f.snapIndex>=f.snapGrid.length&&(f.snapIndex=f.snapGrid.length-1);var n=-f.snapGrid[f.snapIndex];if(f.params.autoplay&&f.autoplaying&&(r||!f.params.autoplayDisableOnInteraction?f.pauseAutoplay(a):f.stopAutoplay()),f.updateProgress(n),f.params.normalizeSlideIndex)for(var i=0;i=Math.floor(100*f.slidesGrid[i])&&(e=i);return!(!f.params.allowSwipeToNext&&nf.translate&&n>f.maxTranslate()&&(f.activeIndex||0)!==e)&&(void 0===a&&(a=f.params.speed),f.previousIndex=f.activeIndex||0,f.activeIndex=e,f.updateRealIndex(),f.rtl&&-n===f.translate||!f.rtl&&n===f.translate?(f.params.autoHeight&&f.updateAutoHeight(),f.updateClasses(),"slide"!==f.params.effect&&f.setWrapperTranslate(n),!1):(f.updateClasses(),f.onTransitionStart(t),0===a||f.browser.lteIE9?(f.setWrapperTranslate(n),f.setWrapperTransition(0),f.onTransitionEnd(t)):(f.setWrapperTranslate(n),f.setWrapperTransition(a),f.animating||(f.animating=!0,f.wrapper.transitionEnd(function(){f&&f.onTransitionEnd(t)}))),!0)))},f.onTransitionStart=function(e){void 0===e&&(e=!0),f.params.autoHeight&&f.updateAutoHeight(),f.lazy&&f.lazy.onTransitionStart(),e&&(f.emit("onTransitionStart",f),f.activeIndex!==f.previousIndex&&(f.emit("onSlideChangeStart",f),f.activeIndex>f.previousIndex?f.emit("onSlideNextStart",f):f.emit("onSlidePrevStart",f)))},f.onTransitionEnd=function(e){f.animating=!1,f.setWrapperTransition(0),void 0===e&&(e=!0),f.lazy&&f.lazy.onTransitionEnd(),e&&(f.emit("onTransitionEnd",f),f.activeIndex!==f.previousIndex&&(f.emit("onSlideChangeEnd",f),f.activeIndex>f.previousIndex?f.emit("onSlideNextEnd",f):f.emit("onSlidePrevEnd",f))),f.params.history&&f.history&&f.history.setHistory(f.params.history,f.activeIndex),f.params.hashnav&&f.hashnav&&f.hashnav.setHash()},f.slideNext=function(e,a,t){if(f.params.loop){if(f.animating)return!1;f.fixLoop();f.container[0].clientLeft;return f.slideTo(f.activeIndex+f.params.slidesPerGroup,a,e,t)}return f.slideTo(f.activeIndex+f.params.slidesPerGroup,a,e,t)},f._slideNext=function(e){return f.slideNext(!0,e,!0)},f.slidePrev=function(e,a,t){if(f.params.loop){if(f.animating)return!1;f.fixLoop();f.container[0].clientLeft;return f.slideTo(f.activeIndex-1,a,e,t)}return f.slideTo(f.activeIndex-1,a,e,t)},f._slidePrev=function(e){return f.slidePrev(!0,e,!0)},f.slideReset=function(e,a,t){return f.slideTo(f.activeIndex,a,e)},f.disableTouchControl=function(){return f.params.onlyExternal=!0,!0},f.enableTouchControl=function(){return f.params.onlyExternal=!1,!0},f.setWrapperTransition=function(e,a){f.wrapper.transition(e),"slide"!==f.params.effect&&f.effects[f.params.effect]&&f.effects[f.params.effect].setTransition(e),f.params.parallax&&f.parallax&&f.parallax.setTransition(e),f.params.scrollbar&&f.scrollbar&&f.scrollbar.setTransition(e),f.params.control&&f.controller&&f.controller.setTransition(e,a),f.emit("onSetTransition",f,e)},f.setWrapperTranslate=function(e,a,r){var n=0,i=0;f.isHorizontal()?n=f.rtl?-e:e:i=e,f.params.roundLengths&&(n=t(n),i=t(i)),f.params.virtualTranslate||(f.support.transforms3d?f.wrapper.transform("translate3d("+n+"px, "+i+"px, 0px)"):f.wrapper.transform("translate("+n+"px, "+i+"px)")),f.translate=f.isHorizontal()?n:i;var s,o=f.maxTranslate()-f.minTranslate();s=0===o?0:(e-f.minTranslate())/o,s!==f.progress&&f.updateProgress(e),a&&f.updateActiveIndex(),"slide"!==f.params.effect&&f.effects[f.params.effect]&&f.effects[f.params.effect].setTranslate(f.translate),f.params.parallax&&f.parallax&&f.parallax.setTranslate(f.translate),f.params.scrollbar&&f.scrollbar&&f.scrollbar.setTranslate(f.translate),f.params.control&&f.controller&&f.controller.setTranslate(f.translate,r),f.emit("onSetTranslate",f,f.translate)},f.getTranslate=function(e,a){var t,r,n,i;return void 0===a&&(a="x"),f.params.virtualTranslate?f.rtl?-f.translate:f.translate:(n=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(r=n.transform||n.webkitTransform,r.split(",").length>6&&(r=r.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),i=new window.WebKitCSSMatrix("none"===r?"":r)):(i=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=i.toString().split(",")),"x"===a&&(r=window.WebKitCSSMatrix?i.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(r=window.WebKitCSSMatrix?i.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),f.rtl&&r&&(r=-r),r||0)},f.getWrapperTranslate=function(e){return void 0===e&&(e=f.isHorizontal()?"x":"y"),f.getTranslate(f.wrapper[0],e)},f.observers=[],f.initObservers=function(){ +if(f.params.observeParents)for(var e=f.container.parents(),a=0;ae.length&&(f.loopedSlides=e.length);var a,t=[],r=[];for(e.each(function(a,n){var i=g(this);a=e.length-f.loopedSlides&&t.push(n),i.attr("data-swiper-slide-index",a)}),a=0;a=0;a--)f.wrapper.prepend(g(t[a].cloneNode(!0)).addClass(f.params.slideDuplicateClass))},f.destroyLoop=function(){f.wrapper.children("."+f.params.slideClass+"."+f.params.slideDuplicateClass).remove(),f.slides.removeAttr("data-swiper-slide-index")},f.reLoop=function(e){var a=f.activeIndex-f.loopedSlides;f.destroyLoop(),f.createLoop(),f.updateSlidesSize(),e&&f.slideTo(a+f.loopedSlides,0,!1)},f.fixLoop=function(){var e;f.activeIndex=2*f.loopedSlides||f.activeIndex>f.slides.length-2*f.params.slidesPerView)&&(e=-f.slides.length+f.activeIndex+f.loopedSlides,e+=f.loopedSlides,f.slideTo(e,0,!1,!0))},f.appendSlide=function(e){if(f.params.loop&&f.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a'),a.append(p)),0===d.length&&(d=g('
                                  '),a.append(d)),p.length&&(p[0].style.opacity=Math.max(-t,0)),d.length&&(d[0].style.opacity=Math.max(t,0))}a.transform("translate3d("+o+"px, "+l+"px, 0px) rotateX("+s+"deg) rotateY("+i+"deg)")}},setTransition:function(e){if(f.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),f.params.virtualTranslate&&0!==e){var a=!1;f.slides.eq(f.activeIndex).transitionEnd(function(){if(!a&&f&&g(this).hasClass(f.params.slideActiveClass)){a=!0,f.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],t=0;t'),f.wrapper.append(e)),e.css({height:f.width+"px"})):(e=f.container.find(".swiper-cube-shadow"),0===e.length&&(e=g('
                                  '),f.container.append(e))));for(var t=0;t-1&&(a=90*t+90*s,f.rtl&&(a=90*-t-90*s)),r.transform(d),f.params.cube.slideShadows){var c=f.isHorizontal()?r.find(".swiper-slide-shadow-left"):r.find(".swiper-slide-shadow-top"),m=f.isHorizontal()?r.find(".swiper-slide-shadow-right"):r.find(".swiper-slide-shadow-bottom");0===c.length&&(c=g('
                                  '),r.append(c)),0===m.length&&(m=g('
                                  '),r.append(m)),c.length&&(c[0].style.opacity=Math.max(-s,0)),m.length&&(m[0].style.opacity=Math.max(s,0))}}if(f.wrapper.css({"-webkit-transform-origin":"50% 50% -"+f.size/2+"px","-moz-transform-origin":"50% 50% -"+f.size/2+"px","-ms-transform-origin":"50% 50% -"+f.size/2+"px","transform-origin":"50% 50% -"+f.size/2+"px"}),f.params.cube.shadow)if(f.isHorizontal())e.transform("translate3d(0px, "+(f.width/2+f.params.cube.shadowOffset)+"px, "+-f.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+f.params.cube.shadowScale+")");else{var u=Math.abs(a)-90*Math.floor(Math.abs(a)/90),h=1.5-(Math.sin(2*u*Math.PI/360)/2+Math.cos(2*u*Math.PI/360)/2),v=f.params.cube.shadowScale,b=f.params.cube.shadowScale/h,w=f.params.cube.shadowOffset;e.transform("scale3d("+v+", 1, "+b+") translate3d(0px, "+(f.height/2+w)+"px, "+-f.height/2/b+"px) rotateX(-90deg)")}var C=f.isSafari||f.isUiWebView?-f.size/2:0;f.wrapper.transform("translate3d(0px,0,"+C+"px) rotateX("+(f.isHorizontal()?0:a)+"deg) rotateY("+(f.isHorizontal()?-a:0)+"deg)")},setTransition:function(e){f.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),f.params.cube.shadow&&!f.isHorizontal()&&f.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var e=f.translate,a=f.isHorizontal()?-e+f.width/2:-e+f.height/2,t=f.isHorizontal()?f.params.coverflow.rotate:-f.params.coverflow.rotate,r=f.params.coverflow.depth,n=0,i=f.slides.length;n'),s.append(b)),0===w.length&&(w=g('
                                  '),s.append(w)),b.length&&(b[0].style.opacity=p>0?p:0),w.length&&(w[0].style.opacity=-p>0?-p:0)}}if(f.browser.ie){f.wrapper[0].style.perspectiveOrigin=a+"px 50%"}},setTransition:function(e){f.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},f.lazy={initialImageLoaded:!1,loadImageInSlide:function(e,a){if(void 0!==e&&(void 0===a&&(a=!0),0!==f.slides.length)){var t=f.slides.eq(e),r=t.find("."+f.params.lazyLoadingClass+":not(."+f.params.lazyStatusLoadedClass+"):not(."+f.params.lazyStatusLoadingClass+")");!t.hasClass(f.params.lazyLoadingClass)||t.hasClass(f.params.lazyStatusLoadedClass)||t.hasClass(f.params.lazyStatusLoadingClass)||(r=r.add(t[0])),0!==r.length&&r.each(function(){var e=g(this);e.addClass(f.params.lazyStatusLoadingClass);var r=e.attr("data-background"),n=e.attr("data-src"),i=e.attr("data-srcset"),s=e.attr("data-sizes");f.loadImage(e[0],n||r,i,s,!1,function(){if(void 0!==f&&null!==f&&f){if(r?(e.css("background-image",'url("'+r+'")'),e.removeAttr("data-background")):(i&&(e.attr("srcset",i),e.removeAttr("data-srcset")),s&&(e.attr("sizes",s),e.removeAttr("data-sizes")),n&&(e.attr("src",n),e.removeAttr("data-src"))),e.addClass(f.params.lazyStatusLoadedClass).removeClass(f.params.lazyStatusLoadingClass),t.find("."+f.params.lazyPreloaderClass+", ."+f.params.preloaderClass).remove(),f.params.loop&&a){var o=t.attr("data-swiper-slide-index");if(t.hasClass(f.params.slideDuplicateClass)){var l=f.wrapper.children('[data-swiper-slide-index="'+o+'"]:not(.'+f.params.slideDuplicateClass+")");f.lazy.loadImageInSlide(l.index(),!1)}else{var p=f.wrapper.children("."+f.params.slideDuplicateClass+'[data-swiper-slide-index="'+o+'"]');f.lazy.loadImageInSlide(p.index(),!1)}}f.emit("onLazyImageReady",f,t[0],e[0])}}),f.emit("onLazyImageLoad",f,t[0],e[0])})}},load:function(){var e,a=f.params.slidesPerView;if("auto"===a&&(a=0),f.lazy.initialImageLoaded||(f.lazy.initialImageLoaded=!0),f.params.watchSlidesVisibility)f.wrapper.children("."+f.params.slideVisibleClass).each(function(){f.lazy.loadImageInSlide(g(this).index())});else if(a>1)for(e=f.activeIndex;e1||f.params.lazyLoadingInPrevNextAmount&&f.params.lazyLoadingInPrevNextAmount>1){var t=f.params.lazyLoadingInPrevNextAmount,r=a,n=Math.min(f.activeIndex+r+Math.max(t,r),f.slides.length),i=Math.max(f.activeIndex-Math.max(r,t),0);for(e=f.activeIndex+a;e0&&f.lazy.loadImageInSlide(s.index());var o=f.wrapper.children("."+f.params.slidePrevClass);o.length>0&&f.lazy.loadImageInSlide(o.index())}},onTransitionStart:function(){f.params.lazyLoading&&(f.params.lazyLoadingOnTransitionStart||!f.params.lazyLoadingOnTransitionStart&&!f.lazy.initialImageLoaded)&&f.lazy.load()},onTransitionEnd:function(){f.params.lazyLoading&&!f.params.lazyLoadingOnTransitionStart&&f.lazy.load()}},f.scrollbar={isTouched:!1,setDragPosition:function(e){var a=f.scrollbar,t=f.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,r=t-a.track.offset()[f.isHorizontal()?"left":"top"]-a.dragSize/2,n=-f.minTranslate()*a.moveDivider,i=-f.maxTranslate()*a.moveDivider;ri&&(r=i),r=-r/a.moveDivider,f.updateProgress(r),f.setWrapperTranslate(r,!0)},dragStart:function(e){var a=f.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),f.params.scrollbarHide&&a.track.css("opacity",1),f.wrapper.transition(100),a.drag.transition(100),f.emit("onScrollbarDragStart",f)},dragMove:function(e){var a=f.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),f.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),f.emit("onScrollbarDragMove",f))},dragEnd:function(e){var a=f.scrollbar;a.isTouched&&(a.isTouched=!1,f.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),f.emit("onScrollbarDragEnd",f),f.params.scrollbarSnapOnRelease&&f.slideReset())},draggableEvents:function(){return!1!==f.params.simulateTouch||f.support.touch?f.touchEvents:f.touchEventsDesktop}(),enableDraggable:function(){var e=f.scrollbar,a=f.support.touch?e.track:document;g(e.track).on(e.draggableEvents.start,e.dragStart),g(a).on(e.draggableEvents.move,e.dragMove),g(a).on(e.draggableEvents.end,e.dragEnd)},disableDraggable:function(){var e=f.scrollbar,a=f.support.touch?e.track:document;g(e.track).off(e.draggableEvents.start,e.dragStart),g(a).off(e.draggableEvents.move,e.dragMove),g(a).off(e.draggableEvents.end,e.dragEnd)},set:function(){if(f.params.scrollbar){var e=f.scrollbar;e.track=g(f.params.scrollbar),f.params.uniqueNavElements&&"string"==typeof f.params.scrollbar&&e.track.length>1&&1===f.container.find(f.params.scrollbar).length&&(e.track=f.container.find(f.params.scrollbar)),e.drag=e.track.find(".swiper-scrollbar-drag"),0===e.drag.length&&(e.drag=g('
                                  '),e.track.append(e.drag)),e.drag[0].style.width="",e.drag[0].style.height="",e.trackSize=f.isHorizontal()?e.track[0].offsetWidth:e.track[0].offsetHeight,e.divider=f.size/f.virtualSize,e.moveDivider=e.divider*(e.trackSize/f.size),e.dragSize=e.trackSize*e.divider,f.isHorizontal()?e.drag[0].style.width=e.dragSize+"px":e.drag[0].style.height=e.dragSize+"px",e.divider>=1?e.track[0].style.display="none":e.track[0].style.display="",f.params.scrollbarHide&&(e.track[0].style.opacity=0)}},setTranslate:function(){if(f.params.scrollbar){var e,a=f.scrollbar,t=(f.translate,a.dragSize);e=(a.trackSize-a.dragSize)*f.progress,f.rtl&&f.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),f.isHorizontal()?(f.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(f.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),f.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){f.params.scrollbar&&f.scrollbar.drag.transition(e)}},f.controller={LinearSpline:function(e,a){var t=function(){var e,a,t;return function(r,n){for(a=-1,e=r.length;e-a>1;)r[t=e+a>>1]<=n?a=t:e=t;return e}}();this.x=e,this.y=a,this.lastIndex=e.length-1;var r,n;this.x.length;this.interpolate=function(e){return e?(n=t(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0}},getInterpolateFunction:function(e){f.controller.spline||(f.controller.spline=f.params.loop?new f.controller.LinearSpline(f.slidesGrid,e.slidesGrid):new f.controller.LinearSpline(f.snapGrid,e.snapGrid))},setTranslate:function(e,a){function t(a){e=a.rtl&&"horizontal"===a.params.direction?-f.translate:f.translate,"slide"===f.params.controlBy&&(f.controller.getInterpolateFunction(a),n=-f.controller.spline.interpolate(-e)),n&&"container"!==f.params.controlBy||(r=(a.maxTranslate()-a.minTranslate())/(f.maxTranslate()-f.minTranslate()),n=(e-f.minTranslate())*r+a.minTranslate()),f.params.controlInverse&&(n=a.maxTranslate()-n),a.updateProgress(n),a.setWrapperTranslate(n,!1,f),a.updateActiveIndex()}var r,n,i=f.params.control;if(Array.isArray(i))for(var s=0;sa.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scalea.image.touchesStart.x)return void(a.image.isTouched=!1);if(!f.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.ya.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentXa.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentYa.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var r=300,n=300,i=t.velocity.x*r,s=t.image.currentX+i,o=t.velocity.y*n,l=t.image.currentY+o;0!==t.velocity.x&&(r=Math.abs((s-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(n=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(r,n);t.image.currentX=s,t.image.currentY=l;var d=t.image.width*t.scale,c=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-c/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(e,a){var t=e.zoom;if(t.gesture.slide||(t.gesture.slide=e.clickedSlide?g(e.clickedSlide):e.slides.eq(e.activeIndex),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+e.params.zoomContainerClass)),t.gesture.image&&0!==t.gesture.image.length){var r,n,i,s,o,l,p,d,c,m,u,h,f,v,b,w,C,y;void 0===t.image.touchesStart.x&&a?(r="touchend"===a.type?a.changedTouches[0].pageX:a.pageX,n="touchend"===a.type?a.changedTouches[0].pageY:a.pageY):(r=t.image.touchesStart.x,n=t.image.touchesStart.y),t.scale&&1!==t.scale?(t.scale=t.currentScale=1,t.gesture.imageWrap.transition(300).transform("translate3d(0,0,0)"),t.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),t.gesture.slide=void 0):(t.scale=t.currentScale=t.gesture.imageWrap.attr("data-swiper-zoom")||e.params.zoomMax,a?(C=t.gesture.slide[0].offsetWidth,y=t.gesture.slide[0].offsetHeight,i=t.gesture.slide.offset().left,s=t.gesture.slide.offset().top,o=i+C/2-r,l=s+y/2-n,c=t.gesture.image[0].offsetWidth,m=t.gesture.image[0].offsetHeight,u=c*t.scale,h=m*t.scale,f=Math.min(C/2-u/2,0),v=Math.min(y/2-h/2,0),b=-f,w=-v,p=o*t.scale,d=l*t.scale,pb&&(p=b),dw&&(d=w)):(p=0,d=0),t.gesture.imageWrap.transition(300).transform("translate3d("+p+"px, "+d+"px,0)"),t.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+t.scale+")"))}},attachEvents:function(e){var a=e?"off":"on";if(f.params.zoom){var t=(f.slides,!("touchstart"!==f.touchEvents.start||!f.support.passiveListener||!f.params.passiveListeners)&&{passive:!0,capture:!1});f.support.gestures?(f.slides[a]("gesturestart",f.zoom.onGestureStart,t),f.slides[a]("gesturechange",f.zoom.onGestureChange,t),f.slides[a]("gestureend",f.zoom.onGestureEnd,t)):"touchstart"===f.touchEvents.start&&(f.slides[a](f.touchEvents.start,f.zoom.onGestureStart,t),f.slides[a](f.touchEvents.move,f.zoom.onGestureChange,t),f.slides[a](f.touchEvents.end,f.zoom.onGestureEnd,t)),f[a]("touchStart",f.zoom.onTouchStart),f.slides.each(function(e,t){g(t).find("."+f.params.zoomContainerClass).length>0&&g(t)[a](f.touchEvents.move,f.zoom.onTouchMove)}),f[a]("touchEnd",f.zoom.onTouchEnd),f[a]("transitionEnd",f.zoom.onTransitionEnd),f.params.zoomToggle&&f.on("doubleTap",f.zoom.toggleZoom)}},init:function(){f.zoom.attachEvents()},destroy:function(){f.zoom.attachEvents(!0)}},f._plugins=[];for(var z in f.plugins){var B=f.plugins[z](f,f.params[z]);B&&f._plugins.push(B)}return f.callPlugins=function(e){for(var a=0;a'),notify:function(e){var a=f.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){f.params.nextButton&&f.nextButton&&f.nextButton.length>0&&(f.a11y.makeFocusable(f.nextButton),f.a11y.addRole(f.nextButton,"button"),f.a11y.addLabel(f.nextButton,f.params.nextSlideMessage)),f.params.prevButton&&f.prevButton&&f.prevButton.length>0&&(f.a11y.makeFocusable(f.prevButton),f.a11y.addRole(f.prevButton,"button"),f.a11y.addLabel(f.prevButton,f.params.prevSlideMessage)),g(f.container).append(f.a11y.liveRegion)},initPagination:function(){f.params.pagination&&f.params.paginationClickable&&f.bullets&&f.bullets.length&&f.bullets.each(function(){var e=g(this);f.a11y.makeFocusable(e),f.a11y.addRole(e,"button"),f.a11y.addLabel(e,f.params.paginationBulletMessage.replace(/{{index}}/,e.index()+1))})},destroy:function(){f.a11y.liveRegion&&f.a11y.liveRegion.length>0&&f.a11y.liveRegion.remove()}},f.init=function(){f.params.loop&&f.createLoop(),f.updateContainerSize(),f.updateSlidesSize(),f.updatePagination(),f.params.scrollbar&&f.scrollbar&&(f.scrollbar.set(),f.params.scrollbarDraggable&&f.scrollbar.enableDraggable()),"slide"!==f.params.effect&&f.effects[f.params.effect]&&(f.params.loop||f.updateProgress(),f.effects[f.params.effect].setTranslate()),f.params.loop?f.slideTo(f.params.initialSlide+f.loopedSlides,0,f.params.runCallbacksOnInit):(f.slideTo(f.params.initialSlide,0,f.params.runCallbacksOnInit),0===f.params.initialSlide&&(f.parallax&&f.params.parallax&&f.parallax.setTranslate(),f.lazy&&f.params.lazyLoading&&(f.lazy.load(),f.lazy.initialImageLoaded=!0))),f.attachEvents(),f.params.observer&&f.support.observer&&f.initObservers(),f.params.preloadImages&&!f.params.lazyLoading&&f.preloadImages(),f.params.zoom&&f.zoom&&f.zoom.init(),f.params.autoplay&&f.startAutoplay(),f.params.keyboardControl&&f.enableKeyboardControl&&f.enableKeyboardControl(),f.params.mousewheelControl&&f.enableMousewheelControl&&f.enableMousewheelControl(),f.params.hashnavReplaceState&&(f.params.replaceState=f.params.hashnavReplaceState),f.params.history&&f.history&&f.history.init(),f.params.hashnav&&f.hashnav&&f.hashnav.init(),f.params.a11y&&f.a11y&&f.a11y.init(),f.emit("onInit",f)},f.cleanupStyles=function(){f.container.removeClass(f.classNames.join(" ")).removeAttr("style"),f.wrapper.removeAttr("style"),f.slides&&f.slides.length&&f.slides.removeClass([f.params.slideVisibleClass,f.params.slideActiveClass,f.params.slideNextClass,f.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),f.paginationContainer&&f.paginationContainer.length&&f.paginationContainer.removeClass(f.params.paginationHiddenClass), +f.bullets&&f.bullets.length&&f.bullets.removeClass(f.params.bulletActiveClass),f.params.prevButton&&g(f.params.prevButton).removeClass(f.params.buttonDisabledClass),f.params.nextButton&&g(f.params.nextButton).removeClass(f.params.buttonDisabledClass),f.params.scrollbar&&f.scrollbar&&(f.scrollbar.track&&f.scrollbar.track.length&&f.scrollbar.track.removeAttr("style"),f.scrollbar.drag&&f.scrollbar.drag.length&&f.scrollbar.drag.removeAttr("style"))},f.destroy=function(e,a){f.detachEvents(),f.stopAutoplay(),f.params.scrollbar&&f.scrollbar&&f.params.scrollbarDraggable&&f.scrollbar.disableDraggable(),f.params.loop&&f.destroyLoop(),a&&f.cleanupStyles(),f.disconnectObservers(),f.params.zoom&&f.zoom&&f.zoom.destroy(),f.params.keyboardControl&&f.disableKeyboardControl&&f.disableKeyboardControl(),f.params.mousewheelControl&&f.disableMousewheelControl&&f.disableMousewheelControl(),f.params.a11y&&f.a11y&&f.a11y.destroy(),f.params.history&&!f.params.replaceState&&window.removeEventListener("popstate",f.history.setHistoryPopState),f.params.hashnav&&f.hashnav&&f.hashnav.destroy(),f.emit("onDestroy"),!1!==e&&(f=null)},f.init(),f}},Swiper.prototype={isSafari:function(){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="\x3c!--[if lte IE 9]>= 0 && html.indexOf('>') >= 0) {\n var toCreate = 'div';\n if (html.indexOf(':~]/)) {\n // Pure ID selector\n els = [document.getElementById(selector.trim().split('#')[1])];\n } else {\n // Other selectors\n els = (context || document).querySelectorAll(selector.trim());\n }\n for (i = 0; i < els.length; i += 1) {\n if (els[i]) { arr.push(els[i]); }\n }\n }\n } else if (selector.nodeType || selector === window || selector === document) {\n // Node/element\n arr.push(selector);\n } else if (selector.length > 0 && selector[0].nodeType) {\n // Array of elements or instance of Dom\n for (i = 0; i < selector.length; i += 1) {\n arr.push(selector[i]);\n }\n }\n }\n return new Dom7(arr);\n}\n\n// Remove Diacritics\nvar defaultDiacriticsRemovalap = [\n { base: 'A', letters: '\\u0041\\u24B6\\uFF21\\u00C0\\u00C1\\u00C2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\u00C3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\u00C4\\u01DE\\u1EA2\\u00C5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F' },\n { base: 'AA', letters: '\\uA732' },\n { base: 'AE', letters: '\\u00C6\\u01FC\\u01E2' },\n { base: 'AO', letters: '\\uA734' },\n { base: 'AU', letters: '\\uA736' },\n { base: 'AV', letters: '\\uA738\\uA73A' },\n { base: 'AY', letters: '\\uA73C' },\n { base: 'B', letters: '\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181' },\n { base: 'C', letters: '\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E' },\n { base: 'D', letters: '\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779' },\n { base: 'DZ', letters: '\\u01F1\\u01C4' },\n { base: 'Dz', letters: '\\u01F2\\u01C5' },\n { base: 'E', letters: '\\u0045\\u24BA\\uFF25\\u00C8\\u00C9\\u00CA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\u00CB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E' },\n { base: 'F', letters: '\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B' },\n { base: 'G', letters: '\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E' },\n { base: 'H', letters: '\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D' },\n { base: 'I', letters: '\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197' },\n { base: 'J', letters: '\\u004A\\u24BF\\uFF2A\\u0134\\u0248' },\n { base: 'K', letters: '\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2' },\n { base: 'L', letters: '\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780' },\n { base: 'LJ', letters: '\\u01C7' },\n { base: 'Lj', letters: '\\u01C8' },\n { base: 'M', letters: '\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C' },\n { base: 'N', letters: '\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4' },\n { base: 'NJ', letters: '\\u01CA' },\n { base: 'Nj', letters: '\\u01CB' },\n { base: 'O', letters: '\\u004F\\u24C4\\uFF2F\\u00D2\\u00D3\\u00D4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\u00D5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\u00D6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\u00D8\\u01FE\\u0186\\u019F\\uA74A\\uA74C' },\n { base: 'OI', letters: '\\u01A2' },\n { base: 'OO', letters: '\\uA74E' },\n { base: 'OU', letters: '\\u0222' },\n { base: 'OE', letters: '\\u008C\\u0152' },\n { base: 'oe', letters: '\\u009C\\u0153' },\n { base: 'P', letters: '\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754' },\n { base: 'Q', letters: '\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A' },\n { base: 'R', letters: '\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782' },\n { base: 'S', letters: '\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784' },\n { base: 'T', letters: '\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786' },\n { base: 'TZ', letters: '\\uA728' },\n { base: 'U', letters: '\\u0055\\u24CA\\uFF35\\u00D9\\u00DA\\u00DB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\u00DC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244' },\n { base: 'V', letters: '\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245' },\n { base: 'VY', letters: '\\uA760' },\n { base: 'W', letters: '\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72' },\n { base: 'X', letters: '\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C' },\n { base: 'Y', letters: '\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE' },\n { base: 'Z', letters: '\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762' },\n { base: 'a', letters: '\\u0061\\u24D0\\uFF41\\u1E9A\\u00E0\\u00E1\\u00E2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\u00E3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\u00E4\\u01DF\\u1EA3\\u00E5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250' },\n { base: 'aa', letters: '\\uA733' },\n { base: 'ae', letters: '\\u00E6\\u01FD\\u01E3' },\n { base: 'ao', letters: '\\uA735' },\n { base: 'au', letters: '\\uA737' },\n { base: 'av', letters: '\\uA739\\uA73B' },\n { base: 'ay', letters: '\\uA73D' },\n { base: 'b', letters: '\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253' },\n { base: 'c', letters: '\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184' },\n { base: 'd', letters: '\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A' },\n { base: 'dz', letters: '\\u01F3\\u01C6' },\n { base: 'e', letters: '\\u0065\\u24D4\\uFF45\\u00E8\\u00E9\\u00EA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\u00EB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD' },\n { base: 'f', letters: '\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C' },\n { base: 'g', letters: '\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F' },\n { base: 'h', letters: '\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265' },\n { base: 'hv', letters: '\\u0195' },\n { base: 'i', letters: '\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131' },\n { base: 'j', letters: '\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249' },\n { base: 'k', letters: '\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3' },\n { base: 'l', letters: '\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747' },\n { base: 'lj', letters: '\\u01C9' },\n { base: 'm', letters: '\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F' },\n { base: 'n', letters: '\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5' },\n { base: 'nj', letters: '\\u01CC' },\n { base: 'o', letters: '\\u006F\\u24DE\\uFF4F\\u00F2\\u00F3\\u00F4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\u00F5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\u00F6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\u00F8\\u01FF\\u0254\\uA74B\\uA74D\\u0275' },\n { base: 'oi', letters: '\\u01A3' },\n { base: 'ou', letters: '\\u0223' },\n { base: 'oo', letters: '\\uA74F' },\n { base: 'p', letters: '\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755' },\n { base: 'q', letters: '\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759' },\n { base: 'r', letters: '\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783' },\n { base: 's', letters: '\\u0073\\u24E2\\uFF53\\u00DF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B' },\n { base: 't', letters: '\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787' },\n { base: 'tz', letters: '\\uA729' },\n { base: 'u', letters: '\\u0075\\u24E4\\uFF55\\u00F9\\u00FA\\u00FB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\u00FC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289' },\n { base: 'v', letters: '\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C' },\n { base: 'vy', letters: '\\uA761' },\n { base: 'w', letters: '\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73' },\n { base: 'x', letters: '\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D' },\n { base: 'y', letters: '\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF' },\n { base: 'z', letters: '\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763' } ];\n\nvar diacriticsMap = {};\nfor (var i = 0; i < defaultDiacriticsRemovalap.length; i += 1) {\n var letters = defaultDiacriticsRemovalap[i].letters;\n for (var j = 0; j < letters.length; j += 1) {\n diacriticsMap[letters[j]] = defaultDiacriticsRemovalap[i].base;\n }\n}\n\nvar Utils = {\n parseUrlQuery: function parseUrlQuery(url) {\n var query = {};\n var urlToParse = url || window.location.href;\n var i;\n var params;\n var param;\n var length;\n if (typeof urlToParse === 'string' && urlToParse.length) {\n urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\\S*\\?/, '') : '';\n params = urlToParse.split('&').filter(function (paramsPart) { return paramsPart !== ''; });\n length = params.length;\n\n for (i = 0; i < length; i += 1) {\n param = params[i].replace(/#\\S+/g, '').split('=');\n query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';\n }\n }\n return query;\n },\n isArray: function isArray(arr) {\n return Array.isArray(arr);\n },\n each: function each(obj, callback) {\n // Check it's iterable\n // TODO: Should probably raise a value error here\n if (typeof obj !== 'object') { return; }\n // Don't bother continuing without a callback\n if (!callback) { return; }\n if (Array.isArray(obj) || obj instanceof Dom7) {\n // Array\n for (var i = 0; i < obj.length; i++) {\n // If callback returns false\n if (callback(i, obj[i]) === false) {\n // Break out of the loop\n return;\n }\n }\n } else {\n // Object\n for (var prop in obj) {\n // Check the propertie belongs to the object\n // not it's prototype\n if (obj.hasOwnProperty(prop)) {\n // If the callback returns false\n if (callback(prop, obj[prop]) === false) {\n // Break out of the loop;\n return;\n }\n }\n }\n }\n },\n unique: function unique(arr) {\n var uniqueArray = [];\n for (var i = 0; i < arr.length; i += 1) {\n if (uniqueArray.indexOf(arr[i]) === -1) { uniqueArray.push(arr[i]); }\n }\n return uniqueArray;\n },\n serializeObject: function serializeObject(obj, parents) {\n if ( parents === void 0 ) parents = [];\n\n if (typeof obj === 'string') { return obj; }\n var resultArray = [];\n var separator = '&';\n var newParents;\n function varName(name) {\n if (parents.length > 0) {\n var parentParts = '';\n for (var j = 0; j < parents.length; j += 1) {\n if (j === 0) { parentParts += parents[j]; }\n else { parentParts += \"[\" + (encodeURIComponent(parents[j])) + \"]\"; }\n }\n return (parentParts + \"[\" + (encodeURIComponent(name)) + \"]\");\n }\n return encodeURIComponent(name);\n }\n function varValue(value) {\n return encodeURIComponent(value);\n }\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n var toPush = (void 0);\n if (Array.isArray(obj[prop])) {\n toPush = [];\n for (var i = 0; i < obj[prop].length; i += 1) {\n if (!Array.isArray(obj[prop][i]) && typeof obj[prop][i] === 'object') {\n newParents = parents.slice();\n newParents.push(prop);\n newParents.push(String(i));\n toPush.push(Utils.serializeObject(obj[prop][i], newParents));\n } else {\n toPush.push(((varName(prop)) + \"[]=\" + (varValue(obj[prop][i]))));\n }\n }\n if (toPush.length > 0) { resultArray.push(toPush.join(separator)); }\n } else if (obj[prop] === null || obj[prop] === '') {\n resultArray.push(((varName(prop)) + \"=\"));\n } else if (typeof obj[prop] === 'object') {\n // Object, convert to named array\n newParents = parents.slice();\n newParents.push(prop);\n toPush = Utils.serializeObject(obj[prop], newParents);\n if (toPush !== '') { resultArray.push(toPush); }\n } else if (typeof obj[prop] !== 'undefined' && obj[prop] !== '') {\n // Should be string or plain value\n resultArray.push(((varName(prop)) + \"=\" + (varValue(obj[prop]))));\n } else if (obj[prop] === '') { resultArray.push(varName(prop)); }\n }\n }\n return resultArray.join(separator);\n },\n toCamelCase: function toCamelCase(string) {\n return string.toLowerCase().replace(/-(.)/g, function (match, group1) { return group1.toUpperCase(); });\n },\n dataset: function dataset(el) {\n return $(el).dataset();\n },\n getTranslate: function getTranslate(el, axis) {\n if ( axis === void 0 ) axis = 'x';\n\n var curStyle = window.getComputedStyle(el, null);\n var matrix;\n var curTransform;\n var transformMatrix;\n\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(function map(a) {\n return a.replace(',', '.');\n }).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n } else {\n transformMatrix = curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n\n if (axis === 'x') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) { curTransform = transformMatrix.m41; }\n // Crazy IE10 Matrix\n else if (matrix.length === 16) { curTransform = parseFloat(matrix[12]); }\n // Normal Browsers\n else { curTransform = parseFloat(matrix[4]); }\n }\n if (axis === 'y') {\n // Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix) { curTransform = transformMatrix.m42; }\n // Crazy IE10 Matrix\n else if (matrix.length === 16) { curTransform = parseFloat(matrix[13]); }\n // Normal Browsers\n else { curTransform = parseFloat(matrix[5]); }\n }\n\n return curTransform || 0;\n },\n requestAnimationFrame: function requestAnimationFrame(callback) {\n if (window.requestAnimationFrame) { return window.requestAnimationFrame(callback); }\n else if (window.webkitRequestAnimationFrame) { return window.webkitRequestAnimationFrame(callback); }\n return window.setTimeout(callback, 1000 / 60);\n },\n cancelAnimationFrame: function cancelAnimationFrame(id) {\n if (window.cancelAnimationFrame) { return window.cancelAnimationFrame(id); }\n else if (window.webkitCancelAnimationFrame) { return window.webkitCancelAnimationFrame(id); }\n return window.clearTimeout(id);\n },\n supportTouch: !!(('ontouchstart' in window) || (window.DocumentTouch && document instanceof window.DocumentTouch)),\n removeDiacritics: function removeDiacritics(str) {\n return str.replace(/[^\\u0000-\\u007E]/g, function (a) { return diacriticsMap[a] || a; });\n },\n extend: function extend() {\n var args = [], len$1 = arguments.length;\n while ( len$1-- ) args[ len$1 ] = arguments[ len$1 ];\n\n var to = Object(args[0]);\n for (var i = 1; i < args.length; i += 1) {\n var nextSource = args[i];\n if (nextSource !== undefined && nextSource !== null) {\n var keysArray = Object.keys(Object(nextSource));\n for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {\n var nextKey = keysArray[nextIndex];\n var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n if (typeof to[nextKey] === 'object' && typeof nextSource[nextKey] === 'object') {\n Utils.extend(to[nextKey], nextSource[nextKey]);\n } else {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n }\n return to;\n },\n};\n\n// Aliases\nUtils.parseQuery = Utils.parseUrlQuery;\nUtils.param = Utils.serializeObject;\n\n// Global Ajax Setup\nvar globalAjaxOptions = {};\n$.ajaxSetup = function ajaxSetup(options) {\n if (options.type && !options.method) { options.method = options.type; }\n Utils.each(options, function (optionName, optionValue) {\n globalAjaxOptions[optionName] = optionValue;\n });\n};\n\n// JSONP Requests\nvar jsonpRequests = 0;\n\n// Ajax\nfunction Ajax(options) {\n var defaults = {\n method: 'GET',\n data: false,\n async: true,\n cache: true,\n user: '',\n password: '',\n headers: {},\n xhrFields: {},\n statusCode: {},\n processData: true,\n dataType: 'text',\n contentType: 'application/x-www-form-urlencoded',\n timeout: 0,\n };\n var callbacks = ['beforeSend', 'error', 'complete', 'success', 'statusCode'];\n\n // For jQuery guys\n if (options.type) { options.method = options.type; }\n\n // Global options\n var globals = globalAjaxOptions;\n\n // Merge global and defaults\n Utils.each(globals, function (globalOptionName, globalOptionValue) {\n if (callbacks.indexOf(globalOptionName) < 0) { defaults[globalOptionName] = globalOptionValue; }\n });\n\n // Function to run XHR callbacks and events\n function fireAjaxCallback(eventName, eventData, callbackName) {\n var a = arguments;\n if (eventName) { $(document).trigger(eventName, eventData); }\n if (callbackName) {\n // Global callback\n if (callbackName in globals) { globals[callbackName](a[3], a[4], a[5], a[6]); }\n // Options callback\n if (options[callbackName]) { options[callbackName](a[3], a[4], a[5], a[6]); }\n }\n }\n\n // Merge options and defaults\n Utils.each(defaults, function (prop, defaultValue) {\n if (!(prop in options)) { options[prop] = defaultValue; }\n });\n\n // Default URL\n if (!options.url) {\n options.url = window.location.toString();\n }\n // Parameters Prefix\n var paramsPrefix = options.url.indexOf('?') >= 0 ? '&' : '?';\n\n // UC method\n var method = options.method.toUpperCase();\n\n // Data to modify GET URL\n if ((method === 'GET' || method === 'HEAD' || method === 'OPTIONS' || method === 'DELETE') && options.data) {\n var stringData;\n if (typeof options.data === 'string') {\n // Should be key=value string\n if (options.data.indexOf('?') >= 0) { stringData = options.data.split('?')[1]; }\n else { stringData = options.data; }\n } else {\n // Should be key=value object\n stringData = Utils.serializeObject(options.data);\n }\n if (stringData.length) {\n options.url += paramsPrefix + stringData;\n if (paramsPrefix === '?') { paramsPrefix = '&'; }\n }\n }\n // JSONP\n if (options.dataType === 'json' && options.url.indexOf('callback=') >= 0) {\n var callbackName = \"f7jsonp_\" + (Date.now() + ((jsonpRequests += 1)));\n var abortTimeout;\n var callbackSplit = options.url.split('callback=');\n var requestUrl = (callbackSplit[0]) + \"callback=\" + callbackName;\n if (callbackSplit[1].indexOf('&') >= 0) {\n var addVars = callbackSplit[1].split('&').filter(function (el) { return el.indexOf('=') > 0; }).join('&');\n if (addVars.length > 0) { requestUrl += \"&\" + addVars; }\n }\n\n // Create script\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.onerror = function onerror() {\n clearTimeout(abortTimeout);\n fireAjaxCallback(undefined, undefined, 'error', null, 'scripterror');\n fireAjaxCallback('ajaxComplete ajax:complete', { scripterror: true }, 'complete', null, 'scripterror');\n };\n script.src = requestUrl;\n\n // Handler\n window[callbackName] = function jsonpCallback(data) {\n clearTimeout(abortTimeout);\n fireAjaxCallback(undefined, undefined, 'success', data);\n script.parentNode.removeChild(script);\n script = null;\n delete window[callbackName];\n };\n document.querySelector('head').appendChild(script);\n\n if (options.timeout > 0) {\n abortTimeout = setTimeout(function () {\n script.parentNode.removeChild(script);\n script = null;\n fireAjaxCallback(undefined, undefined, 'error', null, 'timeout');\n }, options.timeout);\n }\n\n return;\n }\n\n // Cache for GET/HEAD requests\n if (method === 'GET' || method === 'HEAD' || method === 'OPTIONS' || method === 'DELETE') {\n if (options.cache === false) {\n options.url += paramsPrefix + \"_nocache\" + (Date.now());\n }\n }\n\n // Create XHR\n var xhr = new XMLHttpRequest();\n\n // Save Request URL\n xhr.requestUrl = options.url;\n xhr.requestParameters = options;\n\n // Open XHR\n xhr.open(method, options.url, options.async, options.user, options.password);\n\n // Create POST Data\n var postData = null;\n\n if ((method === 'POST' || method === 'PUT' || method === 'PATCH') && options.data) {\n if (options.processData) {\n var postDataInstances = [ArrayBuffer, Blob, Document, FormData];\n // Post Data\n if (postDataInstances.indexOf(options.data.constructor) >= 0) {\n postData = options.data;\n } else {\n // POST Headers\n var boundary = \"---------------------------\" + (Date.now().toString(16));\n\n if (options.contentType === 'multipart\\/form-data') {\n xhr.setRequestHeader('Content-Type', (\"multipart/form-data; boundary=\" + boundary));\n } else {\n xhr.setRequestHeader('Content-Type', options.contentType);\n }\n postData = '';\n var data = Utils.serializeObject(options.data);\n if (options.contentType === 'multipart\\/form-data') {\n boundary = \"---------------------------\" + (Date.now().toString(16));\n data = data.split('&');\n var newData = [];\n for (var i = 0; i < data.length; i += 1) {\n newData.push('Content-Disposition: form-data; name=\"' + _data[i].split('=')[0] + '\"\\r\\n\\r\\n' + _data[i].split('=')[1] + '\\r\\n');\n }\n postData = \"--\" + boundary + \"\\r\\n\" + (newData.join((\"--\" + boundary + \"\\r\\n\"))) + \"--\" + boundary + \"--\\r\\n\";\n } else {\n postData = data;\n }\n }\n } else {\n postData = options.data;\n }\n }\n\n // Additional headers\n if (options.headers) {\n Utils.each(options.headers, function (headerName, headerCallback) {\n xhr.setRequestHeader(headerName, headerCallback);\n });\n }\n\n // Check for crossDomain\n if (typeof options.crossDomain === 'undefined') {\n options.crossDomain = /^([\\w-]+:)?\\/\\/([^\\/]+)/.test(options.url) && RegExp.$2 !== window.location.host;\n }\n\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n }\n\n if (options.xhrFields) {\n Utils.each(options.xhrFields, function (fieldName, fieldValue) {\n xhr[fieldName] = fieldValue;\n });\n }\n\n var xhrTimeout;\n // Handle XHR\n xhr.onload = function onload(e) {\n if (xhrTimeout) { clearTimeout(xhrTimeout); }\n if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 0) {\n var responseData;\n if (options.dataType === 'json') {\n try {\n responseData = JSON.parse(xhr.responseText);\n fireAjaxCallback('ajaxSuccess ajax:success', { xhr: xhr }, 'success', responseData, xhr.status, xhr);\n } catch (err) {\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr, parseerror: true }, 'error', xhr, 'parseerror');\n }\n } else {\n responseData = xhr.responseType === 'text' || xhr.responseType === '' ? xhr.responseText : xhr.response;\n fireAjaxCallback('ajaxSuccess ajax:success', { xhr: xhr }, 'success', responseData, xhr.status, xhr);\n }\n } else {\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr }, 'error', xhr, xhr.status);\n }\n if (options.statusCode) {\n if (globals.statusCode && globals.statusCode[xhr.status]) { globals.statusCode[xhr.status](xhr); }\n if (options.statusCode[xhr.status]) { options.statusCode[xhr.status](xhr); }\n }\n fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr }, 'complete', xhr, xhr.status);\n };\n\n xhr.onerror = function onerror(e) {\n if (xhrTimeout) { clearTimeout(xhrTimeout); }\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr }, 'error', xhr, xhr.status);\n fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr, error: true }, 'complete', xhr, 'error');\n };\n\n // Ajax start callback\n fireAjaxCallback('ajaxStart ajax:start', { xhr: xhr }, 'start', xhr);\n fireAjaxCallback(undefined, undefined, 'beforeSend', xhr);\n\n // Timeout\n if (options.timeout > 0) {\n xhr.onabort = function onabort() {\n if (xhrTimeout) { clearTimeout(xhrTimeout); }\n };\n xhrTimeout = setTimeout(function () {\n xhr.abort();\n fireAjaxCallback('ajaxError ajax:error', { xhr: xhr, timeout: true }, 'error', xhr, 'timeout');\n fireAjaxCallback('ajaxComplete ajax:complete', { xhr: xhr, timeout: true }, 'complete', xhr, 'timeout');\n }, options.timeout);\n }\n\n // Send XHR\n xhr.send(postData);\n\n // Return XHR object\n return xhr;\n}\n\nvar Scroll = {\n scrollTo: function scrollTo(left, top, duration, easing, callback) {\n if ( easing === void 0 ) easing = 'swing';\n\n if (arguments.length === 4 && typeof easing === 'function') {\n callback = easing;\n easing = undefined;\n }\n return this.each(function animate() {\n var el = this;\n var currentTop;\n var currentLeft;\n var maxTop;\n var maxLeft;\n var newTop;\n var newLeft;\n var scrollTop;\n var scrollLeft;\n var animateTop = top > 0 || top === 0;\n var animateLeft = left > 0 || left === 0;\n if (typeof easing === 'undefined') {\n easing = 'swing';\n }\n if (animateTop) {\n currentTop = el.scrollTop;\n if (!duration) {\n el.scrollTop = top;\n }\n }\n if (animateLeft) {\n currentLeft = el.scrollLeft;\n if (!duration) {\n el.scrollLeft = left;\n }\n }\n if (!duration) { return; }\n if (animateTop) {\n maxTop = el.scrollHeight - el.offsetHeight;\n newTop = Math.max(Math.min(top, maxTop), 0);\n }\n if (animateLeft) {\n maxLeft = el.scrollWidth - el.offsetWidth;\n newLeft = Math.max(Math.min(left, maxLeft), 0);\n }\n var startTime = null;\n if (animateTop && newTop === currentTop) { animateTop = false; }\n if (animateLeft && newLeft === currentLeft) { animateLeft = false; }\n function render(time) {\n if ( time === void 0 ) time = new Date().getTime();\n\n if (startTime === null) {\n startTime = time;\n }\n var progress = Math.max(Math.min((time - startTime) / duration, 1), 0);\n var easeProgress = easing === 'linear' ? progress : (0.5 - (Math.cos(progress * Math.PI) / 2));\n var done;\n if (animateTop) { scrollTop = currentTop + (easeProgress * (newTop - currentTop)); }\n if (animateLeft) { scrollLeft = currentLeft + (easeProgress * (newLeft - currentLeft)); }\n if (animateTop && newTop > currentTop && scrollTop >= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n if (animateTop && newTop < currentTop && scrollTop <= newTop) {\n el.scrollTop = newTop;\n done = true;\n }\n if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) {\n el.scrollLeft = newLeft;\n done = true;\n }\n\n if (done) {\n if (callback) { callback(); }\n return;\n }\n if (animateTop) { el.scrollTop = scrollTop; }\n if (animateLeft) { el.scrollLeft = scrollLeft; }\n Utils.requestAnimationFrame(render);\n }\n Utils.requestAnimationFrame(render);\n });\n },\n scrollTop: function scrollTop(top, duration, easing, callback) {\n if (arguments.length === 3 && typeof easing === 'function') {\n callback = easing;\n easing = undefined;\n }\n var dom = this;\n if (typeof top === 'undefined') {\n if (dom.length > 0) { return dom[0].scrollTop; }\n return null;\n }\n return dom.scrollTo(undefined, top, duration, easing, callback);\n },\n scrollLeft: function scrollLeft(left, duration, easing, callback) {\n if (arguments.length === 3 && typeof easing === 'function') {\n callback = easing;\n easing = undefined;\n }\n var dom = this;\n if (typeof left === 'undefined') {\n if (dom.length > 0) { return dom[0].scrollLeft; }\n return null;\n }\n return dom.scrollTo(left, undefined, duration, easing, callback);\n },\n};\n\nvar Methods = {\n // Classes and attributes\n addClass: function addClass(className) {\n var this$1 = this;\n\n if (typeof className === 'undefined') {\n return this;\n }\n var classes = className.split(' ');\n for (var i = 0; i < classes.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.add(classes[i]); }\n }\n }\n return this;\n },\n removeClass: function removeClass(className) {\n var this$1 = this;\n\n var classes = className.split(' ');\n for (var i = 0; i < classes.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.remove(classes[i]); }\n }\n }\n return this;\n },\n hasClass: function hasClass(className) {\n if (!this[0]) { return false; }\n return this[0].classList.contains(className);\n },\n toggleClass: function toggleClass(className) {\n var this$1 = this;\n\n var classes = className.split(' ');\n for (var i = 0; i < classes.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.toggle(classes[i]); }\n }\n }\n return this;\n },\n attr: function attr(attrs, value) {\n var arguments$1 = arguments;\n var this$1 = this;\n\n if (arguments.length === 1 && typeof attrs === 'string') {\n // Get attr\n if (this[0]) { return this[0].getAttribute(attrs); }\n return undefined;\n }\n\n // Set attrs\n for (var i = 0; i < this.length; i += 1) {\n if (arguments$1.length === 2) {\n // String\n this$1[i].setAttribute(attrs, value);\n } else {\n // Object\n for (var attrName in attrs) {\n this$1[i][attrName] = attrs[attrName];\n this$1[i].setAttribute(attrName, attrs[attrName]);\n }\n }\n }\n return this;\n },\n removeAttr: function removeAttr(attr) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].removeAttribute(attr);\n }\n return this;\n },\n prop: function prop(props, value) {\n var arguments$1 = arguments;\n var this$1 = this;\n\n if (arguments.length === 1 && typeof props === 'string') {\n // Get prop\n if (this[0]) { return this[0][props]; }\n } else {\n // Set props\n for (var i = 0; i < this.length; i += 1) {\n if (arguments$1.length === 2) {\n // String\n this$1[i][props] = value;\n } else {\n // Object\n for (var propName in props) {\n this$1[i][propName] = props[propName];\n }\n }\n }\n return this;\n }\n },\n data: function data(key, value) {\n var this$1 = this;\n\n var el;\n if (typeof value === 'undefined') {\n el = this[0];\n // Get value\n if (el) {\n if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) {\n return el.dom7ElementDataStorage[key];\n }\n\n var dataKey = el.getAttribute((\"data-\" + key));\n if (dataKey) {\n return dataKey;\n }\n return undefined;\n }\n return undefined;\n }\n\n // Set value\n for (var i = 0; i < this.length; i += 1) {\n el = this$1[i];\n if (!el.dom7ElementDataStorage) { el.dom7ElementDataStorage = {}; }\n el.dom7ElementDataStorage[key] = value;\n }\n return this;\n },\n removeData: function removeData(key) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n var el = this$1[i];\n if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) {\n el.dom7ElementDataStorage[key] = null;\n delete el.dom7ElementDataStorage[key];\n }\n }\n },\n dataset: function dataset() {\n var el = this[0];\n if (!el) { return undefined; }\n var dataset = {};\n if (el.dataset) {\n for (var dataKey in el.dataset) {\n dataset[dataKey] = el.dataset[dataKey];\n }\n } else {\n for (var i = 0; i < el.attributes.length; i += 1) {\n var attr = el.attributes[i];\n if (attr.name.indexOf('data-') >= 0) {\n dataset[Utils.toCamelCase(attr.name.split('data-')[1])] = attr.value;\n }\n }\n }\n for (var key in dataset) {\n if (dataset[key] === 'false') { dataset[key] = false; }\n else if (dataset[key] === 'true') { dataset[key] = true; }\n else if (parseFloat(dataset[key]) === dataset[key] * 1) { dataset[key] *= 1; }\n }\n return dataset;\n },\n val: function val(value) {\n var this$1 = this;\n\n if (typeof value === 'undefined') {\n if (this[0]) {\n if (this[0].multiple && this[0].nodeName.toLowerCase() === 'select') {\n var values = [];\n for (var i = 0; i < this[0].selectedOptions.length; i += 1) {\n values.push(this$1[0].selectedOptions[i].value);\n }\n return values;\n }\n return this[0].value;\n }\n return undefined;\n }\n\n for (var i$1 = 0; i$1 < this.length; i$1 += 1) {\n this$1[i$1].value = value;\n }\n return this;\n },\n // Transforms\n transform: function transform(transform$1) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n var elStyle = this$1[i].style;\n elStyle.webkitTransform = transform$1;\n elStyle.transform = transform$1;\n }\n return this;\n },\n transition: function transition(duration) {\n var this$1 = this;\n\n if (typeof duration !== 'string') {\n duration = duration + \"ms\";\n }\n for (var i = 0; i < this.length; i += 1) {\n var elStyle = this$1[i].style;\n elStyle.webkitTransitionDuration = duration;\n elStyle.transitionDuration = duration;\n }\n return this;\n },\n // Events\n on: function on() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var eventType = args[0];\n var targetSelector;\n var listener;\n var capture = false;\n if (typeof args[1] === 'function') {\n targetSelector = false;\n listener = args[1];\n capture = args[2];\n } else {\n targetSelector = args[1];\n listener = args[2];\n capture = args[3];\n }\n function handleLiveEvent(e) {\n var target = e.target;\n var eventData = e.target.dom7EventData || [];\n eventData.unshift(e);\n if ($(target).is(targetSelector)) { listener.apply(target, eventData); }\n else {\n var parents = $(target).parents();\n for (var k = 0; k < parents.length; k += 1) {\n if ($(parents[k]).is(targetSelector)) { listener.apply(parents[k], eventData); }\n }\n }\n }\n function handleEvent(e) {\n var eventData = e.target.dom7EventData || [];\n eventData.unshift(e);\n listener.apply(this, eventData);\n }\n var events = eventType.split(' ');\n var j;\n for (var i = 0; i < this.length; i += 1) {\n var el = this$1[i];\n if (!targetSelector) {\n for (j = 0; j < events.length; j += 1) {\n if (!el.dom7Listeners) { el.dom7Listeners = []; }\n el.dom7Listeners.push({\n type: eventType,\n listener: listener,\n proxyListener: handleEvent,\n });\n el.addEventListener(events[j], handleEvent, capture);\n }\n } else {\n // Live events\n for (j = 0; j < events.length; j += 1) {\n if (!el.dom7LiveListeners) { el.dom7LiveListeners = []; }\n el.dom7LiveListeners.push({\n type: eventType,\n listener: listener,\n proxyListener: handleLiveEvent,\n });\n el.addEventListener(events[j], handleLiveEvent, capture);\n }\n }\n }\n return this;\n },\n off: function off() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var eventType = args[0];\n var targetSelector;\n var listener;\n var capture = false;\n if (typeof args[1] === 'function') {\n targetSelector = false;\n listener = args[1];\n capture = args[2];\n } else {\n targetSelector = args[1];\n listener = args[2];\n capture = args[3];\n }\n var events = eventType.split(' ');\n for (var i = 0; i < events.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n var el = this$1[j];\n if (!targetSelector) {\n if (el.dom7Listeners) {\n for (var k = 0; k < el.dom7Listeners.length; k += 1) {\n if (listener) {\n if (el.dom7Listeners[k].listener === listener) {\n el.removeEventListener(events[i], el.dom7Listeners[k].proxyListener, capture);\n }\n } else if (el.dom7Listeners[k].type === events[i]) {\n el.removeEventListener(events[i], el.dom7Listeners[k].proxyListener, capture);\n }\n }\n }\n } else if (el.dom7LiveListeners) {\n for (var k$1 = 0; k$1 < el.dom7LiveListeners.length; k$1 += 1) {\n if (listener) {\n if (el.dom7LiveListeners[k$1].listener === listener) {\n el.removeEventListener(events[i], el.dom7LiveListeners[k$1].proxyListener, capture);\n }\n } else if (el.dom7Listeners[k$1].type === events[i]) {\n el.removeEventListener(events[i], el.dom7LiveListeners[k$1].proxyListener, capture);\n }\n }\n }\n }\n }\n return this;\n },\n once: function once(eventName, targetSelector, listener, capture) {\n var dom = this;\n if (typeof targetSelector === 'function') {\n listener = arguments[1];\n capture = arguments[2];\n targetSelector = false;\n }\n function proxy(e) {\n var eventData = e.target.dom7EventData || [];\n listener.apply(this, eventData);\n dom.off(eventName, targetSelector, proxy, capture);\n }\n return dom.on(eventName, targetSelector, proxy, capture);\n },\n trigger: function trigger() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var events = args[0].split(' ');\n var eventData = args[1];\n for (var i = 0; i < events.length; i += 1) {\n for (var j = 0; j < this.length; j += 1) {\n var evt = (void 0);\n try {\n evt = new CustomEvent(events[i], { detail: eventData, bubbles: true, cancelable: true });\n } catch (e) {\n evt = document.createEvent('Event');\n evt.initEvent(events[i], true, true);\n evt.detail = eventData;\n }\n this$1[j].dom7EventData = args.filter(function (data, dataIndex) { return dataIndex > 0; });\n this$1[j].dispatchEvent(evt);\n this$1[j].dom7EventData = [];\n delete this$1[j].dom7EventData;\n }\n }\n return this;\n },\n transitionEnd: function transitionEnd(callback) {\n var events = ['webkitTransitionEnd', 'transitionend'];\n var dom = this;\n var i;\n function fireCallBack(e) {\n /* jshint validthis:true */\n if (e.target !== this) { return; }\n callback.call(this, e);\n for (i = 0; i < events.length; i += 1) {\n dom.off(events[i], fireCallBack);\n }\n }\n if (callback) {\n for (i = 0; i < events.length; i += 1) {\n dom.on(events[i], fireCallBack);\n }\n }\n return this;\n },\n animationEnd: function animationEnd(callback) {\n var events = ['webkitAnimationEnd', 'animationend'];\n var dom = this;\n var i;\n function fireCallBack(e) {\n callback(e);\n for (i = 0; i < events.length; i += 1) {\n dom.off(events[i], fireCallBack);\n }\n }\n if (callback) {\n for (i = 0; i < events.length; i += 1) {\n dom.on(events[i], fireCallBack);\n }\n }\n return this;\n },\n // Sizing/Styles\n width: function width() {\n if (this[0] === window) {\n return window.innerWidth;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('width'));\n }\n\n return null;\n },\n outerWidth: function outerWidth(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n var styles = this.styles();\n return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));\n }\n return this[0].offsetWidth;\n }\n return null;\n },\n height: function height() {\n if (this[0] === window) {\n return window.innerHeight;\n }\n\n if (this.length > 0) {\n return parseFloat(this.css('height'));\n }\n\n return null;\n },\n outerHeight: function outerHeight(includeMargins) {\n if (this.length > 0) {\n if (includeMargins) {\n var styles = this.styles();\n return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));\n }\n return this[0].offsetHeight;\n }\n return null;\n },\n offset: function offset() {\n if (this.length > 0) {\n var el = this[0];\n var box = el.getBoundingClientRect();\n var body = document.body;\n var clientTop = el.clientTop || body.clientTop || 0;\n var clientLeft = el.clientLeft || body.clientLeft || 0;\n var scrollTop = el === window ? window.scrollY : el.scrollTop;\n var scrollLeft = el === window ? window.scrollX : el.scrollLeft;\n return {\n top: (box.top + scrollTop) - clientTop,\n left: (box.left + scrollLeft) - clientLeft,\n };\n }\n\n return null;\n },\n hide: function hide() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].style.display = 'none';\n }\n return this;\n },\n show: function show() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].style.display = 'block';\n }\n return this;\n },\n styles: function styles() {\n if (this[0]) { return window.getComputedStyle(this[0], null); }\n },\n css: function css(props, value) {\n var this$1 = this;\n\n var i;\n if (arguments.length === 1) {\n if (typeof props === 'string') {\n if (this[0]) { return window.getComputedStyle(this[0], null).getPropertyValue(props); }\n } else {\n for (i = 0; i < this.length; i += 1) {\n for (var prop in props) {\n this$1[i].style[prop] = props[prop];\n }\n }\n return this;\n }\n }\n if (arguments.length === 2 && typeof props === 'string') {\n for (i = 0; i < this.length; i += 1) {\n this$1[i].style[props] = value;\n }\n return this;\n }\n return this;\n },\n\n // Dom manipulation\n // Iterate over the collection passing elements to `callback`\n each: function each(callback) {\n var this$1 = this;\n\n // Don't bother continuing without a callback\n if (!callback) { return this; }\n // Iterate over the current collection\n for (var i = 0; i < this.length; i += 1) {\n // If the callback returns false\n if (callback.call(this$1[i], i, this$1[i]) === false) {\n // End the loop early\n return this$1;\n }\n }\n // Return `this` to allow chained DOM operations\n return this;\n },\n filter: function filter(callback) {\n var matchedItems = [];\n var dom = this;\n for (var i = 0; i < dom.length; i += 1) {\n if (callback.call(dom[i], i, dom[i])) { matchedItems.push(dom[i]); }\n }\n return new Dom7(matchedItems);\n },\n html: function html(html$1) {\n var this$1 = this;\n\n if (typeof html$1 === 'undefined') {\n return this[0] ? this[0].innerHTML : undefined;\n }\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].innerHTML = html$1;\n }\n return this;\n },\n text: function text(text$1) {\n var this$1 = this;\n\n if (typeof text$1 === 'undefined') {\n if (this[0]) {\n return this[0].textContent.trim();\n }\n return null;\n }\n\n for (var i = 0; i < this.length; i += 1) {\n this$1[i].textContent = text$1;\n }\n return this;\n },\n is: function is(selector) {\n var el = this[0];\n var compareWith;\n var i;\n if (!el || typeof selector === 'undefined') { return false; }\n if (typeof selector === 'string') {\n if (el.matches) { return el.matches(selector); }\n else if (el.webkitMatchesSelector) { return el.webkitMatchesSelector(selector); }\n else if (el.msMatchesSelector) { return el.msMatchesSelector(selector); }\n\n compareWith = $(selector);\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) { return true; }\n }\n return false;\n } else if (selector === document) { return el === document; }\n else if (selector === window) { return el === window; }\n\n if (selector.nodeType || selector instanceof Dom7) {\n compareWith = selector.nodeType ? [selector] : selector;\n for (i = 0; i < compareWith.length; i += 1) {\n if (compareWith[i] === el) { return true; }\n }\n return false;\n }\n return false;\n },\n indexOf: function indexOf(el) {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n if (this$1[i] === el) { return i; }\n }\n },\n index: function index() {\n var child = this[0];\n var i;\n if (child) {\n i = 0;\n while ((child = child.previousSibling) !== null) {\n if (child.nodeType === 1) { i += 1; }\n }\n return i;\n }\n },\n eq: function eq(index) {\n if (typeof index === 'undefined') { return this; }\n var length = this.length;\n var returnIndex;\n if (index > length - 1) {\n return new Dom7([]);\n }\n if (index < 0) {\n returnIndex = length + index;\n if (returnIndex < 0) { return new Dom7([]); }\n return new Dom7([this[returnIndex]]);\n }\n return new Dom7([this[index]]);\n },\n append: function append() {\n var this$1 = this;\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var newChild;\n\n for (var k = 0; k < args.length; k += 1) {\n newChild = args[k];\n for (var i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n var tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n while (tempDiv.firstChild) {\n this$1[i].appendChild(tempDiv.firstChild);\n }\n } else if (newChild instanceof Dom7) {\n for (var j = 0; j < newChild.length; j += 1) {\n this$1[i].appendChild(newChild[j]);\n }\n } else {\n this$1[i].appendChild(newChild);\n }\n }\n }\n\n return this;\n },\n appendTo: function appendTo(parent) {\n $(parent).append(this);\n return this;\n },\n prepend: function prepend(newChild) {\n var this$1 = this;\n\n var i;\n var j;\n for (i = 0; i < this.length; i += 1) {\n if (typeof newChild === 'string') {\n var tempDiv = document.createElement('div');\n tempDiv.innerHTML = newChild;\n for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {\n this$1[i].insertBefore(tempDiv.childNodes[j], this$1[i].childNodes[0]);\n }\n } else if (newChild instanceof Dom7) {\n for (j = 0; j < newChild.length; j += 1) {\n this$1[i].insertBefore(newChild[j], this$1[i].childNodes[0]);\n }\n } else {\n this$1[i].insertBefore(newChild, this$1[i].childNodes[0]);\n }\n }\n return this;\n },\n prependTo: function prependTo(parent) {\n $(parent).prepend(this);\n return this;\n },\n insertBefore: function insertBefore(selector) {\n var this$1 = this;\n\n var before = $(selector);\n for (var i = 0; i < this.length; i += 1) {\n if (before.length === 1) {\n before[0].parentNode.insertBefore(this$1[i], before[0]);\n } else if (before.length > 1) {\n for (var j = 0; j < before.length; j += 1) {\n before[j].parentNode.insertBefore(this$1[i].cloneNode(true), before[j]);\n }\n }\n }\n },\n insertAfter: function insertAfter(selector) {\n var this$1 = this;\n\n var after = $(selector);\n for (var i = 0; i < this.length; i += 1) {\n if (after.length === 1) {\n after[0].parentNode.insertBefore(this$1[i], after[0].nextSibling);\n } else if (after.length > 1) {\n for (var j = 0; j < after.length; j += 1) {\n after[j].parentNode.insertBefore(this$1[i].cloneNode(true), after[j].nextSibling);\n }\n }\n }\n },\n next: function next(selector) {\n if (this.length > 0) {\n if (selector) {\n if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { return new Dom7([this[0].nextElementSibling]); }\n return new Dom7([]);\n }\n\n if (this[0].nextElementSibling) { return new Dom7([this[0].nextElementSibling]); }\n return new Dom7([]);\n }\n return new Dom7([]);\n },\n nextAll: function nextAll(selector) {\n var nextEls = [];\n var el = this[0];\n if (!el) { return new Dom7([]); }\n while (el.nextElementSibling) {\n var next = el.nextElementSibling;\n if (selector) {\n if ($(next).is(selector)) { nextEls.push(next); }\n } else { nextEls.push(next); }\n el = next;\n }\n return new Dom7(nextEls);\n },\n prev: function prev(selector) {\n if (this.length > 0) {\n var el = this[0];\n if (selector) {\n if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { return new Dom7([el.previousElementSibling]); }\n return new Dom7([]);\n }\n\n if (el.previousElementSibling) { return new Dom7([el.previousElementSibling]); }\n return new Dom7([]);\n }\n return new Dom7([]);\n },\n prevAll: function prevAll(selector) {\n var prevEls = [];\n var el = this[0];\n if (!el) { return new Dom7([]); }\n while (el.previousElementSibling) {\n var prev = el.previousElementSibling;\n if (selector) {\n if ($(prev).is(selector)) { prevEls.push(prev); }\n } else { prevEls.push(prev); }\n el = prev;\n }\n return new Dom7(prevEls);\n },\n siblings: function siblings(selector) {\n return this.nextAll(selector).add(this.prevAll(selector));\n },\n parent: function parent(selector) {\n var this$1 = this;\n\n var parents = [];\n for (var i = 0; i < this.length; i += 1) {\n if (this$1[i].parentNode !== null) {\n if (selector) {\n if ($(this$1[i].parentNode).is(selector)) { parents.push(this$1[i].parentNode); }\n } else {\n parents.push(this$1[i].parentNode);\n }\n }\n }\n return $(Utils.unique(parents));\n },\n parents: function parents(selector) {\n var this$1 = this;\n\n var parents = [];\n for (var i = 0; i < this.length; i += 1) {\n var parent = this$1[i].parentNode;\n while (parent) {\n if (selector) {\n if ($(parent).is(selector)) { parents.push(parent); }\n } else {\n parents.push(parent);\n }\n parent = parent.parentNode;\n }\n }\n return $(Utils.unique(parents));\n },\n closest: function closest(selector) {\n var closest = this;\n if (typeof selector === 'undefined') {\n return new Dom7([]);\n }\n if (!closest.is(selector)) {\n closest = closest.parents(selector).eq(0);\n }\n return closest;\n },\n find: function find(selector) {\n var this$1 = this;\n\n var foundElements = [];\n for (var i = 0; i < this.length; i += 1) {\n var found = this$1[i].querySelectorAll(selector);\n for (var j = 0; j < found.length; j += 1) {\n foundElements.push(found[j]);\n }\n }\n return new Dom7(foundElements);\n },\n children: function children(selector) {\n var this$1 = this;\n\n var children = [];\n for (var i = 0; i < this.length; i += 1) {\n var childNodes = this$1[i].childNodes;\n\n for (var j = 0; j < childNodes.length; j += 1) {\n if (!selector) {\n if (childNodes[j].nodeType === 1) { children.push(childNodes[j]); }\n } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) { children.push(childNodes[j]); }\n }\n }\n return new Dom7(Utils.unique(children));\n },\n remove: function remove() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n if (this$1[i].parentNode) { this$1[i].parentNode.removeChild(this$1[i]); }\n }\n return this;\n },\n detach: function detach() {\n return this.remove();\n },\n add: function add() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var dom = this;\n var i;\n var j;\n for (i = 0; i < args.length; i += 1) {\n var toAdd = $(args[i]);\n for (j = 0; j < toAdd.length; j += 1) {\n dom[dom.length] = toAdd[j];\n dom.length += 1;\n }\n }\n return dom;\n },\n empty: function empty() {\n var this$1 = this;\n\n for (var i = 0; i < this.length; i += 1) {\n var el = this$1[i];\n if (el.nodeType === 1) {\n for (var j = 0; j < el.childNodes.length; j += 1) {\n if (el.childNodes[j].parentNode) {\n el.childNodes[j].parentNode.removeChild(el.childNodes[j]);\n }\n }\n el.textContent = '';\n }\n }\n return this;\n },\n};\n\nfunction Animate(initialProps, initialParams) {\n var els = this;\n var a = {\n props: $.extend({}, initialProps),\n params: $.extend({\n duration: 300,\n easing: 'swing', // or 'linear'\n /* Callbacks\n begin(elements)\n complete(elements)\n progress(elements, complete, remaining, start, tweenValue)\n */\n }, initialParams),\n\n elements: els,\n animating: false,\n que: [],\n\n easingProgress: function easingProgress(easing, progress) {\n if (easing === 'swing') {\n return 0.5 - (Math.cos(progress * Math.PI) / 2);\n }\n if (typeof easing === 'function') {\n return easing(progress);\n }\n return progress;\n },\n stop: function stop() {\n if (a.frameId) {\n Utils.cancelAnimationFrame(a.frameId);\n }\n a.animating = false;\n a.elements.each(function (index, el) {\n var element = el;\n delete element.dom7AnimateInstance;\n });\n a.que = [];\n },\n done: function done(complete) {\n a.animating = false;\n a.elements.each(function (index, el) {\n var element = el;\n delete element.dom7AnimateInstance;\n });\n if (complete) { complete(els); }\n if (a.que.length > 0) {\n var que = a.que.shift();\n a.animate(que[0], que[1]);\n }\n },\n animate: function animate(props, params) {\n if (a.animating) {\n a.que.push([props, params]);\n return a;\n }\n var elements = [];\n\n // Define & Cache Initials & Units\n a.elements.each(function (index, el) {\n var initialFullValue;\n var initialValue;\n var unit;\n var finalValue;\n var finalFullValue;\n\n if (!el.dom7AnimateInstance) { a.elements[index].dom7AnimateInstance = a; }\n\n elements[index] = {\n container: el,\n };\n Object.keys(props).forEach(function (prop) {\n initialFullValue = window.getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.');\n initialValue = parseFloat(initialFullValue);\n unit = initialFullValue.replace(initialValue, '');\n finalValue = parseFloat(props[prop]);\n finalFullValue = props[prop] + unit;\n elements[index][prop] = {\n initialFullValue: initialFullValue,\n initialValue: initialValue,\n unit: unit,\n finalValue: finalValue,\n finalFullValue: finalFullValue,\n currentValue: initialValue,\n };\n });\n });\n\n var startTime = null;\n var time;\n var elementsDone = 0;\n var propsDone = 0;\n var done;\n var began = false;\n\n a.animating = true;\n\n function render() {\n time = new Date().getTime();\n var progress;\n var easeProgress;\n // let el;\n if (!began) {\n began = true;\n if (params.begin) { params.begin(els); }\n }\n if (startTime === null) {\n startTime = time;\n }\n if (params.progress) {\n params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), ((startTime + params.duration) - time < 0 ? 0 : (startTime + params.duration) - time), startTime);\n }\n\n elements.forEach(function (element) {\n var el = element;\n if (done || el.done) { return; }\n Object.keys(props).forEach(function (prop) {\n if (done || el.done) { return; }\n progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0);\n easeProgress = a.easingProgress(params.easing, progress);\n var ref = el[prop];\n var initialValue = ref.initialValue;\n var finalValue = ref.finalValue;\n var unit = ref.unit;\n el[prop].currentValue = initialValue + (easeProgress * (finalValue - initialValue));\n var currentValue = el[prop].currentValue;\n\n if (\n (finalValue > initialValue && currentValue >= finalValue) ||\n (finalValue < initialValue && currentValue <= finalValue)) {\n el.container.style[prop] = finalValue + unit;\n propsDone += 1;\n if (propsDone === Object.keys(props).length) {\n el.done = true;\n elementsDone += 1;\n }\n if (elementsDone === elements.length) {\n done = true;\n }\n }\n if (done) {\n a.done(params.complete);\n return;\n }\n el.container.style[prop] = currentValue + unit;\n });\n });\n if (done) { return; }\n // Then call\n a.frameId = Utils.requestAnimationFrame(render);\n }\n a.frameId = Utils.requestAnimationFrame(render);\n return a;\n },\n };\n\n if (a.elements.length === 0) {\n return els;\n }\n\n var animateInstance;\n for (var i = 0; i < a.elements.length; i += 1) {\n if (a.elements[i].dom7AnimateInstance) {\n animateInstance = a.elements[i].dom7AnimateInstance;\n } else { a.elements[i].dom7AnimateInstance = a; }\n }\n if (!animateInstance) {\n animateInstance = a;\n }\n\n if (initialProps === 'stop') {\n animateInstance.stop();\n } else {\n animateInstance.animate(a.props, a.params);\n }\n\n return els;\n}\n\nfunction Stop() {\n var els = this;\n for (var i = 0; i < els.length; i += 1) {\n if (els[i].dom7AnimateInstance) {\n els[i].dom7AnimateInstance.stop();\n }\n }\n}\n\nfunction dom7() {\n // Utils & Helpers\n Object.keys(Utils).forEach(function (key) {\n $[key] = Utils[key];\n });\n\n // Methods\n Object.keys(Methods).forEach(function (key) {\n Dom7.prototype[key] = Methods[key];\n });\n\n // Scroll\n Object.keys(Scroll).forEach(function (key) {\n Dom7.prototype[key] = Scroll[key];\n });\n\n // Animate\n Dom7.prototype.animate = Animate;\n Dom7.prototype.stop = Stop;\n\n // Ajax\n $.ajax = Ajax;\n\n // Ajax Shrotcuts\n ('get post getJSON').split(' ').forEach(function (method) {\n $[method] = function ajax() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var url;\n var data;\n var success;\n var error;\n var dataType;\n if (typeof args[1] === 'function') {\n var assign;\n (assign = args, url = assign[0], success = assign[1], error = assign[2], dataType = assign[3]);\n } else {\n var assign$1;\n (assign$1 = args, url = assign$1[0], data = assign$1[1], success = assign$1[2], error = assign$1[3], dataType = assign$1[4]);\n }\n [success, error].forEach(function (callback) {\n if (typeof callback === 'string') {\n dataType = callback;\n if (callback === success) { success = undefined; }\n else { error = undefined; }\n }\n });\n dataType = dataType || (method === 'getJSON' ? 'json' : undefined);\n return $.ajax({\n url: url,\n method: method === 'post' ? 'POST' : 'GET',\n data: data,\n success: success,\n error: error,\n dataType: dataType,\n });\n };\n });\n\n // Link to prototype\n $.fn = Dom7.prototype;\n\n return $;\n}\nvar dom7$1 = dom7();\n\nreturn dom7$1;\n\n})));\n\n//# sourceMappingURL=dom7.js.map\n\n/**\n * template7 1.2.3\n * Mobile-first HTML template engine\n * \n * http://www.idangero.us/template7/\n * \n * Copyright 2017, Vladimir Kharlampidi\n * The iDangero.us\n * http://www.idangero.us/\n * \n * Licensed under MIT\n * \n * Released on: May 12, 2017\n */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.Template7 = factory());\n}(this, (function () { 'use strict';\n\nvar template7Context;\nif (typeof window !== 'undefined') {\n template7Context = window;\n} else if (typeof global !== 'undefined') {\n template7Context = global;\n} else {\n template7Context = undefined;\n}\nfunction isArray(arr) {\n return Array.isArray ? Array.isArray(arr) : Object.prototype.toString.apply(arr) === '[object Array]';\n}\nfunction isFunction(func) {\n return typeof func === 'function';\n}\nfunction escape(string) {\n return (typeof template7Context !== 'undefined' && template7Context.escape ? template7Context.escape(string) : string)\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"');\n}\nvar quoteSingleRexExp = new RegExp('\\'', 'g');\nvar quoteDoubleRexExp = new RegExp('\"', 'g');\nfunction helperToSlices(string) {\n var helperParts = string.replace(/[{}#}]/g, '').split(' ');\n var slices = [];\n var shiftIndex;\n var i;\n var j;\n for (i = 0; i < helperParts.length; i += 1) {\n var part = helperParts[i];\n var blockQuoteRegExp = (void 0);\n var openingQuote = (void 0);\n if (i === 0) { slices.push(part); }\n else if (part.indexOf('\"') === 0 || part.indexOf('\\'') === 0) {\n blockQuoteRegExp = part.indexOf('\"') === 0 ? quoteDoubleRexExp : quoteSingleRexExp;\n openingQuote = part.indexOf('\"') === 0 ? '\"' : '\\'';\n // Plain String\n if (part.match(blockQuoteRegExp).length === 2) {\n // One word string\n slices.push(part);\n } else {\n // Find closed Index\n shiftIndex = 0;\n for (j = i + 1; j < helperParts.length; j += 1) {\n part += \" \" + (helperParts[j]);\n if (helperParts[j].indexOf(openingQuote) >= 0) {\n shiftIndex = j;\n slices.push(part);\n break;\n }\n }\n if (shiftIndex) { i = shiftIndex; }\n }\n } else if (part.indexOf('=') > 0) {\n // Hash\n var hashParts = part.split('=');\n var hashName = hashParts[0];\n var hashContent = hashParts[1];\n if (!blockQuoteRegExp) {\n blockQuoteRegExp = hashContent.indexOf('\"') === 0 ? quoteDoubleRexExp : quoteSingleRexExp;\n openingQuote = hashContent.indexOf('\"') === 0 ? '\"' : '\\'';\n }\n if (hashContent.match(blockQuoteRegExp).length !== 2) {\n shiftIndex = 0;\n for (j = i + 1; j < helperParts.length; j += 1) {\n hashContent += \" \" + (helperParts[j]);\n if (helperParts[j].indexOf(openingQuote) >= 0) {\n shiftIndex = j;\n break;\n }\n }\n if (shiftIndex) { i = shiftIndex; }\n }\n var hash = [hashName, hashContent.replace(blockQuoteRegExp, '')];\n slices.push(hash);\n } else {\n // Plain variable\n slices.push(part);\n }\n }\n return slices;\n}\nfunction stringToBlocks(string) {\n var blocks = [];\n var i;\n var j;\n if (!string) { return []; }\n var stringBlocks = string.split(/({{[^{^}]*}})/);\n for (i = 0; i < stringBlocks.length; i += 1) {\n var block = stringBlocks[i];\n if (block === '') { continue; }\n if (block.indexOf('{{') < 0) {\n blocks.push({\n type: 'plain',\n content: block,\n });\n } else {\n if (block.indexOf('{/') >= 0) {\n continue;\n }\n if (block.indexOf('{#') < 0 && block.indexOf(' ') < 0 && block.indexOf('else') < 0) {\n // Simple variable\n blocks.push({\n type: 'variable',\n contextName: block.replace(/[{}]/g, ''),\n });\n continue;\n }\n // Helpers\n var helperSlices = helperToSlices(block);\n var helperName = helperSlices[0];\n var isPartial = helperName === '>';\n var helperContext = [];\n var helperHash = {};\n for (j = 1; j < helperSlices.length; j += 1) {\n var slice = helperSlices[j];\n if (isArray(slice)) {\n // Hash\n helperHash[slice[0]] = slice[1] === 'false' ? false : slice[1];\n } else {\n helperContext.push(slice);\n }\n }\n\n if (block.indexOf('{#') >= 0) {\n // Condition/Helper\n var helperContent = '';\n var elseContent = '';\n var toSkip = 0;\n var shiftIndex = (void 0);\n var foundClosed = false;\n var foundElse = false;\n var depth = 0;\n for (j = i + 1; j < stringBlocks.length; j += 1) {\n if (stringBlocks[j].indexOf('{{#') >= 0) {\n depth += 1;\n }\n if (stringBlocks[j].indexOf('{{/') >= 0) {\n depth -= 1;\n }\n if (stringBlocks[j].indexOf((\"{{#\" + helperName)) >= 0) {\n helperContent += stringBlocks[j];\n if (foundElse) { elseContent += stringBlocks[j]; }\n toSkip += 1;\n } else if (stringBlocks[j].indexOf((\"{{/\" + helperName)) >= 0) {\n if (toSkip > 0) {\n toSkip -= 1;\n helperContent += stringBlocks[j];\n if (foundElse) { elseContent += stringBlocks[j]; }\n } else {\n shiftIndex = j;\n foundClosed = true;\n break;\n }\n } else if (stringBlocks[j].indexOf('else') >= 0 && depth === 0) {\n foundElse = true;\n } else {\n if (!foundElse) { helperContent += stringBlocks[j]; }\n if (foundElse) { elseContent += stringBlocks[j]; }\n }\n }\n if (foundClosed) {\n if (shiftIndex) { i = shiftIndex; }\n blocks.push({\n type: 'helper',\n helperName: helperName,\n contextName: helperContext,\n content: helperContent,\n inverseContent: elseContent,\n hash: helperHash,\n });\n }\n } else if (block.indexOf(' ') > 0) {\n if (isPartial) {\n helperName = '_partial';\n if (helperContext[0]) { helperContext[0] = \"\\\"\" + (helperContext[0].replace(/\"|'/g, '')) + \"\\\"\"; }\n }\n blocks.push({\n type: 'helper',\n helperName: helperName,\n contextName: helperContext,\n hash: helperHash,\n });\n }\n }\n }\n return blocks;\n}\nvar Template7 = function Template7(template) {\n var t = this;\n t.template = template;\n\n function getCompileVar(name, ctx) {\n var variable = ctx;\n var parts;\n var levelsUp = 0;\n if (name.indexOf('../') === 0) {\n var newDepth = variable.split('_')[1] - levelsUp;\n levelsUp = name.split('../').length - 1;\n variable = \"ctx_\" + (newDepth >= 1 ? newDepth : 1);\n parts = name.split('../')[levelsUp].split('.');\n } else if (name.indexOf('@global') === 0) {\n variable = 'Template7.global';\n parts = name.split('@global.')[1].split('.');\n } else if (name.indexOf('@root') === 0) {\n variable = 'root';\n parts = name.split('@root.')[1].split('.');\n } else {\n parts = name.split('.');\n }\n for (var i = 0; i < parts.length; i += 1) {\n var part = parts[i];\n if (part.indexOf('@') === 0) {\n if (i > 0) {\n variable += \"[(data && data.\" + (part.replace('@', '')) + \")]\";\n } else {\n variable = \"(data && data.\" + (name.replace('@', '')) + \")\";\n }\n } else if (isFinite(part)) {\n variable += \"[\" + part + \"]\";\n } else if (part === 'this' || part.indexOf('this.') >= 0 || part.indexOf('this[') >= 0 || part.indexOf('this(') >= 0) {\n variable = part.replace('this', ctx);\n } else {\n variable += \".\" + part;\n }\n }\n\n return variable;\n }\n function getCompiledArguments(contextArray, ctx) {\n var arr = [];\n for (var i = 0; i < contextArray.length; i += 1) {\n if (/^['\"]/.test(contextArray[i])) { arr.push(contextArray[i]); }\n else if (/^(true|false|\\d+)$/.test(contextArray[i])) { arr.push(contextArray[i]); }\n else {\n arr.push(getCompileVar(contextArray[i], ctx));\n }\n }\n\n return arr.join(', ');\n }\n function compile(template, depth) {\n if ( template === void 0 ) template = t.template;\n if ( depth === void 0 ) depth = 1;\n\n if (typeof template !== 'string') {\n throw new Error('Template7: Template must be a string');\n }\n var blocks = stringToBlocks(template);\n var ctx = \"ctx_\" + depth;\n if (blocks.length === 0) {\n return function empty() { return ''; };\n }\n\n function getCompileFn(block, newDepth) {\n if (block.content) { return compile(block.content, newDepth); }\n return function empty() { return ''; };\n }\n function getCompileInverse(block, newDepth) {\n if (block.inverseContent) { return compile(block.inverseContent, newDepth); }\n return function empty() { return ''; };\n }\n\n var resultString = '';\n if (depth === 1) {\n resultString += \"(function (\" + ctx + \", data, root) {\\n\";\n } else {\n resultString += \"(function (\" + ctx + \", data) {\\n\";\n }\n if (depth === 1) {\n resultString += 'function isArray(arr){return Object.prototype.toString.apply(arr) === \\'[object Array]\\';}\\n';\n resultString += 'function isFunction(func){return (typeof func === \\'function\\');}\\n';\n resultString += 'function c(val, ctx) {if (typeof val !== \"undefined\" && val !== null) {if (isFunction(val)) {return val.call(ctx);} else return val;} else return \"\";}\\n';\n resultString += 'root = root || ctx_1 || {};\\n';\n }\n resultString += 'var r = \\'\\';\\n';\n var i;\n for (i = 0; i < blocks.length; i += 1) {\n var block = blocks[i];\n // Plain block\n if (block.type === 'plain') {\n resultString += \"r +='\" + ((block.content).replace(/\\r/g, '\\\\r').replace(/\\n/g, '\\\\n').replace(/'/g, '\\\\' + '\\'')) + \"';\";\n continue;\n }\n var variable = (void 0);\n var compiledArguments = (void 0);\n // Variable block\n if (block.type === 'variable') {\n variable = getCompileVar(block.contextName, ctx);\n resultString += \"r += c(\" + variable + \", \" + ctx + \");\";\n }\n // Helpers block\n if (block.type === 'helper') {\n if (block.helperName in t.helpers) {\n compiledArguments = getCompiledArguments(block.contextName, ctx);\n\n resultString += \"r += (Template7.helpers.\" + (block.helperName) + \").call(\" + ctx + \", \" + (compiledArguments && ((compiledArguments + \", \"))) + \"{hash:\" + (JSON.stringify(block.hash)) + \", data: data || {}, fn: \" + (getCompileFn(block, depth + 1)) + \", inverse: \" + (getCompileInverse(block, depth + 1)) + \", root: root});\";\n } else if (block.contextName.length > 0) {\n throw new Error((\"Template7: Missing helper: \\\"\" + (block.helperName) + \"\\\"\"));\n } else {\n variable = getCompileVar(block.helperName, ctx);\n resultString += \"if (\" + variable + \") {\";\n resultString += \"if (isArray(\" + variable + \")) {\";\n resultString += \"r += (Template7.helpers.each).call(\" + ctx + \", \" + variable + \", {hash:\" + (JSON.stringify(block.hash)) + \", data: data || {}, fn: \" + (getCompileFn(block, depth + 1)) + \", inverse: \" + (getCompileInverse(block, depth + 1)) + \", root: root});\";\n resultString += '}else {';\n resultString += \"r += (Template7.helpers.with).call(\" + ctx + \", \" + variable + \", {hash:\" + (JSON.stringify(block.hash)) + \", data: data || {}, fn: \" + (getCompileFn(block, depth + 1)) + \", inverse: \" + (getCompileInverse(block, depth + 1)) + \", root: root});\";\n resultString += '}}';\n }\n }\n }\n resultString += '\\nreturn r;})';\n return eval.call(template7Context, resultString);\n }\n t.compile = function _compile(template) {\n if (!t.compiled) {\n t.compiled = compile(template);\n }\n return t.compiled;\n };\n};\n\nTemplate7.prototype = {\n options: {},\n partials: {},\n helpers: {\n _partial: function _partial(partialName, options) {\n var p = Template7.prototype.partials[partialName];\n if (!p || (p && !p.template)) { return ''; }\n if (!p.compiled) {\n p.compiled = new Template7(p.template).compile();\n }\n var ctx = this;\n for (var hashName in options.hash) {\n ctx[hashName] = options.hash[hashName];\n }\n return p.compiled(ctx, options.data, options.root);\n },\n escape: function escape$1(context, options) {\n if (typeof context !== 'string') {\n throw new Error('Template7: Passed context to \"escape\" helper should be a string');\n }\n return escape(context);\n },\n if: function if$1(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n if (ctx) {\n return options.fn(this, options.data);\n }\n\n return options.inverse(this, options.data);\n },\n unless: function unless(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n if (!ctx) {\n return options.fn(this, options.data);\n }\n\n return options.inverse(this, options.data);\n },\n each: function each(context, options) {\n var ctx = context;\n var ret = '';\n var i = 0;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n if (isArray(ctx)) {\n if (options.hash.reverse) {\n ctx = ctx.reverse();\n }\n for (i = 0; i < ctx.length; i += 1) {\n ret += options.fn(ctx[i], { first: i === 0, last: i === ctx.length - 1, index: i });\n }\n if (options.hash.reverse) {\n ctx = ctx.reverse();\n }\n } else {\n for (var key in ctx) {\n i += 1;\n ret += options.fn(ctx[key], { key: key });\n }\n }\n if (i > 0) { return ret; }\n return options.inverse(this);\n },\n with: function with$1(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = context.call(this); }\n return options.fn(ctx);\n },\n join: function join(context, options) {\n var ctx = context;\n if (isFunction(ctx)) { ctx = ctx.call(this); }\n return ctx.join(options.hash.delimiter || options.hash.delimeter);\n },\n js: function js(expression, options) {\n var func;\n if (expression.indexOf('return') >= 0) {\n func = \"(function(){\" + expression + \"})\";\n } else {\n func = \"(function(){return (\" + expression + \")})\";\n }\n return eval.call(this, func).call(this);\n },\n js_compare: function js_compare(expression, options) {\n var func;\n if (expression.indexOf('return') >= 0) {\n func = \"(function(){\" + expression + \"})\";\n } else {\n func = \"(function(){return (\" + expression + \")})\";\n }\n var condition = eval.call(this, func).call(this);\n if (condition) {\n return options.fn(this, options.data);\n }\n\n return options.inverse(this, options.data);\n },\n },\n};\nfunction t7(template, data) {\n if (arguments.length === 2) {\n var instance = new Template7(template);\n var rendered = instance.compile()(data);\n instance = null;\n return (rendered);\n }\n return new Template7(template);\n}\nt7.registerHelper = function registerHelper(name, fn) {\n Template7.prototype.helpers[name] = fn;\n};\nt7.unregisterHelper = function unregisterHelper(name) {\n Template7.prototype.helpers[name] = undefined;\n delete Template7.prototype.helpers[name];\n};\nt7.registerPartial = function registerPartial(name, template) {\n Template7.prototype.partials[name] = { template: template };\n};\nt7.unregisterPartial = function unregisterPartial(name) {\n if (Template7.prototype.partials[name]) {\n Template7.prototype.partials[name] = undefined;\n delete Template7.prototype.partials[name];\n }\n};\nt7.compile = function compile(template, options) {\n var instance = new Template7(template, options);\n return instance.compile();\n};\n\nt7.options = Template7.prototype.options;\nt7.helpers = Template7.prototype.helpers;\nt7.partials = Template7.prototype.partials;\n\nreturn t7;\n\n})));\n\n//# sourceMappingURL=template7.js.map\n\n(function () {\n\n 'use strict';\n /*===========================\n Framework 7\n ===========================*/\n window.Framework7 = function (params) {\n // App\n var app = this;\n \n // Version\n app.version = '1.6.0';\n \n // Default Parameters\n app.params = {\n //\n root: 'body',\n //\n cache: true,\n cacheIgnore: [],\n cacheIgnoreGetParameters: false,\n cacheDuration: 1000 * 60 * 10, // Ten minutes\n preloadPreviousPage: true,\n uniqueHistory: false,\n uniqueHistoryIgnoreGetParameters: false,\n dynamicPageUrl: 'content-{{index}}',\n allowDuplicateUrls: false,\n router: true,\n routerRemoveTimeout: false,\n routerRemoveWithTimeout: false,\n // Push State\n pushState: false,\n pushStateRoot: undefined,\n pushStateNoAnimation: false,\n pushStateSeparator: '#!/',\n pushStateOnLoad: true,\n // Fast clicks\n fastClicks: true,\n fastClicksDistanceThreshold: 10,\n fastClicksDelayBetweenClicks: 50,\n fastClicksExclude: '', // CSS selector\n // Tap Hold\n tapHold: false,\n tapHoldDelay: 750,\n tapHoldPreventClicks: true,\n // Active State\n activeState: true,\n activeStateElements: 'a, button, label, span',\n // Animate Nav Back Icon\n animateNavBackIcon: false,\n // Swipe Back\n swipeBackPage: true,\n swipeBackPageThreshold: 0,\n swipeBackPageActiveArea: 30,\n swipeBackPageAnimateShadow: true,\n swipeBackPageAnimateOpacity: true,\n // Ajax\n ajaxLinks: undefined, // or CSS selector\n // External Links\n externalLinks: '.external', // CSS selector\n // Sortable\n sortable: true,\n // Scroll toolbars\n hideNavbarOnPageScroll: false,\n hideToolbarOnPageScroll: false,\n hideTabbarOnPageScroll: false,\n showBarsOnPageScrollEnd: true,\n showBarsOnPageScrollTop: true,\n // Swipeout\n swipeout: true,\n swipeoutActionsNoFold: false,\n swipeoutNoFollow: false,\n swipeoutRemoveWithTimeout: false,\n // Smart Select Back link template\n smartSelectOpenIn: 'page', // or 'popup' or 'picker'\n smartSelectBackText: 'Back',\n smartSelectPopupCloseText: 'Close',\n smartSelectPickerCloseText: 'Done',\n smartSelectSearchbar: false,\n smartSelectBackOnSelect: false,\n // Tap Navbar or Statusbar to scroll to top\n scrollTopOnNavbarClick: false,\n scrollTopOnStatusbarClick: false,\n // Panels\n panelLeftBreakpoint: null,\n panelRightBreakpoint: null,\n swipePanel: false, // or 'left' or 'right'\n swipePanelActiveArea: 0,\n swipePanelCloseOpposite: true,\n swipePanelOnlyClose: false,\n swipePanelNoFollow: false,\n swipePanelThreshold: 0,\n panelsCloseByOutside: true,\n // Modals\n modalButtonOk: 'OK',\n modalButtonCancel: 'Cancel',\n modalUsernamePlaceholder: 'Username',\n modalPasswordPlaceholder: 'Password',\n modalTitle: 'Framework7',\n modalCloseByOutside: false,\n actionsCloseByOutside: true,\n popupCloseByOutside: true,\n popoverCloseByOutside: true,\n modalPreloaderTitle: 'Loading... ',\n modalStack: true,\n modalsMoveToRoot: true,\n // Lazy Load\n imagesLazyLoadThreshold: 0,\n imagesLazyLoadSequential: true,\n // Name space\n viewClass: 'view',\n viewMainClass: 'view-main',\n viewsClass: 'views',\n // Notifications defaults\n notificationCloseOnClick: false,\n notificationCloseIcon: true,\n notificationCloseButtonText: 'Close',\n // Animate Pages\n animatePages: true,\n // Template7\n templates: {},\n template7Data: {},\n template7Pages: false,\n precompileTemplates: false,\n // Material\n material: false,\n materialPageLoadDelay: 0,\n materialPreloaderSvg: '',\n materialPreloaderHtml:\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '',\n materialRipple: true,\n materialRippleElements: '.ripple, a.link, a.item-link, .button, .modal-button, .tab-link, .label-radio, .label-checkbox, .actions-modal-button, a.searchbar-clear, a.floating-button, .floating-button > a, .speed-dial-buttons a, .form-checkbox, .form-radio, .data-table .sortable-cell',\n // Auto init\n init: true,\n };\n \n // Extend defaults with parameters\n for (var param in params) {\n app.params[param] = params[param];\n }\n \n // DOM lib\n var $ = Dom7;\n \n // Template7 lib\n var t7 = Template7;\n app._compiledTemplates = {};\n \n // App Root\n app.root = $(app.params.root);\n app.root.eq(0).addClass('framework7-root');\n \n // Touch events\n app.touchEvents = {\n start: app.support.touch ? 'touchstart' : 'mousedown',\n move: app.support.touch ? 'touchmove' : 'mousemove',\n end: app.support.touch ? 'touchend' : 'mouseup'\n };\n \n // Link to local storage\n app.ls = window.localStorage;\n \n // RTL\n app.rtl = $('body').css('direction') === 'rtl';\n if (app.rtl) $('html').attr('dir', 'rtl');\n \n // Overwrite statusbar overlay\n if (typeof app.params.statusbarOverlay !== 'undefined') {\n if (app.params.statusbarOverlay) $('html').addClass('with-statusbar-overlay');\n else $('html').removeClass('with-statusbar-overlay');\n }\n else if (app.device.ios && (window.cordova || window.phonegap)) {\n $(document).on('resume', function () {\n if (app.device.needsStatusBar()) {\n $('html').addClass('with-statusbar-overlay');\n }\n }, false);\n }\n \n\n /*======================================================\n ************ Views ************\n ======================================================*/\n app.views = [];\n var View = function (selector, params) {\n var defaults = {\n dynamicNavbar: false,\n domCache: false,\n linksView: undefined,\n reloadPages: false,\n uniqueHistory: app.params.uniqueHistory,\n uniqueHistoryIgnoreGetParameters: app.params.uniqueHistoryIgnoreGetParameters,\n allowDuplicateUrls: app.params.allowDuplicateUrls,\n swipeBackPage: app.params.swipeBackPage,\n swipeBackPageAnimateShadow: app.params.swipeBackPageAnimateShadow,\n swipeBackPageAnimateOpacity: app.params.swipeBackPageAnimateOpacity,\n swipeBackPageActiveArea: app.params.swipeBackPageActiveArea,\n swipeBackPageThreshold: app.params.swipeBackPageThreshold,\n animatePages: app.params.animatePages,\n preloadPreviousPage: app.params.preloadPreviousPage\n };\n var i;\n \n // Params\n params = params || {};\n \n // Disable dynamic navbar for material theme\n if (params.dynamicNavbar && app.params.material) params.dynamicNavbar = false;\n \n // Extend params with defaults\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n // View\n var view = this;\n view.params = params;\n \n // Selector\n view.selector = selector;\n \n // Container\n var container = $(selector);\n view.container = container[0];\n \n // Fix Selector\n \n if (typeof selector !== 'string') {\n // Supposed to be HTMLElement or Dom7\n selector = (container.attr('id') ? '#' + container.attr('id') : '') + (container.attr('class') ? '.' + container.attr('class').replace(/ /g, '.').replace('.active', '') : '');\n view.selector = selector;\n }\n \n // Is main\n view.main = container.hasClass(app.params.viewMainClass);\n \n // Content cache\n view.contentCache = {};\n \n // Context cache\n view.contextCache = {};\n \n // Pages cache\n view.pagesCache = {};\n view.pageElementsCache = {};\n \n // Store View in element for easy access\n container[0].f7View = view;\n \n // Pages\n view.pagesContainer = container.find('.pages')[0];\n view.initialPages = [];\n view.initialPagesUrl = [];\n view.initialNavbars = [];\n if (view.params.domCache) {\n var initialPages = container.find('.page');\n for (i = 0; i < initialPages.length; i++) {\n view.initialPages.push(initialPages[i]);\n view.initialPagesUrl.push('#' + initialPages.eq(i).attr('data-page'));\n }\n if (view.params.dynamicNavbar) {\n var initialNavbars = container.find('.navbar-inner');\n for (i = 0; i < initialNavbars.length; i++) {\n view.initialNavbars.push(initialNavbars[i]);\n }\n }\n \n }\n \n view.allowPageChange = true;\n \n // Location\n var docLocation = document.location.href;\n \n // History\n view.history = [];\n var viewURL = docLocation;\n var pushStateSeparator = app.params.pushStateSeparator;\n var pushStateRoot = app.params.pushStateRoot;\n if (app.params.pushState && view.main) {\n if (pushStateRoot) {\n viewURL = pushStateRoot;\n }\n else {\n if (pushStateSeparator && viewURL.indexOf(pushStateSeparator) >= 0 && viewURL.indexOf(pushStateSeparator + '#') < 0) viewURL = viewURL.split(pushStateSeparator)[0];\n }\n \n }\n \n // Active Page\n var currentPage, currentPageData;\n if (!view.activePage) {\n currentPage = $(view.pagesContainer).find('.page-on-center');\n if (currentPage.length === 0) {\n currentPage = $(view.pagesContainer).find('.page:not(.cached)');\n currentPage = currentPage.eq(currentPage.length - 1);\n }\n if (currentPage.length > 0) {\n currentPageData = currentPage[0].f7PageData;\n }\n }\n \n // View startup URL\n if (view.params.domCache && currentPage) {\n view.url = container.attr('data-url') || view.params.url || '#' + currentPage.attr('data-page');\n view.pagesCache[view.url] = currentPage.attr('data-page');\n }\n else view.url = container.attr('data-url') || view.params.url || viewURL;\n \n // Update current page Data\n if (currentPageData) {\n currentPageData.view = view;\n currentPageData.url = view.url;\n if (view.params.domCache && view.params.dynamicNavbar && !currentPageData.navbarInnerContainer) {\n currentPageData.navbarInnerContainer = view.initialNavbars[view.initialPages.indexOf(currentPageData.container)];\n }\n view.activePage = currentPageData;\n currentPage[0].f7PageData = currentPageData;\n }\n \n // Store to history main view's url\n if (view.url) {\n view.history.push(view.url);\n }\n \n // Touch events\n var isTouched = false,\n isMoved = false,\n touchesStart = {},\n isScrolling,\n activePage = [],\n previousPage = [],\n viewContainerWidth,\n touchesDiff,\n allowViewTouchMove = true,\n touchStartTime,\n activeNavbar = [],\n previousNavbar = [],\n activeNavElements,\n previousNavElements,\n activeNavBackIcon,\n previousNavBackIcon,\n dynamicNavbar,\n pageShadow,\n pageOpacity,\n el;\n \n view.handleTouchStart = function (e) {\n if (!allowViewTouchMove || !view.params.swipeBackPage || isTouched || app.swipeoutOpenedEl || !view.allowPageChange) return;\n isMoved = false;\n isTouched = true;\n isScrolling = undefined;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n dynamicNavbar = view.params.dynamicNavbar && container.find('.navbar-inner').length > 1;\n };\n \n view.handleTouchMove = function (e) {\n if (!isTouched) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (isScrolling || e.f7PreventSwipeBack || app.preventSwipeBack) {\n isTouched = false;\n return;\n }\n if (!isMoved) {\n var cancel = false;\n // Calc values during first move fired\n viewContainerWidth = container.width();\n var target = $(e.target);\n var swipeout = target.hasClass('swipeout') ? target : target.parents('.swipeout');\n if (swipeout.length > 0) {\n if (!app.rtl && swipeout.find('.swipeout-actions-left').length > 0) cancel = true;\n if (app.rtl && swipeout.find('.swipeout-actions-right').length > 0) cancel = true;\n }\n activePage = target.is('.page') ? target : target.parents('.page');\n if (activePage.hasClass('no-swipeback')) cancel = true;\n previousPage = container.find('.page-on-left:not(.cached)');\n var notFromBorder = touchesStart.x - container.offset().left > view.params.swipeBackPageActiveArea;\n if (app.rtl) {\n notFromBorder = touchesStart.x < container.offset().left - container[0].scrollLeft + viewContainerWidth - view.params.swipeBackPageActiveArea;\n }\n else {\n notFromBorder = touchesStart.x - container.offset().left > view.params.swipeBackPageActiveArea;\n }\n if (notFromBorder) cancel = true;\n if (previousPage.length === 0 || activePage.length === 0) cancel = true;\n if (cancel) {\n isTouched = false;\n return;\n }\n \n if (view.params.swipeBackPageAnimateShadow && !app.device.android) {\n pageShadow = activePage.find('.swipeback-page-shadow');\n if (pageShadow.length === 0) {\n pageShadow = $('
                                  ');\n activePage.append(pageShadow);\n }\n }\n if (view.params.swipeBackPageAnimateOpacity) {\n pageOpacity = previousPage.find('.swipeback-page-opacity');\n if (pageOpacity.length === 0) {\n pageOpacity = $('
                                  ');\n previousPage.append(pageOpacity);\n }\n }\n \n if (dynamicNavbar) {\n activeNavbar = container.find('.navbar-on-center:not(.cached)');\n previousNavbar = container.find('.navbar-on-left:not(.cached)');\n activeNavElements = activeNavbar.find('.left, .center, .right, .subnavbar, .fading');\n previousNavElements = previousNavbar.find('.left, .center, .right, .subnavbar, .fading');\n if (app.params.animateNavBackIcon) {\n activeNavBackIcon = activeNavbar.find('.left.sliding .back .icon');\n previousNavBackIcon = previousNavbar.find('.left.sliding .back .icon');\n }\n }\n \n // Close/Hide Any Picker\n if ($('.picker-modal.modal-in').length > 0) {\n app.closeModal($('.picker-modal.modal-in'));\n }\n }\n e.f7PreventPanelSwipe = true;\n isMoved = true;\n e.preventDefault();\n \n // RTL inverter\n var inverter = app.rtl ? -1 : 1;\n \n // Touches diff\n touchesDiff = (pageX - touchesStart.x - view.params.swipeBackPageThreshold) * inverter;\n if (touchesDiff < 0) touchesDiff = 0;\n var percentage = touchesDiff / viewContainerWidth;\n \n // Swipe Back Callback\n var callbackData = {\n percentage: percentage,\n activePage: activePage[0],\n previousPage: previousPage[0],\n activeNavbar: activeNavbar[0],\n previousNavbar: previousNavbar[0]\n };\n if (view.params.onSwipeBackMove) {\n view.params.onSwipeBackMove(callbackData);\n }\n container.trigger('swipeBackMove swipeback:move', callbackData);\n \n // Transform pages\n var activePageTranslate = touchesDiff * inverter;\n var previousPageTranslate = (touchesDiff / 5 - viewContainerWidth / 5) * inverter;\n if (app.device.pixelRatio === 1) {\n activePageTranslate = Math.round(activePageTranslate);\n previousPageTranslate = Math.round(previousPageTranslate);\n }\n \n activePage.transform('translate3d(' + activePageTranslate + 'px,0,0)');\n if (view.params.swipeBackPageAnimateShadow && !app.device.android) pageShadow[0].style.opacity = 1 - 1 * percentage;\n \n previousPage.transform('translate3d(' + previousPageTranslate + 'px,0,0)');\n if (view.params.swipeBackPageAnimateOpacity) pageOpacity[0].style.opacity = 1 - 1 * percentage;\n \n // Dynamic Navbars Animation\n if (dynamicNavbar) {\n var i;\n for (i = 0; i < activeNavElements.length; i++) {\n el = $(activeNavElements[i]);\n if (!el.is('.subnavbar.sliding')) el[0].style.opacity = (1 - percentage * 1.3);\n if (el[0].className.indexOf('sliding') >= 0) {\n var activeNavTranslate = percentage * el[0].f7NavbarRightOffset;\n if (app.device.pixelRatio === 1) activeNavTranslate = Math.round(activeNavTranslate);\n el.transform('translate3d(' + activeNavTranslate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (el[0].className.indexOf('left') >= 0 && activeNavBackIcon.length > 0) {\n activeNavBackIcon.transform('translate3d(' + -activeNavTranslate + 'px,0,0)');\n }\n }\n }\n }\n for (i = 0; i < previousNavElements.length; i++) {\n el = $(previousNavElements[i]);\n if (!el.is('.subnavbar.sliding')) el[0].style.opacity = percentage * 1.3 - 0.3;\n if (el[0].className.indexOf('sliding') >= 0) {\n var previousNavTranslate = el[0].f7NavbarLeftOffset * (1 - percentage);\n if (app.device.pixelRatio === 1) previousNavTranslate = Math.round(previousNavTranslate);\n el.transform('translate3d(' + previousNavTranslate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (el[0].className.indexOf('left') >= 0 && previousNavBackIcon.length > 0) {\n previousNavBackIcon.transform('translate3d(' + -previousNavTranslate + 'px,0,0)');\n }\n }\n }\n }\n }\n };\n \n view.handleTouchEnd = function (e) {\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n isTouched = false;\n isMoved = false;\n if (touchesDiff === 0) {\n $([activePage[0], previousPage[0]]).transform('');\n if (dynamicNavbar) {\n activeNavElements.transform('').css({opacity: ''});\n previousNavElements.transform('').css({opacity: ''});\n if (activeNavBackIcon && activeNavBackIcon.length > 0) activeNavBackIcon.transform('');\n if (previousNavBackIcon && activeNavBackIcon.length > 0) previousNavBackIcon.transform('');\n }\n return;\n }\n var timeDiff = (new Date()).getTime() - touchStartTime;\n var pageChanged = false;\n // Swipe back to previous page\n if (\n timeDiff < 300 && touchesDiff > 10 ||\n timeDiff >= 300 && touchesDiff > viewContainerWidth / 2\n ) {\n activePage.removeClass('page-on-center').addClass('page-on-right');\n previousPage.removeClass('page-on-left').addClass('page-on-center');\n if (dynamicNavbar) {\n activeNavbar.removeClass('navbar-on-center').addClass('navbar-on-right');\n previousNavbar.removeClass('navbar-on-left').addClass('navbar-on-center');\n }\n pageChanged = true;\n }\n // Reset custom styles\n // Add transitioning class for transition-duration\n $([activePage[0], previousPage[0]]).transform('').addClass('page-transitioning');\n if (dynamicNavbar) {\n activeNavElements.css({opacity: ''})\n .each(function () {\n var translate = pageChanged ? this.f7NavbarRightOffset : 0;\n var sliding = $(this);\n sliding.transform('translate3d(' + translate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && activeNavBackIcon.length > 0) {\n activeNavBackIcon.addClass('page-transitioning').transform('translate3d(' + -translate + 'px,0,0)');\n }\n }\n \n }).addClass('page-transitioning');\n \n previousNavElements.transform('').css({opacity: ''}).each(function () {\n var translate = pageChanged ? 0 : this.f7NavbarLeftOffset;\n var sliding = $(this);\n sliding.transform('translate3d(' + translate + 'px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && previousNavBackIcon.length > 0) {\n previousNavBackIcon.addClass('page-transitioning').transform('translate3d(' + -translate + 'px,0,0)');\n }\n }\n }).addClass('page-transitioning');\n }\n allowViewTouchMove = false;\n view.allowPageChange = false;\n // Swipe Back Callback\n var callbackData = {\n activePage: activePage[0],\n previousPage: previousPage[0],\n activeNavbar: activeNavbar[0],\n previousNavbar: previousNavbar[0]\n };\n if (pageChanged) {\n // Update View's URL\n var url = view.history[view.history.length - 2];\n view.url = url;\n \n // Page before animation callback\n app.pageBackCallback('before', view, {pageContainer: activePage[0], url: url, position: 'center', newPage: previousPage, oldPage: activePage, swipeBack: true});\n app.pageAnimCallback('before', view, {pageContainer: previousPage[0], url: url, position: 'left', newPage: previousPage, oldPage: activePage, swipeBack: true});\n \n if (view.params.onSwipeBackBeforeChange) {\n view.params.onSwipeBackBeforeChange(callbackData);\n }\n container.trigger('swipeBackBeforeChange swipeback:beforechange', callbackData);\n }\n else {\n if (view.params.onSwipeBackBeforeReset) {\n view.params.onSwipeBackBeforeReset(callbackData);\n }\n container.trigger('swipeBackBeforeReset swipeback:beforereset', callbackData);\n }\n \n activePage.transitionEnd(function () {\n $([activePage[0], previousPage[0]]).removeClass('page-transitioning');\n if (dynamicNavbar) {\n activeNavElements.removeClass('page-transitioning').css({opacity: ''});\n previousNavElements.removeClass('page-transitioning').css({opacity: ''});\n if (activeNavBackIcon && activeNavBackIcon.length > 0) activeNavBackIcon.removeClass('page-transitioning');\n if (previousNavBackIcon && previousNavBackIcon.length > 0) previousNavBackIcon.removeClass('page-transitioning');\n }\n allowViewTouchMove = true;\n view.allowPageChange = true;\n if (pageChanged) {\n if (app.params.pushState && view.main) history.back();\n // Page after animation callback\n app.pageBackCallback('after', view, {pageContainer: activePage[0], url: url, position: 'center', newPage: previousPage, oldPage: activePage, swipeBack: true});\n app.pageAnimCallback('after', view, {pageContainer: previousPage[0], url: url, position: 'left', newPage: previousPage, oldPage: activePage, swipeBack: true});\n app.router.afterBack(view, activePage, previousPage);\n \n if (view.params.onSwipeBackAfterChange) {\n view.params.onSwipeBackAfterChange(callbackData);\n }\n container.trigger('swipeBackAfterChange swipeback:afterchange', callbackData);\n }\n else {\n if (view.params.onSwipeBackAfterReset) {\n view.params.onSwipeBackAfterReset(callbackData);\n }\n container.trigger('swipeBackAfterReset swipeback:afterreset', callbackData);\n }\n if (pageShadow && pageShadow.length > 0) pageShadow.remove();\n if (pageOpacity && pageOpacity.length > 0) pageOpacity.remove();\n });\n };\n view.attachEvents = function (detach) {\n var action = detach ? 'off' : 'on';\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n container[action](app.touchEvents.start, view.handleTouchStart, passiveListener);\n container[action](app.touchEvents.move, view.handleTouchMove, activeListener);\n container[action](app.touchEvents.end, view.handleTouchEnd, passiveListener);\n };\n view.detachEvents = function () {\n view.attachEvents(true);\n };\n \n // Init\n if (view.params.swipeBackPage && !app.params.material) {\n view.attachEvents();\n }\n \n // Check view name to delete unwanted characters\n if (view.params.name) view.params.name = view.params.name.replace(/[^a-zA-Z]/g, '');\n \n // Add view to app\n app.views.push(view);\n if (view.main) {\n app.mainView = view;\n app.views.main = view;\n }\n else if(view.params.name) {\n app[view.params.name + 'View'] = view;\n app.views[view.params.name] = view;\n }\n \n // Router\n view.router = {\n load: function (options) {\n return app.router.load(view, options);\n },\n back: function (options) {\n return app.router.back(view, options);\n },\n // Shortcuts\n loadPage: function (options) {\n options = options || {};\n if (typeof options === 'string') {\n var url = options;\n options = {};\n if (url && url.indexOf('#') === 0 && view.params.domCache) {\n options.pageName = url.split('#')[1];\n }\n else options.url = url;\n }\n return app.router.load(view, options);\n },\n loadContent: function (content) {\n return app.router.load(view, {content: content});\n },\n reloadPage: function (url) {\n return app.router.load(view, {url: url, reload: true});\n },\n reloadContent: function (content) {\n return app.router.load(view, {content: content, reload: true});\n },\n reloadPreviousPage: function (url) {\n return app.router.load(view, {url: url, reloadPrevious: true, reload: true});\n },\n reloadPreviousContent: function (content) {\n return app.router.load(view, {content: content, reloadPrevious: true, reload: true});\n },\n refreshPage: function () {\n var options = {\n url: view.url,\n reload: true,\n ignoreCache: true\n };\n if (options.url && options.url.indexOf('#') === 0) {\n if (view.params.domCache && view.pagesCache[options.url]) {\n options.pageName = view.pagesCache[options.url];\n options.url = undefined;\n delete options.url;\n }\n else if (view.contentCache[options.url]) {\n options.content = view.contentCache[options.url];\n options.url = undefined;\n delete options.url;\n }\n }\n return app.router.load(view, options);\n },\n refreshPreviousPage: function () {\n var options = {\n url: view.history[view.history.length - 2],\n reload: true,\n reloadPrevious: true,\n ignoreCache: true\n };\n if (options.url && options.url.indexOf('#') === 0 && view.params.domCache && view.pagesCache[options.url]) {\n options.pageName = view.pagesCache[options.url];\n options.url = undefined;\n delete options.url;\n }\n return app.router.load(view, options);\n }\n };\n \n // Aliases for temporary backward compatibility\n view.loadPage = view.router.loadPage;\n view.loadContent = view.router.loadContent;\n view.reloadPage = view.router.reloadPage;\n view.reloadContent = view.router.reloadContent;\n view.reloadPreviousPage = view.router.reloadPreviousPage;\n view.reloadPreviousContent = view.router.reloadPreviousContent;\n view.refreshPage = view.router.refreshPage;\n view.refreshPreviousPage = view.router.refreshPreviousPage;\n view.back = view.router.back;\n \n // Bars methods\n view.hideNavbar = function (animated) {\n return app.hideNavbar(container.find('.navbar'), animated);\n };\n view.showNavbar = function (animated) {\n return app.showNavbar(container.find('.navbar'), animated);\n };\n view.hideToolbar = function (animated) {\n return app.hideToolbar(container.find('.toolbar'), animated);\n };\n view.showToolbar = function (animated) {\n return app.showToolbar(container.find('.toolbar'), animated);\n };\n \n // Push State on load\n if (app.params.pushState && app.params.pushStateOnLoad && view.main) {\n var pushStateUrl;\n var pushStateUrlSplit = docLocation.split(pushStateSeparator)[1];\n if (pushStateRoot) {\n pushStateUrl = docLocation.split(app.params.pushStateRoot + pushStateSeparator)[1];\n }\n else if (pushStateSeparator && docLocation.indexOf(pushStateSeparator) >= 0 && docLocation.indexOf(pushStateSeparator + '#') < 0) {\n pushStateUrl = pushStateUrlSplit;\n }\n var pushStateAnimatePages = app.params.pushStateNoAnimation ? false : undefined;\n var historyState = history.state;\n if (pushStateUrl) {\n if (pushStateUrl.indexOf('#') >= 0 && view.params.domCache && historyState && historyState.pageName && 'viewIndex' in historyState) {\n app.router.load(view, {pageName: historyState.pageName, url: historyState.url, animatePages: pushStateAnimatePages, pushState: false});\n }\n else if (pushStateUrl.indexOf('#') >= 0 && view.params.domCache && view.initialPagesUrl.indexOf(pushStateUrl) >= 0) {\n app.router.load(view, {pageName: pushStateUrl.replace('#',''), animatePages: pushStateAnimatePages, pushState: false});\n }\n else app.router.load(view, {url: pushStateUrl, animatePages: pushStateAnimatePages, pushState: false});\n }\n else if (view.params.domCache && docLocation.indexOf(pushStateSeparator + '#') >= 0) {\n if (historyState && historyState.pageName && 'viewIndex' in historyState) {\n app.router.load(view, {pageName: historyState.pageName, url: historyState.url, animatePages: pushStateAnimatePages, pushState: false});\n }\n else if (pushStateSeparator && pushStateUrlSplit.indexOf('#') === 0) {\n if (view.initialPagesUrl.indexOf(pushStateUrlSplit)) {\n app.router.load(view, {pageName: pushStateUrlSplit.replace('#', ''), animatePages: pushStateAnimatePages, pushState: false});\n }\n }\n }\n }\n \n // Destroy\n view.destroy = function () {\n view.detachEvents();\n if (view.main) {\n app.mainView = null;\n delete app.mainView;\n app.views.main = null;\n delete app.views.main;\n }\n else if(view.params.name) {\n app[view.params.name + 'View'] = null;\n delete app[view.params.name + 'View'];\n app.views[view.params.name] = null;\n delete app.views[view.params.name];\n }\n container.removeAttr('data-page');\n container[0].f7View = null;\n delete container[0].f7View;\n \n app.views.splice(app.views.indexOf(view), 1);\n \n // Delete props & methods\n for (var prop in view) {\n if (view.hasOwnProperty(prop)) {\n view[prop] = null;\n delete view[prop];\n }\n }\n view = null;\n };\n \n // Plugin hook\n app.pluginHook('addView', view);\n \n // Return view\n return view;\n };\n \n app.addView = function (selector, params) {\n return new View(selector, params);\n };\n \n app.getCurrentView = function (index) {\n var popoverView = $('.popover.modal-in .view');\n var popupView = $('.popup.modal-in .view');\n var panelView = $('.panel.active .view');\n var appViews = $('.views');\n // Find active view as tab\n var appView = appViews.children('.view');\n // Propably in tabs or split view\n if (appView.length > 1) {\n if (appView.hasClass('tab')) {\n // Tabs\n appView = appViews.children('.view.active');\n }\n else {\n // Split View, leave appView intact\n }\n }\n if (popoverView.length > 0 && popoverView[0].f7View) return popoverView[0].f7View;\n if (popupView.length > 0 && popupView[0].f7View) return popupView[0].f7View;\n if (panelView.length > 0 && panelView[0].f7View) return panelView[0].f7View;\n if (appView.length > 0) {\n if (appView.length === 1 && appView[0].f7View) return appView[0].f7View;\n if (appView.length > 1) {\n var currentViews = [];\n for (var i = 0; i < appView.length; i++) {\n if (appView[i].f7View) currentViews.push(appView[i].f7View);\n }\n if (currentViews.length > 0 && typeof index !== 'undefined') return currentViews[index];\n if (currentViews.length > 1) return currentViews;\n if (currentViews.length === 1) return currentViews[0];\n return undefined;\n }\n }\n return undefined;\n };\n \n\n /*======================================================\n ************ Navbars && Toolbars ************\n ======================================================*/\n // On Navbar Init Callback\n app.navbarInitCallback = function (view, pageContainer, navbarContainer, navbarInnerContainer) {\n if (!navbarContainer && navbarInnerContainer) navbarContainer = $(navbarInnerContainer).parent('.navbar')[0];\n if (!navbarInnerContainer || navbarInnerContainer.f7NavbarInitialized && view && !view.params.domCache) return;\n var navbarData = {\n container: navbarContainer,\n innerContainer: navbarInnerContainer\n };\n var pageData = pageContainer && pageContainer.f7PageData;\n \n var eventData = {\n page: pageData,\n navbar: navbarData\n };\n \n if (navbarInnerContainer.f7NavbarInitialized && ((view && view.params.domCache) || (!view && $(navbarContainer).parents('.popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal').length > 0))) {\n // Reinit Navbar\n app.reinitNavbar(navbarContainer, navbarInnerContainer);\n \n // Plugin hook\n app.pluginHook('navbarReinit', eventData);\n \n // Event\n $(navbarInnerContainer).trigger('navbarReinit navbar:reinit', eventData);\n return;\n }\n navbarInnerContainer.f7NavbarInitialized = true;\n // Before Init\n app.pluginHook('navbarBeforeInit', navbarData, pageData);\n $(navbarInnerContainer).trigger('navbarBeforeInit navbar:beforeinit', eventData);\n \n // Initialize Navbar\n app.initNavbar(navbarContainer, navbarInnerContainer);\n \n // On init\n app.pluginHook('navbarInit', navbarData, pageData);\n $(navbarInnerContainer).trigger('navbarInit navbar:init', eventData);\n };\n // Navbar Remove Callback\n app.navbarRemoveCallback = function (view, pageContainer, navbarContainer, navbarInnerContainer) {\n if (!navbarContainer && navbarInnerContainer) navbarContainer = $(navbarInnerContainer).parent('.navbar')[0];\n var navbarData = {\n container: navbarContainer,\n innerContainer: navbarInnerContainer\n };\n var pageData;\n if (pageContainer) {\n pageData = pageContainer.f7PageData;\n }\n \n var eventData = {\n page: pageData,\n navbar: navbarData\n };\n app.pluginHook('navbarBeforeRemove', navbarData, pageData);\n $(navbarInnerContainer).trigger('navbarBeforeRemove navbar:beforeremove', eventData);\n navbarData = null;\n pageData = null;\n };\n app.initNavbar = function (navbarContainer, navbarInnerContainer) {\n // Init Subnavbar Searchbar\n if (app.initSearchbar) app.initSearchbar(navbarInnerContainer);\n };\n app.reinitNavbar = function (navbarContainer, navbarInnerContainer) {\n // Re init navbar methods\n };\n app.initNavbarWithCallback = function (navbarContainer) {\n navbarContainer = $(navbarContainer);\n var viewContainer = navbarContainer.parents('.' + app.params.viewClass);\n var view;\n if (viewContainer.length === 0) return;\n if (navbarContainer.parents('.navbar-through').length === 0 && viewContainer.find('.navbar-through').length === 0) return;\n view = viewContainer[0].f7View || undefined;\n \n navbarContainer.find('.navbar-inner').each(function () {\n var navbarInnerContainer = this;\n var pageContainer;\n if ($(navbarInnerContainer).attr('data-page')) {\n // For dom cache\n pageContainer = viewContainer.find('.page[data-page=\"' + $(navbarInnerContainer).attr('data-page') + '\"]')[0];\n }\n if (!pageContainer) {\n var pages = viewContainer.find('.page');\n if (pages.length === 1) {\n pageContainer = pages[0];\n }\n else {\n viewContainer.find('.page').each(function () {\n if (this.f7PageData && this.f7PageData.navbarInnerContainer === navbarInnerContainer) {\n pageContainer = this;\n }\n });\n }\n }\n app.navbarInitCallback(view, pageContainer, navbarContainer[0], navbarInnerContainer);\n });\n };\n \n // Size Navbars\n app.sizeNavbars = function (viewContainer) {\n if (app.params.material) return;\n var navbarInner = viewContainer ? $(viewContainer).find('.navbar .navbar-inner:not(.cached)') : $('.navbar .navbar-inner:not(.cached)');\n navbarInner.each(function () {\n var n = $(this);\n if (n.hasClass('cached')) return;\n var left = app.rtl ? n.find('.right') : n.find('.left'),\n right = app.rtl ? n.find('.left') : n.find('.right'),\n center = n.find('.center'),\n subnavbar = n.find('.subnavbar'),\n noLeft = left.length === 0,\n noRight = right.length === 0,\n leftWidth = noLeft ? 0 : left.outerWidth(true),\n rightWidth = noRight ? 0 : right.outerWidth(true),\n centerWidth = center.outerWidth(true),\n navbarStyles = n.styles(),\n navbarWidth = n[0].offsetWidth - parseInt(navbarStyles.paddingLeft, 10) - parseInt(navbarStyles.paddingRight, 10),\n onLeft = n.hasClass('navbar-on-left'),\n currLeft, diff;\n \n if (noRight) {\n currLeft = navbarWidth - centerWidth;\n }\n if (noLeft) {\n currLeft = 0;\n }\n if (!noLeft && !noRight) {\n currLeft = (navbarWidth - rightWidth - centerWidth + leftWidth) / 2;\n }\n var requiredLeft = (navbarWidth - centerWidth) / 2;\n if (navbarWidth - leftWidth - rightWidth > centerWidth) {\n if (requiredLeft < leftWidth) {\n requiredLeft = leftWidth;\n }\n if (requiredLeft + centerWidth > navbarWidth - rightWidth) {\n requiredLeft = navbarWidth - rightWidth - centerWidth;\n }\n diff = requiredLeft - currLeft;\n }\n else {\n diff = 0;\n }\n // RTL inverter\n var inverter = app.rtl ? -1 : 1;\n \n if (center.hasClass('sliding')) {\n center[0].f7NavbarLeftOffset = -(currLeft + diff) * inverter;\n center[0].f7NavbarRightOffset = (navbarWidth - currLeft - diff - centerWidth) * inverter;\n if (onLeft) {\n if (app.params.animateNavBackIcon) {\n var activeNavbarBackLink = n.parent().find('.navbar-on-center').find('.left.sliding .back .icon ~ span');\n if (activeNavbarBackLink.length > 0) {\n center[0].f7NavbarLeftOffset += activeNavbarBackLink[0].offsetLeft;\n }\n }\n center.transform('translate3d(' + center[0].f7NavbarLeftOffset + 'px, 0, 0)');\n }\n }\n if (!noLeft && left.hasClass('sliding')) {\n if (app.rtl) {\n left[0].f7NavbarLeftOffset = -(navbarWidth - left[0].offsetWidth) / 2 * inverter;\n left[0].f7NavbarRightOffset = leftWidth * inverter;\n }\n else {\n left[0].f7NavbarLeftOffset = -leftWidth;\n left[0].f7NavbarRightOffset = (navbarWidth - left[0].offsetWidth) / 2;\n if (app.params.animateNavBackIcon && left.find('.back .icon').length > 0) {\n left[0].f7NavbarRightOffset -= left.find('.back .icon')[0].offsetWidth;\n }\n }\n if (onLeft) left.transform('translate3d(' + left[0].f7NavbarLeftOffset + 'px, 0, 0)');\n }\n if (!noRight && right.hasClass('sliding')) {\n if (app.rtl) {\n right[0].f7NavbarLeftOffset = -rightWidth * inverter;\n right[0].f7NavbarRightOffset = (navbarWidth - right[0].offsetWidth) / 2 * inverter;\n }\n else {\n right[0].f7NavbarLeftOffset = -(navbarWidth - right[0].offsetWidth) / 2;\n right[0].f7NavbarRightOffset = rightWidth;\n }\n if (onLeft) right.transform('translate3d(' + right[0].f7NavbarLeftOffset + 'px, 0, 0)');\n }\n if (subnavbar.length && subnavbar.hasClass('sliding')) {\n subnavbar[0].f7NavbarLeftOffset = app.rtl ? subnavbar[0].offsetWidth : -subnavbar[0].offsetWidth;\n subnavbar[0].f7NavbarRightOffset = -subnavbar[0].f7NavbarLeftOffset;\n }\n \n // Center left\n var centerLeft = diff;\n if (app.rtl && noLeft && noRight && center.length > 0) centerLeft = -centerLeft;\n center.css({left: centerLeft + 'px'});\n \n });\n };\n \n // Hide/Show Navbars/Toolbars\n app.hideNavbar = function (navbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n $(navbarContainer).addClass('navbar-hidden' + (!animated ? (' not-animated') : ''));\n return true;\n };\n app.showNavbar = function (navbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n var navbar = $(navbarContainer);\n if (animated) {\n navbar.removeClass('not-animated');\n navbar.addClass('navbar-hiding').removeClass('navbar-hidden').transitionEnd(function () {\n navbar.removeClass('navbar-hiding');\n });\n }\n else {\n navbar.removeClass('navbar-hidden navbar-hiding not-animated');\n }\n return true;\n };\n app.hideToolbar = function (toolbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n $(toolbarContainer).addClass('toolbar-hidden' + (!animated ? (' not-animated') : ''));\n return true;\n };\n app.showToolbar = function (toolbarContainer, animated) {\n if (typeof animated === 'undefined') animated = true;\n var toolbar = $(toolbarContainer);\n if (animated) {\n toolbar.removeClass('not-animated');\n toolbar.addClass('toolbar-hiding').removeClass('toolbar-hidden').transitionEnd(function () {\n toolbar.removeClass('toolbar-hiding' + (!animated ? (' not-animated') : ''));\n });\n }\n else {\n toolbar.removeClass('toolbar-hidden toolbar-hiding not-animated');\n }\n \n };\n \n\n /*======================================================\n ************ Searchbar ************\n ======================================================*/\n var Searchbar = function (container, params) {\n var defaults = {\n input: null,\n clearButton: null,\n cancelButton: null,\n searchList: null,\n searchIn: '.item-title',\n searchBy: '',\n found: null,\n notFound: null,\n overlay: null,\n ignore: '.searchbar-ignore',\n customSearch: false,\n removeDiacritics: false,\n hideDividers: true,\n hideGroups: true,\n /* Callbacks\n onSearch\n onEnable\n onDisable\n onClear\n */\n \n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined' || params[def] === null && defaults.hasOwnProperty(def)) {\n params[def] = defaults[def];\n }\n }\n \n // Instance\n var s = this;\n \n // Material\n s.material = app.params.material;\n \n // Params\n s.params = params;\n \n // Container\n container = $(container);\n s.container = container;\n \n // Active\n s.active = false;\n \n // Input\n s.input = s.params.input ? $(s.params.input) : s.container.find('input[type=\"search\"]');\n s.clearButton = s.params.clearButton ? $(s.params.clearButton) : s.container.find('.searchbar-clear');\n s.cancelButton = s.params.cancelButton ? $(s.params.cancelButton) : s.container.find('.searchbar-cancel');\n \n // Search List\n s.searchList = $(s.params.searchList);\n \n // Is Virtual List\n s.isVirtualList = s.searchList.hasClass('virtual-list');\n \n // Is In Page\n s.pageContainer = s.container.parents('.page').eq(0);\n \n // Overlay\n if (!s.params.overlay) {\n s.overlay = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-overlay') : $('.searchbar-overlay');\n }\n else {\n s.overlay = $(s.params.overlay);\n }\n // Found and not found\n if (!s.params.found) {\n s.found = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-found') : $('.searchbar-found');\n }\n else {\n s.found = $(s.params.found);\n }\n if (!s.params.notFound) {\n s.notFound = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-not-found') : $('.searchbar-not-found');\n }\n else {\n s.notFound = $(s.params.notFound);\n }\n \n // Set Cancel button\n var cancelMarginProp = app.rtl ? 'margin-left' : 'margin-right';\n var cancelButtonHasMargin = false;\n s.setCancelButtonMargin = function () {\n s.cancelButton.transition(0).show();\n s.cancelButton.css(cancelMarginProp, -s.cancelButton[0].offsetWidth + 'px');\n var clientLeft = s.cancelButton[0].clientLeft;\n s.cancelButton.transition('');\n cancelButtonHasMargin = true;\n };\n \n // Trigger\n s.triggerEvent = function (eventName, callbackName, eventData) {\n s.container.trigger(eventName, eventData);\n if (s.searchList.length > 0) s.searchList.trigger(eventName, eventData);\n if (callbackName && s.params[callbackName]) s.params[callbackName](s, eventData);\n };\n \n // Enable/disalbe\n s.enable = function (e) {\n function _enable() {\n if ((s.searchList.length || s.params.customSearch) && !s.container.hasClass('searchbar-active') && !s.query) s.overlay.addClass('searchbar-overlay-active');\n s.container.addClass('searchbar-active');\n if (s.cancelButton.length > 0 && !s.material) {\n if (!cancelButtonHasMargin) {\n s.setCancelButtonMargin();\n }\n s.cancelButton.css(cancelMarginProp, '0px');\n }\n s.triggerEvent('enableSearch searchbar:enable', 'onEnable');\n s.active = true;\n }\n if (app.device.ios && !app.params.material && e && e.type === 'focus') {\n setTimeout(function () {\n _enable();\n }, 400);\n }\n else {\n _enable();\n }\n };\n \n s.disable = function () {\n s.input.val('').trigger('change');\n s.container.removeClass('searchbar-active searchbar-not-empty');\n if (s.cancelButton.length > 0 && !s.material) s.cancelButton.css(cancelMarginProp, -s.cancelButton[0].offsetWidth + 'px');\n \n if (s.searchList.length || s.params.customSearch) s.overlay.removeClass('searchbar-overlay-active');\n \n s.active = false;\n function _disable() {\n s.input.blur();\n }\n if (app.device.ios) {\n setTimeout(function () {\n _disable();\n }, 400);\n }\n else {\n _disable();\n }\n s.triggerEvent('disableSearch searchbar:disable', 'onDisable');\n };\n \n // Clear\n s.clear = function (e) {\n if (!s.query && e && $(e.target).hasClass('searchbar-clear')) {\n s.disable();\n return;\n }\n var previousQuery = s.value;\n s.input.val('').trigger('change').focus();\n s.triggerEvent('clearSearch searchbar:clear', 'onClear', {previousQuery: previousQuery});\n };\n \n // Search\n s.handleInput = function () {\n setTimeout(function () {\n var value = s.input.val().trim();\n if ((s.searchList.length > 0 || s.params.customSearch) && (s.params.searchIn || s.isVirtualList)) s.search(value, true);\n }, 0);\n };\n \n var previousQuery = '';\n var virtualList;\n s.search = function (query, internal) {\n if (previousQuery && query.trim() === previousQuery) return;\n previousQuery = query.trim();\n \n if (!internal) {\n if (!s.active) {\n s.enable();\n }\n s.input.val(query);\n }\n s.query = s.value = query;\n // Add active/inactive classes on overlay\n if (query.length === 0) {\n s.container.removeClass('searchbar-not-empty');\n if (s.searchList.length && s.container.hasClass('searchbar-active')) s.overlay.addClass('searchbar-overlay-active');\n }\n else {\n s.container.addClass('searchbar-not-empty');\n if (s.searchList.length && s.container.hasClass('searchbar-active')) s.overlay.removeClass('searchbar-overlay-active');\n }\n \n if (s.params.customSearch) {\n s.triggerEvent('search searchbar:search', 'onSearch', {query: query});\n return;\n }\n \n var foundItems = [], _vlQuery;\n if (s.isVirtualList) {\n virtualList = s.searchList[0].f7VirtualList;\n if (query.trim() === '') {\n virtualList.resetFilter();\n s.notFound.hide();\n s.found.show();\n return;\n }\n _vlQuery = s.params.removeDiacritics ? $.removeDiacritics(query) : query;\n if (virtualList.params.searchAll) {\n foundItems = virtualList.params.searchAll(_vlQuery, virtualList.items) || [];\n }\n else if (virtualList.params.searchByItem) {\n for (var i = 0; i < virtualList.items.length; i++) {\n if(virtualList.params.searchByItem(_vlQuery, i, virtualList.params.items[i])) {\n foundItems.push(i);\n }\n }\n }\n }\n else {\n var values;\n if (s.params.removeDiacritics) values = $.removeDiacritics(query.trim().toLowerCase()).split(' ');\n else {\n values = query.trim().toLowerCase().split(' ');\n }\n s.searchList.find('li').removeClass('hidden-by-searchbar').each(function (index, el) {\n el = $(el);\n var compareWithText = [];\n el.find(s.params.searchIn).each(function () {\n var itemText = $(this).text().trim().toLowerCase();\n if (s.params.removeDiacritics) itemText = $.removeDiacritics(itemText);\n compareWithText.push(itemText);\n });\n compareWithText = compareWithText.join(' ');\n var wordsMatch = 0;\n for (var i = 0; i < values.length; i++) {\n if (compareWithText.indexOf(values[i]) >= 0) wordsMatch++;\n }\n if (wordsMatch !== values.length && !(s.params.ignore && el.is(s.params.ignore))) {\n el.addClass('hidden-by-searchbar');\n }\n else {\n foundItems.push(el[0]);\n }\n });\n \n if (s.params.hideDividers) {\n s.searchList.find('.item-divider, .list-group-title').each(function () {\n var title = $(this);\n var nextElements = title.nextAll('li');\n var hide = true;\n for (var i = 0; i < nextElements.length; i++) {\n var nextEl = $(nextElements[i]);\n if (nextEl.hasClass('list-group-title') || nextEl.hasClass('item-divider')) break;\n if (!nextEl.hasClass('hidden-by-searchbar')) {\n hide = false;\n }\n }\n var ignore = s.params.ignore && title.is(s.params.ignore);\n if (hide && !ignore) title.addClass('hidden-by-searchbar');\n else title.removeClass('hidden-by-searchbar');\n });\n }\n if (s.params.hideGroups) {\n s.searchList.find('.list-group').each(function () {\n var group = $(this);\n var ignore = s.params.ignore && group.is(s.params.ignore);\n var notHidden = group.find('li:not(.hidden-by-searchbar)');\n if (notHidden.length === 0 && !ignore) {\n group.addClass('hidden-by-searchbar');\n }\n else {\n group.removeClass('hidden-by-searchbar');\n }\n });\n }\n }\n s.triggerEvent('search searchbar:search', 'onSearch', {query: query, foundItems: foundItems});\n if (foundItems.length === 0) {\n s.notFound.show();\n s.found.hide();\n }\n else {\n s.notFound.hide();\n s.found.show();\n }\n if (s.isVirtualList) {\n virtualList.filterItems(foundItems);\n }\n };\n \n // Events\n function preventSubmit(e) {\n e.preventDefault();\n }\n \n s.attachEvents = function (destroy) {\n var method = destroy ? 'off' : 'on';\n s.container[method]('submit', preventSubmit);\n if (!s.material) s.cancelButton[method]('click', s.disable);\n s.overlay[method]('click', s.disable);\n s.input[method]('focus', s.enable);\n s.input[method]('change keydown keypress keyup compositionend', s.handleInput);\n s.clearButton[method]('click', s.clear);\n \n };\n s.detachEvents = function() {\n s.attachEvents(true);\n };\n \n // Init Destroy\n s.init = function () {\n s.attachEvents();\n };\n s.destroy = function () {\n if (!s) return;\n s.detachEvents();\n s = null;\n };\n \n // Init\n s.init();\n \n s.container[0].f7Searchbar = s;\n return s;\n \n };\n app.searchbar = function (container, params) {\n return new Searchbar(container, params);\n };\n app.initSearchbar = function (container) {\n container = $(container);\n var searchbar = container.hasClass('searchbar') ? container : container.find('.searchbar');\n if (searchbar.length === 0) return;\n if (!searchbar.hasClass('searchbar-init')) return;\n \n var sb = app.searchbar(searchbar, searchbar.dataset());\n \n function onBeforeRemove() {\n if (sb) sb.destroy();\n }\n if (container.hasClass('page')) {\n container.once('pageBeforeRemove', onBeforeRemove);\n }\n else if (container.hasClass('navbar-inner')) {\n container.once('navbarBeforeRemove', onBeforeRemove);\n }\n };\n \n\n /*======================================================\n ************ Messagebar ************\n ======================================================*/\n var Messagebar = function (container, params) {\n var defaults = {\n textarea: null,\n maxHeight: null,\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined' || params[def] === null) {\n params[def] = defaults[def];\n }\n }\n \n // Instance\n var m = this;\n \n // Params\n m.params = params;\n \n // Container\n m.container = $(container);\n if (m.container.length === 0) return;\n \n // Textarea\n m.textarea = m.params.textarea ? $(m.params.textarea) : m.container.find('textarea');\n \n // Is In Page\n m.pageContainer = m.container.parents('.page').eq(0);\n m.pageContent = m.pageContainer.find('.page-content');\n \n // Initial Sizes\n m.pageContentPadding = parseInt(m.pageContent.css('padding-bottom'));\n m.initialBarHeight = m.container[0].offsetHeight;\n m.initialAreaHeight = m.textarea[0].offsetHeight;\n \n \n // Resize textarea\n m.sizeTextarea = function () {\n // Reset\n m.textarea.css({'height': ''});\n \n var height = m.textarea[0].offsetHeight;\n var diff = height - m.textarea[0].clientHeight;\n var scrollHeight = m.textarea[0].scrollHeight;\n \n // Update\n if (scrollHeight + diff > height) {\n var newAreaHeight = scrollHeight + diff;\n var newBarHeight = m.initialBarHeight + (newAreaHeight - m.initialAreaHeight);\n var maxBarHeight = m.params.maxHeight || m.container.parents('.view')[0].offsetHeight - 88;\n if (newBarHeight > maxBarHeight) {\n newBarHeight = parseInt(maxBarHeight, 10);\n newAreaHeight = newBarHeight - m.initialBarHeight + m.initialAreaHeight;\n }\n m.textarea.css('height', newAreaHeight + 'px');\n m.container.css('height', newBarHeight + 'px');\n var onBottom = (m.pageContent[0].scrollTop === m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight);\n if (m.pageContent.length > 0) {\n m.pageContent.css('padding-bottom', newBarHeight + 'px');\n if (m.pageContent.find('.messages-new-first').length === 0 && onBottom) {\n m.pageContent.scrollTop(m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight);\n }\n }\n }\n else {\n if (m.pageContent.length > 0) {\n m.container.css({'height': '', 'bottom': ''});\n m.pageContent.css({'padding-bottom': ''});\n }\n }\n };\n \n // Clear\n m.clear = function () {\n m.textarea.val('').trigger('change');\n };\n m.value = function (value) {\n if (typeof value === 'undefined') return m.textarea.val();\n else m.textarea.val(value).trigger('change');\n };\n \n // Handle textarea\n m.textareaTimeout = undefined;\n m.handleTextarea = function (e) {\n clearTimeout(m.textareaTimeout);\n m.textareaTimeout = setTimeout(function () {\n m.sizeTextarea();\n }, 0);\n };\n \n //Events\n function preventSubmit(e) {\n e.preventDefault();\n }\n \n m.attachEvents = function (destroy) {\n var method = destroy ? 'off' : 'on';\n m.container[method]('submit', preventSubmit);\n m.textarea[method]('change keydown keypress keyup paste cut', m.handleTextarea);\n };\n m.detachEvents = function () {\n m.attachEvents(true);\n };\n \n // Init Destroy\n m.init = function () {\n m.attachEvents();\n };\n m.destroy = function () {\n m.detachEvents();\n m = null;\n };\n \n // Init\n m.init();\n \n m.container[0].f7Messagebar = m;\n return m;\n };\n app.messagebar = function (container, params) {\n return new Messagebar(container, params);\n };\n app.initPageMessagebar = function (pageContainer) {\n pageContainer = $(pageContainer);\n var messagebar = pageContainer.hasClass('messagebar') ? pageContainer : pageContainer.find('.messagebar');\n if (messagebar.length === 0) return;\n if (!messagebar.hasClass('messagebar-init')) return;\n var mb = app.messagebar(messagebar, messagebar.dataset());\n \n // Destroy on page remove\n function pageBeforeRemove() {\n mb.destroy();\n pageContainer.off('page:beforeremove', pageBeforeRemove);\n }\n if (pageContainer.hasClass('page')) {\n pageContainer.on('page:beforeremove', pageBeforeRemove);\n }\n };\n \n\n /*======================================================\n ************ XHR ************\n ======================================================*/\n // XHR Caching\n app.cache = [];\n app.removeFromCache = function (url) {\n var index = false;\n for (var i = 0; i < app.cache.length; i++) {\n if (app.cache[i].url === url) index = i;\n }\n if (index !== false) app.cache.splice(index, 1);\n };\n \n // XHR\n app.xhr = false;\n app.get = function (url, view, ignoreCache, callback) {\n // should we ignore get params or not\n var _url = url;\n if (app.params.cacheIgnoreGetParameters && url.indexOf('?') >= 0) {\n _url = url.split('?')[0];\n }\n if (app.params.cache && !ignoreCache && url.indexOf('nocache') < 0 && app.params.cacheIgnore.indexOf(_url) < 0) {\n // Check is the url cached\n for (var i = 0; i < app.cache.length; i++) {\n if (app.cache[i].url === _url) {\n // Check expiration\n if ((new Date()).getTime() - app.cache[i].time < app.params.cacheDuration) {\n // Load from cache\n callback(app.cache[i].content);\n return false;\n }\n }\n }\n }\n \n app.xhr = $.ajax({\n url: url,\n method: 'GET',\n beforeSend: app.params.onAjaxStart,\n complete: function (xhr, status) {\n if (status !== 'error' && status !== 'timeout' && (xhr.status >= 200 && xhr.status < 300) || xhr.status === 0) {\n if (app.params.cache && xhr.responseText !== '') {\n app.removeFromCache(_url);\n app.cache.push({\n url: _url,\n time: (new Date()).getTime(),\n content: xhr.responseText\n });\n }\n callback(xhr.responseText, false);\n }\n else {\n callback(xhr.responseText, true);\n }\n if (app.params.onAjaxComplete) app.params.onAjaxComplete(xhr);\n },\n error: function (xhr) {\n callback(xhr.responseText, true);\n if (app.params.onAjaxError) app.params.onAjaxError(xhr);\n }\n });\n if (view) view.xhr = app.xhr;\n \n return app.xhr;\n };\n \n\n /*======================================================\n ************ Pages ************\n ======================================================*/\n // Page Callbacks API\n app.pageCallbacks = {};\n \n app.onPage = function (callbackName, pageName, callback) {\n if (pageName && pageName.split(' ').length > 1) {\n var pageNames = pageName.split(' ');\n var returnCallbacks = [];\n for (var i = 0; i < pageNames.length; i++) {\n returnCallbacks.push(app.onPage(callbackName, pageNames[i], callback));\n }\n returnCallbacks.remove = function () {\n for (var i = 0; i < returnCallbacks.length; i++) {\n returnCallbacks[i].remove();\n }\n };\n returnCallbacks.trigger = function () {\n for (var i = 0; i < returnCallbacks.length; i++) {\n returnCallbacks[i].trigger();\n }\n };\n return returnCallbacks;\n }\n var callbacks = app.pageCallbacks[callbackName][pageName];\n if (!callbacks) {\n callbacks = app.pageCallbacks[callbackName][pageName] = [];\n }\n app.pageCallbacks[callbackName][pageName].push(callback);\n return {\n remove: function () {\n var removeIndex;\n for (var i = 0; i < callbacks.length; i++) {\n if (callbacks[i].toString() === callback.toString()) {\n removeIndex = i;\n }\n }\n if (typeof removeIndex !== 'undefined') callbacks.splice(removeIndex, 1);\n },\n trigger: callback\n };\n };\n \n //Create callbacks methods dynamically\n function createPageCallback(callbackName) {\n var capitalized = callbackName.replace(/^./, function (match) {\n return match.toUpperCase();\n });\n app['onPage' + capitalized] = function (pageName, callback) {\n return app.onPage(callbackName, pageName, callback);\n };\n }\n \n var pageCallbacksNames = ('beforeInit init reinit beforeAnimation afterAnimation back afterBack beforeRemove').split(' ');\n for (var i = 0; i < pageCallbacksNames.length; i++) {\n app.pageCallbacks[pageCallbacksNames[i]] = {};\n createPageCallback(pageCallbacksNames[i]);\n }\n \n app.triggerPageCallbacks = function (callbackName, pageName, pageData) {\n var allPagesCallbacks = app.pageCallbacks[callbackName]['*'];\n if (allPagesCallbacks) {\n for (var j = 0; j < allPagesCallbacks.length; j++) {\n allPagesCallbacks[j](pageData);\n }\n }\n var callbacks = app.pageCallbacks[callbackName][pageName];\n if (!callbacks || callbacks.length === 0) return;\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i](pageData);\n }\n };\n \n // On Page Init Callback\n app.pageInitCallback = function (view, params) {\n var pageContainer = params.pageContainer;\n if (!pageContainer) return;\n if (pageContainer.f7PageInitialized && view && !view.params.domCache) return;\n \n var pageQuery = params.query;\n if (!pageQuery) {\n if (params.url && params.url.indexOf('?') > 0) {\n pageQuery = $.parseUrlQuery(params.url || '');\n }\n else if (pageContainer.f7PageData && pageContainer.f7PageData.query) {\n pageQuery = pageContainer.f7PageData.query;\n }\n else {\n pageQuery = {};\n }\n }\n \n // Page Data\n var pageData = {\n container: pageContainer,\n url: params.url,\n query: pageQuery,\n name: $(pageContainer).attr('data-page'),\n view: view,\n from: params.position,\n context: params.context,\n navbarInnerContainer: params.navbarInnerContainer,\n fromPage: params.fromPage\n };\n if (params.fromPage && !params.fromPage.navbarInnerContainer && params.oldNavbarInnerContainer) {\n params.fromPage.navbarInnerContainer = params.oldNavbarInnerContainer;\n }\n \n if (pageContainer.f7PageInitialized && ((view && view.params.domCache) || (!view && $(pageContainer).parents('.popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal').length > 0))) {\n // Reinit Page\n app.reinitPage(pageContainer);\n \n // Callbacks\n app.pluginHook('pageReinit', pageData);\n if (app.params.onPageReinit) app.params.onPageReinit(app, pageData);\n app.triggerPageCallbacks('reinit', pageData.name, pageData);\n $(pageData.container).trigger('pageReinit page:reinit', {page: pageData});\n return;\n }\n pageContainer.f7PageInitialized = true;\n \n // Store pagedata in page\n pageContainer.f7PageData = pageData;\n \n // Update View's activePage\n if (view && !params.preloadOnly && !params.reloadPrevious) {\n // Add data-page on view\n $(view.container).attr('data-page', pageData.name);\n // Update View active page data\n view.activePage = pageData;\n }\n \n // Before Init Callbacks\n app.pluginHook('pageBeforeInit', pageData);\n if (app.params.onPageBeforeInit) app.params.onPageBeforeInit(app, pageData);\n app.triggerPageCallbacks('beforeInit', pageData.name, pageData);\n $(pageData.container).trigger('pageBeforeInit page:beforeinit', {page: pageData});\n \n // Init page\n app.initPage(pageContainer);\n \n // Init Callback\n app.pluginHook('pageInit', pageData);\n if (app.params.onPageInit) app.params.onPageInit(app, pageData);\n app.triggerPageCallbacks('init', pageData.name, pageData);\n $(pageData.container).trigger('pageInit page:init', {page: pageData});\n };\n app.pageRemoveCallback = function (view, pageContainer, position) {\n var pageContext;\n if (!pageContainer) return;\n if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context;\n // Page Data\n var pageData = {\n container: pageContainer,\n name: $(pageContainer).attr('data-page'),\n view: view,\n url: pageContainer.f7PageData && pageContainer.f7PageData.url,\n query: pageContainer.f7PageData && pageContainer.f7PageData.query,\n navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer,\n from: position,\n context: pageContext\n };\n // Before Init Callback\n app.pluginHook('pageBeforeRemove', pageData);\n if (app.params.onPageBeforeRemove) app.params.onPageBeforeRemove(app, pageData);\n app.triggerPageCallbacks('beforeRemove', pageData.name, pageData);\n $(pageData.container).trigger('pageBeforeRemove page:beforeremove', {page: pageData});\n pageData = null;\n };\n app.pageBackCallback = function (callback, view, params) {\n // Page Data\n var pageContainer = params.pageContainer;\n var pageContext;\n if (!pageContainer) return;\n if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context;\n \n var pageData = {\n container: pageContainer,\n name: $(pageContainer).attr('data-page'),\n url: pageContainer.f7PageData && pageContainer.f7PageData.url,\n query: pageContainer.f7PageData && pageContainer.f7PageData.query,\n view: view,\n from: params.position,\n context: pageContext,\n navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer,\n swipeBack: params.swipeBack\n };\n \n if (callback === 'after') {\n app.pluginHook('pageAfterBack', pageData);\n if (app.params.onPageAfterBack) app.params.onPageAfterBack(app, pageData);\n app.triggerPageCallbacks('afterBack', pageData.name, pageData);\n $(pageContainer).trigger('pageAfterBack page:afterback', {page: pageData});\n \n }\n if (callback === 'before') {\n app.pluginHook('pageBack', pageData);\n if (app.params.onPageBack) app.params.onPageBack(app, pageData);\n app.triggerPageCallbacks('back', pageData.name, pageData);\n $(pageData.container).trigger('pageBack page:back', {page: pageData});\n }\n };\n app.pageAnimCallback = function (callback, view, params) {\n var pageContainer = params.pageContainer;\n var pageContext;\n if (!pageContainer) return;\n if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context;\n \n var pageQuery = params.query;\n if (!pageQuery) {\n if (params.url && params.url.indexOf('?') > 0) {\n pageQuery = $.parseUrlQuery(params.url || '');\n }\n else if (pageContainer.f7PageData && pageContainer.f7PageData.query) {\n pageQuery = pageContainer.f7PageData.query;\n }\n else {\n pageQuery = {};\n }\n }\n // Page Data\n var pageData = {\n container: pageContainer,\n url: params.url,\n query: pageQuery,\n name: $(pageContainer).attr('data-page'),\n view: view,\n from: params.position,\n context: pageContext,\n swipeBack: params.swipeBack,\n navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer,\n fromPage: params.fromPage\n };\n var oldPage = params.oldPage,\n newPage = params.newPage;\n \n // Update page date\n pageContainer.f7PageData = pageData;\n \n if (callback === 'after') {\n app.pluginHook('pageAfterAnimation', pageData);\n if (app.params.onPageAfterAnimation) app.params.onPageAfterAnimation(app, pageData);\n app.triggerPageCallbacks('afterAnimation', pageData.name, pageData);\n $(pageData.container).trigger('pageAfterAnimation page:afteranimation', {page: pageData});\n \n }\n if (callback === 'before') {\n // Add data-page on view\n $(view.container).attr('data-page', pageData.name);\n \n // Update View's activePage\n if (view) view.activePage = pageData;\n \n // Hide/show navbar dynamically\n if (newPage.hasClass('no-navbar') && !oldPage.hasClass('no-navbar')) {\n view.hideNavbar();\n }\n if (!newPage.hasClass('no-navbar') && (oldPage.hasClass('no-navbar') || oldPage.hasClass('no-navbar-by-scroll'))) {\n view.showNavbar();\n }\n // Hide/show navbar toolbar\n if (newPage.hasClass('no-toolbar') && !oldPage.hasClass('no-toolbar')) {\n view.hideToolbar();\n }\n if (!newPage.hasClass('no-toolbar') && (oldPage.hasClass('no-toolbar') || oldPage.hasClass('no-toolbar-by-scroll'))) {\n view.showToolbar();\n }\n // Hide/show tabbar\n var tabBar;\n if (newPage.hasClass('no-tabbar') && !oldPage.hasClass('no-tabbar')) {\n tabBar = $(view.container).find('.tabbar');\n if (tabBar.length === 0) tabBar = $(view.container).parents('.' + app.params.viewsClass).find('.tabbar');\n app.hideToolbar(tabBar);\n }\n if (!newPage.hasClass('no-tabbar') && (oldPage.hasClass('no-tabbar') || oldPage.hasClass('no-tabbar-by-scroll'))) {\n tabBar = $(view.container).find('.tabbar');\n if (tabBar.length === 0) tabBar = $(view.container).parents('.' + app.params.viewsClass).find('.tabbar');\n app.showToolbar(tabBar);\n }\n \n oldPage.removeClass('no-navbar-by-scroll no-toolbar-by-scroll');\n // Callbacks\n app.pluginHook('pageBeforeAnimation', pageData);\n if (app.params.onPageBeforeAnimation) app.params.onPageBeforeAnimation(app, pageData);\n app.triggerPageCallbacks('beforeAnimation', pageData.name, pageData);\n $(pageData.container).trigger('pageBeforeAnimation page:beforeanimation', {page: pageData});\n }\n };\n \n // Init Page Events and Manipulations\n app.initPage = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length === 0) return;\n // Size navbars on page load\n if (app.sizeNavbars) app.sizeNavbars(pageContainer.parents('.' + app.params.viewClass)[0]);\n // Init messages\n if (app.initPageMessages) app.initPageMessages(pageContainer);\n // Init forms storage\n if (app.initFormsStorage) app.initFormsStorage(pageContainer);\n // Init smart select\n if (app.initSmartSelects) app.initSmartSelects(pageContainer);\n // Init slider\n if (app.initPageSwiper) app.initPageSwiper(pageContainer);\n // Init pull to refres\n if (app.initPullToRefresh) app.initPullToRefresh(pageContainer);\n // Init infinite scroll\n if (app.initPageInfiniteScroll) app.initPageInfiniteScroll(pageContainer);\n // Init searchbar\n if (app.initSearchbar) app.initSearchbar(pageContainer);\n // Init message bar\n if (app.initPageMessagebar) app.initPageMessagebar(pageContainer);\n // Init scroll toolbars\n if (app.initPageScrollToolbars) app.initPageScrollToolbars(pageContainer);\n // Init lazy images\n if (app.initImagesLazyLoad) app.initImagesLazyLoad(pageContainer);\n // Init progress bars\n if (app.initPageProgressbar) app.initPageProgressbar(pageContainer);\n // Init resizeable textareas\n if (app.initPageResizableTextarea) app.initPageResizableTextarea(pageContainer);\n // Init Data Table\n if (app.initPageDataTables) app.initPageDataTables(pageContainer);\n // Init Material Preloader\n if (app.params.material && app.initPageMaterialPreloader) app.initPageMaterialPreloader(pageContainer);\n // Init Material Inputs\n if (app.params.material && app.initPageMaterialInputs) app.initPageMaterialInputs(pageContainer);\n // Init Material Tabbar\n if (app.params.material && app.initPageMaterialTabbar) app.initPageMaterialTabbar(pageContainer);\n };\n app.reinitPage = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length === 0) return;\n // Size navbars on page reinit\n if (app.sizeNavbars) app.sizeNavbars(pageContainer.parents('.' + app.params.viewClass)[0]);\n // Reinit slider\n if (app.reinitPageSwiper) app.reinitPageSwiper(pageContainer);\n // Reinit lazy load\n if (app.reinitLazyLoad) app.reinitLazyLoad(pageContainer);\n };\n app.initPageWithCallback = function (pageContainer) {\n pageContainer = $(pageContainer);\n var viewContainer = pageContainer.parents('.' + app.params.viewClass);\n if (viewContainer.length === 0) return;\n var view = viewContainer[0].f7View || undefined;\n var url = view && view.url ? view.url : undefined;\n if (viewContainer && pageContainer.attr('data-page')) {\n viewContainer.attr('data-page', pageContainer.attr('data-page'));\n }\n app.pageInitCallback(view, {pageContainer: pageContainer[0], url: url, position: 'center'});\n };\n \n\n /*======================================================\n ************ Navigation / Router ************\n ======================================================*/\n app.router = {\n _remove: function (el) {\n if (app.params.routerRemoveTimeout || app.params.routerRemoveWithTimeout) {\n setTimeout(function () {\n $(el).remove();\n }, 0);\n }\n else $(el).remove();\n },\n _modalsSelector: '.popup, .modal, .popover, .actions-modal, .picker-modal, .login-screen',\n // Temporary DOM Element\n temporaryDom: document.createElement('div'),\n \n // Find page or navbar in passed container which are related to View\n findElement: function (selector, container, view, notCached) {\n container = $(container);\n if (notCached) selector = selector + ':not(.cached)';\n var found = container.find(selector).filter(function (index, el) {\n return $(el).parents(app.router._modalsSelector).length === 0;\n });\n if (found.length > 1) {\n if (typeof view.selector === 'string') {\n // Search in related view\n found = container.find(view.selector + ' ' + selector);\n }\n if (found.length > 1) {\n // Search in main view\n found = container.find('.' + app.params.viewMainClass + ' ' + selector);\n }\n }\n if (found.length === 1) return found;\n else {\n // Try to find non cached\n if (!notCached) found = app.router.findElement(selector, container, view, true);\n if (found && found.length === 1) return found;\n if (found && found.length > 1) return $(found[0]);\n else return undefined;\n }\n },\n \n // Set pages classes for animationEnd\n animatePages: function (leftPage, rightPage, direction) {\n // Loading new page\n var removeClasses = 'page-on-center page-on-right page-on-left';\n if (direction === 'to-left') {\n leftPage.removeClass(removeClasses).addClass('page-from-center-to-left');\n rightPage.removeClass(removeClasses).addClass('page-from-right-to-center');\n }\n // Go back\n if (direction === 'to-right') {\n leftPage.removeClass(removeClasses).addClass('page-from-left-to-center');\n rightPage.removeClass(removeClasses).addClass('page-from-center-to-right');\n \n }\n },\n \n // Prepare navbar before animarion\n prepareNavbar: function (newNavbarInner, oldNavbarInner, newNavbarPosition) {\n $(newNavbarInner).find('.sliding').each(function () {\n var sliding = $(this);\n var slidingOffset = newNavbarPosition === 'right' ? this.f7NavbarRightOffset : this.f7NavbarLeftOffset;\n \n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(' + (-slidingOffset) + 'px,0,0)');\n }\n }\n sliding.transform('translate3d(' + slidingOffset + 'px,0,0)');\n });\n },\n \n // Set navbars classes for animation\n animateNavbars: function (leftNavbarInner, rightNavbarInner, direction) {\n // Loading new page\n var removeClasses = 'navbar-on-right navbar-on-center navbar-on-left';\n if (direction === 'to-left') {\n rightNavbarInner.removeClass(removeClasses).addClass('navbar-from-right-to-center');\n rightNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n sliding.transform('translate3d(0px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(0px,0,0)');\n }\n }\n });\n \n leftNavbarInner.removeClass(removeClasses).addClass('navbar-from-center-to-left');\n leftNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n var rightText;\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('center') && rightNavbarInner.find('.sliding.left .back .icon').length > 0) {\n rightText = rightNavbarInner.find('.sliding.left .back span');\n if (rightText.length > 0) this.f7NavbarLeftOffset += rightText[0].offsetLeft;\n }\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(' + (-this.f7NavbarLeftOffset) + 'px,0,0)');\n }\n }\n sliding.transform('translate3d(' + (this.f7NavbarLeftOffset) + 'px,0,0)');\n });\n }\n // Go back\n if (direction === 'to-right') {\n leftNavbarInner.removeClass(removeClasses).addClass('navbar-from-left-to-center');\n leftNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n sliding.transform('translate3d(0px,0,0)');\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(0px,0,0)');\n }\n }\n });\n \n rightNavbarInner.removeClass(removeClasses).addClass('navbar-from-center-to-right');\n rightNavbarInner.find('.sliding').each(function () {\n var sliding = $(this);\n if (app.params.animateNavBackIcon) {\n if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) {\n sliding.find('.back .icon').transform('translate3d(' + (-this.f7NavbarRightOffset) + 'px,0,0)');\n }\n }\n sliding.transform('translate3d(' + (this.f7NavbarRightOffset) + 'px,0,0)');\n });\n }\n },\n \n preprocess: function(view, content, url, next) {\n // Plugin hook\n app.pluginHook('routerPreprocess', view, content, url, next);\n \n // Preprocess by plugin\n content = app.pluginProcess('preprocess', content);\n \n if (view && view.params && view.params.preprocess) {\n content = view.params.preprocess(content, url, next);\n if (typeof content !== 'undefined') {\n next(content);\n }\n }\n else if (app.params.preprocess) {\n content = app.params.preprocess(content, url, next);\n if (typeof content !== 'undefined') {\n next(content);\n }\n }\n else {\n next(content);\n }\n },\n preroute: function(view, options, isBack) {\n if (isBack) options.isBack = true;\n app.pluginHook('routerPreroute', view, options);\n if ((app.params.preroute && app.params.preroute(view, options) === false) || (view && view.params.preroute && view.params.preroute(view, options) === false)) {\n return true;\n }\n else {\n return false;\n }\n },\n \n template7Render: function (view, options) {\n var url = options.url,\n content = options.content, //initial content\n t7_rendered_content = options.content, // will be rendered using Template7\n context = options.context, // Context data for Template7\n contextName = options.contextName,\n template = options.template; // Template 7 compiled template\n \n var t7_ctx, t7_template;\n if (typeof content === 'string') {\n if (url) {\n if (app.template7Cache[url] && !options.ignoreCache) t7_template = t7.cache[url];\n else {\n t7_template = t7.compile(content);\n t7.cache[url] = t7_template;\n }\n }\n else t7_template = t7.compile(content);\n }\n else if (template) {\n t7_template = template;\n }\n \n if (context) {\n t7_ctx = context;\n if (context && url) {\n view.contextCache[url] = context;\n }\n }\n else {\n if (contextName) {\n if (contextName.indexOf('.') >= 0) {\n var _ctx_path = contextName.split('.');\n var _ctx = t7.data[_ctx_path[0]];\n for (var i = 1; i < _ctx_path.length; i++) {\n if (_ctx_path[i]) _ctx = _ctx[_ctx_path[i]];\n }\n t7_ctx = _ctx;\n }\n else t7_ctx = t7.data[contextName];\n }\n if (!t7_ctx && url) {\n t7_ctx = t7.data['url:' + url];\n }\n if (!t7_ctx && typeof content === 'string' && !template) {\n //try to find by page name in content\n var pageNameMatch = content.match(/(data-page=[\"'][^\"^']*[\"'])/);\n if (pageNameMatch) {\n var page = pageNameMatch[0].split('data-page=')[1].replace(/['\"]/g, '');\n if (page) t7_ctx = t7.data['page:' + page];\n }\n }\n if (!t7_ctx && template && t7.templates) {\n // Try to find matched template name in t7.templates\n for (var templateName in t7.templates) {\n if (t7.templates[templateName] === template) t7_ctx = t7.data[templateName];\n }\n }\n if (!t7_ctx && url && url in view.contextCache) {\n t7_ctx = view.contextCache[url];\n }\n if (!t7_ctx) {\n t7_ctx = {};\n }\n }\n \n if (t7_template && t7_ctx) {\n if (typeof t7_ctx === 'function') t7_ctx = t7_ctx();\n if (url) {\n // Extend data with URL query\n var query = $.parseUrlQuery(url);\n t7_ctx.url_query = {};\n for (var key in query) {\n t7_ctx.url_query[key] = query[key];\n }\n }\n try {\n t7_rendered_content = t7_template(t7_ctx);\n }\n catch (e) {\n t7_rendered_content = '';\n if (window.console && window.console.error) {\n console.error(e);\n }\n }\n }\n \n return {content: t7_rendered_content, context: t7_ctx};\n }\n };\n \n \n app.router._load = function (view, options) {\n // Plugin hook\n app.pluginHook('routerLoad', view, options);\n \n var url = options.url,\n content = options.content, //initial content\n t7_rendered = {content: options.content},\n template = options.template, // Template 7 compiled template\n pageName = options.pageName,\n viewContainer = $(view.container),\n pagesContainer = $(view.pagesContainer),\n animatePages = options.animatePages,\n newPage, oldPage, pagesInView, i, oldNavbarInner, newNavbarInner, navbar, dynamicNavbar, reloadPosition,\n isDynamicPage = typeof url === 'undefined' && content || template,\n pushState = options.pushState,\n pageElement = options.pageElement;\n \n if (typeof animatePages === 'undefined') animatePages = view.params.animatePages;\n \n // Render with Template7\n if (app.params.template7Pages && typeof content === 'string' || template) {\n t7_rendered = app.router.template7Render(view, options);\n if (t7_rendered.content && !content) {\n content = t7_rendered.content;\n }\n }\n \n app.router.temporaryDom.innerHTML = '';\n \n // Parse DOM\n if (!pageName && !pageElement) {\n if ((typeof content === 'string') || (url && (typeof content === 'string'))) {\n app.router.temporaryDom.innerHTML = t7_rendered.content;\n } else {\n if ('length' in content && content.length > 1) {\n for (var ci = 0; ci < content.length; ci++) {\n $(app.router.temporaryDom).append(content[ci]);\n }\n } else {\n $(app.router.temporaryDom).append(content);\n }\n }\n }\n \n // Reload position\n reloadPosition = options.reload && (options.reloadPrevious ? 'left' : 'center');\n \n // Find new page\n if (pageName) newPage = pagesContainer.find('.page[data-page=\"' + pageName + '\"]');\n else {\n if (pageElement) newPage = $(pageElement);\n else newPage = app.router.findElement('.page', app.router.temporaryDom, view);\n }\n // If page not found exit\n if (!newPage || newPage.length === 0 || (pageName && view.activePage && view.activePage.name === pageName)) {\n view.allowPageChange = true;\n return;\n }\n \n newPage.addClass(options.reload ? 'page-on-' + reloadPosition : 'page-on-right');\n \n // Find old page (should be the last one) and remove older pages\n pagesInView = pagesContainer.children('.page:not(.cached)');\n if (pageElement) {\n pagesInView = pagesInView.filter(function (index, page) {\n if (page !== pageElement) return page;\n });\n }\n \n if (options.reload && options.reloadPrevious && pagesInView.length === 1) {\n view.allowPageChange = true;\n return;\n }\n \n if (options.reload) {\n oldPage = pagesInView.eq(pagesInView.length - 1);\n }\n else {\n if (pagesInView.length > 1) {\n for (i = 0; i < pagesInView.length - 2; i++) {\n if (!view.params.domCache) {\n app.pageRemoveCallback(view, pagesInView[i], 'left');\n app.router._remove(pagesInView[i]);\n }\n else {\n $(pagesInView[i]).addClass('cached');\n }\n }\n if (!view.params.domCache) {\n app.pageRemoveCallback(view, pagesInView[i], 'left');\n app.router._remove(pagesInView[i]);\n }\n else {\n $(pagesInView[i]).addClass('cached');\n }\n }\n oldPage = pagesContainer.children('.page:not(.cached)');\n }\n if (pageElement && oldPage.length > 1) {\n oldPage = oldPage.filter(function (index, page) {\n if (page !== pageElement) return page;\n });\n }\n if(view.params.domCache || pageElement) newPage.removeClass('cached');\n \n // Dynamic navbar\n if (view.params.dynamicNavbar) {\n dynamicNavbar = true;\n // Find navbar\n if (pageName) {\n newNavbarInner = viewContainer.find('.navbar-inner[data-page=\"' + pageName + '\"]');\n }\n else {\n newNavbarInner = app.router.findElement('.navbar-inner', app.router.temporaryDom, view);\n }\n if (!newNavbarInner || newNavbarInner.length === 0) {\n // Look in page\n newNavbarInner = newPage.find('.navbar-inner');\n if (!newNavbarInner || newNavbarInner.length === 0) {\n // Set false\n dynamicNavbar = false;\n }\n else {\n if (newNavbarInner.parent('.navbar').length > 0) {\n newNavbarInner.prependTo(newPage);\n }\n }\n }\n if (dynamicNavbar && newPage.find('.navbar').length > 0) {\n app.router._remove(newPage.find('.navbar').filter(function(index, el){\n return $(el).parents(app.router._modalsSelector).length === 0;\n }));\n }\n navbar = viewContainer.children('.navbar');\n if (options.reload) {\n oldNavbarInner = navbar.find('.navbar-inner:not(.cached):last-child');\n }\n else {\n oldNavbarInner = navbar.find('.navbar-inner:not(.cached)');\n \n if (oldNavbarInner.length > 0) {\n for (i = 0; i < oldNavbarInner.length - 1; i++) {\n if (!view.params.domCache) {\n app.navbarRemoveCallback(view, pagesInView[i], navbar[0], oldNavbarInner[i]);\n app.router._remove(oldNavbarInner[i]);\n }\n else\n $(oldNavbarInner[i]).addClass('cached');\n }\n if (!newNavbarInner && oldNavbarInner.length === 1) {\n if (!view.params.domCache) {\n app.navbarRemoveCallback(view, pagesInView[0], navbar[0], oldNavbarInner[0]);\n app.router._remove(oldNavbarInner[0]);\n }\n else\n $(oldNavbarInner[0]).addClass('cached');\n }\n oldNavbarInner = navbar.find('.navbar-inner:not(.cached)');\n }\n }\n }\n if (dynamicNavbar) {\n newNavbarInner.addClass(options.reload ? 'navbar-on-' + reloadPosition : 'navbar-on-right');\n if(view.params.domCache || pageElement) newNavbarInner.removeClass('cached');\n newPage[0].f7RelatedNavbar = newNavbarInner[0];\n newNavbarInner[0].f7RelatedPage = newPage[0];\n }\n \n // save content areas into view's cache\n if (!url) {\n var newPageName = pageName || newPage.attr('data-page');\n if (isDynamicPage) url = '#' + app.params.dynamicPageUrl.replace(/{{name}}/g, newPageName).replace(/{{index}}/g, view.history.length - (options.reload ? 1 : 0));\n else url = '#' + newPageName;\n if (!view.params.domCache) {\n view.contentCache[url] = content;\n }\n if (view.params.domCache && pageName) {\n view.pagesCache[url] = pageName;\n }\n }\n else if (url && pageElement) {\n view.pageElementsCache[url] = {\n page: newPage,\n navbarInner: newNavbarInner\n };\n }\n \n // Push State\n if (app.params.pushState && !options.reloadPrevious && view.main) {\n if (typeof pushState === 'undefined') pushState = true;\n var pushStateRoot = app.params.pushStateRoot || '';\n var method = options.reload ? 'replaceState' : 'pushState';\n if (pushState) {\n if (!isDynamicPage && !pageName) {\n history[method]({url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url);\n }\n else if (isDynamicPage && content) {\n history[method]({content: typeof content === 'string' ? content : '', url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url);\n }\n else if (pageName) {\n history[method]({pageName: pageName, url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url);\n }\n }\n }\n \n // Update View history\n view.url = url;\n if (options.reload) {\n var lastUrl = view.history[view.history.length - (options.reloadPrevious ? 2 : 1)];\n if (lastUrl &&\n lastUrl.indexOf('#') === 0 &&\n lastUrl in view.contentCache &&\n lastUrl !== url &&\n view.history.indexOf(lastUrl) === -1) {\n view.contentCache[lastUrl] = null;\n delete view.contentCache[lastUrl];\n }\n else if (lastUrl &&\n lastUrl in view.pageElementsCache &&\n lastUrl !== url &&\n (view.history.indexOf(lastUrl) === -1 || view.history.indexOf(lastUrl) === view.history.length - 1)) {\n view.pageElementsCache[lastUrl] = null;\n delete view.pageElementsCache[lastUrl];\n }\n if (lastUrl &&\n lastUrl in view.contextCache &&\n lastUrl !== url &&\n (view.history.indexOf(lastUrl) === -1 || view.history.indexOf(lastUrl) === view.history.length - 1)) {\n view.contextCache[lastUrl] = null;\n delete view.contextCache[lastUrl];\n }\n view.history[view.history.length - (options.reloadPrevious ? 2 : 1)] = url;\n }\n else {\n view.history.push(url);\n }\n \n // Unique history\n var historyBecameUnique = false;\n if (view.params.uniqueHistory) {\n var _history = view.history;\n var _url = url;\n if (view.params.uniqueHistoryIgnoreGetParameters) {\n _history = [];\n _url = url.split('?')[0];\n for (i = 0; i < view.history.length; i++) {\n _history.push(view.history[i].split('?')[0]);\n }\n }\n \n if (_history.indexOf(_url) !== _history.lastIndexOf(_url)) {\n view.history = view.history.slice(0, _history.indexOf(_url));\n view.history.push(url);\n historyBecameUnique = true;\n }\n }\n // Dom manipulations\n if (options.reloadPrevious) {\n oldPage = oldPage.prev('.page');\n newPage.insertBefore(oldPage);\n if (dynamicNavbar) {\n oldNavbarInner = oldNavbarInner.prev('.navbar-inner');\n newNavbarInner.insertAfter(oldNavbarInner);\n }\n }\n else {\n pagesContainer.append(newPage[0]);\n if (dynamicNavbar) navbar.append(newNavbarInner[0]);\n }\n // Remove Old Page And Navbar\n if (options.reload) {\n if (view.params.domCache && view.initialPages.indexOf(oldPage[0]) >= 0) {\n oldPage.addClass('cached');\n if (dynamicNavbar) oldNavbarInner.addClass('cached');\n }\n else {\n app.pageRemoveCallback(view, oldPage[0], reloadPosition);\n if (dynamicNavbar) app.navbarRemoveCallback(view, oldPage[0], navbar[0], oldNavbarInner[0]);\n app.router._remove(oldPage);\n if (dynamicNavbar) app.router._remove(oldNavbarInner);\n }\n }\n \n // Page Init Events\n app.pageInitCallback(view, {\n pageContainer: newPage[0],\n url: url,\n position: options.reload ? reloadPosition : 'right',\n navbarInnerContainer: dynamicNavbar ? newNavbarInner && newNavbarInner[0] : undefined,\n oldNavbarInnerContainer: dynamicNavbar ? oldNavbarInner && oldNavbarInner[0] : undefined,\n context: t7_rendered.context || options.context,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData,\n reload: options.reload,\n reloadPrevious: options.reloadPrevious\n });\n \n // Navbar init event\n if (dynamicNavbar) {\n app.navbarInitCallback(view, newPage[0], navbar[0], newNavbarInner[0], url, options.reload ? reloadPosition : 'right');\n }\n \n if (options.reload) {\n view.allowPageChange = true;\n if (historyBecameUnique) view.refreshPreviousPage();\n return;\n }\n \n if (dynamicNavbar && animatePages) {\n app.router.prepareNavbar(newNavbarInner, oldNavbarInner, 'right');\n }\n // Force reLayout\n var clientLeft = newPage[0].clientLeft;\n \n // Before Anim Callback\n app.pageAnimCallback('before', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'right',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n \n function afterAnimation() {\n view.allowPageChange = true;\n newPage.removeClass('page-from-right-to-center page-on-right page-on-left').addClass('page-on-center');\n oldPage.removeClass('page-from-center-to-left page-on-center page-on-right').addClass('page-on-left');\n if (dynamicNavbar) {\n newNavbarInner.removeClass('navbar-from-right-to-center navbar-on-left navbar-on-right').addClass('navbar-on-center');\n oldNavbarInner.removeClass('navbar-from-center-to-left navbar-on-center navbar-on-right').addClass('navbar-on-left');\n }\n app.pageAnimCallback('after', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'right',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n if (app.params.pushState && view.main) app.pushStateClearQueue();\n if (!(view.params.swipeBackPage || view.params.preloadPreviousPage)) {\n if (view.params.domCache) {\n oldPage.addClass('cached');\n if (dynamicNavbar) oldNavbarInner.addClass('cached');\n }\n else {\n if (!(url.indexOf('#') === 0 && newPage.attr('data-page').indexOf('smart-select-') === 0)) {\n app.pageRemoveCallback(view, oldPage[0], 'left');\n if (dynamicNavbar) app.navbarRemoveCallback(view, oldPage[0], navbar[0], oldNavbarInner[0]);\n app.router._remove(oldPage);\n if (dynamicNavbar) app.router._remove(oldNavbarInner);\n }\n }\n }\n if (view.params.uniqueHistory && historyBecameUnique) {\n view.refreshPreviousPage();\n }\n }\n if (animatePages) {\n // Set pages before animation\n if (app.params.material && app.params.materialPageLoadDelay) {\n setTimeout(function () {\n app.router.animatePages(oldPage, newPage, 'to-left', view);\n }, app.params.materialPageLoadDelay);\n }\n else {\n app.router.animatePages(oldPage, newPage, 'to-left', view);\n }\n \n // Dynamic navbar animation\n if (dynamicNavbar) {\n setTimeout(function() {\n app.router.animateNavbars(oldNavbarInner, newNavbarInner, 'to-left', view);\n }, 0);\n }\n newPage.animationEnd(function () {\n afterAnimation();\n });\n }\n else {\n if (dynamicNavbar) newNavbarInner.find('.sliding, .sliding .back .icon').transform('');\n afterAnimation();\n }\n \n };\n \n app.router.load = function (view, options) {\n options = options || {};\n if (app.routerPreOptions) {\n options = app.routerPreOptions(view, options) || {};\n }\n if (options.component && app.componentLoader) {\n try {\n app.componentLoader(view, options, function (newOptions) {\n app.router.load(view, newOptions);\n });\n } catch (e) {}\n return;\n }\n if (app.router.preroute(view, options)) {\n return false;\n }\n var url = options.url;\n var content = options.content;\n var pageName = options.pageName;\n var pageElement = options.pageElement;\n if (pageName) {\n if (pageName.indexOf('?') > 0) {\n options.query = $.parseUrlQuery(pageName);\n options.pageName = pageName = pageName.split('?')[0];\n }\n }\n var template = options.template;\n if (view.params.reloadPages === true) options.reload = true;\n \n if (!view.allowPageChange) return false;\n if (url && view.url === url && !options.reload && !view.params.allowDuplicateUrls) return false;\n view.allowPageChange = false;\n if (app.xhr && view.xhr && view.xhr === app.xhr) {\n app.xhr.abort();\n app.xhr = false;\n }\n function proceed(content) {\n app.router.preprocess(view, content, url, function (content) {\n options.content = content;\n app.router._load(view, options);\n });\n }\n if (content || pageName || pageElement) {\n proceed(content);\n return;\n }\n else if (template) {\n app.router._load(view, options);\n return;\n }\n \n if (!options.url || options.url === '#') {\n view.allowPageChange = true;\n return;\n }\n app.get(options.url, view, options.ignoreCache, function (content, error) {\n if (error) {\n view.allowPageChange = true;\n return;\n }\n proceed(content);\n });\n };\n \n app.router._back = function (view, options) {\n options = options || {};\n \n app.pluginHook('routerBack', view, options);\n \n var url = options.url,\n content = options.content,\n t7_rendered = {content: options.content}, // will be rendered using Template7\n template = options.template, // Template 7 compiled template\n animatePages = options.animatePages,\n preloadOnly = options.preloadOnly,\n pushState = options.pushState,\n ignoreCache = options.ignoreCache,\n force = options.force,\n pageName = options.pageName,\n pageElement = options.pageElement;\n \n var viewContainer = $(view.container),\n pagesContainer = $(view.pagesContainer),\n pagesInView = pagesContainer.children('.page:not(.cached)'),\n oldPage, newPage, oldNavbarInner, newNavbarInner, navbar, navbarInners, dynamicNavbar, manipulateDom = true;\n \n if (typeof animatePages === 'undefined') animatePages = view.params.animatePages;\n \n // Render with Template7\n if (app.params.template7Pages && typeof content === 'string' || template) {\n t7_rendered = app.router.template7Render(view, options);\n if (t7_rendered.content && !content) {\n content = t7_rendered.content;\n }\n }\n \n // Animation\n function afterAnimation() {\n app.pageBackCallback('after', view, {\n pageContainer: oldPage[0],\n url: url,\n position: 'center',\n oldPage: oldPage,\n newPage: newPage,\n });\n app.pageAnimCallback('after', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'left',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n app.router.afterBack(view, oldPage[0], newPage[0]);\n }\n function animateBack() {\n // Page before animation callback\n app.pageBackCallback('before', view, {\n pageContainer: oldPage[0],\n url: url,\n position: 'center',\n oldPage: oldPage,\n newPage: newPage,\n });\n app.pageAnimCallback('before', view, {\n pageContainer: newPage[0],\n url: url,\n position: 'left',\n oldPage: oldPage,\n newPage: newPage,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData\n });\n \n if (animatePages) {\n // Set pages before animation\n app.router.animatePages(newPage, oldPage, 'to-right', view);\n \n // Dynamic navbar animation\n if (dynamicNavbar) {\n setTimeout(function () {\n app.router.animateNavbars(newNavbarInner, oldNavbarInner, 'to-right', view);\n }, 0);\n }\n \n newPage.animationEnd(function () {\n afterAnimation();\n });\n }\n else {\n if (dynamicNavbar) newNavbarInner.find('.sliding, .sliding .back .icon').transform('');\n afterAnimation();\n }\n }\n \n function parseNewPage() {\n app.router.temporaryDom.innerHTML = '';\n // Parse DOM\n if ((typeof content === 'string') || (url && (typeof content === 'string'))) {\n app.router.temporaryDom.innerHTML = t7_rendered.content;\n } else {\n if ('length' in content && content.length > 1) {\n for (var ci = 0; ci < content.length; ci++) {\n $(app.router.temporaryDom).append(content[ci]);\n }\n } else {\n $(app.router.temporaryDom).append(content);\n }\n }\n if (pageElement) newPage = $(pageElement);\n else newPage = app.router.findElement('.page', app.router.temporaryDom, view);\n \n if (view.params.dynamicNavbar) {\n // Find navbar\n newNavbarInner = app.router.findElement('.navbar-inner', app.router.temporaryDom, view);\n }\n }\n function setPages() {\n // If pages not found or there are still more than one, exit\n if (!newPage || newPage.length === 0) {\n view.allowPageChange = true;\n return;\n }\n if (view.params.dynamicNavbar && typeof dynamicNavbar === 'undefined') {\n if (!newNavbarInner || newNavbarInner.length === 0) {\n dynamicNavbar = false;\n }\n else {\n dynamicNavbar = true;\n }\n }\n \n newPage.addClass('page-on-left').removeClass('cached');\n if (dynamicNavbar) {\n navbar = viewContainer.children('.navbar');\n navbarInners = navbar.find('.navbar-inner:not(.cached)');\n newNavbarInner.addClass('navbar-on-left').removeClass('cached');\n }\n // Remove/hide previous page in force mode\n if (force) {\n var pageToRemove, navbarToRemove;\n pageToRemove = $(pagesInView[pagesInView.length - 2]);\n \n if (dynamicNavbar) navbarToRemove = $(pageToRemove[0] && pageToRemove[0].f7RelatedNavbar || navbarInners[navbarInners.length - 2]);\n if (view.params.domCache && view.initialPages.indexOf(pageToRemove[0]) >= 0) {\n if (pageToRemove.length && pageToRemove[0] !== newPage[0]) pageToRemove.addClass('cached');\n if (dynamicNavbar && navbarToRemove.length && navbarToRemove[0] !== newNavbarInner[0]) {\n navbarToRemove.addClass('cached');\n }\n }\n else {\n var removeNavbar = dynamicNavbar && navbarToRemove.length;\n if (pageToRemove.length) {\n app.pageRemoveCallback(view, pageToRemove[0], 'right');\n if (removeNavbar) {\n app.navbarRemoveCallback(view, pageToRemove[0], navbar[0], navbarToRemove[0]);\n }\n app.router._remove(pageToRemove);\n if (removeNavbar) app.router._remove(navbarToRemove);\n }\n else if (removeNavbar) {\n app.navbarRemoveCallback(view, pageToRemove[0], navbar[0], navbarToRemove[0]);\n app.router._remove(navbarToRemove);\n }\n }\n pagesInView = pagesContainer.children('.page:not(.cached)');\n if (dynamicNavbar) {\n navbarInners = viewContainer.children('.navbar').find('.navbar-inner:not(.cached)');\n }\n if (view.history.indexOf(url) >= 0) {\n view.history = view.history.slice(0, view.history.indexOf(url) + 2);\n }\n else {\n if (view.history[[view.history.length - 2]]) {\n view.history[view.history.length - 2] = url;\n }\n else {\n view.history.unshift(url);\n }\n }\n }\n \n oldPage = $(pagesInView[pagesInView.length - 1]);\n if (view.params.domCache) {\n if (oldPage[0] === newPage[0]) {\n oldPage = pagesContainer.children('.page.page-on-center');\n if (oldPage.length === 0 && view.activePage) oldPage = $(view.activePage.container);\n }\n }\n \n if (dynamicNavbar && !oldNavbarInner) {\n oldNavbarInner = $(navbarInners[navbarInners.length - 1]);\n if (view.params.domCache) {\n if (oldNavbarInner[0] === newNavbarInner[0]) {\n oldNavbarInner = navbar.children('.navbar-inner.navbar-on-center:not(.cached)');\n }\n if (oldNavbarInner.length === 0) {\n oldNavbarInner = navbar.children('.navbar-inner[data-page=\"'+oldPage.attr('data-page')+'\"]');\n }\n }\n if (oldNavbarInner.length === 0 || newNavbarInner[0] === oldNavbarInner[0]) dynamicNavbar = false;\n }\n \n if (dynamicNavbar) {\n if (manipulateDom) newNavbarInner.insertBefore(oldNavbarInner);\n newNavbarInner[0].f7RelatedPage = newPage[0];\n newPage[0].f7RelatedNavbar = newNavbarInner[0];\n }\n if (manipulateDom) newPage.insertBefore(oldPage);\n \n // Page Init Events\n app.pageInitCallback(view, {\n pageContainer: newPage[0],\n url: url,\n position: 'left',\n navbarInnerContainer: dynamicNavbar ? newNavbarInner[0] : undefined,\n oldNavbarInnerContainer: dynamicNavbar ? oldNavbarInner && oldNavbarInner[0] : undefined,\n context: t7_rendered.context,\n query: options.query,\n fromPage: oldPage && oldPage.length && oldPage[0].f7PageData,\n preloadOnly: preloadOnly\n });\n if (dynamicNavbar) {\n app.navbarInitCallback(view, newPage[0], navbar[0], newNavbarInner[0], url, 'right');\n }\n \n if (dynamicNavbar && newNavbarInner.hasClass('navbar-on-left') && animatePages) {\n app.router.prepareNavbar(newNavbarInner, oldNavbarInner, 'left');\n }\n \n if (preloadOnly) {\n view.allowPageChange = true;\n return;\n }\n \n // Update View's URL\n view.url = url;\n \n // Force reLayout\n var clientLeft = newPage[0].clientLeft;\n \n animateBack();\n \n // Push state\n if (app.params.pushState && view.main) {\n if (typeof pushState === 'undefined') pushState = true;\n if (!preloadOnly && history.state && pushState) {\n history.back();\n }\n }\n return;\n }\n \n // Simple go back when we have pages on left\n if (pagesInView.length > 1 && !force) {\n // Exit if only preloadOnly\n if (preloadOnly) {\n view.allowPageChange = true;\n return;\n }\n // Update View's URL\n view.url = view.history[view.history.length - 2];\n url = view.url;\n \n // Define old and new pages\n newPage = $(pagesInView[pagesInView.length - 2]);\n oldPage = $(pagesInView[pagesInView.length - 1]);\n \n // Dynamic navbar\n if (view.params.dynamicNavbar) {\n dynamicNavbar = true;\n // Find navbar\n navbarInners = viewContainer.children('.navbar').find('.navbar-inner:not(.cached)');\n newNavbarInner = $(navbarInners[0]);\n oldNavbarInner = $(navbarInners[1]);\n if (newNavbarInner.length === 0 || oldNavbarInner.length === 0 || oldNavbarInner[0] === newNavbarInner[0]) {\n dynamicNavbar = false;\n }\n }\n manipulateDom = false;\n setPages();\n return;\n }\n \n if (!force) {\n // Go back when there is no pages on left\n if (!preloadOnly) {\n view.url = view.history[view.history.length - 2];\n url = view.url;\n }\n \n if (content) {\n parseNewPage();\n setPages();\n return;\n }\n else if (pageName) {\n // Get dom cached pages\n newPage = $(viewContainer).find('.page[data-page=\"' + pageName + '\"]');\n if (view.params.dynamicNavbar) {\n newNavbarInner = $(viewContainer).children('.navbar').find('.navbar-inner[data-page=\"' + pageName + '\"]');\n if (newNavbarInner.length === 0 && newPage[0].f7RelatedNavbar) {\n newNavbarInner = $(newPage[0].f7RelatedNavbar);\n }\n if (newNavbarInner.length === 0 && newPage[0].f7PageData) {\n newNavbarInner = $(newPage[0].f7PageData.navbarInnerContainer);\n }\n }\n setPages();\n return;\n }\n else if (url && url in view.pageElementsCache) {\n newPage = view.pageElementsCache[url].page;\n newNavbarInner = view.pageElementsCache[url].navbarInner;\n setPages();\n return;\n }\n else {\n view.allowPageChange = true;\n return;\n }\n }\n else {\n if (url && url === view.url || pageName && view.activePage && view.activePage.name === pageName) {\n view.allowPageChange = true;\n return;\n }\n // Go back with force url\n if (content) {\n parseNewPage();\n setPages();\n return;\n }\n else if (pageName && view.params.domCache) {\n if (pageName) url = '#' + pageName;\n \n newPage = $(viewContainer).find('.page[data-page=\"' + pageName + '\"]');\n if (newPage[0].f7PageData && newPage[0].f7PageData.url) {\n url = newPage[0].f7PageData.url;\n }\n if (view.params.dynamicNavbar) {\n newNavbarInner = $(viewContainer).children('.navbar').find('.navbar-inner[data-page=\"' + pageName + '\"]');\n if (newNavbarInner.length === 0 && newPage[0].f7RelatedNavbar) {\n newNavbarInner = $(newPage[0].f7RelatedNavbar);\n }\n if (newNavbarInner.length === 0 && newPage[0].f7PageData) {\n newNavbarInner = $(newPage[0].f7PageData.navbarInnerContainer);\n }\n }\n setPages();\n return;\n }\n else if (pageElement && url) {\n newPage = $(pageElement);\n if (view.params.dynamicNavbar) {\n newNavbarInner = newPage.find('.navbar-inner').filter(function (index, el) {\n return $(el).parents(app.router._modalsSelector).length === 0;\n });\n if (newNavbarInner.length > 0) {\n newPage.prepend(newNavbarInner);\n app.router._remove(newPage.find('.navbar').filter(function (index, el) {\n return $(el).parents(app.router._modalsSelector).length === 0;\n }));\n }\n }\n setPages();\n return;\n }\n else {\n view.allowPageChange = true;\n return;\n }\n }\n \n };\n app.router.back = function (view, options) {\n options = options || {};\n if (app.routerPreOptions) {\n options = app.routerPreOptions(view, options) || {};\n }\n if (options.component && app.componentLoader) {\n try {\n app.componentLoader(view, options, function (newOptions) {\n app.router.load(view, newOptions);\n });\n } catch (e) {}\n return;\n }\n if (app.router.preroute(view, options, true)) {\n return false;\n }\n var url = options.url;\n var content = options.content;\n var pageName = options.pageName;\n var pageElement = options.pageElement;\n if (pageName) {\n if (pageName.indexOf('?') > 0) {\n options.query = $.parseUrlQuery(pageName);\n options.pageName = pageName = pageName.split('?')[0];\n }\n }\n var force = options.force;\n if (!view.allowPageChange) return false;\n view.allowPageChange = false;\n if (app.xhr && view.xhr && view.xhr === app.xhr) {\n app.xhr.abort();\n app.xhr = false;\n }\n var pagesInView = $(view.pagesContainer).find('.page:not(.cached)');\n \n function proceed(content) {\n app.router.preprocess(view, content, url, function (content) {\n options.content = content;\n app.router._back(view, options);\n });\n }\n if (pagesInView.length > 1 && !force) {\n // Simple go back to previos page in view\n app.router._back(view, options);\n return;\n }\n if (!force) {\n url = view.history[view.history.length - 2] || options.url;\n if (!options.url) options.url = url;\n if (!url) {\n view.allowPageChange = true;\n return;\n }\n if (url.indexOf('#') === 0 && view.contentCache[url]) {\n proceed(view.contentCache[url]);\n return;\n }\n else if (url.indexOf('#') === 0 && view.params.domCache) {\n if (!pageName) options.pageName = url.split('#')[1];\n proceed();\n return;\n }\n else if (url && url in view.pageElementsCache) {\n proceed();\n }\n else if (url.indexOf('#') !== 0) {\n // Load ajax page\n app.get(options.url, view, options.ignoreCache, function (content, error) {\n if (error) {\n view.allowPageChange = true;\n return;\n }\n proceed(content);\n });\n return;\n }\n }\n else {\n // Go back with force url\n if (!url && content) {\n proceed(content);\n return;\n }\n else if (!url && pageName) {\n if (pageName) url = '#' + pageName;\n proceed();\n return;\n }\n else if (url && pageElement) {\n proceed();\n return;\n }\n else if (url) {\n app.get(options.url, view, options.ignoreCache, function (content, error) {\n if (error) {\n view.allowPageChange = true;\n return;\n }\n proceed(content);\n });\n return;\n }\n }\n view.allowPageChange = true;\n return;\n };\n \n app.router.afterBack = function (view, oldPage, newPage) {\n // Remove old page and set classes on new one\n oldPage = $(oldPage);\n newPage = $(newPage);\n \n if (view.params.domCache && view.initialPages.indexOf(oldPage[0]) >= 0) {\n oldPage.removeClass('page-from-center-to-right').addClass('cached');\n }\n else {\n app.pageRemoveCallback(view, oldPage[0], 'right');\n app.router._remove(oldPage);\n }\n \n newPage.removeClass('page-from-left-to-center page-on-left').addClass('page-on-center');\n view.allowPageChange = true;\n \n // Update View's History\n var previousURL = view.history.pop();\n \n var newNavbar;\n \n // Updated dynamic navbar\n if (view.params.dynamicNavbar) {\n var inners = $(view.container).children('.navbar').find('.navbar-inner:not(.cached)');\n var oldNavbar = $(oldPage[0].f7RelatedNavbar || inners[1]);\n if (view.params.domCache && view.initialNavbars.indexOf(oldNavbar[0]) >= 0) {\n oldNavbar.removeClass('navbar-from-center-to-right').addClass('cached');\n }\n else {\n app.navbarRemoveCallback(view, oldPage[0], undefined, oldNavbar[0]);\n app.router._remove(oldNavbar);\n }\n newNavbar = $(inners[0]).removeClass('navbar-on-left navbar-from-left-to-center').addClass('navbar-on-center');\n }\n \n // Remove pages in dom cache\n if (view.params.domCache) {\n $(view.container).find('.page.cached').each(function () {\n var page = $(this);\n var pageUrl = page[0].f7PageData && page[0].f7PageData.url;\n if (pageUrl && view.history.indexOf(pageUrl) < 0 && view.initialPages.indexOf(this) < 0) {\n app.pageRemoveCallback(view, page[0], 'right');\n if (page[0].f7RelatedNavbar && view.params.dynamicNavbar) app.navbarRemoveCallback(view, page[0], undefined, page[0].f7RelatedNavbar);\n app.router._remove(page);\n if (page[0].f7RelatedNavbar && view.params.dynamicNavbar) app.router._remove(page[0].f7RelatedNavbar);\n }\n });\n }\n \n // Check previous page is content based only and remove it from content cache\n if (!view.params.domCache &&\n previousURL &&\n previousURL.indexOf('#') > -1 &&\n (previousURL in view.contentCache) &&\n // If the same page is in the history multiple times, don't remove it.\n view.history.indexOf(previousURL) === -1) {\n view.contentCache[previousURL] = null;\n delete view.contentCache[previousURL];\n }\n if (previousURL &&\n (previousURL in view.pageElementsCache) &&\n // If the same page is in the history multiple times, don't remove it.\n view.history.indexOf(previousURL) === -1) {\n view.pageElementsCache[previousURL] = null;\n delete view.pageElementsCache[previousURL];\n }\n // Check for context cache\n if (previousURL &&\n (previousURL in view.contextCache) &&\n // If the same page is in the history multiple times, don't remove it.\n view.history.indexOf(previousURL) === -1) {\n view.contextCache[previousURL] = null;\n delete view.contextCache[previousURL];\n }\n \n if (app.params.pushState && view.main) app.pushStateClearQueue();\n \n // Preload previous page\n if (view.params.preloadPreviousPage) {\n if (view.params.domCache && view.history.length > 1) {\n var preloadUrl = view.history[view.history.length - 2];\n var previousPage;\n var previousNavbar;\n if (preloadUrl && view.pagesCache[preloadUrl]) {\n // Load by page name\n previousPage = $(view.container).find('.page[data-page=\"' + view.pagesCache[preloadUrl] + '\"]');\n if (previousPage.next('.page')[0] !== newPage[0]) previousPage.insertBefore(newPage);\n if (newNavbar) {\n previousNavbar = $(view.container).children('.navbar').find('.navbar-inner[data-page=\"' + view.pagesCache[preloadUrl] + '\"]');\n if(!previousNavbar || previousNavbar.length === 0) previousNavbar = newNavbar.prev('.navbar-inner.cached');\n if (previousNavbar.next('.navbar-inner')[0] !== newNavbar[0]) previousNavbar.insertBefore(newNavbar);\n }\n }\n else {\n // Just load previous page\n previousPage = newPage.prev('.page.cached');\n if (newNavbar) previousNavbar = newNavbar.prev('.navbar-inner.cached');\n }\n if (previousPage && previousPage.length > 0) previousPage.removeClass('cached page-on-right page-on-center').addClass('page-on-left');\n if (previousNavbar && previousNavbar.length > 0) previousNavbar.removeClass('cached navbar-on-right navbar-on-center').addClass('navbar-on-left');\n }\n else {\n app.router.back(view, {preloadOnly: true});\n }\n }\n };\n \n\n /*======================================================\n ************ Modals ************\n ======================================================*/\n var _modalTemplateTempDiv = document.createElement('div');\n app.modalStack = [];\n app.modalStackClearQueue = function () {\n if (app.modalStack.length) {\n (app.modalStack.shift())();\n }\n };\n app.modal = function (params) {\n params = params || {};\n var modalHTML = '';\n if (app.params.modalTemplate) {\n if (!app._compiledTemplates.modal) app._compiledTemplates.modal = t7.compile(app.params.modalTemplate);\n modalHTML = app._compiledTemplates.modal(params);\n }\n else {\n var buttonsHTML = '';\n if (params.buttons && params.buttons.length > 0) {\n for (var i = 0; i < params.buttons.length; i++) {\n buttonsHTML += '' + params.buttons[i].text + '';\n }\n }\n var titleHTML = params.title ? '
                                  ' + params.title + '
                                  ' : '';\n var textHTML = params.text ? '
                                  ' + params.text + '
                                  ' : '';\n var afterTextHTML = params.afterText ? params.afterText : '';\n var noButtons = !params.buttons || params.buttons.length === 0 ? 'modal-no-buttons' : '';\n var verticalButtons = params.verticalButtons ? 'modal-buttons-vertical': '';\n var modalButtonsHTML = params.buttons && params.buttons.length > 0 ? '
                                  ' + buttonsHTML + '
                                  ' : '';\n modalHTML = '
                                  ' + (titleHTML + textHTML + afterTextHTML) + '
                                  ' + modalButtonsHTML + '
                                  ';\n }\n \n _modalTemplateTempDiv.innerHTML = modalHTML;\n \n var modal = $(_modalTemplateTempDiv).children();\n \n app.root.append(modal[0]);\n \n // Add events on buttons\n modal.find('.modal-button').each(function (index, el) {\n $(el).on('click', function (e) {\n if (params.buttons[index].close !== false) app.closeModal(modal);\n if (params.buttons[index].onClick) params.buttons[index].onClick(modal, e);\n if (params.onClick) params.onClick(modal, index);\n });\n });\n app.openModal(modal);\n return modal[0];\n };\n app.alert = function (text, title, callbackOk) {\n if (typeof title === 'function') {\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n buttons: [ {text: app.params.modalButtonOk, bold: true, onClick: callbackOk} ]\n });\n };\n app.confirm = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n buttons: [\n {text: app.params.modalButtonCancel, onClick: callbackCancel},\n {text: app.params.modalButtonOk, bold: true, onClick: callbackOk}\n ]\n });\n };\n app.prompt = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n afterText: '
                                  ',\n buttons: [\n {\n text: app.params.modalButtonCancel\n },\n {\n text: app.params.modalButtonOk,\n bold: true\n }\n ],\n onClick: function (modal, index) {\n if (index === 0 && callbackCancel) callbackCancel($(modal).find('.modal-text-input').val());\n if (index === 1 && callbackOk) callbackOk($(modal).find('.modal-text-input').val());\n }\n });\n };\n app.modalLogin = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n afterText: '
                                  ',\n buttons: [\n {\n text: app.params.modalButtonCancel\n },\n {\n text: app.params.modalButtonOk,\n bold: true\n }\n ],\n onClick: function (modal, index) {\n var username = $(modal).find('.modal-text-input[name=\"modal-username\"]').val();\n var password = $(modal).find('.modal-text-input[name=\"modal-password\"]').val();\n if (index === 0 && callbackCancel) callbackCancel(username, password);\n if (index === 1 && callbackOk) callbackOk(username, password);\n }\n });\n };\n app.modalPassword = function (text, title, callbackOk, callbackCancel) {\n if (typeof title === 'function') {\n callbackCancel = arguments[2];\n callbackOk = arguments[1];\n title = undefined;\n }\n return app.modal({\n text: text || '',\n title: typeof title === 'undefined' ? app.params.modalTitle : title,\n afterText: '
                                  ',\n buttons: [\n {\n text: app.params.modalButtonCancel\n },\n {\n text: app.params.modalButtonOk,\n bold: true\n }\n ],\n onClick: function (modal, index) {\n var password = $(modal).find('.modal-text-input[name=\"modal-password\"]').val();\n if (index === 0 && callbackCancel) callbackCancel(password);\n if (index === 1 && callbackOk) callbackOk(password);\n }\n });\n };\n app.showPreloader = function (title) {\n return app.modal({\n title: title || app.params.modalPreloaderTitle,\n text: '
                                  ' + (app.params.material ? app.params.materialPreloaderHtml : '') + '
                                  ',\n cssClass: 'modal-preloader'\n });\n };\n app.hidePreloader = function () {\n app.closeModal('.modal-preloader');\n };\n app.showIndicator = function () {\n if ($('.preloader-indicator-overlay').length > 0) return;\n app.root.append('
                                  ' + (app.params.material ? app.params.materialPreloaderHtml : '') + '
                                  ');\n };\n app.hideIndicator = function () {\n $('.preloader-indicator-overlay, .preloader-indicator-modal').remove();\n };\n // Action Sheet\n app.actions = function (target, params, animated) {\n var toPopover = false, modal, groupSelector, buttonSelector;\n if (arguments.length === 1 || arguments.length === 2 && typeof arguments[1] === 'boolean') {\n // Actions\n params = arguments[0];\n animated = arguments[1];\n }\n else {\n // Popover\n if (app.device.ios) {\n if (app.device.ipad) toPopover = true;\n }\n else {\n if (app.width >= 768) toPopover = true;\n }\n }\n if (typeof animated === 'undefined') animated = true;\n \n params = params || [];\n \n if (params.length > 0 && !Array.isArray(params[0])) {\n params = [params];\n }\n var modalHTML;\n if (toPopover) {\n var actionsToPopoverTemplate = app.params.modalActionsToPopoverTemplate ||\n '
                                  ' +\n '
                                  ' +\n '{{#each this}}' +\n '
                                  ' +\n '
                                    ' +\n '{{#each this}}' +\n '{{#if label}}' +\n '
                                  • {{text}}
                                  • ' +\n '{{else}}' +\n '
                                  • {{text}}
                                  • ' +\n '{{/if}}' +\n '{{/each}}' +\n '
                                  ' +\n '
                                  ' +\n '{{/each}}' +\n '
                                  ' +\n '
                                  ';\n if (!app._compiledTemplates.actionsToPopover) {\n app._compiledTemplates.actionsToPopover = t7.compile(actionsToPopoverTemplate);\n }\n var popoverHTML = app._compiledTemplates.actionsToPopover(params);\n modal = $(app.popover(popoverHTML, target, true, animated));\n groupSelector = '.list-block ul';\n buttonSelector = '.list-button';\n }\n else {\n if (app.params.modalActionsTemplate) {\n if (!app._compiledTemplates.actions) app._compiledTemplates.actions = t7.compile(app.params.modalActionsTemplate);\n modalHTML = app._compiledTemplates.actions(params);\n }\n else {\n var buttonsHTML = '';\n for (var i = 0; i < params.length; i++) {\n for (var j = 0; j < params[i].length; j++) {\n if (j === 0) buttonsHTML += '
                                  ';\n var button = params[i][j];\n var buttonClass = button.label ? 'actions-modal-label' : 'actions-modal-button';\n if (button.bold) buttonClass += ' actions-modal-button-bold';\n if (button.color) buttonClass += ' color-' + button.color;\n if (button.bg) buttonClass += ' bg-' + button.bg;\n if (button.disabled) buttonClass += ' disabled';\n buttonsHTML += '
                                  ' + button.text + '
                                  ';\n if (j === params[i].length - 1) buttonsHTML += '
                                  ';\n }\n }\n modalHTML = '
                                  ' + buttonsHTML + '
                                  ';\n }\n _modalTemplateTempDiv.innerHTML = modalHTML;\n modal = $(_modalTemplateTempDiv).children();\n app.root.append(modal[0]);\n groupSelector = '.actions-modal-group';\n buttonSelector = '.actions-modal-button';\n }\n \n var groups = modal.find(groupSelector);\n groups.each(function (index, el) {\n var groupIndex = index;\n $(el).children().each(function (index, el) {\n var buttonIndex = index;\n var buttonParams = params[groupIndex][buttonIndex];\n var clickTarget;\n if (!toPopover && $(el).is(buttonSelector)) clickTarget = $(el);\n if (toPopover && $(el).find(buttonSelector).length > 0) clickTarget = $(el).find(buttonSelector);\n \n if (clickTarget) {\n clickTarget.on('click', function (e) {\n if (buttonParams.close !== false) app.closeModal(modal);\n if (buttonParams.onClick) buttonParams.onClick(modal, e);\n });\n }\n });\n });\n if (!toPopover) app.openModal(modal, animated);\n return modal[0];\n };\n app.popover = function (modal, target, removeOnClose, animated, closeByOutside) {\n if (typeof removeOnClose === 'undefined') removeOnClose = true;\n if (typeof closeByOutside === 'undefined') closeByOutside = true;\n if (typeof animated === 'undefined') animated = true;\n if (typeof modal === 'string' && modal.indexOf('<') >= 0) {\n var _modal = document.createElement('div');\n _modal.innerHTML = modal.trim();\n if (_modal.childNodes.length > 0) {\n modal = _modal.childNodes[0];\n if (removeOnClose) modal.classList.add('remove-on-close');\n if (!closeByOutside) modal.classList.add('ignore-close-by-outside');\n app.root.append(modal);\n }\n else return false; //nothing found\n }\n modal = $(modal);\n target = $(target);\n if (modal.length === 0 || target.length === 0) return false;\n if (modal.parents('body').length === 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n if (!closeByOutside) modal.addClass.add('ignore-close-by-outside');\n app.root.append(modal[0]);\n }\n if (modal.find('.popover-angle').length === 0 && !app.params.material) {\n modal.append('
                                  ');\n }\n modal.show();\n \n var material = app.params.material;\n \n function sizePopover() {\n modal.css({left: '', top: ''});\n var modalWidth = modal.width();\n var modalHeight = modal.height(); // 13 - height of angle\n var modalAngle, modalAngleSize = 0, modalAngleLeft, modalAngleTop;\n if (!material) {\n modalAngle = modal.find('.popover-angle');\n modalAngleSize = modalAngle.width() / 2;\n modalAngle.removeClass('on-left on-right on-top on-bottom').css({left: '', top: ''});\n }\n else {\n modal.removeClass('popover-on-left popover-on-right popover-on-top popover-on-bottom').css({left: '', top: ''});\n }\n \n var targetWidth = target.outerWidth();\n var targetHeight = target.outerHeight();\n var targetOffset = target.offset();\n var targetOffsetLeft = targetOffset.left - app.left;\n var targetOffsetTop = targetOffset.top - app.top;\n var targetParentPage = target.parents('.page');\n if (targetParentPage.length > 0) {\n targetOffsetTop = targetOffsetTop - targetParentPage[0].scrollTop;\n }\n \n var modalTop = 0;\n var modalLeft = 0;\n var diff = 0;\n // Top Position\n var modalPosition = material ? 'bottom' : 'top';\n if (material) {\n if (modalHeight < app.height - targetOffsetTop - targetHeight) {\n // On bottom\n modalPosition = 'bottom';\n modalTop = targetOffsetTop;\n }\n else if (modalHeight < targetOffsetTop) {\n // On top\n modalTop = targetOffsetTop - modalHeight + targetHeight;\n modalPosition = 'top';\n }\n else {\n // On middle\n modalPosition = 'bottom';\n modalTop = targetOffsetTop;\n }\n \n if (modalTop <= 0) {\n modalTop = 8;\n }\n else if (modalTop + modalHeight >= app.height) {\n modalTop = app.height - modalHeight - 8;\n }\n \n // Horizontal Position\n modalLeft = targetOffsetLeft;\n if (modalLeft + modalWidth >= app.width - 8) {\n modalLeft = targetOffsetLeft + targetWidth - modalWidth - 8;\n }\n if (modalLeft < 8) {\n modalLeft = 8;\n }\n if (modalPosition === 'top') {\n modal.addClass('popover-on-top');\n }\n if (modalPosition === 'bottom') {\n modal.addClass('popover-on-bottom');\n }\n if (target.hasClass('floating-button-to-popover') && !modal.hasClass('modal-in')) {\n modal.addClass('popover-floating-button');\n var diffX = (modalLeft + modalWidth / 2) - (targetOffsetLeft + targetWidth / 2),\n diffY = (modalTop + modalHeight / 2) - (targetOffsetTop + targetHeight / 2);\n target\n .addClass('floating-button-to-popover-in')\n .transform('translate3d(' + diffX + 'px, ' + diffY + 'px,0)')\n .transitionEnd(function (e) {\n if (!target.hasClass('floating-button-to-popover-in')) return;\n target\n .addClass('floating-button-to-popover-scale')\n .transform('translate3d(' + diffX + 'px, ' + diffY + 'px,0) scale(' + (modalWidth/targetWidth) + ', ' + (modalHeight/targetHeight) + ')');\n });\n \n modal.once('popover:close', function () {\n target\n .removeClass('floating-button-to-popover-in floating-button-to-popover-scale')\n .addClass('floating-button-to-popover-out')\n .transform('')\n .transitionEnd(function (e) {\n target.removeClass('floating-button-to-popover-out');\n });\n });\n modal.once('popover:closed', function () {\n modal.removeClass('popover-floating-button');\n });\n }\n else if (target.hasClass('floating-button-to-popover') && modal.hasClass('modal-in')) {\n modalLeft = targetOffsetLeft;\n modalTop = targetOffsetTop;\n }\n \n }\n else {\n if ((modalHeight + modalAngleSize) < targetOffsetTop) {\n // On top\n modalTop = targetOffsetTop - modalHeight - modalAngleSize;\n }\n else if ((modalHeight + modalAngleSize) < app.height - targetOffsetTop - targetHeight) {\n // On bottom\n modalPosition = 'bottom';\n modalTop = targetOffsetTop + targetHeight + modalAngleSize;\n }\n else {\n // On middle\n modalPosition = 'middle';\n modalTop = targetHeight / 2 + targetOffsetTop - modalHeight / 2;\n diff = modalTop;\n if (modalTop <= 0) {\n modalTop = 5;\n }\n else if (modalTop + modalHeight >= app.height) {\n modalTop = app.height - modalHeight - 5;\n }\n diff = diff - modalTop;\n }\n \n // Horizontal Position\n if (modalPosition === 'top' || modalPosition === 'bottom') {\n modalLeft = targetWidth / 2 + targetOffsetLeft - modalWidth / 2;\n diff = modalLeft;\n if (modalLeft < 5) modalLeft = 5;\n if (modalLeft + modalWidth > app.width) modalLeft = app.width - modalWidth - 5;\n if (modalPosition === 'top') {\n modalAngle.addClass('on-bottom');\n }\n if (modalPosition === 'bottom') {\n modalAngle.addClass('on-top');\n }\n diff = diff - modalLeft;\n modalAngleLeft = (modalWidth / 2 - modalAngleSize + diff);\n modalAngleLeft = Math.max(Math.min(modalAngleLeft, modalWidth - modalAngleSize * 2 - 13), 13);\n modalAngle.css({left: modalAngleLeft + 'px'});\n \n }\n else if (modalPosition === 'middle') {\n modalLeft = targetOffsetLeft - modalWidth - modalAngleSize;\n modalAngle.addClass('on-right');\n if (modalLeft < 5 || (modalLeft + modalWidth > app.width)) {\n if (modalLeft < 5) modalLeft = targetOffsetLeft + targetWidth + modalAngleSize;\n if (modalLeft + modalWidth > app.width) modalLeft = app.width - modalWidth - 5;\n modalAngle.removeClass('on-right').addClass('on-left');\n }\n modalAngleTop = (modalHeight / 2 - modalAngleSize + diff);\n modalAngleTop = Math.max(Math.min(modalAngleTop, modalHeight - modalAngleSize * 2 - 13), 13);\n modalAngle.css({top: modalAngleTop + 'px'});\n }\n }\n \n \n // Apply Styles\n modal.css({top: modalTop + 'px', left: modalLeft + 'px'});\n }\n \n sizePopover();\n \n app.onResize(sizePopover);\n \n modal.on('popover:close', function () {\n app.offResize(sizePopover);\n });\n \n app.openModal(modal, animated);\n return modal[0];\n };\n app.popup = function (modal, removeOnClose, animated) {\n if (typeof removeOnClose === 'undefined') removeOnClose = true;\n if (typeof animated === 'undefined') animated = true;\n if (typeof modal === 'string' && modal.indexOf('<') >= 0) {\n var _modal = document.createElement('div');\n _modal.innerHTML = modal.trim();\n if (_modal.childNodes.length > 0) {\n modal = _modal.childNodes[0];\n if (removeOnClose) modal.classList.add('remove-on-close');\n app.root.append(modal);\n }\n else return false; //nothing found\n }\n modal = $(modal);\n if (modal.length === 0) return false;\n if (modal.parents('body').length === 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n app.root.append(modal[0]);\n }\n modal.show();\n \n app.openModal(modal, animated);\n return modal[0];\n };\n app.pickerModal = function (modal, removeOnClose, animated) {\n if (typeof removeOnClose === 'undefined') removeOnClose = true;\n if (typeof animated === 'undefined') animated = true;\n if (typeof modal === 'string' && modal.indexOf('<') >= 0) {\n modal = $(modal);\n if (modal.length > 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n app.root.append(modal[0]);\n }\n else return false; //nothing found\n }\n modal = $(modal);\n if (modal.length === 0) return false;\n if (modal.parents('body').length === 0) {\n if (removeOnClose) modal.addClass('remove-on-close');\n app.root.append(modal[0]);\n }\n if ($('.picker-modal.modal-in:not(.modal-out)').length > 0 && !modal.hasClass('modal-in')) {\n app.closeModal('.picker-modal.modal-in:not(.modal-out)');\n }\n modal.show();\n app.openModal(modal, animated);\n return modal[0];\n };\n app.loginScreen = function (modal, animated) {\n if (!modal) modal = '.login-screen';\n if (typeof animated === 'undefined') animated = true;\n modal = $(modal);\n if (modal.length === 0) return false;\n if ($('.login-screen.modal-in:not(.modal-out)').length > 0 && !modal.hasClass('modal-in')) {\n app.closeModal('.login-screen.modal-in:not(.modal-out)');\n }\n modal.show();\n \n app.openModal(modal, animated);\n return modal[0];\n };\n app.openModal = function (modal, animated) {\n if (typeof animated === 'undefined') animated = true;\n modal = $(modal);\n modal[animated ? 'removeClass' : 'addClass']('not-animated');\n \n var isModal = modal.hasClass('modal');\n var isPopover = modal.hasClass('popover');\n var isPopup = modal.hasClass('popup');\n var isLoginScreen = modal.hasClass('login-screen');\n var isPickerModal = modal.hasClass('picker-modal');\n var isActions = modal.hasClass('actions-modal');\n \n // Modal Event Prefix\n var modalType = 'modal';\n if (isPopover) modalType = 'popover';\n if (isPopup) modalType = 'popup';\n if (isLoginScreen) modalType = 'loginscreen';\n if (isPickerModal) modalType = 'picker';\n if (isActions) modalType = 'actions';\n \n if ($('.modal.modal-in:not(.modal-out)').length && app.params.modalStack && isModal) {\n app.modalStack.push(function () {\n app.openModal(modal);\n });\n return;\n }\n \n // do nothing if this modal already shown\n if (true === modal.data('f7-modal-shown')) {\n return;\n }\n modal.data('f7-modal-shown', true);\n \n // Move modal\n var modalParent = modal.parent();\n if (app.params.modalsMoveToRoot && !modalParent.is(app.root)) {\n app.root.append(modal);\n modal.once(modalType + ':closed', function() {\n modalParent.append(modal);\n });\n }\n \n modal.once(modalType + ':close', function() {\n modal.removeData('f7-modal-shown');\n });\n \n if (isModal) {\n modal.show();\n modal.css({\n marginTop: - Math.round(modal.outerHeight() / 2) + 'px'\n });\n }\n \n var overlay;\n if (!isLoginScreen && !isPickerModal) {\n if ($('.modal-overlay').length === 0 && !isPopup) {\n app.root.append('
                                  ');\n }\n if ($('.popup-overlay').length === 0 && isPopup) {\n app.root.append('
                                  ');\n }\n overlay = isPopup ? $('.popup-overlay') : $('.modal-overlay');\n }\n if (app.params.material && isPickerModal) {\n if (modal.hasClass('picker-calendar')) {\n if ($('.picker-modal-overlay').length === 0 && !isPopup) {\n app.root.append('
                                  ');\n }\n overlay = $('.picker-modal-overlay');\n }\n }\n if (overlay) {\n overlay[animated ? 'removeClass' : 'addClass']('not-animated');\n }\n \n //Make sure that styles are applied, trigger relayout;\n var clientLeft = modal[0].clientLeft;\n \n // Trugger open event\n modal.trigger('open ' + modalType + ':open');\n \n // Picker modal body class\n if (isPickerModal) {\n $('body').addClass('with-picker-modal');\n }\n \n // Init Pages and Navbars in modal\n if (modal.find('.' + app.params.viewClass).length > 0) {\n modal.find('.page').each(function () {\n app.initPageWithCallback(this);\n });\n modal.find('.navbar').each(function () {\n app.initNavbarWithCallback(this);\n });\n }\n \n // Classes for transition in\n if (!isLoginScreen && !isPickerModal) overlay.addClass('modal-overlay-visible');\n if (app.params.material && isPickerModal && overlay) overlay.addClass('modal-overlay-visible');\n if (animated) {\n modal.removeClass('modal-out').addClass('modal-in').transitionEnd(function (e) {\n if (modal.hasClass('modal-out')) modal.trigger('closed ' + modalType + ':closed');\n else modal.trigger('opened ' + modalType + ':opened');\n });\n }\n else {\n modal.removeClass('modal-out').addClass('modal-in');\n modal.trigger('opened ' + modalType + ':opened');\n }\n return true;\n };\n app.closeModal = function (modal, animated) {\n if (typeof animated === 'undefined') animated = true;\n modal = $(modal || '.modal-in');\n if (typeof modal !== 'undefined' && modal.length === 0) {\n return;\n }\n modal[animated ? 'removeClass' : 'addClass']('not-animated');\n var isModal = modal.hasClass('modal');\n var isPopover = modal.hasClass('popover');\n var isPopup = modal.hasClass('popup');\n var isLoginScreen = modal.hasClass('login-screen');\n var isPickerModal = modal.hasClass('picker-modal');\n var isActions = modal.hasClass('actions-modal');\n \n // Modal Event Prefix\n var modalType = 'modal';\n if (isPopover) modalType = 'popover';\n if (isPopup) modalType = 'popup';\n if (isLoginScreen) modalType = 'loginscreen';\n if (isPickerModal) modalType = 'picker';\n if (isActions) modalType = 'actions';\n \n var removeOnClose = modal.hasClass('remove-on-close');\n \n // ignore close popover\n if (isPopover && !removeOnClose && modal.hasClass('ignore-close-by-outside')) {\n \treturn;\n }\n \n // For Actions\n var keepOnClose = modal.hasClass('keep-on-close');\n \n var overlay;\n \n if (isPopup) overlay = $('.popup-overlay');\n else {\n if (isPickerModal && app.params.material) overlay = $('.picker-modal-overlay');\n else if (!isPickerModal) overlay = $('.modal-overlay');\n }\n \n if (isPopup){\n if (modal.length === $('.popup.modal-in').length) {\n overlay.removeClass('modal-overlay-visible');\n }\n }\n else if (overlay && overlay.length > 0) {\n overlay.removeClass('modal-overlay-visible');\n }\n if (overlay) overlay[animated ? 'removeClass' : 'addClass']('not-animated');\n \n modal.trigger('close ' + modalType + ':close');\n \n // Picker modal body class\n if (isPickerModal) {\n $('body').removeClass('with-picker-modal');\n $('body').addClass('picker-modal-closing');\n }\n \n if (!(isPopover && !app.params.material)) {\n if (animated) {\n modal.removeClass('modal-in').addClass('modal-out').transitionEnd(function (e) {\n if (modal.hasClass('modal-out')) modal.trigger('closed ' + modalType + ':closed');\n else {\n modal.trigger('opened ' + modalType + ':opened');\n if (isPopover) return;\n }\n \n if (isPickerModal) {\n $('body').removeClass('picker-modal-closing');\n }\n if (isPopup || isLoginScreen || isPickerModal || isPopover) {\n modal.removeClass('modal-out').hide();\n if (removeOnClose && modal.length > 0) {\n modal.remove();\n }\n }\n else if (!keepOnClose) {\n modal.remove();\n }\n });\n }\n else {\n modal.trigger('closed ' + modalType + ':closed');\n modal.removeClass('modal-in modal-out');\n if (isPickerModal) {\n $('body').removeClass('picker-modal-closing');\n }\n if (isPopup || isLoginScreen || isPickerModal || isPopover) {\n modal.hide();\n if (removeOnClose && modal.length > 0) {\n modal.remove();\n }\n }\n else if (!keepOnClose) {\n modal.remove();\n }\n }\n if (isModal && app.params.modalStack) {\n app.modalStackClearQueue();\n }\n }\n else {\n modal.removeClass('modal-in modal-out not-animated').trigger('closed ' + modalType + ':closed').hide();\n if (removeOnClose) {\n modal.remove();\n }\n }\n return true;\n };\n \n\n /*===============================================================================\n ************ Progress Bar ************\n ===============================================================================*/\n app.setProgressbar = function (container, progress, speed) {\n container = $(container || app.root);\n if (container.length === 0) return;\n if (progress) progress = Math.min(Math.max(progress, 0), 100);\n var progressbar;\n if (container.hasClass('progressbar')) progressbar = container;\n else {\n progressbar = container.children('.progressbar');\n }\n if (progressbar.length === 0 || progressbar.hasClass('progressbar-infinite')) return;\n var clientLeft = progressbar[0].clientLeft;\n progressbar.children('span').transform('translate3d(' + (-100 + progress) + '%,0,0)');\n if (typeof speed !== 'undefined') {\n progressbar.children('span').transition(speed);\n }\n else {\n progressbar.children('span').transition('');\n }\n return progressbar[0];\n };\n app.showProgressbar = function (container, progress, color) {\n if (typeof container === 'number') {\n container = app.root;\n progress = arguments[0];\n color = arguments[1];\n }\n if (progress && typeof progress === 'string' && parseFloat(progress) !== progress * 1) {\n color = progress;\n progress = undefined;\n }\n container = $(container || app.root);\n if (container.length === 0) return;\n var progressbar;\n if (container.hasClass('progressbar')) progressbar = container;\n else {\n progressbar = container.children('.progressbar:not(.progressbar-out), .progressbar-infinite:not(.progressbar-out)');\n if (progressbar.length === 0) {\n // Create one\n if (typeof progress !== 'undefined') {\n // Determined\n progressbar = $('');\n }\n else {\n // Infinite\n progressbar = $('');\n }\n container.append(progressbar);\n }\n }\n if (progress) app.setProgressbar(container, progress);\n return progressbar[0];\n };\n app.hideProgressbar = function (container) {\n container = $(container || app.root);\n if (container.length === 0) return;\n var progressbar;\n if (container.hasClass('progressbar')) progressbar = container;\n else {\n progressbar = container.children('.progressbar, .progressbar-infinite');\n }\n if (progressbar.length === 0 || !progressbar.hasClass('progressbar-in') || progressbar.hasClass('progressbar-out')) return;\n progressbar.removeClass('progressbar-in').addClass('progressbar-out').animationEnd(function () {\n progressbar.remove();\n progressbar = null;\n });\n return;\n };\n app.initPageProgressbar = function (pageContainer) {\n pageContainer = $(pageContainer);\n pageContainer.find('.progressbar').each(function () {\n var p = $(this);\n if (p.children('span').length === 0) p.append('');\n if (p.attr('data-progress')) app.setProgressbar(p, p.attr('data-progress'));\n });\n };\n\n /*======================================================\n ************ Panels ************\n ======================================================*/\n app.allowPanelOpen = true;\n app.openPanel = function (panelPosition, animated) {\n if (typeof animated === 'undefined') animated = true;\n if (!app.allowPanelOpen) return false;\n var panel = $('.panel-' + panelPosition);\n if (panel.length === 0 || panel.hasClass('active') || panel.hasClass('panel-visible-by-breakpoint')) return false;\n app.closePanel(); // Close if some panel is opened\n app.allowPanelOpen = false;\n var effect = panel.hasClass('panel-reveal') ? 'reveal' : 'cover';\n panel[animated ? 'removeClass' : 'addClass']('not-animated');\n panel.css({display: 'block'}).addClass('active');\n panel.trigger('open panel:open');\n \n var panelOverlay = $('.panel-overlay');\n panelOverlay[animated ? 'removeClass' : 'addClass']('not-animated');\n panelOverlay.show();\n \n if (panel.find('.' + app.params.viewClass).length > 0) {\n if (app.sizeNavbars) app.sizeNavbars(panel.find('.' + app.params.viewClass)[0]);\n }\n \n // Trigger reLayout\n var clientLeft = panel[0].clientLeft;\n \n // Transition End;\n var transitionEndTarget = effect === 'reveal' ? $('.' + app.params.viewsClass) : panel;\n \n function panelTransitionEnd() {\n transitionEndTarget.transitionEnd(function (e) {\n if ($(e.target).is(transitionEndTarget)) {\n if (panel.hasClass('active')) {\n panel.trigger('opened panel:opened');\n }\n else {\n panel.trigger('closed panel:closed');\n }\n panelOverlay.css({display: ''});\n app.allowPanelOpen = true;\n }\n else panelTransitionEnd();\n });\n }\n if (animated) {\n panelTransitionEnd();\n }\n else {\n panel.trigger('opened panel:opened');\n panelOverlay.css({display: ''});\n app.allowPanelOpen = true;\n }\n \n $('body').addClass('with-panel-' + panelPosition + '-' + effect);\n return true;\n };\n app.closePanel = function (animated) {\n if (typeof animated === 'undefined') animated = true;\n var activePanel = $('.panel.active');\n if (activePanel.length === 0 || activePanel.hasClass('panel-visible-by-breakpoint')) return false;\n var effect = activePanel.hasClass('panel-reveal') ? 'reveal' : 'cover';\n var panelPosition = activePanel.hasClass('panel-left') ? 'left' : 'right';\n activePanel[animated ? 'removeClass' : 'addClass']('not-animated');\n activePanel.removeClass('active');\n \n var panelOverlay = $('.panel-overlay');\n panelOverlay.removeClass('not-animated');\n \n var transitionEndTarget = effect === 'reveal' ? $('.' + app.params.viewsClass) : activePanel;\n activePanel.trigger('close panel:close');\n app.allowPanelOpen = false;\n if (animated) {\n transitionEndTarget.transitionEnd(function () {\n if (activePanel.hasClass('active')) return;\n activePanel.css({display: ''});\n activePanel.trigger('closed panel:closed');\n $('body').removeClass('panel-closing');\n app.allowPanelOpen = true;\n });\n $('body').addClass('panel-closing').removeClass('with-panel-' + panelPosition + '-' + effect);\n }\n else {\n activePanel.css({display: ''});\n activePanel.trigger('closed panel:closed');\n activePanel.removeClass('not-animated');\n $('body').removeClass('with-panel-' + panelPosition + '-' + effect);\n app.allowPanelOpen = true;\n }\n };\n /*======================================================\n ************ Panels breakpoints ************\n ======================================================*/\n app.initPanelsBreakpoints = function () {\n var panelLeft = $('.panel-left');\n var panelRight = $('.panel-right');\n var views = app.root.children('.views');\n var wasVisible;\n function setPanels() {\n // Left Panel\n if (app.params.panelLeftBreakpoint && panelLeft.length > 0) {\n wasVisible = panelLeft.hasClass('panel-visible-by-breakpoint');\n if (app.width >= app.params.panelLeftBreakpoint) {\n if (!wasVisible) {\n $('body').removeClass('with-panel-left-reveal with-panel-left-cover');\n panelLeft.css('display', '').addClass('panel-visible-by-breakpoint').removeClass('active');\n panelLeft.trigger('open panel:open opened panel:opened');\n views.css({\n 'margin-left': panelLeft.width() + 'px'\n });\n app.allowPanelOpen = true;\n }\n }\n else {\n if (wasVisible) {\n panelLeft.css('display', '').removeClass('panel-visible-by-breakpoint active');\n panelLeft.trigger('close panel:close closed panel:closed');\n views.css({\n 'margin-left': ''\n });\n app.allowPanelOpen = true;\n }\n }\n }\n // Right Panel\n if (app.params.panelRightBreakpoint && panelRight.length > 0) {\n wasVisible = panelRight.hasClass('panel-visible-by-breakpoint');\n if (app.width >= app.params.panelRightBreakpoint) {\n if (!wasVisible) {\n $('body').removeClass('with-panel-right-reveal with-panel-right-cover');\n panelRight.css('display', '').addClass('panel-visible-by-breakpoint').removeClass('active');\n panelRight.trigger('open panel:open opened panel:opened');\n views.css({\n 'margin-right': panelRight.width() + 'px'\n });\n app.allowPanelOpen = true;\n }\n }\n else {\n if (wasVisible) {\n panelRight.css('display', '').removeClass('panel-visible-by-breakpoint active');\n panelRight.trigger('close panel:close closed panel:closed');\n views.css({\n 'margin-right': ''\n });\n app.allowPanelOpen = true;\n }\n }\n }\n }\n app.onResize(setPanels);\n setPanels();\n };\n /*======================================================\n ************ Swipe panels ************\n ======================================================*/\n app.initSwipePanels = function () {\n var panel, side;\n if (app.params.swipePanel) {\n panel = $('.panel.panel-' + app.params.swipePanel);\n side = app.params.swipePanel;\n if (panel.length === 0 && side !== 'both') return;\n }\n else {\n if (app.params.swipePanelOnlyClose) {\n if ($('.panel').length === 0) return;\n }\n else return;\n }\n \n var panelOverlay = $('.panel-overlay');\n var isTouched, isMoved, isScrolling, touchesStart = {}, touchStartTime, touchesDiff, translate, overlayOpacity, opened, panelWidth, effect, direction;\n var views = $('.' + app.params.viewsClass);\n \n function handleTouchStart(e) {\n if (!app.allowPanelOpen || (!app.params.swipePanel && !app.params.swipePanelOnlyClose) || isTouched) return;\n if ($('.modal-in, .photo-browser-in').length > 0) return;\n if (!(app.params.swipePanelCloseOpposite || app.params.swipePanelOnlyClose)) {\n if ($('.panel.active').length > 0 && !panel.hasClass('active')) return;\n }\n if (e.target && e.target.nodeName.toLowerCase() === 'input' && e.target.type === 'range') return;\n if ($(e.target).closest('.tabs-swipeable-wrap').length > 0) return;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n if (app.params.swipePanelCloseOpposite || app.params.swipePanelOnlyClose) {\n if ($('.panel.active').length > 0) {\n side = $('.panel.active').hasClass('panel-left') ? 'left' : 'right';\n }\n else {\n if (app.params.swipePanelOnlyClose) return;\n side = app.params.swipePanel;\n }\n if (!side) return;\n }\n panel = $('.panel.panel-' + side);\n opened = panel.hasClass('active');\n if (app.params.swipePanelActiveArea && !opened) {\n if (side === 'left') {\n if (touchesStart.x > app.params.swipePanelActiveArea) return;\n }\n if (side === 'right') {\n if (touchesStart.x < app.width - app.params.swipePanelActiveArea) return;\n }\n }\n isMoved = false;\n isTouched = true;\n isScrolling = undefined;\n \n touchStartTime = (new Date()).getTime();\n direction = undefined;\n }\n function handleTouchMove(e) {\n if (!isTouched) return;\n if (e.f7PreventPanelSwipe) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (isScrolling) {\n isTouched = false;\n return;\n }\n if (!direction) {\n if (pageX > touchesStart.x) {\n direction = 'to-right';\n }\n else {\n direction = 'to-left';\n }\n \n if(side === 'both'){\n if ($('.panel.active').length > 0) {\n side = $('.panel.active').hasClass('panel-left') ? 'left' : 'right';\n }\n else {\n side = direction === 'to-right' ? 'left' : 'right';\n }\n if (app.params.swipePanelActiveArea > 0) {\n if (side === 'left' && touchesStart.x > app.params.swipePanelActiveArea) {\n isTouched = false;\n return;\n }\n if (side === 'right' && touchesStart.x < app.width - app.params.swipePanelActiveArea) {\n isTouched = false;\n return;\n }\n }\n panel = $('.panel.panel-' + side);\n }\n if (panel.hasClass('panel-visible-by-breakpoint')) {\n isTouched = false;\n return;\n }\n \n if (\n side === 'left' &&\n (\n direction === 'to-left' && !panel.hasClass('active')\n ) ||\n side === 'right' &&\n (\n direction === 'to-right' && !panel.hasClass('active')\n )\n )\n {\n isTouched = false;\n return;\n }\n }\n \n if (app.params.swipePanelNoFollow) {\n var timeDiff = (new Date()).getTime() - touchStartTime;\n if (timeDiff < 300) {\n if (direction === 'to-left') {\n if (side === 'right') app.openPanel(side);\n if (side === 'left' && panel.hasClass('active')) app.closePanel();\n }\n if (direction === 'to-right') {\n if (side === 'left') app.openPanel(side);\n if (side === 'right' && panel.hasClass('active')) app.closePanel();\n }\n }\n isTouched = false;\n isMoved = false;\n return;\n }\n \n if (!isMoved) {\n effect = panel.hasClass('panel-cover') ? 'cover' : 'reveal';\n if (!opened) {\n panel.show();\n panelOverlay.show();\n }\n panelWidth = panel[0].offsetWidth;\n panel.transition(0);\n if (panel.find('.' + app.params.viewClass).length > 0) {\n if (app.sizeNavbars) app.sizeNavbars(panel.find('.' + app.params.viewClass)[0]);\n }\n }\n \n isMoved = true;\n \n e.preventDefault();\n var threshold = opened ? 0 : -app.params.swipePanelThreshold;\n if (side === 'right') threshold = -threshold;\n \n touchesDiff = pageX - touchesStart.x + threshold;\n \n if (side === 'right') {\n if (effect === 'cover') {\n translate = touchesDiff + (opened ? 0 : panelWidth);\n if (translate < 0) translate = 0;\n if (translate > panelWidth) {\n translate = panelWidth;\n }\n }\n else {\n translate = touchesDiff - (opened ? panelWidth : 0);\n if (translate > 0) translate = 0;\n if (translate < -panelWidth) {\n translate = -panelWidth;\n }\n }\n }\n else {\n translate = touchesDiff + (opened ? panelWidth : 0);\n if (translate < 0) translate = 0;\n if (translate > panelWidth) {\n translate = panelWidth;\n }\n }\n if (effect === 'reveal') {\n views.transform('translate3d(' + translate + 'px,0,0)').transition(0);\n panelOverlay.transform('translate3d(' + translate + 'px,0,0)').transition(0);\n \n panel.trigger('panel:swipe', {progress: Math.abs(translate / panelWidth)});\n app.pluginHook('swipePanelSetTransform', views[0], panel[0], Math.abs(translate / panelWidth));\n }\n else {\n if (side === 'left') translate = translate - panelWidth;\n panel.transform('translate3d(' + (translate) + 'px,0,0)').transition(0);\n \n panelOverlay.transition(0);\n overlayOpacity = 1 - Math.abs(translate/panelWidth);\n panelOverlay.css({opacity: overlayOpacity});\n \n panel.trigger('panel:swipe', {progress: Math.abs(translate / panelWidth)});\n app.pluginHook('swipePanelSetTransform', views[0], panel[0], Math.abs(translate / panelWidth));\n }\n }\n function handleTouchEnd(e) {\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n isTouched = false;\n isMoved = false;\n var timeDiff = (new Date()).getTime() - touchStartTime;\n var action;\n var edge = (translate === 0 || Math.abs(translate) === panelWidth);\n \n if (!opened) {\n if (effect === 'cover') {\n if (translate === 0) {\n action = 'swap'; //open\n }\n else if (timeDiff < 300 && Math.abs(translate) > 0) {\n action = 'swap'; //open\n }\n else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) {\n action = 'swap'; //open\n }\n else {\n action = 'reset'; //close\n }\n }\n else {\n if (translate === 0) {\n action = 'reset';\n }\n else if (\n timeDiff < 300 && Math.abs(translate) > 0 ||\n timeDiff >= 300 && (Math.abs(translate) >= panelWidth / 2)\n ) {\n action = 'swap';\n }\n else {\n action = 'reset';\n }\n }\n }\n else {\n if (effect === 'cover') {\n if (translate === 0) {\n action = 'reset'; //open\n }\n else if (timeDiff < 300 && Math.abs(translate) > 0) {\n action = 'swap'; //open\n }\n else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) {\n action = 'reset'; //open\n }\n else {\n action = 'swap'; //close\n }\n }\n else {\n if (translate === -panelWidth) {\n action = 'reset';\n }\n else if (\n timeDiff < 300 && Math.abs(translate) >= 0 ||\n timeDiff >= 300 && (Math.abs(translate) <= panelWidth / 2)\n ) {\n if (side === 'left' && translate === panelWidth) action = 'reset';\n else action = 'swap';\n }\n else {\n action = 'reset';\n }\n }\n }\n if (action === 'swap') {\n app.allowPanelOpen = true;\n if (opened) {\n app.closePanel();\n if (edge) {\n panel.css({display: ''});\n $('body').removeClass('panel-closing');\n }\n }\n else {\n app.openPanel(side);\n }\n if (edge) app.allowPanelOpen = true;\n }\n if (action === 'reset') {\n if (opened) {\n app.allowPanelOpen = true;\n app.openPanel(side);\n }\n else {\n app.closePanel();\n if (edge) {\n app.allowPanelOpen = true;\n panel.css({display: ''});\n }\n else {\n var target = effect === 'reveal' ? views : panel;\n panel.trigger('close panel:close');\n $('body').addClass('panel-closing');\n target.transitionEnd(function () {\n if (panel.hasClass('active')) return;\n panel.trigger('close panel:closed');\n panel.css({display: ''});\n $('body').removeClass('panel-closing');\n app.allowPanelOpen = true;\n });\n }\n }\n }\n if (effect === 'reveal') {\n views.transition('');\n views.transform('');\n }\n panel.transition('').transform('');\n panelOverlay.css({display: ''}).transform('').transition('').css('opacity', '');\n }\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n $(document).on(app.touchEvents.start, handleTouchStart, passiveListener);\n $(document).on(app.touchEvents.move, handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, handleTouchEnd, passiveListener);\n };\n \n\n /*======================================================\n ************ Image Lazy Loading ************\n ************ Based on solution by Marc Godard, https://github.com/MarcGodard ************\n ======================================================*/\n app.initImagesLazyLoad = function (pageContainer) {\n pageContainer = $(pageContainer);\n \n // Lazy images\n var lazyLoadImages;\n if (pageContainer.hasClass('lazy')) {\n lazyLoadImages = pageContainer;\n pageContainer = lazyLoadImages.parents('.page');\n }\n else {\n lazyLoadImages = pageContainer.find('.lazy');\n }\n if (lazyLoadImages.length === 0) return;\n \n // Scrollable page content\n var pageContent;\n if (pageContainer.hasClass('page-content')) {\n pageContent = pageContainer;\n pageContainer = pageContainer.parents('.page');\n }\n else {\n pageContent = pageContainer.find('.page-content');\n }\n if (pageContent.length === 0) return;\n \n // Placeholder\n var placeholderSrc = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEXCwsK592mkAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\n if (typeof app.params.imagesLazyLoadPlaceholder === 'string') {\n placeholderSrc = app.params.imagesLazyLoadPlaceholder;\n }\n if (app.params.imagesLazyLoadPlaceholder !== false) lazyLoadImages.each(function(){\n if ($(this).attr('data-src') && !$(this).attr('src')) $(this).attr('src', placeholderSrc);\n });\n \n // load image\n var imagesSequence = [];\n var imageIsLoading = false;\n function loadImage(el) {\n el = $(el);\n \n var bg = el.attr('data-background');\n var src = bg ? bg : el.attr('data-src');\n if (!src) return;\n \n function onLoad() {\n el.removeClass('lazy').addClass('lazy-loaded');\n if (bg) {\n el.css('background-image', 'url(' + src + ')');\n }\n else {\n el.attr('src', src);\n }\n \n if (app.params.imagesLazyLoadSequential) {\n imageIsLoading = false;\n if (imagesSequence.length > 0) {\n loadImage(imagesSequence.shift());\n }\n }\n el.trigger('lazy-loaded');\n if (app.params.onLazyLoaded) app.params.onLazyLoaded(el);\n }\n \n function onError() {\n el.removeClass('lazy').addClass('lazy-loaded');\n if (bg) {\n el.css('background-image', 'url(' + placeholderSrc + ')');\n }\n else {\n el.attr('src', placeholderSrc);\n }\n \n if (app.params.imagesLazyLoadSequential) {\n imageIsLoading = false;\n if (imagesSequence.length > 0) {\n loadImage(imagesSequence.shift());\n }\n }\n el.trigger('lazy-error');\n if (app.params.onLazyError) app.params.onLazyError(el);\n }\n \n if (app.params.imagesLazyLoadSequential) {\n if (imageIsLoading) {\n if (imagesSequence.indexOf(el[0]) < 0) imagesSequence.push(el[0]);\n return;\n }\n }\n \n // Loading flag\n imageIsLoading = true;\n \n var image = new Image();\n image.onload = onLoad;\n image.onerror = onError;\n image.src =src;\n \n // Add loaded callback and events\n el.trigger('lazy-load');\n if (app.params.onLazyLoad && !el.hasClass('lazy-loaded')) app.params.onLazyLoad(el);\n }\n function lazyHandler() {\n lazyLoadImages = pageContainer.find('.lazy');\n lazyLoadImages.each(function(index, el) {\n el = $(el);\n if (el.parents('.tab:not(.active)').length > 0) {\n return;\n }\n if (isElementInViewport(el[0])) {\n loadImage(el);\n }\n });\n }\n \n function isElementInViewport (el) {\n var rect = el.getBoundingClientRect();\n var threshold = app.params.imagesLazyLoadThreshold || 0;\n return (\n rect.top >= (0 - threshold) &&\n rect.left >= (0 - threshold) &&\n rect.top <= (app.height + threshold) &&\n rect.left <= (app.width + threshold)\n );\n }\n \n function attachEvents(destroy) {\n var method = destroy ? 'off' : 'on';\n lazyLoadImages[method]('lazy', lazyHandler);\n lazyLoadImages.parents('.tab')[method]('show', lazyHandler);\n pageContainer[method]('lazy', lazyHandler);\n pageContent[method]('lazy', lazyHandler);\n pageContent[method]('scroll', lazyHandler);\n app[method === 'on' ? 'onResize' : 'offResize'](lazyHandler);\n }\n function detachEvents() {\n attachEvents(true);\n }\n \n // Store detach function\n pageContainer[0].f7DestroyImagesLazyLoad = detachEvents;\n \n // Attach events\n attachEvents();\n \n // Destroy on page remove\n if (pageContainer.hasClass('page')) {\n pageContainer.once('page:beforeremove', detachEvents);\n }\n \n // Run loader on page load/init\n lazyHandler();\n \n // Run after page animation\n pageContainer.once('page:afteranimation', lazyHandler);\n };\n app.destroyImagesLazyLoad = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length > 0 && pageContainer[0].f7DestroyImagesLazyLoad) {\n pageContainer[0].f7DestroyImagesLazyLoad();\n }\n };\n app.reinitImagesLazyLoad = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length > 0) {\n pageContainer.trigger('lazy');\n }\n };\n \n\n /*======================================================\n ************ Material Preloader ************\n ======================================================*/\n app.initPageMaterialPreloader = function (pageContainer) {\n $(pageContainer).find('.preloader').each(function () {\n if ($(this).children().length === 0) {\n $(this).html(app.params.materialPreloaderHtml);\n }\n });\n };\n\n /*======================================================\n ************ Messages ************\n ======================================================*/\n var Messages = function (container, params) {\n var defaults = {\n autoLayout: true,\n newMessagesFirst: false,\n scrollMessages: true,\n scrollMessagesOnlyOnEdge: false,\n messageTemplate:\n '{{#if day}}' +\n '
                                  {{day}} {{#if time}}, {{time}}{{/if}}
                                  ' +\n '{{/if}}' +\n '
                                  ' +\n '{{#if name}}
                                  {{name}}
                                  {{/if}}' +\n '
                                  {{text}}{{#if date}}
                                  {{date}}
                                  {{/if}}
                                  ' +\n '{{#if avatar}}
                                  {{/if}}' +\n '{{#if label}}
                                  {{label}}
                                  {{/if}}' +\n '
                                  '\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined' || params[def] === null) {\n params[def] = defaults[def];\n }\n }\n \n // Instance\n var m = this;\n \n // Params\n m.params = params;\n \n // Container\n m.container = $(container);\n if (m.container.length === 0) return;\n \n // Autolayout\n if (m.params.autoLayout) m.container.addClass('messages-auto-layout');\n \n // New messages first\n if (m.params.newMessagesFirst) m.container.addClass('messages-new-first');\n \n // Is In Page\n m.pageContainer = m.container.parents('.page').eq(0);\n m.pageContent = m.pageContainer.find('.page-content');\n \n // Compiled template\n m.template = Template7.compile(m.params.messageTemplate);\n \n // Auto Layout\n m.layout = function () {\n if (!m.container.hasClass('messages-auto-layout')) m.container.addClass('messages-auto-layout');\n m.container.find('.message').each(function () {\n var message = $(this);\n if (message.find('.message-text img').length > 0) {\n var childNodes = message.find('.message-text')[0].childNodes;\n var onlyPic = true;\n for (var i = 0 ; i < childNodes.length; i++) {\n if (childNodes[i].nodeType === 1 && childNodes[i].nodeName.toLowerCase() !== 'img') onlyPic = false;\n if (childNodes[i].nodeType === 3 && childNodes[i].textContent.trim() !== '') onlyPic = false;\n }\n if (onlyPic) message.addClass('message-pic');\n else message.removeClass('message-pic');\n }\n if (message.find('.message-avatar').length > 0) message.addClass('message-with-avatar');\n });\n m.container.find('.message').each(function () {\n var message = $(this);\n var isSent = message.hasClass('message-sent');\n var next = message.next('.message-' + (isSent ? 'sent' : 'received'));\n var prev = message.prev('.message-' + (isSent ? 'sent' : 'received'));\n if (next.length === 0) {\n message.addClass('message-last message-with-tail');\n }\n else message.removeClass('message-last message-with-tail');\n \n if (prev.length === 0) {\n message.addClass('message-first');\n }\n else message.removeClass('message-first');\n \n if (prev.length > 0 && prev.find('.message-name').length > 0 && message.find('.message-name').length > 0) {\n if (prev.find('.message-name').text() !== message.find('.message-name').text()) {\n prev.addClass('message-last message-with-tail');\n message.addClass('message-first');\n }\n }\n });\n };\n \n // Add Message\n m.appendMessage = function (props, animate) {\n return m.addMessage(props, 'append', animate);\n };\n m.prependMessage = function (props, animate) {\n return m.addMessage(props, 'prepend', animate);\n };\n m.addMessage = function (props, method, animate) {\n return m.addMessages([props], method, animate);\n };\n m.addMessages = function (newMessages, method, animate) {\n if (typeof animate === 'undefined') {\n animate = true;\n }\n if (typeof method === 'undefined') {\n method = m.params.newMessagesFirst ? 'prepend' : 'append';\n }\n var newMessagesHTML = '', i;\n for (i = 0; i < newMessages.length; i++) {\n var props = newMessages[i] || {};\n props.type = props.type || 'sent';\n if (!props.text) continue;\n props.hasImage = props.text.indexOf('= 0;\n if (props.onlyImage === false) props.hasImage = false;\n if (animate) props.position = method === 'append' ? 'bottom' : 'top';\n \n newMessagesHTML += m.template(props);\n }\n var scrollHeightBefore = m.pageContent[0].scrollHeight,\n heightBefore = m.pageContent[0].offsetHeight,\n scrollBefore = m.pageContent[0].scrollTop;\n m.container[method](newMessagesHTML);\n if (m.params.autoLayout) m.layout();\n if (method === 'prepend') {\n m.pageContent[0].scrollTop = scrollBefore + (m.pageContent[0].scrollHeight - scrollHeightBefore);\n }\n if (m.params.scrollMessages && (method === 'append' && !m.params.newMessagesFirst) || (method === 'prepend' && m.params.newMessagesFirst)) {\n if (m.params.scrollMessagesOnlyOnEdge) {\n var onEdge = false;\n if (m.params.newMessagesFirst) {\n if (scrollBefore === 0) onEdge = true;\n }\n else {\n if (scrollBefore - (scrollHeightBefore - heightBefore) >= -10) onEdge = true;\n }\n if (onEdge) m.scrollMessages(animate ? undefined : 0);\n }\n else m.scrollMessages(animate ? undefined : 0);\n }\n var messages = m.container.find('.message');\n if (newMessages.length === 1) {\n return method === 'append' ? messages[messages.length - 1] : messages[0];\n }\n else {\n var messagesToReturn = [];\n if (method === 'append') {\n for (i = messages.length - newMessages.length; i < messages.length; i++) {\n messagesToReturn.push(messages[i]);\n }\n }\n else {\n for (i = 0; i < newMessages.length; i++) {\n messagesToReturn.push(messages[i]);\n }\n }\n return messagesToReturn;\n }\n \n };\n m.removeMessage = function (message) {\n message = $(message);\n if (message.length === 0) {\n return false;\n }\n else {\n message.remove();\n if (m.params.autoLayout) m.layout();\n return true;\n }\n };\n m.removeMessages = function (messages) {\n m.removeMessage(messages);\n };\n m.clean = function () {\n m.container.html('');\n };\n \n // Scroll\n m.scrollMessages = function (duration, scrollTop) {\n if (typeof duration === 'undefined') duration = 400;\n var currentScroll = m.pageContent[0].scrollTop;\n var newScroll;\n if (typeof scrollTop !== 'undefined') newScroll = scrollTop;\n else {\n newScroll = m.params.newMessagesFirst ? 0 : m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight;\n if (newScroll === currentScroll) return;\n }\n m.pageContent.scrollTop(newScroll, duration);\n };\n \n // Init Destroy\n m.init = function () {\n if (m.params.messages) {\n m.addMessages(m.params.messages, undefined, false);\n }\n else {\n if (m.params.autoLayout) m.layout();\n m.scrollMessages(0);\n }\n \n };\n m.destroy = function () {\n m = null;\n };\n \n // Init\n m.init();\n \n m.container[0].f7Messages = m;\n return m;\n };\n app.messages = function (container, params) {\n return new Messages (container, params);\n };\n app.initPageMessages = function (pageContainer) {\n pageContainer = $(pageContainer);\n var messages = pageContainer.find('.messages');\n if (messages.length === 0) return;\n if (!messages.hasClass('messages-init')) {\n return;\n }\n var m = app.messages(messages, messages.dataset());\n \n // Destroy on page remove\n function pageBeforeRemove() {\n m.destroy();\n pageContainer.off('page:beforeremove', pageBeforeRemove);\n }\n if (pageContainer.hasClass('page')) {\n pageContainer.on('page:beforeremove', pageBeforeRemove);\n }\n };\n \n\n /*===============================================================================\n ************ Swipeout Actions (Swipe to delete) ************\n ===============================================================================*/\n app.swipeoutOpenedEl = undefined;\n app.allowSwipeout = true;\n app.initSwipeout = function (swipeoutEl) {\n var isTouched, isMoved, isScrolling, touchesStart = {}, touchStartTime, touchesDiff, swipeOutEl, swipeOutContent, actionsRight, actionsLeft, actionsLeftWidth, actionsRightWidth, translate, opened, openedActions, buttonsLeft, buttonsRight, direction, overswipeLeftButton, overswipeRightButton, overswipeLeft, overswipeRight, noFoldLeft, noFoldRight;\n \n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n \n $(document).on(app.touchEvents.start, function (e) {\n if (app.swipeoutOpenedEl) {\n var target = $(e.target);\n if (!(\n app.swipeoutOpenedEl.is(target[0]) ||\n target.parents('.swipeout').is(app.swipeoutOpenedEl) ||\n target.hasClass('modal-in') ||\n target.hasClass('modal-overlay') ||\n target.hasClass('actions-modal') || \n target.parents('.actions-modal.modal-in, .modal.modal-in').length > 0\n )) {\n app.swipeoutClose(app.swipeoutOpenedEl);\n }\n }\n }, activeListener);\n \n function handleTouchStart(e) {\n if (!app.allowSwipeout) return;\n isMoved = false;\n isTouched = true;\n isScrolling = undefined;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n }\n function handleTouchMove(e) {\n if (!isTouched) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (isScrolling) {\n isTouched = false;\n return;\n }\n \n if (!isMoved) {\n if ($('.list-block.sortable-opened').length > 0) return;\n /*jshint validthis:true */\n swipeOutEl = $(this);\n swipeOutContent = swipeOutEl.find('.swipeout-content');\n actionsRight = swipeOutEl.find('.swipeout-actions-right');\n actionsLeft = swipeOutEl.find('.swipeout-actions-left');\n actionsLeftWidth = actionsRightWidth = buttonsLeft = buttonsRight = overswipeRightButton = overswipeLeftButton = null;\n noFoldLeft = actionsLeft.hasClass('swipeout-actions-no-fold') || app.params.swipeoutActionsNoFold;\n noFoldRight = actionsRight.hasClass('swipeout-actions-no-fold') || app.params.swipeoutActionsNoFold;\n if (actionsLeft.length > 0) {\n actionsLeftWidth = actionsLeft.outerWidth();\n buttonsLeft = actionsLeft.children('a');\n overswipeLeftButton = actionsLeft.find('.swipeout-overswipe');\n }\n if (actionsRight.length > 0) {\n actionsRightWidth = actionsRight.outerWidth();\n buttonsRight = actionsRight.children('a');\n overswipeRightButton = actionsRight.find('.swipeout-overswipe');\n }\n opened = swipeOutEl.hasClass('swipeout-opened');\n if (opened) {\n openedActions = swipeOutEl.find('.swipeout-actions-left.swipeout-actions-opened').length > 0 ? 'left' : 'right';\n }\n swipeOutEl.removeClass('transitioning');\n if (!app.params.swipeoutNoFollow) {\n swipeOutEl.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened');\n swipeOutEl.removeClass('swipeout-opened');\n }\n }\n isMoved = true;\n e.preventDefault();\n \n touchesDiff = pageX - touchesStart.x;\n translate = touchesDiff;\n \n if (opened) {\n if (openedActions === 'right') translate = translate - actionsRightWidth;\n else translate = translate + actionsLeftWidth;\n }\n \n if (translate > 0 && actionsLeft.length === 0 || translate < 0 && actionsRight.length === 0) {\n if (!opened) {\n isTouched = isMoved = false;\n swipeOutContent.transform('');\n if (buttonsRight && buttonsRight.length > 0) {\n buttonsRight.transform('');\n }\n if (buttonsLeft && buttonsLeft.length > 0) {\n buttonsLeft.transform('');\n }\n return;\n }\n translate = 0;\n }\n \n if (translate < 0) direction = 'to-left';\n else if (translate > 0) direction = 'to-right';\n else {\n if (!direction) direction = 'to-left';\n }\n \n var i, buttonOffset, progress;\n \n e.f7PreventPanelSwipe = true;\n if (app.params.swipeoutNoFollow) {\n if (opened) {\n if (openedActions === 'right' && touchesDiff > 0) {\n app.swipeoutClose(swipeOutEl);\n }\n if (openedActions === 'left' && touchesDiff < 0) {\n app.swipeoutClose(swipeOutEl);\n }\n }\n else {\n if (touchesDiff < 0 && actionsRight.length > 0) {\n app.swipeoutOpen(swipeOutEl, 'right');\n }\n if (touchesDiff > 0 && actionsLeft.length > 0) {\n app.swipeoutOpen(swipeOutEl, 'left');\n }\n }\n isTouched = false;\n isMoved = false;\n return;\n }\n overswipeLeft = false;\n overswipeRight = false;\n var $button;\n if (actionsRight.length > 0) {\n // Show right actions\n progress = translate / actionsRightWidth;\n if (translate < -actionsRightWidth) {\n translate = -actionsRightWidth - Math.pow(-translate - actionsRightWidth, 0.8);\n if (overswipeRightButton.length > 0) {\n overswipeRight = true;\n }\n }\n for (i = 0; i < buttonsRight.length; i++) {\n if (typeof buttonsRight[i]._buttonOffset === 'undefined') {\n buttonsRight[i]._buttonOffset = buttonsRight[i].offsetLeft;\n }\n buttonOffset = buttonsRight[i]._buttonOffset;\n $button = $(buttonsRight[i]);\n if (overswipeRightButton.length > 0 && $button.hasClass('swipeout-overswipe')) {\n $button.css({left: (overswipeRight ? -buttonOffset : 0) + 'px'});\n if (overswipeRight) {\n $button.addClass('swipeout-overswipe-active');\n }\n else {\n $button.removeClass('swipeout-overswipe-active'); \n }\n }\n $button.transform('translate3d(' + (translate - buttonOffset * (1 + Math.max(progress, -1))) + 'px,0,0)');\n }\n }\n if (actionsLeft.length > 0) {\n // Show left actions\n progress = translate / actionsLeftWidth;\n if (translate > actionsLeftWidth) {\n translate = actionsLeftWidth + Math.pow(translate - actionsLeftWidth, 0.8);\n if (overswipeLeftButton.length > 0) {\n overswipeLeft = true;\n }\n }\n for (i = 0; i < buttonsLeft.length; i++) {\n if (typeof buttonsLeft[i]._buttonOffset === 'undefined') {\n buttonsLeft[i]._buttonOffset = actionsLeftWidth - buttonsLeft[i].offsetLeft - buttonsLeft[i].offsetWidth;\n }\n buttonOffset = buttonsLeft[i]._buttonOffset;\n $button = $(buttonsLeft[i]);\n if (overswipeLeftButton.length > 0 && $button.hasClass('swipeout-overswipe')) {\n $button.css({left: (overswipeLeft ? buttonOffset : 0) + 'px'});\n if (overswipeLeft) {\n $button.addClass('swipeout-overswipe-active');\n }\n else {\n $button.removeClass('swipeout-overswipe-active'); \n }\n }\n if (buttonsLeft.length > 1) {\n $button.css('z-index', buttonsLeft.length - i); \n }\n $button.transform('translate3d(' + (translate + buttonOffset * (1 - Math.min(progress, 1))) + 'px,0,0)');\n }\n }\n swipeOutContent.transform('translate3d(' + translate + 'px,0,0)');\n }\n function handleTouchEnd(e) {\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n \n isTouched = false;\n isMoved = false;\n var timeDiff = (new Date()).getTime() - touchStartTime;\n var action, actionsWidth, actions, buttons, i;\n \n actions = direction === 'to-left' ? actionsRight : actionsLeft;\n actionsWidth = direction === 'to-left' ? actionsRightWidth : actionsLeftWidth;\n \n if (\n timeDiff < 300 && (touchesDiff < -10 && direction === 'to-left' || touchesDiff > 10 && direction === 'to-right') ||\n timeDiff >= 300 && Math.abs(translate) > actionsWidth / 2\n ) {\n action = 'open';\n }\n else {\n action = 'close';\n }\n if (timeDiff < 300) {\n if (Math.abs(translate) === 0) action = 'close';\n if (Math.abs(translate) === actionsWidth) action = 'open';\n }\n \n if (action === 'open') {\n app.swipeoutOpenedEl = swipeOutEl;\n swipeOutEl.trigger('open swipeout:open');\n swipeOutEl.addClass('swipeout-opened transitioning');\n var newTranslate = direction === 'to-left' ? -actionsWidth : actionsWidth;\n swipeOutContent.transform('translate3d(' + newTranslate + 'px,0,0)');\n actions.addClass('swipeout-actions-opened');\n buttons = direction === 'to-left' ? buttonsRight : buttonsLeft;\n if (buttons) {\n for (i = 0; i < buttons.length; i++) {\n $(buttons[i]).transform('translate3d(' + newTranslate + 'px,0,0)');\n }\n }\n if (overswipeRight) {\n actionsRight.find('.swipeout-overswipe')[0].click();\n }\n if (overswipeLeft) {\n actionsLeft.find('.swipeout-overswipe')[0].click();\n }\n }\n else {\n swipeOutEl.trigger('close swipeout:close');\n app.swipeoutOpenedEl = undefined;\n swipeOutEl.addClass('transitioning').removeClass('swipeout-opened');\n swipeOutContent.transform('');\n actions.removeClass('swipeout-actions-opened');\n }\n \n var buttonOffset;\n if (buttonsLeft && buttonsLeft.length > 0 && buttonsLeft !== buttons) {\n for (i = 0; i < buttonsLeft.length; i++) {\n buttonOffset = buttonsLeft[i]._buttonOffset;\n if (typeof buttonOffset === 'undefined') {\n buttonsLeft[i]._buttonOffset = actionsLeftWidth - buttonsLeft[i].offsetLeft - buttonsLeft[i].offsetWidth;\n }\n $(buttonsLeft[i]).transform('translate3d(' + (buttonOffset) + 'px,0,0)');\n }\n }\n if (buttonsRight && buttonsRight.length > 0 && buttonsRight !== buttons) {\n for (i = 0; i < buttonsRight.length; i++) {\n buttonOffset = buttonsRight[i]._buttonOffset;\n if (typeof buttonOffset === 'undefined') {\n buttonsRight[i]._buttonOffset = buttonsRight[i].offsetLeft;\n }\n $(buttonsRight[i]).transform('translate3d(' + (-buttonOffset) + 'px,0,0)');\n }\n }\n swipeOutContent.transitionEnd(function (e) {\n if (opened && action === 'open' || closed && action === 'close') return;\n swipeOutEl.trigger(action === 'open' ? 'opened' : 'closed');\n if (opened && action === 'close') {\n if (actionsRight.length > 0) {\n buttonsRight.transform('');\n }\n if (actionsLeft.length > 0) {\n buttonsLeft.transform('');\n }\n }\n });\n }\n if (swipeoutEl) {\n $(swipeoutEl).on(app.touchEvents.start, handleTouchStart, activeListener);\n $(swipeoutEl).on(app.touchEvents.move, handleTouchMove, activeListener);\n $(swipeoutEl).on(app.touchEvents.end, handleTouchEnd, activeListener);\n }\n else {\n $(document).on(app.touchEvents.start, '.list-block li.swipeout', handleTouchStart, activeListener);\n $(document).on(app.touchEvents.move, '.list-block li.swipeout', handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, '.list-block li.swipeout', handleTouchEnd, activeListener);\n }\n \n };\n app.swipeoutOpen = function (el, dir, callback) {\n el = $(el);\n if (arguments.length === 2) {\n if (typeof arguments[1] === 'function') {\n callback = dir;\n }\n }\n \n if (el.length === 0) return;\n if (el.length > 1) el = $(el[0]);\n if (!el.hasClass('swipeout') || el.hasClass('swipeout-opened')) return;\n if (!dir) {\n if (el.find('.swipeout-actions-right').length > 0) dir = 'right';\n else dir = 'left';\n }\n var swipeOutActions = el.find('.swipeout-actions-' + dir);\n if (swipeOutActions.length === 0) return;\n el.trigger('open swipeout:open').addClass('swipeout-opened').removeClass('transitioning');\n swipeOutActions.addClass('swipeout-actions-opened');\n var buttons = swipeOutActions.children('a');\n var swipeOutActionsWidth = swipeOutActions.outerWidth();\n var translate = dir === 'right' ? -swipeOutActionsWidth : swipeOutActionsWidth;\n var i;\n if (buttons.length > 1) {\n for (i = 0; i < buttons.length; i++) {\n if (dir === 'right') {\n $(buttons[i]).transform('translate3d(' + (- buttons[i].offsetLeft) + 'px,0,0)');\n }\n else {\n $(buttons[i]).css('z-index', buttons.length - i).transform('translate3d(' + (swipeOutActionsWidth - buttons[i].offsetWidth - buttons[i].offsetLeft) + 'px,0,0)');\n }\n }\n var clientLeft = buttons[1].clientLeft;\n }\n el.addClass('transitioning');\n for (i = 0; i < buttons.length; i++) {\n $(buttons[i]).transform('translate3d(' + (translate) + 'px,0,0)');\n }\n el.find('.swipeout-content').transform('translate3d(' + translate + 'px,0,0)').transitionEnd(function () {\n el.trigger('opened swipeout:opened');\n if (callback) callback.call(el[0]);\n });\n app.swipeoutOpenedEl = el;\n };\n app.swipeoutClose = function (el, callback) {\n el = $(el);\n if (el.length === 0) return;\n if (!el.hasClass('swipeout-opened')) return;\n var dir = el.find('.swipeout-actions-opened').hasClass('swipeout-actions-right') ? 'right' : 'left';\n var swipeOutActions = el.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened');\n var buttons = swipeOutActions.children('a');\n var swipeOutActionsWidth = swipeOutActions.outerWidth();\n app.allowSwipeout = false;\n el.trigger('close swipeout:close');\n el.removeClass('swipeout-opened').addClass('transitioning');\n \n var closeTO;\n function onSwipeoutClose() {\n app.allowSwipeout = true;\n if (el.hasClass('swipeout-opened')) return;\n el.removeClass('transitioning');\n buttons.transform('');\n el.trigger('closed swipeout:closed');\n if (callback) callback.call(el[0]);\n if (closeTO) clearTimeout(closeTO);\n }\n el.find('.swipeout-content').transform('').transitionEnd(onSwipeoutClose);\n closeTO = setTimeout(onSwipeoutClose, 500);\n \n for (var i = 0; i < buttons.length; i++) {\n if (dir === 'right') {\n $(buttons[i]).transform('translate3d(' + (-buttons[i].offsetLeft) + 'px,0,0)');\n }\n else {\n $(buttons[i]).transform('translate3d(' + (swipeOutActionsWidth - buttons[i].offsetWidth - buttons[i].offsetLeft) + 'px,0,0)');\n }\n $(buttons[i]).css({left:0 + 'px'}).removeClass('swipeout-overswipe-active');\n }\n if (app.swipeoutOpenedEl && app.swipeoutOpenedEl[0] === el[0]) app.swipeoutOpenedEl = undefined;\n };\n app.swipeoutDelete = function (el, callback) {\n el = $(el);\n if (el.length === 0) return;\n if (el.length > 1) el = $(el[0]);\n app.swipeoutOpenedEl = undefined;\n el.trigger('delete swipeout:delete');\n el.css({height: el.outerHeight() + 'px'});\n var clientLeft = el[0].clientLeft;\n el.css({height: 0 + 'px'}).addClass('deleting transitioning').transitionEnd(function () {\n el.trigger('deleted swipeout:deleted');\n if (callback) callback.call(el[0]);\n if (el.parents('.virtual-list').length > 0) {\n var virtualList = el.parents('.virtual-list')[0].f7VirtualList;\n var virtualIndex = el[0].f7VirtualListIndex;\n if (virtualList && typeof virtualIndex !== 'undefined') virtualList.deleteItem(virtualIndex);\n }\n else {\n if (app.params.swipeoutRemoveWithTimeout) {\n setTimeout(function () {\n el.remove();\n }, 0);\n }\n else el.remove();\n }\n });\n var translate = '-100%';\n el.find('.swipeout-content').transform('translate3d(' + translate + ',0,0)');\n };\n \n\n /*===============================================================================\n ************ Sortable ************\n ===============================================================================*/\n app.sortableToggle = function (sortableContainer) {\n sortableContainer = $(sortableContainer);\n if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable');\n sortableContainer.toggleClass('sortable-opened');\n if (sortableContainer.hasClass('sortable-opened')) {\n sortableContainer.trigger('open sortable:open');\n }\n else {\n sortableContainer.trigger('close sortable:close');\n }\n return sortableContainer;\n };\n app.sortableOpen = function (sortableContainer) {\n sortableContainer = $(sortableContainer);\n if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable');\n sortableContainer.addClass('sortable-opened');\n sortableContainer.trigger('open sortable:open');\n return sortableContainer;\n };\n app.sortableClose = function (sortableContainer) {\n sortableContainer = $(sortableContainer);\n if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable');\n sortableContainer.removeClass('sortable-opened');\n sortableContainer.trigger('close sortable:close');\n return sortableContainer;\n };\n app.initSortable = function () {\n var isTouched, isMoved, touchStartY, touchesDiff, sortingEl, sortingElHeight, sortingItems, minTop, maxTop, insertAfter, insertBefore, sortableContainer, startIndex;\n \n function handleTouchStart(e) {\n isMoved = false;\n isTouched = true;\n touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n /*jshint validthis:true */\n sortingEl = $(this).parent();\n startIndex = sortingEl.index();\n sortingItems = sortingEl.parent().children('li');\n sortableContainer = sortingEl.parents('.sortable');\n e.preventDefault();\n app.allowPanelOpen = app.allowSwipeout = false;\n }\n function handleTouchMove(e) {\n if (!isTouched || !sortingEl) return;\n var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (!isMoved) {\n sortingEl.addClass('sorting');\n sortableContainer.addClass('sortable-sorting');\n minTop = sortingEl[0].offsetTop;\n maxTop = sortingEl.parent().height() - sortingEl[0].offsetTop - sortingEl.height();\n sortingElHeight = sortingEl[0].offsetHeight;\n }\n isMoved = true;\n \n e.preventDefault();\n e.f7PreventPanelSwipe = true;\n touchesDiff = pageY - touchStartY;\n var translate = touchesDiff;\n if (translate < -minTop) translate = -minTop;\n if (translate > maxTop) translate = maxTop;\n sortingEl.transform('translate3d(0,' + translate + 'px,0)');\n \n insertBefore = insertAfter = undefined;\n \n sortingItems.each(function () {\n var currentEl = $(this);\n if (currentEl[0] === sortingEl[0]) return;\n var currentElOffset = currentEl[0].offsetTop;\n var currentElHeight = currentEl.height();\n var sortingElOffset = sortingEl[0].offsetTop + translate;\n \n if ((sortingElOffset >= currentElOffset - currentElHeight / 2) && sortingEl.index() < currentEl.index()) {\n currentEl.transform('translate3d(0, '+(-sortingElHeight)+'px,0)');\n insertAfter = currentEl;\n insertBefore = undefined;\n }\n else if ((sortingElOffset <= currentElOffset + currentElHeight / 2) && sortingEl.index() > currentEl.index()) {\n currentEl.transform('translate3d(0, '+(sortingElHeight)+'px,0)');\n insertAfter = undefined;\n if (!insertBefore) insertBefore = currentEl;\n }\n else {\n $(this).transform('translate3d(0, 0%,0)');\n }\n });\n }\n function handleTouchEnd(e) {\n app.allowPanelOpen = app.allowSwipeout = true;\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n e.preventDefault();\n sortingItems.transform('');\n sortingEl.removeClass('sorting');\n sortableContainer.removeClass('sortable-sorting');\n var virtualList, oldIndex, newIndex;\n if (insertAfter) {\n sortingEl.insertAfter(insertAfter);\n sortingEl.trigger('sort sortable:sort', {startIndex: startIndex, newIndex: sortingEl.index()});\n }\n if (insertBefore) {\n sortingEl.insertBefore(insertBefore);\n sortingEl.trigger('sort sortable:sort', {startIndex: startIndex, newIndex: sortingEl.index()});\n }\n if ((insertAfter || insertBefore) && sortableContainer.hasClass('virtual-list')) {\n virtualList = sortableContainer[0].f7VirtualList;\n oldIndex = sortingEl[0].f7VirtualListIndex;\n newIndex = insertBefore ? insertBefore[0].f7VirtualListIndex : insertAfter[0].f7VirtualListIndex;\n if (virtualList) virtualList.moveItem(oldIndex, newIndex);\n }\n insertAfter = insertBefore = undefined;\n isTouched = false;\n isMoved = false;\n }\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n $(document).on(app.touchEvents.start, '.list-block.sortable .sortable-handler', handleTouchStart, activeListener);\n if (app.support.touch) {\n $(document).on(app.touchEvents.move, '.list-block.sortable .sortable-handler', handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, '.list-block.sortable .sortable-handler', handleTouchEnd, activeListener);\n }\n else {\n $(document).on(app.touchEvents.move, handleTouchMove, activeListener);\n $(document).on(app.touchEvents.end, handleTouchEnd, activeListener);\n }\n };\n \n\n /*===============================================================================\n ************ Smart Select ************\n ===============================================================================*/\n app.initSmartSelects = function (pageContainer) {\n pageContainer = $(pageContainer);\n var selects;\n if (pageContainer.is('.smart-select')) {\n selects = pageContainer;\n }\n else {\n selects = pageContainer.find('.smart-select');\n }\n if (selects.length === 0) return;\n \n selects.each(function () {\n var smartSelect = $(this);\n \n var $select = smartSelect.find('select');\n if ($select.length === 0) return;\n \n var select = $select[0];\n if (select.length === 0) return;\n \n var valueText = [];\n var displayAs;\n for (var i = 0; i < select.length; i++) {\n if (select[i].selected) {\n displayAs = select[i].dataset ? select[i].dataset.displayAs : $(select[i]).data('display-as');\n if (displayAs && typeof displayAs !== 'undefined') {\n \t\t\t\t\tvalueText.push(displayAs);\n \t\t\t\t} else {\n \t\t\t\t\tvalueText.push(select[i].textContent.trim());\n \t\t\t\t}\n \t\t\t}\n }\n \n var itemAfter = smartSelect.find('.item-after');\n if (itemAfter.length === 0) {\n smartSelect.find('.item-inner').append('
                                  ' + valueText.join(', ') + '
                                  ');\n }\n else {\n var selectedText = itemAfter.text();\n if (itemAfter.hasClass('smart-select-value')) {\n for (i = 0; i < select.length; i++) {\n select[i].selected = select[i].textContent.trim() === selectedText.trim();\n }\n } else {\n itemAfter.text(valueText.join(', '));\n }\n }\n \n $select.on('change', function () {\n var valueText = [];\n for (var i = 0; i < select.length; i++) {\n if (select[i].selected) {\n var displayAs = select[i].dataset ? select[i].dataset.displayAs : $(select[i]).data('display-as');\n \tif (displayAs && typeof displayAs !== 'undefined') {\n \t\t\t\t\t\tvalueText.push(displayAs);\n \t\t\t\t\t} else {\n \t\t\t\t\t\tvalueText.push(select[i].textContent.trim());\n \t\t\t\t\t}\n \t\t\t\t}\n }\n smartSelect.find('.item-after').text(valueText.join(', '));\n });\n \n });\n \n };\n app.smartSelectAddOption = function (select, option, index) {\n select = $(select);\n var smartSelect = select.parents('.smart-select');\n if (typeof index === 'undefined') {\n select.append(option);\n }\n else {\n $(option).insertBefore(select.find('option').eq(index));\n }\n app.initSmartSelects(smartSelect);\n var selectName = smartSelect.find('select').attr('name');\n var opened = $('.page.smart-select-page[data-select-name=\"' + selectName + '\"]').length > 0;\n if (opened) {\n app.smartSelectOpen(smartSelect, true);\n }\n };\n app.smartSelectOpen = function (smartSelect, reLayout) {\n smartSelect = $(smartSelect);\n if (smartSelect.length === 0) return;\n \n // Find related view\n var view = smartSelect.parents('.' + app.params.viewClass);\n if (view.length === 0) return;\n view = view[0].f7View;\n \n // Parameters\n var openIn = smartSelect.attr('data-open-in') || app.params.smartSelectOpenIn;\n if (openIn === 'popup') {\n if ($('.popup.smart-select-popup').length > 0) return;\n }\n else if (openIn === 'picker') {\n if ($('.picker-modal.modal-in').length > 0 && !reLayout){\n if (smartSelect[0].f7SmartSelectPicker !== $('.picker-modal.modal-in:not(.modal-out)')[0]) app.closeModal($('.picker-modal.modal-in:not(.modal-out)'));\n else return;\n }\n }\n else {\n if (!view) return;\n }\n \n var smartSelectData = smartSelect.dataset();\n var pageTitle = smartSelectData.pageTitle || smartSelect.find('.item-title').text();\n var backText = smartSelectData.backText || app.params.smartSelectBackText;\n var closeText;\n if (openIn === 'picker') {\n closeText = smartSelectData.pickerCloseText || smartSelectData.backText || app.params.smartSelectPickerCloseText ;\n }\n else {\n closeText = smartSelectData.popupCloseText || smartSelectData.backText || app.params.smartSelectPopupCloseText ;\n }\n var backOnSelect = smartSelectData.backOnSelect !== undefined ? smartSelectData.backOnSelect : app.params.smartSelectBackOnSelect;\n var formTheme = smartSelectData.formTheme || app.params.smartSelectFormTheme;\n var navbarTheme = smartSelectData.navbarTheme || app.params.smartSelectNavbarTheme;\n var toolbarTheme = smartSelectData.toolbarTheme || app.params.smartSelectToolbarTheme;\n var virtualList = smartSelectData.virtualList;\n var virtualListHeight = smartSelectData.virtualListHeight;\n var material = app.params.material;\n var pickerHeight = smartSelectData.pickerHeight || app.params.smartSelectPickerHeight;\n \n // Collect all options/values\n var select = smartSelect.find('select')[0];\n var $select = $(select);\n var $selectData = $select.dataset();\n if (select.disabled || smartSelect.hasClass('disabled') || $select.hasClass('disabled')) {\n return;\n }\n var values = [];\n var id = (new Date()).getTime();\n var inputType = select.multiple ? 'checkbox' : 'radio';\n var inputName = inputType + '-' + id;\n var maxLength = $select.attr('maxlength');\n var selectName = select.name;\n var option, optionHasMedia, optionImage, optionIcon, optionGroup, optionGroupLabel, optionPreviousGroup, optionIsLabel, previousGroup, optionColor, optionClassName, optionData;\n for (var i = 0; i < select.length; i++) {\n option = $(select[i]);\n optionData = option.dataset();\n optionImage = optionData.optionImage || $selectData.optionImage || smartSelectData.optionImage;\n optionIcon = optionData.optionIcon || $selectData.optionIcon || smartSelectData.optionIcon;\n optionHasMedia = optionImage || optionIcon || inputType === 'checkbox';\n if (material) optionHasMedia = optionImage || optionIcon;\n optionColor = optionData.optionColor;\n optionClassName = optionData.optionClass;\n if (option[0].disabled) optionClassName += ' disabled';\n optionGroup = option.parent('optgroup')[0];\n optionGroupLabel = optionGroup && optionGroup.label;\n optionIsLabel = false;\n if (optionGroup) {\n if (optionGroup !== previousGroup) {\n optionIsLabel = true;\n previousGroup = optionGroup;\n values.push({\n groupLabel: optionGroupLabel,\n isLabel: optionIsLabel\n });\n }\n }\n values.push({\n value: option[0].value,\n text: option[0].textContent.trim(),\n selected: option[0].selected,\n group: optionGroup,\n groupLabel: optionGroupLabel,\n image: optionImage,\n icon: optionIcon,\n color: optionColor,\n className: optionClassName,\n disabled: option[0].disabled,\n inputType: inputType,\n id: id,\n hasMedia: optionHasMedia,\n checkbox: inputType === 'checkbox',\n inputName: inputName,\n material: app.params.material\n });\n }\n \n \n // Item template/HTML\n if (!app._compiledTemplates.smartSelectItem) {\n app._compiledTemplates.smartSelectItem = t7.compile(app.params.smartSelectItemTemplate ||\n '{{#if isLabel}}' +\n '
                                • {{groupLabel}}
                                • ' +\n '{{else}}' +\n '' +\n '' +\n '' +\n '{{/if}}'\n );\n }\n var smartSelectItemTemplate = app._compiledTemplates.smartSelectItem;\n \n var inputsHTML = '';\n if (!virtualList) {\n for (var j = 0; j < values.length; j++) {\n inputsHTML += smartSelectItemTemplate(values[j]);\n }\n }\n \n // Toolbar / Navbar\n var toolbarHTML = '', navbarHTML;\n var noNavbar = '', noToolbar = '', noTabbar = '', navbarLayout;\n \n if (openIn === 'picker') {\n if (!app._compiledTemplates.smartSelectToolbar) {\n app._compiledTemplates.smartSelectToolbar = t7.compile(app.params.smartSelectToolbarTemplate ||\n '
                                  ' +\n '
                                  ' +\n '
                                  ' +\n '' +\n '
                                  ' +\n '
                                  '\n );\n }\n \n toolbarHTML = app._compiledTemplates.smartSelectToolbar({\n pageTitle: pageTitle,\n closeText: closeText,\n openIn: openIn,\n toolbarTheme: toolbarTheme,\n inPicker: openIn === 'picker'\n });\n }\n else {\n // Navbar HTML\n if (!app._compiledTemplates.smartSelectNavbar) {\n app._compiledTemplates.smartSelectNavbar = t7.compile(app.params.smartSelectNavbarTemplate ||\n '
                                  ' +\n '
                                  ' +\n '{{leftTemplate}}' +\n '
                                  {{pageTitle}}
                                  ' +\n '
                                  ' +\n '
                                  '\n );\n }\n navbarHTML = app._compiledTemplates.smartSelectNavbar({\n pageTitle: pageTitle,\n backText: backText,\n closeText: closeText,\n openIn: openIn,\n navbarTheme: navbarTheme,\n inPopup: openIn === 'popup',\n inPage: openIn === 'page',\n leftTemplate: openIn === 'popup' ?\n (app.params.smartSelectPopupCloseTemplate || (material ? '
                                  ' : '')).replace(/{{closeText}}/g, closeText) :\n (app.params.smartSelectBackTemplate || (material ? '
                                  ' : '')).replace(/{{backText}}/g, backText)\n });\n // Determine navbar layout type - static/fixed/through\n if (openIn === 'page') {\n navbarLayout = 'static';\n if (smartSelect.parents('.navbar-through').length > 0) navbarLayout = 'through';\n if (smartSelect.parents('.navbar-fixed').length > 0) navbarLayout = 'fixed';\n noToolbar = smartSelect.parents('.page').hasClass('no-toolbar') ? 'no-toolbar' : '';\n noNavbar = smartSelect.parents('.page').hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout;\n noTabbar = smartSelect.parents('.page').hasClass('no-tabbar') ? 'no-tabbar' : '';\n }\n else {\n navbarLayout = 'fixed';\n }\n }\n \n \n // Page Layout\n var pageName = 'smart-select-' + inputName;\n \n var useSearchbar = typeof smartSelect.data('searchbar') === 'undefined' ? app.params.smartSelectSearchbar : (smartSelect.data('searchbar') === 'true' ? true : false);\n var searchbarPlaceholder, searchbarCancel;\n \n if (useSearchbar) {\n searchbarPlaceholder = smartSelect.data('searchbar-placeholder') || 'Search';\n searchbarCancel = smartSelect.data('searchbar-cancel') || 'Cancel';\n }\n \n var searchbarHTML = '
                                  ' +\n '
                                  ' +\n '' +\n '' +\n '
                                  ' +\n (material ? '' : '' + searchbarCancel + '') +\n '
                                  ' +\n '
                                  ';\n \n var pageHTML =\n (openIn !== 'picker' && navbarLayout === 'through' ? navbarHTML : '') +\n '
                                  ' +\n '
                                  ' +\n (openIn !== 'picker' && navbarLayout === 'fixed' ? navbarHTML : '') +\n (useSearchbar ? searchbarHTML : '') +\n '
                                  ' +\n (openIn !== 'picker' && navbarLayout === 'static' ? navbarHTML : '') +\n '
                                  ' +\n '
                                    ' +\n (virtualList ? '' : inputsHTML) +\n '
                                  ' +\n '
                                  ' +\n '
                                  ' +\n '
                                  ' +\n '
                                  ';\n \n // Define popup and picker\n var popup, picker;\n \n // Scroll SS Picker To Input\n function scrollToInput() {\n var pageContent = smartSelect.parents('.page-content');\n if (pageContent.length === 0) return;\n var paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-bottom'), 10),\n pageHeight = pageContent[0].offsetHeight - paddingTop - picker.height(),\n pageScrollHeight = pageContent[0].scrollHeight - paddingTop - picker.height(),\n newPaddingBottom;\n var inputTop = smartSelect.offset().top - paddingTop + smartSelect[0].offsetHeight;\n if (inputTop > pageHeight) {\n var scrollTop = pageContent.scrollTop() + inputTop - pageHeight;\n if (scrollTop + pageHeight > pageScrollHeight) {\n newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom;\n if (pageHeight === pageScrollHeight) {\n newPaddingBottom = picker.height();\n }\n pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'});\n }\n pageContent.scrollTop(scrollTop, 300);\n }\n }\n // Close SS Picker on HTML Click\n function closeOnHTMLClick(e) {\n var close = true;\n if (e.target === smartSelect[0] || $(e.target).parents(smartSelect[0]).length > 0) {\n close = false;\n }\n if ($(e.target).parents('.picker-modal').length > 0) {\n close = false;\n }\n if (close) {\n app.closeModal('.smart-select-picker.modal-in');\n }\n }\n \n // Check max length\n function checkMaxLength(container) {\n if (select.selectedOptions.length >= maxLength) {\n container.find('input[type=\"checkbox\"]').each(function () {\n if (!this.checked) {\n $(this).parents('li').addClass('disabled');\n }\n else {\n $(this).parents('li').removeClass('disabled');\n }\n });\n }\n else {\n container.find('.disabled').removeClass('disabled');\n }\n }\n // Event Listeners on new page\n function handleInputs(container) {\n container = $(container);\n if (virtualList) {\n var virtualListInstance = app.virtualList(container.find('.virtual-list'), {\n items: values,\n template: smartSelectItemTemplate,\n height: virtualListHeight || undefined,\n searchByItem: function (query, index, item) {\n if (item.text && item.text.toLowerCase().indexOf(query.trim().toLowerCase()) >=0 ) return true;\n return false;\n }\n });\n container.once(openIn === 'popup' || openIn === 'picker' ? 'closed': 'pageBeforeRemove', function () {\n if (virtualListInstance && virtualListInstance.destroy) virtualListInstance.destroy();\n });\n }\n if (maxLength) {\n checkMaxLength(container);\n }\n if (backOnSelect) {\n container.find('input[type=\"radio\"][name=\"' + inputName + '\"]:checked').parents('label').once('click', function () {\n if (openIn === 'popup') app.closeModal(popup);\n else if (openIn === 'picker') app.closeModal(picker);\n else view.router.back();\n });\n }\n container.on('change', 'input[name=\"' + inputName + '\"]', function () {\n \t\t\tvar option, text;\n var input = this;\n var value = input.value;\n var optionText = [];\n var displayAs;\n if (input.type === 'checkbox') {\n var values = [];\n for (var i = 0; i < select.options.length; i++) {\n option = select.options[i];\n if (option.value === value) {\n option.selected = input.checked;\n }\n if (option.selected) {\n displayAs = option.dataset ? option.dataset.displayAs : $(option).data('display-as');\n text = displayAs && typeof displayAs !== 'undefined' ? displayAs : option.textContent;\n optionText.push(text.trim());\n }\n }\n if (maxLength) {\n checkMaxLength(container);\n }\n }\n else {\n option = smartSelect.find('option[value=\"' + value + '\"]')[0];\n displayAs = option.dataset ? option.dataset.displayAs : $(option).data('display-as');\n text = displayAs && typeof displayAs !== 'undefined' ? displayAs : option.textContent;\n optionText = [text];\n select.value = value;\n }\n \n $select.trigger('change');\n smartSelect.find('.item-after').text(optionText.join(', '));\n if (backOnSelect && inputType === 'radio') {\n if (openIn === 'popup') app.closeModal(popup);\n else if (openIn === 'picker') app.closeModal(picker);\n else view.router.back();\n }\n });\n }\n function pageInit(e) {\n var page = e.detail.page;\n if (page.name === pageName) {\n handleInputs(page.container);\n }\n }\n if (openIn === 'popup') {\n if (reLayout) {\n popup = $('.popup.smart-select-popup .view');\n popup.html(pageHTML);\n }\n else {\n popup = app.popup(\n '
                                  ' +\n '
                                  ' +\n pageHTML +\n '
                                  ' +\n '
                                  '\n );\n popup = $(popup);\n }\n app.initPage(popup.find('.page'));\n handleInputs(popup);\n }\n else if (openIn === 'picker') {\n if (reLayout) {\n picker = $('.picker-modal.smart-select-picker .view');\n picker.html(pageHTML);\n }\n else {\n picker = app.pickerModal(\n '
                                  ' +\n toolbarHTML +\n '
                                  ' +\n '
                                  ' +\n pageHTML +\n '
                                  ' +\n '
                                  ' +\n '
                                  '\n );\n picker = $(picker);\n \n // Scroll To Input\n scrollToInput();\n \n // Close On Click\n $('html').on('click', closeOnHTMLClick);\n \n // On Close\n picker.once('picker:close', function () {\n // Reset linked picker\n smartSelect[0].f7SmartSelectPicker = undefined;\n \n // Detach html click\n $('html').off('click', closeOnHTMLClick);\n \n // Restore page padding bottom\n smartSelect.parents('.page-content').css({paddingBottom: ''});\n });\n \n // Link Picker\n smartSelect[0].f7SmartSelectPicker = picker[0];\n }\n \n // Init Page\n app.initPage(picker.find('.page'));\n \n // Attach events\n handleInputs(picker);\n }\n else {\n $(document).once('page:init', '.smart-select-page', pageInit);\n view.router.load({\n content: pageHTML,\n reload: reLayout ? true : undefined\n });\n }\n };\n \n\n /*===============================================================================\n ************ Virtual List ************\n ===============================================================================*/\n var VirtualList = function (listBlock, params) {\n var defaults = {\n cols: 1,\n height: app.params.material ? 48 : 44,\n cache: true,\n dynamicHeightBufferSize: 1,\n showFilteredItemsOnly: false,\n renderExternal: undefined,\n template:\n '
                                • ' +\n '
                                  ' +\n '
                                  ' +\n '
                                  {{this}}
                                  ' +\n '
                                  ' +\n '
                                  ' +\n '
                                • '\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n \n // Preparation\n var vl = this;\n vl.listBlock = $(listBlock);\n vl.params = params;\n vl.items = vl.params.items;\n if (vl.params.showFilteredItemsOnly) {\n vl.filteredItems = [];\n }\n if (vl.params.template && !vl.params.renderItem) {\n if (typeof vl.params.template === 'string') vl.template = t7.compile(vl.params.template);\n else if (typeof vl.params.template === 'function') vl.template = vl.params.template;\n }\n vl.pageContent = vl.listBlock.parents('.page-content');\n \n // Bad scroll\n var updatableScroll;\n if (typeof vl.params.updatableScroll !== 'undefined') {\n updatableScroll = vl.params.updatableScroll;\n }\n else {\n updatableScroll = true;\n if (app.device.ios && app.device.osVersion.split('.')[0] < 8) {\n updatableScroll = false;\n }\n vl.params.updatableScroll = updatableScroll;\n }\n \n // Append
                                    \n vl.ul = vl.params.ul ? $(vl.params.ul) : vl.listBlock.children('ul');\n if (vl.ul.length === 0) {\n vl.listBlock.append('
                                      ');\n vl.ul = vl.listBlock.children('ul');\n }\n \n // DOM cached items\n vl.domCache = {};\n vl.displayDomCache = {};\n \n // Temporary DOM Element\n vl.tempDomElement = document.createElement('ul');\n \n // Last repain position\n vl.lastRepaintY = null;\n \n // Fragment\n vl.fragment = document.createDocumentFragment();\n \n // Filter\n vl.filterItems = function (indexes, resetScrollTop) {\n vl.filteredItems = [];\n var firstIndex = indexes[0];\n var lastIndex = indexes[indexes.length - 1];\n for (var i = 0; i < indexes.length; i++) {\n vl.filteredItems.push(vl.items[indexes[i]]);\n }\n if (typeof resetScrollTop === 'undefined') resetScrollTop = true;\n if (resetScrollTop) {\n vl.pageContent[0].scrollTop = 0;\n }\n vl.update();\n };\n vl.resetFilter = function () {\n if (vl.params.showFilteredItemsOnly) {\n vl.filteredItems = [];\n }\n else {\n vl.filteredItems = null;\n delete vl.filteredItems;\n }\n vl.update();\n };\n \n var pageHeight, rowsPerScreen, rowsBefore, rowsAfter, rowsToRender, maxBufferHeight = 0, listHeight;\n var dynamicHeight = typeof vl.params.height === 'function';\n \n // Set list size\n vl.setListSize = function () {\n var items = vl.filteredItems || vl.items;\n pageHeight = vl.pageContent[0].offsetHeight;\n if (dynamicHeight) {\n listHeight = 0;\n vl.heights = [];\n for (var i = 0; i < items.length; i++) {\n var itemHeight = vl.params.height(items[i]);\n listHeight += itemHeight;\n vl.heights.push(itemHeight);\n }\n }\n else {\n listHeight = Math.ceil(items.length / vl.params.cols) * vl.params.height;\n rowsPerScreen = Math.ceil(pageHeight / vl.params.height);\n rowsBefore = vl.params.rowsBefore || rowsPerScreen * 2;\n rowsAfter = vl.params.rowsAfter || rowsPerScreen;\n rowsToRender = (rowsPerScreen + rowsBefore + rowsAfter);\n maxBufferHeight = rowsBefore / 2 * vl.params.height;\n }\n \n if (updatableScroll) {\n vl.ul.css({height: listHeight + 'px'});\n }\n };\n \n // Render items\n vl.render = function (force, forceScrollTop) {\n if (force) vl.lastRepaintY = null;\n \n var scrollTop = -(vl.listBlock[0].getBoundingClientRect().top - vl.pageContent[0].getBoundingClientRect().top);\n \n if (typeof forceScrollTop !== 'undefined') scrollTop = forceScrollTop;\n \n if (vl.lastRepaintY === null || Math.abs(scrollTop - vl.lastRepaintY) > maxBufferHeight || (!updatableScroll && (vl.pageContent[0].scrollTop + pageHeight >= vl.pageContent[0].scrollHeight))) {\n vl.lastRepaintY = scrollTop;\n }\n else {\n return;\n }\n \n var items = vl.filteredItems || vl.items,\n fromIndex, toIndex, heightBeforeFirstItem = 0, heightBeforeLastItem = 0;\n if (dynamicHeight) {\n var itemTop = 0, j, itemHeight;\n maxBufferHeight = pageHeight;\n \n for (j = 0; j < vl.heights.length; j++) {\n itemHeight = vl.heights[j];\n if (typeof fromIndex === 'undefined') {\n if (itemTop + itemHeight >= scrollTop - pageHeight * 2 * vl.params.dynamicHeightBufferSize) fromIndex = j;\n else heightBeforeFirstItem += itemHeight;\n }\n \n if (typeof toIndex === 'undefined') {\n if (itemTop + itemHeight >= scrollTop + pageHeight * 2 * vl.params.dynamicHeightBufferSize || j === vl.heights.length - 1) toIndex = j + 1;\n heightBeforeLastItem += itemHeight;\n }\n itemTop += itemHeight;\n }\n toIndex = Math.min(toIndex, items.length);\n }\n else {\n fromIndex = (parseInt(scrollTop / vl.params.height) - rowsBefore) * vl.params.cols;\n if (fromIndex < 0) {\n fromIndex = 0;\n }\n toIndex = Math.min(fromIndex + rowsToRender * vl.params.cols, items.length);\n }\n \n var topPosition, renderExternalItems = [];\n vl.reachEnd = false;\n for (var i = fromIndex; i < toIndex; i++) {\n var item, index;\n // Define real item index\n index = vl.items.indexOf(items[i]);\n \n if (i === fromIndex) vl.currentFromIndex = index;\n if (i === toIndex - 1) vl.currentToIndex = index;\n if (vl.filteredItems) {\n if (vl.items[index] === vl.filteredItems[vl.filteredItems.length - 1]) vl.reachEnd = true;\n }\n else {\n if (index === vl.items.length - 1) vl.reachEnd = true;\n }\n \n // Find items\n if (vl.params.renderExternal) {\n renderExternalItems.push(items[i])\n }\n else {\n if (vl.domCache[index]) {\n item = vl.domCache[index];\n item.f7VirtualListIndex = index;\n }\n else {\n if (vl.template && !vl.params.renderItem) {\n vl.tempDomElement.innerHTML = vl.template(items[i], {index: index}).trim();\n }\n else if (vl.params.renderItem) {\n vl.tempDomElement.innerHTML = vl.params.renderItem(index, items[i]).trim();\n }\n else {\n vl.tempDomElement.innerHTML = items[i].toString().trim();\n }\n item = vl.tempDomElement.childNodes[0];\n if (vl.params.cache) vl.domCache[index] = item;\n item.f7VirtualListIndex = index;\n }\n }\n \n // Set item top position\n if (i === fromIndex) {\n if (dynamicHeight) {\n topPosition = heightBeforeFirstItem;\n }\n else {\n topPosition = (i * vl.params.height / vl.params.cols);\n }\n }\n if (!vl.params.renderExternal) {\n item.style.top = topPosition + 'px';\n \n // Before item insert\n if (vl.params.onItemBeforeInsert) vl.params.onItemBeforeInsert(vl, item);\n \n // Append item to fragment\n vl.fragment.appendChild(item);\n }\n }\n \n // Update list height with not updatable scroll\n if (!updatableScroll) {\n if (dynamicHeight) {\n vl.ul[0].style.height = heightBeforeLastItem + 'px';\n }\n else {\n vl.ul[0].style.height = i * vl.params.height / vl.params.cols + 'px';\n }\n }\n \n // Update list html\n if (vl.params.renderExternal) {\n if (items && items.length === 0) {\n vl.reachEnd = true;\n }\n }\n else {\n if (vl.params.onBeforeClear) vl.params.onBeforeClear(vl, vl.fragment);\n vl.ul[0].innerHTML = '';\n \n if (vl.params.onItemsBeforeInsert) vl.params.onItemsBeforeInsert(vl, vl.fragment);\n if (items && items.length === 0) {\n vl.reachEnd = true;\n if (vl.params.emptyTemplate) vl.ul[0].innerHTML = vl.params.emptyTemplate;\n }\n else {\n vl.ul[0].appendChild(vl.fragment);\n }\n \n if (vl.params.onItemsAfterInsert) vl.params.onItemsAfterInsert(vl, vl.fragment);\n }\n \n if (typeof forceScrollTop !== 'undefined' && force) {\n vl.pageContent.scrollTop(forceScrollTop, 0);\n }\n if (vl.params.renderExternal) {\n vl.params.renderExternal(vl, {\n fromIndex: fromIndex,\n toIndex: toIndex,\n listHeight: listHeight,\n topPosition: topPosition,\n items: renderExternalItems\n });\n }\n };\n \n vl.scrollToItem = function (index) {\n if (index > vl.items.length) return false;\n \n var itemTop = 0, listTop;\n if (dynamicHeight) {\n for (var i = 0; i < index; i++) {\n itemTop += vl.heights[i];\n }\n }\n else {\n itemTop = index * vl.params.height;\n }\n listTop = vl.listBlock[0].offsetTop;\n vl.render(true, listTop + itemTop - parseInt(vl.pageContent.css('padding-top'), 10));\n return true;\n };\n \n // Handle scroll event\n vl.handleScroll = function (e) {\n vl.render();\n };\n // Handle resize event\n vl._isVisible = function (el) {\n return !!( el.offsetWidth || el.offsetHeight || el.getClientRects().length );\n };\n vl.handleResize = function (e) {\n if (vl._isVisible(vl.listBlock[0])) {\n vl.setListSize();\n vl.render(true);\n }\n };\n \n vl.attachEvents = function (detach) {\n var action = detach ? 'off' : 'on';\n vl.pageContent[action]('scroll', vl.handleScroll);\n vl.listBlock.parents('.tab').eq(0)[action]('tab:show', vl.handleResize);\n vl.listBlock.parents('.panel').eq(0)[action]('panel:open', vl.handleResize);\n vl.listBlock.parents('.popup').eq(0)[action]('popup:open', vl.handleResize);\n app[action === 'on' ? 'onResize' : 'offResize'](vl.handleResize);\n };\n \n // Init Virtual List\n vl.init = function () {\n vl.attachEvents();\n vl.setListSize();\n vl.render();\n };\n \n // Append\n vl.appendItems = function (items) {\n for (var i = 0; i < items.length; i++) {\n vl.items.push(items[i]);\n }\n vl.update();\n };\n vl.appendItem = function (item) {\n vl.appendItems([item]);\n };\n // Replace\n vl.replaceAllItems = function (items) {\n vl.items = items;\n delete vl.filteredItems;\n vl.domCache = {};\n vl.update();\n };\n vl.replaceItem = function (index, item) {\n vl.items[index] = item;\n if (vl.params.cache) delete vl.domCache[index];\n vl.update();\n };\n // Prepend\n vl.prependItems = function (items) {\n for (var i = items.length - 1; i >= 0; i--) {\n vl.items.unshift(items[i]);\n }\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n newCache[parseInt(cached, 10) + items.length] = vl.domCache[cached];\n }\n vl.domCache = newCache;\n }\n vl.update();\n };\n vl.prependItem = function (item) {\n vl.prependItems([item]);\n };\n \n // Move\n vl.moveItem = function (oldIndex, newIndex) {\n if (oldIndex === newIndex) return;\n // remove item from array\n var item = vl.items.splice(oldIndex, 1)[0];\n if (newIndex >= vl.items.length) {\n // Add item to the end\n vl.items.push(item);\n newIndex = vl.items.length - 1;\n }\n else {\n // Add item to new index\n vl.items.splice(newIndex, 0, item);\n }\n // Update cache\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n var cachedIndex = parseInt(cached, 10);\n var leftIndex = oldIndex < newIndex ? oldIndex : newIndex;\n var rightIndex = oldIndex < newIndex ? newIndex : oldIndex;\n var indexShift = oldIndex < newIndex ? -1 : 1;\n if (cachedIndex < leftIndex || cachedIndex > rightIndex) newCache[cachedIndex] = vl.domCache[cachedIndex];\n if (cachedIndex === leftIndex) newCache[rightIndex] = vl.domCache[cachedIndex];\n if (cachedIndex > leftIndex && cachedIndex <= rightIndex) newCache[cachedIndex + indexShift] = vl.domCache[cachedIndex];\n }\n vl.domCache = newCache;\n }\n vl.update();\n };\n // Insert before\n vl.insertItemBefore = function (index, item) {\n if (index === 0) {\n vl.prependItem(item);\n return;\n }\n if (index >= vl.items.length) {\n vl.appendItem(item);\n return;\n }\n vl.items.splice(index, 0, item);\n // Update cache\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n var cachedIndex = parseInt(cached, 10);\n if (cachedIndex >= index) {\n newCache[cachedIndex + 1] = vl.domCache[cachedIndex];\n }\n }\n vl.domCache = newCache;\n }\n vl.update();\n };\n // Delete\n vl.deleteItems = function (indexes) {\n var prevIndex, indexShift = 0;\n for (var i = 0; i < indexes.length; i++) {\n var index = indexes[i];\n if (typeof prevIndex !== 'undefined') {\n if (index > prevIndex) {\n indexShift = -i;\n }\n }\n index = index + indexShift;\n prevIndex = indexes[i];\n // Delete item\n var deletedItem = vl.items.splice(index, 1)[0];\n \n // Delete from filtered\n if (vl.filteredItems && vl.filteredItems.indexOf(deletedItem) >= 0) {\n vl.filteredItems.splice(vl.filteredItems.indexOf(deletedItem), 1);\n }\n // Update cache\n if (vl.params.cache) {\n var newCache = {};\n for (var cached in vl.domCache) {\n var cachedIndex = parseInt(cached, 10);\n if (cachedIndex === index) {\n delete vl.domCache[index];\n }\n else if (parseInt(cached, 10) > index) {\n newCache[cachedIndex - 1] = vl.domCache[cached];\n }\n else {\n newCache[cachedIndex] = vl.domCache[cached];\n }\n }\n vl.domCache = newCache;\n }\n }\n vl.update();\n };\n vl.deleteAllItems = function () {\n vl.items = [];\n delete vl.filteredItems;\n if (vl.params.cache) vl.domCache = {};\n vl.update();\n };\n vl.deleteItem = function (index) {\n vl.deleteItems([index]);\n };\n \n // Clear cache\n vl.clearCache = function () {\n vl.domCache = {};\n };\n \n // Update Virtual List\n vl.update = function () {\n vl.setListSize();\n vl.render(true);\n };\n \n // Destroy\n vl.destroy = function () {\n vl.attachEvents(true);\n delete vl.items;\n delete vl.domCache;\n };\n \n // Init Virtual List\n vl.init();\n \n // Store vl in container\n vl.listBlock[0].f7VirtualList = vl;\n return vl;\n };\n \n // App Method\n app.virtualList = function (listBlock, params) {\n return new VirtualList(listBlock, params);\n };\n \n app.reinitVirtualList = function (pageContainer) {\n var page = $(pageContainer);\n var vlists = page.find('.virtual-list');\n if (vlists.length === 0) return;\n for (var i = 0; i < vlists.length; i++) {\n var vlistInstance = vlists[i].f7VirtualList;\n if (vlistInstance) {\n vlistInstance.update();\n }\n }\n };\n \n\n /*======================================================\n ************ Pull To Refresh ************\n ======================================================*/\n app.initPullToRefresh = function (pageContainer) {\n var eventsTarget = $(pageContainer);\n if (!eventsTarget.hasClass('pull-to-refresh-content')) {\n eventsTarget = eventsTarget.find('.pull-to-refresh-content');\n }\n if (!eventsTarget || eventsTarget.length === 0) return;\n \n var touchId, isTouched, isMoved, touchesStart = {}, isScrolling, touchesDiff, touchStartTime, container, refresh = false, useTranslate = false, startTranslate = 0, translate, scrollTop, wasScrolled, layer, triggerDistance, dynamicTriggerDistance, pullStarted;\n var page = eventsTarget.hasClass('page') ? eventsTarget : eventsTarget.parents('.page');\n var hasNavbar = false;\n if (page.find('.navbar').length > 0 || page.parents('.navbar-fixed, .navbar-through').length > 0 || page.hasClass('navbar-fixed') || page.hasClass('navbar-through')) hasNavbar = true;\n if (page.hasClass('no-navbar')) hasNavbar = false;\n if (!hasNavbar) eventsTarget.addClass('pull-to-refresh-no-navbar');\n \n container = eventsTarget;\n \n // Define trigger distance\n if (container.attr('data-ptr-distance')) {\n dynamicTriggerDistance = true;\n }\n else {\n triggerDistance = 44;\n }\n \n function handleTouchStart(e) {\n if (isTouched) {\n if (app.device.os === 'android') {\n if ('targetTouches' in e && e.targetTouches.length > 1) return;\n }\n else return;\n }\n \n /*jshint validthis:true */\n container = $(this);\n if (container.hasClass('refreshing')) {\n return;\n }\n \n isMoved = false;\n pullStarted = false;\n isTouched = true;\n isScrolling = undefined;\n wasScrolled = undefined;\n if (e.type === 'touchstart') touchId = e.targetTouches[0].identifier;\n touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n \n }\n \n function handleTouchMove(e) {\n if (!isTouched) return;\n var pageX, pageY, touch;\n if (e.type === 'touchmove') {\n if (touchId && e.touches) {\n for (var i = 0; i < e.touches.length; i++) {\n if (e.touches[i].identifier === touchId) {\n touch = e.touches[i];\n }\n }\n }\n if (!touch) touch = e.targetTouches[0];\n pageX = touch.pageX;\n pageY = touch.pageY;\n }\n else {\n pageX = e.pageX;\n pageY = e.pageY;\n }\n if (!pageX || !pageY) return;\n \n \n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x));\n }\n if (!isScrolling) {\n isTouched = false;\n return;\n }\n \n scrollTop = container[0].scrollTop;\n if (typeof wasScrolled === 'undefined' && scrollTop !== 0) wasScrolled = true;\n \n if (!isMoved) {\n /*jshint validthis:true */\n container.removeClass('transitioning');\n if (scrollTop > container[0].offsetHeight) {\n isTouched = false;\n return;\n }\n if (dynamicTriggerDistance) {\n triggerDistance = container.attr('data-ptr-distance');\n if (triggerDistance.indexOf('%') >= 0) triggerDistance = container[0].offsetHeight * parseInt(triggerDistance, 10) / 100;\n }\n startTranslate = container.hasClass('refreshing') ? triggerDistance : 0;\n if (container[0].scrollHeight === container[0].offsetHeight || app.device.os !== 'ios') {\n useTranslate = true;\n }\n else {\n useTranslate = false;\n }\n }\n isMoved = true;\n touchesDiff = pageY - touchesStart.y;\n \n if (touchesDiff > 0 && scrollTop <= 0 || scrollTop < 0) {\n // iOS 8 fix\n if (app.device.os === 'ios' && parseInt(app.device.osVersion.split('.')[0], 10) > 7 && scrollTop === 0 && !wasScrolled) useTranslate = true;\n \n if (useTranslate) {\n e.preventDefault();\n translate = (Math.pow(touchesDiff, 0.85) + startTranslate);\n container.transform('translate3d(0,' + translate + 'px,0)');\n }\n if ((useTranslate && Math.pow(touchesDiff, 0.85) > triggerDistance) || (!useTranslate && touchesDiff >= triggerDistance * 2)) {\n refresh = true;\n container.addClass('pull-up').removeClass('pull-down');\n }\n else {\n refresh = false;\n container.removeClass('pull-up').addClass('pull-down');\n }\n if (!pullStarted) {\n container.trigger('pullstart ptr:pullstart');\n pullStarted = true;\n }\n container.trigger('pullmove ptr:pullmove', {\n event: e,\n scrollTop: scrollTop,\n translate: translate,\n touchesDiff: touchesDiff\n });\n }\n else {\n pullStarted = false;\n container.removeClass('pull-up pull-down');\n refresh = false;\n return;\n }\n }\n function handleTouchEnd(e) {\n if (e.type === 'touchend' && e.changedTouches && e.changedTouches.length > 0 && touchId) {\n if (e.changedTouches[0].identifier !== touchId) return;\n }\n if (!isTouched || !isMoved) {\n isTouched = false;\n isMoved = false;\n return;\n }\n if (translate) {\n container.addClass('transitioning');\n translate = 0;\n }\n container.transform('');\n if (refresh) {\n container.addClass('refreshing');\n container.trigger('refresh ptr:refresh', {\n done: function () {\n app.pullToRefreshDone(container);\n }\n });\n }\n else {\n container.removeClass('pull-down');\n }\n isTouched = false;\n isMoved = false;\n if (pullStarted) container.trigger('pullend ptr:pullend');\n }\n \n // Attach Events\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n eventsTarget.on(app.touchEvents.start, handleTouchStart, passiveListener);\n eventsTarget.on(app.touchEvents.move, handleTouchMove, activeListener);\n eventsTarget.on(app.touchEvents.end, handleTouchEnd, passiveListener);\n \n // Detach Events on page remove\n if (page.length === 0) return;\n function destroyPullToRefresh(destroyTarget) {\n destroyTarget.off(app.touchEvents.start, handleTouchStart, passiveListener);\n destroyTarget.off(app.touchEvents.move, handleTouchMove, activeListener);\n destroyTarget.off(app.touchEvents.end, handleTouchEnd, passiveListener);\n }\n for (var i = 0; i < eventsTarget.length; i++) {\n eventsTarget[i].f7DestroyPullToRefresh = destroyPullToRefresh;\n }\n function detachEvents() {\n destroyPullToRefresh(eventsTarget);\n page.off('page:beforeremove', detachEvents);\n }\n page.on('page:beforeremove', detachEvents);\n \n };\n \n app.pullToRefreshDone = function (container) {\n container = $(container);\n if (container.length === 0) container = $('.pull-to-refresh-content.refreshing');\n container.removeClass('refreshing').addClass('transitioning');\n container.transitionEnd(function () {\n container.removeClass('transitioning pull-up pull-down');\n container.trigger('refreshdone ptr:done');\n });\n };\n app.pullToRefreshTrigger = function (container) {\n container = $(container);\n if (container.length === 0) container = $('.pull-to-refresh-content');\n if (container.hasClass('refreshing')) return;\n container.addClass('transitioning refreshing');\n container.trigger('refresh ptr:refresh', {\n done: function () {\n app.pullToRefreshDone(container);\n }\n });\n };\n \n app.destroyPullToRefresh = function (pageContainer) {\n pageContainer = $(pageContainer);\n var pullToRefreshContent = pageContainer.hasClass('pull-to-refresh-content') ? pageContainer : pageContainer.find('.pull-to-refresh-content');\n if (pullToRefreshContent.length === 0) return;\n if (pullToRefreshContent[0].f7DestroyPullToRefresh) pullToRefreshContent[0].f7DestroyPullToRefresh(pageContainer);\n };\n \n\n /* ===============================================================================\n ************ Infinite Scroll ************\n =============================================================================== */\n function handleInfiniteScroll() {\n /*jshint validthis:true */\n var inf = $(this);\n var scrollTop = inf[0].scrollTop;\n var scrollHeight = inf[0].scrollHeight;\n var height = inf[0].offsetHeight;\n var distance = inf[0].getAttribute('data-distance');\n var virtualListContainer = inf.find('.virtual-list');\n var virtualList;\n var onTop = inf.hasClass('infinite-scroll-top');\n if (!distance) distance = 50;\n if (typeof distance === 'string' && distance.indexOf('%') >= 0) {\n distance = parseInt(distance, 10) / 100 * height;\n }\n if (distance > height) distance = height;\n if (onTop) {\n if (scrollTop < distance) {\n inf.trigger('infinite');\n }\n }\n else {\n if (scrollTop + height >= scrollHeight - distance) {\n if (virtualListContainer.length > 0) {\n virtualList = virtualListContainer.eq(-1)[0].f7VirtualList;\n if (virtualList && !virtualList.reachEnd && !virtualList.params.updatableScroll) {\n return;\n }\n }\n inf.trigger('infinite');\n }\n }\n \n }\n app.attachInfiniteScroll = function (infiniteContent) {\n $(infiniteContent).on('scroll', handleInfiniteScroll);\n };\n app.detachInfiniteScroll = function (infiniteContent) {\n $(infiniteContent).off('scroll', handleInfiniteScroll);\n };\n \n app.initPageInfiniteScroll = function (pageContainer) {\n pageContainer = $(pageContainer);\n var infiniteContent = pageContainer.find('.infinite-scroll');\n if (infiniteContent.length === 0) return;\n app.attachInfiniteScroll(infiniteContent);\n function detachEvents() {\n app.detachInfiniteScroll(infiniteContent);\n pageContainer.off('page:beforeremove', detachEvents);\n }\n pageContainer.on('page:beforeremove', detachEvents);\n };\n\n /*=============================================================\n ************ Hide/show Toolbar/Navbar on scroll ************\n =============================================================*/\n app.initPageScrollToolbars = function (pageContainer) {\n pageContainer = $(pageContainer);\n var scrollContent = pageContainer.find('.page-content');\n if (scrollContent.length === 0) return;\n var hideNavbar = (app.params.hideNavbarOnPageScroll || scrollContent.hasClass('hide-navbar-on-scroll') || scrollContent.hasClass('hide-bars-on-scroll')) && !(scrollContent.hasClass('keep-navbar-on-scroll') || scrollContent.hasClass('keep-bars-on-scroll'));\n var hideToolbar = (app.params.hideToolbarOnPageScroll || scrollContent.hasClass('hide-toolbar-on-scroll') || scrollContent.hasClass('hide-bars-on-scroll')) && !(scrollContent.hasClass('keep-toolbar-on-scroll') || scrollContent.hasClass('keep-bars-on-scroll'));\n var hideTabbar = (app.params.hideTabbarOnPageScroll || scrollContent.hasClass('hide-tabbar-on-scroll')) && !(scrollContent.hasClass('keep-tabbar-on-scroll'));\n \n if (!(hideNavbar || hideToolbar || hideTabbar)) return;\n \n var viewContainer = scrollContent.parents('.' + app.params.viewClass);\n if (viewContainer.length === 0) return;\n \n var navbar = viewContainer.find('.navbar'),\n toolbar = viewContainer.find('.toolbar'),\n tabbar;\n if (hideTabbar) {\n tabbar = viewContainer.find('.tabbar');\n if (tabbar.length === 0) tabbar = viewContainer.parents('.' + app.params.viewsClass).find('.tabbar');\n }\n \n var hasNavbar = navbar.length > 0,\n hasToolbar = toolbar.length > 0,\n hasTabbar = tabbar && tabbar.length > 0;\n \n var previousScroll, currentScroll;\n previousScroll = currentScroll = scrollContent[0].scrollTop;\n \n var scrollHeight, offsetHeight, reachEnd, action, navbarHidden, toolbarHidden, tabbarHidden;\n \n var toolbarHeight = (hasToolbar && hideToolbar) ? toolbar[0].offsetHeight : 0;\n var tabbarHeight = (hasTabbar && hideTabbar) ? tabbar[0].offsetHeight : 0;\n var bottomBarHeight = tabbarHeight || toolbarHeight;\n \n function handleScroll(e) {\n if (pageContainer.hasClass('page-on-left')) return;\n currentScroll = scrollContent[0].scrollTop;\n scrollHeight = scrollContent[0].scrollHeight;\n offsetHeight = scrollContent[0].offsetHeight;\n reachEnd = currentScroll + offsetHeight >= scrollHeight - bottomBarHeight;\n navbarHidden = navbar.hasClass('navbar-hidden');\n toolbarHidden = toolbar.hasClass('toolbar-hidden');\n tabbarHidden = tabbar && tabbar.hasClass('toolbar-hidden');\n \n if (reachEnd) {\n if (app.params.showBarsOnPageScrollEnd) {\n action = 'show';\n }\n }\n else if (previousScroll > currentScroll) {\n if (app.params.showBarsOnPageScrollTop || currentScroll <= 44) {\n action = 'show';\n }\n else {\n action = 'hide';\n }\n }\n else {\n if (currentScroll > 44) {\n action = 'hide';\n }\n else {\n action = 'show';\n }\n }\n \n if (action === 'show') {\n if (hasNavbar && hideNavbar && navbarHidden) {\n app.showNavbar(navbar);\n pageContainer.removeClass('no-navbar-by-scroll');\n navbarHidden = false;\n }\n if (hasToolbar && hideToolbar && toolbarHidden) {\n app.showToolbar(toolbar);\n pageContainer.removeClass('no-toolbar-by-scroll');\n toolbarHidden = false;\n }\n if (hasTabbar && hideTabbar && tabbarHidden) {\n app.showToolbar(tabbar);\n pageContainer.removeClass('no-tabbar-by-scroll');\n tabbarHidden = false;\n }\n }\n else {\n if (hasNavbar && hideNavbar && !navbarHidden) {\n app.hideNavbar(navbar);\n pageContainer.addClass('no-navbar-by-scroll');\n navbarHidden = true;\n }\n if (hasToolbar && hideToolbar && !toolbarHidden) {\n app.hideToolbar(toolbar);\n pageContainer.addClass('no-toolbar-by-scroll');\n toolbarHidden = true;\n }\n if (hasTabbar && hideTabbar && !tabbarHidden) {\n app.hideToolbar(tabbar);\n pageContainer.addClass('no-tabbar-by-scroll');\n tabbarHidden = true;\n }\n }\n \n previousScroll = currentScroll;\n }\n scrollContent.on('scroll', handleScroll);\n scrollContent[0].f7ScrollToolbarsHandler = handleScroll;\n };\n app.destroyScrollToolbars = function (pageContainer) {\n pageContainer = $(pageContainer);\n var scrollContent = pageContainer.find('.page-content');\n if (scrollContent.length === 0) return;\n var handler = scrollContent[0].f7ScrollToolbarsHandler;\n if (!handler) return;\n scrollContent.off('scroll', scrollContent[0].f7ScrollToolbarsHandler);\n };\n \n\n /*======================================================\n ************ Material Tabbar ************\n ======================================================*/\n app.materialTabbarSetHighlight = function (tabbar, activeLink) {\n $(tabbar).each(function () {\n var tabbar = $(this);\n activeLink = activeLink || tabbar.find('.tab-link.active');\n \n if (activeLink && activeLink.length > 0) {\n var tabLinkWidth, highlightTranslate;\n if (tabbar.hasClass('tabbar-scrollable')) {\n tabLinkWidth = activeLink[0].offsetWidth + 'px';\n highlightTranslate = activeLink[0].offsetLeft + 'px';\n }\n else {\n tabLinkWidth = 1 / tabbar.find('.tab-link').length * 100 + '%';\n highlightTranslate = (app.rtl ? - activeLink.index(): activeLink.index()) * 100 + '%';\n }\n \n tabbar.find('.tab-link-highlight')\n .css({width: tabLinkWidth})\n .transform('translate3d(' + highlightTranslate + ',0,0)');\n }\n });\n };\n app.initPageMaterialTabbar = function (pageContainer) {\n pageContainer = $(pageContainer);\n var tabbar = pageContainer.find('.tabbar');\n if (tabbar.length === 0 && pageContainer.hasClass('tabbar')) tabbar = pageContainer;\n \n function tabbarSetHighlight() {\n app.materialTabbarSetHighlight(tabbar);\n }\n if (tabbar.length > 0) {\n if (tabbar.find('.tab-link-highlight').length === 0) {\n tabbar.find('.toolbar-inner').append('');\n }\n \n tabbarSetHighlight();\n app.onResize(tabbarSetHighlight);\n pageContainer.once('page:beforeremove', function () {\n app.offResize(tabbarSetHighlight);\n });\n }\n };\n app.initMaterialTabbar = function (tabbar) {\n return app.initPageMaterialTabbar(tabbar);\n };\n \n\n /* ===============================================================================\n ************ Tabs ************\n =============================================================================== */\n app.showTab = function (tab, tabLink, animated, force) {\n var newTab = $(tab);\n if (arguments.length === 2 && typeof arguments[1] === 'boolean') {\n tab = arguments[0];\n animated = arguments[1];\n }\n if (arguments.length === 3 && typeof arguments[1] === 'boolean' && typeof arguments[2] === 'boolean') {\n tab = arguments[0];\n animated = arguments[1];\n force = arguments[2];\n }\n if (typeof animated === 'undefined') animated = true;\n if (newTab.length === 0) return false;\n if (newTab.hasClass('active')) {\n if (force) newTab.trigger('show tab:show');\n return false;\n }\n var tabs = newTab.parent('.tabs');\n if (tabs.length === 0) return false;\n \n // Return swipeouts in hidden tabs\n app.allowSwipeout = true;\n \n // Animated tabs\n var isAnimatedTabs = tabs.parent().hasClass('tabs-animated-wrap');\n if (isAnimatedTabs) {\n tabs.parent()[animated ? 'removeClass' : 'addClass']('not-animated');\n var tabTranslate = (app.rtl ? newTab.index() : -newTab.index()) * 100;\n tabs.transform('translate3d(' + tabTranslate + '%,0,0)');\n }\n \n // Swipeable tabs\n var isSwipeableTabs = tabs.parent().hasClass('tabs-swipeable-wrap'), swiper;\n if (isSwipeableTabs) {\n swiper = tabs.parent()[0].swiper;\n if (swiper.activeIndex !== newTab.index()) swiper.slideTo(newTab.index(), animated ? undefined : 0, false);\n }\n \n // Remove active class from old tabs\n var oldTab = tabs.children('.tab.active').removeClass('active').trigger('hide tab:hide');\n // Add active class to new tab\n newTab.addClass('active');\n // Trigger 'show' event on new tab\n newTab.trigger('show tab:show');\n \n // Update navbars in new tab\n if (!isAnimatedTabs && !isSwipeableTabs && newTab.find('.navbar').length > 0) {\n // Find tab's view\n var viewContainer;\n if (newTab.hasClass(app.params.viewClass)) viewContainer = newTab[0];\n else viewContainer = newTab.parents('.' + app.params.viewClass)[0];\n app.sizeNavbars(viewContainer);\n }\n \n // Find related link for new tab\n if (tabLink) tabLink = $(tabLink);\n else {\n // Search by id\n if (typeof tab === 'string') tabLink = $('.tab-link[href=\"' + tab + '\"]');\n else tabLink = $('.tab-link[href=\"#' + newTab.attr('id') + '\"]');\n // Search by data-tab\n if (!tabLink || tabLink && tabLink.length === 0) {\n $('[data-tab]').each(function () {\n if (newTab.is($(this).attr('data-tab'))) tabLink = $(this);\n });\n }\n }\n if (tabLink.length === 0) return;\n \n // Find related link for old tab\n var oldTabLink;\n if (oldTab && oldTab.length > 0) {\n // Search by id\n var oldTabId = oldTab.attr('id');\n if (oldTabId) oldTabLink = $('.tab-link[href=\"#' + oldTabId + '\"]');\n // Search by data-tab\n if (!oldTabLink || oldTabLink && oldTabLink.length === 0) {\n $('[data-tab]').each(function () {\n if (oldTab.is($(this).attr('data-tab'))) oldTabLink = $(this);\n });\n }\n }\n \n // Update links' classes\n if (tabLink && tabLink.length > 0) {\n tabLink.addClass('active');\n // Material Highlight\n if (app.params.material) {\n var tabbar = tabLink.parents('.tabbar');\n if (tabbar.length > 0) {\n if (tabbar.find('.tab-link-highlight').length === 0) {\n tabbar.find('.toolbar-inner').append('');\n }\n app.materialTabbarSetHighlight(tabbar, tabLink);\n }\n }\n }\n if (oldTabLink && oldTabLink.length > 0) oldTabLink.removeClass('active');\n \n return true;\n };\n\n /*===============================================================================\n ************ Accordion ************\n ===============================================================================*/\n app.accordionToggle = function (item) {\n item = $(item);\n if (item.length === 0) return;\n if (item.hasClass('accordion-item-expanded')) app.accordionClose(item);\n else app.accordionOpen(item);\n };\n app.accordionOpen = function (item) {\n item = $(item);\n var list = item.parents('.accordion-list').eq(0);\n var content = item.children('.accordion-item-content');\n if (content.length === 0) content = item.find('.accordion-item-content');\n var expandedItem = list.length > 0 && item.parent().children('.accordion-item-expanded');\n if (expandedItem.length > 0) {\n app.accordionClose(expandedItem);\n }\n content.css('height', content[0].scrollHeight + 'px').transitionEnd(function () {\n if (item.hasClass('accordion-item-expanded')) {\n content.transition(0);\n content.css('height', 'auto');\n var clientLeft = content[0].clientLeft;\n content.transition('');\n item.trigger('opened accordion:opened');\n }\n else {\n content.css('height', '');\n item.trigger('closed accordion:closed');\n }\n });\n item.trigger('open accordion:open');\n item.addClass('accordion-item-expanded');\n };\n app.accordionClose = function (item) {\n item = $(item);\n var content = item.children('.accordion-item-content');\n if (content.length === 0) content = item.find('.accordion-item-content');\n item.removeClass('accordion-item-expanded');\n content.transition(0);\n content.css('height', content[0].scrollHeight + 'px');\n // Relayout\n var clientLeft = content[0].clientLeft;\n // Close\n content.transition('');\n content.css('height', '').transitionEnd(function () {\n if (item.hasClass('accordion-item-expanded')) {\n content.transition(0);\n content.css('height', 'auto');\n var clientLeft = content[0].clientLeft;\n content.transition('');\n item.trigger('opened accordion:opened');\n }\n else {\n content.css('height', '');\n item.trigger('closed accordion:closed');\n }\n });\n item.trigger('close accordion:close');\n };\n\n /*===============================================================================\n ************ Fast Clicks ************\n ************ Inspired by https://github.com/ftlabs/fastclick ************\n ===============================================================================*/\n app.initFastClicks = function () {\n if (app.params.activeState) {\n $('html').addClass('watch-active-state');\n }\n if (app.device.ios && app.device.webView) {\n // Strange hack required for iOS 8 webview to work on inputs\n window.addEventListener('touchstart', function () {});\n }\n \n var touchStartX, touchStartY, touchStartTime, targetElement, trackClick, activeSelection, scrollParent, lastClickTime, isMoved, tapHoldFired, tapHoldTimeout;\n var activableElement, activeTimeout, needsFastClick, needsFastClickTimeOut;\n var rippleWave, rippleTarget, rippleTransform, rippleTimeout;\n function findActivableElement(el) {\n var target = $(el);\n var parents = target.parents(app.params.activeStateElements);\n var activable;\n if (target.is(app.params.activeStateElements)) {\n activable = target;\n }\n if (parents.length > 0) {\n activable = activable ? activable.add(parents) : parents;\n }\n return activable ? activable : target;\n }\n function isInsideScrollableView(el) {\n var pageContent = el.parents('.page-content, .panel');\n \n if (pageContent.length === 0) {\n return false;\n }\n \n // This event handler covers the \"tap to stop scrolling\".\n if (pageContent.prop('scrollHandlerSet') !== 'yes') {\n pageContent.on('scroll', function() {\n clearTimeout(activeTimeout);\n clearTimeout(rippleTimeout);\n });\n pageContent.prop('scrollHandlerSet', 'yes');\n }\n \n return true;\n }\n function addActive() {\n if (!activableElement) return;\n activableElement.addClass('active-state');\n }\n function removeActive(el) {\n if (!activableElement) return;\n activableElement.removeClass('active-state');\n activableElement = null;\n }\n function isFormElement(el) {\n var nodes = ('input select textarea label').split(' ');\n if (el.nodeName && nodes.indexOf(el.nodeName.toLowerCase()) >= 0) return true;\n return false;\n }\n function androidNeedsBlur(el) {\n var noBlur = ('button input textarea select').split(' ');\n if (document.activeElement && el !== document.activeElement && document.activeElement !== document.body) {\n if (noBlur.indexOf(el.nodeName.toLowerCase()) >= 0) {\n return false;\n }\n else {\n return true;\n }\n }\n else {\n return false;\n }\n }\n function targetNeedsFastClick(el) {\n var $el = $(el);\n if (el.nodeName.toLowerCase() === 'input' && (el.type === 'file' || el.type === 'range')) return false;\n if (el.nodeName.toLowerCase() === 'select' && app.device.android) return false;\n if ($el.hasClass('no-fastclick') || $el.parents('.no-fastclick').length > 0) return false;\n if (app.params.fastClicksExclude && $el.is(app.params.fastClicksExclude)) return false;\n return true;\n }\n function targetNeedsFocus(el) {\n if (document.activeElement === el) {\n return false;\n }\n var tag = el.nodeName.toLowerCase();\n var skipInputs = ('button checkbox file image radio submit').split(' ');\n if (el.disabled || el.readOnly) return false;\n if (tag === 'textarea') return true;\n if (tag === 'select') {\n if (app.device.android) return false;\n else return true;\n }\n if (tag === 'input' && skipInputs.indexOf(el.type) < 0) return true;\n }\n function targetNeedsPrevent(el) {\n el = $(el);\n var prevent = true;\n if (el.is('label') || el.parents('label').length > 0) {\n if (app.device.android) {\n prevent = false;\n }\n else if (app.device.ios && el.is('input')) {\n prevent = true;\n }\n else prevent = false;\n }\n return prevent;\n }\n \n // Mouse Handlers\n function handleMouseDown (e) {\n findActivableElement(e.target).addClass('active-state');\n if ('which' in e && e.which === 3) {\n setTimeout(function () {\n $('.active-state').removeClass('active-state');\n }, 0);\n }\n if (app.params.material && app.params.materialRipple) {\n touchStartX = e.pageX;\n touchStartY = e.pageY;\n rippleTouchStart(e.target, e.pageX, e.pageY);\n }\n }\n function handleMouseMove (e) {\n $('.active-state').removeClass('active-state');\n if (app.params.material && app.params.materialRipple) {\n rippleTouchMove();\n }\n }\n function handleMouseUp (e) {\n $('.active-state').removeClass('active-state');\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n }\n \n // Material Touch Ripple Effect\n function findRippleElement(el) {\n var needsRipple = app.params.materialRippleElements;\n var $el = $(el);\n if ($el.is(needsRipple)) {\n if ($el.hasClass('no-ripple')) {\n return false;\n }\n return $el;\n }\n else if ($el.parents(needsRipple).length > 0) {\n var rippleParent = $el.parents(needsRipple).eq(0);\n if (rippleParent.hasClass('no-ripple')) {\n return false;\n }\n return rippleParent;\n }\n else return false;\n }\n function createRipple(x, y, el) {\n if (!el) return;\n var box = el[0].getBoundingClientRect();\n var center = {\n x: x - box.left,\n y: y - box.top\n },\n height = box.height,\n width = box.width;\n var diameter = Math.max(Math.pow((Math.pow(height, 2) + Math.pow(width, 2)), 0.5), 48);\n \n rippleWave = $(\n '
                                      '\n );\n el.prepend(rippleWave);\n var clientLeft = rippleWave[0].clientLeft;\n rippleTransform = 'translate3d('+(-center.x + width/2)+'px, '+(-center.y + height/2)+'px, 0) scale(1)';\n rippleWave.transform(rippleTransform);\n }\n \n function removeRipple() {\n if (!rippleWave) return;\n var toRemove = rippleWave;\n \n var removeTimeout = setTimeout(function () {\n toRemove.remove();\n }, 400);\n \n rippleWave\n .addClass('ripple-wave-fill')\n .transform(rippleTransform.replace('scale(1)', 'scale(1.01)'))\n .transitionEnd(function () {\n clearTimeout(removeTimeout);\n \n var rippleWave = $(this)\n .addClass('ripple-wave-out')\n .transform(rippleTransform.replace('scale(1)', 'scale(1.01)'));\n \n removeTimeout = setTimeout(function () {\n rippleWave.remove();\n }, 700);\n \n setTimeout(function () {\n rippleWave.transitionEnd(function(){\n clearTimeout(removeTimeout);\n $(this).remove();\n });\n }, 0);\n });\n \n rippleWave = rippleTarget = undefined;\n }\n \n function rippleTouchStart (el, x, y) {\n rippleTarget = findRippleElement(el);\n if (!rippleTarget || rippleTarget.length === 0) {\n rippleTarget = undefined;\n return;\n }\n if (!isInsideScrollableView(rippleTarget)) {\n createRipple(touchStartX, touchStartY, rippleTarget);\n }\n else {\n rippleTimeout = setTimeout(function () {\n createRipple(touchStartX, touchStartY, rippleTarget);\n }, 80);\n }\n }\n function rippleTouchMove() {\n clearTimeout(rippleTimeout);\n removeRipple();\n }\n function rippleTouchEnd() {\n if (rippleWave) {\n removeRipple();\n }\n else if (rippleTarget && !isMoved) {\n clearTimeout(rippleTimeout);\n createRipple(touchStartX, touchStartY, rippleTarget);\n setTimeout(removeRipple, 0);\n }\n else {\n removeRipple();\n }\n }\n \n // Send Click\n function sendClick(e) {\n var touch = e.changedTouches[0];\n var evt = document.createEvent('MouseEvents');\n var eventType = 'click';\n if (app.device.android && targetElement.nodeName.toLowerCase() === 'select') {\n eventType = 'mousedown';\n }\n evt.initMouseEvent(eventType, true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);\n evt.forwardedTouchEvent = true;\n targetElement.dispatchEvent(evt);\n }\n \n // Touch Handlers\n function handleTouchStart(e) {\n isMoved = false;\n tapHoldFired = false;\n if (e.targetTouches.length > 1) {\n if (activableElement) removeActive();\n return true;\n }\n if (e.touches.length > 1 && activableElement) {\n removeActive();\n }\n if (app.params.tapHold) {\n if (tapHoldTimeout) clearTimeout(tapHoldTimeout);\n tapHoldTimeout = setTimeout(function () {\n if (e && e.touches && e.touches.length > 1) return;\n tapHoldFired = true;\n e.preventDefault();\n $(e.target).trigger('taphold');\n }, app.params.tapHoldDelay);\n }\n if (needsFastClickTimeOut) clearTimeout(needsFastClickTimeOut);\n needsFastClick = targetNeedsFastClick(e.target);\n \n if (!needsFastClick) {\n trackClick = false;\n return true;\n }\n if (app.device.ios || (app.device.android && 'getSelection' in window)) {\n var selection = window.getSelection();\n if (selection.rangeCount && selection.focusNode !== document.body && (!selection.isCollapsed || document.activeElement === selection.focusNode)) {\n activeSelection = true;\n return true;\n }\n else {\n activeSelection = false;\n }\n }\n if (app.device.android) {\n if (androidNeedsBlur(e.target)) {\n document.activeElement.blur();\n }\n }\n \n trackClick = true;\n targetElement = e.target;\n touchStartTime = (new Date()).getTime();\n touchStartX = e.targetTouches[0].pageX;\n touchStartY = e.targetTouches[0].pageY;\n \n // Detect scroll parent\n if (app.device.ios) {\n scrollParent = undefined;\n $(targetElement).parents().each(function () {\n var parent = this;\n if (parent.scrollHeight > parent.offsetHeight && !scrollParent) {\n scrollParent = parent;\n scrollParent.f7ScrollTop = scrollParent.scrollTop;\n }\n });\n }\n if ((e.timeStamp - lastClickTime) < app.params.fastClicksDelayBetweenClicks) {\n e.preventDefault();\n }\n \n if (app.params.activeState) {\n activableElement = findActivableElement(targetElement);\n // If it's inside a scrollable view, we don't trigger active-state yet,\n // because it can be a scroll instead. Based on the link:\n // http://labnote.beedesk.com/click-scroll-and-pseudo-active-on-mobile-webk\n if (!isInsideScrollableView(activableElement)) {\n addActive();\n } else {\n activeTimeout = setTimeout(addActive, 80);\n }\n }\n if (app.params.material && app.params.materialRipple) {\n rippleTouchStart(targetElement, touchStartX, touchStartY);\n }\n }\n function handleTouchMove(e) {\n if (!trackClick) return;\n var _isMoved = false;\n var distance = app.params.fastClicksDistanceThreshold;\n if (distance) {\n var pageX = e.targetTouches[0].pageX;\n var pageY = e.targetTouches[0].pageY;\n if (Math.abs(pageX - touchStartX) > distance || Math.abs(pageY - touchStartY) > distance) {\n _isMoved = true;\n }\n }\n else {\n _isMoved = true;\n }\n if (_isMoved) {\n trackClick = false;\n targetElement = null;\n isMoved = true;\n if (app.params.tapHold) {\n clearTimeout(tapHoldTimeout);\n }\n \t\t\tif (app.params.activeState) {\n \t\t\t\tclearTimeout(activeTimeout);\n \t\t\t\tremoveActive();\n \t\t\t}\n if (app.params.material && app.params.materialRipple) {\n rippleTouchMove();\n }\n }\n }\n function handleTouchEnd(e) {\n clearTimeout(activeTimeout);\n clearTimeout(tapHoldTimeout);\n \n if (!trackClick) {\n if (!activeSelection && needsFastClick) {\n if (!(app.device.android && !e.cancelable)) {\n e.preventDefault();\n }\n }\n return true;\n }\n \n if (document.activeElement === e.target) {\n if (app.params.activeState) removeActive();\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n return true;\n }\n \n if (!activeSelection) {\n e.preventDefault();\n }\n \n if ((e.timeStamp - lastClickTime) < app.params.fastClicksDelayBetweenClicks) {\n setTimeout(removeActive, 0);\n return true;\n }\n \n lastClickTime = e.timeStamp;\n \n trackClick = false;\n \n if (app.device.ios && scrollParent) {\n if (scrollParent.scrollTop !== scrollParent.f7ScrollTop) {\n return false;\n }\n }\n \n // Add active-state here because, in a very fast tap, the timeout didn't\n // have the chance to execute. Removing active-state in a timeout gives\n // the chance to the animation execute.\n if (app.params.activeState) {\n addActive();\n setTimeout(removeActive, 0);\n }\n // Remove Ripple\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n \n // Trigger focus when required\n if (targetNeedsFocus(targetElement)) {\n if (app.device.ios && app.device.webView) {\n if ((event.timeStamp - touchStartTime) > 159) {\n targetElement = null;\n return false;\n }\n targetElement.focus();\n return false;\n }\n else {\n targetElement.focus();\n }\n }\n \n // Blur active elements\n if (document.activeElement && targetElement !== document.activeElement && document.activeElement !== document.body && targetElement.nodeName.toLowerCase() !== 'label') {\n document.activeElement.blur();\n }\n \n // Send click\n e.preventDefault();\n sendClick(e);\n return false;\n }\n function handleTouchCancel(e) {\n trackClick = false;\n targetElement = null;\n \n // Remove Active State\n clearTimeout(activeTimeout);\n clearTimeout(tapHoldTimeout);\n if (app.params.activeState) {\n removeActive();\n }\n \n // Remove Ripple\n if (app.params.material && app.params.materialRipple) {\n rippleTouchEnd();\n }\n }\n \n function handleClick(e) {\n var allowClick = false;\n \n if (trackClick) {\n targetElement = null;\n trackClick = false;\n return true;\n }\n if (e.target.type === 'submit' && e.detail === 0 || e.target.type === 'file') {\n return true;\n }\n if (!targetElement) {\n if (!isFormElement(e.target)) {\n allowClick = true;\n }\n }\n if (!needsFastClick) {\n allowClick = true;\n }\n if (document.activeElement === targetElement) {\n allowClick = true;\n }\n if (e.forwardedTouchEvent) {\n allowClick = true;\n }\n if (!e.cancelable) {\n allowClick = true;\n }\n if (app.params.tapHold && app.params.tapHoldPreventClicks && tapHoldFired) {\n allowClick = false;\n }\n if (!allowClick) {\n e.stopImmediatePropagation();\n e.stopPropagation();\n if (targetElement) {\n if (targetNeedsPrevent(targetElement) || isMoved) {\n e.preventDefault();\n }\n }\n else {\n e.preventDefault();\n }\n targetElement = null;\n }\n needsFastClickTimeOut = setTimeout(function () {\n needsFastClick = false;\n }, (app.device.ios || app.device.androidChrome ? 100 : 400));\n \n if (app.params.tapHold) {\n tapHoldTimeout = setTimeout(function () {\n tapHoldFired = false;\n }, (app.device.ios || app.device.androidChrome ? 100 : 400));\n }\n \n return allowClick;\n }\n if (app.support.touch) {\n document.addEventListener('click', handleClick, true);\n \n document.addEventListener('touchstart', handleTouchStart);\n document.addEventListener('touchmove', handleTouchMove);\n document.addEventListener('touchend', handleTouchEnd);\n document.addEventListener('touchcancel', handleTouchCancel);\n }\n else {\n if (app.params.activeState) {\n document.addEventListener('mousedown', handleMouseDown);\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n }\n }\n if (app.params.material && app.params.materialRipple) {\n document.addEventListener('contextmenu', function (e) {\n if (activableElement) removeActive();\n rippleTouchEnd();\n });\n }\n \n };\n \n\n /*===============================================================================\n ************ Handle clicks and make them fast (on tap); ************\n ===============================================================================*/\n app.initClickEvents = function () {\n function handleScrollTop(e) {\n /*jshint validthis:true */\n var clicked = $(this);\n var target = $(e.target);\n var isLink = clicked[0].nodeName.toLowerCase() === 'a' ||\n clicked.parents('a').length > 0 ||\n target[0].nodeName.toLowerCase() === 'a' ||\n target.parents('a').length > 0;\n \n if (isLink) return;\n var pageContent, page;\n if (app.params.scrollTopOnNavbarClick && clicked.is('.navbar .center')) {\n // Find active page\n var navbar = clicked.parents('.navbar');\n \n // Static Layout\n pageContent = navbar.parents('.page-content');\n \n if (pageContent.length === 0) {\n // Fixed Layout\n if (navbar.parents('.page').length > 0) {\n pageContent = navbar.parents('.page').find('.page-content');\n }\n // Through Layout\n if (pageContent.length === 0) {\n if (navbar.nextAll('.pages').length > 0) {\n pageContent = navbar.nextAll('.pages').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n }\n }\n }\n if (app.params.scrollTopOnStatusbarClick && clicked.is('.statusbar-overlay')) {\n if ($('.popup.modal-in').length > 0) {\n // Check for opened popup\n pageContent = $('.popup.modal-in').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n else if ($('.panel.active').length > 0) {\n // Check for opened panel\n pageContent = $('.panel.active').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n else if ($('.views > .view.active').length > 0) {\n // View in tab bar app layout\n pageContent = $('.views > .view.active').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n else {\n // Usual case\n pageContent = $('.views').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content');\n }\n }\n \n if (pageContent && pageContent.length > 0) {\n // Check for tab\n if (pageContent.hasClass('tab')) {\n pageContent = pageContent.parent('.tabs').children('.page-content.active');\n }\n if (pageContent.length > 0) pageContent.scrollTop(0, 300);\n }\n }\n function handleClicks(e) {\n /*jshint validthis:true */\n var clicked = $(this);\n var url = clicked.attr('href');\n var isLink = clicked[0].nodeName.toLowerCase() === 'a';\n \n // Check if link is external\n if (isLink) {\n if (clicked.is(app.params.externalLinks) || (url && url.indexOf('javascript:') >= 0)) {\n if(url && clicked.attr('target') === '_system') {\n e.preventDefault();\n window.open(url, '_system');\n }\n return;\n }\n }\n \n // Collect Clicked data- attributes\n var clickedData = clicked.dataset();\n \n // Smart Select\n if (clicked.hasClass('smart-select')) {\n if (app.smartSelectOpen) app.smartSelectOpen(clicked);\n }\n \n // Open Panel\n if (clicked.hasClass('open-panel')) {\n if ($('.panel').length === 1) {\n if ($('.panel').hasClass('panel-left')) app.openPanel('left');\n else app.openPanel('right');\n }\n else {\n if (clickedData.panel === 'right') app.openPanel('right');\n else app.openPanel('left');\n }\n }\n \n // Close Panel\n if (clicked.hasClass('close-panel')) {\n app.closePanel();\n }\n \n // Panel Overlay\n if (clicked.hasClass('panel-overlay')) {\n $('.panel.active').trigger('panel:overlay-click');\n if (app.params.panelsCloseByOutside) app.closePanel();\n }\n \n // Popover\n if (clicked.hasClass('open-popover')) {\n var popover;\n if (clickedData.popover) {\n popover = clickedData.popover;\n }\n else popover = '.popover';\n app.popover(popover, clicked);\n }\n if (clicked.hasClass('close-popover')) {\n app.closeModal('.popover.modal-in');\n }\n // Popup\n var popup;\n if (clicked.hasClass('open-popup')) {\n if (clickedData.popup) {\n popup = clickedData.popup;\n }\n else popup = '.popup';\n app.popup(popup);\n }\n if (clicked.hasClass('close-popup')) {\n if (clickedData.popup) {\n popup = clickedData.popup;\n }\n else popup = '.popup.modal-in';\n app.closeModal(popup);\n }\n // Login Screen\n var loginScreen;\n if (clicked.hasClass('open-login-screen')) {\n if (clickedData.loginScreen) {\n loginScreen = clickedData.loginScreen;\n }\n else loginScreen = '.login-screen';\n app.loginScreen(loginScreen);\n }\n if (clicked.hasClass('close-login-screen')) {\n app.closeModal('.login-screen.modal-in');\n }\n // Close Modal\n if (clicked.hasClass('modal-overlay')) {\n if ($('.modal.modal-in').length > 0 && app.params.modalCloseByOutside)\n app.closeModal('.modal.modal-in');\n if ($('.actions-modal.modal-in').length > 0 && app.params.actionsCloseByOutside)\n app.closeModal('.actions-modal.modal-in');\n \n if ($('.popover.modal-in').length > 0 && app.params.popoverCloseByOutside)\n app.closeModal('.popover.modal-in');\n }\n if (clicked.hasClass('popup-overlay')) {\n if ($('.popup.modal-in').length > 0 && app.params.popupCloseByOutside)\n app.closeModal('.popup.modal-in');\n }\n if (clicked.hasClass('picker-modal-overlay')) {\n if ($('.picker-modal.modal-in').length > 0)\n app.closeModal('.picker-modal.modal-in');\n }\n \n // Picker\n if (clicked.hasClass('close-picker')) {\n var pickerToClose = $('.picker-modal.modal-in');\n if (pickerToClose.length > 0) {\n app.closeModal(pickerToClose);\n }\n else {\n pickerToClose = $('.popover.modal-in .picker-modal');\n if (pickerToClose.length > 0) {\n app.closeModal(pickerToClose.parents('.popover'));\n }\n }\n }\n if (clicked.hasClass('open-picker')) {\n var pickerToOpen;\n if (clickedData.picker) {\n pickerToOpen = clickedData.picker;\n }\n else pickerToOpen = '.picker-modal';\n app.pickerModal(pickerToOpen, clicked);\n }\n \n // Tabs\n var isTabLink;\n if (clicked.hasClass('tab-link')) {\n isTabLink = true;\n app.showTab(clickedData.tab || clicked.attr('href'), clicked);\n }\n // Swipeout Close\n if (clicked.hasClass('swipeout-close')) {\n app.swipeoutClose(clicked.parents('.swipeout-opened'));\n }\n // Swipeout Delete\n if (clicked.hasClass('swipeout-delete')) {\n if (clickedData.confirm) {\n var text = clickedData.confirm;\n var title = clickedData.confirmTitle;\n if (title) {\n app.confirm(text, title, function () {\n app.swipeoutDelete(clicked.parents('.swipeout'));\n }, function () {\n if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout'));\n });\n }\n else {\n app.confirm(text, function () {\n app.swipeoutDelete(clicked.parents('.swipeout'));\n }, function () {\n if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout'));\n });\n }\n }\n else {\n app.swipeoutDelete(clicked.parents('.swipeout'));\n }\n \n }\n // Sortable\n if (clicked.hasClass('toggle-sortable')) {\n app.sortableToggle(clickedData.sortable);\n }\n if (clicked.hasClass('open-sortable')) {\n app.sortableOpen(clickedData.sortable);\n }\n if (clicked.hasClass('close-sortable')) {\n app.sortableClose(clickedData.sortable);\n }\n // Accordion\n if (clicked.hasClass('accordion-item-toggle') || (clicked.hasClass('item-link') && clicked.parent().hasClass('accordion-item'))) {\n var accordionItem = clicked.parent('.accordion-item');\n if (accordionItem.length === 0) accordionItem = clicked.parents('.accordion-item');\n if (accordionItem.length === 0) accordionItem = clicked.parents('li');\n app.accordionToggle(accordionItem);\n }\n \n // Speed Dial\n if (clicked.hasClass('floating-button') && clicked.parent().hasClass('speed-dial')) {\n clicked.parent().toggleClass('speed-dial-opened');\n }\n if (clicked.hasClass('close-speed-dial')) {\n $('.speed-dial-opened').removeClass('speed-dial-opened');\n }\n \n // Load Page\n if (app.params.ajaxLinks && !clicked.is(app.params.ajaxLinks) || !isLink || !app.params.router) {\n return;\n }\n if (isLink) {\n e.preventDefault();\n }\n \n var validUrl = url && url.length > 0 && url !== '#' && !isTabLink;\n var template = clickedData.template;\n if (validUrl || clicked.hasClass('back') || template) {\n var view;\n if (clickedData.view) {\n view = $(clickedData.view)[0].f7View;\n }\n else {\n view = clicked.parents('.' + app.params.viewClass)[0] && clicked.parents('.' + app.params.viewClass)[0].f7View;\n if (view && view.params.linksView) {\n if (typeof view.params.linksView === 'string') view = $(view.params.linksView)[0].f7View;\n else if (view.params.linksView instanceof View) view = view.params.linksView;\n }\n }\n if (!view) {\n if (app.mainView) view = app.mainView;\n }\n if (!view) return;\n \n var pageName;\n if (!template) {\n if (url && url.indexOf('#') === 0 && url !== '#') {\n if (view.params.domCache) {\n pageName = url.split('#')[1];\n }\n else return;\n }\n if (url === '#' && !clicked.hasClass('back')) return;\n }\n else {\n url = undefined;\n }\n \n var animatePages;\n if (typeof clickedData.animatePages !== 'undefined') {\n animatePages = clickedData.animatePages;\n }\n else {\n if (clicked.hasClass('with-animation')) animatePages = true;\n if (clicked.hasClass('no-animation')) animatePages = false;\n }\n \n var options = {\n animatePages: animatePages,\n ignoreCache: clickedData.ignoreCache,\n force: clickedData.force,\n reload: clickedData.reload,\n reloadPrevious: clickedData.reloadPrevious,\n pageName: pageName,\n pushState: clickedData.pushState,\n url: url\n };\n \n if (app.params.template7Pages) {\n options.contextName = clickedData.contextName;\n var context = clickedData.context;\n if (context) {\n options.context = JSON.parse(context);\n }\n }\n if (template && template in t7.templates) {\n options.template = t7.templates[template];\n }\n \n if (clicked.hasClass('back')) view.router.back(options);\n else view.router.load(options);\n }\n }\n $(document).on('click', 'a, .open-panel, .close-panel, .panel-overlay, .modal-overlay, .popup-overlay, .swipeout-delete, .swipeout-close, .close-popup, .open-popup, .open-popover, .open-login-screen, .close-login-screen .smart-select, .toggle-sortable, .open-sortable, .close-sortable, .accordion-item-toggle, .close-picker, .picker-modal-overlay', handleClicks);\n if (app.params.scrollTopOnNavbarClick || app.params.scrollTopOnStatusbarClick) {\n $(document).on('click', '.statusbar-overlay, .navbar .center', handleScrollTop);\n }\n \n // Prevent scrolling on overlays\n function preventScrolling(e) {\n e.preventDefault();\n }\n if (app.support.touch && !app.device.android) {\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n $(document).on((app.params.fastClicks ? 'touchstart' : 'touchmove'), '.panel-overlay, .modal-overlay, .preloader-indicator-overlay, .popup-overlay, .searchbar-overlay', preventScrolling, activeListener);\n }\n };\n \n\n /*======================================================\n ************ App Resize Actions ************\n ======================================================*/\n // Prevent iPad horizontal body scrolling when soft keyboard is opened\n function _fixIpadBodyScrolLeft() {\n if (app.device.ipad) {\n document.body.scrollLeft = 0;\n setTimeout(function () {\n document.body.scrollLeft = 0;\n }, 0);\n }\n }\n var appResizeCallbacks = [];\n app.getSize = function () {\n var offset = app.root.offset();\n app.width = app.root[0].offsetWidth;\n app.height = app.root[0].offsetHeight;\n app.left = offset.left;\n app.top = offset.top;\n };\n app.onResize = function (callback) {\n appResizeCallbacks.push(callback);\n };\n app.offResize = function (callback) {\n for (var i = 0; i < appResizeCallbacks.length; i++) {\n if (appResizeCallbacks[i] === callback) {\n appResizeCallbacks.splice(i, 1);\n }\n }\n };\n app.resize = function () {\n _fixIpadBodyScrolLeft();\n app.getSize();\n if (app.sizeNavbars) app.sizeNavbars();\n for (var i = 0; i < appResizeCallbacks.length; i++) {\n appResizeCallbacks[i]();\n }\n };\n app.orientationchange = function () {\n if (app.device && app.device.minimalUi) {\n if (window.orientation === 90 || window.orientation === -90) document.body.scrollTop = 0;\n }\n _fixIpadBodyScrolLeft();\n };\n app.initResize = function () {\n $(window).on('resize', app.resize);\n $(window).on('orientationchange', app.orientationchange);\n app.getSize();\n };\n \n\n /*===============================================================================\n ************ Store and parse forms data ************\n ===============================================================================*/\n app.formsData = {};\n app.formStoreData = function (formId, formJSON) {\n // Store form data in app.formsData\n app.formsData[formId] = formJSON;\n \n // Store form data in local storage also\n app.ls['f7form-' + formId] = JSON.stringify(formJSON);\n };\n app.formDeleteData = function (formId) {\n // Delete form data from app.formsData\n if (app.formsData[formId]) {\n app.formsData[formId] = '';\n delete app.formsData[formId];\n }\n \n // Delete form data from local storage also\n if (app.ls['f7form-' + formId]) {\n app.ls['f7form-' + formId] = '';\n app.ls.removeItem('f7form-' + formId);\n }\n };\n app.formGetData = function (formId) {\n // First of all check in local storage\n if (app.ls['f7form-' + formId]) {\n return JSON.parse(app.ls['f7form-' + formId]);\n }\n // Try to get it from formsData obj\n else if (app.formsData[formId]) return app.formsData[formId];\n };\n app.formToData = function (form) {\n form = $(form);\n if (form.length !== 1) return false;\n \n // Form data\n var formData = {};\n \n // Skip input types\n var skipTypes = ['submit', 'image', 'button', 'file'];\n var skipNames = [];\n form.find('input, select, textarea').each(function () {\n var input = $(this);\n var name = input.attr('name');\n var type = input.attr('type');\n var tag = this.nodeName.toLowerCase();\n if (skipTypes.indexOf(type) >= 0) return;\n if (skipNames.indexOf(name) >= 0 || !name) return;\n if (tag === 'select' && input.prop('multiple')) {\n skipNames.push(name);\n formData[name] = [];\n form.find('select[name=\"' + name + '\"] option').each(function () {\n if (this.selected) formData[name].push(this.value);\n });\n }\n else {\n switch (type) {\n case 'checkbox' :\n skipNames.push(name);\n formData[name] = [];\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (this.checked) formData[name].push(this.value);\n });\n break;\n case 'radio' :\n skipNames.push(name);\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (this.checked) formData[name] = this.value;\n });\n break;\n default :\n formData[name] = input.val();\n break;\n }\n }\n });\n form.trigger('formToJSON formToData form:todata', {formData: formData});\n \n return formData;\n };\n app.formToJSON = app.formToData;\n app.formFromData = function (form, formData) {\n form = $(form);\n if (form.length !== 1) return false;\n \n // Skip input types\n var skipTypes = ['submit', 'image', 'button', 'file'];\n var skipNames = [];\n \n form.find('input, select, textarea').each(function () {\n var input = $(this);\n var name = input.attr('name');\n var type = input.attr('type');\n var tag = this.nodeName.toLowerCase();\n if (typeof formData[name] === 'undefined' || formData[name] === null) return;\n if (skipTypes.indexOf(type) >= 0) return;\n if (skipNames.indexOf(name) >= 0 || !name) return;\n if (tag === 'select' && input.prop('multiple')) {\n skipNames.push(name);\n form.find('select[name=\"' + name + '\"] option').each(function () {\n if (formData[name].indexOf(this.value) >= 0) this.selected = true;\n else this.selected = false;\n });\n }\n else {\n switch (type) {\n case 'checkbox' :\n skipNames.push(name);\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (formData[name].indexOf(this.value) >= 0) this.checked = true;\n else this.checked = false;\n });\n break;\n case 'radio' :\n skipNames.push(name);\n form.find('input[name=\"' + name + '\"]').each(function () {\n if (formData[name] === this.value) this.checked = true;\n else this.checked = false;\n });\n break;\n default :\n input.val(formData[name]);\n break;\n }\n }\n if (tag === 'select' || tag === 'input' || tag === 'textarea') {\n input.trigger('change');\n }\n });\n form.trigger('formFromJSON formFromData form:fromdata', {formData: formData});\n };\n app.formFromJSON = app.formFromData;\n \n app.initFormsStorage = function (pageContainer) {\n pageContainer = $(pageContainer);\n var forms = pageContainer.find('form.store-data');\n if (forms.length === 0) return;\n \n // Parse forms data and fill form if there is such data\n forms.each(function () {\n var id = this.getAttribute('id');\n if (!id) return;\n var formData = app.formGetData(id);\n if (formData) app.formFromData(this, formData);\n });\n // Update forms data on inputs change\n function storeForm() {\n /*jshint validthis:true */\n var form = $(this);\n var formId = form[0].id;\n if (!formId) return;\n var formJSON = app.formToData(form);\n if (!formJSON) return;\n app.formStoreData(formId, formJSON);\n form.trigger('store form:storedata', {data: formJSON});\n }\n forms.on('change submit', storeForm);\n \n // Detach Listeners\n function pageBeforeRemove() {\n forms.off('change submit', storeForm);\n pageContainer.off('page:beforeremove', pageBeforeRemove);\n }\n pageContainer.on('page:beforeremove', pageBeforeRemove);\n };\n\n /*===============================================================================\n ************ Ajax submit for forms ************\n ===============================================================================*/\n // Ajax submit on forms\n $(document).on('submit change', 'form.ajax-submit, form.ajax-submit-onchange', function (e) {\n var form = $(this);\n if (e.type === 'change' && !form.hasClass('ajax-submit-onchange')) return;\n if (e.type === 'submit') e.preventDefault();\n \n var method = (form.attr('method') || 'GET').toUpperCase();\n var contentType = form.prop('enctype') || form.attr('enctype');\n \n var url = form.attr('action');\n if (!url) return;\n \n var data;\n if (method === 'POST') data = new FormData(form[0]);\n else data = $.serializeObject(app.formToJSON(form[0]));\n \n var xhr = $.ajax({\n method: method,\n url: url,\n contentType: contentType,\n data: data,\n beforeSend: function (xhr) {\n form.trigger('beforeSubmit form:beforesend', {data:data, xhr: xhr});\n },\n error: function (xhr) {\n form.trigger('submitError form:error', {data:data, xhr: xhr});\n },\n success: function (data) {\n form.trigger('submitted form:success', {data: data, xhr: xhr});\n }\n });\n });\n \n \n\n /*===============================================================================\n ************ Resizable textarea ************\n ===============================================================================*/\n app.resizeTextarea = function (textarea) {\n textarea = $(textarea);\n if (!textarea.hasClass('resizable')) {\n return;\n }\n textarea.css({'height': ''});\n var height = textarea[0].offsetHeight;\n var diff = height - textarea[0].clientHeight;\n var scrollHeight = textarea[0].scrollHeight;\n \n if (scrollHeight + diff > height) {\n var newAreaHeight = scrollHeight + diff;\n textarea.css('height', newAreaHeight + 'px');\n }\n };\n app.resizableTextarea = function (textarea) {\n textarea = $(textarea);\n if (textarea.length === 0) return;\n var textareaTimeout;\n function handleTextarea() {\n clearTimeout(textareaTimeout);\n textareaTimeout = setTimeout(function () {\n app.resizeTextarea(textarea);\n }, 0);\n }\n textarea[0].f7DestroyResizableTextarea = function () {\n textarea.off('change keydown keypress keyup paste cut', handleTextarea);\n };\n return textarea.on('change keydown keypress keyup paste cut', handleTextarea);\n };\n app.destroyResizableTextarea = function (pageContainer) {\n pageContainer = $(pageContainer);\n if (pageContainer.length > 0 && pageContainer.is('textarea') && pageContainer[0].f7DestroyResizableTextarea) {\n pageContainer[0].f7DestroyResizableTextarea();\n }\n else if (pageContainer.length > 0) {\n pageContainer.find('textarea.resiable').each(function () {\n var textarea = this;\n if (textarea.f7DestroyResizableTextarea) {\n textarea.f7DestroyResizableTextarea ();\n }\n });\n }\n };\n app.initPageResizableTextarea = function (pageContainer) {\n pageContainer = $(pageContainer);\n var textareas = pageContainer.find('textarea.resizable');\n textareas.each(function () {\n app.resizableTextarea(this);\n });\n };\n\n /*======================================================\n ************ Material Text Inputs ************\n ======================================================*/\n app.initPageMaterialInputs = function (pageContainer) {\n pageContainer = $(pageContainer);\n var textareas = pageContainer.find('textarea.resizable');\n pageContainer.find('.item-input').each(function () {\n var itemInput = $(this);\n var notInputs = ['checkbox', 'button', 'submit', 'range', 'radio', 'image'];\n itemInput.find('input, select, textarea').each(function () {\n var input = $(this);\n if (notInputs.indexOf(input.attr('type')) < 0) {\n itemInput.addClass('item-input-field');\n if (input.val().trim() !== '') {\n input.parents('.item-input, .input-field').add(input.parents('.item-inner')).addClass('not-empty-state');\n }\n }\n });\n if (itemInput.parents('.input-item, .inputs-list').length > 0) return;\n itemInput.parents('.list-block').eq(0).addClass('inputs-list');\n });\n };\n /*======================================================\n ************ Material Focus Inputs ************\n ======================================================*/\n app.initMaterialWatchInputs = function () {\n var notInputs = ['checkbox', 'button', 'submit', 'range', 'radio', 'image'];\n function addFocusState(e) {\n /*jshint validthis:true*/\n var i = $(this);\n var type = i.attr('type');\n if (notInputs.indexOf(type) >= 0) return;\n var els = i.add(i.parents('.item-input, .input-field')).add(i.parents('.item-inner').eq(0));\n els.removeClass('not-empty-state').addClass('focus-state');\n }\n function removeFocusState(e) {\n /*jshint validthis:true*/\n var i = $(this), value = i.val();\n var type = i.attr('type');\n if (notInputs.indexOf(type) >= 0) return;\n var els = i.add(i.parents('.item-input, .input-field')).add(i.parents('.item-inner').eq(0));\n els.removeClass('focus-state');\n if (value && value.trim() !== '') {\n els.removeClass('focus-state').addClass('not-empty-state');\n }\n else {\n els.removeClass('not-empty-state');\n }\n }\n function watchChangeState(e) {\n /*jshint validthis:true*/\n var input = $(this),\n value = input.val();\n var type = input.attr('type');\n if (notInputs.indexOf(type) >= 0) return;\n var els = input.add(input.parents('.item-input, .input-field')).add(input.parents('.item-inner').eq(0));\n if (els.length === 0) return;\n if (value && (typeof value === 'string' && value.trim() !== '') || (Array.isArray(value) && value.length > 0)) {\n els.addClass('not-empty-state');\n }\n else {\n els.removeClass('not-empty-state');\n }\n }\n $(document).on('change', 'input, textarea, select', watchChangeState, true);\n $(document).on('focus', 'input, textarea, select', addFocusState, true);\n $(document).on('blur', 'input, textarea, select', removeFocusState, true);\n };\n \n\n /*======================================================\n ************ Handle Browser's History ************\n ======================================================*/\n app.pushStateQueue = [];\n app.pushStateClearQueue = function () {\n if (app.pushStateQueue.length === 0) return;\n var queue = app.pushStateQueue.pop();\n var animatePages;\n if (app.params.pushStateNoAnimation === true) animatePages = false;\n if (queue.action === 'back') {\n app.router.back(queue.view, {animatePages: animatePages});\n }\n if (queue.action === 'loadPage') {\n app.router.load(queue.view, {url: queue.stateUrl, animatePages: animatePages, pushState: false});\n }\n if (queue.action === 'loadContent') {\n app.router.load(queue.view, {content: queue.stateContent, animatePages: animatePages, pushState: false});\n }\n if (queue.action === 'loadPageName') {\n app.router.load(queue.view, {pageName: queue.statePageName, url: queue.stateUrl, animatePages: animatePages, pushState: false});\n }\n };\n \n app.initPushState = function () {\n var blockPopstate = true;\n $(window).on('load', function () {\n setTimeout(function () {\n blockPopstate = false;\n }, 0);\n });\n \n if (document.readyState && document.readyState === 'complete') {\n blockPopstate = false;\n }\n \n function handlePopState(e) {\n if (blockPopstate) return;\n var mainView = app.mainView;\n if (!mainView) return;\n var state = e.state;\n if (!state) {\n state = {\n viewIndex: app.views.indexOf(mainView),\n url : mainView.history[0]\n };\n }\n if (state.viewIndex < 0) return;\n var view = app.views[state.viewIndex];\n var stateUrl = state && state.url || undefined;\n var stateContent = state && state.content || undefined;\n var statePageName = state && state.pageName || undefined;\n var animatePages;\n \n if (app.params.pushStateNoAnimation === true) animatePages = false;\n \n if (stateUrl !== view.url) {\n if (view.history.indexOf(stateUrl) >= 0) {\n // Go Back\n if (view.allowPageChange) {\n app.router.back(view, {url:undefined, animatePages: animatePages, pushState: false, preloadOnly:false});\n }\n else {\n app.pushStateQueue.push({\n action: 'back',\n view: view\n });\n }\n }\n else if (stateContent) {\n // Load Page\n if (view.allowPageChange) {\n app.router.load(view, {content:stateContent, animatePages: animatePages, pushState: false});\n }\n else {\n app.pushStateQueue.unshift({\n action: 'loadContent',\n stateContent: stateContent,\n view: view\n });\n }\n \n }\n else if (statePageName) {\n // Load Page by page name with Dom Cache\n if (view.allowPageChange) {\n app.router.load(view, {pageName:statePageName, url: stateUrl, animatePages: animatePages, pushState: false});\n }\n else {\n app.pushStateQueue.unshift({\n action: 'loadPageName',\n statePageName: statePageName,\n view: view\n });\n }\n }\n else {\n // Load Page\n if (view.allowPageChange) {\n app.router.load(view, {url:stateUrl, animatePages: animatePages, pushState: false});\n }\n else {\n app.pushStateQueue.unshift({\n action: 'loadPage',\n stateUrl: stateUrl,\n view: view\n });\n }\n }\n }\n }\n $(window).on('popstate', handlePopState);\n };\n \n\n /*===========================\n Framework7 Swiper Additions\n ===========================*/\n app.swiper = function (container, params) {\n return new Swiper(container, params);\n };\n app.initPageSwiper = function (pageContainer) {\n pageContainer = $(pageContainer);\n var swipers = pageContainer.find('.swiper-init, .tabs-swipeable-wrap');\n if (swipers.length === 0) return;\n function destroySwiperOnRemove(slider) {\n function destroySwiper() {\n slider.destroy();\n pageContainer.off('page:beforeremove', destroySwiper);\n }\n pageContainer.on('page:beforeremove', destroySwiper);\n }\n swipers.each(function () {\n var swiper = $(this), initialSlide;\n var params;\n if (swiper.hasClass('tabs-swipeable-wrap')) {\n swiper.addClass('swiper-container').children('.tabs').addClass('swiper-wrapper').children('.tab').addClass('swiper-slide');\n initialSlide = swiper.children('.tabs').children('.tab.active').index();\n }\n if (swiper.data('swiper')) {\n params = JSON.parse(swiper.data('swiper'));\n }\n else {\n params = swiper.dataset();\n }\n if (typeof params.initialSlide === 'undefined' && typeof initialSlide !== 'undefined') {\n params.initialSlide = initialSlide;\n }\n if (swiper.hasClass('tabs-swipeable-wrap')) {\n params.onSlideChangeStart = function (s) {\n app.showTab(s.slides.eq(s.activeIndex));\n };\n }\n var _slider = app.swiper(swiper[0], params);\n destroySwiperOnRemove(_slider);\n });\n };\n app.reinitPageSwiper = function (pageContainer) {\n pageContainer = $(pageContainer);\n var sliders = pageContainer.find('.swiper-init, .tabs-swipeable-wrap');\n if (sliders.length === 0) return;\n for (var i = 0; i < sliders.length; i++) {\n var sliderInstance = sliders[0].swiper;\n if (sliderInstance) {\n sliderInstance.update(true);\n }\n }\n };\n \n\n /*======================================================\n ************ Photo Browser ************\n ======================================================*/\n var PhotoBrowser = function (params) {\n var pb = this, i;\n \n var defaults = {\n photos : [],\n initialSlide: 0,\n spaceBetween: 20,\n speed: 300,\n zoom: true,\n zoomMax: 3,\n zoomMin: 1,\n exposition: true,\n expositionHideCaptions: false,\n type: 'standalone',\n navbar: true,\n toolbar: true,\n theme: 'light',\n swipeToClose: true,\n backLinkText: 'Close',\n ofText: 'of',\n loop: false,\n lazyLoading: false,\n lazyLoadingInPrevNext: false,\n lazyLoadingOnTransitionStart: false,\n material: app.params.material,\n materialPreloaderSvg: app.params.materialPreloaderSvg,\n materialPreloaderHtml: app.params.materialPreloaderHtml,\n /*\n Callbacks:\n onLazyImageLoad(pb, slide, img)\n onLazyImageReady(pb, slide, img)\n onOpen(pb)\n onClose(pb)\n onTransitionStart(swiper)\n onTransitionEnd(swiper)\n onSlideChangeStart(swiper)\n onSlideChangeEnd(swiper)\n onTap(swiper, e)\n onClick(swiper, e)\n onDoubleTap(swiper, e)\n onSwipeToClose(pb)\n */\n };\n \n params = params || {};\n if (!params.backLinkText && app.params.material) defaults.backLinkText = '';\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n if (params.maxZoom) {\n params.zoomMax = params.maxZoom;\n }\n if (params.minZoom) {\n params.zoomMin = params.minZoom;\n }\n \n pb.params = params;\n pb.params.iconsColorClass = pb.params.iconsColor ? 'color-' + pb.params.iconsColor : (pb.params.theme === 'dark' ? 'color-white' : '');\n pb.params.preloaderColorClass = pb.params.theme === 'dark' ? 'preloader-white' : '';\n \n // Templates\n var photoTemplate = pb.params.photoTemplate ||\n '
                                      ' +\n '' +\n '' +\n '' +\n '
                                      ';\n var photoLazyTemplate = pb.params.lazyPhotoTemplate ||\n '
                                      ' +\n '
                                      {{#if @root.material}}{{@root.materialPreloaderHtml}}{{/if}}
                                      ' +\n '' +\n '' +\n '' +\n '
                                      ';\n var objectTemplate = pb.params.objectTemplate ||\n '
                                      {{js \"this.html || this\"}}
                                      ';\n var captionTemplate = pb.params.captionTemplate ||\n '
                                      ' +\n '{{caption}}' +\n '
                                      ';\n var navbarTemplate = pb.params.navbarTemplate ||\n '
                                      ' +\n '
                                      ' +\n '' +\n '
                                      ' +\n ' ' +\n '{{ofText}} ' +\n '' +\n '
                                      ' +\n '
                                      ' +\n '
                                      ' +\n '
                                      ';\n var toolbarTemplate = pb.params.toolbarTemplate ||\n '
                                      ' +\n '
                                      ' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '' +\n '
                                      ' +\n '
                                      ';\n \n var htmlTemplate = t7.compile('
                                      ' +\n '
                                      ' +\n '{{#unless material}}{{#if navbar}}' +\n navbarTemplate +\n '{{/if}}{{/unless}}' +\n '
                                      ' +\n '{{#if material}}{{#if navbar}}' +\n navbarTemplate +\n '{{/if}}{{/if}}' +\n '{{#if toolbar}}' +\n toolbarTemplate +\n '{{/if}}' +\n '
                                      ' +\n '{{#each photos}}{{#if caption}}' +\n captionTemplate +\n '{{/if}}{{/each}}' +\n '
                                      ' +\n '
                                      ' +\n '
                                      ' +\n '{{#each photos}}' +\n '{{#js_compare \"this.html || ((typeof this === \\'string\\' || this instanceof String) && (this.indexOf(\\'<\\') >= 0 || this.indexOf(\\'>\\') >= 0))\"}}' +\n objectTemplate +\n '{{else}}' +\n '{{#if @root.lazyLoading}}' +\n photoLazyTemplate +\n '{{else}}' +\n photoTemplate +\n '{{/if}}' +\n '{{/js_compare}}' +\n '{{/each}}' +\n '
                                      ' +\n '
                                      ' +\n '
                                      ' +\n '
                                      ' +\n '
                                      ')(pb.params);\n \n pb.activeIndex = pb.params.initialSlide;\n pb.openIndex = pb.activeIndex;\n pb.opened = false;\n \n pb.open = function (index) {\n if (typeof index === 'undefined') index = pb.activeIndex;\n index = parseInt(index, 10);\n if (pb.opened && pb.swiper) {\n pb.swiper.slideTo(index);\n return;\n }\n pb.opened = true;\n pb.openIndex = index;\n if (pb.params.type === 'standalone') {\n app.root.append(htmlTemplate);\n }\n if (pb.params.type === 'popup') {\n pb.popup = app.popup('
                                      ' + htmlTemplate + '
                                      ');\n $(pb.popup).on('popup:closed', pb.onPopupClose);\n }\n if (pb.params.type === 'page') {\n $(document).once('page:beforeinit', pb.onPageBeforeInit);\n $(document).once('page:beforeremove', pb.onPageBeforeRemove);\n if (!pb.params.view) pb.params.view = app.mainView;\n pb.params.view.loadContent(htmlTemplate);\n return;\n }\n pb.layout(pb.openIndex);\n if (pb.params.onOpen) {\n pb.params.onOpen(pb);\n }\n \n };\n pb.close = function () {\n pb.opened = false;\n if (!pb.swiperContainer || pb.swiperContainer.length === 0) {\n return;\n }\n if (pb.params.onClose) {\n pb.params.onClose(pb);\n }\n // Detach events\n pb.attachEvents(true);\n // Delete from DOM\n if (pb.params.type === 'standalone') {\n pb.container.removeClass('photo-browser-in').addClass('photo-browser-out').animationEnd(function () {\n pb.container.remove();\n });\n }\n // Destroy slider\n pb.swiper.destroy();\n // Delete references\n pb.swiper = pb.swiperContainer = pb.swiperWrapper = pb.slides = undefined; //gestureSlide = gestureImg = gestureImgWrap = undefined;\n };\n \n pb.onPopupClose = function (e) {\n pb.close();\n $(pb.popup).off('page:beforeinit', pb.onPopupClose);\n };\n pb.onPageBeforeInit = function (e) {\n if (e.detail.page.name === 'photo-browser-slides') {\n pb.layout(pb.openIndex);\n if (pb.params.onOpen) {\n pb.params.onOpen(pb);\n }\n }\n };\n pb.onPageBeforeRemove = function (e) {\n if (e.detail.page.name === 'photo-browser-slides') {\n pb.close();\n }\n };\n \n pb.onSliderTransitionStart = function (swiper) {\n pb.activeIndex = swiper.activeIndex;\n \n var current = swiper.activeIndex + 1;\n var total = swiper.slides.length;\n if (pb.params.loop) {\n total = total - 2;\n current = current - swiper.loopedSlides;\n if (current < 1) current = total + current;\n if (current > total) current = current - total;\n }\n pb.container.find('.photo-browser-current').text(current);\n pb.container.find('.photo-browser-total').text(total);\n \n $('.photo-browser-prev, .photo-browser-next').removeClass('photo-browser-link-inactive');\n \n if (swiper.isBeginning && !pb.params.loop) {\n $('.photo-browser-prev').addClass('photo-browser-link-inactive');\n }\n if (swiper.isEnd && !pb.params.loop) {\n $('.photo-browser-next').addClass('photo-browser-link-inactive');\n }\n \n // Update captions\n if (pb.captions.length > 0) {\n pb.captionsContainer.find('.photo-browser-caption-active').removeClass('photo-browser-caption-active');\n var captionIndex = pb.params.loop ? swiper.slides.eq(swiper.activeIndex).attr('data-swiper-slide-index') : pb.activeIndex;\n pb.captionsContainer.find('[data-caption-index=\"' + captionIndex + '\"]').addClass('photo-browser-caption-active');\n }\n \n \n // Stop Video\n var previousSlideVideo = swiper.slides.eq(swiper.previousIndex).find('video');\n if (previousSlideVideo.length > 0) {\n if ('pause' in previousSlideVideo[0]) previousSlideVideo[0].pause();\n }\n // Callback\n if (pb.params.onTransitionStart) pb.params.onTransitionStart(swiper);\n };\n pb.onSliderTransitionEnd = function (swiper) {\n if (pb.params.onTransitionEnd) pb.params.onTransitionEnd(swiper);\n };\n \n pb.layout = function (index) {\n if (pb.params.type === 'page') {\n pb.container = $('.photo-browser-swiper-container').parents('.view');\n }\n else {\n pb.container = $('.photo-browser');\n }\n if (pb.params.type === 'standalone') {\n pb.container.addClass('photo-browser-in');\n app.sizeNavbars(pb.container);\n }\n pb.swiperContainer = pb.container.find('.photo-browser-swiper-container');\n pb.swiperWrapper = pb.container.find('.photo-browser-swiper-wrapper');\n pb.slides = pb.container.find('.photo-browser-slide');\n pb.captionsContainer = pb.container.find('.photo-browser-captions');\n pb.captions = pb.container.find('.photo-browser-caption');\n \n var sliderSettings = {\n nextButton: pb.params.nextButton || '.photo-browser-next',\n prevButton: pb.params.prevButton || '.photo-browser-prev',\n indexButton: pb.params.indexButton,\n initialSlide: index,\n spaceBetween: pb.params.spaceBetween,\n speed: pb.params.speed,\n loop: pb.params.loop,\n lazyLoading: pb.params.lazyLoading,\n lazyLoadingInPrevNext: pb.params.lazyLoadingInPrevNext,\n lazyLoadingOnTransitionStart: pb.params.lazyLoadingOnTransitionStart,\n preloadImages: pb.params.lazyLoading ? false : true,\n zoom: pb.params.zoom,\n zoomMax: pb.params.zoomMax,\n zoomMin: pb.params.zoomMin,\n onTap: function (swiper, e) {\n if (pb.params.onTap) pb.params.onTap(swiper, e);\n },\n onClick: function (swiper, e) {\n if (pb.params.exposition) pb.toggleExposition();\n if (pb.params.onClick) pb.params.onClick(swiper, e);\n },\n onDoubleTap: function (swiper, e) {\n // pb.toggleZoom(e);\n if (pb.params.onDoubleTap) pb.params.onDoubleTap(swiper, e);\n },\n onTransitionStart: function (swiper) {\n pb.onSliderTransitionStart(swiper);\n },\n onTransitionEnd: function (swiper) {\n pb.onSliderTransitionEnd(swiper);\n },\n onSlideChangeStart: pb.params.onSlideChangeStart,\n onSlideChangeEnd: pb.params.onSlideChangeEnd,\n onLazyImageLoad: function (swiper, slide, img) {\n if (pb.params.onLazyImageLoad) pb.params.onLazyImageLoad(pb, slide, img);\n },\n onLazyImageReady: function (swiper, slide, img) {\n $(slide).removeClass('photo-browser-slide-lazy');\n if (pb.params.onLazyImageReady) pb.params.onLazyImageReady(pb, slide, img);\n }\n };\n \n if (pb.params.swipeToClose && pb.params.type !== 'page') {\n sliderSettings.onTouchStart = pb.swipeCloseTouchStart;\n sliderSettings.onTouchMoveOpposite = pb.swipeCloseTouchMove;\n sliderSettings.onTouchEnd = pb.swipeCloseTouchEnd;\n }\n \n pb.swiper = app.swiper(pb.swiperContainer, sliderSettings);\n if (index === 0) {\n pb.onSliderTransitionStart(pb.swiper);\n }\n pb.attachEvents();\n };\n pb.attachEvents = function (detach) {\n var action = detach ? 'off' : 'on';\n pb.container.find('.photo-browser-close-link')[action]('click', pb.close);\n };\n \n \n // Expose\n pb.exposed = false;\n pb.toggleExposition = function () {\n if (pb.container) pb.container.toggleClass('photo-browser-exposed');\n if (pb.params.expositionHideCaptions) pb.captionsContainer.toggleClass('photo-browser-captions-exposed');\n pb.exposed = !pb.exposed;\n };\n pb.enableExposition = function () {\n if (pb.container) pb.container.addClass('photo-browser-exposed');\n if (pb.params.expositionHideCaptions) pb.captionsContainer.addClass('photo-browser-captions-exposed');\n pb.exposed = true;\n };\n pb.disableExposition = function () {\n if (pb.container) pb.container.removeClass('photo-browser-exposed');\n if (pb.params.expositionHideCaptions) pb.captionsContainer.removeClass('photo-browser-captions-exposed');\n pb.exposed = false;\n };\n \n // Swipe Up To Close\n var swipeToCloseIsTouched = false;\n var allowSwipeToClose = true;\n var swipeToCloseDiff, swipeToCloseStart, swipeToCloseCurrent, swipeToCloseStarted = false, swipeToCloseActiveSlide, swipeToCloseTimeStart;\n pb.swipeCloseTouchStart = function (swiper, e) {\n if (!allowSwipeToClose) return;\n swipeToCloseIsTouched = true;\n };\n pb.swipeCloseTouchMove = function (swiper, e) {\n if (!swipeToCloseIsTouched) return;\n if (!swipeToCloseStarted) {\n swipeToCloseStarted = true;\n swipeToCloseStart = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n swipeToCloseActiveSlide = pb.swiper.slides.eq(pb.swiper.activeIndex);\n swipeToCloseTimeStart = (new Date()).getTime();\n }\n e.preventDefault();\n swipeToCloseCurrent = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n swipeToCloseDiff = swipeToCloseStart - swipeToCloseCurrent;\n var opacity = 1 - Math.abs(swipeToCloseDiff) / 300;\n swipeToCloseActiveSlide.transform('translate3d(0,' + (-swipeToCloseDiff) + 'px,0)');\n pb.swiper.container.css('opacity', opacity).transition(0);\n };\n pb.swipeCloseTouchEnd = function (swiper, e) {\n swipeToCloseIsTouched = false;\n if (!swipeToCloseStarted) {\n swipeToCloseStarted = false;\n return;\n }\n swipeToCloseStarted = false;\n allowSwipeToClose = false;\n var diff = Math.abs(swipeToCloseDiff);\n var timeDiff = (new Date()).getTime() - swipeToCloseTimeStart;\n if ((timeDiff < 300 && diff > 20) || (timeDiff >= 300 && diff > 100)) {\n setTimeout(function () {\n if (pb.params.type === 'standalone') {\n pb.close();\n }\n if (pb.params.type === 'popup') {\n app.closeModal(pb.popup);\n }\n if (pb.params.onSwipeToClose) {\n pb.params.onSwipeToClose(pb);\n }\n allowSwipeToClose = true;\n }, 0);\n return;\n }\n if (diff !== 0) {\n swipeToCloseActiveSlide.addClass('transitioning').transitionEnd(function () {\n allowSwipeToClose = true;\n swipeToCloseActiveSlide.removeClass('transitioning');\n });\n }\n else {\n allowSwipeToClose = true;\n }\n pb.swiper.container.css('opacity', '').transition('');\n swipeToCloseActiveSlide.transform('');\n };\n \n return pb;\n };\n \n app.photoBrowser = function (params) {\n return new PhotoBrowser(params);\n };\n \n\n /*===============================================================================\n ************ Autocomplete ************\n ===============================================================================*/\n var Autocomplete = function (params) {\n var a = this;\n \n // Params\n var defaults = {\n // Standalone Options\n /*\n opener: undefined,\n */\n popupCloseText: 'Close',\n backText: 'Back',\n searchbarPlaceholderText: 'Search...',\n searchbarCancelText: 'Cancel',\n openWithAnimation: true,\n // When opened in page should the searchbar be focused by default\n autoFocus: false,\n openIn: 'page',\n backOnSelect: false,\n notFoundText: 'Nothing found',\n requestSourceOnOpen: false,\n /*\n pageTitle: undefined,\n */\n \n // Handle Data\n /*\n source: undefined,\n limit: undefined,\n */\n valueProperty: 'id',\n textProperty: 'text',\n \n // Dropdown Options\n highlightMatches: true,\n \n /*\n dropdownPlaceholderText: 'Type anything...',\n */\n updateInputValueOnSelect: true,\n expandInput: false,\n \n // Preloader\n preloaderColor: false,\n preloader: false,\n \n // Templates\n /*\n itemTemplate: undefined,\n navbarTemplate: undefined,\n dropdownTemplate: undefined\n dropdownItemTemplate: undefined,\n dropdownPlaceholderTemplate: undefined\n */\n \n // Color themes\n /*\n navbarTheme: undefined,\n formTheme: undefined,\n */\n \n // Callbacks\n /*\n onChange: function (a, value) - for not dropdown\n onOpen: function (a)\n onClose: function (a)\n */\n };\n \n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n a.params = params;\n \n // Opener Link & View\n if (a.params.opener) {\n a.opener = $(a.params.opener);\n }\n var view = a.params.view;\n if (!a.params.view && a.opener && a.opener.length) {\n // Find related view\n view = a.opener.parents('.' + app.params.viewClass);\n if (view.length === 0) return;\n view = view[0].f7View;\n }\n \n // Input\n if (a.params.input) {\n a.input = $(a.params.input);\n if (a.input.length === 0 && a.params.openIn === 'dropdown') return;\n }\n \n // Array with selected items\n a.value = a.params.value || [];\n \n // ID & Inputs\n a.id = (new Date()).getTime();\n a.inputType = a.params.multiple ? 'checkbox' : 'radio';\n a.inputName = a.inputType + '-' + a.id;\n \n // Is Material\n var material = app.params.material;\n \n // Back On Select\n var backOnSelect = a.params.backOnSelect;\n \n if (a.params.openIn !== 'dropdown') {\n // Item Template\n a.itemTemplate = t7.compile(a.params.itemTemplate ||\n '
                                    • ' +\n '' +\n '
                                    • '\n );\n // Page Layout\n var pageTitle = a.params.pageTitle || '';\n if (!pageTitle && a.opener && a.opener.length) {\n pageTitle = a.opener.find('.item-title').text();\n }\n var pageName = 'autocomplete-' + a.inputName;\n \n var navbarTheme = a.params.navbarTheme,\n formTheme = a.params.formTheme;\n \n // Navbar HTML\n var navbarHTML;\n var noNavbar = '', noToolbar = '', navbarLayout;\n \n a.navbarTemplate = t7.compile(a.params.navbarTemplate ||\n '
                                      ' +\n '
                                      ' +\n '
                                      ' +\n '{{#if material}}' +\n '' +\n '{{else}}' +\n '' +\n '' +\n '{{#if inPopup}}' +\n '{{popupCloseText}}' +\n '{{else}}' +\n '{{backText}}' +\n '{{/if}}' +\n '' +\n '{{/if}}' +\n '
                                      ' +\n '
                                      {{pageTitle}}
                                      ' +\n '{{#if preloader}}' +\n '
                                      ' +\n '
                                      ' +\n '
                                      ' +\n '{{/if}}' +\n '
                                      ' +\n '
                                      '\n );\n navbarHTML = a.navbarTemplate({\n pageTitle: pageTitle,\n backText: a.params.backText,\n popupCloseText: a.params.popupCloseText,\n openIn: a.params.openIn,\n navbarTheme: navbarTheme,\n inPopup: a.params.openIn === 'popup',\n inPage: a.params.openIn === 'page',\n material: material,\n preloader: a.params.preloader,\n preloaderColor: a.params.preloaderColor,\n animated: a.params.openWithAnimation\n });\n \n // Determine navbar layout type - static/fixed/through\n if (a.params.openIn === 'page') {\n navbarLayout = 'static';\n if (a.opener) {\n if (a.opener.parents('.navbar-through').length > 0) navbarLayout = 'through';\n if (a.opener.parents('.navbar-fixed').length > 0) navbarLayout = 'fixed';\n noToolbar = a.opener.parents('.page').hasClass('no-toolbar') ? 'no-toolbar' : '';\n noNavbar = a.opener.parents('.page').hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout;\n }\n else if (view.container) {\n if ($(view.container).hasClass('navbar-through') || $(view.container).find('.navbar-through').length > 0) navbarLayout = 'through';\n if ($(view.container).hasClass('navbar-fixed') || $(view.container).find('.navbar-fixed').length > 0) navbarLayout = 'fixed';\n noToolbar = $(view.activePage.container).hasClass('no-toolbar') ? 'no-toolbar' : '';\n noNavbar = $(view.activePage.container).hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout;\n }\n }\n else {\n navbarLayout = 'fixed';\n }\n var searchbarHTML =\n '
                                      ' +\n '
                                      ' +\n '' +\n '' +\n '
                                      ' +\n (material ? '' : '' + a.params.searchbarCancelText + '') +\n '
                                      ' +\n '
                                      ';\n var pageHTML =\n (navbarLayout === 'through' ? navbarHTML : '') +\n '
                                      ' +\n '
                                      ' +\n (navbarLayout === 'fixed' ? navbarHTML : '') +\n searchbarHTML +\n '
                                      ' +\n (navbarLayout === 'static' ? navbarHTML : '') +\n '
                                      ' +\n '
                                        ' +\n '
                                        ' +\n '
                                        ' +\n '
                                        • ' + a.params.notFoundText + '
                                        ' +\n '
                                        ' +\n '
                                        ' +\n '
                                          ' +\n '
                                          ' +\n '
                                          ' +\n '
                                          ' +\n '
                                          ';\n }\n else {\n a.dropdownItemTemplate = t7.compile(a.params.dropdownItemTemplate ||\n '
                                        • ' +\n '' +\n '
                                        • '\n );\n a.dropdownPlaceholderTemplate = t7.compile(a.params.dropdownPlaceholderTemplate ||\n '
                                        • ' +\n '
                                          ' +\n '
                                          ' +\n '
                                          {{text}}
                                          ' +\n '
                                          ' +\n '' +\n '
                                        • '\n );\n a.dropdownTemplate = t7.compile(a.params.dropdownTemplate ||\n '
                                          ' +\n '
                                          ' +\n '
                                          ' +\n '
                                            ' +\n '
                                            ' +\n '
                                            ' +\n '{{#if preloader}}' +\n '
                                            {{#if material}}{{materialPreloaderHtml}}{{/if}}
                                            ' +\n '{{/if}}' +\n '
                                            '\n );\n }\n \n // Define popup\n a.popup = undefined;\n \n // Define Dropdown\n a.dropdown = undefined;\n \n // Handle Input Value Change\n function handleInputValue (e) {\n var query = a.input.val();\n if (a.params.source) {\n a.params.source(a, query, function (items) {\n var itemsHTML = '';\n var limit = a.params.limit ? Math.min(a.params.limit, items.length) : items.length;\n a.items = items;\n var i, j, regExp;\n if (a.params.highlightMatches) {\n query = query.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n regExp = new RegExp('('+query+')', 'i');\n }\n \n for (i = 0; i < limit; i++) {\n var itemValue = typeof items[i] === 'object' ? items[i][a.params.valueProperty] : items[i];\n var itemText = typeof items[i] !== 'object' ? items[i] : items[i][a.params.textProperty];\n itemsHTML += a.dropdownItemTemplate({\n value: itemValue,\n text: a.params.highlightMatches ? itemText.replace(regExp, '$1') : itemText\n });\n }\n if (itemsHTML === '' && query === '' && a.params.dropdownPlaceholderText) {\n itemsHTML += a.dropdownPlaceholderTemplate({\n text: a.params.dropdownPlaceholderText,\n });\n }\n a.dropdown.find('ul').html(itemsHTML);\n });\n }\n }\n // Handle Drop Down Click\n function handleDropdownClick (e) {\n /*jshint validthis:true */\n var clicked = $(this);\n var clickedItem;\n for (var i = 0; i < a.items.length; i++) {\n var itemValue = typeof a.items[i] === 'object' ? a.items[i][a.params.valueProperty] : a.items[i];\n var value = clicked.attr('data-value');\n if (itemValue === value || itemValue * 1 === value * 1) {\n clickedItem = a.items[i];\n }\n }\n if (a.params.updateInputValueOnSelect) {\n a.input.val(typeof clickedItem === 'object' ? clickedItem[a.params.valueProperty] : clickedItem);\n a.input.trigger('input change');\n }\n \n if (a.params.onChange) {\n a.params.onChange(a, clickedItem);\n }\n \n a.close();\n }\n \n // Handle HTML Click to close Dropdown\n function closeOnHTMLClick (e) {\n var target = $(e.target);\n if (!(target.is(a.input[0]) || a.dropdown && target.parents(a.dropdown[0]).length > 0)) {\n a.close();\n }\n }\n \n a.positionDropDown = function () {\n var listBlock = a.input.parents('.list-block'),\n pageContent = a.input.parents('.page-content'),\n paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-top'), 10),\n // inputOffset = a.input.offset(),\n listBlockOffsetLeft = listBlock.length > 0 ? listBlock.offset().left - listBlock.parent().offset().left : 0,\n inputOffsetLeft = a.input.offset().left - (listBlock.length > 0 ? listBlock.offset().left : 0),\n inputOffsetTop = a.input.offset().top - (pageContent.offset().top - pageContent[0].scrollTop),\n maxHeight = pageContent[0].scrollHeight - paddingBottom - (inputOffsetTop + pageContent[0].scrollTop) - a.input[0].offsetHeight;\n \n a.dropdown.css({\n left: (listBlock.length > 0 ? listBlockOffsetLeft : inputOffsetLeft) + 'px',\n top: inputOffsetTop + pageContent[0].scrollTop + a.input[0].offsetHeight + 'px',\n width: (listBlock.length > 0 ? listBlock[0].offsetWidth : a.input[0].offsetWidth) + 'px'\n });\n a.dropdown.children('.autocomplete-dropdown-inner').css({\n maxHeight: maxHeight + 'px',\n paddingLeft: listBlock.length > 0 && !a.params.expandInput ? inputOffsetLeft - (material ? 16 : 15) + 'px' : ''\n });\n };\n \n a.pageInit = function (e) {\n var page = e.detail.page;\n a.page = $(page.container);\n a.pageData = page;\n if (page.name !== pageName) {\n return;\n }\n var container = $(page.container);\n \n // Source\n function onSource(query) {\n if (!a.params.source) return;\n var i, j, k;\n \n a.params.source(a, query, function(items) {\n var itemsHTML = '';\n var limit = a.params.limit ? Math.min(a.params.limit, items.length) : items.length;\n a.items = items;\n for (i = 0; i < limit; i++) {\n var selected = false;\n var itemValue = typeof items[i] === 'object' ? items[i][a.params.valueProperty] : items[i];\n for (j = 0; j < a.value.length; j++) {\n var aValue = typeof a.value[j] === 'object' ? a.value[j][a.params.valueProperty] : a.value[j];\n if (aValue === itemValue || aValue * 1 === itemValue * 1) selected = true;\n }\n itemsHTML += a.itemTemplate({\n value: itemValue,\n text: typeof items[i] !== 'object' ? items[i] : items[i][a.params.textProperty],\n inputType: a.inputType,\n id: a.id,\n inputName: a.inputName,\n selected: selected,\n checkbox: a.inputType === 'checkbox',\n material: material\n });\n }\n container.find('.autocomplete-found ul').html(itemsHTML);\n if (items.length === 0) {\n if (query.length !== 0) {\n container.find('.autocomplete-not-found').show();\n container.find('.autocomplete-found, .autocomplete-values').hide();\n }\n else {\n container.find('.autocomplete-values').show();\n container.find('.autocomplete-found, .autocomplete-not-found').hide();\n }\n }\n else {\n container.find('.autocomplete-found').show();\n container.find('.autocomplete-not-found, .autocomplete-values').hide();\n }\n });\n }\n \n // Init Search Bar\n var searchbar = app.searchbar(container.find('.searchbar'), {\n customSearch: true,\n onSearch: function (searchbar, data) {\n if (data.query.length === 0 && searchbar.active) {\n searchbar.overlay.addClass('searchbar-overlay-active');\n }\n else {\n searchbar.overlay.removeClass('searchbar-overlay-active');\n }\n \n onSource(data.query);\n }\n });\n \n // Save searchbar instance\n a.searchbar = searchbar;\n \n // Update values\n function updateValues() {\n var valuesHTML = '';\n var i;\n for (i = 0; i < a.value.length; i++) {\n \n valuesHTML += a.itemTemplate({\n value: typeof a.value[i] === 'object' ? a.value[i][a.params.valueProperty] : a.value[i],\n text: typeof a.value[i] === 'object' ? a.value[i][a.params.textProperty]: a.value[i],\n inputType: a.inputType,\n id: a.id,\n inputName: a.inputName + '-checked',\n checkbox: a.inputType === 'checkbox',\n material: material,\n selected: true\n });\n }\n container.find('.autocomplete-values ul').html(valuesHTML);\n }\n \n // Handle Inputs\n if (!a.params.multiple && a.params.backOnSelect) {\n container.once('click', '.list-block label', function () {\n if (a.params.openIn === 'popup') app.closeModal(a.popup);\n else view.router.back({animatePages: a.params.openWithAnimation});\n });\n }\n container.on('change', 'input[type=\"radio\"], input[type=\"checkbox\"]', function () {\n var i;\n var input = this;\n var value = input.value;\n var text = $(input).parents('li').find('.item-title').text();\n var isValues = $(input).parents('.autocomplete-values').length > 0;\n var item, itemValue, aValue;\n if (isValues) {\n if (a.inputType === 'checkbox' && !input.checked) {\n for (i = 0; i < a.value.length; i++) {\n aValue = typeof a.value[i] === 'string' ? a.value[i] : a.value[i][a.params.valueProperty];\n if (aValue === value || aValue * 1 === value * 1) {\n a.value.splice(i, 1);\n }\n }\n updateValues();\n if (a.params.onChange) a.params.onChange(a, a.value);\n }\n return;\n }\n \n // Find Related Item\n for (i = 0; i < a.items.length; i++) {\n itemValue = typeof a.items[i] === 'string' ? a.items[i] : a.items[i][a.params.valueProperty];\n if (itemValue === value || itemValue * 1 === value * 1) item = a.items[i];\n }\n // Update Selected Value\n if (a.inputType === 'radio') {\n a.value = [item];\n }\n else {\n if (input.checked) {\n a.value.push(item);\n }\n else {\n for (i = 0; i < a.value.length; i++) {\n aValue = typeof a.value[i] === 'string' ? a.value[i] : a.value[i][a.params.valueProperty];\n if (aValue === value || aValue * 1 === value * 1) {\n a.value.splice(i, 1);\n }\n }\n }\n }\n \n // Update Values Block\n updateValues();\n \n // On Select Callback\n if ((a.inputType === 'radio' && input.checked || a.inputType === 'checkbox') && a.params.onChange ) {\n a.params.onChange(a, a.value);\n }\n });\n \n // Update Values On Page Init\n updateValues();\n \n // Source on load\n if (a.params.requestSourceOnOpen) onSource('');\n \n // On Open Callback\n if (a.params.onOpen) a.params.onOpen(a);\n };\n \n // Show Hide Preloader\n a.showPreloader = function () {\n if (a.params.openIn === 'dropdown') {\n if (a.dropdown) a.dropdown.find('.autocomplete-preloader').addClass('autocomplete-preloader-visible');\n }\n else $('.autocomplete-preloader').addClass('autocomplete-preloader-visible');\n };\n \n a.hidePreloader = function () {\n if (a.params.openIn === 'dropdown') {\n if (a.dropdown) a.dropdown.find('.autocomplete-preloader').removeClass('autocomplete-preloader-visible');\n }\n else $('.autocomplete-preloader').removeClass('autocomplete-preloader-visible');\n };\n \n // Autofocus\n a.autoFocus = function (e) {\n var self = this;\n setTimeout(function () {\n $(self).find('input[type=search]').focus();\n }, 0);\n };\n \n // Open Autocomplete Page/Popup\n a.open = function () {\n if (a.opened) return;\n a.opened = true;\n if (a.params.openIn === 'dropdown') {\n if (!a.dropdown) {\n a.dropdown = $(a.dropdownTemplate({\n preloader: a.params.preloader,\n preloaderColor: a.params.preloaderColor,\n material: material,\n materialPreloaderHtml: app.params.materialPreloaderHtml\n }));\n a.dropdown.on('click', 'label', handleDropdownClick);\n \n }\n var listBlock = a.input.parents('.list-block');\n if (listBlock.length && a.input.parents('.item-content').length > 0 && a.params.expandInput) {\n a.input.parents('.item-content').addClass('item-content-dropdown-expand');\n }\n a.positionDropDown();\n a.input.parents('.page-content').append(a.dropdown);\n a.dropdown.addClass('autocomplete-dropdown-in');\n a.input.trigger('input');\n app.onResize(a.positionDropDown);\n if (a.params.onOpen) a.params.onOpen(a);\n }\n else {\n $(document).once('page:init', '.autocomplete-page', a.pageInit);\n if (a.params.openIn === 'popup') {\n a.popup = app.popup(\n '
                                            ' +\n '
                                            ' +\n pageHTML +\n '
                                            ' +\n '
                                            ',\n true,\n a.params.openWithAnimation\n );\n a.popup = $(a.popup);\n if (a.params.autoFocus) {\n if (a.params.openWithAnimation) a.popup.once('popup:opened', a.autoFocus);\n else a.autoFocus.bind(a.popup)();\n }\n a.popup.once('popup:closed', function () {\n a.popup = undefined;\n a.opened = false;\n if (a.params.onClose) a.params.onClose(a);\n });\n }\n else {\n if (a.params.autoFocus) {\n $(document).once(a.params.openWithAnimation ? 'page:afteranimation' : 'page:init', '.autocomplete-page', a.autoFocus);\n }\n view.router.load({\n content: pageHTML,\n animatePages: a.params.openWithAnimation\n });\n $(document).once('page:back', '.autocomplete-page', function () {\n a.opened = false;\n if (a.params.onClose) a.params.onClose(a);\n });\n }\n }\n };\n a.close = function (e) {\n if (!a.opened) return;\n if (a.params.openIn === 'dropdown') {\n if (e && e.type === 'blur' && a.dropdown.find('label.active-state').length > 0) return;\n a.dropdown.removeClass('autocomplete-dropdown-in').remove();\n a.input.parents('.item-content-dropdown-expand').removeClass('item-content-dropdown-expand');\n a.opened = false;\n app.offResize(a.positionDropDown);\n if (a.params.onClose) a.params.onClose(a);\n }\n if (a.params.openIn === 'popup') {\n if (a.popup) app.closeModal(a.popup);\n }\n };\n \n // Init Events\n a.initEvents = function (detach) {\n var method = detach ? 'off' : 'on';\n if (a.params.openIn !== 'dropdown' && a.opener) {\n a.opener[method]('click', a.open);\n }\n if (a.params.openIn === 'dropdown' && a.input) {\n a.input[method]('focus', a.open);\n a.input[method]('input', handleInputValue);\n if (app.device.android) {\n $('html')[method]('click', closeOnHTMLClick);\n }\n else {\n a.input[method]('blur', a.close);\n }\n }\n if (detach && a.dropdown) {\n a.dropdown = null;\n }\n };\n \n // Init/Destroy Methods\n a.init = function () {\n a.initEvents();\n };\n a.destroy = function () {\n a.initEvents(true);\n a = null;\n };\n \n // Init\n a.init();\n \n return a;\n };\n app.autocomplete = function (params) {\n return new Autocomplete(params);\n };\n \n\n /*======================================================\n ************ Picker ************\n ======================================================*/\n var Picker = function (params) {\n var p = this;\n var defaults = {\n updateValuesOnMomentum: false,\n updateValuesOnTouchmove: true,\n rotateEffect: false,\n momentumRatio: 7,\n freeMode: false,\n // Common settings\n closeByOutsideClick: true,\n scrollToInput: true,\n inputReadOnly: true,\n convertToPopover: true,\n onlyInPopover: false,\n toolbar: true,\n toolbarCloseText: 'Done',\n toolbarTemplate:\n '
                                            ' +\n '
                                            ' +\n '
                                            ' +\n '
                                            ' +\n '{{closeText}}' +\n '
                                            ' +\n '
                                            ' +\n '
                                            '\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n p.params = params;\n p.cols = [];\n p.initialized = false;\n \n // Inline flag\n p.inline = p.params.container ? true : false;\n \n // 3D Transforms origin bug, only on safari\n var originBug = app.device.ios || (navigator.userAgent.toLowerCase().indexOf('safari') >= 0 && navigator.userAgent.toLowerCase().indexOf('chrome') < 0) && !app.device.android;\n \n // Should be converted to popover\n function isPopover() {\n var toPopover = false;\n if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover;\n if (!p.inline && p.params.input) {\n if (p.params.onlyInPopover) toPopover = true;\n else {\n if (app.device.ios) {\n toPopover = app.device.ipad ? true : false;\n }\n else {\n if (app.width >= 768) toPopover = true;\n }\n }\n }\n return toPopover;\n }\n function inPopover() {\n if (p.opened && p.container && p.container.length > 0 && p.container.parents('.popover').length > 0) return true;\n else return false;\n }\n \n // Value\n p.setValue = function (arrValues, transition) {\n var valueIndex = 0;\n if (p.cols.length === 0) {\n p.value = arrValues;\n p.updateValue(arrValues);\n return;\n }\n for (var i = 0; i < p.cols.length; i++) {\n if (p.cols[i] && !p.cols[i].divider) {\n p.cols[i].setValue(arrValues[valueIndex], transition);\n valueIndex++;\n }\n }\n };\n p.updateValue = function (forceValues) {\n var newValue = forceValues || [];\n var newDisplayValue = [], i, column;\n if (p.cols.length === 0) {\n for (i = 0; i < p.params.cols.length; i++) {\n column = p.params.cols[i];\n if (column.displayValues !== undefined && column.values !== undefined && column.values.indexOf(newValue[i]) !== undefined) {\n newDisplayValue.push(column.displayValues[column.values.indexOf(newValue[i])]);\n }\n else {\n newDisplayValue.push(newValue[i]);\n }\n }\n }\n else {\n for (i = 0; i < p.cols.length; i++) {\n if (!p.cols[i].divider) {\n newValue.push(p.cols[i].value);\n newDisplayValue.push(p.cols[i].displayValue);\n }\n }\n }\n \n if (newValue.indexOf(undefined) >= 0) {\n return;\n }\n p.value = newValue;\n p.displayValue = newDisplayValue;\n if (p.params.onChange) {\n p.params.onChange(p, p.value, p.displayValue);\n }\n if (p.input && p.input.length > 0) {\n $(p.input).val(p.params.formatValue ? p.params.formatValue(p, p.value, p.displayValue) : p.value.join(' '));\n $(p.input).trigger('change');\n }\n };\n \n // Columns Handlers\n p.initPickerCol = function (colElement, updateItems) {\n var colContainer = $(colElement);\n var colIndex = colContainer.index();\n var col = p.cols[colIndex];\n if (col.divider) return;\n col.container = colContainer;\n col.wrapper = col.container.find('.picker-items-col-wrapper');\n col.items = col.wrapper.find('.picker-item');\n \n var i, j;\n var wrapperHeight, itemHeight, itemsHeight, minTranslate, maxTranslate;\n col.replaceValues = function (values, displayValues) {\n col.destroyEvents();\n col.values = values;\n col.displayValues = displayValues;\n var newItemsHTML = p.columnHTML(col, true);\n col.wrapper.html(newItemsHTML);\n col.items = col.wrapper.find('.picker-item');\n col.calcSize();\n col.setValue(col.values[0], 0, true);\n col.initEvents();\n };\n var resizeTimeout;\n col.calcSize = function () {\n if (p.params.rotateEffect) {\n col.container.removeClass('picker-items-col-absolute');\n if (!col.width) col.container.css({width:''});\n }\n var colWidth, colHeight;\n colWidth = 0;\n colHeight = col.container[0].offsetHeight;\n wrapperHeight = col.wrapper[0].offsetHeight;\n itemHeight = col.items[0].offsetHeight;\n itemsHeight = itemHeight * col.items.length;\n minTranslate = colHeight / 2 - itemsHeight + itemHeight / 2;\n maxTranslate = colHeight / 2 - itemHeight / 2;\n if (col.width) {\n colWidth = col.width;\n if (parseInt(colWidth, 10) === colWidth) colWidth = colWidth + 'px';\n col.container.css({width: colWidth});\n }\n if (p.params.rotateEffect) {\n if (!col.width) {\n col.items.each(function () {\n var item = $(this).children('span');\n colWidth = Math.max(colWidth, item[0].offsetWidth);\n });\n col.container.css({width: (colWidth + 2) + 'px'});\n }\n col.container.addClass('picker-items-col-absolute');\n }\n };\n col.calcSize();\n \n col.wrapper.transform('translate3d(0,' + maxTranslate + 'px,0)').transition(0);\n \n \n var activeIndex = 0;\n var animationFrameId;\n \n // Set Value Function\n col.setValue = function (newValue, transition, valueCallbacks) {\n if (typeof transition === 'undefined') transition = '';\n var newActiveIndex = col.wrapper.find('.picker-item[data-picker-value=\"' + newValue + '\"]').index();\n if(typeof newActiveIndex === 'undefined' || newActiveIndex === -1) {\n return;\n }\n var newTranslate = -newActiveIndex * itemHeight + maxTranslate;\n // Update wrapper\n col.wrapper.transition(transition);\n col.wrapper.transform('translate3d(0,' + (newTranslate) + 'px,0)');\n \n // Watch items\n if (p.params.updateValuesOnMomentum && col.activeIndex && col.activeIndex !== newActiveIndex ) {\n $.cancelAnimationFrame(animationFrameId);\n col.wrapper.transitionEnd(function(){\n $.cancelAnimationFrame(animationFrameId);\n });\n updateDuringScroll();\n }\n \n // Update items\n col.updateItems(newActiveIndex, newTranslate, transition, valueCallbacks);\n };\n \n col.updateItems = function (activeIndex, translate, transition, valueCallbacks) {\n if (typeof translate === 'undefined') {\n translate = $.getTranslate(col.wrapper[0], 'y');\n }\n if(typeof activeIndex === 'undefined') activeIndex = -Math.round((translate - maxTranslate)/itemHeight);\n if (activeIndex < 0) activeIndex = 0;\n if (activeIndex >= col.items.length) activeIndex = col.items.length - 1;\n var previousActiveIndex = col.activeIndex;\n col.activeIndex = activeIndex;\n col.wrapper.find('.picker-selected').removeClass('picker-selected');\n \n col.items.transition(transition);\n \n var selectedItem = col.items.eq(activeIndex).addClass('picker-selected').transform('');\n \n // Set 3D rotate effect\n if (p.params.rotateEffect) {\n var percentage = (translate - (Math.floor((translate - maxTranslate)/itemHeight) * itemHeight + maxTranslate)) / itemHeight;\n \n col.items.each(function () {\n var item = $(this);\n var itemOffsetTop = item.index() * itemHeight;\n var translateOffset = maxTranslate - translate;\n var itemOffset = itemOffsetTop - translateOffset;\n var percentage = itemOffset / itemHeight;\n \n var itemsFit = Math.ceil(col.height / itemHeight / 2) + 1;\n \n var angle = (-18*percentage);\n if (angle > 180) angle = 180;\n if (angle < -180) angle = -180;\n // Far class\n if (Math.abs(percentage) > itemsFit) item.addClass('picker-item-far');\n else item.removeClass('picker-item-far');\n // Set transform\n item.transform('translate3d(0, ' + (-translate + maxTranslate) + 'px, ' + (originBug ? -110 : 0) + 'px) rotateX(' + angle + 'deg)');\n });\n }\n \n if (valueCallbacks || typeof valueCallbacks === 'undefined') {\n // Update values\n col.value = selectedItem.attr('data-picker-value');\n col.displayValue = col.displayValues ? col.displayValues[activeIndex] : col.value;\n // On change callback\n if (previousActiveIndex !== activeIndex) {\n if (col.onChange) {\n col.onChange(p, col.value, col.displayValue);\n }\n p.updateValue();\n }\n }\n };\n \n function updateDuringScroll() {\n animationFrameId = $.requestAnimationFrame(function () {\n col.updateItems(undefined, undefined, 0);\n updateDuringScroll();\n });\n }\n \n // Update items on init\n if (updateItems) col.updateItems(0, maxTranslate, 0);\n \n var allowItemClick = true;\n var isTouched, isMoved, touchStartY, touchCurrentY, touchStartTime, touchEndTime, startTranslate, returnTo, currentTranslate, prevTranslate, velocityTranslate, velocityTime;\n function handleTouchStart (e) {\n if (isMoved || isTouched) return;\n e.preventDefault();\n isTouched = true;\n touchStartY = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n \n allowItemClick = true;\n startTranslate = currentTranslate = $.getTranslate(col.wrapper[0], 'y');\n }\n function handleTouchMove (e) {\n if (!isTouched) return;\n e.preventDefault();\n allowItemClick = false;\n touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (!isMoved) {\n // First move\n $.cancelAnimationFrame(animationFrameId);\n isMoved = true;\n startTranslate = currentTranslate = $.getTranslate(col.wrapper[0], 'y');\n col.wrapper.transition(0);\n }\n \n var diff = touchCurrentY - touchStartY;\n currentTranslate = startTranslate + diff;\n returnTo = undefined;\n \n // Normalize translate\n if (currentTranslate < minTranslate) {\n currentTranslate = minTranslate - Math.pow(minTranslate - currentTranslate, 0.8);\n returnTo = 'min';\n }\n if (currentTranslate > maxTranslate) {\n currentTranslate = maxTranslate + Math.pow(currentTranslate - maxTranslate, 0.8);\n returnTo = 'max';\n }\n // Transform wrapper\n col.wrapper.transform('translate3d(0,' + currentTranslate + 'px,0)');\n \n // Update items\n col.updateItems(undefined, currentTranslate, 0, p.params.updateValuesOnTouchmove);\n \n // Calc velocity\n velocityTranslate = currentTranslate - prevTranslate || currentTranslate;\n velocityTime = (new Date()).getTime();\n prevTranslate = currentTranslate;\n }\n function handleTouchEnd (e) {\n if (!isTouched || !isMoved) {\n isTouched = isMoved = false;\n return;\n }\n isTouched = isMoved = false;\n col.wrapper.transition('');\n if (returnTo) {\n if (returnTo === 'min') {\n col.wrapper.transform('translate3d(0,' + minTranslate + 'px,0)');\n }\n else col.wrapper.transform('translate3d(0,' + maxTranslate + 'px,0)');\n }\n touchEndTime = new Date().getTime();\n var velocity, newTranslate;\n if (touchEndTime - touchStartTime > 300) {\n newTranslate = currentTranslate;\n }\n else {\n velocity = Math.abs(velocityTranslate / (touchEndTime - velocityTime));\n newTranslate = currentTranslate + velocityTranslate * p.params.momentumRatio;\n }\n \n newTranslate = Math.max(Math.min(newTranslate, maxTranslate), minTranslate);\n \n // Active Index\n var activeIndex = -Math.floor((newTranslate - maxTranslate)/itemHeight);\n \n // Normalize translate\n if (!p.params.freeMode) newTranslate = -activeIndex * itemHeight + maxTranslate;\n \n // Transform wrapper\n col.wrapper.transform('translate3d(0,' + (parseInt(newTranslate,10)) + 'px,0)');\n \n // Update items\n col.updateItems(activeIndex, newTranslate, '', true);\n \n // Watch items\n if (p.params.updateValuesOnMomentum) {\n updateDuringScroll();\n col.wrapper.transitionEnd(function(){\n $.cancelAnimationFrame(animationFrameId);\n });\n }\n \n // Allow click\n setTimeout(function () {\n allowItemClick = true;\n }, 100);\n }\n \n function handleClick(e) {\n if (!allowItemClick) return;\n $.cancelAnimationFrame(animationFrameId);\n /*jshint validthis:true */\n var value = $(this).attr('data-picker-value');\n col.setValue(value);\n }\n \n col.initEvents = function (detach) {\n var method = detach ? 'off' : 'on';\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n col.container[method](app.touchEvents.start, handleTouchStart, activeListener);\n col.container[method](app.touchEvents.move, handleTouchMove, activeListener);\n col.container[method](app.touchEvents.end, handleTouchEnd, activeListener);\n col.items[method]('click', handleClick);\n };\n col.destroyEvents = function () {\n col.initEvents(true);\n };\n \n col.container[0].f7DestroyPickerCol = function () {\n col.destroyEvents();\n };\n \n col.initEvents();\n \n };\n p.destroyPickerCol = function (colContainer) {\n colContainer = $(colContainer);\n if ('f7DestroyPickerCol' in colContainer[0]) colContainer[0].f7DestroyPickerCol();\n };\n // Resize cols\n function resizeCols() {\n if (!p.opened) return;\n for (var i = 0; i < p.cols.length; i++) {\n if (!p.cols[i].divider) {\n p.cols[i].calcSize();\n p.cols[i].setValue(p.cols[i].value, 0, false);\n }\n }\n }\n app.onResize(resizeCols);\n \n // HTML Layout\n p.columnHTML = function (col, onlyItems) {\n var columnItemsHTML = '';\n var columnHTML = '';\n if (col.divider) {\n columnHTML += '
                                            ' + col.content + '
                                            ';\n }\n else {\n for (var j = 0; j < col.values.length; j++) {\n columnItemsHTML += '
                                            ' + (col.displayValues ? col.displayValues[j] : col.values[j]) + '
                                            ';\n }\n columnHTML += '
                                            ' + columnItemsHTML + '
                                            ';\n }\n return onlyItems ? columnItemsHTML : columnHTML;\n };\n p.layout = function () {\n var pickerHTML = '';\n var pickerClass = '';\n var i;\n p.cols = [];\n var colsHTML = '';\n for (i = 0; i < p.params.cols.length; i++) {\n var col = p.params.cols[i];\n colsHTML += p.columnHTML(p.params.cols[i]);\n p.cols.push(col);\n }\n pickerClass = 'picker-modal picker-columns ' + (p.params.cssClass || '') + (p.params.rotateEffect ? ' picker-3d' : '');\n pickerHTML =\n '
                                            ' +\n (p.params.toolbar ? p.params.toolbarTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : '') +\n '
                                            ' +\n colsHTML +\n '
                                            ' +\n '
                                            ' +\n '
                                            ';\n \n p.pickerHTML = pickerHTML;\n };\n \n // Input Events\n function openOnInput(e) {\n e.preventDefault();\n if (p.opened) return;\n p.open();\n if (p.params.scrollToInput && !isPopover()) {\n var pageContent = p.input.parents('.page-content');\n if (pageContent.length === 0) return;\n \n var paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-bottom'), 10),\n pageHeight = pageContent[0].offsetHeight - paddingTop - p.container.height(),\n pageScrollHeight = pageContent[0].scrollHeight - paddingTop - p.container.height(),\n newPaddingBottom;\n var inputTop = p.input.offset().top - paddingTop + p.input[0].offsetHeight;\n if (inputTop > pageHeight) {\n var scrollTop = pageContent.scrollTop() + inputTop - pageHeight;\n if (scrollTop + pageHeight > pageScrollHeight) {\n newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom;\n if (pageHeight === pageScrollHeight) {\n newPaddingBottom = p.container.height();\n }\n pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'});\n }\n pageContent.scrollTop(scrollTop, 300);\n }\n }\n }\n function closeOnHTMLClick(e) {\n if (inPopover()) return;\n if (p.input && p.input.length > 0) {\n if (e.target !== p.input[0] && $(e.target).parents('.picker-modal').length === 0) p.close();\n }\n else {\n if ($(e.target).parents('.picker-modal').length === 0) p.close();\n }\n }\n \n if (p.params.input) {\n p.input = $(p.params.input);\n if (p.input.length > 0) {\n if (p.params.inputReadOnly) p.input.prop('readOnly', true);\n if (!p.inline) {\n p.input.on('click', openOnInput);\n }\n if (p.params.inputReadOnly) {\n p.input.on('focus mousedown', function (e) {\n e.preventDefault();\n });\n }\n }\n \n }\n \n if (!p.inline && p.params.closeByOutsideClick) $('html').on('click', closeOnHTMLClick);\n \n // Open\n function onPickerClose() {\n p.opened = false;\n if (p.input && p.input.length > 0) {\n p.input.parents('.page-content').css({'padding-bottom': ''});\n if (app.params.material) p.input.trigger('blur');\n }\n if (p.params.onClose) p.params.onClose(p);\n \n // Destroy events\n p.container.find('.picker-items-col').each(function () {\n p.destroyPickerCol(this);\n });\n }\n \n p.opened = false;\n p.open = function () {\n var toPopover = isPopover();\n \n if (!p.opened) {\n \n // Layout\n p.layout();\n \n // Append\n if (toPopover) {\n p.pickerHTML = '
                                            ' + p.pickerHTML + '
                                            ';\n p.popover = app.popover(p.pickerHTML, p.params.input, true);\n p.container = $(p.popover).find('.picker-modal');\n $(p.popover).on('popover:close', function () {\n onPickerClose();\n });\n }\n else if (p.inline) {\n p.container = $(p.pickerHTML);\n p.container.addClass('picker-modal-inline');\n $(p.params.container).append(p.container);\n }\n else {\n p.container = $(app.pickerModal(p.pickerHTML));\n $(p.container)\n .on('picker:close', function () {\n onPickerClose();\n });\n }\n \n // Store picker instance\n p.container[0].f7Picker = p;\n \n // Init Events\n p.container.find('.picker-items-col').each(function () {\n var updateItems = true;\n if ((!p.initialized && p.params.value) || (p.initialized && p.value)) updateItems = false;\n p.initPickerCol(this, updateItems);\n });\n \n // Set value\n if (!p.initialized) {\n if (p.value) p.setValue(p.value, 0);\n else if (p.params.value) {\n p.setValue(p.params.value, 0);\n }\n }\n else {\n if (p.value) p.setValue(p.value, 0);\n }\n \n // Material Focus\n if (p.input && p.input.length > 0 && app.params.material) {\n p.input.trigger('focus');\n }\n }\n \n // Set flag\n p.opened = true;\n p.initialized = true;\n \n if (p.params.onOpen) p.params.onOpen(p);\n };\n \n // Close\n p.close = function () {\n if (!p.opened || p.inline) return;\n if (inPopover()) {\n app.closeModal(p.popover);\n return;\n }\n else {\n app.closeModal(p.container);\n return;\n }\n };\n \n // Destroy\n p.destroy = function () {\n p.close();\n if (p.params.input && p.input.length > 0) {\n p.input.off('click focus', openOnInput);\n }\n $('html').off('click', closeOnHTMLClick);\n app.offResize(resizeCols);\n };\n \n if (p.inline) {\n p.open();\n }\n else {\n if (!p.initialized && p.params.value) p.setValue(p.params.value);\n }\n \n return p;\n };\n app.picker = function (params) {\n return new Picker(params);\n };\n \n\n /*======================================================\n ************ Calendar ************\n ======================================================*/\n var Calendar = function (params) {\n var p = this;\n var defaults = {\n monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August' , 'September' , 'October', 'November', 'December'],\n monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n firstDay: 1, // First day of the week, Monday\n weekendDays: [0, 6], // Sunday and Saturday\n multiple: false,\n rangePicker: false,\n dateFormat: 'yyyy-mm-dd',\n direction: 'horizontal', // or 'vertical'\n minDate: null,\n maxDate: null,\n disabled: null, // dates range of disabled days\n events: null, // dates range of days with events\n rangesClasses: null, //array with custom classes date ranges\n touchMove: true,\n animate: true,\n closeOnSelect: false,\n monthPicker: true,\n monthPickerTemplate:\n '
                                            ' +\n '' +\n '' +\n '' +\n '
                                            ',\n yearPicker: true,\n yearPickerTemplate:\n '
                                            ' +\n '' +\n '' +\n '' +\n '
                                            ',\n weekHeader: true,\n // Common settings\n closeByOutsideClick: true,\n scrollToInput: true,\n inputReadOnly: true,\n convertToPopover: true,\n onlyInPopover: false,\n toolbar: true,\n toolbarCloseText: 'Done',\n headerPlaceholder: 'Select date',\n header: app.params.material,\n footer: app.params.material,\n toolbarTemplate:\n '
                                            ' +\n '
                                            ' +\n '{{monthPicker}}' +\n '{{yearPicker}}' +\n '
                                            ' +\n '
                                            ',\n headerTemplate:\n '
                                            ' +\n '
                                            {{placeholder}}
                                            ' +\n '
                                            ',\n footerTemplate:\n '
                                            ' +\n '{{closeText}}' +\n '
                                            ',\n \n /* Callbacks\n onMonthAdd\n onChange\n onOpen\n onClose\n onDayClick\n onMonthYearChangeStart\n onMonthYearChangeEnd\n */\n };\n params = params || {};\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n }\n p.params = params;\n p.initialized = false;\n \n // Inline flag\n p.inline = p.params.container ? true : false;\n \n // Is horizontal\n p.isH = p.params.direction === 'horizontal';\n \n // RTL inverter\n var inverter = p.isH ? (app.rtl ? -1 : 1) : 1;\n \n // Animating flag\n p.animating = false;\n \n // Should be converted to popover\n function isPopover() {\n var toPopover = false;\n if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover;\n if (!p.inline && p.params.input) {\n if (p.params.onlyInPopover) toPopover = true;\n else {\n if (app.device.ios) {\n toPopover = app.device.ipad ? true : false;\n }\n else {\n if (app.width >= 768) toPopover = true;\n }\n }\n }\n return toPopover;\n }\n function inPopover() {\n if (p.opened && p.container && p.container.length > 0 && p.container.parents('.popover').length > 0) return true;\n else return false;\n }\n \n // Format date\n function formatDate(date) {\n date = new Date(date);\n var year = date.getFullYear();\n var month = date.getMonth();\n var month1 = month + 1;\n var day = date.getDate();\n var weekDay = date.getDay();\n \n return p.params.dateFormat\n .replace(/yyyy/g, year)\n .replace(/yy/g, (year + '').substring(2))\n .replace(/mm/g, month1 < 10 ? '0' + month1 : month1)\n .replace(/m(\\W+)/g, month1 + '$1')\n .replace(/MM/g, p.params.monthNames[month])\n .replace(/M(\\W+)/g, p.params.monthNamesShort[month] + '$1')\n .replace(/dd/g, day < 10 ? '0' + day : day)\n .replace(/d(\\W+)/g, day + '$1')\n .replace(/DD/g, p.params.dayNames[weekDay])\n .replace(/D(\\W+)/g, p.params.dayNamesShort[weekDay] + '$1');\n }\n \n \n // Value\n p.addValue = function (value) {\n if (p.params.multiple) {\n if (!p.value) p.value = [];\n var inValuesIndex;\n for (var i = 0; i < p.value.length; i++) {\n if (new Date(value).getTime() === new Date(p.value[i]).getTime()) {\n inValuesIndex = i;\n }\n }\n if (typeof inValuesIndex === 'undefined') {\n p.value.push(value);\n }\n else {\n p.value.splice(inValuesIndex, 1);\n }\n p.updateValue();\n }\n else if (p.params.rangePicker) {\n if (!p.value) p.value = [];\n if (p.value.length === 2 || p.value.length === 0) {\n p.value = [];\n }\n if (p.value[0] !== value) p.value.push(value);\n else p.value = [];\n p.value.sort(function (a,b) {\n return a - b;\n });\n p.updateValue();\n }\n else {\n p.value = [value];\n p.updateValue();\n }\n };\n p.setValue = function (arrValues) {\n p.value = arrValues;\n p.updateValue();\n };\n p.updateValue = function (onlyHeader) {\n var i, inputValue;\n if (p.container && p.container.length > 0) {\n p.wrapper.find('.picker-calendar-day-selected').removeClass('picker-calendar-day-selected');\n var valueDate;\n if (p.params.rangePicker && p.value.length === 2) {\n for (i = new Date(p.value[0]).getTime(); i <= new Date(p.value[1]).getTime(); i += 24*60*60*1000) {\n valueDate = new Date(i);\n p.wrapper.find('.picker-calendar-day[data-date=\"' + valueDate.getFullYear() + '-' + valueDate.getMonth() + '-' + valueDate.getDate() + '\"]').addClass('picker-calendar-day-selected');\n }\n }\n else {\n for (i = 0; i < p.value.length; i++) {\n valueDate = new Date(p.value[i]);\n p.wrapper.find('.picker-calendar-day[data-date=\"' + valueDate.getFullYear() + '-' + valueDate.getMonth() + '-' + valueDate.getDate() + '\"]').addClass('picker-calendar-day-selected');\n }\n }\n }\n \n if (p.params.onChange) {\n p.params.onChange(p, p.value);\n }\n if ((p.input && p.input.length > 0) || (app.params.material && p.params.header)) {\n if (p.params.formatValue) inputValue = p.params.formatValue(p, p.value);\n else {\n inputValue = [];\n for (i = 0; i < p.value.length; i++) {\n inputValue.push(formatDate(p.value[i]));\n }\n inputValue = inputValue.join(p.params.rangePicker ? ' - ' : ', ');\n }\n if (app.params.material && p.params.header && p.container && p.container.length > 0) {\n p.container.find('.picker-calendar-selected-date').text(inputValue);\n }\n if (p.input && p.input.length > 0 && !onlyHeader) {\n $(p.input).val(inputValue);\n $(p.input).trigger('change');\n }\n \n }\n };\n \n // Columns Handlers\n p.initCalendarEvents = function () {\n var col;\n var allowItemClick = true;\n var isTouched, isMoved, touchStartX, touchStartY, touchCurrentX, touchCurrentY, touchStartTime, touchEndTime, startTranslate, currentTranslate, wrapperWidth, wrapperHeight, percentage, touchesDiff, isScrolling;\n function handleTouchStart (e) {\n if (isMoved || isTouched) return;\n // e.preventDefault();\n isTouched = true;\n touchStartX = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n touchStartY = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = (new Date()).getTime();\n percentage = 0;\n allowItemClick = true;\n isScrolling = undefined;\n startTranslate = currentTranslate = p.monthsTranslate;\n }\n function handleTouchMove (e) {\n if (!isTouched) return;\n \n touchCurrentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n if (typeof isScrolling === 'undefined') {\n isScrolling = !!(isScrolling || Math.abs(touchCurrentY - touchStartY) > Math.abs(touchCurrentX - touchStartX));\n }\n if (p.isH && isScrolling) {\n isTouched = false;\n return;\n }\n e.preventDefault();\n if (p.animating) {\n isTouched = false;\n return;\n }\n allowItemClick = false;\n if (!isMoved) {\n // First move\n isMoved = true;\n wrapperWidth = p.wrapper[0].offsetWidth;\n wrapperHeight = p.wrapper[0].offsetHeight;\n p.wrapper.transition(0);\n }\n \n touchesDiff = p.isH ? touchCurrentX - touchStartX : touchCurrentY - touchStartY;\n percentage = touchesDiff/(p.isH ? wrapperWidth : wrapperHeight);\n currentTranslate = (p.monthsTranslate * inverter + percentage) * 100;\n \n // Transform wrapper\n p.wrapper.transform('translate3d(' + (p.isH ? currentTranslate : 0) + '%, ' + (p.isH ? 0 : currentTranslate) + '%, 0)');\n \n }\n function handleTouchEnd (e) {\n if (!isTouched || !isMoved) {\n isTouched = isMoved = false;\n return;\n }\n isTouched = isMoved = false;\n \n touchEndTime = new Date().getTime();\n if (touchEndTime - touchStartTime < 300) {\n if (Math.abs(touchesDiff) < 10) {\n p.resetMonth();\n }\n else if (touchesDiff >= 10) {\n if (app.rtl) p.nextMonth();\n else p.prevMonth();\n }\n else {\n if (app.rtl) p.prevMonth();\n else p.nextMonth();\n }\n }\n else {\n if (percentage <= -0.5) {\n if (app.rtl) p.prevMonth();\n else p.nextMonth();\n }\n else if (percentage >= 0.5) {\n if (app.rtl) p.nextMonth();\n else p.prevMonth();\n }\n else {\n p.resetMonth();\n }\n }\n \n // Allow click\n setTimeout(function () {\n allowItemClick = true;\n }, 100);\n }\n \n function handleDayClick(e) {\n if (!allowItemClick) return;\n var day = $(e.target).parents('.picker-calendar-day');\n if (day.length === 0 && $(e.target).hasClass('picker-calendar-day')) {\n day = $(e.target);\n }\n if (day.length === 0) return;\n if (day.hasClass('picker-calendar-day-disabled')) return;\n if (!p.params.rangePicker) {\n if (day.hasClass('picker-calendar-day-next')) p.nextMonth();\n if (day.hasClass('picker-calendar-day-prev')) p.prevMonth();\n }\n var dateYear = day.attr('data-year');\n var dateMonth = day.attr('data-month');\n var dateDay = day.attr('data-day');\n if (p.params.onDayClick) {\n p.params.onDayClick(p, day[0], dateYear, dateMonth, dateDay);\n }\n if (!day.hasClass('picker-calendar-day-selected') || p.params.multiple || p.params.rangePicker) {\n p.addValue(new Date(dateYear, dateMonth, dateDay, 0, 0, 0));\n }\n if (p.params.closeOnSelect) {\n if (p.params.rangePicker && p.value.length === 2 || !p.params.rangePicker) p.close();\n }\n }\n \n p.container.find('.picker-calendar-prev-month').on('click', p.prevMonth);\n p.container.find('.picker-calendar-next-month').on('click', p.nextMonth);\n p.container.find('.picker-calendar-prev-year').on('click', p.prevYear);\n p.container.find('.picker-calendar-next-year').on('click', p.nextYear);\n p.wrapper.on('click', handleDayClick);\n var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false;\n var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false;\n if (p.params.touchMove) {\n p.wrapper.on(app.touchEvents.start, handleTouchStart, passiveListener);\n p.wrapper.on(app.touchEvents.move, handleTouchMove, activeListener);\n p.wrapper.on(app.touchEvents.end, handleTouchEnd, passiveListener);\n }\n \n p.container[0].f7DestroyCalendarEvents = function () {\n p.container.find('.picker-calendar-prev-month').off('click', p.prevMonth);\n p.container.find('.picker-calendar-next-month').off('click', p.nextMonth);\n p.container.find('.picker-calendar-prev-year').off('click', p.prevYear);\n p.container.find('.picker-calendar-next-year').off('click', p.nextYear);\n p.wrapper.off('click', handleDayClick);\n if (p.params.touchMove) {\n p.wrapper.off(app.touchEvents.start, handleTouchStart, passiveListener);\n p.wrapper.off(app.touchEvents.move, handleTouchMove, activeListener);\n p.wrapper.off(app.touchEvents.end, handleTouchEnd, passiveListener);\n }\n };\n \n \n };\n p.destroyCalendarEvents = function (colContainer) {\n if ('f7DestroyCalendarEvents' in p.container[0]) p.container[0].f7DestroyCalendarEvents();\n };\n \n // Scan Dates Range\n p.dateInRange = function (dayDate, range) {\n var match = false;\n var i;\n if (!range) return false;\n if (Array.isArray(range)) {\n for (i = 0; i < range.length; i ++) {\n if (range[i].from || range[i].to) {\n if (range[i].from && range[i].to) {\n if ((dayDate <= new Date(range[i].to).getTime()) && (dayDate >= new Date(range[i].from).getTime())) {\n match = true;\n }\n }\n else if (range[i].from) {\n if (dayDate >= new Date(range[i].from).getTime()) {\n match = true;\n }\n }\n else if (range[i].to) {\n if (dayDate <= new Date(range[i].to).getTime()) {\n match = true;\n }\n }\n } else if (dayDate === new Date(range[i]).getTime()) {\n match = true;\n }\n }\n }\n else if (range.from || range.to) {\n if (range.from && range.to) {\n if ((dayDate <= new Date(range.to).getTime()) && (dayDate >= new Date(range.from).getTime())) {\n match = true;\n }\n }\n else if (range.from) {\n if (dayDate >= new Date(range.from).getTime()) {\n match = true;\n }\n }\n else if (range.to) {\n if (dayDate <= new Date(range.to).getTime()) {\n match = true;\n }\n }\n }\n else if (typeof range === 'function') {\n match = range(new Date(dayDate));\n }\n return match;\n };\n // Calendar Methods\n p.daysInMonth = function (date) {\n var d = new Date(date);\n return new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();\n };\n p.monthHTML = function (date, offset) {\n date = new Date(date);\n var year = date.getFullYear(),\n month = date.getMonth(),\n day = date.getDate();\n if (offset === 'next') {\n if (month === 11) date = new Date(year + 1, 0);\n else date = new Date(year, month + 1, 1);\n }\n if (offset === 'prev') {\n if (month === 0) date = new Date(year - 1, 11);\n else date = new Date(year, month - 1, 1);\n }\n if (offset === 'next' || offset === 'prev') {\n month = date.getMonth();\n year = date.getFullYear();\n }\n var daysInPrevMonth = p.daysInMonth(new Date(date.getFullYear(), date.getMonth()).getTime() - 10 * 24 * 60 * 60 * 1000),\n daysInMonth = p.daysInMonth(date),\n firstDayOfMonthIndex = new Date(date.getFullYear(), date.getMonth()).getDay();\n if (firstDayOfMonthIndex === 0) firstDayOfMonthIndex = 7;\n \n var dayDate, currentValues = [], i, j, k,\n rows = 6, cols = 7,\n monthHTML = '',\n dayIndex = 0 + (p.params.firstDay - 1),\n today = new Date().setHours(0,0,0,0),\n minDate = p.params.minDate ? new Date(p.params.minDate).getTime() : null,\n maxDate = p.params.maxDate ? new Date(p.params.maxDate).getTime() : null,\n disabled,\n hasEvent;\n \n if (p.value && p.value.length) {\n for (i = 0; i < p.value.length; i++) {\n currentValues.push(new Date(p.value[i]).setHours(0,0,0,0));\n }\n }\n \n for (i = 1; i <= rows; i++) {\n var rowHTML = '';\n var row = i;\n for (j = 1; j <= cols; j++) {\n var col = j;\n dayIndex ++;\n var dayNumber = dayIndex - firstDayOfMonthIndex;\n var weekDayIndex = (col - 1 + p.params.firstDay > 6) ? (col - 1 - 7 + p.params.firstDay) : (col - 1 + p.params.firstDay);\n var addClass = '';\n if (dayNumber < 0) {\n dayNumber = daysInPrevMonth + dayNumber + 1;\n addClass += ' picker-calendar-day-prev';\n dayDate = new Date(month - 1 < 0 ? year - 1 : year, month - 1 < 0 ? 11 : month - 1, dayNumber).getTime();\n }\n else {\n dayNumber = dayNumber + 1;\n if (dayNumber > daysInMonth) {\n dayNumber = dayNumber - daysInMonth;\n addClass += ' picker-calendar-day-next';\n dayDate = new Date(month + 1 > 11 ? year + 1 : year, month + 1 > 11 ? 0 : month + 1, dayNumber).getTime();\n }\n else {\n dayDate = new Date(year, month, dayNumber).getTime();\n }\n }\n // Today\n if (dayDate === today) addClass += ' picker-calendar-day-today';\n // Selected\n if (p.params.rangePicker && currentValues.length === 2) {\n if (dayDate >= currentValues[0] && dayDate <= currentValues[1]) addClass += ' picker-calendar-day-selected';\n }\n else {\n if (currentValues.indexOf(dayDate) >= 0) addClass += ' picker-calendar-day-selected';\n }\n // Weekend\n if (p.params.weekendDays.indexOf(weekDayIndex) >= 0) {\n addClass += ' picker-calendar-day-weekend';\n }\n // Has Events\n hasEvent = false;\n if (p.params.events) {\n if (p.dateInRange(dayDate, p.params.events)) {\n hasEvent = true;\n }\n }\n if (hasEvent) {\n addClass += ' picker-calendar-day-has-events';\n }\n // Custom Ranges\n if (p.params.rangesClasses) {\n for (k = 0; k < p.params.rangesClasses.length; k++) {\n if (p.dateInRange(dayDate, p.params.rangesClasses[k].range)) {\n addClass += ' ' + p.params.rangesClasses[k].cssClass;\n }\n }\n }\n // Disabled\n disabled = false;\n if ((minDate && dayDate < minDate) || (maxDate && dayDate > maxDate)) {\n disabled = true;\n }\n if (p.params.disabled) {\n if (p.dateInRange(dayDate, p.params.disabled)) {\n disabled = true;\n }\n }\n if (disabled) {\n addClass += ' picker-calendar-day-disabled';\n }\n \n \n dayDate = new Date(dayDate);\n var dayYear = dayDate.getFullYear();\n var dayMonth = dayDate.getMonth();\n rowHTML += '
                                            '+dayNumber+'
                                            ';\n }\n monthHTML += '
                                            ' + rowHTML + '
                                            ';\n }\n monthHTML = '
                                            ' + monthHTML + '
                                            ';\n return monthHTML;\n };\n p.animating = false;\n p.updateCurrentMonthYear = function (dir) {\n if (typeof dir === 'undefined') {\n p.currentMonth = parseInt(p.months.eq(1).attr('data-month'), 10);\n p.currentYear = parseInt(p.months.eq(1).attr('data-year'), 10);\n }\n else {\n p.currentMonth = parseInt(p.months.eq(dir === 'next' ? (p.months.length - 1) : 0).attr('data-month'), 10);\n p.currentYear = parseInt(p.months.eq(dir === 'next' ? (p.months.length - 1) : 0).attr('data-year'), 10);\n }\n p.container.find('.current-month-value').text(p.params.monthNames[p.currentMonth]);\n p.container.find('.current-year-value').text(p.currentYear);\n \n };\n p.onMonthChangeStart = function (dir) {\n p.updateCurrentMonthYear(dir);\n p.months.removeClass('picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next');\n var currentIndex = dir === 'next' ? p.months.length - 1 : 0;\n \n p.months.eq(currentIndex).addClass('picker-calendar-month-current');\n p.months.eq(dir === 'next' ? currentIndex - 1 : currentIndex + 1).addClass(dir === 'next' ? 'picker-calendar-month-prev' : 'picker-calendar-month-next');\n \n if (p.params.onMonthYearChangeStart) {\n p.params.onMonthYearChangeStart(p, p.currentYear, p.currentMonth);\n }\n };\n p.onMonthChangeEnd = function (dir, rebuildBoth) {\n p.animating = false;\n var nextMonthHTML, prevMonthHTML, newMonthHTML;\n p.wrapper.find('.picker-calendar-month:not(.picker-calendar-month-prev):not(.picker-calendar-month-current):not(.picker-calendar-month-next)').remove();\n \n if (typeof dir === 'undefined') {\n dir = 'next';\n rebuildBoth = true;\n }\n if (!rebuildBoth) {\n newMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), dir);\n }\n else {\n p.wrapper.find('.picker-calendar-month-next, .picker-calendar-month-prev').remove();\n prevMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), 'prev');\n nextMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), 'next');\n }\n if (dir === 'next' || rebuildBoth) {\n p.wrapper.append(newMonthHTML || nextMonthHTML);\n }\n if (dir === 'prev' || rebuildBoth) {\n p.wrapper.prepend(newMonthHTML || prevMonthHTML);\n }\n p.months = p.wrapper.find('.picker-calendar-month');\n p.setMonthsTranslate(p.monthsTranslate);\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, dir === 'next' ? p.months.eq(p.months.length - 1)[0] : p.months.eq(0)[0]);\n }\n if (p.params.onMonthYearChangeEnd) {\n p.params.onMonthYearChangeEnd(p, p.currentYear, p.currentMonth);\n }\n };\n p.setMonthsTranslate = function (translate) {\n translate = translate || p.monthsTranslate || 0;\n if (typeof p.monthsTranslate === 'undefined') p.monthsTranslate = translate;\n p.months.removeClass('picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next');\n var prevMonthTranslate = -(translate + 1) * 100 * inverter;\n var currentMonthTranslate = -translate * 100 * inverter;\n var nextMonthTranslate = -(translate - 1) * 100 * inverter;\n p.months.eq(0).transform('translate3d(' + (p.isH ? prevMonthTranslate : 0) + '%, ' + (p.isH ? 0 : prevMonthTranslate) + '%, 0)').addClass('picker-calendar-month-prev');\n p.months.eq(1).transform('translate3d(' + (p.isH ? currentMonthTranslate : 0) + '%, ' + (p.isH ? 0 : currentMonthTranslate) + '%, 0)').addClass('picker-calendar-month-current');\n p.months.eq(2).transform('translate3d(' + (p.isH ? nextMonthTranslate : 0) + '%, ' + (p.isH ? 0 : nextMonthTranslate) + '%, 0)').addClass('picker-calendar-month-next');\n };\n p.nextMonth = function (transition) {\n if (typeof transition === 'undefined' || typeof transition === 'object') {\n transition = '';\n if (!p.params.animate) transition = 0;\n }\n var nextMonth = parseInt(p.months.eq(p.months.length - 1).attr('data-month'), 10);\n var nextYear = parseInt(p.months.eq(p.months.length - 1).attr('data-year'), 10);\n var nextDate = new Date(nextYear, nextMonth);\n var nextDateTime = nextDate.getTime();\n var transitionEndCallback = p.animating ? false : true;\n if (p.params.maxDate) {\n if (nextDateTime > new Date(p.params.maxDate).getTime()) {\n return p.resetMonth();\n }\n }\n p.monthsTranslate --;\n if (nextMonth === p.currentMonth) {\n var nextMonthTranslate = -(p.monthsTranslate) * 100 * inverter;\n var nextMonthHTML = $(p.monthHTML(nextDateTime, 'next')).transform('translate3d(' + (p.isH ? nextMonthTranslate : 0) + '%, ' + (p.isH ? 0 : nextMonthTranslate) + '%, 0)').addClass('picker-calendar-month-next');\n p.wrapper.append(nextMonthHTML[0]);\n p.months = p.wrapper.find('.picker-calendar-month');\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, p.months.eq(p.months.length - 1)[0]);\n }\n }\n p.animating = true;\n p.onMonthChangeStart('next');\n var translate = (p.monthsTranslate * 100) * inverter;\n \n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)');\n if (transitionEndCallback) {\n p.wrapper.transitionEnd(function () {\n p.onMonthChangeEnd('next');\n });\n }\n if (!p.params.animate) {\n p.onMonthChangeEnd('next');\n }\n };\n p.prevMonth = function (transition) {\n if (typeof transition === 'undefined' || typeof transition === 'object') {\n transition = '';\n if (!p.params.animate) transition = 0;\n }\n var prevMonth = parseInt(p.months.eq(0).attr('data-month'), 10);\n var prevYear = parseInt(p.months.eq(0).attr('data-year'), 10);\n var prevDate = new Date(prevYear, prevMonth + 1, -1);\n var prevDateTime = prevDate.getTime();\n var transitionEndCallback = p.animating ? false : true;\n if (p.params.minDate) {\n if (prevDateTime < new Date(p.params.minDate).getTime()) {\n return p.resetMonth();\n }\n }\n p.monthsTranslate ++;\n if (prevMonth === p.currentMonth) {\n var prevMonthTranslate = -(p.monthsTranslate) * 100 * inverter;\n var prevMonthHTML = $(p.monthHTML(prevDateTime, 'prev')).transform('translate3d(' + (p.isH ? prevMonthTranslate : 0) + '%, ' + (p.isH ? 0 : prevMonthTranslate) + '%, 0)').addClass('picker-calendar-month-prev');\n p.wrapper.prepend(prevMonthHTML[0]);\n p.months = p.wrapper.find('.picker-calendar-month');\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, p.months.eq(0)[0]);\n }\n }\n p.animating = true;\n p.onMonthChangeStart('prev');\n var translate = (p.monthsTranslate * 100) * inverter;\n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)');\n if (transitionEndCallback) {\n p.wrapper.transitionEnd(function () {\n p.onMonthChangeEnd('prev');\n });\n }\n if (!p.params.animate) {\n p.onMonthChangeEnd('prev');\n }\n };\n p.resetMonth = function (transition) {\n if (typeof transition === 'undefined') transition = '';\n var translate = (p.monthsTranslate * 100) * inverter;\n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)');\n };\n p.setYearMonth = function (year, month, transition) {\n if (typeof year === 'undefined') year = p.currentYear;\n if (typeof month === 'undefined') month = p.currentMonth;\n if (typeof transition === 'undefined' || typeof transition === 'object') {\n transition = '';\n if (!p.params.animate) transition = 0;\n }\n var targetDate;\n if (year < p.currentYear) {\n targetDate = new Date(year, month + 1, -1).getTime();\n }\n else {\n targetDate = new Date(year, month).getTime();\n }\n if (p.params.maxDate && targetDate > new Date(p.params.maxDate).getTime()) {\n return false;\n }\n if (p.params.minDate && targetDate < new Date(p.params.minDate).getTime()) {\n return false;\n }\n var currentDate = new Date(p.currentYear, p.currentMonth).getTime();\n var dir = targetDate > currentDate ? 'next' : 'prev';\n var newMonthHTML = p.monthHTML(new Date(year, month));\n p.monthsTranslate = p.monthsTranslate || 0;\n var prevTranslate = p.monthsTranslate;\n var monthTranslate, wrapperTranslate;\n var transitionEndCallback = p.animating ? false : true;\n if (targetDate > currentDate) {\n // To next\n p.monthsTranslate --;\n if (!p.animating) p.months.eq(p.months.length - 1).remove();\n p.wrapper.append(newMonthHTML);\n p.months = p.wrapper.find('.picker-calendar-month');\n monthTranslate = -(prevTranslate - 1) * 100 * inverter;\n p.months.eq(p.months.length - 1).transform('translate3d(' + (p.isH ? monthTranslate : 0) + '%, ' + (p.isH ? 0 : monthTranslate) + '%, 0)').addClass('picker-calendar-month-next');\n }\n else {\n // To prev\n p.monthsTranslate ++;\n if (!p.animating) p.months.eq(0).remove();\n p.wrapper.prepend(newMonthHTML);\n p.months = p.wrapper.find('.picker-calendar-month');\n monthTranslate = -(prevTranslate + 1) * 100 * inverter;\n p.months.eq(0).transform('translate3d(' + (p.isH ? monthTranslate : 0) + '%, ' + (p.isH ? 0 : monthTranslate) + '%, 0)').addClass('picker-calendar-month-prev');\n }\n if (p.params.onMonthAdd) {\n p.params.onMonthAdd(p, dir === 'next' ? p.months.eq(p.months.length - 1)[0] : p.months.eq(0)[0]);\n }\n p.animating = true;\n p.onMonthChangeStart(dir);\n wrapperTranslate = (p.monthsTranslate * 100) * inverter;\n p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? wrapperTranslate : 0) + '%, ' + (p.isH ? 0 : wrapperTranslate) + '%, 0)');\n if (transitionEndCallback) {\n p.wrapper.transitionEnd(function () {\n p.onMonthChangeEnd(dir, true);\n });\n }\n if (!p.params.animate) {\n p.onMonthChangeEnd(dir);\n }\n };\n p.nextYear = function () {\n p.setYearMonth(p.currentYear + 1);\n };\n p.prevYear = function () {\n p.setYearMonth(p.currentYear - 1);\n };\n \n \n // HTML Layout\n p.layout = function () {\n var pickerHTML = '';\n var pickerClass = '';\n var i;\n \n var layoutDate = p.value && p.value.length ? p.value[0] : new Date().setHours(0,0,0,0);\n var prevMonthHTML = p.monthHTML(layoutDate, 'prev');\n var currentMonthHTML = p.monthHTML(layoutDate);\n var nextMonthHTML = p.monthHTML(layoutDate, 'next');\n var monthsHTML = '
                                            ' + (prevMonthHTML + currentMonthHTML + nextMonthHTML) + '
                                            ';\n // Week days header\n var weekHeaderHTML = '';\n if (p.params.weekHeader) {\n for (i = 0; i < 7; i++) {\n var weekDayIndex = (i + p.params.firstDay > 6) ? (i - 7 + p.params.firstDay) : (i + p.params.firstDay);\n var dayName = p.params.dayNamesShort[weekDayIndex];\n weekHeaderHTML += '
                                            = 0) ? 'picker-calendar-week-day-weekend' : '') + '\"> ' + dayName + '
                                            ';\n \n }\n weekHeaderHTML = '
                                            ' + weekHeaderHTML + '
                                            ';\n }\n pickerClass = 'picker-modal picker-calendar' +\n (p.params.rangePicker ? ' picker-calendar-range' : '') +\n (p.params.cssClass ? ' ' + p.params.cssClass : '');\n var toolbarHTML = p.params.toolbar ? p.params.toolbarTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : '';\n if (p.params.toolbar) {\n toolbarHTML = p.params.toolbarTemplate\n .replace(/{{closeText}}/g, p.params.toolbarCloseText)\n .replace(/{{monthPicker}}/g, (p.params.monthPicker ? p.params.monthPickerTemplate : ''))\n .replace(/{{yearPicker}}/g, (p.params.yearPicker ? p.params.yearPickerTemplate : ''));\n }\n var headerHTML = p.params.header ? p.params.headerTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText).replace(/{{placeholder}}/g, p.params.headerPlaceholder) : '';\n var footerHTML = p.params.footer ? p.params.footerTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : '';\n \n pickerHTML =\n '
                                            ' +\n headerHTML +\n footerHTML +\n toolbarHTML +\n '
                                            ' +\n weekHeaderHTML +\n monthsHTML +\n '
                                            ' +\n '
                                            ';\n \n \n p.pickerHTML = pickerHTML;\n };\n \n // Input Events\n function openOnInput(e) {\n e.preventDefault();\n if (p.opened) return;\n p.open();\n if (p.params.scrollToInput && !isPopover() && !app.params.material) {\n var pageContent = p.input.parents('.page-content');\n if (pageContent.length === 0) return;\n \n var paddingTop = parseInt(pageContent.css('padding-top'), 10),\n paddingBottom = parseInt(pageContent.css('padding-bottom'), 10),\n pageHeight = pageContent[0].offsetHeight - paddingTop - p.container.height(),\n pageScrollHeight = pageContent[0].scrollHeight - paddingTop - p.container.height(),\n newPaddingBottom;\n \n var inputTop = p.input.offset().top - paddingTop + p.input[0].offsetHeight;\n if (inputTop > pageHeight) {\n var scrollTop = pageContent.scrollTop() + inputTop - pageHeight;\n if (scrollTop + pageHeight > pageScrollHeight) {\n newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom;\n if (pageHeight === pageScrollHeight) {\n newPaddingBottom = p.container.height();\n }\n pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'});\n }\n pageContent.scrollTop(scrollTop, 300);\n }\n }\n }\n function closeOnHTMLClick(e) {\n if (inPopover()) return;\n if (p.input && p.input.length > 0) {\n if (e.target !== p.input[0] && $(e.target).parents('.picker-modal').length === 0) p.close();\n }\n else {\n if ($(e.target).parents('.picker-modal').length === 0) p.close();\n }\n }\n \n if (p.params.input) {\n p.input = $(p.params.input);\n if (p.input.length > 0) {\n if (p.params.inputReadOnly) p.input.prop('readOnly', true);\n if (!p.inline) {\n p.input.on('click', openOnInput);\n }\n if (p.params.inputReadOnly) {\n p.input.on('focus mousedown', function (e) {\n e.preventDefault();\n });\n }\n }\n \n }\n \n if (!p.inline && p.params.closeByOutsideClick) $('html').on('click', closeOnHTMLClick);\n \n // Open\n function onPickerClose() {\n p.opened = false;\n if (p.input && p.input.length > 0) {\n p.input.parents('.page-content').css({'padding-bottom': ''});\n if (app.params.material) p.input.trigger('blur');\n }\n if (p.params.onClose) p.params.onClose(p);\n \n // Destroy events\n p.destroyCalendarEvents();\n }\n \n p.opened = false;\n p.open = function () {\n var toPopover = isPopover();\n var updateValue = false;\n if (!p.opened) {\n // Set date value\n if (!p.value) {\n if (p.params.value) {\n p.value = p.params.value;\n updateValue = true;\n }\n }\n \n // Layout\n p.layout();\n \n // Append\n if (toPopover) {\n p.pickerHTML = '
                                            ' + p.pickerHTML + '
                                            ';\n p.popover = app.popover(p.pickerHTML, p.params.input, true);\n p.container = $(p.popover).find('.picker-modal');\n $(p.popover).on('popover:close', function () {\n onPickerClose();\n });\n }\n else if (p.inline) {\n p.container = $(p.pickerHTML);\n p.container.addClass('picker-modal-inline');\n $(p.params.container).append(p.container);\n }\n else {\n p.container = $(app.pickerModal(p.pickerHTML));\n $(p.container)\n .on('picker:close', function () {\n onPickerClose();\n });\n }\n \n // Store calendar instance\n p.container[0].f7Calendar = p;\n p.wrapper = p.container.find('.picker-calendar-months-wrapper');\n \n // Months\n p.months = p.wrapper.find('.picker-calendar-month');\n \n // Update current month and year\n p.updateCurrentMonthYear();\n \n // Set initial translate\n p.monthsTranslate = 0;\n p.setMonthsTranslate();\n \n // Init events\n p.initCalendarEvents();\n \n // Update input value\n if (updateValue) p.updateValue();\n else if (app.params.material && p.value) p.updateValue(true);\n \n // Material Focus\n if (p.input && p.input.length > 0 && app.params.material) {\n p.input.trigger('focus');\n }\n \n }\n \n // Set flag\n p.opened = true;\n p.initialized = true;\n if (p.params.onMonthAdd) {\n p.months.each(function () {\n p.params.onMonthAdd(p, this);\n });\n }\n if (p.params.onOpen) p.params.onOpen(p);\n };\n \n // Close\n p.close = function () {\n if (!p.opened || p.inline) return;\n if (inPopover()) {\n app.closeModal(p.popover);\n return;\n }\n else {\n app.closeModal(p.container);\n return;\n }\n };\n \n // Destroy\n p.destroy = function () {\n p.close();\n if (p.params.input && p.input.length > 0) {\n p.input.off('click focus', openOnInput);\n }\n $('html').off('click', closeOnHTMLClick);\n };\n \n if (p.inline) {\n p.open();\n }\n else {\n if (!p.initialized && p.params.value) p.setValue(p.params.value);\n }\n \n return p;\n };\n app.calendar = function (params) {\n return new Calendar(params);\n };\n \n\n /*======================================================\n ************ Notifications ************\n ======================================================*/\n var _tempNotificationElement;\n app.addNotification = function (params) {\n if (!params) return;\n \n if (typeof params.media === 'undefined') params.media = app.params.notificationMedia;\n if (typeof params.title === 'undefined') params.title = app.params.notificationTitle;\n if (typeof params.subtitle === 'undefined') params.subtitle = app.params.notificationSubtitle;\n if (typeof params.closeIcon === 'undefined') params.closeIcon = app.params.notificationCloseIcon;\n if (typeof params.hold === 'undefined') params.hold = app.params.notificationHold;\n if (typeof params.closeOnClick === 'undefined') params.closeOnClick = app.params.notificationCloseOnClick;\n if (typeof params.button === 'undefined') params.button = app.params.notificationCloseButtonText && {\n text: app.params.notificationCloseButtonText,\n close: true\n };\n \n if (!_tempNotificationElement) _tempNotificationElement = document.createElement('div');\n \n params.material = app.params.material;\n \n var container = $('.notifications');\n if (container.length === 0) {\n app.root.append('
                                              ');\n container = $('.notifications');\n }\n var list = container.children('ul');\n \n var notificationTemplate = app.params.notificationTemplate || \n '{{#if custom}}' +\n '
                                            • {{custom}}
                                            • ' +\n '{{else}}' +\n '
                                            • ' +\n '
                                              ' +\n '{{#if material}}' +\n '
                                              ' +\n '
                                              {{js \"this.message || this.title || this.subtitle\"}}
                                              ' +\n '{{#if ../button}}{{#button}}' +\n '
                                              ' +\n '{{text}}' +\n '
                                              ' +\n '{{/button}}{{/if}}' +\n '
                                              ' +\n '{{else}}' +\n '{{#if media}}' +\n '
                                              {{media}}
                                              ' +\n '{{/if}}' +\n '
                                              ' +\n '
                                              ' +\n '{{#if title}}' +\n '
                                              {{title}}
                                              ' +\n '{{/if}}' +\n '{{#if closeIcon}}' +\n '
                                              ' +\n '{{/if}}' +\n '
                                              ' +\n '{{#if subtitle}}' +\n '
                                              {{subtitle}}
                                              ' +\n '{{/if}}' +\n '{{#if message}}' +\n '
                                              {{message}}
                                              ' +\n '
                                              ' +\n '{{/if}}' +\n '{{/if}}' +\n '
                                              ' +\n '
                                            • ' +\n '{{/if}}';\n if (!app._compiledTemplates.notification) {\n app._compiledTemplates.notification = t7.compile(notificationTemplate);\n }\n _tempNotificationElement.innerHTML = app._compiledTemplates.notification(params);\n \n var item = $(_tempNotificationElement).children();\n \n item.on('click', function (e) {\n var close = false;\n var target = $(e.target);\n if (params.material && target.hasClass('button')) {\n if (params.button && params.button.onClick) params.button.onClick.call(target[0], e, item[0]);\n }\n if (target.is('.close-notification') || $(e.target).parents('.close-notification').length > 0) {\n close = true;\n }\n else {\n if (params.onClick) params.onClick(e, item[0]);\n if (params.closeOnClick) close = true;\n }\n if (close) app.closeNotification(item[0], e);\n });\n if (params.onClose) {\n item.data('f7NotificationOnClose', function (e) {\n params.onClose(item[0], e);\n });\n }\n if (params.additionalClass) {\n item.addClass(params.additionalClass);\n }\n if (params.hold) {\n setTimeout(function () {\n if (item.length > 0) app.closeNotification(item[0]);\n }, params.hold);\n }\n \n if (!app.params.material) {\n app.closeNotification(list.children('li.notification-item:last-child'));\n }\n list.append(item[0]);\n container.show();\n \n var itemHeight = item.outerHeight(), clientLeft;\n if (params.material) {\n container.transform('translate3d(0, '+itemHeight+'px, 0)');\n container.transition(0);\n \n clientLeft = item[0].clientLeft;\n \n container.transform('translate3d(0, 0, 0)');\n container.transition('');\n }\n else {\n item.transform('translate3d(0,' + (-itemHeight) + 'px,0)');\n item.transition(0);\n \n clientLeft = item[0].clientLeft;\n \n item.transition('');\n item.transform('translate3d(0,0px,0)');\n }\n \n container.transform('translate3d(0, 0,0)');\n item.removeClass('notification-hidden');\n \n return item[0];\n };\n app.closeNotification = function (item, event) {\n item = $(item);\n if (item.length === 0) return;\n if (item.hasClass('notification-item-removing')) return;\n var container = $('.notifications');\n \n var itemHeight = item.outerHeight();\n item.css('height', itemHeight + 'px').transition(0).addClass('notification-item-removing');\n var clientLeft = item[0].clientLeft;\n \n item.css({\n height: '0px',\n marginBottom: '0px'\n }).transition('');\n \n if (item.data('f7NotificationOnClose')) item.data('f7NotificationOnClose')(event);\n \n if (container.find('.notification-item:not(.notification-item-removing)').length === 0) {\n container.transform('');\n }\n \n item.addClass('notification-hidden').transitionEnd(function () {\n item.remove();\n if (container.find('.notification-item').length === 0) {\n container.hide();\n }\n });\n };\n\n /*===============================================================================\n ************ Data Table ************\n ===============================================================================*/\n app.initDataTable = function (table) {\n table = $(table);\n var tableHeader = table.find('.data-table-header');\n var tableHeaderSelected = table.find('.data-table-header-selected');\n \n // Handle selected\n function checkSelectedHeader() {\n if (tableHeader.length > 0 && tableHeaderSelected.length > 0) {\n var checkedItems = table.find('tbody .checkbox-cell input:checked').length;\n table[checkedItems > 0 ? 'addClass' : 'removeClass']('data-table-has-checked');\n tableHeaderSelected.find('.data-table-selected-count').text(checkedItems);\n }\n }\n table.on('change', '.checkbox-cell input[type=\"checkbox\"]', function (e) {\n if (e.detail && e.detail._sentByF7DataTable) {\n // Scripted event, don't do anything\n return;\n }\n var input = $(this);\n var checked = input[0].checked;\n if (input.parents('thead').length > 0) {\n table\n .find('tbody tr')[checked ? 'addClass': 'removeClass']('data-table-row-selected')\n .find('input').prop('checked', checked).trigger('change', {_sentByF7DataTable: true});\n }\n else {\n input.parents('tr')[checked ? 'addClass': 'removeClass']('data-table-row-selected');\n if (!checked) {\n table.find('thead .checkbox-cell input[type=\"checkbox\"]').prop('checked', false);\n }\n else {\n // Check for all checked\n if (table.find('tbody .checkbox-cell input[type=\"checkbox\"]:checked').length === table.find('tbody tr').length) {\n table.find('thead .checkbox-cell input[type=\"checkbox\"]').prop('checked', true).trigger('change', {_sentByF7DataTable: true});\n }\n }\n }\n checkSelectedHeader();\n });\n checkSelectedHeader();\n \n // Sortable\n table.find('thead .sortable-cell').on('click', function () {\n var cell = $(this);\n var isActive = cell.hasClass('sortable-active');\n var currentSort;\n if (isActive) {\n currentSort = cell.hasClass('sortable-desc') ? 'desc' : 'asc';\n cell.removeClass('sortable-desc sortable-asc').addClass('sortable-' + (currentSort === 'desc' ? 'asc' : 'desc'));\n }\n else {\n table.find('thead .sortable-active').removeClass('sortable-active');\n cell.addClass('sortable-active');\n }\n });\n \n // Collapsible\n if (table.hasClass('data-table-collapsible')) {\n table.find('tbody td:not(.checkbox-cell)').each(function () {\n var index = $(this).index();\n var collpsibleTitle = $(this).attr('data-collapsible-title');\n if (!collpsibleTitle && collpsibleTitle !== '') {\n $(this).attr('data-collapsible-title', table.find('thead th').eq(index).text());\n }\n });\n }\n };\n app.initPageDataTables = function (pageContainer) {\n pageContainer = $(pageContainer);\n var dataTables = pageContainer.find('.data-table-init');\n if (dataTables.length === 0 && pageContainer.hasClass('data-table-init')) {\n dataTables = pageContainer;\n }\n dataTables.each(function () {\n app.initDataTable(this);\n });\n };\n \n\n /*===========================\n Compile Template7 Templates On App Init\n ===========================*/\n app.initTemplate7Templates = function () {\n if (!window.Template7) return;\n Template7.templates = Template7.templates || app.params.templates || {};\n Template7.data = Template7.data || app.params.template7Data || {};\n Template7.cache = Template7.cache || {};\n \n app.templates = Template7.templates;\n app.template7Data = Template7.data;\n app.template7Cache = Template7.cache;\n \n // Precompile templates on app init\n if (!app.params.precompileTemplates) return;\n $('script[type=\"text/template7\"]').each(function () {\n var id = $(this).attr('id');\n if (!id) return;\n Template7.templates[id] = Template7.compile($(this).html());\n });\n };\n \n\n /*=======================================\n ************ Plugins API ************\n =======================================*/\n var _plugins = [];\n app.initPlugins = function () {\n // Initialize plugins\n for (var plugin in app.plugins) {\n var p = app.plugins[plugin](app, app.params[plugin]);\n if (p) _plugins.push(p);\n }\n };\n // Plugin Hooks\n app.pluginHook = function (hook) {\n for (var i = 0; i < _plugins.length; i++) {\n if (_plugins[i].hooks && hook in _plugins[i].hooks) {\n _plugins[i].hooks[hook](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n }\n };\n // Prevented by plugin\n app.pluginPrevent = function (action) {\n var prevent = false;\n for (var i = 0; i < _plugins.length; i++) {\n if (_plugins[i].prevents && action in _plugins[i].prevents) {\n if (_plugins[i].prevents[action](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5])) prevent = true;\n }\n }\n return prevent;\n };\n // Preprocess content by plugin\n app.pluginProcess = function (process, data) {\n var processed = data;\n for (var i = 0; i < _plugins.length; i++) {\n if (_plugins[i].preprocess && process in _plugins[i].preprocess) {\n processed = _plugins[i].preprocess[process](data, arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]);\n }\n }\n return processed;\n };\n \n \n\n /*======================================================\n ************ App Init ************\n ======================================================*/\n app.init = function () {\n // Compile Template7 templates on app load\n if (app.initTemplate7Templates) app.initTemplate7Templates();\n \n // Init Plugins\n if (app.initPlugins) app.initPlugins();\n \n // Init Device\n if (app.getDeviceInfo) app.getDeviceInfo();\n \n // Init resize events and calc app sizes\n if (app.initResize) app.initResize();\n \n // Init Panels Breakpoints\n if (app.initPanelsBreakpoints && (app.params.panelLeftBreakpoint || app.params.panelRightBreakpoint)) app.initPanelsBreakpoints();\n \n // Init Click events\n if (app.initFastClicks && app.params.fastClicks) app.initFastClicks();\n if (app.initClickEvents) app.initClickEvents();\n \n // Init each page callbacks\n $('.page:not(.cached)').each(function () {\n app.initPageWithCallback(this);\n });\n \n // Init each navbar callbacks\n $('.navbar:not(.cached)').each(function () {\n app.initNavbarWithCallback(this);\n });\n \n // Init push state\n if (app.initPushState && app.params.pushState) app.initPushState();\n \n // Init Live Swipeouts events\n if (app.initSwipeout && app.params.swipeout) app.initSwipeout();\n \n // Init Live Sortable events\n if (app.initSortable && app.params.sortable) app.initSortable();\n \n // Init Live Swipe Panels\n if (app.initSwipePanels && (app.params.swipePanel || app.params.swipePanelOnlyClose)) app.initSwipePanels();\n \n // Init Material Inputs\n if (app.params.material && app.initMaterialWatchInputs) app.initMaterialWatchInputs();\n \n // Init Material Tabbar\n if (app.params.material) {\n $('.tabbar').each(function (index, el) {\n if ($(el).parents('.page').length === 0) {\n app.initMaterialTabbar(el);\n }\n });\n }\n \n // App Init callback\n if (app.params.onAppInit) app.params.onAppInit();\n \n // Plugin app init hook\n app.pluginHook('appInit');\n };\n if (app.params.init) app.init();\n \n\n //Return instance\n return app;\n };\n \n // Save Dom7\n Framework7.$ = window.Dom7;\n \n\n /*===========================\n Features Support Detection\n ===========================*/\n Framework7.prototype.support = (function () {\n var support = {\n touch: !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch),\n passiveListener: (function () {\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function() {\n supportsPassive = true;\n }\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {}\n return supportsPassive;\n })()\n };\n \n // Export object\n return support;\n })();\n \n\n /*===========================\n Device/OS Detection\n ===========================*/\n Framework7.prototype.device = (function () {\n var device = {};\n var ua = navigator.userAgent;\n var $ = Dom7;\n \n var windows = ua.match(/(Windows Phone);?[\\s\\/]+([\\d.]+)?/);\n var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);\n var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n var iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n \n device.ios = device.android = device.windows = device.iphone = device.ipod = device.ipad = device.androidChrome = false;\n \n // Windows\n if (windows) {\n device.os = 'windows';\n device.osVersion = windows[2];\n device.windows = true;\n }\n // Android\n if (android && !windows) {\n device.os = 'android';\n device.osVersion = android[2];\n device.android = true;\n device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;\n }\n if (ipad || iphone || ipod) {\n device.os = 'ios';\n device.ios = true;\n }\n // iOS\n if (iphone && !ipod) {\n device.osVersion = iphone[2].replace(/_/g, '.');\n device.iphone = true;\n }\n if (ipad) {\n device.osVersion = ipad[2].replace(/_/g, '.');\n device.ipad = true;\n }\n if (ipod) {\n device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;\n device.iphone = true;\n }\n // iOS 8+ changed UA\n if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {\n if (device.osVersion.split('.')[0] === '10') {\n device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];\n }\n }\n \n // Webview\n device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i);\n \n // Minimal UI\n if (device.os && device.os === 'ios') {\n var osVersionArr = device.osVersion.split('.');\n device.minimalUi = !device.webView &&\n (ipod || iphone) &&\n (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7) &&\n $('meta[name=\"viewport\"]').length > 0 && $('meta[name=\"viewport\"]').attr('content').indexOf('minimal-ui') >= 0;\n }\n \n // Check for status bar and fullscreen app mode\n var windowWidth = $(window).width();\n var windowHeight = $(window).height();\n \n device.needsStatusBar = function () {\n if (device.webView && (windowWidth * windowHeight === screen.width * screen.height)) {\n return true;\n }\n return false;\n };\n device.statusBar = device.needsStatusBar();\n \n // Classes\n var classNames = [];\n \n // Pixel Ratio\n device.pixelRatio = window.devicePixelRatio || 1;\n classNames.push('pixel-ratio-' + Math.floor(device.pixelRatio));\n if (device.pixelRatio >= 2) {\n classNames.push('retina');\n }\n \n // OS classes\n if (device.os) {\n classNames.push(device.os, device.os + '-' + device.osVersion.split('.')[0], device.os + '-' + device.osVersion.replace(/\\./g, '-'));\n if (device.os === 'ios') {\n var major = parseInt(device.osVersion.split('.')[0], 10);\n for (var i = major - 1; i >= 6; i--) {\n classNames.push('ios-gt-' + i);\n }\n }\n \n }\n // Status bar classes\n if (device.statusBar) {\n classNames.push('with-statusbar-overlay');\n }\n else {\n $('html').removeClass('with-statusbar-overlay');\n }\n \n // Add html classes\n if (classNames.length > 0) $('html').addClass(classNames.join(' '));\n \n // Export object\n return device;\n })();\n \n\n /*===========================\n Plugins prototype\n ===========================*/\n Framework7.prototype.plugins = {};\n \n\n /*===========================\n Swiper\n ===========================*/\n window.Swiper = function (container, params) {\n if (!(this instanceof Swiper)) return new Swiper(container, params);\n \n var defaults = {\n direction: 'horizontal',\n touchEventsTarget: 'container',\n initialSlide: 0,\n speed: 300,\n // autoplay\n autoplay: false,\n autoplayDisableOnInteraction: true,\n autoplayStopOnLast: false,\n // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).\n iOSEdgeSwipeDetection: false,\n iOSEdgeSwipeThreshold: 20,\n // Free mode\n freeMode: false,\n freeModeMomentum: true,\n freeModeMomentumRatio: 1,\n freeModeMomentumBounce: true,\n freeModeMomentumBounceRatio: 1,\n freeModeMomentumVelocityRatio: 1,\n freeModeSticky: false,\n freeModeMinimumVelocity: 0.02,\n // Autoheight\n autoHeight: false,\n // Set wrapper width\n setWrapperSize: false,\n // Virtual Translate\n virtualTranslate: false,\n // Effects\n effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'\n coverflow: {\n rotate: 50,\n stretch: 0,\n depth: 100,\n modifier: 1,\n slideShadows : true\n },\n flip: {\n slideShadows : true,\n limitRotation: true\n },\n cube: {\n slideShadows: true,\n shadow: true,\n shadowOffset: 20,\n shadowScale: 0.94\n },\n fade: {\n crossFade: false\n },\n // Parallax\n parallax: false,\n // Zoom\n zoom: false,\n zoomMax: 3,\n zoomMin: 1,\n zoomToggle: true,\n // Scrollbar\n scrollbar: null,\n scrollbarHide: true,\n scrollbarDraggable: false,\n scrollbarSnapOnRelease: false,\n // Keyboard Mousewheel\n keyboardControl: false,\n mousewheelControl: false,\n mousewheelReleaseOnEdges: false,\n mousewheelInvert: false,\n mousewheelForceToAxis: false,\n mousewheelSensitivity: 1,\n mousewheelEventsTarged: 'container',\n // Hash Navigation\n hashnav: false,\n hashnavWatchState: false,\n // History\n history: false,\n // Commong Nav State\n replaceState: false,\n // Breakpoints\n breakpoints: undefined,\n // Slides grid\n spaceBetween: 0,\n slidesPerView: 1,\n slidesPerColumn: 1,\n slidesPerColumnFill: 'column',\n slidesPerGroup: 1,\n centeredSlides: false,\n slidesOffsetBefore: 0, // in px\n slidesOffsetAfter: 0, // in px\n // Round length\n roundLengths: false,\n // Touches\n touchRatio: 1,\n touchAngle: 45,\n simulateTouch: true,\n shortSwipes: true,\n longSwipes: true,\n longSwipesRatio: 0.5,\n longSwipesMs: 300,\n followFinger: true,\n onlyExternal: false,\n threshold: 0,\n touchMoveStopPropagation: true,\n touchReleaseOnEdges: false,\n // Unique Navigation Elements\n uniqueNavElements: true,\n // Pagination\n pagination: null,\n paginationElement: 'span',\n paginationClickable: false,\n paginationHide: false,\n paginationBulletRender: null,\n paginationProgressRender: null,\n paginationFractionRender: null,\n paginationCustomRender: null,\n paginationType: 'bullets', // 'bullets' or 'progress' or 'fraction' or 'custom'\n // Resistance\n resistance: true,\n resistanceRatio: 0.85,\n // Next/prev buttons\n nextButton: null,\n prevButton: null,\n // Progress\n watchSlidesProgress: false,\n watchSlidesVisibility: false,\n // Cursor\n grabCursor: false,\n // Clicks\n preventClicks: true,\n preventClicksPropagation: true,\n slideToClickedSlide: false,\n // Lazy Loading\n lazyLoading: false,\n lazyLoadingInPrevNext: false,\n lazyLoadingInPrevNextAmount: 1,\n lazyLoadingOnTransitionStart: false,\n // Images\n preloadImages: true,\n updateOnImagesReady: true,\n // loop\n loop: false,\n loopAdditionalSlides: 0,\n loopedSlides: null,\n // Control\n control: undefined,\n controlInverse: false,\n controlBy: 'slide', //or 'container'\n normalizeSlideIndex: true,\n // Swiping/no swiping\n allowSwipeToPrev: true,\n allowSwipeToNext: true,\n swipeHandler: null, //'.swipe-handler',\n noSwiping: true,\n noSwipingClass: 'swiper-no-swiping',\n // Passive Listeners\n passiveListeners: true,\n // NS\n containerModifierClass: 'swiper-container-', // NEW\n slideClass: 'swiper-slide',\n slideActiveClass: 'swiper-slide-active',\n slideDuplicateActiveClass: 'swiper-slide-duplicate-active',\n slideVisibleClass: 'swiper-slide-visible',\n slideDuplicateClass: 'swiper-slide-duplicate',\n slideNextClass: 'swiper-slide-next',\n slideDuplicateNextClass: 'swiper-slide-duplicate-next',\n slidePrevClass: 'swiper-slide-prev',\n slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',\n wrapperClass: 'swiper-wrapper',\n bulletClass: 'swiper-pagination-bullet',\n bulletActiveClass: 'swiper-pagination-bullet-active',\n buttonDisabledClass: 'swiper-button-disabled',\n paginationCurrentClass: 'swiper-pagination-current',\n paginationTotalClass: 'swiper-pagination-total',\n paginationHiddenClass: 'swiper-pagination-hidden',\n paginationProgressbarClass: 'swiper-pagination-progressbar',\n paginationClickableClass: 'swiper-pagination-clickable', // NEW\n paginationModifierClass: 'swiper-pagination-', // NEW\n lazyLoadingClass: 'swiper-lazy',\n lazyStatusLoadingClass: 'swiper-lazy-loading',\n lazyStatusLoadedClass: 'swiper-lazy-loaded',\n lazyPreloaderClass: 'swiper-lazy-preloader',\n notificationClass: 'swiper-notification',\n preloaderClass: 'preloader',\n zoomContainerClass: 'swiper-zoom-container',\n \n // Observer\n observer: false,\n observeParents: false,\n // Accessibility\n a11y: false,\n prevSlideMessage: 'Previous slide',\n nextSlideMessage: 'Next slide',\n firstSlideMessage: 'This is the first slide',\n lastSlideMessage: 'This is the last slide',\n paginationBulletMessage: 'Go to slide {{index}}',\n // Callbacks\n runCallbacksOnInit: true\n /*\n Callbacks:\n onInit: function (swiper)\n onDestroy: function (swiper)\n onBeforeResize: function (swiper)\n onAfterResize: function (swiper)\n onClick: function (swiper, e)\n onTap: function (swiper, e)\n onDoubleTap: function (swiper, e)\n onSliderMove: function (swiper, e)\n onSlideChangeStart: function (swiper)\n onSlideChangeEnd: function (swiper)\n onTransitionStart: function (swiper)\n onTransitionEnd: function (swiper)\n onImagesReady: function (swiper)\n onProgress: function (swiper, progress)\n onTouchStart: function (swiper, e)\n onTouchMove: function (swiper, e)\n onTouchMoveOpposite: function (swiper, e)\n onTouchEnd: function (swiper, e)\n onReachBeginning: function (swiper)\n onReachEnd: function (swiper)\n onSetTransition: function (swiper, duration)\n onSetTranslate: function (swiper, translate)\n onAutoplayStart: function (swiper)\n onAutoplayStop: function (swiper),\n onLazyImageLoad: function (swiper, slide, image)\n onLazyImageReady: function (swiper, slide, image)\n onKeyPress: function (swiper, keyCode)\n */\n \n };\n var initialVirtualTranslate = params && params.virtualTranslate;\n \n params = params || {};\n var originalParams = {};\n for (var param in params) {\n if (typeof params[param] === 'object' && params[param] !== null && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) {\n originalParams[param] = {};\n for (var deepParam in params[param]) {\n originalParams[param][deepParam] = params[param][deepParam];\n }\n }\n else {\n originalParams[param] = params[param];\n }\n }\n for (var def in defaults) {\n if (typeof params[def] === 'undefined') {\n params[def] = defaults[def];\n }\n else if (typeof params[def] === 'object') {\n for (var deepDef in defaults[def]) {\n if (typeof params[def][deepDef] === 'undefined') {\n params[def][deepDef] = defaults[def][deepDef];\n }\n }\n }\n }\n \n // Swiper\n var s = this;\n \n // Params\n s.params = params;\n s.originalParams = originalParams;\n \n // Classname\n s.classNames = [];\n /*=========================\n Dom Library and plugins\n ===========================*/\n var $ = $;\n if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){\n $ = Dom7;\n }\n if (typeof $ === 'undefined') {\n if (typeof Dom7 === 'undefined') {\n $ = window.Dom7 || window.Zepto || window.jQuery;\n }\n else {\n $ = Dom7;\n }\n if (!$) return;\n }\n // Export it to Swiper instance\n s.$ = $;\n \n /*=========================\n Breakpoints\n ===========================*/\n s.currentBreakpoint = undefined;\n s.getActiveBreakpoint = function () {\n //Get breakpoint for window width\n if (!s.params.breakpoints) return false;\n var breakpoint = false;\n var points = [], point;\n for ( point in s.params.breakpoints ) {\n if (s.params.breakpoints.hasOwnProperty(point)) {\n points.push(point);\n }\n }\n points.sort(function (a, b) {\n return parseInt(a, 10) > parseInt(b, 10);\n });\n for (var i = 0; i < points.length; i++) {\n point = points[i];\n if (point >= window.innerWidth && !breakpoint) {\n breakpoint = point;\n }\n }\n return breakpoint || 'max';\n };\n s.setBreakpoint = function () {\n //Set breakpoint for window width and update parameters\n var breakpoint = s.getActiveBreakpoint();\n if (breakpoint && s.currentBreakpoint !== breakpoint) {\n var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams;\n var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView);\n for ( var param in breakPointsParams ) {\n s.params[param] = breakPointsParams[param];\n }\n s.currentBreakpoint = breakpoint;\n if(needsReLoop && s.destroyLoop) {\n s.reLoop(true);\n }\n }\n };\n // Set breakpoint on load\n if (s.params.breakpoints) {\n s.setBreakpoint();\n }\n \n /*=========================\n Preparation - Define Container, Wrapper and Pagination\n ===========================*/\n s.container = $(container);\n if (s.container.length === 0) return;\n if (s.container.length > 1) {\n var swipers = [];\n s.container.each(function () {\n var container = this;\n swipers.push(new Swiper(this, params));\n });\n return swipers;\n }\n \n // Save instance in container HTML Element and in data\n s.container[0].swiper = s;\n s.container.data('swiper', s);\n \n s.classNames.push(s.params.containerModifierClass + s.params.direction);\n \n if (s.params.freeMode) {\n s.classNames.push(s.params.containerModifierClass + 'free-mode');\n }\n if (!s.support.flexbox) {\n s.classNames.push(s.params.containerModifierClass + 'no-flexbox');\n s.params.slidesPerColumn = 1;\n }\n if (s.params.autoHeight) {\n s.classNames.push(s.params.containerModifierClass + 'autoheight');\n }\n // Enable slides progress when required\n if (s.params.parallax || s.params.watchSlidesVisibility) {\n s.params.watchSlidesProgress = true;\n }\n // Max resistance when touchReleaseOnEdges\n if (s.params.touchReleaseOnEdges) {\n s.params.resistanceRatio = 0;\n }\n // Coverflow / 3D\n if (['cube', 'coverflow', 'flip'].indexOf(s.params.effect) >= 0) {\n if (s.support.transforms3d) {\n s.params.watchSlidesProgress = true;\n s.classNames.push(s.params.containerModifierClass + '3d');\n }\n else {\n s.params.effect = 'slide';\n }\n }\n if (s.params.effect !== 'slide') {\n s.classNames.push(s.params.containerModifierClass + s.params.effect);\n }\n if (s.params.effect === 'cube') {\n s.params.resistanceRatio = 0;\n s.params.slidesPerView = 1;\n s.params.slidesPerColumn = 1;\n s.params.slidesPerGroup = 1;\n s.params.centeredSlides = false;\n s.params.spaceBetween = 0;\n s.params.virtualTranslate = true;\n }\n if (s.params.effect === 'fade' || s.params.effect === 'flip') {\n s.params.slidesPerView = 1;\n s.params.slidesPerColumn = 1;\n s.params.slidesPerGroup = 1;\n s.params.watchSlidesProgress = true;\n s.params.spaceBetween = 0;\n if (typeof initialVirtualTranslate === 'undefined') {\n s.params.virtualTranslate = true;\n }\n }\n \n // Grab Cursor\n if (s.params.grabCursor && s.support.touch) {\n s.params.grabCursor = false;\n }\n \n // Wrapper\n s.wrapper = s.container.children('.' + s.params.wrapperClass);\n \n // Pagination\n if (s.params.pagination) {\n s.paginationContainer = $(s.params.pagination);\n if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) {\n s.paginationContainer = s.container.find(s.params.pagination);\n }\n \n if (s.params.paginationType === 'bullets' && s.params.paginationClickable) {\n s.paginationContainer.addClass(s.params.paginationModifierClass + 'clickable');\n }\n else {\n s.params.paginationClickable = false;\n }\n s.paginationContainer.addClass(s.params.paginationModifierClass + s.params.paginationType);\n }\n // Next/Prev Buttons\n if (s.params.nextButton || s.params.prevButton) {\n if (s.params.nextButton) {\n s.nextButton = $(s.params.nextButton);\n if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) {\n s.nextButton = s.container.find(s.params.nextButton);\n }\n }\n if (s.params.prevButton) {\n s.prevButton = $(s.params.prevButton);\n if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) {\n s.prevButton = s.container.find(s.params.prevButton);\n }\n }\n }\n \n // Is Horizontal\n s.isHorizontal = function () {\n return s.params.direction === 'horizontal';\n };\n // s.isH = isH;\n \n // RTL\n s.rtl = s.isHorizontal() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl');\n if (s.rtl) {\n s.classNames.push(s.params.containerModifierClass + 'rtl');\n }\n \n // Wrong RTL support\n if (s.rtl) {\n s.wrongRTL = s.wrapper.css('display') === '-webkit-box';\n }\n \n // Columns\n if (s.params.slidesPerColumn > 1) {\n s.classNames.push(s.params.containerModifierClass + 'multirow');\n }\n \n // Check for Android\n if (s.device.android) {\n s.classNames.push(s.params.containerModifierClass + 'android');\n }\n \n // Add classes\n s.container.addClass(s.classNames.join(' '));\n \n // Translate\n s.translate = 0;\n \n // Progress\n s.progress = 0;\n \n // Velocity\n s.velocity = 0;\n \n /*=========================\n Locks, unlocks\n ===========================*/\n s.lockSwipeToNext = function () {\n s.params.allowSwipeToNext = false;\n if (s.params.allowSwipeToPrev === false && s.params.grabCursor) {\n s.unsetGrabCursor();\n }\n };\n s.lockSwipeToPrev = function () {\n s.params.allowSwipeToPrev = false;\n if (s.params.allowSwipeToNext === false && s.params.grabCursor) {\n s.unsetGrabCursor();\n }\n };\n s.lockSwipes = function () {\n s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false;\n if (s.params.grabCursor) s.unsetGrabCursor();\n };\n s.unlockSwipeToNext = function () {\n s.params.allowSwipeToNext = true;\n if (s.params.allowSwipeToPrev === true && s.params.grabCursor) {\n s.setGrabCursor();\n }\n };\n s.unlockSwipeToPrev = function () {\n s.params.allowSwipeToPrev = true;\n if (s.params.allowSwipeToNext === true && s.params.grabCursor) {\n s.setGrabCursor();\n }\n };\n s.unlockSwipes = function () {\n s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true;\n if (s.params.grabCursor) s.setGrabCursor();\n };\n \n /*=========================\n Round helper\n ===========================*/\n function round(a) {\n return Math.floor(a);\n }\n /*=========================\n Set grab cursor\n ===========================*/\n s.setGrabCursor = function(moving) {\n s.container[0].style.cursor = 'move';\n s.container[0].style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';\n s.container[0].style.cursor = moving ? '-moz-grabbin' : '-moz-grab';\n s.container[0].style.cursor = moving ? 'grabbing': 'grab';\n };\n s.unsetGrabCursor = function () {\n s.container[0].style.cursor = '';\n };\n if (s.params.grabCursor) {\n s.setGrabCursor();\n }\n /*=========================\n Update on Images Ready\n ===========================*/\n s.imagesToLoad = [];\n s.imagesLoaded = 0;\n \n s.loadImage = function (imgElement, src, srcset, sizes, checkForComplete, callback) {\n var image;\n function onReady () {\n if (callback) callback();\n }\n if (!imgElement.complete || !checkForComplete) {\n if (src) {\n image = new window.Image();\n image.onload = onReady;\n image.onerror = onReady;\n if (sizes) {\n image.sizes = sizes;\n }\n if (srcset) {\n image.srcset = srcset;\n }\n if (src) {\n image.src = src;\n }\n } else {\n onReady();\n }\n \n } else {//image already loaded...\n onReady();\n }\n };\n s.preloadImages = function () {\n s.imagesToLoad = s.container.find('img');\n function _onReady() {\n if (typeof s === 'undefined' || s === null || !s) return;\n if (s.imagesLoaded !== undefined) s.imagesLoaded++;\n if (s.imagesLoaded === s.imagesToLoad.length) {\n if (s.params.updateOnImagesReady) s.update();\n s.emit('onImagesReady', s);\n }\n }\n for (var i = 0; i < s.imagesToLoad.length; i++) {\n s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), s.imagesToLoad[i].sizes || s.imagesToLoad[i].getAttribute('sizes'), true, _onReady);\n }\n };\n \n /*=========================\n Autoplay\n ===========================*/\n s.autoplayTimeoutId = undefined;\n s.autoplaying = false;\n s.autoplayPaused = false;\n function autoplay() {\n var autoplayDelay = s.params.autoplay;\n var activeSlide = s.slides.eq(s.activeIndex);\n if (activeSlide.attr('data-swiper-autoplay')) {\n autoplayDelay = activeSlide.attr('data-swiper-autoplay') || s.params.autoplay;\n }\n s.autoplayTimeoutId = setTimeout(function () {\n if (s.params.loop) {\n s.fixLoop();\n s._slideNext();\n s.emit('onAutoplay', s);\n }\n else {\n if (!s.isEnd) {\n s._slideNext();\n s.emit('onAutoplay', s);\n }\n else {\n if (!params.autoplayStopOnLast) {\n s._slideTo(0);\n s.emit('onAutoplay', s);\n }\n else {\n s.stopAutoplay();\n }\n }\n }\n }, autoplayDelay);\n }\n s.startAutoplay = function () {\n if (typeof s.autoplayTimeoutId !== 'undefined') return false;\n if (!s.params.autoplay) return false;\n if (s.autoplaying) return false;\n s.autoplaying = true;\n s.emit('onAutoplayStart', s);\n autoplay();\n };\n s.stopAutoplay = function (internal) {\n if (!s.autoplayTimeoutId) return;\n if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);\n s.autoplaying = false;\n s.autoplayTimeoutId = undefined;\n s.emit('onAutoplayStop', s);\n };\n s.pauseAutoplay = function (speed) {\n if (s.autoplayPaused) return;\n if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId);\n s.autoplayPaused = true;\n if (speed === 0) {\n s.autoplayPaused = false;\n autoplay();\n }\n else {\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.autoplayPaused = false;\n if (!s.autoplaying) {\n s.stopAutoplay();\n }\n else {\n autoplay();\n }\n });\n }\n };\n /*=========================\n Min/Max Translate\n ===========================*/\n s.minTranslate = function () {\n return (-s.snapGrid[0]);\n };\n s.maxTranslate = function () {\n return (-s.snapGrid[s.snapGrid.length - 1]);\n };\n /*=========================\n Slider/slides sizes\n ===========================*/\n s.updateAutoHeight = function () {\n var activeSlides = [];\n var newHeight = 0;\n var i;\n \n // Find slides currently in view\n if(s.params.slidesPerView !== 'auto' && s.params.slidesPerView > 1) {\n for (i = 0; i < Math.ceil(s.params.slidesPerView); i++) {\n var index = s.activeIndex + i;\n if(index > s.slides.length) break;\n activeSlides.push(s.slides.eq(index)[0]);\n }\n } else {\n activeSlides.push(s.slides.eq(s.activeIndex)[0]);\n }\n \n // Find new height from heighest slide in view\n for (i = 0; i < activeSlides.length; i++) {\n if (typeof activeSlides[i] !== 'undefined') {\n var height = activeSlides[i].offsetHeight;\n newHeight = height > newHeight ? height : newHeight;\n }\n }\n \n // Update Height\n if (newHeight) s.wrapper.css('height', newHeight + 'px');\n };\n s.updateContainerSize = function () {\n var width, height;\n if (typeof s.params.width !== 'undefined') {\n width = s.params.width;\n }\n else {\n width = s.container[0].clientWidth;\n }\n if (typeof s.params.height !== 'undefined') {\n height = s.params.height;\n }\n else {\n height = s.container[0].clientHeight;\n }\n if (width === 0 && s.isHorizontal() || height === 0 && !s.isHorizontal()) {\n return;\n }\n \n //Subtract paddings\n width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10);\n height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10);\n \n // Store values\n s.width = width;\n s.height = height;\n s.size = s.isHorizontal() ? s.width : s.height;\n };\n \n s.updateSlidesSize = function () {\n s.slides = s.wrapper.children('.' + s.params.slideClass);\n s.snapGrid = [];\n s.slidesGrid = [];\n s.slidesSizesGrid = [];\n \n var spaceBetween = s.params.spaceBetween,\n slidePosition = -s.params.slidesOffsetBefore,\n i,\n prevSlideSize = 0,\n index = 0;\n if (typeof s.size === 'undefined') return;\n if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {\n spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size;\n }\n \n s.virtualSize = -spaceBetween;\n // reset margins\n if (s.rtl) s.slides.css({marginLeft: '', marginTop: ''});\n else s.slides.css({marginRight: '', marginBottom: ''});\n \n var slidesNumberEvenToRows;\n if (s.params.slidesPerColumn > 1) {\n if (Math.floor(s.slides.length / s.params.slidesPerColumn) === s.slides.length / s.params.slidesPerColumn) {\n slidesNumberEvenToRows = s.slides.length;\n }\n else {\n slidesNumberEvenToRows = Math.ceil(s.slides.length / s.params.slidesPerColumn) * s.params.slidesPerColumn;\n }\n if (s.params.slidesPerView !== 'auto' && s.params.slidesPerColumnFill === 'row') {\n slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, s.params.slidesPerView * s.params.slidesPerColumn);\n }\n }\n \n // Calc slides\n var slideSize;\n var slidesPerColumn = s.params.slidesPerColumn;\n var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;\n var numFullColumns = slidesPerRow - (s.params.slidesPerColumn * slidesPerRow - s.slides.length);\n for (i = 0; i < s.slides.length; i++) {\n slideSize = 0;\n var slide = s.slides.eq(i);\n if (s.params.slidesPerColumn > 1) {\n // Set slides order\n var newSlideOrderIndex;\n var column, row;\n if (s.params.slidesPerColumnFill === 'column') {\n column = Math.floor(i / slidesPerColumn);\n row = i - column * slidesPerColumn;\n if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn-1)) {\n if (++row >= slidesPerColumn) {\n row = 0;\n column++;\n }\n }\n newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn;\n slide\n .css({\n '-webkit-box-ordinal-group': newSlideOrderIndex,\n '-moz-box-ordinal-group': newSlideOrderIndex,\n '-ms-flex-order': newSlideOrderIndex,\n '-webkit-order': newSlideOrderIndex,\n 'order': newSlideOrderIndex\n });\n }\n else {\n row = Math.floor(i / slidesPerRow);\n column = i - row * slidesPerRow;\n }\n slide\n .css(\n 'margin-' + (s.isHorizontal() ? 'top' : 'left'),\n (row !== 0 && s.params.spaceBetween) && (s.params.spaceBetween + 'px')\n )\n .attr('data-swiper-column', column)\n .attr('data-swiper-row', row);\n \n }\n if (slide.css('display') === 'none') continue;\n if (s.params.slidesPerView === 'auto') {\n slideSize = s.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true);\n if (s.params.roundLengths) slideSize = round(slideSize);\n }\n else {\n slideSize = (s.size - (s.params.slidesPerView - 1) * spaceBetween) / s.params.slidesPerView;\n if (s.params.roundLengths) slideSize = round(slideSize);\n \n if (s.isHorizontal()) {\n s.slides[i].style.width = slideSize + 'px';\n }\n else {\n s.slides[i].style.height = slideSize + 'px';\n }\n }\n s.slides[i].swiperSlideSize = slideSize;\n s.slidesSizesGrid.push(slideSize);\n \n \n if (s.params.centeredSlides) {\n slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;\n if(prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;\n if (i === 0) slidePosition = slidePosition - s.size / 2 - spaceBetween;\n if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;\n if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);\n s.slidesGrid.push(slidePosition);\n }\n else {\n if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition);\n s.slidesGrid.push(slidePosition);\n slidePosition = slidePosition + slideSize + spaceBetween;\n }\n \n s.virtualSize += slideSize + spaceBetween;\n \n prevSlideSize = slideSize;\n \n index ++;\n }\n s.virtualSize = Math.max(s.virtualSize, s.size) + s.params.slidesOffsetAfter;\n var newSlidesGrid;\n \n if (\n s.rtl && s.wrongRTL && (s.params.effect === 'slide' || s.params.effect === 'coverflow')) {\n s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n }\n if (!s.support.flexbox || s.params.setWrapperSize) {\n if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});\n }\n \n if (s.params.slidesPerColumn > 1) {\n s.virtualSize = (slideSize + s.params.spaceBetween) * slidesNumberEvenToRows;\n s.virtualSize = Math.ceil(s.virtualSize / s.params.slidesPerColumn) - s.params.spaceBetween;\n if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'});\n else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'});\n if (s.params.centeredSlides) {\n newSlidesGrid = [];\n for (i = 0; i < s.snapGrid.length; i++) {\n if (s.snapGrid[i] < s.virtualSize + s.snapGrid[0]) newSlidesGrid.push(s.snapGrid[i]);\n }\n s.snapGrid = newSlidesGrid;\n }\n }\n \n // Remove last grid elements depending on width\n if (!s.params.centeredSlides) {\n newSlidesGrid = [];\n for (i = 0; i < s.snapGrid.length; i++) {\n if (s.snapGrid[i] <= s.virtualSize - s.size) {\n newSlidesGrid.push(s.snapGrid[i]);\n }\n }\n s.snapGrid = newSlidesGrid;\n if (Math.floor(s.virtualSize - s.size) - Math.floor(s.snapGrid[s.snapGrid.length - 1]) > 1) {\n s.snapGrid.push(s.virtualSize - s.size);\n }\n }\n if (s.snapGrid.length === 0) s.snapGrid = [0];\n \n if (s.params.spaceBetween !== 0) {\n if (s.isHorizontal()) {\n if (s.rtl) s.slides.css({marginLeft: spaceBetween + 'px'});\n else s.slides.css({marginRight: spaceBetween + 'px'});\n }\n else s.slides.css({marginBottom: spaceBetween + 'px'});\n }\n if (s.params.watchSlidesProgress) {\n s.updateSlidesOffset();\n }\n };\n s.updateSlidesOffset = function () {\n for (var i = 0; i < s.slides.length; i++) {\n s.slides[i].swiperSlideOffset = s.isHorizontal() ? s.slides[i].offsetLeft : s.slides[i].offsetTop;\n }\n };\n \n /*=========================\n Dynamic Slides Per View\n ===========================*/\n s.currentSlidesPerView = function () {\n var spv = 1, i, j;\n if (s.params.centeredSlides) {\n var size = s.slides[s.activeIndex].swiperSlideSize;\n var breakLoop;\n for (i = s.activeIndex + 1; i < s.slides.length; i++) {\n if (s.slides[i] && !breakLoop) {\n size += s.slides[i].swiperSlideSize;\n spv ++;\n if (size > s.size) breakLoop = true;\n }\n }\n for (j = s.activeIndex - 1; j >= 0; j--) {\n if (s.slides[j] && !breakLoop) {\n size += s.slides[j].swiperSlideSize;\n spv ++;\n if (size > s.size) breakLoop = true;\n }\n }\n }\n else {\n for (i = s.activeIndex + 1; i < s.slides.length; i++) {\n if (s.slidesGrid[i] - s.slidesGrid[s.activeIndex] < s.size) {\n spv++;\n }\n }\n }\n return spv;\n };\n /*=========================\n Slider/slides progress\n ===========================*/\n s.updateSlidesProgress = function (translate) {\n if (typeof translate === 'undefined') {\n translate = s.translate || 0;\n }\n if (s.slides.length === 0) return;\n if (typeof s.slides[0].swiperSlideOffset === 'undefined') s.updateSlidesOffset();\n \n var offsetCenter = -translate;\n if (s.rtl) offsetCenter = translate;\n \n // Visible Slides\n s.slides.removeClass(s.params.slideVisibleClass);\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides[i];\n var slideProgress = (offsetCenter + (s.params.centeredSlides ? s.minTranslate() : 0) - slide.swiperSlideOffset) / (slide.swiperSlideSize + s.params.spaceBetween);\n if (s.params.watchSlidesVisibility) {\n var slideBefore = -(offsetCenter - slide.swiperSlideOffset);\n var slideAfter = slideBefore + s.slidesSizesGrid[i];\n var isVisible =\n (slideBefore >= 0 && slideBefore < s.size) ||\n (slideAfter > 0 && slideAfter <= s.size) ||\n (slideBefore <= 0 && slideAfter >= s.size);\n if (isVisible) {\n s.slides.eq(i).addClass(s.params.slideVisibleClass);\n }\n }\n slide.progress = s.rtl ? -slideProgress : slideProgress;\n }\n };\n s.updateProgress = function (translate) {\n if (typeof translate === 'undefined') {\n translate = s.translate || 0;\n }\n var translatesDiff = s.maxTranslate() - s.minTranslate();\n var wasBeginning = s.isBeginning;\n var wasEnd = s.isEnd;\n if (translatesDiff === 0) {\n s.progress = 0;\n s.isBeginning = s.isEnd = true;\n }\n else {\n s.progress = (translate - s.minTranslate()) / (translatesDiff);\n s.isBeginning = s.progress <= 0;\n s.isEnd = s.progress >= 1;\n }\n if (s.isBeginning && !wasBeginning) s.emit('onReachBeginning', s);\n if (s.isEnd && !wasEnd) s.emit('onReachEnd', s);\n \n if (s.params.watchSlidesProgress) s.updateSlidesProgress(translate);\n s.emit('onProgress', s, s.progress);\n };\n s.updateActiveIndex = function () {\n var translate = s.rtl ? s.translate : -s.translate;\n var newActiveIndex, i, snapIndex;\n for (i = 0; i < s.slidesGrid.length; i ++) {\n if (typeof s.slidesGrid[i + 1] !== 'undefined') {\n if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1] - (s.slidesGrid[i + 1] - s.slidesGrid[i]) / 2) {\n newActiveIndex = i;\n }\n else if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1]) {\n newActiveIndex = i + 1;\n }\n }\n else {\n if (translate >= s.slidesGrid[i]) {\n newActiveIndex = i;\n }\n }\n }\n // Normalize slideIndex\n if(s.params.normalizeSlideIndex){\n if (newActiveIndex < 0 || typeof newActiveIndex === 'undefined') newActiveIndex = 0;\n }\n // for (i = 0; i < s.slidesGrid.length; i++) {\n // if (- translate >= s.slidesGrid[i]) {\n // newActiveIndex = i;\n // }\n // }\n snapIndex = Math.floor(newActiveIndex / s.params.slidesPerGroup);\n if (snapIndex >= s.snapGrid.length) snapIndex = s.snapGrid.length - 1;\n \n if (newActiveIndex === s.activeIndex) {\n return;\n }\n s.snapIndex = snapIndex;\n s.previousIndex = s.activeIndex;\n s.activeIndex = newActiveIndex;\n s.updateClasses();\n s.updateRealIndex();\n };\n s.updateRealIndex = function(){\n s.realIndex = parseInt(s.slides.eq(s.activeIndex).attr('data-swiper-slide-index') || s.activeIndex, 10);\n };\n \n /*=========================\n Classes\n ===========================*/\n s.updateClasses = function () {\n s.slides.removeClass(s.params.slideActiveClass + ' ' + s.params.slideNextClass + ' ' + s.params.slidePrevClass + ' ' + s.params.slideDuplicateActiveClass + ' ' + s.params.slideDuplicateNextClass + ' ' + s.params.slideDuplicatePrevClass);\n var activeSlide = s.slides.eq(s.activeIndex);\n // Active classes\n activeSlide.addClass(s.params.slideActiveClass);\n if (params.loop) {\n // Duplicate to all looped slides\n if (activeSlide.hasClass(s.params.slideDuplicateClass)) {\n s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index=\"' + s.realIndex + '\"]').addClass(s.params.slideDuplicateActiveClass);\n }\n else {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + s.realIndex + '\"]').addClass(s.params.slideDuplicateActiveClass);\n }\n }\n // Next Slide\n var nextSlide = activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass);\n if (s.params.loop && nextSlide.length === 0) {\n nextSlide = s.slides.eq(0);\n nextSlide.addClass(s.params.slideNextClass);\n }\n // Prev Slide\n var prevSlide = activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass);\n if (s.params.loop && prevSlide.length === 0) {\n prevSlide = s.slides.eq(-1);\n prevSlide.addClass(s.params.slidePrevClass);\n }\n if (params.loop) {\n // Duplicate to all looped slides\n if (nextSlide.hasClass(s.params.slideDuplicateClass)) {\n s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index=\"' + nextSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicateNextClass);\n }\n else {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + nextSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicateNextClass);\n }\n if (prevSlide.hasClass(s.params.slideDuplicateClass)) {\n s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index=\"' + prevSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicatePrevClass);\n }\n else {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + prevSlide.attr('data-swiper-slide-index') + '\"]').addClass(s.params.slideDuplicatePrevClass);\n }\n }\n \n // Pagination\n if (s.paginationContainer && s.paginationContainer.length > 0) {\n // Current/Total\n var current,\n total = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;\n if (s.params.loop) {\n current = Math.ceil((s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup);\n if (current > s.slides.length - 1 - s.loopedSlides * 2) {\n current = current - (s.slides.length - s.loopedSlides * 2);\n }\n if (current > total - 1) current = current - total;\n if (current < 0 && s.params.paginationType !== 'bullets') current = total + current;\n }\n else {\n if (typeof s.snapIndex !== 'undefined') {\n current = s.snapIndex;\n }\n else {\n current = s.activeIndex || 0;\n }\n }\n // Types\n if (s.params.paginationType === 'bullets' && s.bullets && s.bullets.length > 0) {\n s.bullets.removeClass(s.params.bulletActiveClass);\n if (s.paginationContainer.length > 1) {\n s.bullets.each(function () {\n if ($(this).index() === current) $(this).addClass(s.params.bulletActiveClass);\n });\n }\n else {\n s.bullets.eq(current).addClass(s.params.bulletActiveClass);\n }\n }\n if (s.params.paginationType === 'fraction') {\n s.paginationContainer.find('.' + s.params.paginationCurrentClass).text(current + 1);\n s.paginationContainer.find('.' + s.params.paginationTotalClass).text(total);\n }\n if (s.params.paginationType === 'progress') {\n var scale = (current + 1) / total,\n scaleX = scale,\n scaleY = 1;\n if (!s.isHorizontal()) {\n scaleY = scale;\n scaleX = 1;\n }\n s.paginationContainer.find('.' + s.params.paginationProgressbarClass).transform('translate3d(0,0,0) scaleX(' + scaleX + ') scaleY(' + scaleY + ')').transition(s.params.speed);\n }\n if (s.params.paginationType === 'custom' && s.params.paginationCustomRender) {\n s.paginationContainer.html(s.params.paginationCustomRender(s, current + 1, total));\n s.emit('onPaginationRendered', s, s.paginationContainer[0]);\n }\n }\n \n // Next/active buttons\n if (!s.params.loop) {\n if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {\n if (s.isBeginning) {\n s.prevButton.addClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.disable(s.prevButton);\n }\n else {\n s.prevButton.removeClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.enable(s.prevButton);\n }\n }\n if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {\n if (s.isEnd) {\n s.nextButton.addClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.disable(s.nextButton);\n }\n else {\n s.nextButton.removeClass(s.params.buttonDisabledClass);\n if (s.params.a11y && s.a11y) s.a11y.enable(s.nextButton);\n }\n }\n }\n };\n \n /*=========================\n Pagination\n ===========================*/\n s.updatePagination = function () {\n if (!s.params.pagination) return;\n if (s.paginationContainer && s.paginationContainer.length > 0) {\n var paginationHTML = '';\n if (s.params.paginationType === 'bullets') {\n var numberOfBullets = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;\n for (var i = 0; i < numberOfBullets; i++) {\n if (s.params.paginationBulletRender) {\n paginationHTML += s.params.paginationBulletRender(s, i, s.params.bulletClass);\n }\n else {\n paginationHTML += '<' + s.params.paginationElement+' class=\"' + s.params.bulletClass + '\">';\n }\n }\n s.paginationContainer.html(paginationHTML);\n s.bullets = s.paginationContainer.find('.' + s.params.bulletClass);\n if (s.params.paginationClickable && s.params.a11y && s.a11y) {\n s.a11y.initPagination();\n }\n }\n if (s.params.paginationType === 'fraction') {\n if (s.params.paginationFractionRender) {\n paginationHTML = s.params.paginationFractionRender(s, s.params.paginationCurrentClass, s.params.paginationTotalClass);\n }\n else {\n paginationHTML =\n '' +\n ' / ' +\n '';\n }\n s.paginationContainer.html(paginationHTML);\n }\n if (s.params.paginationType === 'progress') {\n if (s.params.paginationProgressRender) {\n paginationHTML = s.params.paginationProgressRender(s, s.params.paginationProgressbarClass);\n }\n else {\n paginationHTML = '';\n }\n s.paginationContainer.html(paginationHTML);\n }\n if (s.params.paginationType !== 'custom') {\n s.emit('onPaginationRendered', s, s.paginationContainer[0]);\n }\n }\n };\n /*=========================\n Common update method\n ===========================*/\n s.update = function (updateTranslate) {\n if (!s) return;\n s.updateContainerSize();\n s.updateSlidesSize();\n s.updateProgress();\n s.updatePagination();\n s.updateClasses();\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.set();\n }\n var newTranslate;\n function forceSetTranslate() {\n var translate = s.rtl ? -s.translate : s.translate;\n newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());\n s.setWrapperTranslate(newTranslate);\n s.updateActiveIndex();\n s.updateClasses();\n }\n if (updateTranslate) {\n var translated;\n if (s.controller && s.controller.spline) {\n s.controller.spline = undefined;\n }\n if (s.params.freeMode) {\n forceSetTranslate();\n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n }\n else {\n if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {\n translated = s.slideTo(s.slides.length - 1, 0, false, true);\n }\n else {\n translated = s.slideTo(s.activeIndex, 0, false, true);\n }\n if (!translated) {\n forceSetTranslate();\n }\n }\n }\n else if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n };\n \n /*=========================\n Resize Handler\n ===========================*/\n s.onResize = function (forceUpdatePagination) {\n if (s.params.onBeforeResize) s.params.onBeforeResize(s);\n //Breakpoints\n if (s.params.breakpoints) {\n s.setBreakpoint();\n }\n \n // Disable locks on resize\n var allowSwipeToPrev = s.params.allowSwipeToPrev;\n var allowSwipeToNext = s.params.allowSwipeToNext;\n s.params.allowSwipeToPrev = s.params.allowSwipeToNext = true;\n \n s.updateContainerSize();\n s.updateSlidesSize();\n if (s.params.slidesPerView === 'auto' || s.params.freeMode || forceUpdatePagination) s.updatePagination();\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.set();\n }\n if (s.controller && s.controller.spline) {\n s.controller.spline = undefined;\n }\n var slideChangedBySlideTo = false;\n if (s.params.freeMode) {\n var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());\n s.setWrapperTranslate(newTranslate);\n s.updateActiveIndex();\n s.updateClasses();\n \n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n }\n else {\n s.updateClasses();\n if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {\n slideChangedBySlideTo = s.slideTo(s.slides.length - 1, 0, false, true);\n }\n else {\n slideChangedBySlideTo = s.slideTo(s.activeIndex, 0, false, true);\n }\n }\n if (s.params.lazyLoading && !slideChangedBySlideTo && s.lazy) {\n s.lazy.load();\n }\n // Return locks after resize\n s.params.allowSwipeToPrev = allowSwipeToPrev;\n s.params.allowSwipeToNext = allowSwipeToNext;\n if (s.params.onAfterResize) s.params.onAfterResize(s);\n };\n \n /*=========================\n Events\n ===========================*/\n \n //Define Touch Events\n s.touchEventsDesktop = {start: 'mousedown', move: 'mousemove', end: 'mouseup'};\n if (window.navigator.pointerEnabled) s.touchEventsDesktop = {start: 'pointerdown', move: 'pointermove', end: 'pointerup'};\n else if (window.navigator.msPointerEnabled) s.touchEventsDesktop = {start: 'MSPointerDown', move: 'MSPointerMove', end: 'MSPointerUp'};\n s.touchEvents = {\n start : s.support.touch || !s.params.simulateTouch ? 'touchstart' : s.touchEventsDesktop.start,\n move : s.support.touch || !s.params.simulateTouch ? 'touchmove' : s.touchEventsDesktop.move,\n end : s.support.touch || !s.params.simulateTouch ? 'touchend' : s.touchEventsDesktop.end\n };\n \n \n // WP8 Touch Events Fix\n if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) {\n (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction);\n }\n \n // Attach/detach events\n s.initEvents = function (detach) {\n var actionDom = detach ? 'off' : 'on';\n var action = detach ? 'removeEventListener' : 'addEventListener';\n var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0];\n var target = s.support.touch ? touchEventsTarget : document;\n \n var moveCapture = s.params.nested ? true : false;\n \n //Touch Events\n if (s.browser.ie) {\n touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false);\n target[action](s.touchEvents.move, s.onTouchMove, moveCapture);\n target[action](s.touchEvents.end, s.onTouchEnd, false);\n }\n else {\n if (s.support.touch) {\n var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false;\n touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, passiveListener);\n touchEventsTarget[action](s.touchEvents.move, s.onTouchMove, moveCapture);\n touchEventsTarget[action](s.touchEvents.end, s.onTouchEnd, passiveListener);\n }\n if ((params.simulateTouch && !s.device.ios && !s.device.android) || (params.simulateTouch && !s.support.touch && s.device.ios)) {\n touchEventsTarget[action]('mousedown', s.onTouchStart, false);\n document[action]('mousemove', s.onTouchMove, moveCapture);\n document[action]('mouseup', s.onTouchEnd, false);\n }\n }\n window[action]('resize', s.onResize);\n \n // Next, Prev, Index\n if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {\n s.nextButton[actionDom]('click', s.onClickNext);\n if (s.params.a11y && s.a11y) s.nextButton[actionDom]('keydown', s.a11y.onEnterKey);\n }\n if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {\n s.prevButton[actionDom]('click', s.onClickPrev);\n if (s.params.a11y && s.a11y) s.prevButton[actionDom]('keydown', s.a11y.onEnterKey);\n }\n if (s.params.pagination && s.params.paginationClickable) {\n s.paginationContainer[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex);\n if (s.params.a11y && s.a11y) s.paginationContainer[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey);\n }\n \n // Prevent Links Clicks\n if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true);\n };\n s.attachEvents = function () {\n s.initEvents();\n };\n s.detachEvents = function () {\n s.initEvents(true);\n };\n \n /*=========================\n Handle Clicks\n ===========================*/\n // Prevent Clicks\n s.allowClick = true;\n s.preventClicks = function (e) {\n if (!s.allowClick) {\n if (s.params.preventClicks) e.preventDefault();\n if (s.params.preventClicksPropagation && s.animating) {\n e.stopPropagation();\n e.stopImmediatePropagation();\n }\n }\n };\n // Clicks\n s.onClickNext = function (e) {\n e.preventDefault();\n if (s.isEnd && !s.params.loop) return;\n s.slideNext();\n };\n s.onClickPrev = function (e) {\n e.preventDefault();\n if (s.isBeginning && !s.params.loop) return;\n s.slidePrev();\n };\n s.onClickIndex = function (e) {\n e.preventDefault();\n var index = $(this).index() * s.params.slidesPerGroup;\n if (s.params.loop) index = index + s.loopedSlides;\n s.slideTo(index);\n };\n \n /*=========================\n Handle Touches\n ===========================*/\n function findElementInEvent(e, selector) {\n var el = $(e.target);\n if (!el.is(selector)) {\n if (typeof selector === 'string') {\n el = el.parents(selector);\n }\n else if (selector.nodeType) {\n var found;\n el.parents().each(function (index, _el) {\n if (_el === selector) found = selector;\n });\n if (!found) return undefined;\n else return selector;\n }\n }\n if (el.length === 0) {\n return undefined;\n }\n return el[0];\n }\n s.updateClickedSlide = function (e) {\n var slide = findElementInEvent(e, '.' + s.params.slideClass);\n var slideFound = false;\n if (slide) {\n for (var i = 0; i < s.slides.length; i++) {\n if (s.slides[i] === slide) slideFound = true;\n }\n }\n \n if (slide && slideFound) {\n s.clickedSlide = slide;\n s.clickedIndex = $(slide).index();\n }\n else {\n s.clickedSlide = undefined;\n s.clickedIndex = undefined;\n return;\n }\n if (s.params.slideToClickedSlide && s.clickedIndex !== undefined && s.clickedIndex !== s.activeIndex) {\n var slideToIndex = s.clickedIndex,\n realIndex,\n duplicatedSlides,\n slidesPerView = s.params.slidesPerView === 'auto' ? s.currentSlidesPerView() : s.params.slidesPerView;\n if (s.params.loop) {\n if (s.animating) return;\n realIndex = parseInt($(s.clickedSlide).attr('data-swiper-slide-index'), 10);\n if (s.params.centeredSlides) {\n if ((slideToIndex < s.loopedSlides - slidesPerView/2) || (slideToIndex > s.slides.length - s.loopedSlides + slidesPerView/2)) {\n s.fixLoop();\n slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index=\"' + realIndex + '\"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index();\n setTimeout(function () {\n s.slideTo(slideToIndex);\n }, 0);\n }\n else {\n s.slideTo(slideToIndex);\n }\n }\n else {\n if (slideToIndex > s.slides.length - slidesPerView) {\n s.fixLoop();\n slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index=\"' + realIndex + '\"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index();\n setTimeout(function () {\n s.slideTo(slideToIndex);\n }, 0);\n }\n else {\n s.slideTo(slideToIndex);\n }\n }\n }\n else {\n s.slideTo(slideToIndex);\n }\n }\n };\n \n var isTouched,\n isMoved,\n allowTouchCallbacks,\n touchStartTime,\n isScrolling,\n currentTranslate,\n startTranslate,\n allowThresholdMove,\n // Form elements to match\n formElements = 'input, select, textarea, button, video',\n // Last click time\n lastClickTime = Date.now(), clickTimeout,\n //Velocities\n velocities = [],\n allowMomentumBounce;\n \n // Animating Flag\n s.animating = false;\n \n // Touches information\n s.touches = {\n startX: 0,\n startY: 0,\n currentX: 0,\n currentY: 0,\n diff: 0\n };\n \n // Touch handlers\n var isTouchEvent, startMoving;\n s.onTouchStart = function (e) {\n if (e.originalEvent) e = e.originalEvent;\n isTouchEvent = e.type === 'touchstart';\n if (!isTouchEvent && 'which' in e && e.which === 3) return;\n if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) {\n s.allowClick = true;\n return;\n }\n if (s.params.swipeHandler) {\n if (!findElementInEvent(e, s.params.swipeHandler)) return;\n }\n \n var startX = s.touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n var startY = s.touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n \n // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore\n if(s.device.ios && s.params.iOSEdgeSwipeDetection && startX <= s.params.iOSEdgeSwipeThreshold) {\n return;\n }\n \n isTouched = true;\n isMoved = false;\n allowTouchCallbacks = true;\n isScrolling = undefined;\n startMoving = undefined;\n s.touches.startX = startX;\n s.touches.startY = startY;\n touchStartTime = Date.now();\n s.allowClick = true;\n s.updateContainerSize();\n s.swipeDirection = undefined;\n if (s.params.threshold > 0) allowThresholdMove = false;\n if (e.type !== 'touchstart') {\n var preventDefault = true;\n if ($(e.target).is(formElements)) preventDefault = false;\n if (document.activeElement && $(document.activeElement).is(formElements)) {\n document.activeElement.blur();\n }\n if (preventDefault) {\n e.preventDefault();\n }\n }\n s.emit('onTouchStart', s, e);\n };\n \n s.onTouchMove = function (e) {\n if (e.originalEvent) e = e.originalEvent;\n if (isTouchEvent && e.type === 'mousemove') return;\n if (e.preventedByNestedSwiper) {\n s.touches.startX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n s.touches.startY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n return;\n }\n if (s.params.onlyExternal) {\n // isMoved = true;\n s.allowClick = false;\n if (isTouched) {\n s.touches.startX = s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n s.touches.startY = s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n touchStartTime = Date.now();\n }\n return;\n }\n if (isTouchEvent && s.params.touchReleaseOnEdges && !s.params.loop) {\n if (!s.isHorizontal()) {\n // Vertical\n if (\n (s.touches.currentY < s.touches.startY && s.translate <= s.maxTranslate()) ||\n (s.touches.currentY > s.touches.startY && s.translate >= s.minTranslate())\n ) {\n return;\n }\n }\n else {\n if (\n (s.touches.currentX < s.touches.startX && s.translate <= s.maxTranslate()) ||\n (s.touches.currentX > s.touches.startX && s.translate >= s.minTranslate())\n ) {\n return;\n }\n }\n }\n if (isTouchEvent && document.activeElement) {\n if (e.target === document.activeElement && $(e.target).is(formElements)) {\n isMoved = true;\n s.allowClick = false;\n return;\n }\n }\n if (allowTouchCallbacks) {\n s.emit('onTouchMove', s, e);\n }\n if (e.targetTouches && e.targetTouches.length > 1) return;\n \n s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n \n if (typeof isScrolling === 'undefined') {\n var touchAngle;\n if (s.isHorizontal() && s.touches.currentY === s.touches.startY || !s.isHorizontal() && s.touches.currentX === s.touches.startX) {\n isScrolling = false;\n }\n else {\n touchAngle = Math.atan2(Math.abs(s.touches.currentY - s.touches.startY), Math.abs(s.touches.currentX - s.touches.startX)) * 180 / Math.PI;\n isScrolling = s.isHorizontal() ? touchAngle > s.params.touchAngle : (90 - touchAngle > s.params.touchAngle);\n }\n }\n if (isScrolling) {\n s.emit('onTouchMoveOpposite', s, e);\n }\n if (typeof startMoving === 'undefined') {\n if (s.touches.currentX !== s.touches.startX || s.touches.currentY !== s.touches.startY) {\n startMoving = true;\n }\n }\n if (!isTouched) return;\n if (isScrolling) {\n isTouched = false;\n return;\n }\n if (!startMoving) {\n return;\n }\n s.allowClick = false;\n s.emit('onSliderMove', s, e);\n e.preventDefault();\n if (s.params.touchMoveStopPropagation && !s.params.nested) {\n e.stopPropagation();\n }\n \n if (!isMoved) {\n if (params.loop) {\n s.fixLoop();\n }\n startTranslate = s.getWrapperTranslate();\n s.setWrapperTransition(0);\n if (s.animating) {\n s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd');\n }\n if (s.params.autoplay && s.autoplaying) {\n if (s.params.autoplayDisableOnInteraction) {\n s.stopAutoplay();\n }\n else {\n s.pauseAutoplay();\n }\n }\n allowMomentumBounce = false;\n //Grab Cursor\n if (s.params.grabCursor && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) {\n s.setGrabCursor(true);\n }\n }\n isMoved = true;\n \n var diff = s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;\n \n diff = diff * s.params.touchRatio;\n if (s.rtl) diff = -diff;\n \n s.swipeDirection = diff > 0 ? 'prev' : 'next';\n currentTranslate = diff + startTranslate;\n \n var disableParentSwiper = true;\n if ((diff > 0 && currentTranslate > s.minTranslate())) {\n disableParentSwiper = false;\n if (s.params.resistance) currentTranslate = s.minTranslate() - 1 + Math.pow(-s.minTranslate() + startTranslate + diff, s.params.resistanceRatio);\n }\n else if (diff < 0 && currentTranslate < s.maxTranslate()) {\n disableParentSwiper = false;\n if (s.params.resistance) currentTranslate = s.maxTranslate() + 1 - Math.pow(s.maxTranslate() - startTranslate - diff, s.params.resistanceRatio);\n }\n \n if (disableParentSwiper) {\n e.preventedByNestedSwiper = true;\n }\n \n // Directions locks\n if (!s.params.allowSwipeToNext && s.swipeDirection === 'next' && currentTranslate < startTranslate) {\n currentTranslate = startTranslate;\n }\n if (!s.params.allowSwipeToPrev && s.swipeDirection === 'prev' && currentTranslate > startTranslate) {\n currentTranslate = startTranslate;\n }\n \n \n // Threshold\n if (s.params.threshold > 0) {\n if (Math.abs(diff) > s.params.threshold || allowThresholdMove) {\n if (!allowThresholdMove) {\n allowThresholdMove = true;\n s.touches.startX = s.touches.currentX;\n s.touches.startY = s.touches.currentY;\n currentTranslate = startTranslate;\n s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY;\n return;\n }\n }\n else {\n currentTranslate = startTranslate;\n return;\n }\n }\n \n if (!s.params.followFinger) return;\n \n // Update active index in free mode\n if (s.params.freeMode || s.params.watchSlidesProgress) {\n s.updateActiveIndex();\n }\n if (s.params.freeMode) {\n //Velocity\n if (velocities.length === 0) {\n velocities.push({\n position: s.touches[s.isHorizontal() ? 'startX' : 'startY'],\n time: touchStartTime\n });\n }\n velocities.push({\n position: s.touches[s.isHorizontal() ? 'currentX' : 'currentY'],\n time: (new window.Date()).getTime()\n });\n }\n // Update progress\n s.updateProgress(currentTranslate);\n // Update translate\n s.setWrapperTranslate(currentTranslate);\n };\n s.onTouchEnd = function (e) {\n if (e.originalEvent) e = e.originalEvent;\n if (allowTouchCallbacks) {\n s.emit('onTouchEnd', s, e);\n }\n allowTouchCallbacks = false;\n if (!isTouched) return;\n //Return Grab Cursor\n if (s.params.grabCursor && isMoved && isTouched && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) {\n s.setGrabCursor(false);\n }\n \n // Time diff\n var touchEndTime = Date.now();\n var timeDiff = touchEndTime - touchStartTime;\n \n // Tap, doubleTap, Click\n if (s.allowClick) {\n s.updateClickedSlide(e);\n s.emit('onTap', s, e);\n if (timeDiff < 300 && (touchEndTime - lastClickTime) > 300) {\n if (clickTimeout) clearTimeout(clickTimeout);\n clickTimeout = setTimeout(function () {\n if (!s) return;\n if (s.params.paginationHide && s.paginationContainer.length > 0 && !$(e.target).hasClass(s.params.bulletClass)) {\n s.paginationContainer.toggleClass(s.params.paginationHiddenClass);\n }\n s.emit('onClick', s, e);\n }, 300);\n \n }\n if (timeDiff < 300 && (touchEndTime - lastClickTime) < 300) {\n if (clickTimeout) clearTimeout(clickTimeout);\n s.emit('onDoubleTap', s, e);\n }\n }\n \n lastClickTime = Date.now();\n setTimeout(function () {\n if (s) s.allowClick = true;\n }, 0);\n \n if (!isTouched || !isMoved || !s.swipeDirection || s.touches.diff === 0 || currentTranslate === startTranslate) {\n isTouched = isMoved = false;\n return;\n }\n isTouched = isMoved = false;\n \n var currentPos;\n if (s.params.followFinger) {\n currentPos = s.rtl ? s.translate : -s.translate;\n }\n else {\n currentPos = -currentTranslate;\n }\n if (s.params.freeMode) {\n if (currentPos < -s.minTranslate()) {\n s.slideTo(s.activeIndex);\n return;\n }\n else if (currentPos > -s.maxTranslate()) {\n if (s.slides.length < s.snapGrid.length) {\n s.slideTo(s.snapGrid.length - 1);\n }\n else {\n s.slideTo(s.slides.length - 1);\n }\n return;\n }\n \n if (s.params.freeModeMomentum) {\n if (velocities.length > 1) {\n var lastMoveEvent = velocities.pop(), velocityEvent = velocities.pop();\n \n var distance = lastMoveEvent.position - velocityEvent.position;\n var time = lastMoveEvent.time - velocityEvent.time;\n s.velocity = distance / time;\n s.velocity = s.velocity / 2;\n if (Math.abs(s.velocity) < s.params.freeModeMinimumVelocity) {\n s.velocity = 0;\n }\n // this implies that the user stopped moving a finger then released.\n // There would be no events with distance zero, so the last event is stale.\n if (time > 150 || (new window.Date().getTime() - lastMoveEvent.time) > 300) {\n s.velocity = 0;\n }\n } else {\n s.velocity = 0;\n }\n s.velocity = s.velocity * s.params.freeModeMomentumVelocityRatio;\n \n velocities.length = 0;\n var momentumDuration = 1000 * s.params.freeModeMomentumRatio;\n var momentumDistance = s.velocity * momentumDuration;\n \n var newPosition = s.translate + momentumDistance;\n if (s.rtl) newPosition = - newPosition;\n var doBounce = false;\n var afterBouncePosition;\n var bounceAmount = Math.abs(s.velocity) * 20 * s.params.freeModeMomentumBounceRatio;\n if (newPosition < s.maxTranslate()) {\n if (s.params.freeModeMomentumBounce) {\n if (newPosition + s.maxTranslate() < -bounceAmount) {\n newPosition = s.maxTranslate() - bounceAmount;\n }\n afterBouncePosition = s.maxTranslate();\n doBounce = true;\n allowMomentumBounce = true;\n }\n else {\n newPosition = s.maxTranslate();\n }\n }\n else if (newPosition > s.minTranslate()) {\n if (s.params.freeModeMomentumBounce) {\n if (newPosition - s.minTranslate() > bounceAmount) {\n newPosition = s.minTranslate() + bounceAmount;\n }\n afterBouncePosition = s.minTranslate();\n doBounce = true;\n allowMomentumBounce = true;\n }\n else {\n newPosition = s.minTranslate();\n }\n }\n else if (s.params.freeModeSticky) {\n var j = 0,\n nextSlide;\n for (j = 0; j < s.snapGrid.length; j += 1) {\n if (s.snapGrid[j] > -newPosition) {\n nextSlide = j;\n break;\n }\n \n }\n if (Math.abs(s.snapGrid[nextSlide] - newPosition) < Math.abs(s.snapGrid[nextSlide - 1] - newPosition) || s.swipeDirection === 'next') {\n newPosition = s.snapGrid[nextSlide];\n } else {\n newPosition = s.snapGrid[nextSlide - 1];\n }\n if (!s.rtl) newPosition = - newPosition;\n }\n //Fix duration\n if (s.velocity !== 0) {\n if (s.rtl) {\n momentumDuration = Math.abs((-newPosition - s.translate) / s.velocity);\n }\n else {\n momentumDuration = Math.abs((newPosition - s.translate) / s.velocity);\n }\n }\n else if (s.params.freeModeSticky) {\n s.slideReset();\n return;\n }\n \n if (s.params.freeModeMomentumBounce && doBounce) {\n s.updateProgress(afterBouncePosition);\n s.setWrapperTransition(momentumDuration);\n s.setWrapperTranslate(newPosition);\n s.onTransitionStart();\n s.animating = true;\n s.wrapper.transitionEnd(function () {\n if (!s || !allowMomentumBounce) return;\n s.emit('onMomentumBounce', s);\n \n s.setWrapperTransition(s.params.speed);\n s.setWrapperTranslate(afterBouncePosition);\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.onTransitionEnd();\n });\n });\n } else if (s.velocity) {\n s.updateProgress(newPosition);\n s.setWrapperTransition(momentumDuration);\n s.setWrapperTranslate(newPosition);\n s.onTransitionStart();\n if (!s.animating) {\n s.animating = true;\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.onTransitionEnd();\n });\n }\n \n } else {\n s.updateProgress(newPosition);\n }\n \n s.updateActiveIndex();\n }\n if (!s.params.freeModeMomentum || timeDiff >= s.params.longSwipesMs) {\n s.updateProgress();\n s.updateActiveIndex();\n }\n return;\n }\n \n // Find current slide\n var i, stopIndex = 0, groupSize = s.slidesSizesGrid[0];\n for (i = 0; i < s.slidesGrid.length; i += s.params.slidesPerGroup) {\n if (typeof s.slidesGrid[i + s.params.slidesPerGroup] !== 'undefined') {\n if (currentPos >= s.slidesGrid[i] && currentPos < s.slidesGrid[i + s.params.slidesPerGroup]) {\n stopIndex = i;\n groupSize = s.slidesGrid[i + s.params.slidesPerGroup] - s.slidesGrid[i];\n }\n }\n else {\n if (currentPos >= s.slidesGrid[i]) {\n stopIndex = i;\n groupSize = s.slidesGrid[s.slidesGrid.length - 1] - s.slidesGrid[s.slidesGrid.length - 2];\n }\n }\n }\n \n // Find current slide size\n var ratio = (currentPos - s.slidesGrid[stopIndex]) / groupSize;\n \n if (timeDiff > s.params.longSwipesMs) {\n // Long touches\n if (!s.params.longSwipes) {\n s.slideTo(s.activeIndex);\n return;\n }\n if (s.swipeDirection === 'next') {\n if (ratio >= s.params.longSwipesRatio) s.slideTo(stopIndex + s.params.slidesPerGroup);\n else s.slideTo(stopIndex);\n \n }\n if (s.swipeDirection === 'prev') {\n if (ratio > (1 - s.params.longSwipesRatio)) s.slideTo(stopIndex + s.params.slidesPerGroup);\n else s.slideTo(stopIndex);\n }\n }\n else {\n // Short swipes\n if (!s.params.shortSwipes) {\n s.slideTo(s.activeIndex);\n return;\n }\n if (s.swipeDirection === 'next') {\n s.slideTo(stopIndex + s.params.slidesPerGroup);\n \n }\n if (s.swipeDirection === 'prev') {\n s.slideTo(stopIndex);\n }\n }\n };\n /*=========================\n Transitions\n ===========================*/\n s._slideTo = function (slideIndex, speed) {\n return s.slideTo(slideIndex, speed, true, true);\n };\n s.slideTo = function (slideIndex, speed, runCallbacks, internal) {\n if (typeof runCallbacks === 'undefined') runCallbacks = true;\n if (typeof slideIndex === 'undefined') slideIndex = 0;\n if (slideIndex < 0) slideIndex = 0;\n s.snapIndex = Math.floor(slideIndex / s.params.slidesPerGroup);\n if (s.snapIndex >= s.snapGrid.length) s.snapIndex = s.snapGrid.length - 1;\n \n var translate = - s.snapGrid[s.snapIndex];\n // Stop autoplay\n if (s.params.autoplay && s.autoplaying) {\n if (internal || !s.params.autoplayDisableOnInteraction) {\n s.pauseAutoplay(speed);\n }\n else {\n s.stopAutoplay();\n }\n }\n // Update progress\n s.updateProgress(translate);\n \n // Normalize slideIndex\n if(s.params.normalizeSlideIndex){\n for (var i = 0; i < s.slidesGrid.length; i++) {\n if (- Math.floor(translate * 100) >= Math.floor(s.slidesGrid[i] * 100)) {\n slideIndex = i;\n }\n }\n }\n \n // Directions locks\n if (!s.params.allowSwipeToNext && translate < s.translate && translate < s.minTranslate()) {\n return false;\n }\n if (!s.params.allowSwipeToPrev && translate > s.translate && translate > s.maxTranslate()) {\n if ((s.activeIndex || 0) !== slideIndex ) return false;\n }\n \n // Update Index\n if (typeof speed === 'undefined') speed = s.params.speed;\n s.previousIndex = s.activeIndex || 0;\n s.activeIndex = slideIndex;\n s.updateRealIndex();\n if ((s.rtl && -translate === s.translate) || (!s.rtl && translate === s.translate)) {\n // Update Height\n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n s.updateClasses();\n if (s.params.effect !== 'slide') {\n s.setWrapperTranslate(translate);\n }\n return false;\n }\n s.updateClasses();\n s.onTransitionStart(runCallbacks);\n \n if (speed === 0 || s.browser.lteIE9) {\n s.setWrapperTranslate(translate);\n s.setWrapperTransition(0);\n s.onTransitionEnd(runCallbacks);\n }\n else {\n s.setWrapperTranslate(translate);\n s.setWrapperTransition(speed);\n if (!s.animating) {\n s.animating = true;\n s.wrapper.transitionEnd(function () {\n if (!s) return;\n s.onTransitionEnd(runCallbacks);\n });\n }\n \n }\n \n return true;\n };\n \n s.onTransitionStart = function (runCallbacks) {\n if (typeof runCallbacks === 'undefined') runCallbacks = true;\n if (s.params.autoHeight) {\n s.updateAutoHeight();\n }\n if (s.lazy) s.lazy.onTransitionStart();\n if (runCallbacks) {\n s.emit('onTransitionStart', s);\n if (s.activeIndex !== s.previousIndex) {\n s.emit('onSlideChangeStart', s);\n if (s.activeIndex > s.previousIndex) {\n s.emit('onSlideNextStart', s);\n }\n else {\n s.emit('onSlidePrevStart', s);\n }\n }\n \n }\n };\n s.onTransitionEnd = function (runCallbacks) {\n s.animating = false;\n s.setWrapperTransition(0);\n if (typeof runCallbacks === 'undefined') runCallbacks = true;\n if (s.lazy) s.lazy.onTransitionEnd();\n if (runCallbacks) {\n s.emit('onTransitionEnd', s);\n if (s.activeIndex !== s.previousIndex) {\n s.emit('onSlideChangeEnd', s);\n if (s.activeIndex > s.previousIndex) {\n s.emit('onSlideNextEnd', s);\n }\n else {\n s.emit('onSlidePrevEnd', s);\n }\n }\n }\n if (s.params.history && s.history) {\n s.history.setHistory(s.params.history, s.activeIndex);\n }\n if (s.params.hashnav && s.hashnav) {\n s.hashnav.setHash();\n }\n \n };\n s.slideNext = function (runCallbacks, speed, internal) {\n if (s.params.loop) {\n if (s.animating) return false;\n s.fixLoop();\n var clientLeft = s.container[0].clientLeft;\n return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);\n }\n else return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal);\n };\n s._slideNext = function (speed) {\n return s.slideNext(true, speed, true);\n };\n s.slidePrev = function (runCallbacks, speed, internal) {\n if (s.params.loop) {\n if (s.animating) return false;\n s.fixLoop();\n var clientLeft = s.container[0].clientLeft;\n return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);\n }\n else return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal);\n };\n s._slidePrev = function (speed) {\n return s.slidePrev(true, speed, true);\n };\n s.slideReset = function (runCallbacks, speed, internal) {\n return s.slideTo(s.activeIndex, speed, runCallbacks);\n };\n \n s.disableTouchControl = function () {\n s.params.onlyExternal = true;\n return true;\n };\n s.enableTouchControl = function () {\n s.params.onlyExternal = false;\n return true;\n };\n \n /*=========================\n Translate/transition helpers\n ===========================*/\n s.setWrapperTransition = function (duration, byController) {\n s.wrapper.transition(duration);\n if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n s.effects[s.params.effect].setTransition(duration);\n }\n if (s.params.parallax && s.parallax) {\n s.parallax.setTransition(duration);\n }\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.setTransition(duration);\n }\n if (s.params.control && s.controller) {\n s.controller.setTransition(duration, byController);\n }\n s.emit('onSetTransition', s, duration);\n };\n s.setWrapperTranslate = function (translate, updateActiveIndex, byController) {\n var x = 0, y = 0, z = 0;\n if (s.isHorizontal()) {\n x = s.rtl ? -translate : translate;\n }\n else {\n y = translate;\n }\n \n if (s.params.roundLengths) {\n x = round(x);\n y = round(y);\n }\n \n if (!s.params.virtualTranslate) {\n if (s.support.transforms3d) s.wrapper.transform('translate3d(' + x + 'px, ' + y + 'px, ' + z + 'px)');\n else s.wrapper.transform('translate(' + x + 'px, ' + y + 'px)');\n }\n \n s.translate = s.isHorizontal() ? x : y;\n \n // Check if we need to update progress\n var progress;\n var translatesDiff = s.maxTranslate() - s.minTranslate();\n if (translatesDiff === 0) {\n progress = 0;\n }\n else {\n progress = (translate - s.minTranslate()) / (translatesDiff);\n }\n if (progress !== s.progress) {\n s.updateProgress(translate);\n }\n \n if (updateActiveIndex) s.updateActiveIndex();\n if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n s.effects[s.params.effect].setTranslate(s.translate);\n }\n if (s.params.parallax && s.parallax) {\n s.parallax.setTranslate(s.translate);\n }\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.setTranslate(s.translate);\n }\n if (s.params.control && s.controller) {\n s.controller.setTranslate(s.translate, byController);\n }\n s.emit('onSetTranslate', s, s.translate);\n };\n \n s.getTranslate = function (el, axis) {\n var matrix, curTransform, curStyle, transformMatrix;\n \n // automatic axis detection\n if (typeof axis === 'undefined') {\n axis = 'x';\n }\n \n if (s.params.virtualTranslate) {\n return s.rtl ? -s.translate : s.translate;\n }\n \n curStyle = window.getComputedStyle(el, null);\n if (window.WebKitCSSMatrix) {\n curTransform = curStyle.transform || curStyle.webkitTransform;\n if (curTransform.split(',').length > 6) {\n curTransform = curTransform.split(', ').map(function(a){\n return a.replace(',','.');\n }).join(', ');\n }\n // Some old versions of Webkit choke when 'none' is passed; pass\n // empty string instead in this case\n transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);\n }\n else {\n transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');\n matrix = transformMatrix.toString().split(',');\n }\n \n if (axis === 'x') {\n //Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix)\n curTransform = transformMatrix.m41;\n //Crazy IE10 Matrix\n else if (matrix.length === 16)\n curTransform = parseFloat(matrix[12]);\n //Normal Browsers\n else\n curTransform = parseFloat(matrix[4]);\n }\n if (axis === 'y') {\n //Latest Chrome and webkits Fix\n if (window.WebKitCSSMatrix)\n curTransform = transformMatrix.m42;\n //Crazy IE10 Matrix\n else if (matrix.length === 16)\n curTransform = parseFloat(matrix[13]);\n //Normal Browsers\n else\n curTransform = parseFloat(matrix[5]);\n }\n if (s.rtl && curTransform) curTransform = -curTransform;\n return curTransform || 0;\n };\n s.getWrapperTranslate = function (axis) {\n if (typeof axis === 'undefined') {\n axis = s.isHorizontal() ? 'x' : 'y';\n }\n return s.getTranslate(s.wrapper[0], axis);\n };\n \n /*=========================\n Observer\n ===========================*/\n s.observers = [];\n function initObserver(target, options) {\n options = options || {};\n // create an observer instance\n var ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;\n var observer = new ObserverFunc(function (mutations) {\n mutations.forEach(function (mutation) {\n s.onResize(true);\n s.emit('onObserverUpdate', s, mutation);\n });\n });\n \n observer.observe(target, {\n attributes: typeof options.attributes === 'undefined' ? true : options.attributes,\n childList: typeof options.childList === 'undefined' ? true : options.childList,\n characterData: typeof options.characterData === 'undefined' ? true : options.characterData\n });\n \n s.observers.push(observer);\n }\n s.initObservers = function () {\n if (s.params.observeParents) {\n var containerParents = s.container.parents();\n for (var i = 0; i < containerParents.length; i++) {\n initObserver(containerParents[i]);\n }\n }\n \n // Observe container\n initObserver(s.container[0], {childList: false});\n \n // Observe wrapper\n initObserver(s.wrapper[0], {attributes: false});\n };\n s.disconnectObservers = function () {\n for (var i = 0; i < s.observers.length; i++) {\n s.observers[i].disconnect();\n }\n s.observers = [];\n };\n /*=========================\n Loop\n ===========================*/\n // Create looped slides\n s.createLoop = function () {\n // Remove duplicated slides\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();\n \n var slides = s.wrapper.children('.' + s.params.slideClass);\n \n if(s.params.slidesPerView === 'auto' && !s.params.loopedSlides) s.params.loopedSlides = slides.length;\n \n s.loopedSlides = parseInt(s.params.loopedSlides || s.params.slidesPerView, 10);\n s.loopedSlides = s.loopedSlides + s.params.loopAdditionalSlides;\n if (s.loopedSlides > slides.length) {\n s.loopedSlides = slides.length;\n }\n \n var prependSlides = [], appendSlides = [], i;\n slides.each(function (index, el) {\n var slide = $(this);\n if (index < s.loopedSlides) appendSlides.push(el);\n if (index < slides.length && index >= slides.length - s.loopedSlides) prependSlides.push(el);\n slide.attr('data-swiper-slide-index', index);\n });\n for (i = 0; i < appendSlides.length; i++) {\n s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));\n }\n for (i = prependSlides.length - 1; i >= 0; i--) {\n s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));\n }\n };\n s.destroyLoop = function () {\n s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();\n s.slides.removeAttr('data-swiper-slide-index');\n };\n s.reLoop = function (updatePosition) {\n var oldIndex = s.activeIndex - s.loopedSlides;\n s.destroyLoop();\n s.createLoop();\n s.updateSlidesSize();\n if (updatePosition) {\n s.slideTo(oldIndex + s.loopedSlides, 0, false);\n }\n \n };\n s.fixLoop = function () {\n var newIndex;\n //Fix For Negative Oversliding\n if (s.activeIndex < s.loopedSlides) {\n newIndex = s.slides.length - s.loopedSlides * 3 + s.activeIndex;\n newIndex = newIndex + s.loopedSlides;\n s.slideTo(newIndex, 0, false, true);\n }\n //Fix For Positive Oversliding\n else if ((s.params.slidesPerView === 'auto' && s.activeIndex >= s.loopedSlides * 2) || (s.activeIndex > s.slides.length - s.params.slidesPerView * 2)) {\n newIndex = -s.slides.length + s.activeIndex + s.loopedSlides;\n newIndex = newIndex + s.loopedSlides;\n s.slideTo(newIndex, 0, false, true);\n }\n };\n /*=========================\n Append/Prepend/Remove Slides\n ===========================*/\n s.appendSlide = function (slides) {\n if (s.params.loop) {\n s.destroyLoop();\n }\n if (typeof slides === 'object' && slides.length) {\n for (var i = 0; i < slides.length; i++) {\n if (slides[i]) s.wrapper.append(slides[i]);\n }\n }\n else {\n s.wrapper.append(slides);\n }\n if (s.params.loop) {\n s.createLoop();\n }\n if (!(s.params.observer && s.support.observer)) {\n s.update(true);\n }\n };\n s.prependSlide = function (slides) {\n if (s.params.loop) {\n s.destroyLoop();\n }\n var newActiveIndex = s.activeIndex + 1;\n if (typeof slides === 'object' && slides.length) {\n for (var i = 0; i < slides.length; i++) {\n if (slides[i]) s.wrapper.prepend(slides[i]);\n }\n newActiveIndex = s.activeIndex + slides.length;\n }\n else {\n s.wrapper.prepend(slides);\n }\n if (s.params.loop) {\n s.createLoop();\n }\n if (!(s.params.observer && s.support.observer)) {\n s.update(true);\n }\n s.slideTo(newActiveIndex, 0, false);\n };\n s.removeSlide = function (slidesIndexes) {\n if (s.params.loop) {\n s.destroyLoop();\n s.slides = s.wrapper.children('.' + s.params.slideClass);\n }\n var newActiveIndex = s.activeIndex,\n indexToRemove;\n if (typeof slidesIndexes === 'object' && slidesIndexes.length) {\n for (var i = 0; i < slidesIndexes.length; i++) {\n indexToRemove = slidesIndexes[i];\n if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex--;\n }\n newActiveIndex = Math.max(newActiveIndex, 0);\n }\n else {\n indexToRemove = slidesIndexes;\n if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove();\n if (indexToRemove < newActiveIndex) newActiveIndex--;\n newActiveIndex = Math.max(newActiveIndex, 0);\n }\n \n if (s.params.loop) {\n s.createLoop();\n }\n \n if (!(s.params.observer && s.support.observer)) {\n s.update(true);\n }\n if (s.params.loop) {\n s.slideTo(newActiveIndex + s.loopedSlides, 0, false);\n }\n else {\n s.slideTo(newActiveIndex, 0, false);\n }\n \n };\n s.removeAllSlides = function () {\n var slidesIndexes = [];\n for (var i = 0; i < s.slides.length; i++) {\n slidesIndexes.push(i);\n }\n s.removeSlide(slidesIndexes);\n };\n \n \n /*=========================\n Effects\n ===========================*/\n s.effects = {\n fade: {\n setTranslate: function () {\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides.eq(i);\n var offset = slide[0].swiperSlideOffset;\n var tx = -offset;\n if (!s.params.virtualTranslate) tx = tx - s.translate;\n var ty = 0;\n if (!s.isHorizontal()) {\n ty = tx;\n tx = 0;\n }\n var slideOpacity = s.params.fade.crossFade ?\n Math.max(1 - Math.abs(slide[0].progress), 0) :\n 1 + Math.min(Math.max(slide[0].progress, -1), 0);\n slide\n .css({\n opacity: slideOpacity\n })\n .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)');\n \n }\n \n },\n setTransition: function (duration) {\n s.slides.transition(duration);\n if (s.params.virtualTranslate && duration !== 0) {\n var eventTriggered = false;\n s.slides.transitionEnd(function () {\n if (eventTriggered) return;\n if (!s) return;\n eventTriggered = true;\n s.animating = false;\n var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];\n for (var i = 0; i < triggerEvents.length; i++) {\n s.wrapper.trigger(triggerEvents[i]);\n }\n });\n }\n }\n },\n flip: {\n setTranslate: function () {\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides.eq(i);\n var progress = slide[0].progress;\n if (s.params.flip.limitRotation) {\n progress = Math.max(Math.min(slide[0].progress, 1), -1);\n }\n var offset = slide[0].swiperSlideOffset;\n var rotate = -180 * progress,\n rotateY = rotate,\n rotateX = 0,\n tx = -offset,\n ty = 0;\n if (!s.isHorizontal()) {\n ty = tx;\n tx = 0;\n rotateX = -rotateY;\n rotateY = 0;\n }\n else if (s.rtl) {\n rotateY = -rotateY;\n }\n \n slide[0].style.zIndex = -Math.abs(Math.round(progress)) + s.slides.length;\n \n if (s.params.flip.slideShadows) {\n //Set shadows\n var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = $('
                                              ');\n slide.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = $('
                                              ');\n slide.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n \n slide\n .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)');\n }\n },\n setTransition: function (duration) {\n s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n if (s.params.virtualTranslate && duration !== 0) {\n var eventTriggered = false;\n s.slides.eq(s.activeIndex).transitionEnd(function () {\n if (eventTriggered) return;\n if (!s) return;\n if (!$(this).hasClass(s.params.slideActiveClass)) return;\n eventTriggered = true;\n s.animating = false;\n var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd'];\n for (var i = 0; i < triggerEvents.length; i++) {\n s.wrapper.trigger(triggerEvents[i]);\n }\n });\n }\n }\n },\n cube: {\n setTranslate: function () {\n var wrapperRotate = 0, cubeShadow;\n if (s.params.cube.shadow) {\n if (s.isHorizontal()) {\n cubeShadow = s.wrapper.find('.swiper-cube-shadow');\n if (cubeShadow.length === 0) {\n cubeShadow = $('
                                              ');\n s.wrapper.append(cubeShadow);\n }\n cubeShadow.css({height: s.width + 'px'});\n }\n else {\n cubeShadow = s.container.find('.swiper-cube-shadow');\n if (cubeShadow.length === 0) {\n cubeShadow = $('
                                              ');\n s.container.append(cubeShadow);\n }\n }\n }\n for (var i = 0; i < s.slides.length; i++) {\n var slide = s.slides.eq(i);\n var slideAngle = i * 90;\n var round = Math.floor(slideAngle / 360);\n if (s.rtl) {\n slideAngle = -slideAngle;\n round = Math.floor(-slideAngle / 360);\n }\n var progress = Math.max(Math.min(slide[0].progress, 1), -1);\n var tx = 0, ty = 0, tz = 0;\n if (i % 4 === 0) {\n tx = - round * 4 * s.size;\n tz = 0;\n }\n else if ((i - 1) % 4 === 0) {\n tx = 0;\n tz = - round * 4 * s.size;\n }\n else if ((i - 2) % 4 === 0) {\n tx = s.size + round * 4 * s.size;\n tz = s.size;\n }\n else if ((i - 3) % 4 === 0) {\n tx = - s.size;\n tz = 3 * s.size + s.size * 4 * round;\n }\n if (s.rtl) {\n tx = -tx;\n }\n \n if (!s.isHorizontal()) {\n ty = tx;\n tx = 0;\n }\n \n var transform = 'rotateX(' + (s.isHorizontal() ? 0 : -slideAngle) + 'deg) rotateY(' + (s.isHorizontal() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)';\n if (progress <= 1 && progress > -1) {\n wrapperRotate = i * 90 + progress * 90;\n if (s.rtl) wrapperRotate = -i * 90 - progress * 90;\n }\n slide.transform(transform);\n if (s.params.cube.slideShadows) {\n //Set shadows\n var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = $('
                                              ');\n slide.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = $('
                                              ');\n slide.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);\n if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);\n }\n }\n s.wrapper.css({\n '-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n '-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n '-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px',\n 'transform-origin': '50% 50% -' + (s.size / 2) + 'px'\n });\n \n if (s.params.cube.shadow) {\n if (s.isHorizontal()) {\n cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')');\n }\n else {\n var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;\n var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);\n var scale1 = s.params.cube.shadowScale,\n scale2 = s.params.cube.shadowScale / multiplier,\n offset = s.params.cube.shadowOffset;\n cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)');\n }\n }\n var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0;\n s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (s.isHorizontal() ? 0 : wrapperRotate) + 'deg) rotateY(' + (s.isHorizontal() ? -wrapperRotate : 0) + 'deg)');\n },\n setTransition: function (duration) {\n s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n if (s.params.cube.shadow && !s.isHorizontal()) {\n s.container.find('.swiper-cube-shadow').transition(duration);\n }\n }\n },\n coverflow: {\n setTranslate: function () {\n var transform = s.translate;\n var center = s.isHorizontal() ? -transform + s.width / 2 : -transform + s.height / 2;\n var rotate = s.isHorizontal() ? s.params.coverflow.rotate: -s.params.coverflow.rotate;\n var translate = s.params.coverflow.depth;\n //Each slide offset from center\n for (var i = 0, length = s.slides.length; i < length; i++) {\n var slide = s.slides.eq(i);\n var slideSize = s.slidesSizesGrid[i];\n var slideOffset = slide[0].swiperSlideOffset;\n var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier;\n \n var rotateY = s.isHorizontal() ? rotate * offsetMultiplier : 0;\n var rotateX = s.isHorizontal() ? 0 : rotate * offsetMultiplier;\n // var rotateZ = 0\n var translateZ = -translate * Math.abs(offsetMultiplier);\n \n var translateY = s.isHorizontal() ? 0 : s.params.coverflow.stretch * (offsetMultiplier);\n var translateX = s.isHorizontal() ? s.params.coverflow.stretch * (offsetMultiplier) : 0;\n \n //Fix for ultra small values\n if (Math.abs(translateX) < 0.001) translateX = 0;\n if (Math.abs(translateY) < 0.001) translateY = 0;\n if (Math.abs(translateZ) < 0.001) translateZ = 0;\n if (Math.abs(rotateY) < 0.001) rotateY = 0;\n if (Math.abs(rotateX) < 0.001) rotateX = 0;\n \n var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)';\n \n slide.transform(slideTransform);\n slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;\n if (s.params.coverflow.slideShadows) {\n //Set shadows\n var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top');\n var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom');\n if (shadowBefore.length === 0) {\n shadowBefore = $('
                                              ');\n slide.append(shadowBefore);\n }\n if (shadowAfter.length === 0) {\n shadowAfter = $('
                                              ');\n slide.append(shadowAfter);\n }\n if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;\n if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;\n }\n }\n \n //Set correct perspective for IE10\n if (s.browser.ie) {\n var ws = s.wrapper[0].style;\n ws.perspectiveOrigin = center + 'px 50%';\n }\n },\n setTransition: function (duration) {\n s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration);\n }\n }\n };\n \n \n /*=========================\n Images Lazy Loading\n ===========================*/\n s.lazy = {\n initialImageLoaded: false,\n loadImageInSlide: function (index, loadInDuplicate) {\n if (typeof index === 'undefined') return;\n if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true;\n if (s.slides.length === 0) return;\n \n var slide = s.slides.eq(index);\n var img = slide.find('.' + s.params.lazyLoadingClass + ':not(.' + s.params.lazyStatusLoadedClass + '):not(.' + s.params.lazyStatusLoadingClass + ')');\n if (slide.hasClass(s.params.lazyLoadingClass) && !slide.hasClass(s.params.lazyStatusLoadedClass) && !slide.hasClass(s.params.lazyStatusLoadingClass)) {\n img = img.add(slide[0]);\n }\n if (img.length === 0) return;\n \n img.each(function () {\n var _img = $(this);\n _img.addClass(s.params.lazyStatusLoadingClass);\n var background = _img.attr('data-background');\n var src = _img.attr('data-src'),\n srcset = _img.attr('data-srcset'),\n sizes = _img.attr('data-sizes');\n s.loadImage(_img[0], (src || background), srcset, sizes, false, function () {\n if (typeof s === 'undefined' || s === null || !s) return;\n if (background) {\n _img.css('background-image', 'url(\"' + background + '\")');\n _img.removeAttr('data-background');\n }\n else {\n if (srcset) {\n _img.attr('srcset', srcset);\n _img.removeAttr('data-srcset');\n }\n if (sizes) {\n _img.attr('sizes', sizes);\n _img.removeAttr('data-sizes');\n }\n if (src) {\n _img.attr('src', src);\n _img.removeAttr('data-src');\n }\n \n }\n \n _img.addClass(s.params.lazyStatusLoadedClass).removeClass(s.params.lazyStatusLoadingClass);\n slide.find('.' + s.params.lazyPreloaderClass + ', .' + s.params.preloaderClass).remove();\n if (s.params.loop && loadInDuplicate) {\n var slideOriginalIndex = slide.attr('data-swiper-slide-index');\n if (slide.hasClass(s.params.slideDuplicateClass)) {\n var originalSlide = s.wrapper.children('[data-swiper-slide-index=\"' + slideOriginalIndex + '\"]:not(.' + s.params.slideDuplicateClass + ')');\n s.lazy.loadImageInSlide(originalSlide.index(), false);\n }\n else {\n var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index=\"' + slideOriginalIndex + '\"]');\n s.lazy.loadImageInSlide(duplicatedSlide.index(), false);\n }\n }\n s.emit('onLazyImageReady', s, slide[0], _img[0]);\n });\n \n s.emit('onLazyImageLoad', s, slide[0], _img[0]);\n });\n \n },\n load: function () {\n var i;\n var slidesPerView = s.params.slidesPerView;\n if (slidesPerView === 'auto') {\n slidesPerView = 0;\n }\n if (!s.lazy.initialImageLoaded) s.lazy.initialImageLoaded = true;\n if (s.params.watchSlidesVisibility) {\n s.wrapper.children('.' + s.params.slideVisibleClass).each(function () {\n s.lazy.loadImageInSlide($(this).index());\n });\n }\n else {\n if (slidesPerView > 1) {\n for (i = s.activeIndex; i < s.activeIndex + slidesPerView ; i++) {\n if (s.slides[i]) s.lazy.loadImageInSlide(i);\n }\n }\n else {\n s.lazy.loadImageInSlide(s.activeIndex);\n }\n }\n if (s.params.lazyLoadingInPrevNext) {\n if (slidesPerView > 1 || (s.params.lazyLoadingInPrevNextAmount && s.params.lazyLoadingInPrevNextAmount > 1)) {\n var amount = s.params.lazyLoadingInPrevNextAmount;\n var spv = slidesPerView;\n var maxIndex = Math.min(s.activeIndex + spv + Math.max(amount, spv), s.slides.length);\n var minIndex = Math.max(s.activeIndex - Math.max(spv, amount), 0);\n // Next Slides\n for (i = s.activeIndex + slidesPerView; i < maxIndex; i++) {\n if (s.slides[i]) s.lazy.loadImageInSlide(i);\n }\n // Prev Slides\n for (i = minIndex; i < s.activeIndex ; i++) {\n if (s.slides[i]) s.lazy.loadImageInSlide(i);\n }\n }\n else {\n var nextSlide = s.wrapper.children('.' + s.params.slideNextClass);\n if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index());\n \n var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass);\n if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index());\n }\n }\n },\n onTransitionStart: function () {\n if (s.params.lazyLoading) {\n if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) {\n s.lazy.load();\n }\n }\n },\n onTransitionEnd: function () {\n if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) {\n s.lazy.load();\n }\n }\n };\n \n \n /*=========================\n Scrollbar\n ===========================*/\n s.scrollbar = {\n isTouched: false,\n setDragPosition: function (e) {\n var sb = s.scrollbar;\n var x = 0, y = 0;\n var translate;\n var pointerPosition = s.isHorizontal() ?\n ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) :\n ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ;\n var position = (pointerPosition) - sb.track.offset()[s.isHorizontal() ? 'left' : 'top'] - sb.dragSize / 2;\n var positionMin = -s.minTranslate() * sb.moveDivider;\n var positionMax = -s.maxTranslate() * sb.moveDivider;\n if (position < positionMin) {\n position = positionMin;\n }\n else if (position > positionMax) {\n position = positionMax;\n }\n position = -position / sb.moveDivider;\n s.updateProgress(position);\n s.setWrapperTranslate(position, true);\n },\n dragStart: function (e) {\n var sb = s.scrollbar;\n sb.isTouched = true;\n e.preventDefault();\n e.stopPropagation();\n \n sb.setDragPosition(e);\n clearTimeout(sb.dragTimeout);\n \n sb.track.transition(0);\n if (s.params.scrollbarHide) {\n sb.track.css('opacity', 1);\n }\n s.wrapper.transition(100);\n sb.drag.transition(100);\n s.emit('onScrollbarDragStart', s);\n },\n dragMove: function (e) {\n var sb = s.scrollbar;\n if (!sb.isTouched) return;\n if (e.preventDefault) e.preventDefault();\n else e.returnValue = false;\n sb.setDragPosition(e);\n s.wrapper.transition(0);\n sb.track.transition(0);\n sb.drag.transition(0);\n s.emit('onScrollbarDragMove', s);\n },\n dragEnd: function (e) {\n var sb = s.scrollbar;\n if (!sb.isTouched) return;\n sb.isTouched = false;\n if (s.params.scrollbarHide) {\n clearTimeout(sb.dragTimeout);\n sb.dragTimeout = setTimeout(function () {\n sb.track.css('opacity', 0);\n sb.track.transition(400);\n }, 1000);\n \n }\n s.emit('onScrollbarDragEnd', s);\n if (s.params.scrollbarSnapOnRelease) {\n s.slideReset();\n }\n },\n draggableEvents: (function () {\n if ((s.params.simulateTouch === false && !s.support.touch)) return s.touchEventsDesktop;\n else return s.touchEvents;\n })(),\n enableDraggable: function () {\n var sb = s.scrollbar;\n var target = s.support.touch ? sb.track : document;\n $(sb.track).on(sb.draggableEvents.start, sb.dragStart);\n $(target).on(sb.draggableEvents.move, sb.dragMove);\n $(target).on(sb.draggableEvents.end, sb.dragEnd);\n },\n disableDraggable: function () {\n var sb = s.scrollbar;\n var target = s.support.touch ? sb.track : document;\n $(sb.track).off(sb.draggableEvents.start, sb.dragStart);\n $(target).off(sb.draggableEvents.move, sb.dragMove);\n $(target).off(sb.draggableEvents.end, sb.dragEnd);\n },\n set: function () {\n if (!s.params.scrollbar) return;\n var sb = s.scrollbar;\n sb.track = $(s.params.scrollbar);\n if (s.params.uniqueNavElements && typeof s.params.scrollbar === 'string' && sb.track.length > 1 && s.container.find(s.params.scrollbar).length === 1) {\n sb.track = s.container.find(s.params.scrollbar);\n }\n sb.drag = sb.track.find('.swiper-scrollbar-drag');\n if (sb.drag.length === 0) {\n sb.drag = $('
                                              ');\n sb.track.append(sb.drag);\n }\n sb.drag[0].style.width = '';\n sb.drag[0].style.height = '';\n sb.trackSize = s.isHorizontal() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight;\n \n sb.divider = s.size / s.virtualSize;\n sb.moveDivider = sb.divider * (sb.trackSize / s.size);\n sb.dragSize = sb.trackSize * sb.divider;\n \n if (s.isHorizontal()) {\n sb.drag[0].style.width = sb.dragSize + 'px';\n }\n else {\n sb.drag[0].style.height = sb.dragSize + 'px';\n }\n \n if (sb.divider >= 1) {\n sb.track[0].style.display = 'none';\n }\n else {\n sb.track[0].style.display = '';\n }\n if (s.params.scrollbarHide) {\n sb.track[0].style.opacity = 0;\n }\n },\n setTranslate: function () {\n if (!s.params.scrollbar) return;\n var diff;\n var sb = s.scrollbar;\n var translate = s.translate || 0;\n var newPos;\n \n var newSize = sb.dragSize;\n newPos = (sb.trackSize - sb.dragSize) * s.progress;\n if (s.rtl && s.isHorizontal()) {\n newPos = -newPos;\n if (newPos > 0) {\n newSize = sb.dragSize - newPos;\n newPos = 0;\n }\n else if (-newPos + sb.dragSize > sb.trackSize) {\n newSize = sb.trackSize + newPos;\n }\n }\n else {\n if (newPos < 0) {\n newSize = sb.dragSize + newPos;\n newPos = 0;\n }\n else if (newPos + sb.dragSize > sb.trackSize) {\n newSize = sb.trackSize - newPos;\n }\n }\n if (s.isHorizontal()) {\n if (s.support.transforms3d) {\n sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)');\n }\n else {\n sb.drag.transform('translateX(' + (newPos) + 'px)');\n }\n sb.drag[0].style.width = newSize + 'px';\n }\n else {\n if (s.support.transforms3d) {\n sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)');\n }\n else {\n sb.drag.transform('translateY(' + (newPos) + 'px)');\n }\n sb.drag[0].style.height = newSize + 'px';\n }\n if (s.params.scrollbarHide) {\n clearTimeout(sb.timeout);\n sb.track[0].style.opacity = 1;\n sb.timeout = setTimeout(function () {\n sb.track[0].style.opacity = 0;\n sb.track.transition(400);\n }, 1000);\n }\n },\n setTransition: function (duration) {\n if (!s.params.scrollbar) return;\n s.scrollbar.drag.transition(duration);\n }\n };\n \n \n /*=========================\n Controller\n ===========================*/\n s.controller = {\n LinearSpline: function (x, y) {\n var binarySearch = (function() {\n var maxIndex, minIndex, guess;\n return function(array, val) {\n minIndex = -1;\n maxIndex = array.length;\n while (maxIndex - minIndex > 1)\n if (array[guess = maxIndex + minIndex >> 1] <= val) {\n minIndex = guess;\n } else {\n maxIndex = guess;\n }\n return maxIndex;\n };\n })();\n this.x = x;\n this.y = y;\n this.lastIndex = x.length - 1;\n // Given an x value (x2), return the expected y2 value:\n // (x1,y1) is the known point before given value,\n // (x3,y3) is the known point after given value.\n var i1, i3;\n var l = this.x.length;\n \n this.interpolate = function (x2) {\n if (!x2) return 0;\n \n // Get the indexes of x1 and x3 (the array indexes before and after given x2):\n i3 = binarySearch(this.x, x2);\n i1 = i3 - 1;\n \n // We have our indexes i1 & i3, so we can calculate already:\n // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1\n return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1];\n };\n },\n //xxx: for now i will just save one spline function to to\n getInterpolateFunction: function(c){\n if(!s.controller.spline) s.controller.spline = s.params.loop ?\n new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) :\n new s.controller.LinearSpline(s.snapGrid, c.snapGrid);\n },\n setTranslate: function (translate, byController) {\n var controlled = s.params.control;\n var multiplier, controlledTranslate;\n function setControlledTranslate(c) {\n // this will create an Interpolate function based on the snapGrids\n // x is the Grid of the scrolled scroller and y will be the controlled scroller\n // it makes sense to create this only once and recall it for the interpolation\n // the function does a lot of value caching for performance\n translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate;\n if (s.params.controlBy === 'slide') {\n s.controller.getInterpolateFunction(c);\n // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid\n // but it did not work out\n controlledTranslate = -s.controller.spline.interpolate(-translate);\n }\n \n if(!controlledTranslate || s.params.controlBy === 'container'){\n multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate());\n controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate();\n }\n \n if (s.params.controlInverse) {\n controlledTranslate = c.maxTranslate() - controlledTranslate;\n }\n c.updateProgress(controlledTranslate);\n c.setWrapperTranslate(controlledTranslate, false, s);\n c.updateActiveIndex();\n }\n if (Array.isArray(controlled)) {\n for (var i = 0; i < controlled.length; i++) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTranslate(controlled[i]);\n }\n }\n }\n else if (controlled instanceof Swiper && byController !== controlled) {\n \n setControlledTranslate(controlled);\n }\n },\n setTransition: function (duration, byController) {\n var controlled = s.params.control;\n var i;\n function setControlledTransition(c) {\n c.setWrapperTransition(duration, s);\n if (duration !== 0) {\n c.onTransitionStart();\n c.wrapper.transitionEnd(function(){\n if (!controlled) return;\n if (c.params.loop && s.params.controlBy === 'slide') {\n c.fixLoop();\n }\n c.onTransitionEnd();\n \n });\n }\n }\n if (Array.isArray(controlled)) {\n for (i = 0; i < controlled.length; i++) {\n if (controlled[i] !== byController && controlled[i] instanceof Swiper) {\n setControlledTransition(controlled[i]);\n }\n }\n }\n else if (controlled instanceof Swiper && byController !== controlled) {\n setControlledTransition(controlled);\n }\n }\n };\n \n \n /*=========================\n Parallax\n ===========================*/\n function setParallaxTransform(el, progress) {\n el = $(el);\n var p, pX, pY;\n var rtlFactor = s.rtl ? -1 : 1;\n \n p = el.attr('data-swiper-parallax') || '0';\n pX = el.attr('data-swiper-parallax-x');\n pY = el.attr('data-swiper-parallax-y');\n if (pX || pY) {\n pX = pX || '0';\n pY = pY || '0';\n }\n else {\n if (s.isHorizontal()) {\n pX = p;\n pY = '0';\n }\n else {\n pY = p;\n pX = '0';\n }\n }\n \n if ((pX).indexOf('%') >= 0) {\n pX = parseInt(pX, 10) * progress * rtlFactor + '%';\n }\n else {\n pX = pX * progress * rtlFactor + 'px' ;\n }\n if ((pY).indexOf('%') >= 0) {\n pY = parseInt(pY, 10) * progress + '%';\n }\n else {\n pY = pY * progress + 'px' ;\n }\n \n el.transform('translate3d(' + pX + ', ' + pY + ',0px)');\n }\n s.parallax = {\n setTranslate: function () {\n s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){\n setParallaxTransform(this, s.progress);\n \n });\n s.slides.each(function () {\n var slide = $(this);\n slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () {\n var progress = Math.min(Math.max(slide[0].progress, -1), 1);\n setParallaxTransform(this, progress);\n });\n });\n },\n setTransition: function (duration) {\n if (typeof duration === 'undefined') duration = s.params.speed;\n s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){\n var el = $(this);\n var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration;\n if (duration === 0) parallaxDuration = 0;\n el.transition(parallaxDuration);\n });\n }\n };\n \n \n /*=========================\n Zoom\n ===========================*/\n s.zoom = {\n // \"Global\" Props\n scale: 1,\n currentScale: 1,\n isScaling: false,\n gesture: {\n slide: undefined,\n slideWidth: undefined,\n slideHeight: undefined,\n image: undefined,\n imageWrap: undefined,\n zoomMax: s.params.zoomMax\n },\n image: {\n isTouched: undefined,\n isMoved: undefined,\n currentX: undefined,\n currentY: undefined,\n minX: undefined,\n minY: undefined,\n maxX: undefined,\n maxY: undefined,\n width: undefined,\n height: undefined,\n startX: undefined,\n startY: undefined,\n touchesStart: {},\n touchesCurrent: {}\n },\n velocity: {\n x: undefined,\n y: undefined,\n prevPositionX: undefined,\n prevPositionY: undefined,\n prevTime: undefined\n },\n // Calc Scale From Multi-touches\n getDistanceBetweenTouches: function (e) {\n if (e.targetTouches.length < 2) return 1;\n var x1 = e.targetTouches[0].pageX,\n y1 = e.targetTouches[0].pageY,\n x2 = e.targetTouches[1].pageX,\n y2 = e.targetTouches[1].pageY;\n var distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n return distance;\n },\n // Events\n onGestureStart: function (e) {\n var z = s.zoom;\n if (!s.support.gestures) {\n if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) {\n return;\n }\n z.gesture.scaleStart = z.getDistanceBetweenTouches(e);\n }\n if (!z.gesture.slide || !z.gesture.slide.length) {\n z.gesture.slide = $(this);\n if (z.gesture.slide.length === 0) z.gesture.slide = s.slides.eq(s.activeIndex);\n z.gesture.image = z.gesture.slide.find('img, svg, canvas');\n z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass);\n z.gesture.zoomMax = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax ;\n if (z.gesture.imageWrap.length === 0) {\n z.gesture.image = undefined;\n return;\n }\n }\n z.gesture.image.transition(0);\n z.isScaling = true;\n },\n onGestureChange: function (e) {\n var z = s.zoom;\n if (!s.support.gestures) {\n if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) {\n return;\n }\n z.gesture.scaleMove = z.getDistanceBetweenTouches(e);\n }\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n if (s.support.gestures) {\n z.scale = e.scale * z.currentScale;\n }\n else {\n z.scale = (z.gesture.scaleMove / z.gesture.scaleStart) * z.currentScale;\n }\n if (z.scale > z.gesture.zoomMax) {\n z.scale = z.gesture.zoomMax - 1 + Math.pow((z.scale - z.gesture.zoomMax + 1), 0.5);\n }\n if (z.scale < s.params.zoomMin) {\n z.scale = s.params.zoomMin + 1 - Math.pow((s.params.zoomMin - z.scale + 1), 0.5);\n }\n z.gesture.image.transform('translate3d(0,0,0) scale(' + z.scale + ')');\n },\n onGestureEnd: function (e) {\n var z = s.zoom;\n if (!s.support.gestures) {\n if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2) {\n return;\n }\n }\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n z.scale = Math.max(Math.min(z.scale, z.gesture.zoomMax), s.params.zoomMin);\n z.gesture.image.transition(s.params.speed).transform('translate3d(0,0,0) scale(' + z.scale + ')');\n z.currentScale = z.scale;\n z.isScaling = false;\n if (z.scale === 1) z.gesture.slide = undefined;\n },\n onTouchStart: function (s, e) {\n var z = s.zoom;\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n if (z.image.isTouched) return;\n if (s.device.os === 'android') e.preventDefault();\n z.image.isTouched = true;\n z.image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;\n z.image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;\n },\n onTouchMove: function (e) {\n var z = s.zoom;\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n s.allowClick = false;\n if (!z.image.isTouched || !z.gesture.slide) return;\n \n if (!z.image.isMoved) {\n z.image.width = z.gesture.image[0].offsetWidth;\n z.image.height = z.gesture.image[0].offsetHeight;\n z.image.startX = s.getTranslate(z.gesture.imageWrap[0], 'x') || 0;\n z.image.startY = s.getTranslate(z.gesture.imageWrap[0], 'y') || 0;\n z.gesture.slideWidth = z.gesture.slide[0].offsetWidth;\n z.gesture.slideHeight = z.gesture.slide[0].offsetHeight;\n z.gesture.imageWrap.transition(0);\n if (s.rtl) z.image.startX = -z.image.startX;\n if (s.rtl) z.image.startY = -z.image.startY;\n }\n // Define if we need image drag\n var scaledWidth = z.image.width * z.scale;\n var scaledHeight = z.image.height * z.scale;\n \n if (scaledWidth < z.gesture.slideWidth && scaledHeight < z.gesture.slideHeight) return;\n \n z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0);\n z.image.maxX = -z.image.minX;\n z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0);\n z.image.maxY = -z.image.minY;\n \n z.image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;\n z.image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;\n \n if (!z.image.isMoved && !z.isScaling) {\n if (s.isHorizontal() &&\n (Math.floor(z.image.minX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x < z.image.touchesStart.x) ||\n (Math.floor(z.image.maxX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x > z.image.touchesStart.x)\n ) {\n z.image.isTouched = false;\n return;\n }\n else if (!s.isHorizontal() &&\n (Math.floor(z.image.minY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y < z.image.touchesStart.y) ||\n (Math.floor(z.image.maxY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y > z.image.touchesStart.y)\n ) {\n z.image.isTouched = false;\n return;\n }\n }\n e.preventDefault();\n e.stopPropagation();\n \n z.image.isMoved = true;\n z.image.currentX = z.image.touchesCurrent.x - z.image.touchesStart.x + z.image.startX;\n z.image.currentY = z.image.touchesCurrent.y - z.image.touchesStart.y + z.image.startY;\n \n if (z.image.currentX < z.image.minX) {\n z.image.currentX = z.image.minX + 1 - Math.pow((z.image.minX - z.image.currentX + 1), 0.8);\n }\n if (z.image.currentX > z.image.maxX) {\n z.image.currentX = z.image.maxX - 1 + Math.pow((z.image.currentX - z.image.maxX + 1), 0.8);\n }\n \n if (z.image.currentY < z.image.minY) {\n z.image.currentY = z.image.minY + 1 - Math.pow((z.image.minY - z.image.currentY + 1), 0.8);\n }\n if (z.image.currentY > z.image.maxY) {\n z.image.currentY = z.image.maxY - 1 + Math.pow((z.image.currentY - z.image.maxY + 1), 0.8);\n }\n \n //Velocity\n if (!z.velocity.prevPositionX) z.velocity.prevPositionX = z.image.touchesCurrent.x;\n if (!z.velocity.prevPositionY) z.velocity.prevPositionY = z.image.touchesCurrent.y;\n if (!z.velocity.prevTime) z.velocity.prevTime = Date.now();\n z.velocity.x = (z.image.touchesCurrent.x - z.velocity.prevPositionX) / (Date.now() - z.velocity.prevTime) / 2;\n z.velocity.y = (z.image.touchesCurrent.y - z.velocity.prevPositionY) / (Date.now() - z.velocity.prevTime) / 2;\n if (Math.abs(z.image.touchesCurrent.x - z.velocity.prevPositionX) < 2) z.velocity.x = 0;\n if (Math.abs(z.image.touchesCurrent.y - z.velocity.prevPositionY) < 2) z.velocity.y = 0;\n z.velocity.prevPositionX = z.image.touchesCurrent.x;\n z.velocity.prevPositionY = z.image.touchesCurrent.y;\n z.velocity.prevTime = Date.now();\n \n z.gesture.imageWrap.transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)');\n },\n onTouchEnd: function (s, e) {\n var z = s.zoom;\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n if (!z.image.isTouched || !z.image.isMoved) {\n z.image.isTouched = false;\n z.image.isMoved = false;\n return;\n }\n z.image.isTouched = false;\n z.image.isMoved = false;\n var momentumDurationX = 300;\n var momentumDurationY = 300;\n var momentumDistanceX = z.velocity.x * momentumDurationX;\n var newPositionX = z.image.currentX + momentumDistanceX;\n var momentumDistanceY = z.velocity.y * momentumDurationY;\n var newPositionY = z.image.currentY + momentumDistanceY;\n \n //Fix duration\n if (z.velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - z.image.currentX) / z.velocity.x);\n if (z.velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - z.image.currentY) / z.velocity.y);\n var momentumDuration = Math.max(momentumDurationX, momentumDurationY);\n \n z.image.currentX = newPositionX;\n z.image.currentY = newPositionY;\n \n // Define if we need image drag\n var scaledWidth = z.image.width * z.scale;\n var scaledHeight = z.image.height * z.scale;\n z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0);\n z.image.maxX = -z.image.minX;\n z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0);\n z.image.maxY = -z.image.minY;\n z.image.currentX = Math.max(Math.min(z.image.currentX, z.image.maxX), z.image.minX);\n z.image.currentY = Math.max(Math.min(z.image.currentY, z.image.maxY), z.image.minY);\n \n z.gesture.imageWrap.transition(momentumDuration).transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)');\n },\n onTransitionEnd: function (s) {\n var z = s.zoom;\n if (z.gesture.slide && s.previousIndex !== s.activeIndex) {\n z.gesture.image.transform('translate3d(0,0,0) scale(1)');\n z.gesture.imageWrap.transform('translate3d(0,0,0)');\n z.gesture.slide = z.gesture.image = z.gesture.imageWrap = undefined;\n z.scale = z.currentScale = 1;\n }\n },\n // Toggle Zoom\n toggleZoom: function (s, e) {\n var z = s.zoom;\n if (!z.gesture.slide) {\n z.gesture.slide = s.clickedSlide ? $(s.clickedSlide) : s.slides.eq(s.activeIndex);\n z.gesture.image = z.gesture.slide.find('img, svg, canvas');\n z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass);\n }\n if (!z.gesture.image || z.gesture.image.length === 0) return;\n \n var touchX, touchY, offsetX, offsetY, diffX, diffY, translateX, translateY, imageWidth, imageHeight, scaledWidth, scaledHeight, translateMinX, translateMinY, translateMaxX, translateMaxY, slideWidth, slideHeight;\n \n if (typeof z.image.touchesStart.x === 'undefined' && e) {\n touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;\n touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;\n }\n else {\n touchX = z.image.touchesStart.x;\n touchY = z.image.touchesStart.y;\n }\n \n if (z.scale && z.scale !== 1) {\n // Zoom Out\n z.scale = z.currentScale = 1;\n z.gesture.imageWrap.transition(300).transform('translate3d(0,0,0)');\n z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(1)');\n z.gesture.slide = undefined;\n }\n else {\n // Zoom In\n z.scale = z.currentScale = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax;\n if (e) {\n slideWidth = z.gesture.slide[0].offsetWidth;\n slideHeight = z.gesture.slide[0].offsetHeight;\n offsetX = z.gesture.slide.offset().left;\n offsetY = z.gesture.slide.offset().top;\n diffX = offsetX + slideWidth/2 - touchX;\n diffY = offsetY + slideHeight/2 - touchY;\n \n imageWidth = z.gesture.image[0].offsetWidth;\n imageHeight = z.gesture.image[0].offsetHeight;\n scaledWidth = imageWidth * z.scale;\n scaledHeight = imageHeight * z.scale;\n \n translateMinX = Math.min((slideWidth / 2 - scaledWidth / 2), 0);\n translateMinY = Math.min((slideHeight / 2 - scaledHeight / 2), 0);\n translateMaxX = -translateMinX;\n translateMaxY = -translateMinY;\n \n translateX = diffX * z.scale;\n translateY = diffY * z.scale;\n \n if (translateX < translateMinX) {\n translateX = translateMinX;\n }\n if (translateX > translateMaxX) {\n translateX = translateMaxX;\n }\n \n if (translateY < translateMinY) {\n translateY = translateMinY;\n }\n if (translateY > translateMaxY) {\n translateY = translateMaxY;\n }\n }\n else {\n translateX = 0;\n translateY = 0;\n }\n z.gesture.imageWrap.transition(300).transform('translate3d(' + translateX + 'px, ' + translateY + 'px,0)');\n z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(' + z.scale + ')');\n }\n },\n // Attach/Detach Events\n attachEvents: function (detach) {\n var action = detach ? 'off' : 'on';\n \n if (s.params.zoom) {\n var target = s.slides;\n var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false;\n // Scale image\n if (s.support.gestures) {\n s.slides[action]('gesturestart', s.zoom.onGestureStart, passiveListener);\n s.slides[action]('gesturechange', s.zoom.onGestureChange, passiveListener);\n s.slides[action]('gestureend', s.zoom.onGestureEnd, passiveListener);\n }\n else if (s.touchEvents.start === 'touchstart') {\n s.slides[action](s.touchEvents.start, s.zoom.onGestureStart, passiveListener);\n s.slides[action](s.touchEvents.move, s.zoom.onGestureChange, passiveListener);\n s.slides[action](s.touchEvents.end, s.zoom.onGestureEnd, passiveListener);\n }\n \n // Move image\n s[action]('touchStart', s.zoom.onTouchStart);\n s.slides.each(function (index, slide){\n if ($(slide).find('.' + s.params.zoomContainerClass).length > 0) {\n $(slide)[action](s.touchEvents.move, s.zoom.onTouchMove);\n }\n });\n s[action]('touchEnd', s.zoom.onTouchEnd);\n \n // Scale Out\n s[action]('transitionEnd', s.zoom.onTransitionEnd);\n if (s.params.zoomToggle) {\n s.on('doubleTap', s.zoom.toggleZoom);\n }\n }\n },\n init: function () {\n s.zoom.attachEvents();\n },\n destroy: function () {\n s.zoom.attachEvents(true);\n }\n };\n \n \n /*=========================\n Plugins API. Collect all and init all plugins\n ===========================*/\n s._plugins = [];\n for (var plugin in s.plugins) {\n var p = s.plugins[plugin](s, s.params[plugin]);\n if (p) s._plugins.push(p);\n }\n // Method to call all plugins event/method\n s.callPlugins = function (eventName) {\n for (var i = 0; i < s._plugins.length; i++) {\n if (eventName in s._plugins[i]) {\n s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n }\n };\n \n \n /*=========================\n Events/Callbacks/Plugins Emitter\n ===========================*/\n function normalizeEventName (eventName) {\n if (eventName.indexOf('on') !== 0) {\n if (eventName[0] !== eventName[0].toUpperCase()) {\n eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1);\n }\n else {\n eventName = 'on' + eventName;\n }\n }\n return eventName;\n }\n s.emitterEventListeners = {\n \n };\n s.emit = function (eventName) {\n // Trigger callbacks\n if (s.params[eventName]) {\n s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n var i;\n // Trigger events\n if (s.emitterEventListeners[eventName]) {\n for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {\n s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n }\n }\n // Trigger plugins\n if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);\n };\n s.on = function (eventName, handler) {\n eventName = normalizeEventName(eventName);\n if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = [];\n s.emitterEventListeners[eventName].push(handler);\n return s;\n };\n s.off = function (eventName, handler) {\n var i;\n eventName = normalizeEventName(eventName);\n if (typeof handler === 'undefined') {\n // Remove all handlers for such event\n s.emitterEventListeners[eventName] = [];\n return s;\n }\n if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return;\n for (i = 0; i < s.emitterEventListeners[eventName].length; i++) {\n if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1);\n }\n return s;\n };\n s.once = function (eventName, handler) {\n eventName = normalizeEventName(eventName);\n var _handler = function () {\n handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]);\n s.off(eventName, _handler);\n };\n s.on(eventName, _handler);\n return s;\n };\n \n \n // Accessibility tools\n s.a11y = {\n makeFocusable: function ($el) {\n $el.attr('tabIndex', '0');\n return $el;\n },\n addRole: function ($el, role) {\n $el.attr('role', role);\n return $el;\n },\n \n addLabel: function ($el, label) {\n $el.attr('aria-label', label);\n return $el;\n },\n \n disable: function ($el) {\n $el.attr('aria-disabled', true);\n return $el;\n },\n \n enable: function ($el) {\n $el.attr('aria-disabled', false);\n return $el;\n },\n \n onEnterKey: function (event) {\n if (event.keyCode !== 13) return;\n if ($(event.target).is(s.params.nextButton)) {\n s.onClickNext(event);\n if (s.isEnd) {\n s.a11y.notify(s.params.lastSlideMessage);\n }\n else {\n s.a11y.notify(s.params.nextSlideMessage);\n }\n }\n else if ($(event.target).is(s.params.prevButton)) {\n s.onClickPrev(event);\n if (s.isBeginning) {\n s.a11y.notify(s.params.firstSlideMessage);\n }\n else {\n s.a11y.notify(s.params.prevSlideMessage);\n }\n }\n if ($(event.target).is('.' + s.params.bulletClass)) {\n $(event.target)[0].click();\n }\n },\n \n liveRegion: $(''),\n \n notify: function (message) {\n var notification = s.a11y.liveRegion;\n if (notification.length === 0) return;\n notification.html('');\n notification.html(message);\n },\n init: function () {\n // Setup accessibility\n if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {\n s.a11y.makeFocusable(s.nextButton);\n s.a11y.addRole(s.nextButton, 'button');\n s.a11y.addLabel(s.nextButton, s.params.nextSlideMessage);\n }\n if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {\n s.a11y.makeFocusable(s.prevButton);\n s.a11y.addRole(s.prevButton, 'button');\n s.a11y.addLabel(s.prevButton, s.params.prevSlideMessage);\n }\n \n $(s.container).append(s.a11y.liveRegion);\n },\n initPagination: function () {\n if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) {\n s.bullets.each(function () {\n var bullet = $(this);\n s.a11y.makeFocusable(bullet);\n s.a11y.addRole(bullet, 'button');\n s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1));\n });\n }\n },\n destroy: function () {\n if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove();\n }\n };\n \n \n /*=========================\n Init/Destroy\n ===========================*/\n s.init = function () {\n if (s.params.loop) s.createLoop();\n s.updateContainerSize();\n s.updateSlidesSize();\n s.updatePagination();\n if (s.params.scrollbar && s.scrollbar) {\n s.scrollbar.set();\n if (s.params.scrollbarDraggable) {\n s.scrollbar.enableDraggable();\n }\n }\n if (s.params.effect !== 'slide' && s.effects[s.params.effect]) {\n if (!s.params.loop) s.updateProgress();\n s.effects[s.params.effect].setTranslate();\n }\n if (s.params.loop) {\n s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit);\n }\n else {\n s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit);\n if (s.params.initialSlide === 0) {\n if (s.parallax && s.params.parallax) s.parallax.setTranslate();\n if (s.lazy && s.params.lazyLoading) {\n s.lazy.load();\n s.lazy.initialImageLoaded = true;\n }\n }\n }\n s.attachEvents();\n if (s.params.observer && s.support.observer) {\n s.initObservers();\n }\n if (s.params.preloadImages && !s.params.lazyLoading) {\n s.preloadImages();\n }\n if (s.params.zoom && s.zoom) {\n s.zoom.init();\n }\n if (s.params.autoplay) {\n s.startAutoplay();\n }\n if (s.params.keyboardControl) {\n if (s.enableKeyboardControl) s.enableKeyboardControl();\n }\n if (s.params.mousewheelControl) {\n if (s.enableMousewheelControl) s.enableMousewheelControl();\n }\n // Deprecated hashnavReplaceState changed to replaceState for use in hashnav and history\n if (s.params.hashnavReplaceState) {\n s.params.replaceState = s.params.hashnavReplaceState;\n }\n if (s.params.history) {\n if (s.history) s.history.init();\n }\n if (s.params.hashnav) {\n if (s.hashnav) s.hashnav.init();\n }\n if (s.params.a11y && s.a11y) s.a11y.init();\n s.emit('onInit', s);\n };\n \n // Cleanup dynamic styles\n s.cleanupStyles = function () {\n // Container\n s.container.removeClass(s.classNames.join(' ')).removeAttr('style');\n \n // Wrapper\n s.wrapper.removeAttr('style');\n \n // Slides\n if (s.slides && s.slides.length) {\n s.slides\n .removeClass([\n s.params.slideVisibleClass,\n s.params.slideActiveClass,\n s.params.slideNextClass,\n s.params.slidePrevClass\n ].join(' '))\n .removeAttr('style')\n .removeAttr('data-swiper-column')\n .removeAttr('data-swiper-row');\n }\n \n // Pagination/Bullets\n if (s.paginationContainer && s.paginationContainer.length) {\n s.paginationContainer.removeClass(s.params.paginationHiddenClass);\n }\n if (s.bullets && s.bullets.length) {\n s.bullets.removeClass(s.params.bulletActiveClass);\n }\n \n // Buttons\n if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);\n if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);\n \n // Scrollbar\n if (s.params.scrollbar && s.scrollbar) {\n if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style');\n if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style');\n }\n };\n \n // Destroy\n s.destroy = function (deleteInstance, cleanupStyles) {\n // Detach evebts\n s.detachEvents();\n // Stop autoplay\n s.stopAutoplay();\n // Disable draggable\n if (s.params.scrollbar && s.scrollbar) {\n if (s.params.scrollbarDraggable) {\n s.scrollbar.disableDraggable();\n }\n }\n // Destroy loop\n if (s.params.loop) {\n s.destroyLoop();\n }\n // Cleanup styles\n if (cleanupStyles) {\n s.cleanupStyles();\n }\n // Disconnect observer\n s.disconnectObservers();\n \n // Destroy zoom\n if (s.params.zoom && s.zoom) {\n s.zoom.destroy();\n }\n // Disable keyboard/mousewheel\n if (s.params.keyboardControl) {\n if (s.disableKeyboardControl) s.disableKeyboardControl();\n }\n if (s.params.mousewheelControl) {\n if (s.disableMousewheelControl) s.disableMousewheelControl();\n }\n // Disable a11y\n if (s.params.a11y && s.a11y) s.a11y.destroy();\n // Delete history popstate\n if (s.params.history && !s.params.replaceState) {\n window.removeEventListener('popstate', s.history.setHistoryPopState);\n }\n if (s.params.hashnav && s.hashnav) {\n s.hashnav.destroy();\n }\n // Destroy callback\n s.emit('onDestroy');\n // Delete instance\n if (deleteInstance !== false) s = null;\n };\n \n s.init();\n \n \n \n // Return swiper instance\n return s;\n };\n \n /*==================================================\n Prototype\n ====================================================*/\n Swiper.prototype = {\n isSafari: (function () {\n var ua = window.navigator.userAgent.toLowerCase();\n return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);\n })(),\n isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),\n isArray: function (arr) {\n return Object.prototype.toString.apply(arr) === '[object Array]';\n },\n /*==================================================\n Browser\n ====================================================*/\n browser: {\n ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled,\n ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1),\n lteIE9: (function() {\n // create temporary DIV\n var div = document.createElement('div');\n // add content to tmp DIV which is wrapped into the IE HTML conditional statement\n div.innerHTML = '';\n // return true / false value based on what will browser render\n return div.getElementsByTagName('i').length === 1;\n })()\n },\n /*==================================================\n Devices\n ====================================================*/\n device: (function () {\n var ua = window.navigator.userAgent;\n var android = ua.match(/(Android);?[\\s\\/]+([\\d.]+)?/);\n var ipad = ua.match(/(iPad).*OS\\s([\\d_]+)/);\n var ipod = ua.match(/(iPod)(.*OS\\s([\\d_]+))?/);\n var iphone = !ipad && ua.match(/(iPhone\\sOS|iOS)\\s([\\d_]+)/);\n return {\n ios: ipad || iphone || ipod,\n android: android\n };\n })(),\n /*==================================================\n Feature Detection\n ====================================================*/\n support: {\n touch : (window.Modernizr && Modernizr.touch === true) || (function () {\n return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch);\n })(),\n \n transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () {\n var div = document.createElement('div').style;\n return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div);\n })(),\n \n flexbox: (function () {\n var div = document.createElement('div').style;\n var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');\n for (var i = 0; i < styles.length; i++) {\n if (styles[i] in div) return true;\n }\n })(),\n \n observer: (function () {\n return ('MutationObserver' in window || 'WebkitMutationObserver' in window);\n })(),\n \n passiveListener: (function () {\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n get: function() {\n supportsPassive = true;\n }\n });\n window.addEventListener('testPassiveListener', null, opts);\n } catch (e) {}\n return supportsPassive;\n })(),\n \n gestures: (function () {\n return 'ongesturestart' in window;\n })()\n },\n /*==================================================\n Plugins\n ====================================================*/\n plugins: {}\n };\n \n\n})();\n\n//# sourceMappingURL=framework7.js.map\n"]} \ No newline at end of file diff --git a/bower_components/framework7/dist/js/my-app.js b/bower_components/framework7/dist/js/my-app.js new file mode 100644 index 00000000..9be6a376 --- /dev/null +++ b/bower_components/framework7/dist/js/my-app.js @@ -0,0 +1,48 @@ +// Initialize your app +var myApp = new Framework7(); + +// Export selectors engine +var $$ = Dom7; + +// Add view +var mainView = myApp.addView('.view-main', { + // Because we use fixed-through navbar we can enable dynamic navbar + dynamicNavbar: true +}); + +// Callbacks to run specific code for specific pages, for example for About page: +myApp.onPageInit('about', function (page) { + // run createContentPage func after link was clicked + $$('.create-page').on('click', function () { + createContentPage(); + }); +}); + +// Generate dynamic page +var dynamicPageIndex = 0; +function createContentPage() { + mainView.router.loadContent( + '' + + '' + + '
                                              ' + + ' ' + + '
                                              ' + + ' ' + + '
                                              ' + + '
                                              ' + + '
                                              ' + + '

                                              Here is a dynamic page created on ' + new Date() + ' !

                                              ' + + '

                                              Go back or go to Services.

                                              ' + + '
                                              ' + + '
                                              ' + + '
                                              ' + + '
                                              ' + + '
                                              ' + ); + return; +} \ No newline at end of file diff --git a/bower_components/framework7/dist/services.html b/bower_components/framework7/dist/services.html new file mode 100644 index 00000000..7492b5a4 --- /dev/null +++ b/bower_components/framework7/dist/services.html @@ -0,0 +1,28 @@ + + + + +
                                              + +
                                              + +
                                              +
                                              +
                                              +

                                              Here is Services page!

                                              +

                                              Go back or go to About page.

                                              +

                                              Mauris posuere sit amet metus id venenatis. Ut ante dolor, tempor nec commodo rutrum, varius at sem. Nullam ac nisi non neque ornare pretium. Nulla mauris mauris, consequat et elementum sit amet, egestas sed orci. In hac habitasse platea dictumst.

                                              +

                                              Fusce eros lectus, accumsan eget mi vel, iaculis tincidunt felis. Nulla tincidunt pharetra sagittis. Fusce in felis eros. Nulla sit amet aliquam lorem, et gravida ipsum. Mauris consectetur nisl non sollicitudin tristique. Praesent vitae metus ac quam rhoncus mattis vel et nisi. Aenean aliquet, felis quis dignissim iaculis, lectus quam tincidunt ligula, et venenatis turpis risus sed lorem. Morbi eu metus elit. Ut vel diam dolor.

                                              +
                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/inline-pages/css/my-app.css b/bower_components/framework7/examples/inline-pages/css/my-app.css new file mode 100644 index 00000000..f47003e8 --- /dev/null +++ b/bower_components/framework7/examples/inline-pages/css/my-app.css @@ -0,0 +1,34 @@ +/* Your app custom files in this file */ +/* Tab bar icons */ +i.tabbar-demo-icon-1 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-1 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +i.tabbar-demo-icon-2 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-2 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +i.tabbar-demo-icon-3 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-3 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +i.tabbar-demo-icon-4 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-4 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} diff --git a/bower_components/framework7/examples/inline-pages/index.html b/bower_components/framework7/examples/inline-pages/index.html new file mode 100644 index 00000000..f0550a0d --- /dev/null +++ b/bower_components/framework7/examples/inline-pages/index.html @@ -0,0 +1,356 @@ + + + + + + + + My App + + + + + + + +
                                              + +
                                              + +
                                              +
                                              +

                                              Left panel content goes here

                                              +
                                              +
                                              + +
                                              +
                                              +

                                              Right panel content goes here

                                              +
                                              +
                                              + +
                                              + +
                                              + + + + + + +
                                              +
                                              + + + + + + \ No newline at end of file diff --git a/bower_components/framework7/examples/inline-pages/jade/index.jade b/bower_components/framework7/examples/inline-pages/jade/index.jade new file mode 100644 index 00000000..504f1857 --- /dev/null +++ b/bower_components/framework7/examples/inline-pages/jade/index.jade @@ -0,0 +1,280 @@ +doctype +html + head + meta(charset="utf-8") + meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") + meta(name='apple-mobile-web-app-capable', content='yes') + meta(name="apple-mobile-web-app-status-bar-style", content="black") + title My App + // Path to Framework7 Library CSS + link(rel="stylesheet", href="../../dist/css/framework7.ios.min.css") + // Path to your custom app styles + link(rel="stylesheet", href="css/my-app.css") + body + // Status bar overlay for fullscreen mode + .statusbar-overlay + + // Panels overlay + .panel-overlay + // Left panel with reveal effect + .panel.panel-left.panel-reveal + .content-block + p Left panel content goes here + // Right panel with cover effect + .panel.panel-right.panel-cover + .content-block + p Right panel content goes here + + // Views + .views + // Your main view, should have "view-main" class + .view.view-main + // Top Navbar + .navbar + // Navbar inner for Index page + .navbar-inner(data-page="index") + // We have home navbar without left link + .center.sliding Awesome App + .right + // Right link contains only icon - additional "icon-only" class + a(href="#").link.icon-only.open-panel + i.icon.icon-bars + // Navbar inner for About page + .navbar-inner(data-page="about").cached + .left.sliding + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding About Us + // Navbar inner for Services page + .navbar-inner(data-page="services").cached + .left.sliding + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Services + // Navbar inner for Form page + .navbar-inner(data-page="form").cached + .left.sliding + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Form + // Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes + .pages.navbar-through.toolbar-through + // Index Page + .page(data-page="index") + // Scrollable page content + .page-content + .content-block-title Welcome To My Awesome App + .content-block + .content-block-inner + p Couple of worlds here because my app is so awesome! + p Duis sed erat ac eros ultrices pharetra id ut tellus. Praesent rhoncus enim ornare ipsum aliquet ultricies. Pellentesque sodales erat quis elementum sagittis. + + .content-block-title What about simple navigation? + .list-block + ul + li + a(href="#about").item-link + .item-content + .item-inner + .item-title About + li + a(href="#services").item-link + .item-content + .item-inner + .item-title Services + li + a(href="#form").item-link + .item-content + .item-inner + .item-title Form + .content-block-title Side panels + .content-block + .row + .col-50 + a(href="#", data-panel="left").button.open-panel Left Panel + .col-50 + a(href="#", data-panel="right").button.open-panel Right Panel + // About Page + .page(data-page="about").cached + .page-content + .content-block + p You may go back or load Services page. + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. + // Services Page + .page(data-page="services").cached + .page-content + .content-block + p You may go back or load About page. + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. + // Form Page + .page(data-page="form").cached + .page-content + .content-block-title Form Example + .list-block + ul + li + .item-content + .item-media + i.icon.icon-form-name + .item-inner + .item-title.label Name + .item-input + input(type="text", placeholder="Your name") + li + .item-content + .item-media + i.icon.icon-form-email + .item-inner + .item-title.label E-mail + .item-input + input(type="email", placeholder="E-mail") + li + .item-content + .item-media + i.icon.icon-form-url + .item-inner + .item-title.label URL + .item-input + input(type="url", placeholder="URL") + li + .item-content + .item-media + i.icon.icon-form-password + .item-inner + .item-title.label Password + .item-input + input(type="password", placeholder="Password") + li + .item-content + .item-media + i.icon.icon-form-tel + .item-inner + .item-title.label Phone + .item-input + input(type="tel", placeholder="Phone") + li + .item-content + .item-media + i.icon.icon-form-gender + .item-inner + .item-title.label Gender + .item-input + select + option Male + option Female + li + .item-content + .item-media + i.icon.icon-form-calendar + .item-inner + .item-title.label Birth date + .item-input + input(type="date", placeholder="Birth day", value="2014-04-30") + li + .item-content + .item-media + i.icon.icon-form-toggle + .item-inner + .item-title.label Switch + .item-input + label.label-switch + input(type="checkbox") + .checkbox + li + .item-content + .item-media + i.icon.icon-form-settings + .item-inner + .item-title.label Slider + .item-input + .range-slider + input(type="range", min="0", max="100", value="50", step="0.1") + li.align-top + .item-content + .item-media + i.icon.icon-form-comment + .item-inner + .item-title.label Textarea + .item-input + textarea + .content-block + .row + .col-50 + a(href="#").button.button-big.button-fill.color-red Cancel + .col-50 + input(type="submit", value="Submit").button.button-big.button-fill.color-green + + .content-block-title Checkbox group + .list-block + ul + li + label.label-checkbox.item-content + input(type="checkbox", name="ks-checkbox", value="Books", checked=true) + .item-media + i.icon.icon-form-checkbox + .item-inner + .item-title Books + li + label.label-checkbox.item-content + input(type="checkbox", name="ks-checkbox", value="Movies") + .item-media + i.icon.icon-form-checkbox + .item-inner + .item-title Movies + li + label.label-checkbox.item-content + input(type="checkbox", name="ks-checkbox", value="Food") + .item-media + i.icon.icon-form-checkbox + .item-inner + .item-title Food + li + label.label-checkbox.item-content + input(type="checkbox", name="ks-checkbox", value="Drinks") + .item-media + i.icon.icon-form-checkbox + .item-inner + .item-title Drinks + .content-block-title Radio buttons group + .list-block + ul + li + label.label-radio.item-content + input(type="radio", name="ks-radio", value="Books", checked=true) + .item-inner + .item-title Books + li + label.label-radio.item-content + input(type="radio", name="ks-radio", value="Movies") + .item-inner + .item-title Movies + li + label.label-radio.item-content + input(type="radio", name="ks-radio", value="Food") + .item-inner + .item-title Food + li + label.label-radio.item-content + input(type="radio", name="ks-radio", value="Drinks") + .item-inner + .item-title Drinks + + // Bottom Toolbar + .toolbar + .toolbar-inner + a(href="#").link Link 1 + a(href="#").link Link 2 + + // Path to Framework7 Library JS + script(type="text/javascript", src="../../dist/js/framework7.min.js") + // Path to your app js + script(type="text/javascript", src="js/my-app.js") diff --git a/bower_components/framework7/examples/inline-pages/js/my-app.js b/bower_components/framework7/examples/inline-pages/js/my-app.js new file mode 100644 index 00000000..a2a59ad7 --- /dev/null +++ b/bower_components/framework7/examples/inline-pages/js/my-app.js @@ -0,0 +1,15 @@ +// Initialize your app +var myApp = new Framework7({ + animateNavBackIcon:true +}); + +// Export selectors engine +var $$ = Dom7; + +// Add main View +var mainView = myApp.addView('.view-main', { + // Enable dynamic Navbar + dynamicNavbar: true, + // Enable Dom Cache so we can use all inline pages + domCache: true +}); diff --git a/bower_components/framework7/examples/inline-pages/less/my-app.less b/bower_components/framework7/examples/inline-pages/less/my-app.less new file mode 100644 index 00000000..e8eeb1f0 --- /dev/null +++ b/bower_components/framework7/examples/inline-pages/less/my-app.less @@ -0,0 +1,35 @@ +/* Your app custom files in this file */ + +/* Tab bar icons */ +i.tabbar-demo-icon-1 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} +i.tabbar-demo-icon-2 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} +i.tabbar-demo-icon-3 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} +i.tabbar-demo-icon-4 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view-panel/about.html b/bower_components/framework7/examples/split-view-panel/about.html new file mode 100644 index 00000000..13313535 --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/about.html @@ -0,0 +1,20 @@ + + +
                                              +
                                              +
                                              +
                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +

                                              Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio.

                                              +

                                              Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam.

                                              +

                                              Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris.

                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view-panel/css/my-app.css b/bower_components/framework7/examples/split-view-panel/css/my-app.css new file mode 100644 index 00000000..53c295d3 --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/css/my-app.css @@ -0,0 +1,17 @@ +/* Your app custom files in this file */ +.view-left { + border-right: 1px solid #b2b2b2; +} +/* iPad Vertical */ +@media (min-width: 768px) { + .panel.panel-left.panel-cover { + width: 320px; + } +} +/* iPad Horizontal */ +@media (min-width: 1024px) { + /* Let's hide panel-opener when left panel is visible */ + .view-main .navbar .open-panel { + display: none; + } +} diff --git a/bower_components/framework7/examples/split-view-panel/index.html b/bower_components/framework7/examples/split-view-panel/index.html new file mode 100644 index 00000000..9174a71c --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/index.html @@ -0,0 +1,134 @@ + + + + + + + + My App + + + + + + + +
                                              + +
                                              + +
                                              + + +
                                              + +
                                              +
                                              +

                                              Right panel content goes here

                                              +
                                              +
                                              + +
                                              + + +
                                              + + + + + + \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view-panel/jade/about.jade b/bower_components/framework7/examples/split-view-panel/jade/about.jade new file mode 100644 index 00000000..59c4a2fb --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/jade/about.jade @@ -0,0 +1,18 @@ +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding About Us + .right + a(href="#", data-panel="left").link.open-panel.icon-only + i.icon.icon-bars +.pages + .page(data-page="about") + .page-content + .content-block + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. diff --git a/bower_components/framework7/examples/split-view-panel/jade/index.jade b/bower_components/framework7/examples/split-view-panel/jade/index.jade new file mode 100644 index 00000000..61fee454 --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/jade/index.jade @@ -0,0 +1,105 @@ +doctype +html + head + meta(charset="utf-8") + meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") + meta(name='apple-mobile-web-app-capable', content='yes') + meta(name="apple-mobile-web-app-status-bar-style", content="black") + title My App + // Path to Framework7 Library CSS + link(rel="stylesheet", href="../../dist/css/framework7.ios.min.css") + // Path to your custom app styles + link(rel="stylesheet", href="css/my-app.css") + body + // Status bar overlay for fullscreen mode + .statusbar-overlay + // Panels overlay + .panel-overlay + // Left panel with reveal effect + .panel.panel-left.panel-cover + // Left view + .view.view-left.navbar-through + .navbar + .navbar-inner + .left + .center.sliding Left View + .right + .pages + .page(data-page="index-left") + .page-content + .content-block-title Left View Links + .list-block + ul + li + a(href="left-page-1.html").item-link + .item-content + .item-inner + .item-title Left Page 1 + li + a(href="left-page-2.html").item-link + .item-content + .item-inner + .item-title Left Page 2 + + .content-block-title Control Main View + .list-block + ul + li + a(href="about.html", data-view=".view-main").item-link.close-panel + .item-content + .item-inner + .item-title About + li + a(href="services.html", data-view=".view-main").item-link.close-panel + .item-content + .item-inner + .item-title Services + li + a(href="#", data-view=".view-main").back.item-link.close-panel + .item-content + .item-inner + .item-title Back in history + // Right panel with cover effect + .panel.panel-right.panel-reveal + .content-block + p Right panel content goes here + // Views + .views + // Right view, it is main view + .view.view-main.navbar-through + .navbar + .navbar-inner + .center.sliding Main View + .right + a(href="#", data-panel="left").link.open-panel.icon-only + i.icon.icon-bars + // Pages + .pages + // Page, data-page contains page name + .page(data-page="index-1") + // Scrollable page content + .page-content + .content-block-title Hello + .content-block + .content-block-inner + p This is an example of split view application layout where left view degrades to panel on narrow screens (iPad portrait and iPhone). It behaves like default Mail app on iOS 7. + p Each view may have different layout, different navbar type (dynamic, fixed or static) or without navbar. You can easily control one view from another without any line of JavaScript just using "data-view" attribute on links. + p Additional right panel is also available: + a(href="#", data-panel="right").open-panel right panel + .list-block + ul + li + a(href="about.html").item-link + .item-content + .item-inner + .item-title About + li + a(href="services.html").item-link + .item-content + .item-inner + .item-title Services + + // Path to Framework7 Library JS + script(type="text/javascript", src="../../dist/js/framework7.min.js") + // Path to your app js + script(type="text/javascript", src="js/my-app.js") diff --git a/bower_components/framework7/examples/split-view-panel/jade/left-page-1.jade b/bower_components/framework7/examples/split-view-panel/jade/left-page-1.jade new file mode 100644 index 00000000..eb7edaa0 --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/jade/left-page-1.jade @@ -0,0 +1,15 @@ +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Left Page 1 +.pages + .page(data-page="left-page-1") + .page-content + .content-block + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. diff --git a/bower_components/framework7/examples/split-view-panel/jade/left-page-2.jade b/bower_components/framework7/examples/split-view-panel/jade/left-page-2.jade new file mode 100644 index 00000000..054a1fc8 --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/jade/left-page-2.jade @@ -0,0 +1,15 @@ +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Left Page 2 +.pages + .page(data-page="left-page-2") + .page-content + .content-block + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. diff --git a/bower_components/framework7/examples/split-view-panel/jade/services.jade b/bower_components/framework7/examples/split-view-panel/jade/services.jade new file mode 100644 index 00000000..5d0ffc8e --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/jade/services.jade @@ -0,0 +1,18 @@ +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Services + .right + a(href="#", data-panel="left").link.open-panel.icon-only + i.icon.icon-bars +.pages + .page(data-page="services") + .page-content + .content-block + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. diff --git a/bower_components/framework7/examples/split-view-panel/js/my-app.js b/bower_components/framework7/examples/split-view-panel/js/my-app.js new file mode 100644 index 00000000..dd57b8b0 --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/js/my-app.js @@ -0,0 +1,17 @@ +// Initialize your app +var myApp = new Framework7({ + panelLeftBreakpoint: 1024 +}); + +// Export selectors engine +var $$ = Dom7; + +// Add views +var leftView = myApp.addView('.view-left', { + // Because we use fixed-through navbar we can enable dynamic navbar + dynamicNavbar: true +}); +var mainView = myApp.addView('.view-main', { + // Because we use fixed-through navbar we can enable dynamic navbar + dynamicNavbar: true +}); diff --git a/bower_components/framework7/examples/split-view-panel/left-page-1.html b/bower_components/framework7/examples/split-view-panel/left-page-1.html new file mode 100644 index 00000000..19747537 --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/left-page-1.html @@ -0,0 +1,19 @@ + + +
                                              +
                                              +
                                              +
                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +

                                              Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio.

                                              +

                                              Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam.

                                              +

                                              Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris.

                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view-panel/left-page-2.html b/bower_components/framework7/examples/split-view-panel/left-page-2.html new file mode 100644 index 00000000..848e11a3 --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/left-page-2.html @@ -0,0 +1,19 @@ + + +
                                              +
                                              +
                                              +
                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +

                                              Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio.

                                              +

                                              Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam.

                                              +

                                              Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris.

                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view-panel/less/my-app.less b/bower_components/framework7/examples/split-view-panel/less/my-app.less new file mode 100644 index 00000000..1045c71c --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/less/my-app.less @@ -0,0 +1,19 @@ +/* Your app custom files in this file */ + +.view-left { + border-right: 1px solid #b2b2b2; +} + +/* iPad Vertical */ +@media (min-width:768px) { + .panel.panel-left.panel-cover { + width: 320px; + } +} +/* iPad Horizontal */ +@media (min-width:1024px) { + /* Let's hide panel-opener when left panel is visible */ + .view-main .navbar .open-panel { + display: none; + } +} diff --git a/bower_components/framework7/examples/split-view-panel/services.html b/bower_components/framework7/examples/split-view-panel/services.html new file mode 100644 index 00000000..0470cae9 --- /dev/null +++ b/bower_components/framework7/examples/split-view-panel/services.html @@ -0,0 +1,20 @@ + + +
                                              +
                                              +
                                              +
                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +

                                              Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio.

                                              +

                                              Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam.

                                              +

                                              Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris.

                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view/about.html b/bower_components/framework7/examples/split-view/about.html new file mode 100644 index 00000000..dbe940c0 --- /dev/null +++ b/bower_components/framework7/examples/split-view/about.html @@ -0,0 +1,19 @@ + + +
                                              +
                                              +
                                              +
                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +

                                              Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio.

                                              +

                                              Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam.

                                              +

                                              Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris.

                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view/css/my-app.css b/bower_components/framework7/examples/split-view/css/my-app.css new file mode 100644 index 00000000..d0f80026 --- /dev/null +++ b/bower_components/framework7/examples/split-view/css/my-app.css @@ -0,0 +1,23 @@ +/* Your app custom files in this file */ +.view-left { + float: left; + width: 320px; + border-right: 1px solid #b2b2b2; +} +.view-main { + width: -webkit-calc(100% - 321px); + width: -moz-calc(100% - 321px); + width: -ms-calc(100% - 321px); + width: calc(100% - 321px); +} +@media (max-width: 768px) { + .view-left { + width: 240px; + } + .view-main { + width: -webkit-calc(100% - 241px); + width: -moz-calc(100% - 241px); + width: -ms-calc(100% - 241px); + width: calc(100% - 241px); + } +} diff --git a/bower_components/framework7/examples/split-view/index.html b/bower_components/framework7/examples/split-view/index.html new file mode 100644 index 00000000..0174e412 --- /dev/null +++ b/bower_components/framework7/examples/split-view/index.html @@ -0,0 +1,135 @@ + + + + + + + + My App + + + + + + + +
                                              + +
                                              + +
                                              +
                                              +

                                              Left panel content goes here

                                              +
                                              +
                                              + +
                                              +
                                              +

                                              Right panel content goes here

                                              +
                                              +
                                              + +
                                              + + + + +
                                              + + + + + + \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view/jade/about.jade b/bower_components/framework7/examples/split-view/jade/about.jade new file mode 100644 index 00000000..aa0d4777 --- /dev/null +++ b/bower_components/framework7/examples/split-view/jade/about.jade @@ -0,0 +1,15 @@ +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding About Us +.pages + .page(data-page="about") + .page-content + .content-block + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. diff --git a/bower_components/framework7/examples/split-view/jade/index.jade b/bower_components/framework7/examples/split-view/jade/index.jade new file mode 100644 index 00000000..92ae2367 --- /dev/null +++ b/bower_components/framework7/examples/split-view/jade/index.jade @@ -0,0 +1,107 @@ +doctype +html + head + meta(charset="utf-8") + meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") + meta(name='apple-mobile-web-app-capable', content='yes') + meta(name="apple-mobile-web-app-status-bar-style", content="black") + title My App + // Path to Framework7 Library CSS + link(rel="stylesheet", href="../../dist/css/framework7.ios.min.css") + // Path to your custom app styles + link(rel="stylesheet", href="css/my-app.css") + body + // Status bar overlay for fullscreen mode + .statusbar-overlay + + // Panels overlay + .panel-overlay + // Left panel with reveal effect + .panel.panel-left.panel-reveal + .content-block + p Left panel content goes here + // Right panel with cover effect + .panel.panel-right.panel-cover + .content-block + p Right panel content goes here + + // Views + .views + // Left view + .view.view-left.navbar-through + .navbar + .navbar-inner + .center.sliding Left View + .pages + .page(data-page="index-left") + .page-content + .content-block-title Left View Links + .list-block + ul + li + a(href="left-page-1.html").item-link + .item-content + .item-inner + .item-title Left Page 1 + li + a(href="left-page-2.html").item-link + .item-content + .item-inner + .item-title Left Page 2 + + .content-block-title Control Main View + .list-block + ul + li + a(href="about.html", data-view=".view-main").item-link + .item-content + .item-inner + .item-title About + li + a(href="services.html", data-view=".view-main").item-link + .item-content + .item-inner + .item-title Services + li + a(href="#", data-view=".view-main").back.item-link + .item-content + .item-inner + .item-title Back in history + // Right view, it is main view + .view.view-main.navbar-through + .navbar + .navbar-inner + .center.sliding Main View + // Pages + .pages + // Page, data-page contains page name + .page(data-page="index-1") + // Scrollable page content + .page-content + .content-block-title Hello + .content-block + .content-block-inner + p This is an example of split view application layout, commonly used on iPad apps. The main approach of such kind of layout is that you can see different views at the same time. + p Each view may have different layout, different navbar type (dynamic, fixed or static) or without navbar. + p The fun thing is that you can easily control one view from another without any line of JavaScript just using "data-view" attribute on links. + p And of course, your favorite panels are still here: + a(href="#").open-panel left + | and + a(href="#", data-panel="right").open-panel right + .list-block + ul + li + a(href="about.html").item-link + .item-content + .item-inner + .item-title About + li + a(href="services.html").item-link + .item-content + .item-inner + .item-title Services + + // Path to Framework7 Library JS + script(type="text/javascript", src="../../dist/js/framework7.min.js") + // Path to your app js + script(type="text/javascript", src="js/my-app.js") diff --git a/bower_components/framework7/examples/split-view/jade/left-page-1.jade b/bower_components/framework7/examples/split-view/jade/left-page-1.jade new file mode 100644 index 00000000..eb7edaa0 --- /dev/null +++ b/bower_components/framework7/examples/split-view/jade/left-page-1.jade @@ -0,0 +1,15 @@ +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Left Page 1 +.pages + .page(data-page="left-page-1") + .page-content + .content-block + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. diff --git a/bower_components/framework7/examples/split-view/jade/left-page-2.jade b/bower_components/framework7/examples/split-view/jade/left-page-2.jade new file mode 100644 index 00000000..054a1fc8 --- /dev/null +++ b/bower_components/framework7/examples/split-view/jade/left-page-2.jade @@ -0,0 +1,15 @@ +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Left Page 2 +.pages + .page(data-page="left-page-2") + .page-content + .content-block + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. diff --git a/bower_components/framework7/examples/split-view/jade/services.jade b/bower_components/framework7/examples/split-view/jade/services.jade new file mode 100644 index 00000000..5df94107 --- /dev/null +++ b/bower_components/framework7/examples/split-view/jade/services.jade @@ -0,0 +1,15 @@ +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Services +.pages + .page(data-page="services") + .page-content + .content-block + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. diff --git a/bower_components/framework7/examples/split-view/js/my-app.js b/bower_components/framework7/examples/split-view/js/my-app.js new file mode 100644 index 00000000..e55dfbc3 --- /dev/null +++ b/bower_components/framework7/examples/split-view/js/my-app.js @@ -0,0 +1,15 @@ +// Initialize your app +var myApp = new Framework7(); + +// Export selectors engine +var $$ = Dom7; + +// Add views +var leftView = myApp.addView('.view-left', { + // Because we use fixed-through navbar we can enable dynamic navbar + dynamicNavbar: true +}); +var mainView = myApp.addView('.view-main', { + // Because we use fixed-through navbar we can enable dynamic navbar + dynamicNavbar: true +}); \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view/left-page-1.html b/bower_components/framework7/examples/split-view/left-page-1.html new file mode 100644 index 00000000..19747537 --- /dev/null +++ b/bower_components/framework7/examples/split-view/left-page-1.html @@ -0,0 +1,19 @@ + + +
                                              +
                                              +
                                              +
                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +

                                              Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio.

                                              +

                                              Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam.

                                              +

                                              Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris.

                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view/left-page-2.html b/bower_components/framework7/examples/split-view/left-page-2.html new file mode 100644 index 00000000..848e11a3 --- /dev/null +++ b/bower_components/framework7/examples/split-view/left-page-2.html @@ -0,0 +1,19 @@ + + +
                                              +
                                              +
                                              +
                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +

                                              Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio.

                                              +

                                              Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam.

                                              +

                                              Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris.

                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view/less/my-app.less b/bower_components/framework7/examples/split-view/less/my-app.less new file mode 100644 index 00000000..e92b0a7c --- /dev/null +++ b/bower_components/framework7/examples/split-view/less/my-app.less @@ -0,0 +1,23 @@ +/* Your app custom files in this file */ +.view-left { + float: left; + width: 320px; + border-right: 1px solid #b2b2b2; +} +.view-main { + width: ~"-webkit-calc(100% - 321px)"; + width: ~"-moz-calc(100% - 321px)"; + width: ~"-ms-calc(100% - 321px)"; + width: ~"calc(100% - 321px)"; +} +@media (max-width:768px) { + .view-left { + width: 240px; + } + .view-main { + width: ~"-webkit-calc(100% - 241px)"; + width: ~"-moz-calc(100% - 241px)"; + width: ~"-ms-calc(100% - 241px)"; + width: ~"calc(100% - 241px)"; + } +} \ No newline at end of file diff --git a/bower_components/framework7/examples/split-view/services.html b/bower_components/framework7/examples/split-view/services.html new file mode 100644 index 00000000..2753756a --- /dev/null +++ b/bower_components/framework7/examples/split-view/services.html @@ -0,0 +1,19 @@ + + +
                                              +
                                              +
                                              +
                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +

                                              Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio.

                                              +

                                              Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam.

                                              +

                                              Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris.

                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/tab-bar/about.html b/bower_components/framework7/examples/tab-bar/about.html new file mode 100644 index 00000000..dbe940c0 --- /dev/null +++ b/bower_components/framework7/examples/tab-bar/about.html @@ -0,0 +1,19 @@ + + +
                                              +
                                              +
                                              +
                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +

                                              Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio.

                                              +

                                              Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam.

                                              +

                                              Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris.

                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/tab-bar/css/my-app.css b/bower_components/framework7/examples/tab-bar/css/my-app.css new file mode 100644 index 00000000..f47003e8 --- /dev/null +++ b/bower_components/framework7/examples/tab-bar/css/my-app.css @@ -0,0 +1,34 @@ +/* Your app custom files in this file */ +/* Tab bar icons */ +i.tabbar-demo-icon-1 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-1 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +i.tabbar-demo-icon-2 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-2 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +i.tabbar-demo-icon-3 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-3 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +i.tabbar-demo-icon-4 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-4 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} diff --git a/bower_components/framework7/examples/tab-bar/index.html b/bower_components/framework7/examples/tab-bar/index.html new file mode 100644 index 00000000..153b76eb --- /dev/null +++ b/bower_components/framework7/examples/tab-bar/index.html @@ -0,0 +1,238 @@ + + + + + + + + My App + + + + + + + +
                                              + +
                                              + +
                                              +
                                              +

                                              Left panel content goes here

                                              +
                                              +
                                              + +
                                              +
                                              +

                                              Right panel content goes here

                                              +
                                              +
                                              + + +
                                              + +
                                              + +
                                              + +
                                              + +
                                              +
                                              Welcome
                                              +
                                              +

                                              This is an example of tab bar application layout. The main point of such tabbed layout is that each tab contains independent view with its own routing and navigation.

                                              +

                                              Each tab/view may have different layout, different navbar type (dynamic, fixed or static) or without navbar like this tab.

                                              +

                                              And of course, your favorite panels are still here: left and right

                                              +

                                              Icons and their labels in tab bar below are just for example and don't related to their content.

                                              +
                                              +
                                              +
                                              +
                                              +
                                              + +
                                              + + + +
                                              +
                                              +
                                              +
                                              +
                                              +
                                              Another plain static view
                                              +
                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +

                                              Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio.

                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +
                                              +
                                              +
                                              +
                                              +
                                              +
                                              + +
                                              + + +
                                              + + + + + + \ No newline at end of file diff --git a/bower_components/framework7/examples/tab-bar/jade/about.jade b/bower_components/framework7/examples/tab-bar/jade/about.jade new file mode 100644 index 00000000..aa0d4777 --- /dev/null +++ b/bower_components/framework7/examples/tab-bar/jade/about.jade @@ -0,0 +1,15 @@ +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding About Us +.pages + .page(data-page="about") + .page-content + .content-block + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. diff --git a/bower_components/framework7/examples/tab-bar/jade/index.jade b/bower_components/framework7/examples/tab-bar/jade/index.jade new file mode 100644 index 00000000..1480fa97 --- /dev/null +++ b/bower_components/framework7/examples/tab-bar/jade/index.jade @@ -0,0 +1,189 @@ +doctype +html + head + meta(charset="utf-8") + meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") + meta(name='apple-mobile-web-app-capable', content='yes') + meta(name="apple-mobile-web-app-status-bar-style", content="black") + title My App + // Path to Framework7 Library CSS + link(rel="stylesheet", href="../../dist/css/framework7.ios.min.css") + // Path to your custom app styles + link(rel="stylesheet", href="css/my-app.css") + body + // Status bar overlay for fullscreen mode + .statusbar-overlay + + // Panels overlay + .panel-overlay + // Left panel with reveal effect + .panel.panel-left.panel-reveal + .content-block + p Left panel content goes here + // Right panel with cover effect + .panel.panel-right.panel-cover + .content-block + p Right panel content goes here + + // Views, and they are tabs + // We need to set "toolbar-through" class on it to keep space for our tab bar + .views.tabs.toolbar-through + // Your first view, it is also a .tab and should have "active" class to make it visible by default + .view.view-main.tab.active#view-1 + // Pages + .pages + // Page, data-page contains page name + .page(data-page="index-1") + // Scrollable page content + .page-content + .content-block-title Welcome + .content-block + p This is an example of tab bar application layout. The main point of such tabbed layout is that each tab contains independent view with its own routing and navigation. + p Each tab/view may have different layout, different navbar type (dynamic, fixed or static) or without navbar like this tab. + p And of course, your favorite panels are still here: + a(href="#").open-panel left + | and + a(href="#", data-panel="right").open-panel right + p Icons and their labels in tab bar below are just for example and don't related to their content. + // Second view (for second wrap) + .view.tab#view-2 + // We can make with view with navigation, let's add Top Navbar + .navbar + .navbar-inner + .center.sliding Second View + .pages.navbar-through + .page(data-page="index-2") + .page-content + .content-block + p This is a second view. Lets, for example, have here some internal pages with navbar navigation + .list-block + ul + li + a(href="about.html").item-link + .item-content + .item-inner + .item-title About Us + li + a(href="services.html").item-link + .item-content + .item-inner + .item-title Services + .view.tab#view-3 + .pages + .page(data-page="index-3") + .page-content + .content-block-title Another plain static view + .content-block + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + + .view.tab#view-4 + .pages.navbar-fixed + .page(data-page="index-4") + .navbar + .navbar-inner + .center Settings + .page-content + .list-block + ul + li + .item-content + .item-media + i.icon.icon-form-name + .item-inner + .item-title.label Name + .item-input + input(type="text", placeholder="Your name") + li + .item-content + .item-media + i.icon.icon-form-email + .item-inner + .item-title.label E-mail + .item-input + input(type="email", placeholder="E-mail") + li + .item-content + .item-media + i.icon.icon-form-url + .item-inner + .item-title.label URL + .item-input + input(type="url", placeholder="URL") + li + .item-content + .item-media + i.icon.icon-form-password + .item-inner + .item-title.label Password + .item-input + input(type="password", placeholder="Password") + li + .item-content + .item-media + i.icon.icon-form-tel + .item-inner + .item-title.label Phone + .item-input + input(type="tel", placeholder="Phone") + li + .item-content + .item-media + i.icon.icon-form-gender + .item-inner + .item-title.label Gender + .item-input + select + option Male + option Female + li + .item-content + .item-media + i.icon.icon-form-calendar + .item-inner + .item-title.label Birth date + .item-input + input(type="date", placeholder="Birth day", value="2014-04-30") + li + .item-content + .item-media + i.icon.icon-form-toggle + .item-inner + .item-title.label Switch + .item-input + label.label-switch + input(type="checkbox") + .checkbox + li + .item-content + .item-media + i.icon.icon-form-settings + .item-inner + .item-title.label Slider + .item-input + .range-slider + input(type="range", min="0", max="100", value="50", step="0.1") + .content-block + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + // Bottom Tabbar + .toolbar.tabbar.tabbar-labels + .toolbar-inner + a(href="#view-1").tab-link.active + i.icon.tabbar-demo-icon-1 + span.tabbar-label Information + a(href="#view-2").tab-link + i.icon.tabbar-demo-icon-2 + span.tabbar-label Inbox + a(href="#view-3").tab-link + i.icon.tabbar-demo-icon-3 + span.badge.bg-red 4 + span.tabbar-label Upload + a(href="#view-4").tab-link + i.icon.tabbar-demo-icon-4 + span.tabbar-label Photos + + // Path to Framework7 Library JS + script(type="text/javascript", src="../../dist/js/framework7.min.js") + // Path to your app js + script(type="text/javascript", src="js/my-app.js") diff --git a/bower_components/framework7/examples/tab-bar/jade/services.jade b/bower_components/framework7/examples/tab-bar/jade/services.jade new file mode 100644 index 00000000..5df94107 --- /dev/null +++ b/bower_components/framework7/examples/tab-bar/jade/services.jade @@ -0,0 +1,15 @@ +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Services +.pages + .page(data-page="services") + .page-content + .content-block + p Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor. + p Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio. + p Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam. + p Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris. diff --git a/bower_components/framework7/examples/tab-bar/js/my-app.js b/bower_components/framework7/examples/tab-bar/js/my-app.js new file mode 100644 index 00000000..12733f8e --- /dev/null +++ b/bower_components/framework7/examples/tab-bar/js/my-app.js @@ -0,0 +1,15 @@ +// Initialize your app +var myApp = new Framework7(); + +// Export selectors engine +var $$ = Dom7; + +// Add views +var view1 = myApp.addView('#view-1'); +var view2 = myApp.addView('#view-2', { + // Because we use fixed-through navbar we can enable dynamic navbar + dynamicNavbar: true +}); +var view3 = myApp.addView('#view-3'); +var view4 = myApp.addView('#view-4'); + diff --git a/bower_components/framework7/examples/tab-bar/less/my-app.less b/bower_components/framework7/examples/tab-bar/less/my-app.less new file mode 100644 index 00000000..e8eeb1f0 --- /dev/null +++ b/bower_components/framework7/examples/tab-bar/less/my-app.less @@ -0,0 +1,35 @@ +/* Your app custom files in this file */ + +/* Tab bar icons */ +i.tabbar-demo-icon-1 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} +i.tabbar-demo-icon-2 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} +i.tabbar-demo-icon-3 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} +i.tabbar-demo-icon-4 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} \ No newline at end of file diff --git a/bower_components/framework7/examples/tab-bar/services.html b/bower_components/framework7/examples/tab-bar/services.html new file mode 100644 index 00000000..2753756a --- /dev/null +++ b/bower_components/framework7/examples/tab-bar/services.html @@ -0,0 +1,19 @@ + + +
                                              +
                                              +
                                              +
                                              +

                                              Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel commodo massa, eu adipiscing mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ultricies dictum neque, non varius tortor fermentum at. Curabitur auctor cursus imperdiet. Nam molestie nisi nec est lacinia volutpat in a purus. Maecenas consectetur condimentum viverra. Donec ultricies nec sem vel condimentum. Phasellus eu tincidunt enim, sit amet convallis orci. Vestibulum quis fringilla dolor.

                                              +

                                              Mauris commodo lacus at nisl lacinia, nec facilisis erat rhoncus. Sed eget pharetra nunc. Aenean vitae vehicula massa, sed sagittis ante. Quisque luctus nec velit dictum convallis. Nulla facilisi. Ut sed erat nisi. Donec non dolor massa. Mauris malesuada dolor velit, in suscipit leo consectetur vitae. Duis tempus ligula non eros pretium condimentum. Cras sed dolor odio.

                                              +

                                              Suspendisse commodo adipiscing urna, a aliquet sem egestas in. Sed tincidunt dui a magna facilisis bibendum. Nunc euismod consectetur lorem vitae molestie. Proin mattis tellus libero, non hendrerit neque eleifend ac. Pellentesque interdum velit at lacus consectetur scelerisque et id dui. Praesent non fringilla dui, a elementum purus. Proin vitae lacus libero. Nunc eget lectus non mi iaculis interdum vel a velit. Nullam tincidunt purus id lacus ornare, at elementum turpis euismod. Cras mauris enim, congue eu nisl sit amet, pulvinar semper erat. Suspendisse sed mauris diam.

                                              +

                                              Nam eu mauris leo. Pellentesque aliquam vehicula est, sed lobortis tellus malesuada facilisis. Fusce at hendrerit ligula. Donec eu nibh convallis, pulvinar enim quis, lacinia diam. Ut semper ac magna nec ornare. Integer placerat justo sed nunc suscipit facilisis. Vestibulum ac tincidunt augue. Duis eu aliquet mauris, vel luctus mauris. Nulla non augue nec diam pharetra posuere at in mauris.

                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/template7-pages/car.html b/bower_components/framework7/examples/template7-pages/car.html new file mode 100644 index 00000000..b9f1fee7 --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/car.html @@ -0,0 +1,26 @@ + + +
                                              +
                                              +
                                              +
                                              +
                                              +

                                              {{vendor}} {{model}}

                                              +
                                                +
                                              • Power - {{power}} hp
                                              • +
                                              • Max speed - {{speed}} km/h
                                              • +
                                              • Weight - {{weight}} kg
                                              • +
                                              • Color - {{color}}
                                              • +
                                              • Year - {{year}}
                                              • +
                                              +
                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/template7-pages/cars.html b/bower_components/framework7/examples/template7-pages/cars.html new file mode 100644 index 00000000..63952e5e --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/cars.html @@ -0,0 +1,26 @@ + + +
                                              +
                                              +
                                              +
                                              My Cars
                                              +
                                              + +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/template7-pages/contacts.html b/bower_components/framework7/examples/template7-pages/contacts.html new file mode 100644 index 00000000..f100042d --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/contacts.html @@ -0,0 +1,20 @@ + + +
                                              +
                                              +
                                              +
                                              +
                                              +

                                              You can contact me using your iPhone by calling at {{tel}} or using iPad by emailing at {{email}}

                                              +

                                              My address is {{street}}, {{city}}, {{country}}, {{zip}}

                                              +
                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/examples/template7-pages/css/my-app.css b/bower_components/framework7/examples/template7-pages/css/my-app.css new file mode 100644 index 00000000..f47003e8 --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/css/my-app.css @@ -0,0 +1,34 @@ +/* Your app custom files in this file */ +/* Tab bar icons */ +i.tabbar-demo-icon-1 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-1 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +i.tabbar-demo-icon-2 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-2 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +i.tabbar-demo-icon-3 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-3 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +i.tabbar-demo-icon-4 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); +} +.active i.tabbar-demo-icon-4 { + background-image: url("data:image/svg+xml;charset=utf-8,"); +} diff --git a/bower_components/framework7/examples/template7-pages/index.html b/bower_components/framework7/examples/template7-pages/index.html new file mode 100644 index 00000000..a6d10539 --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/index.html @@ -0,0 +1,116 @@ + + + + + + + + My App + + + + + + + +
                                              + +
                                              + +
                                              +
                                              +

                                              Left panel content goes here

                                              +
                                              +
                                              + +
                                              +
                                              +

                                              Right panel content goes here

                                              +
                                              +
                                              + +
                                              + +
                                              + + + + + + +
                                              +
                                              + + + + + + + + \ No newline at end of file diff --git a/bower_components/framework7/examples/template7-pages/jade/car.jade b/bower_components/framework7/examples/template7-pages/jade/car.jade new file mode 100644 index 00000000..61a572d1 --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/jade/car.jade @@ -0,0 +1,23 @@ +.navbar + .navbar-inner + .left.sliding + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding {{vendor}} {{model}} + .right + a(href="#").link.icon-only.open-panel + i.icon.icon-bars +.pages + .page(data-page="car") + .page-content + .content-block + .content-block-inner + h3 {{vendor}} {{model}} + ul + li Power - {{power}} hp + li Max speed - {{speed}} km/h + li Weight - {{weight}} kg + li Color - {{color}} + li Year - {{year}} + \ No newline at end of file diff --git a/bower_components/framework7/examples/template7-pages/jade/cars.jade b/bower_components/framework7/examples/template7-pages/jade/cars.jade new file mode 100644 index 00000000..b2fa8f19 --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/jade/cars.jade @@ -0,0 +1,24 @@ +.navbar + .navbar-inner + .left.sliding + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding My Cars + .right + a(href="#").link.icon-only.open-panel + i.icon.icon-bars +.pages + .page(data-page="cars") + .page-content + .content-block-title My Cars + .list-block + ul + | {{#each this}} + li + | + |
                                              + |
                                              {{vendor}} {{model}}
                                              + |
                                              + |
                                              + | {{/each}} diff --git a/bower_components/framework7/examples/template7-pages/jade/contacts.jade b/bower_components/framework7/examples/template7-pages/jade/contacts.jade new file mode 100644 index 00000000..8905dae4 --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/jade/contacts.jade @@ -0,0 +1,18 @@ +.navbar + .navbar-inner + .left.sliding + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Contacts + .right + a(href="#").link.icon-only.open-panel + i.icon.icon-bars +.pages + .page(data-page="contacts") + .page-content + .content-block + .content-block-inner + p You can contact me using your iPhone by calling at {{tel}} or using iPad by emailing at {{email}} + p My address is {{street}}, {{city}}, {{country}}, {{zip}} + \ No newline at end of file diff --git a/bower_components/framework7/examples/template7-pages/jade/index.jade b/bower_components/framework7/examples/template7-pages/jade/index.jade new file mode 100644 index 00000000..fc94abb6 --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/jade/index.jade @@ -0,0 +1,104 @@ +doctype +html + head + meta(charset="utf-8") + meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") + meta(name='apple-mobile-web-app-capable', content='yes') + meta(name="apple-mobile-web-app-status-bar-style", content="black") + title My App + // Path to Framework7 Library CSS + link(rel="stylesheet", href="../../dist/css/framework7.ios.min.css") + // Path to your custom app styles + link(rel="stylesheet", href="css/my-app.css") + body + // Status bar overlay for fullscreen mode + .statusbar-overlay + + // Panels overlay + .panel-overlay + // Left panel with reveal effect + .panel.panel-left.panel-reveal + .content-block + p Left panel content goes here + // Right panel with cover effect + .panel.panel-right.panel-cover + .content-block + p Right panel content goes here + + // Views + .views + // Your main view, should have "view-main" class + .view.view-main + // Top Navbar + .navbar + .navbar-inner + .center.sliding Template7 Pages + .right + a(href="#").link.icon-only.open-panel + i.icon.icon-bars + // Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes + .pages.navbar-through.toolbar-through + // Index Page + .page(data-page="index") + .page-content + .content-block-title Welcome To My Awesome App + .content-block + .content-block-inner + p This app illustrates how you can use built-in template engine Template7 to render pages with required data. + .list-block + ul + li + a(href="#", data-template="about", data-context-name="about").item-link.item-content + .item-inner + .item-title About Me + li + a(href="projects.html").item-link.item-content + .item-inner + .item-title My Projects + li + a(href="cars.html", data-context-name="cars").item-link.item-content + .item-inner + .item-title My Cars + li + a(href="contacts.html").item-link.item-content + .item-inner + .item-title Contacts + + .content-block-title Side panels + .content-block + .row + .col-50 + a(href="#", data-panel="left").button.open-panel Left Panel + .col-50 + a(href="#", data-panel="right").button.open-panel Right Panel + + // Bottom Toolbar + .toolbar + .toolbar-inner + a(href="#").link Link 1 + a(href="#").link Link 2 + + // Template7 templates + script(type="text/template7", id="about") + .navbar + .navbar-inner + .left.sliding + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding About Me + .right + a(href="#").link.icon-only.open-panel + i.icon.icon-bars + .pages + .page(data-page="about") + .page-content + .content-block + .content-block-inner + p Hello, my name is {{name}}. I am {{age}} years old and i am working as {{position}} at {{company}}. + p I have a lot of interests: {{#if interests}}{{join interests delimeter=", "}}{{/if}} + + // Path to Framework7 Library JS + script(type="text/javascript", src="../../dist/js/framework7.min.js") + // Path to your app js + script(type="text/javascript", src="js/my-app.js") diff --git a/bower_components/framework7/examples/template7-pages/jade/projects.jade b/bower_components/framework7/examples/template7-pages/jade/projects.jade new file mode 100644 index 00000000..8eb8a094 --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/jade/projects.jade @@ -0,0 +1,23 @@ +.navbar + .navbar-inner + .left.sliding + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Projects + .right + a(href="#").link.icon-only.open-panel + i.icon.icon-bars +.pages + .page(data-page="projects") + .page-content + .content-block-title My Projects + .list-block.media-list + ul + | {{#each projects}} + li.item-content + .item-inner + .item-title-row + .item-title {{title}} + .item-subtitle {{description}} + | {{/each}} diff --git a/bower_components/framework7/examples/template7-pages/js/my-app.js b/bower_components/framework7/examples/template7-pages/js/my-app.js new file mode 100644 index 00000000..8ae1c166 --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/js/my-app.js @@ -0,0 +1,101 @@ +// Let's register Template7 helper so we can pass json string in links +Template7.registerHelper('json_stringify', function (context) { + return JSON.stringify(context); +}); + +// Initialize your app +var myApp = new Framework7({ + animateNavBackIcon: true, + // Enable templates auto precompilation + precompileTemplates: true, + // Enabled pages rendering using Template7 + template7Pages: true, + // Specify Template7 data for pages + template7Data: { + // Will be applied for page with "projects.html" url + 'url:projects.html': { + firstname: 'John', + lastname: 'Doe', + age: 32, + position: 'CEO', + company: 'Google', + interests: ['swimming', 'music', 'JavaScript', 'iMac', 'iOS apps', 'sport'], + projects: [ + { + title: 'Google', + description: 'Nice search engine' + }, + { + title: 'YouTube', + description: 'Online video service' + }, + { + title: 'Android', + description: 'Mobile operating system' + } + ] + }, + + // Will be applied for page with data-page="contacts" + 'page:contacts': { + tel: '+1 (222) 333-44-55', + email: 'john@doe.com', + country: 'USA', + city: 'San Francisco', + zip: '12345', + street: 'Awesome st' + }, + + // Just plain data object that we can pass for other pages using data-contextName attribute + cars: [ + { + vendor: 'Volkswagen', + model: 'Passat', + power: 152, + speed: 280, + weight: 1400, + color: 'black', + year: 2012, + description: '' + }, + { + vendor: 'Skoda', + model: 'Superb', + power: 152, + speed: 260, + weight: 1600, + color: 'white', + year: 2013, + description: '' + }, + { + vendor: 'Ford', + model: 'Mustang', + power: 480, + speed: 320, + weight: 1200, + color: 'red', + year: 2014, + description: '' + }, + ], + + // Another plain data object, used in "about" link in data-contextName object + about: { + name: 'John Doe', + age: 32, + position: 'CEO', + company: 'Google', + interests: ['swimming', 'music', 'JavaScript', 'iMac', 'iOS apps', 'sport'] + } + } +}); + +// Export selectors engine +var $$ = Dom7; + +// Add main View +var mainView = myApp.addView('.view-main', { + // Enable dynamic Navbar + dynamicNavbar: true, +}); diff --git a/bower_components/framework7/examples/template7-pages/less/my-app.less b/bower_components/framework7/examples/template7-pages/less/my-app.less new file mode 100644 index 00000000..e8eeb1f0 --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/less/my-app.less @@ -0,0 +1,35 @@ +/* Your app custom files in this file */ + +/* Tab bar icons */ +i.tabbar-demo-icon-1 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} +i.tabbar-demo-icon-2 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} +i.tabbar-demo-icon-3 { + width: 30px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} +i.tabbar-demo-icon-4 { + width: 25px; + height: 30px; + background-image: url("data:image/svg+xml;charset=utf-8,"); + .active & { + background-image: url("data:image/svg+xml;charset=utf-8,"); + } +} \ No newline at end of file diff --git a/bower_components/framework7/examples/template7-pages/projects.html b/bower_components/framework7/examples/template7-pages/projects.html new file mode 100644 index 00000000..ea8d126a --- /dev/null +++ b/bower_components/framework7/examples/template7-pages/projects.html @@ -0,0 +1,27 @@ + + +
                                              +
                                              +
                                              +
                                              My Projects
                                              +
                                              +
                                                {{#each projects}} +
                                              • +
                                                +
                                                +
                                                {{title}}
                                                +
                                                +
                                                {{description}}
                                                +
                                                +
                                              • {{/each}} +
                                              +
                                              +
                                              +
                                              +
                                              \ No newline at end of file diff --git a/bower_components/framework7/index.html b/bower_components/framework7/index.html new file mode 100644 index 00000000..ea938635 --- /dev/null +++ b/bower_components/framework7/index.html @@ -0,0 +1,140 @@ + + + + + Framework7 Kitchen Sink + + + + + + + \ No newline at end of file diff --git a/bower_components/framework7/manifest-icons-ios.json b/bower_components/framework7/manifest-icons-ios.json new file mode 100644 index 00000000..1c24fa59 --- /dev/null +++ b/bower_components/framework7/manifest-icons-ios.json @@ -0,0 +1,779 @@ +{ + "name": "Framework7 Icons", + "icons": [ + { + "name": "add" + }, + { + "name": "add_round" + }, + { + "name": "add_round_fill" + }, + { + "name": "alarm" + }, + { + "name": "alarm_fill" + }, + { + "name": "albums" + }, + { + "name": "albums_fill" + }, + { + "name": "arrow_down" + }, + { + "name": "arrow_down_fill" + }, + { + "name": "arrow_left" + }, + { + "name": "arrow_left_fill" + }, + { + "name": "arrow_right" + }, + { + "name": "arrow_right_fill" + }, + { + "name": "arrow_up" + }, + { + "name": "arrow_up_fill" + }, + { + "name": "at" + }, + { + "name": "at_fill" + }, + { + "name": "bag" + }, + { + "name": "bag_fill" + }, + { + "name": "bars" + }, + { + "name": "bell" + }, + { + "name": "bell_fill" + }, + { + "name": "bolt" + }, + { + "name": "bolt_fill" + }, + { + "name": "bolt_round" + }, + { + "name": "bolt_round_fill" + }, + { + "name": "book" + }, + { + "name": "book_fill" + }, + { + "name": "bookmark" + }, + { + "name": "bookmark_fill" + }, + { + "name": "box" + }, + { + "name": "box_fill" + }, + { + "name": "briefcase" + }, + { + "name": "briefcase_fill" + }, + { + "name": "calendar" + }, + { + "name": "calendar_fill" + }, + { + "name": "camera" + }, + { + "name": "camera_fill" + }, + { + "name": "card" + }, + { + "name": "card_fill" + }, + { + "name": "chat" + }, + { + "name": "chat_fill" + }, + { + "name": "chats" + }, + { + "name": "chats_fill" + }, + { + "name": "check" + }, + { + "name": "check_round" + }, + { + "name": "check_round_fill" + }, + { + "name": "chevron_down" + }, + { + "name": "chevron_left" + }, + { + "name": "chevron_right" + }, + { + "name": "chevron_up" + }, + { + "name": "circle" + }, + { + "name": "circle_fill" + }, + { + "name": "circle_half" + }, + { + "name": "close" + }, + { + "name": "close_round" + }, + { + "name": "close_round_fill" + }, + { + "name": "cloud" + }, + { + "name": "cloud_download" + }, + { + "name": "cloud_download_fill" + }, + { + "name": "cloud_fill" + }, + { + "name": "cloud_upload" + }, + { + "name": "cloud_upload_fill" + }, + { + "name": "collection" + }, + { + "name": "collection_fill" + }, + { + "name": "compass" + }, + { + "name": "compass_fill" + }, + { + "name": "compose" + }, + { + "name": "compose_fill" + }, + { + "name": "data" + }, + { + "name": "data_fill" + }, + { + "name": "delete" + }, + { + "name": "delete_round" + }, + { + "name": "delete_round_fill" + }, + { + "name": "document" + }, + { + "name": "document_fill" + }, + { + "name": "document_text" + }, + { + "name": "document_text_fill" + }, + { + "name": "down" + }, + { + "name": "download" + }, + { + "name": "download_fill" + }, + { + "name": "download_round" + }, + { + "name": "download_round_fill" + }, + { + "name": "drawer" + }, + { + "name": "drawer_fill" + }, + { + "name": "drawers" + }, + { + "name": "drawers_fill" + }, + { + "name": "email" + }, + { + "name": "email_fill" + }, + { + "name": "eye" + }, + { + "name": "eye_fill" + }, + { + "name": "fastforward" + }, + { + "name": "fastforward_fill" + }, + { + "name": "fastforward_round" + }, + { + "name": "fastforward_round_fill" + }, + { + "name": "favorites" + }, + { + "name": "favorites_fill" + }, + { + "name": "film" + }, + { + "name": "film_fill" + }, + { + "name": "filter" + }, + { + "name": "filter-fill" + }, + { + "name": "flag" + }, + { + "name": "flag_fill" + }, + { + "name": "folder" + }, + { + "name": "folder_fill" + }, + { + "name": "forward" + }, + { + "name": "forward_fill" + }, + { + "name": "gear" + }, + { + "name": "gear_fill" + }, + { + "name": "graph_round" + }, + { + "name": "graph_round_fill" + }, + { + "name": "graph_square" + }, + { + "name": "graph_square_fill" + }, + { + "name": "heart" + }, + { + "name": "heart_fill" + }, + { + "name": "help" + }, + { + "name": "help_fill" + }, + { + "name": "home" + }, + { + "name": "home_fill" + }, + { + "name": "images" + }, + { + "name": "images_fill" + }, + { + "name": "info" + }, + { + "name": "info_fill" + }, + { + "name": "keyboard" + }, + { + "name": "keyboard_fill" + }, + { + "name": "layers" + }, + { + "name": "layers_fill" + }, + { + "name": "left" + }, + { + "name": "list" + }, + { + "name": "list_fill" + }, + { + "name": "lock" + }, + { + "name": "lock_fill" + }, + { + "name": "login" + }, + { + "name": "login_fill" + }, + { + "name": "logout" + }, + { + "name": "logout_fill" + }, + { + "name": "menu" + }, + { + "name": "mic" + }, + { + "name": "mic_fill" + }, + { + "name": "money_dollar" + }, + { + "name": "money_dollar_fill" + }, + { + "name": "money_euro" + }, + { + "name": "money_euro_fill" + }, + { + "name": "money_pound" + }, + { + "name": "money_pound_fill" + }, + { + "name": "money_rubl" + }, + { + "name": "money_rubl_fill" + }, + { + "name": "money_yen" + }, + { + "name": "money_yen_fill" + }, + { + "name": "more" + }, + { + "name": "more_fill" + }, + { + "name": "more_round" + }, + { + "name": "more_round_fill" + }, + { + "name": "more_vertical" + }, + { + "name": "more_vertical_fill" + }, + { + "name": "more_vertical_round" + }, + { + "name": "more_vertical_round_fill" + }, + { + "name": "navigation" + }, + { + "name": "navigation_fill" + }, + { + "name": "paper_plane" + }, + { + "name": "paper_plane_fill" + }, + { + "name": "pause" + }, + { + "name": "pause_fill" + }, + { + "name": "pause_round" + }, + { + "name": "pause_round_fill" + }, + { + "name": "person" + }, + { + "name": "person_fill" + }, + { + "name": "persons" + }, + { + "name": "persons_fill" + }, + { + "name": "phone" + }, + { + "name": "phone_fill" + }, + { + "name": "phone_round" + }, + { + "name": "phone_round_fill" + }, + { + "name": "photos" + }, + { + "name": "photos_fill" + }, + { + "name": "pie" + }, + { + "name": "pie_fill" + }, + { + "name": "play" + }, + { + "name": "play_fill" + }, + { + "name": "play_round" + }, + { + "name": "play_round_fill" + }, + { + "name": "radio" + }, + { + "name": "redo" + }, + { + "name": "refresh" + }, + { + "name": "refresh_round" + }, + { + "name": "refresh_round_fill" + }, + { + "name": "reload" + }, + { + "name": "reload_round" + }, + { + "name": "reload_round_fill" + }, + { + "name": "reply" + }, + { + "name": "reply_fill" + }, + { + "name": "rewind" + }, + { + "name": "rewind_fill" + }, + { + "name": "rewind_round" + }, + { + "name": "rewind_round_fill" + }, + { + "name": "right" + }, + { + "name": "search" + }, + { + "name": "search_strong" + }, + { + "name": "settings" + }, + { + "name": "settings_fill" + }, + { + "name": "share" + }, + { + "name": "share_fill" + }, + { + "name": "social_facebook" + }, + { + "name": "social_facebook_fill" + }, + { + "name": "social_github" + }, + { + "name": "social_github_fill" + }, + { + "name": "social_googleplus" + }, + { + "name": "social_instagram" + }, + { + "name": "social_instagram_fill" + }, + { + "name": "social_linkedin" + }, + { + "name": "social_linkedin_fill" + }, + { + "name": "social_rss" + }, + { + "name": "social_rss_fill" + }, + { + "name": "social_twitter" + }, + { + "name": "social_twitter_fill" + }, + { + "name": "sort" + }, + { + "name": "sort_fill" + }, + { + "name": "star" + }, + { + "name": "star_fill" + }, + { + "name": "star_half" + }, + { + "name": "stopwatch" + }, + { + "name": "stopwatch_fill" + }, + { + "name": "tabs" + }, + { + "name": "tabs_fill" + }, + { + "name": "tags" + }, + { + "name": "tags_fill" + }, + { + "name": "tape" + }, + { + "name": "tape_fill" + }, + { + "name": "ticket" + }, + { + "name": "ticket_fill" + }, + { + "name": "time" + }, + { + "name": "time_fill" + }, + { + "name": "timer" + }, + { + "name": "timer_fill" + }, + { + "name": "today" + }, + { + "name": "today_fill" + }, + { + "name": "trash" + }, + { + "name": "trash_fill" + }, + { + "name": "tune" + }, + { + "name": "tune_fill" + }, + { + "name": "undo" + }, + { + "name": "unlock" + }, + { + "name": "unlock_fill" + }, + { + "name": "up" + }, + { + "name": "videocam" + }, + { + "name": "videocam_fill" + }, + { + "name": "videocam_round" + }, + { + "name": "videocam_round_fill" + }, + { + "name": "volume" + }, + { + "name": "volume_fill" + }, + { + "name": "volume_low" + }, + { + "name": "volume_low_fill" + }, + { + "name": "volume_mute" + }, + { + "name": "volume_mute_fill" + }, + { + "name": "world" + }, + { + "name": "world_fill" + }, + { + "name": "zoom_in" + }, + { + "name": "zoom_out" + } + ] +} diff --git a/bower_components/framework7/manifest-icons-material.json b/bower_components/framework7/manifest-icons-material.json new file mode 100644 index 00000000..47aa53aa --- /dev/null +++ b/bower_components/framework7/manifest-icons-material.json @@ -0,0 +1,937 @@ +{ + "name": "Material Icons", + "icons": [ + {"name": "3d_rotation"}, + {"name": "ac_unit"}, + {"name": "access_alarm"}, + {"name": "access_alarms"}, + {"name": "access_time"}, + {"name": "accessibility"}, + {"name": "accessible"}, + {"name": "account_balance"}, + {"name": "account_balance_wallet"}, + {"name": "account_box"}, + {"name": "account_circle"}, + {"name": "adb"}, + {"name": "add"}, + {"name": "add_a_photo"}, + {"name": "add_alarm"}, + {"name": "add_alert"}, + {"name": "add_box"}, + {"name": "add_circle"}, + {"name": "add_circle_outline"}, + {"name": "add_location"}, + {"name": "add_shopping_cart"}, + {"name": "add_to_photos"}, + {"name": "add_to_queue"}, + {"name": "adjust"}, + {"name": "airline_seat_flat"}, + {"name": "airline_seat_flat_angled"}, + {"name": "airline_seat_individual_suite"}, + {"name": "airline_seat_legroom_extra"}, + {"name": "airline_seat_legroom_normal"}, + {"name": "airline_seat_legroom_reduced"}, + {"name": "airline_seat_recline_extra"}, + {"name": "airline_seat_recline_normal"}, + {"name": "airplanemode_active"}, + {"name": "airplanemode_inactive"}, + {"name": "airplay"}, + {"name": "airport_shuttle"}, + {"name": "alarm"}, + {"name": "alarm_add"}, + {"name": "alarm_off"}, + {"name": "alarm_on"}, + {"name": "album"}, + {"name": "all_inclusive"}, + {"name": "all_out"}, + {"name": "android"}, + {"name": "announcement"}, + {"name": "apps"}, + {"name": "archive"}, + {"name": "arrow_back"}, + {"name": "arrow_downward"}, + {"name": "arrow_drop_down"}, + {"name": "arrow_drop_down_circle"}, + {"name": "arrow_drop_up"}, + {"name": "arrow_forward"}, + {"name": "arrow_upward"}, + {"name": "art_track"}, + {"name": "aspect_ratio"}, + {"name": "assessment"}, + {"name": "assignment"}, + {"name": "assignment_ind"}, + {"name": "assignment_late"}, + {"name": "assignment_return"}, + {"name": "assignment_returned"}, + {"name": "assignment_turned_in"}, + {"name": "assistant"}, + {"name": "assistant_photo"}, + {"name": "attach_file"}, + {"name": "attach_money"}, + {"name": "attachment"}, + {"name": "audiotrack"}, + {"name": "autorenew"}, + {"name": "av_timer"}, + {"name": "backspace"}, + {"name": "backup"}, + {"name": "battery_alert"}, + {"name": "battery_charging_full"}, + {"name": "battery_full"}, + {"name": "battery_std"}, + {"name": "battery_unknown"}, + {"name": "beach_access"}, + {"name": "beenhere"}, + {"name": "block"}, + {"name": "bluetooth"}, + {"name": "bluetooth_audio"}, + {"name": "bluetooth_connected"}, + {"name": "bluetooth_disabled"}, + {"name": "bluetooth_searching"}, + {"name": "blur_circular"}, + {"name": "blur_linear"}, + {"name": "blur_off"}, + {"name": "blur_on"}, + {"name": "book"}, + {"name": "bookmark"}, + {"name": "bookmark_border"}, + {"name": "border_all"}, + {"name": "border_bottom"}, + {"name": "border_clear"}, + {"name": "border_color"}, + {"name": "border_horizontal"}, + {"name": "border_inner"}, + {"name": "border_left"}, + {"name": "border_outer"}, + {"name": "border_right"}, + {"name": "border_style"}, + {"name": "border_top"}, + {"name": "border_vertical"}, + {"name": "branding_watermark"}, + {"name": "brightness_1"}, + {"name": "brightness_2"}, + {"name": "brightness_3"}, + {"name": "brightness_4"}, + {"name": "brightness_5"}, + {"name": "brightness_6"}, + {"name": "brightness_7"}, + {"name": "brightness_auto"}, + {"name": "brightness_high"}, + {"name": "brightness_low"}, + {"name": "brightness_medium"}, + {"name": "broken_image"}, + {"name": "brush"}, + {"name": "bubble_chart"}, + {"name": "bug_report"}, + {"name": "build"}, + {"name": "burst_mode"}, + {"name": "business"}, + {"name": "business_center"}, + {"name": "cached"}, + {"name": "cake"}, + {"name": "call"}, + {"name": "call_end"}, + {"name": "call_made"}, + {"name": "call_merge"}, + {"name": "call_missed"}, + {"name": "call_missed_outgoing"}, + {"name": "call_received"}, + {"name": "call_split"}, + {"name": "call_to_action"}, + {"name": "camera"}, + {"name": "camera_alt"}, + {"name": "camera_enhance"}, + {"name": "camera_front"}, + {"name": "camera_rear"}, + {"name": "camera_roll"}, + {"name": "cancel"}, + {"name": "card_giftcard"}, + {"name": "card_membership"}, + {"name": "card_travel"}, + {"name": "casino"}, + {"name": "cast"}, + {"name": "cast_connected"}, + {"name": "center_focus_strong"}, + {"name": "center_focus_weak"}, + {"name": "change_history"}, + {"name": "chat"}, + {"name": "chat_bubble"}, + {"name": "chat_bubble_outline"}, + {"name": "check"}, + {"name": "check_box"}, + {"name": "check_box_outline_blank"}, + {"name": "check_circle"}, + {"name": "chevron_left"}, + {"name": "chevron_right"}, + {"name": "child_care"}, + {"name": "child_friendly"}, + {"name": "chrome_reader_mode"}, + {"name": "class"}, + {"name": "clear"}, + {"name": "clear_all"}, + {"name": "close"}, + {"name": "closed_caption"}, + {"name": "cloud"}, + {"name": "cloud_circle"}, + {"name": "cloud_done"}, + {"name": "cloud_download"}, + {"name": "cloud_off"}, + {"name": "cloud_queue"}, + {"name": "cloud_upload"}, + {"name": "code"}, + {"name": "collections"}, + {"name": "collections_bookmark"}, + {"name": "color_lens"}, + {"name": "colorize"}, + {"name": "comment"}, + {"name": "compare"}, + {"name": "compare_arrows"}, + {"name": "computer"}, + {"name": "confirmation_number"}, + {"name": "contact_mail"}, + {"name": "contact_phone"}, + {"name": "contacts"}, + {"name": "content_copy"}, + {"name": "content_cut"}, + {"name": "content_paste"}, + {"name": "control_point"}, + {"name": "control_point_duplicate"}, + {"name": "copyright"}, + {"name": "create"}, + {"name": "create_new_folder"}, + {"name": "credit_card"}, + {"name": "crop"}, + {"name": "crop_16_9"}, + {"name": "crop_3_2"}, + {"name": "crop_5_4"}, + {"name": "crop_7_5"}, + {"name": "crop_din"}, + {"name": "crop_free"}, + {"name": "crop_landscape"}, + {"name": "crop_original"}, + {"name": "crop_portrait"}, + {"name": "crop_rotate"}, + {"name": "crop_square"}, + {"name": "dashboard"}, + {"name": "data_usage"}, + {"name": "date_range"}, + {"name": "dehaze"}, + {"name": "delete"}, + {"name": "delete_forever"}, + {"name": "delete_sweep"}, + {"name": "description"}, + {"name": "desktop_mac"}, + {"name": "desktop_windows"}, + {"name": "details"}, + {"name": "developer_board"}, + {"name": "developer_mode"}, + {"name": "device_hub"}, + {"name": "devices"}, + {"name": "devices_other"}, + {"name": "dialer_sip"}, + {"name": "dialpad"}, + {"name": "directions"}, + {"name": "directions_bike"}, + {"name": "directions_boat"}, + {"name": "directions_bus"}, + {"name": "directions_car"}, + {"name": "directions_railway"}, + {"name": "directions_run"}, + {"name": "directions_subway"}, + {"name": "directions_transit"}, + {"name": "directions_walk"}, + {"name": "disc_full"}, + {"name": "dns"}, + {"name": "do_not_disturb"}, + {"name": "do_not_disturb_alt"}, + {"name": "do_not_disturb_off"}, + {"name": "do_not_disturb_on"}, + {"name": "dock"}, + {"name": "domain"}, + {"name": "done"}, + {"name": "done_all"}, + {"name": "donut_large"}, + {"name": "donut_small"}, + {"name": "drafts"}, + {"name": "drag_handle"}, + {"name": "drive_eta"}, + {"name": "dvr"}, + {"name": "edit"}, + {"name": "edit_location"}, + {"name": "eject"}, + {"name": "email"}, + {"name": "enhanced_encryption"}, + {"name": "equalizer"}, + {"name": "error"}, + {"name": "error_outline"}, + {"name": "euro_symbol"}, + {"name": "ev_station"}, + {"name": "event"}, + {"name": "event_available"}, + {"name": "event_busy"}, + {"name": "event_note"}, + {"name": "event_seat"}, + {"name": "exit_to_app"}, + {"name": "expand_less"}, + {"name": "expand_more"}, + {"name": "explicit"}, + {"name": "explore"}, + {"name": "exposure"}, + {"name": "exposure_neg_1"}, + {"name": "exposure_neg_2"}, + {"name": "exposure_plus_1"}, + {"name": "exposure_plus_2"}, + {"name": "exposure_zero"}, + {"name": "extension"}, + {"name": "face"}, + {"name": "fast_forward"}, + {"name": "fast_rewind"}, + {"name": "favorite"}, + {"name": "favorite_border"}, + {"name": "featured_play_list"}, + {"name": "featured_video"}, + {"name": "feedback"}, + {"name": "fiber_dvr"}, + {"name": "fiber_manual_record"}, + {"name": "fiber_new"}, + {"name": "fiber_pin"}, + {"name": "fiber_smart_record"}, + {"name": "file_download"}, + {"name": "file_upload"}, + {"name": "filter"}, + {"name": "filter_1"}, + {"name": "filter_2"}, + {"name": "filter_3"}, + {"name": "filter_4"}, + {"name": "filter_5"}, + {"name": "filter_6"}, + {"name": "filter_7"}, + {"name": "filter_8"}, + {"name": "filter_9"}, + {"name": "filter_9_plus"}, + {"name": "filter_b_and_w"}, + {"name": "filter_center_focus"}, + {"name": "filter_drama"}, + {"name": "filter_frames"}, + {"name": "filter_hdr"}, + {"name": "filter_list"}, + {"name": "filter_none"}, + {"name": "filter_tilt_shift"}, + {"name": "filter_vintage"}, + {"name": "find_in_page"}, + {"name": "find_replace"}, + {"name": "fingerprint"}, + {"name": "first_page"}, + {"name": "fitness_center"}, + {"name": "flag"}, + {"name": "flare"}, + {"name": "flash_auto"}, + {"name": "flash_off"}, + {"name": "flash_on"}, + {"name": "flight"}, + {"name": "flight_land"}, + {"name": "flight_takeoff"}, + {"name": "flip"}, + {"name": "flip_to_back"}, + {"name": "flip_to_front"}, + {"name": "folder"}, + {"name": "folder_open"}, + {"name": "folder_shared"}, + {"name": "folder_special"}, + {"name": "font_download"}, + {"name": "format_align_center"}, + {"name": "format_align_justify"}, + {"name": "format_align_left"}, + {"name": "format_align_right"}, + {"name": "format_bold"}, + {"name": "format_clear"}, + {"name": "format_color_fill"}, + {"name": "format_color_reset"}, + {"name": "format_color_text"}, + {"name": "format_indent_decrease"}, + {"name": "format_indent_increase"}, + {"name": "format_italic"}, + {"name": "format_line_spacing"}, + {"name": "format_list_bulleted"}, + {"name": "format_list_numbered"}, + {"name": "format_paint"}, + {"name": "format_quote"}, + {"name": "format_shapes"}, + {"name": "format_size"}, + {"name": "format_strikethrough"}, + {"name": "format_textdirection_l_to_r"}, + {"name": "format_textdirection_r_to_l"}, + {"name": "format_underlined"}, + {"name": "forum"}, + {"name": "forward"}, + {"name": "forward_10"}, + {"name": "forward_30"}, + {"name": "forward_5"}, + {"name": "free_breakfast"}, + {"name": "fullscreen"}, + {"name": "fullscreen_exit"}, + {"name": "functions"}, + {"name": "g_translate"}, + {"name": "gamepad"}, + {"name": "games"}, + {"name": "gavel"}, + {"name": "gesture"}, + {"name": "get_app"}, + {"name": "gif"}, + {"name": "golf_course"}, + {"name": "gps_fixed"}, + {"name": "gps_not_fixed"}, + {"name": "gps_off"}, + {"name": "grade"}, + {"name": "gradient"}, + {"name": "grain"}, + {"name": "graphic_eq"}, + {"name": "grid_off"}, + {"name": "grid_on"}, + {"name": "group"}, + {"name": "group_add"}, + {"name": "group_work"}, + {"name": "hd"}, + {"name": "hdr_off"}, + {"name": "hdr_on"}, + {"name": "hdr_strong"}, + {"name": "hdr_weak"}, + {"name": "headset"}, + {"name": "headset_mic"}, + {"name": "healing"}, + {"name": "hearing"}, + {"name": "help"}, + {"name": "help_outline"}, + {"name": "high_quality"}, + {"name": "highlight"}, + {"name": "highlight_off"}, + {"name": "history"}, + {"name": "home"}, + {"name": "hot_tub"}, + {"name": "hotel"}, + {"name": "hourglass_empty"}, + {"name": "hourglass_full"}, + {"name": "http"}, + {"name": "https"}, + {"name": "image"}, + {"name": "image_aspect_ratio"}, + {"name": "import_contacts"}, + {"name": "import_export"}, + {"name": "important_devices"}, + {"name": "inbox"}, + {"name": "indeterminate_check_box"}, + {"name": "info"}, + {"name": "info_outline"}, + {"name": "input"}, + {"name": "insert_chart"}, + {"name": "insert_comment"}, + {"name": "insert_drive_file"}, + {"name": "insert_emoticon"}, + {"name": "insert_invitation"}, + {"name": "insert_link"}, + {"name": "insert_photo"}, + {"name": "invert_colors"}, + {"name": "invert_colors_off"}, + {"name": "iso"}, + {"name": "keyboard"}, + {"name": "keyboard_arrow_down"}, + {"name": "keyboard_arrow_left"}, + {"name": "keyboard_arrow_right"}, + {"name": "keyboard_arrow_up"}, + {"name": "keyboard_backspace"}, + {"name": "keyboard_capslock"}, + {"name": "keyboard_hide"}, + {"name": "keyboard_return"}, + {"name": "keyboard_tab"}, + {"name": "keyboard_voice"}, + {"name": "kitchen"}, + {"name": "label"}, + {"name": "label_outline"}, + {"name": "landscape"}, + {"name": "language"}, + {"name": "laptop"}, + {"name": "laptop_chromebook"}, + {"name": "laptop_mac"}, + {"name": "laptop_windows"}, + {"name": "last_page"}, + {"name": "launch"}, + {"name": "layers"}, + {"name": "layers_clear"}, + {"name": "leak_add"}, + {"name": "leak_remove"}, + {"name": "lens"}, + {"name": "library_add"}, + {"name": "library_books"}, + {"name": "library_music"}, + {"name": "lightbulb_outline"}, + {"name": "line_style"}, + {"name": "line_weight"}, + {"name": "linear_scale"}, + {"name": "link"}, + {"name": "linked_camera"}, + {"name": "list"}, + {"name": "live_help"}, + {"name": "live_tv"}, + {"name": "local_activity"}, + {"name": "local_airport"}, + {"name": "local_atm"}, + {"name": "local_bar"}, + {"name": "local_cafe"}, + {"name": "local_car_wash"}, + {"name": "local_convenience_store"}, + {"name": "local_dining"}, + {"name": "local_drink"}, + {"name": "local_florist"}, + {"name": "local_gas_station"}, + {"name": "local_grocery_store"}, + {"name": "local_hospital"}, + {"name": "local_hotel"}, + {"name": "local_laundry_service"}, + {"name": "local_library"}, + {"name": "local_mall"}, + {"name": "local_movies"}, + {"name": "local_offer"}, + {"name": "local_parking"}, + {"name": "local_pharmacy"}, + {"name": "local_phone"}, + {"name": "local_pizza"}, + {"name": "local_play"}, + {"name": "local_post_office"}, + {"name": "local_printshop"}, + {"name": "local_see"}, + {"name": "local_shipping"}, + {"name": "local_taxi"}, + {"name": "location_city"}, + {"name": "location_disabled"}, + {"name": "location_off"}, + {"name": "location_on"}, + {"name": "location_searching"}, + {"name": "lock"}, + {"name": "lock_open"}, + {"name": "lock_outline"}, + {"name": "looks"}, + {"name": "looks_3"}, + {"name": "looks_4"}, + {"name": "looks_5"}, + {"name": "looks_6"}, + {"name": "looks_one"}, + {"name": "looks_two"}, + {"name": "loop"}, + {"name": "loupe"}, + {"name": "low_priority"}, + {"name": "loyalty"}, + {"name": "mail"}, + {"name": "mail_outline"}, + {"name": "map"}, + {"name": "markunread"}, + {"name": "markunread_mailbox"}, + {"name": "memory"}, + {"name": "menu"}, + {"name": "merge_type"}, + {"name": "message"}, + {"name": "mic"}, + {"name": "mic_none"}, + {"name": "mic_off"}, + {"name": "mms"}, + {"name": "mode_comment"}, + {"name": "mode_edit"}, + {"name": "monetization_on"}, + {"name": "money_off"}, + {"name": "monochrome_photos"}, + {"name": "mood"}, + {"name": "mood_bad"}, + {"name": "more"}, + {"name": "more_horiz"}, + {"name": "more_vert"}, + {"name": "motorcycle"}, + {"name": "mouse"}, + {"name": "move_to_inbox"}, + {"name": "movie"}, + {"name": "movie_creation"}, + {"name": "movie_filter"}, + {"name": "multiline_chart"}, + {"name": "music_note"}, + {"name": "music_video"}, + {"name": "my_location"}, + {"name": "nature"}, + {"name": "nature_people"}, + {"name": "navigate_before"}, + {"name": "navigate_next"}, + {"name": "navigation"}, + {"name": "near_me"}, + {"name": "network_cell"}, + {"name": "network_check"}, + {"name": "network_locked"}, + {"name": "network_wifi"}, + {"name": "new_releases"}, + {"name": "next_week"}, + {"name": "nfc"}, + {"name": "no_encryption"}, + {"name": "no_sim"}, + {"name": "not_interested"}, + {"name": "note"}, + {"name": "note_add"}, + {"name": "notifications"}, + {"name": "notifications_active"}, + {"name": "notifications_none"}, + {"name": "notifications_off"}, + {"name": "notifications_paused"}, + {"name": "offline_pin"}, + {"name": "ondemand_video"}, + {"name": "opacity"}, + {"name": "open_in_browser"}, + {"name": "open_in_new"}, + {"name": "open_with"}, + {"name": "pages"}, + {"name": "pageview"}, + {"name": "palette"}, + {"name": "pan_tool"}, + {"name": "panorama"}, + {"name": "panorama_fish_eye"}, + {"name": "panorama_horizontal"}, + {"name": "panorama_vertical"}, + {"name": "panorama_wide_angle"}, + {"name": "party_mode"}, + {"name": "pause"}, + {"name": "pause_circle_filled"}, + {"name": "pause_circle_outline"}, + {"name": "payment"}, + {"name": "people"}, + {"name": "people_outline"}, + {"name": "perm_camera_mic"}, + {"name": "perm_contact_calendar"}, + {"name": "perm_data_setting"}, + {"name": "perm_device_information"}, + {"name": "perm_identity"}, + {"name": "perm_media"}, + {"name": "perm_phone_msg"}, + {"name": "perm_scan_wifi"}, + {"name": "person"}, + {"name": "person_add"}, + {"name": "person_outline"}, + {"name": "person_pin"}, + {"name": "person_pin_circle"}, + {"name": "personal_video"}, + {"name": "pets"}, + {"name": "phone"}, + {"name": "phone_android"}, + {"name": "phone_bluetooth_speaker"}, + {"name": "phone_forwarded"}, + {"name": "phone_in_talk"}, + {"name": "phone_iphone"}, + {"name": "phone_locked"}, + {"name": "phone_missed"}, + {"name": "phone_paused"}, + {"name": "phonelink"}, + {"name": "phonelink_erase"}, + {"name": "phonelink_lock"}, + {"name": "phonelink_off"}, + {"name": "phonelink_ring"}, + {"name": "phonelink_setup"}, + {"name": "photo"}, + {"name": "photo_album"}, + {"name": "photo_camera"}, + {"name": "photo_filter"}, + {"name": "photo_library"}, + {"name": "photo_size_select_actual"}, + {"name": "photo_size_select_large"}, + {"name": "photo_size_select_small"}, + {"name": "picture_as_pdf"}, + {"name": "picture_in_picture"}, + {"name": "picture_in_picture_alt"}, + {"name": "pie_chart"}, + {"name": "pie_chart_outlined"}, + {"name": "pin_drop"}, + {"name": "place"}, + {"name": "play_arrow"}, + {"name": "play_circle_filled"}, + {"name": "play_circle_outline"}, + {"name": "play_for_work"}, + {"name": "playlist_add"}, + {"name": "playlist_add_check"}, + {"name": "playlist_play"}, + {"name": "plus_one"}, + {"name": "poll"}, + {"name": "polymer"}, + {"name": "pool"}, + {"name": "portable_wifi_off"}, + {"name": "portrait"}, + {"name": "power"}, + {"name": "power_input"}, + {"name": "power_settings_new"}, + {"name": "pregnant_woman"}, + {"name": "present_to_all"}, + {"name": "print"}, + {"name": "priority_high"}, + {"name": "public"}, + {"name": "publish"}, + {"name": "query_builder"}, + {"name": "question_answer"}, + {"name": "queue"}, + {"name": "queue_music"}, + {"name": "queue_play_next"}, + {"name": "radio"}, + {"name": "radio_button_checked"}, + {"name": "radio_button_unchecked"}, + {"name": "rate_review"}, + {"name": "receipt"}, + {"name": "recent_actors"}, + {"name": "record_voice_over"}, + {"name": "redeem"}, + {"name": "redo"}, + {"name": "refresh"}, + {"name": "remove"}, + {"name": "remove_circle"}, + {"name": "remove_circle_outline"}, + {"name": "remove_from_queue"}, + {"name": "remove_red_eye"}, + {"name": "remove_shopping_cart"}, + {"name": "reorder"}, + {"name": "repeat"}, + {"name": "repeat_one"}, + {"name": "replay"}, + {"name": "replay_10"}, + {"name": "replay_30"}, + {"name": "replay_5"}, + {"name": "reply"}, + {"name": "reply_all"}, + {"name": "report"}, + {"name": "report_problem"}, + {"name": "restaurant"}, + {"name": "restaurant_menu"}, + {"name": "restore"}, + {"name": "restore_page"}, + {"name": "ring_volume"}, + {"name": "room"}, + {"name": "room_service"}, + {"name": "rotate_90_degrees_ccw"}, + {"name": "rotate_left"}, + {"name": "rotate_right"}, + {"name": "rounded_corner"}, + {"name": "router"}, + {"name": "rowing"}, + {"name": "rss_feed"}, + {"name": "rv_hookup"}, + {"name": "satellite"}, + {"name": "save"}, + {"name": "scanner"}, + {"name": "schedule"}, + {"name": "school"}, + {"name": "screen_lock_landscape"}, + {"name": "screen_lock_portrait"}, + {"name": "screen_lock_rotation"}, + {"name": "screen_rotation"}, + {"name": "screen_share"}, + {"name": "sd_card"}, + {"name": "sd_storage"}, + {"name": "search"}, + {"name": "security"}, + {"name": "select_all"}, + {"name": "send"}, + {"name": "sentiment_dissatisfied"}, + {"name": "sentiment_neutral"}, + {"name": "sentiment_satisfied"}, + {"name": "sentiment_very_dissatisfied"}, + {"name": "sentiment_very_satisfied"}, + {"name": "settings"}, + {"name": "settings_applications"}, + {"name": "settings_backup_restore"}, + {"name": "settings_bluetooth"}, + {"name": "settings_brightness"}, + {"name": "settings_cell"}, + {"name": "settings_ethernet"}, + {"name": "settings_input_antenna"}, + {"name": "settings_input_component"}, + {"name": "settings_input_composite"}, + {"name": "settings_input_hdmi"}, + {"name": "settings_input_svideo"}, + {"name": "settings_overscan"}, + {"name": "settings_phone"}, + {"name": "settings_power"}, + {"name": "settings_remote"}, + {"name": "settings_system_daydream"}, + {"name": "settings_voice"}, + {"name": "share"}, + {"name": "shop"}, + {"name": "shop_two"}, + {"name": "shopping_basket"}, + {"name": "shopping_cart"}, + {"name": "short_text"}, + {"name": "show_chart"}, + {"name": "shuffle"}, + {"name": "signal_cellular_4_bar"}, + {"name": "signal_cellular_connected_no_internet_4_bar"}, + {"name": "signal_cellular_no_sim"}, + {"name": "signal_cellular_null"}, + {"name": "signal_cellular_off"}, + {"name": "signal_wifi_4_bar"}, + {"name": "signal_wifi_4_bar_lock"}, + {"name": "signal_wifi_off"}, + {"name": "sim_card"}, + {"name": "sim_card_alert"}, + {"name": "skip_next"}, + {"name": "skip_previous"}, + {"name": "slideshow"}, + {"name": "slow_motion_video"}, + {"name": "smartphone"}, + {"name": "smoke_free"}, + {"name": "smoking_rooms"}, + {"name": "sms"}, + {"name": "sms_failed"}, + {"name": "snooze"}, + {"name": "sort"}, + {"name": "sort_by_alpha"}, + {"name": "spa"}, + {"name": "space_bar"}, + {"name": "speaker"}, + {"name": "speaker_group"}, + {"name": "speaker_notes"}, + {"name": "speaker_notes_off"}, + {"name": "speaker_phone"}, + {"name": "spellcheck"}, + {"name": "star"}, + {"name": "star_border"}, + {"name": "star_half"}, + {"name": "stars"}, + {"name": "stay_current_landscape"}, + {"name": "stay_current_portrait"}, + {"name": "stay_primary_landscape"}, + {"name": "stay_primary_portrait"}, + {"name": "stop"}, + {"name": "stop_screen_share"}, + {"name": "storage"}, + {"name": "store"}, + {"name": "store_mall_directory"}, + {"name": "straighten"}, + {"name": "streetview"}, + {"name": "strikethrough_s"}, + {"name": "style"}, + {"name": "subdirectory_arrow_left"}, + {"name": "subdirectory_arrow_right"}, + {"name": "subject"}, + {"name": "subscriptions"}, + {"name": "subtitles"}, + {"name": "subway"}, + {"name": "supervisor_account"}, + {"name": "surround_sound"}, + {"name": "swap_calls"}, + {"name": "swap_horiz"}, + {"name": "swap_vert"}, + {"name": "swap_vertical_circle"}, + {"name": "switch_camera"}, + {"name": "switch_video"}, + {"name": "sync"}, + {"name": "sync_disabled"}, + {"name": "sync_problem"}, + {"name": "system_update"}, + {"name": "system_update_alt"}, + {"name": "tab"}, + {"name": "tab_unselected"}, + {"name": "tablet"}, + {"name": "tablet_android"}, + {"name": "tablet_mac"}, + {"name": "tag_faces"}, + {"name": "tap_and_play"}, + {"name": "terrain"}, + {"name": "text_fields"}, + {"name": "text_format"}, + {"name": "textsms"}, + {"name": "texture"}, + {"name": "theaters"}, + {"name": "thumb_down"}, + {"name": "thumb_up"}, + {"name": "thumbs_up_down"}, + {"name": "time_to_leave"}, + {"name": "timelapse"}, + {"name": "timeline"}, + {"name": "timer"}, + {"name": "timer_10"}, + {"name": "timer_3"}, + {"name": "timer_off"}, + {"name": "title"}, + {"name": "toc"}, + {"name": "today"}, + {"name": "toll"}, + {"name": "tonality"}, + {"name": "touch_app"}, + {"name": "toys"}, + {"name": "track_changes"}, + {"name": "traffic"}, + {"name": "train"}, + {"name": "tram"}, + {"name": "transfer_within_a_station"}, + {"name": "transform"}, + {"name": "translate"}, + {"name": "trending_down"}, + {"name": "trending_flat"}, + {"name": "trending_up"}, + {"name": "tune"}, + {"name": "turned_in"}, + {"name": "turned_in_not"}, + {"name": "tv"}, + {"name": "unarchive"}, + {"name": "undo"}, + {"name": "unfold_less"}, + {"name": "unfold_more"}, + {"name": "update"}, + {"name": "usb"}, + {"name": "verified_user"}, + {"name": "vertical_align_bottom"}, + {"name": "vertical_align_center"}, + {"name": "vertical_align_top"}, + {"name": "vibration"}, + {"name": "video_call"}, + {"name": "video_label"}, + {"name": "video_library"}, + {"name": "videocam"}, + {"name": "videocam_off"}, + {"name": "videogame_asset"}, + {"name": "view_agenda"}, + {"name": "view_array"}, + {"name": "view_carousel"}, + {"name": "view_column"}, + {"name": "view_comfy"}, + {"name": "view_compact"}, + {"name": "view_day"}, + {"name": "view_headline"}, + {"name": "view_list"}, + {"name": "view_module"}, + {"name": "view_quilt"}, + {"name": "view_stream"}, + {"name": "view_week"}, + {"name": "vignette"}, + {"name": "visibility"}, + {"name": "visibility_off"}, + {"name": "voice_chat"}, + {"name": "voicemail"}, + {"name": "volume_down"}, + {"name": "volume_mute"}, + {"name": "volume_off"}, + {"name": "volume_up"}, + {"name": "vpn_key"}, + {"name": "vpn_lock"}, + {"name": "wallpaper"}, + {"name": "warning"}, + {"name": "watch"}, + {"name": "watch_later"}, + {"name": "wb_auto"}, + {"name": "wb_cloudy"}, + {"name": "wb_incandescent"}, + {"name": "wb_iridescent"}, + {"name": "wb_sunny"}, + {"name": "wc"}, + {"name": "web"}, + {"name": "web_asset"}, + {"name": "weekend"}, + {"name": "whatshot"}, + {"name": "widgets"}, + {"name": "wifi"}, + {"name": "wifi_lock"}, + {"name": "wifi_tethering"}, + {"name": "work"}, + {"name": "wrap_text"}, + {"name": "youtube_searched_for"}, + {"name": "zoom_in"}, + {"name": "zoom_out"}, + {"name": "zoom_out_map"} + ] +} \ No newline at end of file diff --git a/bower_components/framework7/modules.json b/bower_components/framework7/modules.json new file mode 100644 index 00000000..7ed3b394 --- /dev/null +++ b/bower_components/framework7/modules.json @@ -0,0 +1,256 @@ +{ + "core_intro" : { + "js" : [ + "src/js/wrap-start.js", + "src/js/framework7/f7-intro.js", + "src/js/framework7/views.js", + "src/js/framework7/navbars.js", + "src/js/framework7/xhr.js", + "src/js/framework7/pages.js", + "src/js/framework7/router.js", + "src/js/framework7/clicks.js", + "src/js/framework7/resize.js", + "src/js/framework7/panels.js", + "src/js/framework7/lazy-load.js", + "src/js/framework7/material-preloader.js" + ], + "less" : { + "ios" : [ + "src/less/ios/_mixins.less", + "src/less/ios/_colors-vars.less", + "src/less/ios/intro.less", + "src/less/ios/grid.less", + "src/less/ios/views.less", + "src/less/ios/pages.less", + "src/less/ios/toolbars.less", + "src/less/ios/toolbars-pages.less", + "src/less/ios/icons.less", + "src/less/ios/badges.less", + "src/less/ios/content-block.less", + "src/less/ios/lists.less", + "src/less/ios/contacts.less", + "src/less/ios/forms.less", + "src/less/ios/floating-button.less", + "src/less/ios/panels.less", + "src/less/ios/lazy-load.less", + "src/less/ios/statusbar.less", + "src/less/ios/preloader.less" + ], + "material" : [ + "src/less/material/_mixins.less", + "src/less/material/_colors-vars.less", + "src/less/material/_dark-colors-vars.less", + "src/less/material/intro.less", + "src/less/material/grid.less", + "src/less/material/views.less", + "src/less/material/pages.less", + "src/less/material/toolbars.less", + "src/less/material/toolbars-pages.less", + "src/less/material/icons.less", + "src/less/material/badges.less", + "src/less/material/chips.less", + "src/less/material/content-block.less", + "src/less/material/lists.less", + "src/less/material/contacts.less", + "src/less/material/forms.less", + "src/less/material/floating-button.less", + "src/less/material/panels.less", + "src/less/material/lazy-load.less", + "src/less/material/statusbar.less", + "src/less/material/preloader.less" + ] + } + }, + "core_outro" : { + "js" : [ + "src/js/framework7/template7-templates.js", + "src/js/framework7/plugins.js", + "src/js/framework7/init.js", + "src/js/framework7/f7-outro.js", + "src/js/dom7/dom7-intro.js", + "src/js/dom7/dom7-methods.js", + "src/js/dom7/dom7-utils.js", + "src/js/dom7/dom7-ajax.js", + "src/js/dom7/dom7-outro.js", + "src/js/animate7/animate7.js", + "src/js/framework7/proto-support.js", + "src/js/framework7/proto-device.js", + "src/js/framework7/proto-plugins.js", + "src/js/template7/template7.js", + "src/js/wrap-end.js" + ], + "less" : { + "ios" : [ + "src/less/ios/login-screen.less", + "src/less/ios/disabled.less" + ], + "material" : [ + "src/less/material/login-screen.less", + "src/less/material/ripple.less", + "src/less/material/disabled.less" + ] + } + + }, + + "accordion": { + "js" : ["src/js/framework7/accordion.js"], + "less": { + "ios": ["src/less/ios/accordion.less"], + "material": ["src/less/material/accordion.less"] + }, + "dependencies" : [] + }, + "searchbar": { + "js" : ["src/js/framework7/searchbar.js"], + "less": { + "ios": ["src/less/ios/searchbar.less"], + "material": ["src/less/material/searchbar.less"] + }, + "dependencies" : [] + }, + "messages": { + "js" : ["src/js/framework7/messagebar.js", "src/js/framework7/messages.js"], + "less": { + "ios": ["src/less/ios/messagebar.less", "src/less/ios/messages.less"], + "material": ["src/less/material/messagebar.less", "src/less/material/messages.less"] + }, + "dependencies" : [] + }, + "modals": { + "js" : ["src/js/framework7/modals.js"], + "less": { + "ios": ["src/less/ios/modals.less"], + "material": ["src/less/material/modals.less"] + }, + "dependencies" : [] + }, + "progressbar": { + "js" : ["src/js/framework7/progressbar.js"], + "less": { + "ios": ["src/less/ios/progressbar.less"], + "material": ["src/less/material/progressbar.less"] + }, + "dependencies" : [] + }, + "swipeout": { + "js" : ["src/js/framework7/swipeout.js"], + "less": {}, + "dependencies" : [] + }, + "sortable": { + "js" : ["src/js/framework7/sortable.js"], + "less": {}, + "dependencies" : [] + }, + "cards": { + "js" : [], + "less": { + "ios": ["src/less/ios/cards.less"], + "material": ["src/less/material/cards.less"] + }, + "dependencies" : [] + }, + "smart-select": { + "js" : ["src/js/framework7/smart-select.js"], + "less": {}, + "dependencies" : [] + }, + "virtual-list": { + "js" : ["src/js/framework7/virtual-list.js"], + "less": {}, + "dependencies" : [] + }, + "pull-to-refresh": { + "js" : ["src/js/framework7/pull-to-refresh.js"], + "less": { + "ios": ["src/less/ios/pull-to-refresh.less"], + "material": ["src/less/material/pull-to-refresh.less"] + }, + "dependencies" : [] + }, + "infinite-scroll": { + "js" : ["src/js/framework7/infinite-scroll.js"], + "less": { + "ios": ["src/less/ios/infinite-scroll.less"], + "material": ["src/less/material/infinite-scroll.less"] + }, + "dependencies" : [] + }, + "scroll-toolbars": { + "js" : ["src/js/framework7/scroll-toolbars.js"], + "less": {}, + "dependencies" : [] + }, + "tabs": { + "js" : ["src/js/framework7/material-tabbar.js","src/js/framework7/tabs.js"], + "less": { + "ios": ["src/less/ios/tabs.less"], + "material": ["src/less/material/tabs.less"] + }, + "dependencies" : [] + }, + "fast-clicks": { + "js" : ["src/js/framework7/fast-clicks.js"], + "less": {}, + "dependencies" : [] + }, + "forms": { + "js" : ["src/js/framework7/forms-storage.js", "src/js/framework7/forms-ajax.js", "src/js/framework7/forms-textarea.js", "src/js/framework7/material-inputs.js"], + "less": {}, + "dependencies" : [] + }, + "push-state": { + "js" : ["src/js/framework7/push-state.js"], + "less" : {}, + "dependencies" : [] + }, + "swiper": { + "js" : ["src/js/swiper/swiper.js", "src/js/framework7/swiper-init.js"], + "less": { + "ios": ["src/less/ios/swiper.less"], + "material": ["src/less/material/swiper.less"] + }, + "dependencies" : [] + }, + "photo-browser": { + "js" : ["src/js/framework7/photo-browser.js"], + "less": { + "ios": ["src/less/ios/photo-browser.less"], + "material": ["src/less/material/photo-browser.less"] + }, + "dependencies" : ["swiper"] + }, + "autocomplete": { + "js" : ["src/js/framework7/autocomplete.js"], + "less": { + "ios": ["src/less/ios/autocomplete.less"], + "material": ["src/less/material/autocomplete.less"] + }, + "dependencies" : ["searchbar"] + }, + "notifications": { + "js" : ["src/js/framework7/notifications.js"], + "less": { + "ios": ["src/less/ios/notifications.less"], + "material": ["src/less/material/notifications.less"] + }, + "dependencies" : [] + }, + "picker": { + "js" : ["src/js/framework7/picker.js"], + "less": { + "ios": ["src/less/ios/picker.less"], + "material": ["src/less/material/picker.less"] + }, + "dependencies" : ["modals"] + }, + "calendar": { + "js" : ["src/js/framework7/calendar.js"], + "less": { + "ios": ["src/less/ios/calendar.less"], + "material": ["src/less/material/calendar.less"] + }, + "dependencies" : ["modals"] + } +} diff --git a/bower_components/framework7/src/img/i-f7-ios.png b/bower_components/framework7/src/img/i-f7-ios.png new file mode 100644 index 0000000000000000000000000000000000000000..10753551ac9437c5e4df017fccda0b9c8227ef6b GIT binary patch literal 7289 zcmaKRbyQUE+BVG~pp>*Y46O`34Ba6hozlZFGz<(w3l2kwNJ$DJCDPqWOQh|d4WO#f)IWIVSZr&u#m8Xh=7EM5b!?-=++v_)=olC zN##GbZttW)4rsKy1V6uzj}M=ZFdq_S&o3x0F3v9?#4jWSzSRJG`njQDzF;>`wtpCu z5T0<9qdVFW=?47E2(v+Yp`}5$p8h)oS9eX#{}Q`-{wGnlDdYErx$_J13GlnR{*CKj z+MZ}V#Q%5Wf7SLh@N-A->mfXmUMTo&J?z;20pI5C|2Fhj@zxs&ZIt6}QD81gNVu0P z!VRsaBn`TK!e{GfD7lT0%0zwcwVbFi@w*Mo0|L)RT z$!#R=|2QNeDl9BwCuk>lO9Y331qGpEU~#CJ4H#~RuoVy!uoD&(vjy?ry2$^xasEdm z{Uf^V&cECLj>YZGe+LWUb~{a|+p!tIsXM~Kp^sKmk~i@E*=erP$7}4dEphes~1E-xBjIG?Ap1dQ|BMZzT{ zJtroDJ#lr1j%-9%S4Ve<{oIhqli4UqE^14@Pu$0l$*Y{<2s+Xl&o9;VZ~YDr{br~i&_k%Pv-D#A_RDfl=xOmMZ+ooG`02;2B6*y5XUT#R6T7TM2W zudYfdH!@{PM@cPQv$DA3&P`0!BfM@QlgF9bYn0(xra%pcEf2jmsbOfo;|DmIwkH03 z9pDSTJyhm3OZ!Bppl#H5Vr5(;){`{aZ7JQ zI|P7USTUwsNp%vhn^Adtqv)gXeS(#H7>a;Tjg2n?(d3A0H7x9V-$D9S=f>8AEWDG& zCJXSHDo02SFD{<=R}|}OX(}rwg;wn)!9!!EEU4=5gERak8=HG4)D}1GNzeB|q&N zBZZ0dYr(^dFCI-H^XpKj!^%I=hN1TvYm1(p40SnM|Hid&*HFVk2Um4wogTzEZkTuj zyGj4x=*dy6J-Eve12w4_F$k4pjKL`&&23lS=?E^cw+GlQ_mmxPKV-12H&?g=u)rh0taju$vh&7O4fjv@>&NUNI`k^I*>lCkW=@2P zhQ}3yPVV2k&O|-IDQKC0eTgb zYNkr(g@x~4ejkopuu1C?Dx&Zc#XswE&?5O96GlZ3>7yvBM@7;$<7Zf#yJ~KI@B!5& zxZ+xvHauZ`uE3(E`=I#Oc#jqQ zs}1Gp+VF{WjjR@FVp1j1gCp-w=F9y}?hos^f1LWbe&XfG?YMl3)yZXeA~eau6s2YG8Fu6wKjYsec#=(#x9uxm#jjA zw2lb>I$UdSwB_5+1MmBj!@YPp3W*K*NYQB zEm_%%1m4@u`FT zn9`q^GQGm|I_%Usmd1puT8)4OLM>aOU+k5!I>Z{QVVa>uhnwN0RfFu})zr9<370gY zYU*LvHlnt3tvy;A(K_%ffxuBfL7_vN$KCz+?t z(O;AJMr(VgvCtjq62}vNO{WRjE63}(favMqv^KCD=%3Cv9ua1vL%s86Hl;tOXf|O{+j0aJX8y94jBN6VJ8g;%dFSSsLj<%bVjNbUW*gbUH_TBd zFfv0(_-gl%RDXOBU9?(=7P!}X@Ssipe7n&{_O$(~)MG2wXxEb1K*@EOhKzIQY^12` zd{vt$$7fEy`s(x98bNn?i^TaNU2ku1{`}>NhXwsSFO;ZNtHgUR40tD`LUK^ql_@Ev zC~GXgzcl{iBmNqe;e$ch)ANbFU;7vHJ}=Hkt|V$3t!qF;#qIi~lOrI)$fp!(Sr{7M zc@gIK@oXPg(l#T3G?0a=_PY-QPZ}{HXJ$z7i#^gGkj<>vrje`xtnWcmNzPM@GsCgN zbUOJYB$XS5j=k>Xl=oq#i2F2{hrWq7@Cnv<%yX~xeC*nDupKgYx%={d;JBvrbXf}C zMh^#a%A$a(knm2PhtFE}H$sn596Tq#gkMAlP10~6g> zt83KFLFPOaPD#2CbKjP1p#5*UQ6!9|ZiZKrn_4np3o?mE^J`mG_U8ayFll?a2JUcd zEm^OoHe zC5;YV$%=#;UKWxL!<^b^*92oLVf@0v*{jp9r3tW!>31YhT?TFX6g~sZ zx9XADNysHFIv5g+tF8N4QQ1W_q3P_q_K(b)8EPtprR>oq+xKRXfn+$KO!>RMk6R#v z&;9p*r0l}3kIkMR1q@Gu)pCAESfswor91Rb=bt`KE#dC?*~U?}uBK7ZqO%igG1^`J z>VWsDjq&nU#q`}EbB#zFbTZXjD`>?N9%b*ShTl{Lm5uQoDL2E9zbwwr<2dz*PTH^m z(5i+gxvI(0omVB(cMhh7;{s<$I2*n@yus<^Gf(*DD7Hr6xxx7Y1b>;7O;9ud=H8lb zNgE9T=v6k(GI76cy1W<9(cIK`y`(v8wmaKtm`-jwv?L+9?81|1?3C%Y15_pe(eYMH zp&22~7F}kOv;(*DF>+$aXuMZu9#wT9Oj$%Y@Fe2qRfHV``BB;BhXR2SN4 zoht-n4vfbw#RC_uzt)*&q+R2@=E9Aqb4Dy_@{kennHkyXd9uy;8q0mraTMN!BkGZB z&&v&mDmD8ZhJu(n^gtV2eD93^7~PB;JS2K?6OVMcM&9If%+AQYDQ>WaPYS7}d{mG| zOqK~&L>7rL9{zr&8>-TpXHg#pu{A_3I(z_T@DH=0%NghWA?}7gsqRHwn5WJY`z%eT z^(ddu-{#K-qcve|AGL>ht zPPaOMzoLf-%cWOJ>*TWg!jESZHSqTH*^5n2UtqvZvpPX`q_wo)jb937VdpFrHqK(2 zN!~YBj75?c3`9l)u01;5a2q!)dQlnuku-?0pdEc3A|(0E%FUdB^l~!($0(VqTac;^ zfNzbf>Nip%1aqHMg288J$FeNm=V1_zPGWl^y*4$ed4+uXY|jrHl_e5__G-ys&g2ma zsyw`?52h1$YJ%yfcm>$Fn17t%OqnH)fX7KagW7qvifd0rUz;+w%RIVgyAK!ulOa!^7p&)Bi;y`exrw_vk&FyrUOwL$w-MWdx{>FkuKMKM{Xm)EazlvluAV0H z*pK*w2ff#x7EU2dUb^ry#ANZjOnd5!thjyF0E-uQQBmI`fqTWx40vH21|v~ii?aFp z*{?im-WyHM#$Fg_7CztJk;OX##@H4$Vwc9!6HIk_|0q$1S`Ar8%prFE9Nx7pZ0EEE zf79&R!+Z|Q!F8mMag7rjZ_}azmu%?Si7Q_U%?qc&h#@Omrc$tcD&L0PZ*t!#)t;51BZVslv#_LI?9Dn z?UIF9x9f~GLj0X@fgAgUZnEdj*0UoWmQ-zJIj_61NEG3gx~%bVkS@{sm#?j(59L%h z6J+B_LIhTx*J;7l(DyAAZm;yXFXaV zzSdZxJWuWfTq<(~ z)iHasIqUNXa=nJX7UppKD!=3QyLy=U8{UwZ$SSpWuhTu4;l^*qj`yx+l4#8G6d(ER1|KNcHg~v4_o9Cp%ZV%fW|RqO zFqSSGIvBE(cvm(6>scWo`1kKU*2j}9dj8z>k8P}}Pk0(3)=CC`fW9>ELSl(FM_svENs zm&f>da~3Go4{w;&J^HlW*ez(&hy+7eD|lqnJi-xT^LWbzkY{ZaonAE3Rq=tlev_#0 zb@uVECY47i1^%QWhOv#0VVc>60z;$ZChhBdgo^oU^K0FWojmSPD3R}{9 z6Z8OIynZ?fidQ6UYj?(ExG$}f6c1BHG=6*a0T!#1@hfyCNfS-R5>sfT^$7rRkehB} z9}$0cUAg4CW#K~?%G)WjEYm93%VSn3&ep$QhXw4R+wt8kq(O{oI(@bb*;8=JHA1;p>8#I~OSw;I<7Z~;<^g#F0b)(2l*`-xGvkjF92xV2`5H7cBB7M>p-HfS zZ4M@lbdfUD8`<~8c5@sa{aVlBSm``WMKFC2F-MHq*amz12TXjfBvm18Qk|c}*gw-L zpYPV%IC>e3SXwzX)G@KSplI8*yzj|n@Z09Q#-Dy}lofGq4;rKXletC@eKx@jJ5Pkw zU(noG^St+@pAuMZtD|Y(I`TT*&BlF-Hck(VxbN``R1griVjD=wbfA5^9Z|{-qLR{4yyNw>*jjU8zp_&d&pBe-Bcp)UPGz0JU_3=Phj7{WDum@;6Xje{M zOu23+V*4)h!d}xZ$YCbzV?q)3Q#pO0)dLFBIt(DKOMm!Jfg)SFv)aPaxYWRV56Lh! z-3n#Sn5ifXA@#-dy(p6YkeBM4+k=`LbBqIbjvu!+`r%IOmA00q4lmp1G{~O1*4Z->Ok;ZI%tL09ab-{GiWHjf=N7;`<&LLfTGd#mG zvoI=oU_~-|GlUrEa=iazR0#+CEuBF3JuIFfMuB4a-D9&v&$!+nFFQI%m@Ef6UcdBL zD0Sid5*UuHmNHpBc~?JQNgVZUAKbVmN>J!E!pkvDlr>7__q(etRh5o{L&vO zU+f`e-_VHeT>U0BOM6z-3RgV&Rg^~=?9hgF@n@R5Z(U;g&h%AVco89>N5p<+_o+g3 zctz&^22Z1A6wcJ(h_y)ED2cNQfQ(TpjpZtg-MDIW$ASXWfNjusO`o%;29>)W4FeY1~JChUOC2JHY zPRU4Ua}lu#Anwbr>cU%jkad8b+C-5z%?%lvH@<{&Bp>BaDl$){j-mCVgcv;DgYGH;GfEG4*aY{b!O7? zD}rULdsx`{fbgo*x=MN;8BWk_ci_a^I}cT^;Ao%Zu8`>Elr(enj4Oe z6sDi>*v3{Zw)}==`?>I?{e8!Y!B1!&vGCIuk-IXy&?T=G#SrARn*M zo}W^rm$(mBRBD5rHo%R2!F9LaZpcZqsboBv!t-R~;?r~&->-W6e;pDtN>M_88=rX+ z>nW;5WZi{ruV{J>(nvkL3x!3A@Z>aXsz%5!_-hu5cgs<<-!zdKwhpibgjJ}giQ%8C zTm`4kQ$nc)W?XgEBio%y4V(%qFMF6eGL@U3Q*@J%yNJ`U!Gl4;FC3E1Y(E?8ErYR^ zA0Op*zoeaM5!QJl-deEHT7!zTw?E$J0mM7C3xc?p*wyi7TLghAM^e;DR{6ig7OPfl z3VuF+bYL*_W-)1y(+0+YYeVSRc|3J^!S{-C>To}sp=YI0CKbes66We}sqDY{MVr(% z&~T{A`)T4zkxEV#Y|V4%D6bhbyRol^%Om2%TBFaf^ttEGRnHRlj<~6N5=br%SDx1* zLN{YiFDNZHNGZ;FiU@hJSqYvzXOKJF6OmKk*PP7bDAmRxOr%k61$eVo$*Akxr~Wx* z;EgH8i&9~+iULQ(*Q6ZjV|>Igs`RuI+6xajREoSgX1NH%TE%uao^=M7?vM#Ql}_Oe z(3lDU7CY689(as=Dm69pDry90+bq^p@9#am~9 zn^6gqRSd1O{b}TQIMMsji2P?qxG^^C*l0Q+F2lgRbdjJ3c literal 0 HcmV?d00001 diff --git a/bower_components/framework7/src/img/i-f7-material.png b/bower_components/framework7/src/img/i-f7-material.png new file mode 100644 index 0000000000000000000000000000000000000000..aa306df214710d2dfc2b2c63f9dee35e4d4b58ca GIT binary patch literal 8995 zcmaKSbyQT}+CL3SHxfE@GYrkZ(5-~hB}~yhL#LD=-6f!eNH>zwU6KMrNC`*@hzKbB z@ZS5qzxR)Ky=Sd+_TJBaK2JYuowd)2*3(fZz0Y_b3k!=>Q$yw1-Dv&yCc?RUI$wQp zy&E2&RZYbP(&0gCJYu60sQA;yVK@@umL|) zQTvasyA_1Z4vlsL1A*S&-a_7@LarXRK#;VwG*DOsC?XAziYcGK4WuV5F{e*$$EGN2FC4G0nv20AtjkSJGA5BOa^Y}o$+-^K3#R`i$g&Kj_;hy7hrpiU~Ta8GBX z3tCeJ!gjYKgs?||LCT6!B4TQ)YSNO*Adsq9~u7}R!U7w z7^EgF1yU0IixrnrR8~?|k`|Rvl@b;eQ3Cyg)pS9jp)PRbKYH!&^!^7c`F~=;${t84 z+SS9r)z#^r3edB2MZ2QxT-^Z5%6~I12H??#!tGuD5_$h7>EAx9AU*88kO(yoS7*S# zq71hGU#x&iionFhr9=hA5eP{^F)8?8ePXF5$cZ>fv7SiRen>_B?CL-PY5DV*(q^63ZfzQ&irFn&bx@V>39Apypwf(rU zyFC<_Y~Tf6k_KgZ!4@}Ow{B>vE`{%+7RB%Hl>J0W8YW5rR?gbrVKl!K*e(^ZQ^|`s z-ta`T5mU*;Yg1rjzU=!S`%V^?JTf$GD|<8tfuO#=c6`m#yDR*mq@>O7eAThK!_hb= z$nEw|kN?!ycMlRGKpQ>uKS5kREBoQ|d*s19sZ=WEKR;&^;4U88aC6fi_)ht1@_sx2 zf#y5!b zQ#u68-#VP@-X>UfUPfc#VIIU;Z!JzGq0$e&e|j*hyBzg8S7KFucxIUYjq)G41&%h) z(PX+4^O1vJ439VhwD&VmpQLEWOdjfMaRI*P{sA1kWaj#S8TA(}A`$w-RLl`|xI2U} zRdwnbVhHr%@%Fwn580MzdI$}C%vu2GdcaF^X@S)b#+M*=BFEv=8UKXH($sH1>9)kQ za+}FvHMaTNhs^$Ll9rb|^F`s!$77KST?G@=tofGbC|DqMc94s*TNjI+C2UvK@# zf7F|H7IpoTZ@(YlWTzYpw^9y4ak;TpuYdJ!!-`tL>+In)9k9Qx#55n&nANLfk1s$J zGnklC-!XpY9PSUYRVSXrshA)WQk)Lx{^WDyQV~Q6vSr7MRclnJ-~B%CX6@pEqNc}E zSnuqq#f-$XgbWMR#hzbETXC};%+uw=+(~Za4{g8W7NWeq5&%9o1WPk-o2| z2)gIMKvqADutaOgfWd4Fl$qrXg`wyyd{*%=tituJ0n0J)r{=(UW2*F?OQHPS?ra5` ziq94YXRfq03oCOq8{pn5!cX&bw*2w*LcZilz9%i9ci>GoG4#bq==tf$8ZwAb9|=@r z3^~EVr^jaI@AXpHQ7DnijM0qQqrM5{ZwcL&A+;~f7Ut@+_u03`+SuYCGq@4~&-yWd zBwu85QGc}UczDM0>BV7RZ6qsjx$FxpBvKi7$Ba^Ze!Z|>)Q!V!{hD9^8}V@>pqN^3 zcmPNH<%xpAVo!*v5%b8?(U74Fk*89b9dpn8ME&KxHkp%8GS{ll`I zuRs_oNa8C-6y>unfmO)gcF4kY@`cogu0kqaalt2yu3Kv$!>9km*d7+&U6U*GBngx) z93DGerDuN`waNJVHn;=_fwEp^RY4ER)a>r1u5^x*ZSje!{Wj~31tRRE=<6Ar7Fg~} zSBgLS__8{Ha(apE6NuB*WWpvE5cyd!b8%P4NNSlt&Zx7iqx=tw}OHZr5T6{W(E<99xF@+v!8A=1Sw%c}BoAL{B zJ*gtYZacbYnQpib*m)Us1OTW{dT%^eSj=a)$ATUXnK--KuUeL9=ymQ_SiiQtl>gC7 zmyB7A-RH=o9G<7*7N``cUXH%}9-{TlG&HHUUNUxy6Zq>{d#~54eXCrjuxB-4{MK|O zMCqCWKZj*DzfOdai}afaTBSSs1}Km=(`1;DaC~uK^@=RLM%KXS_1pOoF>A2fnd9K# zi!594W5CyIXMVT+_tFOgkqNU7yb4Wpn*)AGmppHG^rpCADt0Iqo~IcmL$DuGL*q1Nh^lsybNiLy9S_|m)*O7Y|7gJ7OxKTr zrSB8%u0XRau_MPLBHPg(S==oyf~te(TD+CGC$B!ban^z+xiu|fU++^iCpJ2lz}R*} zV9$#LU#&OSRPp2D_0}3`Z=?ljI;u|&x^KK%u8An$lOhsp7ceA@X_cH5KI-Zemg+km zmi$NwIj50O8Q?&^BJnu4ND$JO;5hDWyl7Wv#i6M_v&|O-X~p_>XBwB-m&B51bmB2k zw%O9)ACd${Y`o3zZ5h5k*-XgDNjRAl(EoLRsw~mC5?(FQ>XiiJ*jm3`nhcs(-`SfC zJQ|??sJCKW{MD>eIA>+%1+69Tu_x9#O-w!G69t!%y%Apty)MJK$=1SIu4gqyfOO}+ zKi;VD^Fu;%2>Q>;@y{vW^~swGB|=FCu#RKRP=c&nD;mHX8yvm^S2ZolA>EJIf{N+!gPs`19Wly$V%5emEg@yUMNy)W>)r3>M=-a4q zJkB;oNhuiCD?h80q}mLGSNqK|$)9B<`wdJ&E@su`&G-|RN||n7B0!-cS0`!0F!_)V zO(y5LsZthm9ucIBxFU?S0V<;_m9>9J^KX89X{`3lpV|8%^XO9JbR#C{B=cM6IVhB+ z!^bq%X?mi6fUd2z4#(rBQ7s-v1cx)rGeOHc_yCSM_EB%yUX!~y*-O!_QYfi?YAVy} z?kiJZgPTUpn^DFgFyvMLFv3}*g@nDVu>O4YV)d+>Jl*``_2uNFpl$yBLS-*qO|*Ti z0GT3cU|{0VvSY+}!ca(`Iq!&J$-ZB7a^roxK+JsGksmxaGx&R{uAp*>;WMLiK=Vrw zkaPGPu$!ucMn1}4_XP#Z4e3yqc~Es2a`~(^&9XX6PyE8ETwaS9^5C0uS;JCCEJl+O zPtR%rgdVP3FTgoL>K|NXU@nR!O9s~ps=t9B0MX5=Xi~=MXhV+Tsd}dCW?oXr50uW_z<8y0-C89vW#DJf<#bOWW z85zaZh?uW03{WvFw2}e8zJy%_e8Jt8n+*Q5|0a(MY{ZznqY{%S?VswoM-tPKh9uPT ztT?KUoE^GJz3(t&3hXjMA;~<%duel_kC!a2?oVgvykZKgUi&`8zWu?i>KJmhTWn$~ zKw%Ci{55nafDwJSPj3GfEI|KQ+KXF%IC{X}GZR?+>096uLRWW~W%;4z_W|SJ)097- z+uyyiNPwiTHcvI=PV+f`oG+86Cw$&BSPY_4H_c9^$8bfMdDPm3*(m!|DvVH$N5n|b zl}q&>S!!xH61oO{IlAcV{C%^PW&8YUgTC}R)_XN*={T>C!>1nwX-{tiDLgUm+~hN2 z!)=Z^RJ}t4q7QC(@jZ#Dh;f1~bIn^I1(U`xj` zDnTh(e(Qdmm z*X8%b@y}HY)vDW@a-h1dd;|~xH79N5EB5!jEqE&m>Y*P_wMBEM1tgG!_PVFr1l(^6 zD`fXCDKFnz=hLA3`9|t0LYgCho7GJ5@WvUrpwlq4|M^1<-paPcB;+T(4qFRG z=lQ5^45PpjWj_v>lX!H)A^_~6&M^q(20vbjc>Gb!I46S>>?9{pWUW|tIu*0Zk@G4^ zT$Q3ija%Joz2nlKd^pIEul?k_8Y%g_p|rZ=;p@i|;*zvDgNsQGL5k09CU<@0(#YQ^ zaled}Hjk>OVt3j*8A~`f-#+5*b!@2IBq*~l9bJ_Q)Pv(2+d8~uEin+T;@riPN8Rp9 z2GuV^M@7;1}ien#oc54saXV@siNKDP43nznU!sQ@v3iz;WZ^7)dE0fn6IXqseY!#1 z9HIzGtr_Q=DWmuJprqIHQaE+{efE07Qr*TWzo?G>%01Fp&8~hAp_w}N`-DSHXIjdJaJNVSR0z)LJoTIPg zYM&bC%@sLQX}nJ98`8~IP8G&RL~J5q~FQiJ2s#&94p=@9<qa!N&V8t~&A{4hlMXn5iIZ);LoTN&N>S`I1k|Be#%QA@z}MET7PzLIw0?2XYR=gcFtKtnX46Je|8&o zQWfP1GgO}pEHWmbNlWO;Oe$m5CigyPG7cD+bieT#r8Z^q3rdo{uNqEYs2K32ugXTl zRaZ5BeK=vh0bE0x*au;0>#1snOG({%;ZBbpI&`Mf@){h3)Y~&IQ~`ti_ss=lB$b~=3i1`D2a9R!kVCc#MFVeI_T+Ds<#v}JoDvUVrxgH^Uz&TBx;_$o_-5vK zs*$1+L;*>VD%gDGWWqCC#N5;ntth0}_BKnql<2nZKF>B`1p9;vch}3MpYs>6SX2=a zYq9MZ^NLUo2knaPG$!st%sTK^YrOO3h{&@#|AVGf2~lJJ{&m6#t2B;h zZ2~E-F&@){AC>b{_>XB`dOjU1a#%<))sig*zOpFlcTaRHN`2SlsaMTg>gWm|^@`#s zfit=!CQCciO*6IQw_lq-(rarJ$NJFuBf~KDq%JX=aUhK!7Q0Nh-}f`N1w~04F+cs* znsO>O&_=3=*{Eb9m)msX*sBGK{q-FpEnWahH!Zd7=0l6N=$b6fUCMYMh3HlipP*piz-+gENM5ldVi+*}6gG=$tjKh_=tC--A1fS&pz=^>@ zEFEOj$XPi26h>2_nKId@WFXC#W6{T-F>9CN(-~SH_cW)yVXg>u+DNs9FTQ0o%u9qY zE%1Xtq+K=Y3@fP?l@102WgeBUuuMgxbg<9jBvh%qgU>(znN7vMTC&R6w4c}fQ`9Ze zpjjzESl;uDRCjOdlRdou`MMg?=4pCv3B09+(#a+BO!OUJCdvDfnJI4d{*m7!W)&}H zzk0_Kp9Q?RjBWDjb6U>JNV?#!`@~UT^qCJRtX;PWXQ=6ZNI`CH-frP2ad>lp`D3Zu z`A5ZTe~|vIet_1Z2{XaMY%RBK>`?v28!9Uyb)I@@QR$Rk?NF9=Emq>Bme&vIWoE+- zt+zBt>&kMoJ#D96=D4#nRU4`pDeq8sZuiC zrK7FRyez(pw0n8O4a|tDaHW;RxNaJITiKMtB(JTy3e3>@;z?Dn*eLU*h4s)GY5?(x zamD)&<3+>u&G|(z@kn8lTpSKl8>Gqeqk^;q=j37Yz}v-}(MEJrsDP|n1)BF|9E26H zIfQ2+*kFju*MKwmFtg=;-6p%c0K#g9U{h&vCGQ9AFyGh3``#Aw7TC?KF z7D|rK?~3GBU;aVn4v{}>-*&zcI$1y5Ee&qW5;HI2b%4F&c`v1E%VzHWWkj3jOG$s@ znXZ5d>xGA~)>b_2BBwjl@Md13Agn|oI5G3;7hN@dw=P%7Ps#XZKm|e~&4%sF7epEj zC|(+>2>tQZxmhNdPaOl!q8EX`@a`LF?3Oj9dtd21Wa<)ls9-lXXEz(@Nc!ePRJU!I z=~VP%a_I8O=Batci*%*QLqQ)MtdVesnrQP_zl9gi9g;<_GjsEFRY61 zaQluBre|x48itPW<8tYja=-dr7kS-9t!{rq65&x;#{~wO_?B|jQ3m=Ca@0P^$3(oF z=0F8{Ot)N&i-+W0HBlh%6VmSQy_A*ggjlT%6 z(u4f1{x{4nrIQJu5Nq$jF^&AErR1Rm-UxVq#8Q&8esNE^2+;;=X+f++eaxfu+_|2S zWxQl%MHMgnaI5^+*+?GQ+NlEkVpnF(0~YGAf8?|fF90@#&W`4de8b;fUmO&wxsXR$ zuIDCRF;R`lK{oC2InM|P_m+xC2yahn_1aYY2bg0*Yv`|wBIMvAM&_pY*fnvsSQ=!k zRa|W8^k-z4iHE5)G=$sxA9C5h(?-aj&)giP-1^N6)<#s;s>ih7?uvNuvBs(PRfuS44HNvS4@zy7zT{Pr#g;eq0l>y0=)_ zVtZN7VWi#u?O0n#{IFqF?q?3^-SXTOH@GtL-hP)9?CePtZcKiZ$$dibRk*T|mj{Vm zXfBInDNDm+1g{8|ikge9FBF$yoI3D2mE~~D&HfY`ZE?|iMr&CDs@}OW}6;p*HEEE)NA$#zhozh3~ zxAaC>UApyg*>EM**G1&sxc8;W`>Z^K@}{8?rPjp4d+`%rb`+vq{7i%vIvm!<#Jh0dKY7|8>PSG8Ntv3X0j^OJ z;>Ncere4&OXgbd|#zs)^3h;``To25=)>`WHO0pdom(%Pa+a3W|m`Q!3+CM000DJel z-B1>yoWd)%aH?(OI(`V+LtPj;h3 zj%teP43+)1&33qP3qMp9#Qcc@W8Uhbb`+(0*RjrOs}a$&s_ z8xDU$8v;%0ql_>4nW`Kj^(5rBFZW=DG>rzS?e~5yzMg(UINcbx@T^ixJW7bTug4wn zI76l6v;8(H8>++e6Ao7 zkh5`1`EPJrVx|2kQqI)$g&EICqKhVLmE-RL{UUA*Bsp*i1IZmd_9 z7?~RX#21l(w(6BMmQ|SCNLq>MK>+XV>doN=bMceZbnjn5t?5kbTpL&z7lc}uupU^)Or`dkiX9JlszyG$cm}9M#J-J)T%tayBkJiAgdL?~sm-?09WDN?>8n{ekY2 z{V}Q6Pm$bcDN*0y(x4fq(81gMa9$x{jj*yUGi7z8X`;fHYCkk}fxtnqqwC%A!Fa-O zlbJgw=iX=sF3JyPlcI&!h#pPmN8;pa_8B4;lMD4%OE&V}Lob$h4W*0@eJVNMHaQ@o zbsm?yP1s#pcrm(}6A9OOio14XZs-0AEiqe+#8}^UjqTL;ZrT@|M&IW&ef03rDe9f1 zdXrswhW0?@GZGH%13$vW0q(f58JjH_qja3@$e!M5iJIzp8pW!-AoYu5%%`_kg+hF( zFP`%4ARfu_?eAK&1C$S0c75?6g18aQ61lXW*;}a6Syr)ZQM2A^b-Qo+o}`T@O|JOw@H?Mi=XR2(7Bfb9wp#--f>*#Yevs9FGKhnJv5`w z{ieke=kBX>af5BVe7pVEq~*2&(a%+HtRfiZWj2YP@DjX=Toq6%Km0YKxkT8n&Bk=T zubnk3VR$GMC{ZY7`U6%rt|DQEjC|ZjfZr_P);RTZzGylNay$D(!DCjCMkdI zgXB`AV+R$+eJr){H9hPb-aFyg+w0~z@H{I~25Xv<;dmAGS>z!3x9OtqefTX)RmfVd ztxvrmmNzUl*TBeP?!WcTjDo=b^AD%{ZyhZfKU8gorcvh39*INp_v&XnPXz{sbSz1) zF3a$)#U6@hv8hMfi4=DPiZ5erfa8DdA+0Ubyu&>Yx@?vjkg_c~Nac-yt!B`)|@MUU@sm0p*Yp;>OjLux4-RFz3La{uQxk@##dktzw@oGmuw@>dB z0{v=u+nrqH zi5g8+_##zjJ$|L%2r8z!0>6{d4gtQb7xMyzv1_r%0kg|$+->jZGe7RD9At_a&CD*$ z61Oe#5e(<;iUh=YD*A4aK03B;=tYw1-LiLKA*SnOLd^#~|Nge3sj8z=rDPrY{{YmW B!LR@T literal 0 HcmV?d00001 diff --git a/bower_components/framework7/src/js/framework7/accordion.js b/bower_components/framework7/src/js/framework7/accordion.js new file mode 100644 index 00000000..89008cd1 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/accordion.js @@ -0,0 +1,60 @@ +/*=============================================================================== +************ Accordion ************ +===============================================================================*/ +app.accordionToggle = function (item) { + item = $(item); + if (item.length === 0) return; + if (item.hasClass('accordion-item-expanded')) app.accordionClose(item); + else app.accordionOpen(item); +}; +app.accordionOpen = function (item) { + item = $(item); + var list = item.parents('.accordion-list').eq(0); + var content = item.children('.accordion-item-content'); + if (content.length === 0) content = item.find('.accordion-item-content'); + var expandedItem = list.length > 0 && item.parent().children('.accordion-item-expanded'); + if (expandedItem.length > 0) { + app.accordionClose(expandedItem); + } + content.css('height', content[0].scrollHeight + 'px').transitionEnd(function () { + if (item.hasClass('accordion-item-expanded')) { + content.transition(0); + content.css('height', 'auto'); + var clientLeft = content[0].clientLeft; + content.transition(''); + item.trigger('opened accordion:opened'); + } + else { + content.css('height', ''); + item.trigger('closed accordion:closed'); + } + }); + item.trigger('open accordion:open'); + item.addClass('accordion-item-expanded'); +}; +app.accordionClose = function (item) { + item = $(item); + var content = item.children('.accordion-item-content'); + if (content.length === 0) content = item.find('.accordion-item-content'); + item.removeClass('accordion-item-expanded'); + content.transition(0); + content.css('height', content[0].scrollHeight + 'px'); + // Relayout + var clientLeft = content[0].clientLeft; + // Close + content.transition(''); + content.css('height', '').transitionEnd(function () { + if (item.hasClass('accordion-item-expanded')) { + content.transition(0); + content.css('height', 'auto'); + var clientLeft = content[0].clientLeft; + content.transition(''); + item.trigger('opened accordion:opened'); + } + else { + content.css('height', ''); + item.trigger('closed accordion:closed'); + } + }); + item.trigger('close accordion:close'); +}; \ No newline at end of file diff --git a/bower_components/framework7/src/js/framework7/autocomplete.js b/bower_components/framework7/src/js/framework7/autocomplete.js new file mode 100644 index 00000000..254154f4 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/autocomplete.js @@ -0,0 +1,666 @@ +/*=============================================================================== +************ Autocomplete ************ +===============================================================================*/ +var Autocomplete = function (params) { + var a = this; + + // Params + var defaults = { + // Standalone Options + /* + opener: undefined, + */ + popupCloseText: 'Close', + backText: 'Back', + searchbarPlaceholderText: 'Search...', + searchbarCancelText: 'Cancel', + openWithAnimation: true, + // When opened in page should the searchbar be focused by default + autoFocus: false, + openIn: 'page', + backOnSelect: false, + notFoundText: 'Nothing found', + requestSourceOnOpen: false, + /* + pageTitle: undefined, + */ + + // Handle Data + /* + source: undefined, + limit: undefined, + */ + valueProperty: 'id', + textProperty: 'text', + + // Dropdown Options + highlightMatches: true, + + /* + dropdownPlaceholderText: 'Type anything...', + */ + updateInputValueOnSelect: true, + expandInput: false, + + // Preloader + preloaderColor: false, + preloader: false, + + // Templates + /* + itemTemplate: undefined, + navbarTemplate: undefined, + dropdownTemplate: undefined + dropdownItemTemplate: undefined, + dropdownPlaceholderTemplate: undefined + */ + + // Color themes + /* + navbarTheme: undefined, + formTheme: undefined, + */ + + // Callbacks + /* + onChange: function (a, value) - for not dropdown + onOpen: function (a) + onClose: function (a) + */ + }; + + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + a.params = params; + + // Opener Link & View + if (a.params.opener) { + a.opener = $(a.params.opener); + } + var view = a.params.view; + if (!a.params.view && a.opener && a.opener.length) { + // Find related view + view = a.opener.parents('.' + app.params.viewClass); + if (view.length === 0) return; + view = view[0].f7View; + } + + // Input + if (a.params.input) { + a.input = $(a.params.input); + if (a.input.length === 0 && a.params.openIn === 'dropdown') return; + } + + // Array with selected items + a.value = a.params.value || []; + + // ID & Inputs + a.id = (new Date()).getTime(); + a.inputType = a.params.multiple ? 'checkbox' : 'radio'; + a.inputName = a.inputType + '-' + a.id; + + // Is Material + var material = app.params.material; + + // Back On Select + var backOnSelect = a.params.backOnSelect; + + if (a.params.openIn !== 'dropdown') { + // Item Template + a.itemTemplate = t7.compile(a.params.itemTemplate || + '
                                            • ' + + '' + + '
                                            • ' + ); + // Page Layout + var pageTitle = a.params.pageTitle || ''; + if (!pageTitle && a.opener && a.opener.length) { + pageTitle = a.opener.find('.item-title').text(); + } + var pageName = 'autocomplete-' + a.inputName; + + var navbarTheme = a.params.navbarTheme, + formTheme = a.params.formTheme; + + // Navbar HTML + var navbarHTML; + var noNavbar = '', noToolbar = '', navbarLayout; + + a.navbarTemplate = t7.compile(a.params.navbarTemplate || + '' + ); + navbarHTML = a.navbarTemplate({ + pageTitle: pageTitle, + backText: a.params.backText, + popupCloseText: a.params.popupCloseText, + openIn: a.params.openIn, + navbarTheme: navbarTheme, + inPopup: a.params.openIn === 'popup', + inPage: a.params.openIn === 'page', + material: material, + preloader: a.params.preloader, + preloaderColor: a.params.preloaderColor, + animated: a.params.openWithAnimation + }); + + // Determine navbar layout type - static/fixed/through + if (a.params.openIn === 'page') { + navbarLayout = 'static'; + if (a.opener) { + if (a.opener.parents('.navbar-through').length > 0) navbarLayout = 'through'; + if (a.opener.parents('.navbar-fixed').length > 0) navbarLayout = 'fixed'; + noToolbar = a.opener.parents('.page').hasClass('no-toolbar') ? 'no-toolbar' : ''; + noNavbar = a.opener.parents('.page').hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout; + } + else if (view.container) { + if ($(view.container).hasClass('navbar-through') || $(view.container).find('.navbar-through').length > 0) navbarLayout = 'through'; + if ($(view.container).hasClass('navbar-fixed') || $(view.container).find('.navbar-fixed').length > 0) navbarLayout = 'fixed'; + noToolbar = $(view.activePage.container).hasClass('no-toolbar') ? 'no-toolbar' : ''; + noNavbar = $(view.activePage.container).hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout; + } + } + else { + navbarLayout = 'fixed'; + } + var searchbarHTML = + '' + + '
                                              '; + var pageHTML = + (navbarLayout === 'through' ? navbarHTML : '') + + '
                                              ' + + '
                                              ' + + (navbarLayout === 'fixed' ? navbarHTML : '') + + searchbarHTML + + '
                                              ' + + (navbarLayout === 'static' ? navbarHTML : '') + + '
                                              ' + + '
                                                ' + + '
                                                ' + + '
                                                ' + + '
                                                • ' + a.params.notFoundText + '
                                                ' + + '
                                                ' + + '
                                                ' + + '
                                                  ' + + '
                                                  ' + + '
                                                  ' + + '
                                                  ' + + '
                                                  '; + } + else { + a.dropdownItemTemplate = t7.compile(a.params.dropdownItemTemplate || + '
                                                • ' + + '' + + '
                                                • ' + ); + a.dropdownPlaceholderTemplate = t7.compile(a.params.dropdownPlaceholderTemplate || + '
                                                • ' + + '
                                                  ' + + '
                                                  ' + + '
                                                  {{text}}
                                                  ' + + '
                                                  ' + + '' + + '
                                                • ' + ); + a.dropdownTemplate = t7.compile(a.params.dropdownTemplate || + '
                                                  ' + + '
                                                  ' + + '
                                                  ' + + '
                                                    ' + + '
                                                    ' + + '
                                                    ' + + '{{#if preloader}}' + + '
                                                    {{#if material}}{{materialPreloaderHtml}}{{/if}}
                                                    ' + + '{{/if}}' + + '
                                                    ' + ); + } + + // Define popup + a.popup = undefined; + + // Define Dropdown + a.dropdown = undefined; + + // Handle Input Value Change + function handleInputValue (e) { + var query = a.input.val(); + if (a.params.source) { + a.params.source(a, query, function (items) { + var itemsHTML = ''; + var limit = a.params.limit ? Math.min(a.params.limit, items.length) : items.length; + a.items = items; + var i, j, regExp; + if (a.params.highlightMatches) { + query = query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); + regExp = new RegExp('('+query+')', 'i'); + } + + for (i = 0; i < limit; i++) { + var itemValue = typeof items[i] === 'object' ? items[i][a.params.valueProperty] : items[i]; + var itemText = typeof items[i] !== 'object' ? items[i] : items[i][a.params.textProperty]; + itemsHTML += a.dropdownItemTemplate({ + value: itemValue, + text: a.params.highlightMatches ? itemText.replace(regExp, '$1') : itemText + }); + } + if (itemsHTML === '' && query === '' && a.params.dropdownPlaceholderText) { + itemsHTML += a.dropdownPlaceholderTemplate({ + text: a.params.dropdownPlaceholderText, + }); + } + a.dropdown.find('ul').html(itemsHTML); + }); + } + } + // Handle Drop Down Click + function handleDropdownClick (e) { + /*jshint validthis:true */ + var clicked = $(this); + var clickedItem; + for (var i = 0; i < a.items.length; i++) { + var itemValue = typeof a.items[i] === 'object' ? a.items[i][a.params.valueProperty] : a.items[i]; + var value = clicked.attr('data-value'); + if (itemValue === value || itemValue * 1 === value * 1) { + clickedItem = a.items[i]; + } + } + if (a.params.updateInputValueOnSelect) { + a.input.val(typeof clickedItem === 'object' ? clickedItem[a.params.valueProperty] : clickedItem); + a.input.trigger('input change'); + } + + if (a.params.onChange) { + a.params.onChange(a, clickedItem); + } + + a.close(); + } + + // Handle HTML Click to close Dropdown + function closeOnHTMLClick (e) { + var target = $(e.target); + if (!(target.is(a.input[0]) || a.dropdown && target.parents(a.dropdown[0]).length > 0)) { + a.close(); + } + } + + a.positionDropDown = function () { + var listBlock = a.input.parents('.list-block'), + pageContent = a.input.parents('.page-content'), + paddingTop = parseInt(pageContent.css('padding-top'), 10), + paddingBottom = parseInt(pageContent.css('padding-top'), 10), + // inputOffset = a.input.offset(), + listBlockOffsetLeft = listBlock.length > 0 ? listBlock.offset().left - listBlock.parent().offset().left : 0, + inputOffsetLeft = a.input.offset().left - (listBlock.length > 0 ? listBlock.offset().left : 0), + inputOffsetTop = a.input.offset().top - (pageContent.offset().top - pageContent[0].scrollTop), + maxHeight = pageContent[0].scrollHeight - paddingBottom - (inputOffsetTop + pageContent[0].scrollTop) - a.input[0].offsetHeight; + + a.dropdown.css({ + left: (listBlock.length > 0 ? listBlockOffsetLeft : inputOffsetLeft) + 'px', + top: inputOffsetTop + pageContent[0].scrollTop + a.input[0].offsetHeight + 'px', + width: (listBlock.length > 0 ? listBlock[0].offsetWidth : a.input[0].offsetWidth) + 'px' + }); + a.dropdown.children('.autocomplete-dropdown-inner').css({ + maxHeight: maxHeight + 'px', + paddingLeft: listBlock.length > 0 && !a.params.expandInput ? inputOffsetLeft - (material ? 16 : 15) + 'px' : '' + }); + }; + + a.pageInit = function (e) { + var page = e.detail.page; + a.page = $(page.container); + a.pageData = page; + if (page.name !== pageName) { + return; + } + var container = $(page.container); + + // Source + function onSource(query) { + if (!a.params.source) return; + var i, j, k; + + a.params.source(a, query, function(items) { + var itemsHTML = ''; + var limit = a.params.limit ? Math.min(a.params.limit, items.length) : items.length; + a.items = items; + for (i = 0; i < limit; i++) { + var selected = false; + var itemValue = typeof items[i] === 'object' ? items[i][a.params.valueProperty] : items[i]; + for (j = 0; j < a.value.length; j++) { + var aValue = typeof a.value[j] === 'object' ? a.value[j][a.params.valueProperty] : a.value[j]; + if (aValue === itemValue || aValue * 1 === itemValue * 1) selected = true; + } + itemsHTML += a.itemTemplate({ + value: itemValue, + text: typeof items[i] !== 'object' ? items[i] : items[i][a.params.textProperty], + inputType: a.inputType, + id: a.id, + inputName: a.inputName, + selected: selected, + checkbox: a.inputType === 'checkbox', + material: material + }); + } + container.find('.autocomplete-found ul').html(itemsHTML); + if (items.length === 0) { + if (query.length !== 0) { + container.find('.autocomplete-not-found').show(); + container.find('.autocomplete-found, .autocomplete-values').hide(); + } + else { + container.find('.autocomplete-values').show(); + container.find('.autocomplete-found, .autocomplete-not-found').hide(); + } + } + else { + container.find('.autocomplete-found').show(); + container.find('.autocomplete-not-found, .autocomplete-values').hide(); + } + }); + } + + // Init Search Bar + var searchbar = app.searchbar(container.find('.searchbar'), { + customSearch: true, + onSearch: function (searchbar, data) { + if (data.query.length === 0 && searchbar.active) { + searchbar.overlay.addClass('searchbar-overlay-active'); + } + else { + searchbar.overlay.removeClass('searchbar-overlay-active'); + } + + onSource(data.query); + } + }); + + // Save searchbar instance + a.searchbar = searchbar; + + // Update values + function updateValues() { + var valuesHTML = ''; + var i; + for (i = 0; i < a.value.length; i++) { + + valuesHTML += a.itemTemplate({ + value: typeof a.value[i] === 'object' ? a.value[i][a.params.valueProperty] : a.value[i], + text: typeof a.value[i] === 'object' ? a.value[i][a.params.textProperty]: a.value[i], + inputType: a.inputType, + id: a.id, + inputName: a.inputName + '-checked', + checkbox: a.inputType === 'checkbox', + material: material, + selected: true + }); + } + container.find('.autocomplete-values ul').html(valuesHTML); + } + + // Handle Inputs + if (!a.params.multiple && a.params.backOnSelect) { + container.once('click', '.list-block label', function () { + if (a.params.openIn === 'popup') app.closeModal(a.popup); + else view.router.back({animatePages: a.params.openWithAnimation}); + }); + } + container.on('change', 'input[type="radio"], input[type="checkbox"]', function () { + var i; + var input = this; + var value = input.value; + var text = $(input).parents('li').find('.item-title').text(); + var isValues = $(input).parents('.autocomplete-values').length > 0; + var item, itemValue, aValue; + if (isValues) { + if (a.inputType === 'checkbox' && !input.checked) { + for (i = 0; i < a.value.length; i++) { + aValue = typeof a.value[i] === 'string' ? a.value[i] : a.value[i][a.params.valueProperty]; + if (aValue === value || aValue * 1 === value * 1) { + a.value.splice(i, 1); + } + } + updateValues(); + if (a.params.onChange) a.params.onChange(a, a.value); + } + return; + } + + // Find Related Item + for (i = 0; i < a.items.length; i++) { + itemValue = typeof a.items[i] === 'string' ? a.items[i] : a.items[i][a.params.valueProperty]; + if (itemValue === value || itemValue * 1 === value * 1) item = a.items[i]; + } + // Update Selected Value + if (a.inputType === 'radio') { + a.value = [item]; + } + else { + if (input.checked) { + a.value.push(item); + } + else { + for (i = 0; i < a.value.length; i++) { + aValue = typeof a.value[i] === 'string' ? a.value[i] : a.value[i][a.params.valueProperty]; + if (aValue === value || aValue * 1 === value * 1) { + a.value.splice(i, 1); + } + } + } + } + + // Update Values Block + updateValues(); + + // On Select Callback + if ((a.inputType === 'radio' && input.checked || a.inputType === 'checkbox') && a.params.onChange ) { + a.params.onChange(a, a.value); + } + }); + + // Update Values On Page Init + updateValues(); + + // Source on load + if (a.params.requestSourceOnOpen) onSource(''); + + // On Open Callback + if (a.params.onOpen) a.params.onOpen(a); + }; + + // Show Hide Preloader + a.showPreloader = function () { + if (a.params.openIn === 'dropdown') { + if (a.dropdown) a.dropdown.find('.autocomplete-preloader').addClass('autocomplete-preloader-visible'); + } + else $('.autocomplete-preloader').addClass('autocomplete-preloader-visible'); + }; + + a.hidePreloader = function () { + if (a.params.openIn === 'dropdown') { + if (a.dropdown) a.dropdown.find('.autocomplete-preloader').removeClass('autocomplete-preloader-visible'); + } + else $('.autocomplete-preloader').removeClass('autocomplete-preloader-visible'); + }; + + // Autofocus + a.autoFocus = function (e) { + var self = this; + setTimeout(function () { + $(self).find('input[type=search]').focus(); + }, 0); + }; + + // Open Autocomplete Page/Popup + a.open = function () { + if (a.opened) return; + a.opened = true; + if (a.params.openIn === 'dropdown') { + if (!a.dropdown) { + a.dropdown = $(a.dropdownTemplate({ + preloader: a.params.preloader, + preloaderColor: a.params.preloaderColor, + material: material, + materialPreloaderHtml: app.params.materialPreloaderHtml + })); + a.dropdown.on('click', 'label', handleDropdownClick); + + } + var listBlock = a.input.parents('.list-block'); + if (listBlock.length && a.input.parents('.item-content').length > 0 && a.params.expandInput) { + a.input.parents('.item-content').addClass('item-content-dropdown-expand'); + } + a.positionDropDown(); + a.input.parents('.page-content').append(a.dropdown); + a.dropdown.addClass('autocomplete-dropdown-in'); + a.input.trigger('input'); + app.onResize(a.positionDropDown); + if (a.params.onOpen) a.params.onOpen(a); + } + else { + $(document).once('page:init', '.autocomplete-page', a.pageInit); + if (a.params.openIn === 'popup') { + a.popup = app.popup( + '', + true, + a.params.openWithAnimation + ); + a.popup = $(a.popup); + if (a.params.autoFocus) { + if (a.params.openWithAnimation) a.popup.once('popup:opened', a.autoFocus); + else a.autoFocus.bind(a.popup)(); + } + a.popup.once('popup:closed', function () { + a.popup = undefined; + a.opened = false; + if (a.params.onClose) a.params.onClose(a); + }); + } + else { + if (a.params.autoFocus) { + $(document).once(a.params.openWithAnimation ? 'page:afteranimation' : 'page:init', '.autocomplete-page', a.autoFocus); + } + view.router.load({ + content: pageHTML, + animatePages: a.params.openWithAnimation + }); + $(document).once('page:back', '.autocomplete-page', function () { + a.opened = false; + if (a.params.onClose) a.params.onClose(a); + }); + } + } + }; + a.close = function (e) { + if (!a.opened) return; + if (a.params.openIn === 'dropdown') { + if (e && e.type === 'blur' && a.dropdown.find('label.active-state').length > 0) return; + a.dropdown.removeClass('autocomplete-dropdown-in').remove(); + a.input.parents('.item-content-dropdown-expand').removeClass('item-content-dropdown-expand'); + a.opened = false; + app.offResize(a.positionDropDown); + if (a.params.onClose) a.params.onClose(a); + } + if (a.params.openIn === 'popup') { + if (a.popup) app.closeModal(a.popup); + } + }; + + // Init Events + a.initEvents = function (detach) { + var method = detach ? 'off' : 'on'; + if (a.params.openIn !== 'dropdown' && a.opener) { + a.opener[method]('click', a.open); + } + if (a.params.openIn === 'dropdown' && a.input) { + a.input[method]('focus', a.open); + a.input[method]('input', handleInputValue); + if (app.device.android) { + $('html')[method]('click', closeOnHTMLClick); + } + else { + a.input[method]('blur', a.close); + } + } + if (detach && a.dropdown) { + a.dropdown = null; + } + }; + + // Init/Destroy Methods + a.init = function () { + a.initEvents(); + }; + a.destroy = function () { + a.initEvents(true); + a = null; + }; + + // Init + a.init(); + + return a; +}; +app.autocomplete = function (params) { + return new Autocomplete(params); +}; diff --git a/bower_components/framework7/src/js/framework7/calendar.js b/bower_components/framework7/src/js/framework7/calendar.js new file mode 100644 index 00000000..95df77ae --- /dev/null +++ b/bower_components/framework7/src/js/framework7/calendar.js @@ -0,0 +1,998 @@ +/*====================================================== +************ Calendar ************ +======================================================*/ +var Calendar = function (params) { + var p = this; + var defaults = { + monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August' , 'September' , 'October', 'November', 'December'], + monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + firstDay: 1, // First day of the week, Monday + weekendDays: [0, 6], // Sunday and Saturday + multiple: false, + rangePicker: false, + dateFormat: 'yyyy-mm-dd', + direction: 'horizontal', // or 'vertical' + minDate: null, + maxDate: null, + disabled: null, // dates range of disabled days + events: null, // dates range of days with events + rangesClasses: null, //array with custom classes date ranges + touchMove: true, + animate: true, + closeOnSelect: false, + monthPicker: true, + monthPickerTemplate: + '
                                                    ' + + '' + + '' + + '' + + '
                                                    ', + yearPicker: true, + yearPickerTemplate: + '
                                                    ' + + '' + + '' + + '' + + '
                                                    ', + weekHeader: true, + // Common settings + closeByOutsideClick: true, + scrollToInput: true, + inputReadOnly: true, + convertToPopover: true, + onlyInPopover: false, + toolbar: true, + toolbarCloseText: 'Done', + headerPlaceholder: 'Select date', + header: app.params.material, + footer: app.params.material, + toolbarTemplate: + '
                                                    ' + + '
                                                    ' + + '{{monthPicker}}' + + '{{yearPicker}}' + + '
                                                    ' + + '
                                                    ', + headerTemplate: + '
                                                    ' + + '
                                                    {{placeholder}}
                                                    ' + + '
                                                    ', + footerTemplate: + '', + + /* Callbacks + onMonthAdd + onChange + onOpen + onClose + onDayClick + onMonthYearChangeStart + onMonthYearChangeEnd + */ + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + p.params = params; + p.initialized = false; + + // Inline flag + p.inline = p.params.container ? true : false; + + // Is horizontal + p.isH = p.params.direction === 'horizontal'; + + // RTL inverter + var inverter = p.isH ? (app.rtl ? -1 : 1) : 1; + + // Animating flag + p.animating = false; + + // Should be converted to popover + function isPopover() { + var toPopover = false; + if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover; + if (!p.inline && p.params.input) { + if (p.params.onlyInPopover) toPopover = true; + else { + if (app.device.ios) { + toPopover = app.device.ipad ? true : false; + } + else { + if (app.width >= 768) toPopover = true; + } + } + } + return toPopover; + } + function inPopover() { + if (p.opened && p.container && p.container.length > 0 && p.container.parents('.popover').length > 0) return true; + else return false; + } + + // Format date + function formatDate(date) { + date = new Date(date); + var year = date.getFullYear(); + var month = date.getMonth(); + var month1 = month + 1; + var day = date.getDate(); + var weekDay = date.getDay(); + + return p.params.dateFormat + .replace(/yyyy/g, year) + .replace(/yy/g, (year + '').substring(2)) + .replace(/mm/g, month1 < 10 ? '0' + month1 : month1) + .replace(/m(\W+)/g, month1 + '$1') + .replace(/MM/g, p.params.monthNames[month]) + .replace(/M(\W+)/g, p.params.monthNamesShort[month] + '$1') + .replace(/dd/g, day < 10 ? '0' + day : day) + .replace(/d(\W+)/g, day + '$1') + .replace(/DD/g, p.params.dayNames[weekDay]) + .replace(/D(\W+)/g, p.params.dayNamesShort[weekDay] + '$1'); + } + + + // Value + p.addValue = function (value) { + if (p.params.multiple) { + if (!p.value) p.value = []; + var inValuesIndex; + for (var i = 0; i < p.value.length; i++) { + if (new Date(value).getTime() === new Date(p.value[i]).getTime()) { + inValuesIndex = i; + } + } + if (typeof inValuesIndex === 'undefined') { + p.value.push(value); + } + else { + p.value.splice(inValuesIndex, 1); + } + p.updateValue(); + } + else if (p.params.rangePicker) { + if (!p.value) p.value = []; + if (p.value.length === 2 || p.value.length === 0) { + p.value = []; + } + if (p.value[0] !== value) p.value.push(value); + else p.value = []; + p.value.sort(function (a,b) { + return a - b; + }); + p.updateValue(); + } + else { + p.value = [value]; + p.updateValue(); + } + }; + p.setValue = function (arrValues) { + p.value = arrValues; + p.updateValue(); + }; + p.updateValue = function (onlyHeader) { + var i, inputValue; + if (p.container && p.container.length > 0) { + p.wrapper.find('.picker-calendar-day-selected').removeClass('picker-calendar-day-selected'); + var valueDate; + if (p.params.rangePicker && p.value.length === 2) { + for (i = new Date(p.value[0]).getTime(); i <= new Date(p.value[1]).getTime(); i += 24*60*60*1000) { + valueDate = new Date(i); + p.wrapper.find('.picker-calendar-day[data-date="' + valueDate.getFullYear() + '-' + valueDate.getMonth() + '-' + valueDate.getDate() + '"]').addClass('picker-calendar-day-selected'); + } + } + else { + for (i = 0; i < p.value.length; i++) { + valueDate = new Date(p.value[i]); + p.wrapper.find('.picker-calendar-day[data-date="' + valueDate.getFullYear() + '-' + valueDate.getMonth() + '-' + valueDate.getDate() + '"]').addClass('picker-calendar-day-selected'); + } + } + } + + if (p.params.onChange) { + p.params.onChange(p, p.value); + } + if ((p.input && p.input.length > 0) || (app.params.material && p.params.header)) { + if (p.params.formatValue) inputValue = p.params.formatValue(p, p.value); + else { + inputValue = []; + for (i = 0; i < p.value.length; i++) { + inputValue.push(formatDate(p.value[i])); + } + inputValue = inputValue.join(p.params.rangePicker ? ' - ' : ', '); + } + if (app.params.material && p.params.header && p.container && p.container.length > 0) { + p.container.find('.picker-calendar-selected-date').text(inputValue); + } + if (p.input && p.input.length > 0 && !onlyHeader) { + $(p.input).val(inputValue); + $(p.input).trigger('change'); + } + + } + }; + + // Columns Handlers + p.initCalendarEvents = function () { + var col; + var allowItemClick = true; + var isTouched, isMoved, touchStartX, touchStartY, touchCurrentX, touchCurrentY, touchStartTime, touchEndTime, startTranslate, currentTranslate, wrapperWidth, wrapperHeight, percentage, touchesDiff, isScrolling; + function handleTouchStart (e) { + if (isMoved || isTouched) return; + // e.preventDefault(); + isTouched = true; + touchStartX = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touchStartY = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = (new Date()).getTime(); + percentage = 0; + allowItemClick = true; + isScrolling = undefined; + startTranslate = currentTranslate = p.monthsTranslate; + } + function handleTouchMove (e) { + if (!isTouched) return; + + touchCurrentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (typeof isScrolling === 'undefined') { + isScrolling = !!(isScrolling || Math.abs(touchCurrentY - touchStartY) > Math.abs(touchCurrentX - touchStartX)); + } + if (p.isH && isScrolling) { + isTouched = false; + return; + } + e.preventDefault(); + if (p.animating) { + isTouched = false; + return; + } + allowItemClick = false; + if (!isMoved) { + // First move + isMoved = true; + wrapperWidth = p.wrapper[0].offsetWidth; + wrapperHeight = p.wrapper[0].offsetHeight; + p.wrapper.transition(0); + } + + touchesDiff = p.isH ? touchCurrentX - touchStartX : touchCurrentY - touchStartY; + percentage = touchesDiff/(p.isH ? wrapperWidth : wrapperHeight); + currentTranslate = (p.monthsTranslate * inverter + percentage) * 100; + + // Transform wrapper + p.wrapper.transform('translate3d(' + (p.isH ? currentTranslate : 0) + '%, ' + (p.isH ? 0 : currentTranslate) + '%, 0)'); + + } + function handleTouchEnd (e) { + if (!isTouched || !isMoved) { + isTouched = isMoved = false; + return; + } + isTouched = isMoved = false; + + touchEndTime = new Date().getTime(); + if (touchEndTime - touchStartTime < 300) { + if (Math.abs(touchesDiff) < 10) { + p.resetMonth(); + } + else if (touchesDiff >= 10) { + if (app.rtl) p.nextMonth(); + else p.prevMonth(); + } + else { + if (app.rtl) p.prevMonth(); + else p.nextMonth(); + } + } + else { + if (percentage <= -0.5) { + if (app.rtl) p.prevMonth(); + else p.nextMonth(); + } + else if (percentage >= 0.5) { + if (app.rtl) p.nextMonth(); + else p.prevMonth(); + } + else { + p.resetMonth(); + } + } + + // Allow click + setTimeout(function () { + allowItemClick = true; + }, 100); + } + + function handleDayClick(e) { + if (!allowItemClick) return; + var day = $(e.target).parents('.picker-calendar-day'); + if (day.length === 0 && $(e.target).hasClass('picker-calendar-day')) { + day = $(e.target); + } + if (day.length === 0) return; + if (day.hasClass('picker-calendar-day-disabled')) return; + if (!p.params.rangePicker) { + if (day.hasClass('picker-calendar-day-next')) p.nextMonth(); + if (day.hasClass('picker-calendar-day-prev')) p.prevMonth(); + } + var dateYear = day.attr('data-year'); + var dateMonth = day.attr('data-month'); + var dateDay = day.attr('data-day'); + if (p.params.onDayClick) { + p.params.onDayClick(p, day[0], dateYear, dateMonth, dateDay); + } + if (!day.hasClass('picker-calendar-day-selected') || p.params.multiple || p.params.rangePicker) { + p.addValue(new Date(dateYear, dateMonth, dateDay, 0, 0, 0)); + } + if (p.params.closeOnSelect) { + if (p.params.rangePicker && p.value.length === 2 || !p.params.rangePicker) p.close(); + } + } + + p.container.find('.picker-calendar-prev-month').on('click', p.prevMonth); + p.container.find('.picker-calendar-next-month').on('click', p.nextMonth); + p.container.find('.picker-calendar-prev-year').on('click', p.prevYear); + p.container.find('.picker-calendar-next-year').on('click', p.nextYear); + p.wrapper.on('click', handleDayClick); + var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false; + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + if (p.params.touchMove) { + p.wrapper.on(app.touchEvents.start, handleTouchStart, passiveListener); + p.wrapper.on(app.touchEvents.move, handleTouchMove, activeListener); + p.wrapper.on(app.touchEvents.end, handleTouchEnd, passiveListener); + } + + p.container[0].f7DestroyCalendarEvents = function () { + p.container.find('.picker-calendar-prev-month').off('click', p.prevMonth); + p.container.find('.picker-calendar-next-month').off('click', p.nextMonth); + p.container.find('.picker-calendar-prev-year').off('click', p.prevYear); + p.container.find('.picker-calendar-next-year').off('click', p.nextYear); + p.wrapper.off('click', handleDayClick); + if (p.params.touchMove) { + p.wrapper.off(app.touchEvents.start, handleTouchStart, passiveListener); + p.wrapper.off(app.touchEvents.move, handleTouchMove, activeListener); + p.wrapper.off(app.touchEvents.end, handleTouchEnd, passiveListener); + } + }; + + + }; + p.destroyCalendarEvents = function (colContainer) { + if ('f7DestroyCalendarEvents' in p.container[0]) p.container[0].f7DestroyCalendarEvents(); + }; + + // Scan Dates Range + p.dateInRange = function (dayDate, range) { + var match = false; + var i; + if (!range) return false; + if (Array.isArray(range)) { + for (i = 0; i < range.length; i ++) { + if (range[i].from || range[i].to) { + if (range[i].from && range[i].to) { + if ((dayDate <= new Date(range[i].to).getTime()) && (dayDate >= new Date(range[i].from).getTime())) { + match = true; + } + } + else if (range[i].from) { + if (dayDate >= new Date(range[i].from).getTime()) { + match = true; + } + } + else if (range[i].to) { + if (dayDate <= new Date(range[i].to).getTime()) { + match = true; + } + } + } else if (dayDate === new Date(range[i]).getTime()) { + match = true; + } + } + } + else if (range.from || range.to) { + if (range.from && range.to) { + if ((dayDate <= new Date(range.to).getTime()) && (dayDate >= new Date(range.from).getTime())) { + match = true; + } + } + else if (range.from) { + if (dayDate >= new Date(range.from).getTime()) { + match = true; + } + } + else if (range.to) { + if (dayDate <= new Date(range.to).getTime()) { + match = true; + } + } + } + else if (typeof range === 'function') { + match = range(new Date(dayDate)); + } + return match; + }; + // Calendar Methods + p.daysInMonth = function (date) { + var d = new Date(date); + return new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate(); + }; + p.monthHTML = function (date, offset) { + date = new Date(date); + var year = date.getFullYear(), + month = date.getMonth(), + day = date.getDate(); + if (offset === 'next') { + if (month === 11) date = new Date(year + 1, 0); + else date = new Date(year, month + 1, 1); + } + if (offset === 'prev') { + if (month === 0) date = new Date(year - 1, 11); + else date = new Date(year, month - 1, 1); + } + if (offset === 'next' || offset === 'prev') { + month = date.getMonth(); + year = date.getFullYear(); + } + var daysInPrevMonth = p.daysInMonth(new Date(date.getFullYear(), date.getMonth()).getTime() - 10 * 24 * 60 * 60 * 1000), + daysInMonth = p.daysInMonth(date), + firstDayOfMonthIndex = new Date(date.getFullYear(), date.getMonth()).getDay(); + if (firstDayOfMonthIndex === 0) firstDayOfMonthIndex = 7; + + var dayDate, currentValues = [], i, j, k, + rows = 6, cols = 7, + monthHTML = '', + dayIndex = 0 + (p.params.firstDay - 1), + today = new Date().setHours(0,0,0,0), + minDate = p.params.minDate ? new Date(p.params.minDate).getTime() : null, + maxDate = p.params.maxDate ? new Date(p.params.maxDate).getTime() : null, + disabled, + hasEvent; + + if (p.value && p.value.length) { + for (i = 0; i < p.value.length; i++) { + currentValues.push(new Date(p.value[i]).setHours(0,0,0,0)); + } + } + + for (i = 1; i <= rows; i++) { + var rowHTML = ''; + var row = i; + for (j = 1; j <= cols; j++) { + var col = j; + dayIndex ++; + var dayNumber = dayIndex - firstDayOfMonthIndex; + var weekDayIndex = (col - 1 + p.params.firstDay > 6) ? (col - 1 - 7 + p.params.firstDay) : (col - 1 + p.params.firstDay); + var addClass = ''; + if (dayNumber < 0) { + dayNumber = daysInPrevMonth + dayNumber + 1; + addClass += ' picker-calendar-day-prev'; + dayDate = new Date(month - 1 < 0 ? year - 1 : year, month - 1 < 0 ? 11 : month - 1, dayNumber).getTime(); + } + else { + dayNumber = dayNumber + 1; + if (dayNumber > daysInMonth) { + dayNumber = dayNumber - daysInMonth; + addClass += ' picker-calendar-day-next'; + dayDate = new Date(month + 1 > 11 ? year + 1 : year, month + 1 > 11 ? 0 : month + 1, dayNumber).getTime(); + } + else { + dayDate = new Date(year, month, dayNumber).getTime(); + } + } + // Today + if (dayDate === today) addClass += ' picker-calendar-day-today'; + // Selected + if (p.params.rangePicker && currentValues.length === 2) { + if (dayDate >= currentValues[0] && dayDate <= currentValues[1]) addClass += ' picker-calendar-day-selected'; + } + else { + if (currentValues.indexOf(dayDate) >= 0) addClass += ' picker-calendar-day-selected'; + } + // Weekend + if (p.params.weekendDays.indexOf(weekDayIndex) >= 0) { + addClass += ' picker-calendar-day-weekend'; + } + // Has Events + hasEvent = false; + if (p.params.events) { + if (p.dateInRange(dayDate, p.params.events)) { + hasEvent = true; + } + } + if (hasEvent) { + addClass += ' picker-calendar-day-has-events'; + } + // Custom Ranges + if (p.params.rangesClasses) { + for (k = 0; k < p.params.rangesClasses.length; k++) { + if (p.dateInRange(dayDate, p.params.rangesClasses[k].range)) { + addClass += ' ' + p.params.rangesClasses[k].cssClass; + } + } + } + // Disabled + disabled = false; + if ((minDate && dayDate < minDate) || (maxDate && dayDate > maxDate)) { + disabled = true; + } + if (p.params.disabled) { + if (p.dateInRange(dayDate, p.params.disabled)) { + disabled = true; + } + } + if (disabled) { + addClass += ' picker-calendar-day-disabled'; + } + + + dayDate = new Date(dayDate); + var dayYear = dayDate.getFullYear(); + var dayMonth = dayDate.getMonth(); + rowHTML += '
                                                    '+dayNumber+'
                                                    '; + } + monthHTML += '
                                                    ' + rowHTML + '
                                                    '; + } + monthHTML = '
                                                    ' + monthHTML + '
                                                    '; + return monthHTML; + }; + p.animating = false; + p.updateCurrentMonthYear = function (dir) { + if (typeof dir === 'undefined') { + p.currentMonth = parseInt(p.months.eq(1).attr('data-month'), 10); + p.currentYear = parseInt(p.months.eq(1).attr('data-year'), 10); + } + else { + p.currentMonth = parseInt(p.months.eq(dir === 'next' ? (p.months.length - 1) : 0).attr('data-month'), 10); + p.currentYear = parseInt(p.months.eq(dir === 'next' ? (p.months.length - 1) : 0).attr('data-year'), 10); + } + p.container.find('.current-month-value').text(p.params.monthNames[p.currentMonth]); + p.container.find('.current-year-value').text(p.currentYear); + + }; + p.onMonthChangeStart = function (dir) { + p.updateCurrentMonthYear(dir); + p.months.removeClass('picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next'); + var currentIndex = dir === 'next' ? p.months.length - 1 : 0; + + p.months.eq(currentIndex).addClass('picker-calendar-month-current'); + p.months.eq(dir === 'next' ? currentIndex - 1 : currentIndex + 1).addClass(dir === 'next' ? 'picker-calendar-month-prev' : 'picker-calendar-month-next'); + + if (p.params.onMonthYearChangeStart) { + p.params.onMonthYearChangeStart(p, p.currentYear, p.currentMonth); + } + }; + p.onMonthChangeEnd = function (dir, rebuildBoth) { + p.animating = false; + var nextMonthHTML, prevMonthHTML, newMonthHTML; + p.wrapper.find('.picker-calendar-month:not(.picker-calendar-month-prev):not(.picker-calendar-month-current):not(.picker-calendar-month-next)').remove(); + + if (typeof dir === 'undefined') { + dir = 'next'; + rebuildBoth = true; + } + if (!rebuildBoth) { + newMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), dir); + } + else { + p.wrapper.find('.picker-calendar-month-next, .picker-calendar-month-prev').remove(); + prevMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), 'prev'); + nextMonthHTML = p.monthHTML(new Date(p.currentYear, p.currentMonth), 'next'); + } + if (dir === 'next' || rebuildBoth) { + p.wrapper.append(newMonthHTML || nextMonthHTML); + } + if (dir === 'prev' || rebuildBoth) { + p.wrapper.prepend(newMonthHTML || prevMonthHTML); + } + p.months = p.wrapper.find('.picker-calendar-month'); + p.setMonthsTranslate(p.monthsTranslate); + if (p.params.onMonthAdd) { + p.params.onMonthAdd(p, dir === 'next' ? p.months.eq(p.months.length - 1)[0] : p.months.eq(0)[0]); + } + if (p.params.onMonthYearChangeEnd) { + p.params.onMonthYearChangeEnd(p, p.currentYear, p.currentMonth); + } + }; + p.setMonthsTranslate = function (translate) { + translate = translate || p.monthsTranslate || 0; + if (typeof p.monthsTranslate === 'undefined') p.monthsTranslate = translate; + p.months.removeClass('picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next'); + var prevMonthTranslate = -(translate + 1) * 100 * inverter; + var currentMonthTranslate = -translate * 100 * inverter; + var nextMonthTranslate = -(translate - 1) * 100 * inverter; + p.months.eq(0).transform('translate3d(' + (p.isH ? prevMonthTranslate : 0) + '%, ' + (p.isH ? 0 : prevMonthTranslate) + '%, 0)').addClass('picker-calendar-month-prev'); + p.months.eq(1).transform('translate3d(' + (p.isH ? currentMonthTranslate : 0) + '%, ' + (p.isH ? 0 : currentMonthTranslate) + '%, 0)').addClass('picker-calendar-month-current'); + p.months.eq(2).transform('translate3d(' + (p.isH ? nextMonthTranslate : 0) + '%, ' + (p.isH ? 0 : nextMonthTranslate) + '%, 0)').addClass('picker-calendar-month-next'); + }; + p.nextMonth = function (transition) { + if (typeof transition === 'undefined' || typeof transition === 'object') { + transition = ''; + if (!p.params.animate) transition = 0; + } + var nextMonth = parseInt(p.months.eq(p.months.length - 1).attr('data-month'), 10); + var nextYear = parseInt(p.months.eq(p.months.length - 1).attr('data-year'), 10); + var nextDate = new Date(nextYear, nextMonth); + var nextDateTime = nextDate.getTime(); + var transitionEndCallback = p.animating ? false : true; + if (p.params.maxDate) { + if (nextDateTime > new Date(p.params.maxDate).getTime()) { + return p.resetMonth(); + } + } + p.monthsTranslate --; + if (nextMonth === p.currentMonth) { + var nextMonthTranslate = -(p.monthsTranslate) * 100 * inverter; + var nextMonthHTML = $(p.monthHTML(nextDateTime, 'next')).transform('translate3d(' + (p.isH ? nextMonthTranslate : 0) + '%, ' + (p.isH ? 0 : nextMonthTranslate) + '%, 0)').addClass('picker-calendar-month-next'); + p.wrapper.append(nextMonthHTML[0]); + p.months = p.wrapper.find('.picker-calendar-month'); + if (p.params.onMonthAdd) { + p.params.onMonthAdd(p, p.months.eq(p.months.length - 1)[0]); + } + } + p.animating = true; + p.onMonthChangeStart('next'); + var translate = (p.monthsTranslate * 100) * inverter; + + p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)'); + if (transitionEndCallback) { + p.wrapper.transitionEnd(function () { + p.onMonthChangeEnd('next'); + }); + } + if (!p.params.animate) { + p.onMonthChangeEnd('next'); + } + }; + p.prevMonth = function (transition) { + if (typeof transition === 'undefined' || typeof transition === 'object') { + transition = ''; + if (!p.params.animate) transition = 0; + } + var prevMonth = parseInt(p.months.eq(0).attr('data-month'), 10); + var prevYear = parseInt(p.months.eq(0).attr('data-year'), 10); + var prevDate = new Date(prevYear, prevMonth + 1, -1); + var prevDateTime = prevDate.getTime(); + var transitionEndCallback = p.animating ? false : true; + if (p.params.minDate) { + if (prevDateTime < new Date(p.params.minDate).getTime()) { + return p.resetMonth(); + } + } + p.monthsTranslate ++; + if (prevMonth === p.currentMonth) { + var prevMonthTranslate = -(p.monthsTranslate) * 100 * inverter; + var prevMonthHTML = $(p.monthHTML(prevDateTime, 'prev')).transform('translate3d(' + (p.isH ? prevMonthTranslate : 0) + '%, ' + (p.isH ? 0 : prevMonthTranslate) + '%, 0)').addClass('picker-calendar-month-prev'); + p.wrapper.prepend(prevMonthHTML[0]); + p.months = p.wrapper.find('.picker-calendar-month'); + if (p.params.onMonthAdd) { + p.params.onMonthAdd(p, p.months.eq(0)[0]); + } + } + p.animating = true; + p.onMonthChangeStart('prev'); + var translate = (p.monthsTranslate * 100) * inverter; + p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)'); + if (transitionEndCallback) { + p.wrapper.transitionEnd(function () { + p.onMonthChangeEnd('prev'); + }); + } + if (!p.params.animate) { + p.onMonthChangeEnd('prev'); + } + }; + p.resetMonth = function (transition) { + if (typeof transition === 'undefined') transition = ''; + var translate = (p.monthsTranslate * 100) * inverter; + p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? translate : 0) + '%, ' + (p.isH ? 0 : translate) + '%, 0)'); + }; + p.setYearMonth = function (year, month, transition) { + if (typeof year === 'undefined') year = p.currentYear; + if (typeof month === 'undefined') month = p.currentMonth; + if (typeof transition === 'undefined' || typeof transition === 'object') { + transition = ''; + if (!p.params.animate) transition = 0; + } + var targetDate; + if (year < p.currentYear) { + targetDate = new Date(year, month + 1, -1).getTime(); + } + else { + targetDate = new Date(year, month).getTime(); + } + if (p.params.maxDate && targetDate > new Date(p.params.maxDate).getTime()) { + return false; + } + if (p.params.minDate && targetDate < new Date(p.params.minDate).getTime()) { + return false; + } + var currentDate = new Date(p.currentYear, p.currentMonth).getTime(); + var dir = targetDate > currentDate ? 'next' : 'prev'; + var newMonthHTML = p.monthHTML(new Date(year, month)); + p.monthsTranslate = p.monthsTranslate || 0; + var prevTranslate = p.monthsTranslate; + var monthTranslate, wrapperTranslate; + var transitionEndCallback = p.animating ? false : true; + if (targetDate > currentDate) { + // To next + p.monthsTranslate --; + if (!p.animating) p.months.eq(p.months.length - 1).remove(); + p.wrapper.append(newMonthHTML); + p.months = p.wrapper.find('.picker-calendar-month'); + monthTranslate = -(prevTranslate - 1) * 100 * inverter; + p.months.eq(p.months.length - 1).transform('translate3d(' + (p.isH ? monthTranslate : 0) + '%, ' + (p.isH ? 0 : monthTranslate) + '%, 0)').addClass('picker-calendar-month-next'); + } + else { + // To prev + p.monthsTranslate ++; + if (!p.animating) p.months.eq(0).remove(); + p.wrapper.prepend(newMonthHTML); + p.months = p.wrapper.find('.picker-calendar-month'); + monthTranslate = -(prevTranslate + 1) * 100 * inverter; + p.months.eq(0).transform('translate3d(' + (p.isH ? monthTranslate : 0) + '%, ' + (p.isH ? 0 : monthTranslate) + '%, 0)').addClass('picker-calendar-month-prev'); + } + if (p.params.onMonthAdd) { + p.params.onMonthAdd(p, dir === 'next' ? p.months.eq(p.months.length - 1)[0] : p.months.eq(0)[0]); + } + p.animating = true; + p.onMonthChangeStart(dir); + wrapperTranslate = (p.monthsTranslate * 100) * inverter; + p.wrapper.transition(transition).transform('translate3d(' + (p.isH ? wrapperTranslate : 0) + '%, ' + (p.isH ? 0 : wrapperTranslate) + '%, 0)'); + if (transitionEndCallback) { + p.wrapper.transitionEnd(function () { + p.onMonthChangeEnd(dir, true); + }); + } + if (!p.params.animate) { + p.onMonthChangeEnd(dir); + } + }; + p.nextYear = function () { + p.setYearMonth(p.currentYear + 1); + }; + p.prevYear = function () { + p.setYearMonth(p.currentYear - 1); + }; + + + // HTML Layout + p.layout = function () { + var pickerHTML = ''; + var pickerClass = ''; + var i; + + var layoutDate = p.value && p.value.length ? p.value[0] : new Date().setHours(0,0,0,0); + var prevMonthHTML = p.monthHTML(layoutDate, 'prev'); + var currentMonthHTML = p.monthHTML(layoutDate); + var nextMonthHTML = p.monthHTML(layoutDate, 'next'); + var monthsHTML = '
                                                    ' + (prevMonthHTML + currentMonthHTML + nextMonthHTML) + '
                                                    '; + // Week days header + var weekHeaderHTML = ''; + if (p.params.weekHeader) { + for (i = 0; i < 7; i++) { + var weekDayIndex = (i + p.params.firstDay > 6) ? (i - 7 + p.params.firstDay) : (i + p.params.firstDay); + var dayName = p.params.dayNamesShort[weekDayIndex]; + weekHeaderHTML += '
                                                    ' + dayName + '
                                                    '; + + } + weekHeaderHTML = '
                                                    ' + weekHeaderHTML + '
                                                    '; + } + pickerClass = 'picker-modal picker-calendar' + + (p.params.rangePicker ? ' picker-calendar-range' : '') + + (p.params.cssClass ? ' ' + p.params.cssClass : ''); + var toolbarHTML = p.params.toolbar ? p.params.toolbarTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : ''; + if (p.params.toolbar) { + toolbarHTML = p.params.toolbarTemplate + .replace(/{{closeText}}/g, p.params.toolbarCloseText) + .replace(/{{monthPicker}}/g, (p.params.monthPicker ? p.params.monthPickerTemplate : '')) + .replace(/{{yearPicker}}/g, (p.params.yearPicker ? p.params.yearPickerTemplate : '')); + } + var headerHTML = p.params.header ? p.params.headerTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText).replace(/{{placeholder}}/g, p.params.headerPlaceholder) : ''; + var footerHTML = p.params.footer ? p.params.footerTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : ''; + + pickerHTML = + '
                                                    ' + + headerHTML + + footerHTML + + toolbarHTML + + '
                                                    ' + + weekHeaderHTML + + monthsHTML + + '
                                                    ' + + '
                                                    '; + + + p.pickerHTML = pickerHTML; + }; + + // Input Events + function openOnInput(e) { + e.preventDefault(); + if (p.opened) return; + p.open(); + if (p.params.scrollToInput && !isPopover() && !app.params.material) { + var pageContent = p.input.parents('.page-content'); + if (pageContent.length === 0) return; + + var paddingTop = parseInt(pageContent.css('padding-top'), 10), + paddingBottom = parseInt(pageContent.css('padding-bottom'), 10), + pageHeight = pageContent[0].offsetHeight - paddingTop - p.container.height(), + pageScrollHeight = pageContent[0].scrollHeight - paddingTop - p.container.height(), + newPaddingBottom; + + var inputTop = p.input.offset().top - paddingTop + p.input[0].offsetHeight; + if (inputTop > pageHeight) { + var scrollTop = pageContent.scrollTop() + inputTop - pageHeight; + if (scrollTop + pageHeight > pageScrollHeight) { + newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom; + if (pageHeight === pageScrollHeight) { + newPaddingBottom = p.container.height(); + } + pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'}); + } + pageContent.scrollTop(scrollTop, 300); + } + } + } + function closeOnHTMLClick(e) { + if (inPopover()) return; + if (p.input && p.input.length > 0) { + if (e.target !== p.input[0] && $(e.target).parents('.picker-modal').length === 0) p.close(); + } + else { + if ($(e.target).parents('.picker-modal').length === 0) p.close(); + } + } + + if (p.params.input) { + p.input = $(p.params.input); + if (p.input.length > 0) { + if (p.params.inputReadOnly) p.input.prop('readOnly', true); + if (!p.inline) { + p.input.on('click', openOnInput); + } + if (p.params.inputReadOnly) { + p.input.on('focus mousedown', function (e) { + e.preventDefault(); + }); + } + } + + } + + if (!p.inline && p.params.closeByOutsideClick) $('html').on('click', closeOnHTMLClick); + + // Open + function onPickerClose() { + p.opened = false; + if (p.input && p.input.length > 0) { + p.input.parents('.page-content').css({'padding-bottom': ''}); + if (app.params.material) p.input.trigger('blur'); + } + if (p.params.onClose) p.params.onClose(p); + + // Destroy events + p.destroyCalendarEvents(); + } + + p.opened = false; + p.open = function () { + var toPopover = isPopover(); + var updateValue = false; + if (!p.opened) { + // Set date value + if (!p.value) { + if (p.params.value) { + p.value = p.params.value; + updateValue = true; + } + } + + // Layout + p.layout(); + + // Append + if (toPopover) { + p.pickerHTML = '
                                                    ' + p.pickerHTML + '
                                                    '; + p.popover = app.popover(p.pickerHTML, p.params.input, true); + p.container = $(p.popover).find('.picker-modal'); + $(p.popover).on('popover:close', function () { + onPickerClose(); + }); + } + else if (p.inline) { + p.container = $(p.pickerHTML); + p.container.addClass('picker-modal-inline'); + $(p.params.container).append(p.container); + } + else { + p.container = $(app.pickerModal(p.pickerHTML)); + $(p.container) + .on('picker:close', function () { + onPickerClose(); + }); + } + + // Store calendar instance + p.container[0].f7Calendar = p; + p.wrapper = p.container.find('.picker-calendar-months-wrapper'); + + // Months + p.months = p.wrapper.find('.picker-calendar-month'); + + // Update current month and year + p.updateCurrentMonthYear(); + + // Set initial translate + p.monthsTranslate = 0; + p.setMonthsTranslate(); + + // Init events + p.initCalendarEvents(); + + // Update input value + if (updateValue) p.updateValue(); + else if (app.params.material && p.value) p.updateValue(true); + + // Material Focus + if (p.input && p.input.length > 0 && app.params.material) { + p.input.trigger('focus'); + } + + } + + // Set flag + p.opened = true; + p.initialized = true; + if (p.params.onMonthAdd) { + p.months.each(function () { + p.params.onMonthAdd(p, this); + }); + } + if (p.params.onOpen) p.params.onOpen(p); + }; + + // Close + p.close = function () { + if (!p.opened || p.inline) return; + if (inPopover()) { + app.closeModal(p.popover); + return; + } + else { + app.closeModal(p.container); + return; + } + }; + + // Destroy + p.destroy = function () { + p.close(); + if (p.params.input && p.input.length > 0) { + p.input.off('click focus', openOnInput); + } + $('html').off('click', closeOnHTMLClick); + }; + + if (p.inline) { + p.open(); + } + else { + if (!p.initialized && p.params.value) p.setValue(p.params.value); + } + + return p; +}; +app.calendar = function (params) { + return new Calendar(params); +}; diff --git a/bower_components/framework7/src/js/framework7/clicks.js b/bower_components/framework7/src/js/framework7/clicks.js new file mode 100644 index 00000000..ddb0358f --- /dev/null +++ b/bower_components/framework7/src/js/framework7/clicks.js @@ -0,0 +1,342 @@ +/*=============================================================================== +************ Handle clicks and make them fast (on tap); ************ +===============================================================================*/ +app.initClickEvents = function () { + function handleScrollTop(e) { + /*jshint validthis:true */ + var clicked = $(this); + var target = $(e.target); + var isLink = clicked[0].nodeName.toLowerCase() === 'a' || + clicked.parents('a').length > 0 || + target[0].nodeName.toLowerCase() === 'a' || + target.parents('a').length > 0; + + if (isLink) return; + var pageContent, page; + if (app.params.scrollTopOnNavbarClick && clicked.is('.navbar .center')) { + // Find active page + var navbar = clicked.parents('.navbar'); + + // Static Layout + pageContent = navbar.parents('.page-content'); + + if (pageContent.length === 0) { + // Fixed Layout + if (navbar.parents('.page').length > 0) { + pageContent = navbar.parents('.page').find('.page-content'); + } + // Through Layout + if (pageContent.length === 0) { + if (navbar.nextAll('.pages').length > 0) { + pageContent = navbar.nextAll('.pages').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content'); + } + } + } + } + if (app.params.scrollTopOnStatusbarClick && clicked.is('.statusbar-overlay')) { + if ($('.popup.modal-in').length > 0) { + // Check for opened popup + pageContent = $('.popup.modal-in').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content'); + } + else if ($('.panel.active').length > 0) { + // Check for opened panel + pageContent = $('.panel.active').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content'); + } + else if ($('.views > .view.active').length > 0) { + // View in tab bar app layout + pageContent = $('.views > .view.active').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content'); + } + else { + // Usual case + pageContent = $('.views').find('.page:not(.page-on-left):not(.page-on-right):not(.cached)').find('.page-content'); + } + } + + if (pageContent && pageContent.length > 0) { + // Check for tab + if (pageContent.hasClass('tab')) { + pageContent = pageContent.parent('.tabs').children('.page-content.active'); + } + if (pageContent.length > 0) pageContent.scrollTop(0, 300); + } + } + function handleClicks(e) { + /*jshint validthis:true */ + var clicked = $(this); + var url = clicked.attr('href'); + var isLink = clicked[0].nodeName.toLowerCase() === 'a'; + + // Check if link is external + if (isLink) { + if (clicked.is(app.params.externalLinks) || (url && url.indexOf('javascript:') >= 0)) { + if(url && clicked.attr('target') === '_system') { + e.preventDefault(); + window.open(url, '_system'); + } + return; + } + } + + // Collect Clicked data- attributes + var clickedData = clicked.dataset(); + + // Smart Select + if (clicked.hasClass('smart-select')) { + if (app.smartSelectOpen) app.smartSelectOpen(clicked); + } + + // Open Panel + if (clicked.hasClass('open-panel')) { + if ($('.panel').length === 1) { + if ($('.panel').hasClass('panel-left')) app.openPanel('left'); + else app.openPanel('right'); + } + else { + if (clickedData.panel === 'right') app.openPanel('right'); + else app.openPanel('left'); + } + } + + // Close Panel + if (clicked.hasClass('close-panel')) { + app.closePanel(); + } + + // Panel Overlay + if (clicked.hasClass('panel-overlay')) { + $('.panel.active').trigger('panel:overlay-click'); + if (app.params.panelsCloseByOutside) app.closePanel(); + } + + // Popover + if (clicked.hasClass('open-popover')) { + var popover; + if (clickedData.popover) { + popover = clickedData.popover; + } + else popover = '.popover'; + app.popover(popover, clicked); + } + if (clicked.hasClass('close-popover')) { + app.closeModal('.popover.modal-in'); + } + // Popup + var popup; + if (clicked.hasClass('open-popup')) { + if (clickedData.popup) { + popup = clickedData.popup; + } + else popup = '.popup'; + app.popup(popup); + } + if (clicked.hasClass('close-popup')) { + if (clickedData.popup) { + popup = clickedData.popup; + } + else popup = '.popup.modal-in'; + app.closeModal(popup); + } + // Login Screen + var loginScreen; + if (clicked.hasClass('open-login-screen')) { + if (clickedData.loginScreen) { + loginScreen = clickedData.loginScreen; + } + else loginScreen = '.login-screen'; + app.loginScreen(loginScreen); + } + if (clicked.hasClass('close-login-screen')) { + app.closeModal('.login-screen.modal-in'); + } + // Close Modal + if (clicked.hasClass('modal-overlay')) { + if ($('.modal.modal-in').length > 0 && app.params.modalCloseByOutside) + app.closeModal('.modal.modal-in'); + if ($('.actions-modal.modal-in').length > 0 && app.params.actionsCloseByOutside) + app.closeModal('.actions-modal.modal-in'); + + if ($('.popover.modal-in').length > 0 && app.params.popoverCloseByOutside) + app.closeModal('.popover.modal-in'); + } + if (clicked.hasClass('popup-overlay')) { + if ($('.popup.modal-in').length > 0 && app.params.popupCloseByOutside) + app.closeModal('.popup.modal-in'); + } + if (clicked.hasClass('picker-modal-overlay')) { + if ($('.picker-modal.modal-in').length > 0) + app.closeModal('.picker-modal.modal-in'); + } + + // Picker + if (clicked.hasClass('close-picker')) { + var pickerToClose = $('.picker-modal.modal-in'); + if (pickerToClose.length > 0) { + app.closeModal(pickerToClose); + } + else { + pickerToClose = $('.popover.modal-in .picker-modal'); + if (pickerToClose.length > 0) { + app.closeModal(pickerToClose.parents('.popover')); + } + } + } + if (clicked.hasClass('open-picker')) { + var pickerToOpen; + if (clickedData.picker) { + pickerToOpen = clickedData.picker; + } + else pickerToOpen = '.picker-modal'; + app.pickerModal(pickerToOpen, clicked); + } + + // Tabs + var isTabLink; + if (clicked.hasClass('tab-link')) { + isTabLink = true; + app.showTab(clickedData.tab || clicked.attr('href'), clicked); + } + // Swipeout Close + if (clicked.hasClass('swipeout-close')) { + app.swipeoutClose(clicked.parents('.swipeout-opened')); + } + // Swipeout Delete + if (clicked.hasClass('swipeout-delete')) { + if (clickedData.confirm) { + var text = clickedData.confirm; + var title = clickedData.confirmTitle; + if (title) { + app.confirm(text, title, function () { + app.swipeoutDelete(clicked.parents('.swipeout')); + }, function () { + if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout')); + }); + } + else { + app.confirm(text, function () { + app.swipeoutDelete(clicked.parents('.swipeout')); + }, function () { + if (clickedData.closeOnCancel) app.swipeoutClose(clicked.parents('.swipeout')); + }); + } + } + else { + app.swipeoutDelete(clicked.parents('.swipeout')); + } + + } + // Sortable + if (clicked.hasClass('toggle-sortable')) { + app.sortableToggle(clickedData.sortable); + } + if (clicked.hasClass('open-sortable')) { + app.sortableOpen(clickedData.sortable); + } + if (clicked.hasClass('close-sortable')) { + app.sortableClose(clickedData.sortable); + } + // Accordion + if (clicked.hasClass('accordion-item-toggle') || (clicked.hasClass('item-link') && clicked.parent().hasClass('accordion-item'))) { + var accordionItem = clicked.parent('.accordion-item'); + if (accordionItem.length === 0) accordionItem = clicked.parents('.accordion-item'); + if (accordionItem.length === 0) accordionItem = clicked.parents('li'); + app.accordionToggle(accordionItem); + } + + // Speed Dial + if (clicked.hasClass('floating-button') && clicked.parent().hasClass('speed-dial')) { + clicked.parent().toggleClass('speed-dial-opened'); + } + if (clicked.hasClass('close-speed-dial')) { + $('.speed-dial-opened').removeClass('speed-dial-opened'); + } + + // Load Page + if (app.params.ajaxLinks && !clicked.is(app.params.ajaxLinks) || !isLink || !app.params.router) { + return; + } + if (isLink) { + e.preventDefault(); + } + + var validUrl = url && url.length > 0 && url !== '#' && !isTabLink; + var template = clickedData.template; + if (validUrl || clicked.hasClass('back') || template) { + var view; + if (clickedData.view) { + view = $(clickedData.view)[0].f7View; + } + else { + view = clicked.parents('.' + app.params.viewClass)[0] && clicked.parents('.' + app.params.viewClass)[0].f7View; + if (view && view.params.linksView) { + if (typeof view.params.linksView === 'string') view = $(view.params.linksView)[0].f7View; + else if (view.params.linksView instanceof View) view = view.params.linksView; + } + } + if (!view) { + if (app.mainView) view = app.mainView; + } + if (!view) return; + + var pageName; + if (!template) { + if (url && url.indexOf('#') === 0 && url !== '#') { + if (view.params.domCache) { + pageName = url.split('#')[1]; + } + else return; + } + if (url === '#' && !clicked.hasClass('back')) return; + } + else { + url = undefined; + } + + var animatePages; + if (typeof clickedData.animatePages !== 'undefined') { + animatePages = clickedData.animatePages; + } + else { + if (clicked.hasClass('with-animation')) animatePages = true; + if (clicked.hasClass('no-animation')) animatePages = false; + } + + var options = { + animatePages: animatePages, + ignoreCache: clickedData.ignoreCache, + force: clickedData.force, + reload: clickedData.reload, + reloadPrevious: clickedData.reloadPrevious, + pageName: pageName, + pushState: clickedData.pushState, + url: url + }; + + if (app.params.template7Pages) { + options.contextName = clickedData.contextName; + var context = clickedData.context; + if (context) { + options.context = JSON.parse(context); + } + } + if (template && template in t7.templates) { + options.template = t7.templates[template]; + } + + if (clicked.hasClass('back')) view.router.back(options); + else view.router.load(options); + } + } + $(document).on('click', 'a, .open-panel, .close-panel, .panel-overlay, .modal-overlay, .popup-overlay, .swipeout-delete, .swipeout-close, .close-popup, .open-popup, .open-popover, .open-login-screen, .close-login-screen .smart-select, .toggle-sortable, .open-sortable, .close-sortable, .accordion-item-toggle, .close-picker, .picker-modal-overlay', handleClicks); + if (app.params.scrollTopOnNavbarClick || app.params.scrollTopOnStatusbarClick) { + $(document).on('click', '.statusbar-overlay, .navbar .center', handleScrollTop); + } + + // Prevent scrolling on overlays + function preventScrolling(e) { + e.preventDefault(); + } + if (app.support.touch && !app.device.android) { + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + $(document).on((app.params.fastClicks ? 'touchstart' : 'touchmove'), '.panel-overlay, .modal-overlay, .preloader-indicator-overlay, .popup-overlay, .searchbar-overlay', preventScrolling, activeListener); + } +}; diff --git a/bower_components/framework7/src/js/framework7/data-table.js b/bower_components/framework7/src/js/framework7/data-table.js new file mode 100644 index 00000000..d5776a08 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/data-table.js @@ -0,0 +1,80 @@ +/*=============================================================================== +************ Data Table ************ +===============================================================================*/ +app.initDataTable = function (table) { + table = $(table); + var tableHeader = table.find('.data-table-header'); + var tableHeaderSelected = table.find('.data-table-header-selected'); + + // Handle selected + function checkSelectedHeader() { + if (tableHeader.length > 0 && tableHeaderSelected.length > 0) { + var checkedItems = table.find('tbody .checkbox-cell input:checked').length; + table[checkedItems > 0 ? 'addClass' : 'removeClass']('data-table-has-checked'); + tableHeaderSelected.find('.data-table-selected-count').text(checkedItems); + } + } + table.on('change', '.checkbox-cell input[type="checkbox"]', function (e) { + if (e.detail && e.detail._sentByF7DataTable) { + // Scripted event, don't do anything + return; + } + var input = $(this); + var checked = input[0].checked; + if (input.parents('thead').length > 0) { + table + .find('tbody tr')[checked ? 'addClass': 'removeClass']('data-table-row-selected') + .find('input').prop('checked', checked).trigger('change', {_sentByF7DataTable: true}); + } + else { + input.parents('tr')[checked ? 'addClass': 'removeClass']('data-table-row-selected'); + if (!checked) { + table.find('thead .checkbox-cell input[type="checkbox"]').prop('checked', false); + } + else { + // Check for all checked + if (table.find('tbody .checkbox-cell input[type="checkbox"]:checked').length === table.find('tbody tr').length) { + table.find('thead .checkbox-cell input[type="checkbox"]').prop('checked', true).trigger('change', {_sentByF7DataTable: true}); + } + } + } + checkSelectedHeader(); + }); + checkSelectedHeader(); + + // Sortable + table.find('thead .sortable-cell').on('click', function () { + var cell = $(this); + var isActive = cell.hasClass('sortable-active'); + var currentSort; + if (isActive) { + currentSort = cell.hasClass('sortable-desc') ? 'desc' : 'asc'; + cell.removeClass('sortable-desc sortable-asc').addClass('sortable-' + (currentSort === 'desc' ? 'asc' : 'desc')); + } + else { + table.find('thead .sortable-active').removeClass('sortable-active'); + cell.addClass('sortable-active'); + } + }); + + // Collapsible + if (table.hasClass('data-table-collapsible')) { + table.find('tbody td:not(.checkbox-cell)').each(function () { + var index = $(this).index(); + var collpsibleTitle = $(this).attr('data-collapsible-title'); + if (!collpsibleTitle && collpsibleTitle !== '') { + $(this).attr('data-collapsible-title', table.find('thead th').eq(index).text()); + } + }); + } +}; +app.initPageDataTables = function (pageContainer) { + pageContainer = $(pageContainer); + var dataTables = pageContainer.find('.data-table-init'); + if (dataTables.length === 0 && pageContainer.hasClass('data-table-init')) { + dataTables = pageContainer; + } + dataTables.each(function () { + app.initDataTable(this); + }); +}; diff --git a/bower_components/framework7/src/js/framework7/f7-intro.js b/bower_components/framework7/src/js/framework7/f7-intro.js new file mode 100644 index 00000000..abc84a1b --- /dev/null +++ b/bower_components/framework7/src/js/framework7/f7-intro.js @@ -0,0 +1,184 @@ +'use strict'; +/*=========================== +Framework 7 +===========================*/ +window.Framework7 = function (params) { + // App + var app = this; + + // Version + app.version = '1.6.0'; + + // Default Parameters + app.params = { + // + root: 'body', + // + cache: true, + cacheIgnore: [], + cacheIgnoreGetParameters: false, + cacheDuration: 1000 * 60 * 10, // Ten minutes + preloadPreviousPage: true, + uniqueHistory: false, + uniqueHistoryIgnoreGetParameters: false, + dynamicPageUrl: 'content-{{index}}', + allowDuplicateUrls: false, + router: true, + routerRemoveTimeout: false, + routerRemoveWithTimeout: false, + // Push State + pushState: false, + pushStateRoot: undefined, + pushStateNoAnimation: false, + pushStateSeparator: '#!/', + pushStateOnLoad: true, + // Fast clicks + fastClicks: true, + fastClicksDistanceThreshold: 10, + fastClicksDelayBetweenClicks: 50, + fastClicksExclude: '', // CSS selector + // Tap Hold + tapHold: false, + tapHoldDelay: 750, + tapHoldPreventClicks: true, + // Active State + activeState: true, + activeStateElements: 'a, button, label, span', + // Animate Nav Back Icon + animateNavBackIcon: false, + // Swipe Back + swipeBackPage: true, + swipeBackPageThreshold: 0, + swipeBackPageActiveArea: 30, + swipeBackPageAnimateShadow: true, + swipeBackPageAnimateOpacity: true, + // Ajax + ajaxLinks: undefined, // or CSS selector + // External Links + externalLinks: '.external', // CSS selector + // Sortable + sortable: true, + // Scroll toolbars + hideNavbarOnPageScroll: false, + hideToolbarOnPageScroll: false, + hideTabbarOnPageScroll: false, + showBarsOnPageScrollEnd: true, + showBarsOnPageScrollTop: true, + // Swipeout + swipeout: true, + swipeoutActionsNoFold: false, + swipeoutNoFollow: false, + swipeoutRemoveWithTimeout: false, + // Smart Select Back link template + smartSelectOpenIn: 'page', // or 'popup' or 'picker' + smartSelectBackText: 'Back', + smartSelectPopupCloseText: 'Close', + smartSelectPickerCloseText: 'Done', + smartSelectSearchbar: false, + smartSelectBackOnSelect: false, + // Tap Navbar or Statusbar to scroll to top + scrollTopOnNavbarClick: false, + scrollTopOnStatusbarClick: false, + // Panels + panelLeftBreakpoint: null, + panelRightBreakpoint: null, + swipePanel: false, // or 'left' or 'right' + swipePanelActiveArea: 0, + swipePanelCloseOpposite: true, + swipePanelOnlyClose: false, + swipePanelNoFollow: false, + swipePanelThreshold: 0, + panelsCloseByOutside: true, + // Modals + modalButtonOk: 'OK', + modalButtonCancel: 'Cancel', + modalUsernamePlaceholder: 'Username', + modalPasswordPlaceholder: 'Password', + modalTitle: 'Framework7', + modalCloseByOutside: false, + actionsCloseByOutside: true, + popupCloseByOutside: true, + popoverCloseByOutside: true, + modalPreloaderTitle: 'Loading... ', + modalStack: true, + modalsMoveToRoot: true, + // Lazy Load + imagesLazyLoadThreshold: 0, + imagesLazyLoadSequential: true, + // Name space + viewClass: 'view', + viewMainClass: 'view-main', + viewsClass: 'views', + // Notifications defaults + notificationCloseOnClick: false, + notificationCloseIcon: true, + notificationCloseButtonText: 'Close', + // Animate Pages + animatePages: true, + // Template7 + templates: {}, + template7Data: {}, + template7Pages: false, + precompileTemplates: false, + // Material + material: false, + materialPageLoadDelay: 0, + materialPreloaderSvg: '', + materialPreloaderHtml: + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '', + materialRipple: true, + materialRippleElements: '.ripple, a.link, a.item-link, .button, .modal-button, .tab-link, .label-radio, .label-checkbox, .actions-modal-button, a.searchbar-clear, a.floating-button, .floating-button > a, .speed-dial-buttons a, .form-checkbox, .form-radio, .data-table .sortable-cell', + // Auto init + init: true, + }; + + // Extend defaults with parameters + for (var param in params) { + app.params[param] = params[param]; + } + + // DOM lib + var $ = Dom7; + + // Template7 lib + var t7 = Template7; + app._compiledTemplates = {}; + + // App Root + app.root = $(app.params.root); + app.root.eq(0).addClass('framework7-root'); + + // Touch events + app.touchEvents = { + start: app.support.touch ? 'touchstart' : 'mousedown', + move: app.support.touch ? 'touchmove' : 'mousemove', + end: app.support.touch ? 'touchend' : 'mouseup' + }; + + // Link to local storage + app.ls = window.localStorage; + + // RTL + app.rtl = $('body').css('direction') === 'rtl'; + if (app.rtl) $('html').attr('dir', 'rtl'); + + // Overwrite statusbar overlay + if (typeof app.params.statusbarOverlay !== 'undefined') { + if (app.params.statusbarOverlay) $('html').addClass('with-statusbar-overlay'); + else $('html').removeClass('with-statusbar-overlay'); + } + else if (app.device.ios && (window.cordova || window.phonegap)) { + $(document).on('resume', function () { + if (app.device.needsStatusBar()) { + $('html').addClass('with-statusbar-overlay'); + } + }, false); + } diff --git a/bower_components/framework7/src/js/framework7/f7-outro.js b/bower_components/framework7/src/js/framework7/f7-outro.js new file mode 100644 index 00000000..b03c1ccd --- /dev/null +++ b/bower_components/framework7/src/js/framework7/f7-outro.js @@ -0,0 +1,6 @@ + //Return instance + return app; +}; + +// Save Dom7 +Framework7.$ = window.Dom7; diff --git a/bower_components/framework7/src/js/framework7/fast-clicks.js b/bower_components/framework7/src/js/framework7/fast-clicks.js new file mode 100644 index 00000000..b74580e2 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/fast-clicks.js @@ -0,0 +1,538 @@ +/*=============================================================================== +************ Fast Clicks ************ +************ Inspired by https://github.com/ftlabs/fastclick ************ +===============================================================================*/ +app.initFastClicks = function () { + if (app.params.activeState) { + $('html').addClass('watch-active-state'); + } + if (app.device.ios && app.device.webView) { + // Strange hack required for iOS 8 webview to work on inputs + window.addEventListener('touchstart', function () {}); + } + + var touchStartX, touchStartY, touchStartTime, targetElement, trackClick, activeSelection, scrollParent, lastClickTime, isMoved, tapHoldFired, tapHoldTimeout; + var activableElement, activeTimeout, needsFastClick, needsFastClickTimeOut; + var rippleWave, rippleTarget, rippleTransform, rippleTimeout; + function findActivableElement(el) { + var target = $(el); + var parents = target.parents(app.params.activeStateElements); + var activable; + if (target.is(app.params.activeStateElements)) { + activable = target; + } + if (parents.length > 0) { + activable = activable ? activable.add(parents) : parents; + } + return activable ? activable : target; + } + function isInsideScrollableView(el) { + var pageContent = el.parents('.page-content, .panel'); + + if (pageContent.length === 0) { + return false; + } + + // This event handler covers the "tap to stop scrolling". + if (pageContent.prop('scrollHandlerSet') !== 'yes') { + pageContent.on('scroll', function() { + clearTimeout(activeTimeout); + clearTimeout(rippleTimeout); + }); + pageContent.prop('scrollHandlerSet', 'yes'); + } + + return true; + } + function addActive() { + if (!activableElement) return; + activableElement.addClass('active-state'); + } + function removeActive(el) { + if (!activableElement) return; + activableElement.removeClass('active-state'); + activableElement = null; + } + function isFormElement(el) { + var nodes = ('input select textarea label').split(' '); + if (el.nodeName && nodes.indexOf(el.nodeName.toLowerCase()) >= 0) return true; + return false; + } + function androidNeedsBlur(el) { + var noBlur = ('button input textarea select').split(' '); + if (document.activeElement && el !== document.activeElement && document.activeElement !== document.body) { + if (noBlur.indexOf(el.nodeName.toLowerCase()) >= 0) { + return false; + } + else { + return true; + } + } + else { + return false; + } + } + function targetNeedsFastClick(el) { + var $el = $(el); + if (el.nodeName.toLowerCase() === 'input' && (el.type === 'file' || el.type === 'range')) return false; + if (el.nodeName.toLowerCase() === 'select' && app.device.android) return false; + if ($el.hasClass('no-fastclick') || $el.parents('.no-fastclick').length > 0) return false; + if (app.params.fastClicksExclude && $el.is(app.params.fastClicksExclude)) return false; + return true; + } + function targetNeedsFocus(el) { + if (document.activeElement === el) { + return false; + } + var tag = el.nodeName.toLowerCase(); + var skipInputs = ('button checkbox file image radio submit').split(' '); + if (el.disabled || el.readOnly) return false; + if (tag === 'textarea') return true; + if (tag === 'select') { + if (app.device.android) return false; + else return true; + } + if (tag === 'input' && skipInputs.indexOf(el.type) < 0) return true; + } + function targetNeedsPrevent(el) { + el = $(el); + var prevent = true; + if (el.is('label') || el.parents('label').length > 0) { + if (app.device.android) { + prevent = false; + } + else if (app.device.ios && el.is('input')) { + prevent = true; + } + else prevent = false; + } + return prevent; + } + + // Mouse Handlers + function handleMouseDown (e) { + findActivableElement(e.target).addClass('active-state'); + if ('which' in e && e.which === 3) { + setTimeout(function () { + $('.active-state').removeClass('active-state'); + }, 0); + } + if (app.params.material && app.params.materialRipple) { + touchStartX = e.pageX; + touchStartY = e.pageY; + rippleTouchStart(e.target, e.pageX, e.pageY); + } + } + function handleMouseMove (e) { + $('.active-state').removeClass('active-state'); + if (app.params.material && app.params.materialRipple) { + rippleTouchMove(); + } + } + function handleMouseUp (e) { + $('.active-state').removeClass('active-state'); + if (app.params.material && app.params.materialRipple) { + rippleTouchEnd(); + } + } + + // Material Touch Ripple Effect + function findRippleElement(el) { + var needsRipple = app.params.materialRippleElements; + var $el = $(el); + if ($el.is(needsRipple)) { + if ($el.hasClass('no-ripple')) { + return false; + } + return $el; + } + else if ($el.parents(needsRipple).length > 0) { + var rippleParent = $el.parents(needsRipple).eq(0); + if (rippleParent.hasClass('no-ripple')) { + return false; + } + return rippleParent; + } + else return false; + } + function createRipple(x, y, el) { + if (!el) return; + var box = el[0].getBoundingClientRect(); + var center = { + x: x - box.left, + y: y - box.top + }, + height = box.height, + width = box.width; + var diameter = Math.max(Math.pow((Math.pow(height, 2) + Math.pow(width, 2)), 0.5), 48); + + rippleWave = $( + '
                                                    ' + ); + el.prepend(rippleWave); + var clientLeft = rippleWave[0].clientLeft; + rippleTransform = 'translate3d('+(-center.x + width/2)+'px, '+(-center.y + height/2)+'px, 0) scale(1)'; + rippleWave.transform(rippleTransform); + } + + function removeRipple() { + if (!rippleWave) return; + var toRemove = rippleWave; + + var removeTimeout = setTimeout(function () { + toRemove.remove(); + }, 400); + + rippleWave + .addClass('ripple-wave-fill') + .transform(rippleTransform.replace('scale(1)', 'scale(1.01)')) + .transitionEnd(function () { + clearTimeout(removeTimeout); + + var rippleWave = $(this) + .addClass('ripple-wave-out') + .transform(rippleTransform.replace('scale(1)', 'scale(1.01)')); + + removeTimeout = setTimeout(function () { + rippleWave.remove(); + }, 700); + + setTimeout(function () { + rippleWave.transitionEnd(function(){ + clearTimeout(removeTimeout); + $(this).remove(); + }); + }, 0); + }); + + rippleWave = rippleTarget = undefined; + } + + function rippleTouchStart (el, x, y) { + rippleTarget = findRippleElement(el); + if (!rippleTarget || rippleTarget.length === 0) { + rippleTarget = undefined; + return; + } + if (!isInsideScrollableView(rippleTarget)) { + createRipple(touchStartX, touchStartY, rippleTarget); + } + else { + rippleTimeout = setTimeout(function () { + createRipple(touchStartX, touchStartY, rippleTarget); + }, 80); + } + } + function rippleTouchMove() { + clearTimeout(rippleTimeout); + removeRipple(); + } + function rippleTouchEnd() { + if (rippleWave) { + removeRipple(); + } + else if (rippleTarget && !isMoved) { + clearTimeout(rippleTimeout); + createRipple(touchStartX, touchStartY, rippleTarget); + setTimeout(removeRipple, 0); + } + else { + removeRipple(); + } + } + + // Send Click + function sendClick(e) { + var touch = e.changedTouches[0]; + var evt = document.createEvent('MouseEvents'); + var eventType = 'click'; + if (app.device.android && targetElement.nodeName.toLowerCase() === 'select') { + eventType = 'mousedown'; + } + evt.initMouseEvent(eventType, true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); + evt.forwardedTouchEvent = true; + targetElement.dispatchEvent(evt); + } + + // Touch Handlers + function handleTouchStart(e) { + isMoved = false; + tapHoldFired = false; + if (e.targetTouches.length > 1) { + if (activableElement) removeActive(); + return true; + } + if (e.touches.length > 1 && activableElement) { + removeActive(); + } + if (app.params.tapHold) { + if (tapHoldTimeout) clearTimeout(tapHoldTimeout); + tapHoldTimeout = setTimeout(function () { + if (e && e.touches && e.touches.length > 1) return; + tapHoldFired = true; + e.preventDefault(); + $(e.target).trigger('taphold'); + }, app.params.tapHoldDelay); + } + if (needsFastClickTimeOut) clearTimeout(needsFastClickTimeOut); + needsFastClick = targetNeedsFastClick(e.target); + + if (!needsFastClick) { + trackClick = false; + return true; + } + if (app.device.ios || (app.device.android && 'getSelection' in window)) { + var selection = window.getSelection(); + if (selection.rangeCount && selection.focusNode !== document.body && (!selection.isCollapsed || document.activeElement === selection.focusNode)) { + activeSelection = true; + return true; + } + else { + activeSelection = false; + } + } + if (app.device.android) { + if (androidNeedsBlur(e.target)) { + document.activeElement.blur(); + } + } + + trackClick = true; + targetElement = e.target; + touchStartTime = (new Date()).getTime(); + touchStartX = e.targetTouches[0].pageX; + touchStartY = e.targetTouches[0].pageY; + + // Detect scroll parent + if (app.device.ios) { + scrollParent = undefined; + $(targetElement).parents().each(function () { + var parent = this; + if (parent.scrollHeight > parent.offsetHeight && !scrollParent) { + scrollParent = parent; + scrollParent.f7ScrollTop = scrollParent.scrollTop; + } + }); + } + if ((e.timeStamp - lastClickTime) < app.params.fastClicksDelayBetweenClicks) { + e.preventDefault(); + } + + if (app.params.activeState) { + activableElement = findActivableElement(targetElement); + // If it's inside a scrollable view, we don't trigger active-state yet, + // because it can be a scroll instead. Based on the link: + // http://labnote.beedesk.com/click-scroll-and-pseudo-active-on-mobile-webk + if (!isInsideScrollableView(activableElement)) { + addActive(); + } else { + activeTimeout = setTimeout(addActive, 80); + } + } + if (app.params.material && app.params.materialRipple) { + rippleTouchStart(targetElement, touchStartX, touchStartY); + } + } + function handleTouchMove(e) { + if (!trackClick) return; + var _isMoved = false; + var distance = app.params.fastClicksDistanceThreshold; + if (distance) { + var pageX = e.targetTouches[0].pageX; + var pageY = e.targetTouches[0].pageY; + if (Math.abs(pageX - touchStartX) > distance || Math.abs(pageY - touchStartY) > distance) { + _isMoved = true; + } + } + else { + _isMoved = true; + } + if (_isMoved) { + trackClick = false; + targetElement = null; + isMoved = true; + if (app.params.tapHold) { + clearTimeout(tapHoldTimeout); + } + if (app.params.activeState) { + clearTimeout(activeTimeout); + removeActive(); + } + if (app.params.material && app.params.materialRipple) { + rippleTouchMove(); + } + } + } + function handleTouchEnd(e) { + clearTimeout(activeTimeout); + clearTimeout(tapHoldTimeout); + + if (!trackClick) { + if (!activeSelection && needsFastClick) { + if (!(app.device.android && !e.cancelable)) { + e.preventDefault(); + } + } + return true; + } + + if (document.activeElement === e.target) { + if (app.params.activeState) removeActive(); + if (app.params.material && app.params.materialRipple) { + rippleTouchEnd(); + } + return true; + } + + if (!activeSelection) { + e.preventDefault(); + } + + if ((e.timeStamp - lastClickTime) < app.params.fastClicksDelayBetweenClicks) { + setTimeout(removeActive, 0); + return true; + } + + lastClickTime = e.timeStamp; + + trackClick = false; + + if (app.device.ios && scrollParent) { + if (scrollParent.scrollTop !== scrollParent.f7ScrollTop) { + return false; + } + } + + // Add active-state here because, in a very fast tap, the timeout didn't + // have the chance to execute. Removing active-state in a timeout gives + // the chance to the animation execute. + if (app.params.activeState) { + addActive(); + setTimeout(removeActive, 0); + } + // Remove Ripple + if (app.params.material && app.params.materialRipple) { + rippleTouchEnd(); + } + + // Trigger focus when required + if (targetNeedsFocus(targetElement)) { + if (app.device.ios && app.device.webView) { + if ((event.timeStamp - touchStartTime) > 159) { + targetElement = null; + return false; + } + targetElement.focus(); + return false; + } + else { + targetElement.focus(); + } + } + + // Blur active elements + if (document.activeElement && targetElement !== document.activeElement && document.activeElement !== document.body && targetElement.nodeName.toLowerCase() !== 'label') { + document.activeElement.blur(); + } + + // Send click + e.preventDefault(); + sendClick(e); + return false; + } + function handleTouchCancel(e) { + trackClick = false; + targetElement = null; + + // Remove Active State + clearTimeout(activeTimeout); + clearTimeout(tapHoldTimeout); + if (app.params.activeState) { + removeActive(); + } + + // Remove Ripple + if (app.params.material && app.params.materialRipple) { + rippleTouchEnd(); + } + } + + function handleClick(e) { + var allowClick = false; + + if (trackClick) { + targetElement = null; + trackClick = false; + return true; + } + if (e.target.type === 'submit' && e.detail === 0 || e.target.type === 'file') { + return true; + } + if (!targetElement) { + if (!isFormElement(e.target)) { + allowClick = true; + } + } + if (!needsFastClick) { + allowClick = true; + } + if (document.activeElement === targetElement) { + allowClick = true; + } + if (e.forwardedTouchEvent) { + allowClick = true; + } + if (!e.cancelable) { + allowClick = true; + } + if (app.params.tapHold && app.params.tapHoldPreventClicks && tapHoldFired) { + allowClick = false; + } + if (!allowClick) { + e.stopImmediatePropagation(); + e.stopPropagation(); + if (targetElement) { + if (targetNeedsPrevent(targetElement) || isMoved) { + e.preventDefault(); + } + } + else { + e.preventDefault(); + } + targetElement = null; + } + needsFastClickTimeOut = setTimeout(function () { + needsFastClick = false; + }, (app.device.ios || app.device.androidChrome ? 100 : 400)); + + if (app.params.tapHold) { + tapHoldTimeout = setTimeout(function () { + tapHoldFired = false; + }, (app.device.ios || app.device.androidChrome ? 100 : 400)); + } + + return allowClick; + } + if (app.support.touch) { + document.addEventListener('click', handleClick, true); + + document.addEventListener('touchstart', handleTouchStart); + document.addEventListener('touchmove', handleTouchMove); + document.addEventListener('touchend', handleTouchEnd); + document.addEventListener('touchcancel', handleTouchCancel); + } + else { + if (app.params.activeState) { + document.addEventListener('mousedown', handleMouseDown); + document.addEventListener('mousemove', handleMouseMove); + document.addEventListener('mouseup', handleMouseUp); + } + } + if (app.params.material && app.params.materialRipple) { + document.addEventListener('contextmenu', function (e) { + if (activableElement) removeActive(); + rippleTouchEnd(); + }); + } + +}; diff --git a/bower_components/framework7/src/js/framework7/forms-ajax.js b/bower_components/framework7/src/js/framework7/forms-ajax.js new file mode 100644 index 00000000..40bb03e3 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/forms-ajax.js @@ -0,0 +1,36 @@ +/*=============================================================================== +************ Ajax submit for forms ************ +===============================================================================*/ +// Ajax submit on forms +$(document).on('submit change', 'form.ajax-submit, form.ajax-submit-onchange', function (e) { + var form = $(this); + if (e.type === 'change' && !form.hasClass('ajax-submit-onchange')) return; + if (e.type === 'submit') e.preventDefault(); + + var method = (form.attr('method') || 'GET').toUpperCase(); + var contentType = form.prop('enctype') || form.attr('enctype'); + + var url = form.attr('action'); + if (!url) return; + + var data; + if (method === 'POST') data = new FormData(form[0]); + else data = $.serializeObject(app.formToJSON(form[0])); + + var xhr = $.ajax({ + method: method, + url: url, + contentType: contentType, + data: data, + beforeSend: function (xhr) { + form.trigger('beforeSubmit form:beforesend', {data:data, xhr: xhr}); + }, + error: function (xhr) { + form.trigger('submitError form:error', {data:data, xhr: xhr}); + }, + success: function (data) { + form.trigger('submitted form:success', {data: data, xhr: xhr}); + } + }); +}); + diff --git a/bower_components/framework7/src/js/framework7/forms-storage.js b/bower_components/framework7/src/js/framework7/forms-storage.js new file mode 100644 index 00000000..69376a8c --- /dev/null +++ b/bower_components/framework7/src/js/framework7/forms-storage.js @@ -0,0 +1,166 @@ +/*=============================================================================== +************ Store and parse forms data ************ +===============================================================================*/ +app.formsData = {}; +app.formStoreData = function (formId, formJSON) { + // Store form data in app.formsData + app.formsData[formId] = formJSON; + + // Store form data in local storage also + app.ls['f7form-' + formId] = JSON.stringify(formJSON); +}; +app.formDeleteData = function (formId) { + // Delete form data from app.formsData + if (app.formsData[formId]) { + app.formsData[formId] = ''; + delete app.formsData[formId]; + } + + // Delete form data from local storage also + if (app.ls['f7form-' + formId]) { + app.ls['f7form-' + formId] = ''; + app.ls.removeItem('f7form-' + formId); + } +}; +app.formGetData = function (formId) { + // First of all check in local storage + if (app.ls['f7form-' + formId]) { + return JSON.parse(app.ls['f7form-' + formId]); + } + // Try to get it from formsData obj + else if (app.formsData[formId]) return app.formsData[formId]; +}; +app.formToData = function (form) { + form = $(form); + if (form.length !== 1) return false; + + // Form data + var formData = {}; + + // Skip input types + var skipTypes = ['submit', 'image', 'button', 'file']; + var skipNames = []; + form.find('input, select, textarea').each(function () { + var input = $(this); + var name = input.attr('name'); + var type = input.attr('type'); + var tag = this.nodeName.toLowerCase(); + if (skipTypes.indexOf(type) >= 0) return; + if (skipNames.indexOf(name) >= 0 || !name) return; + if (tag === 'select' && input.prop('multiple')) { + skipNames.push(name); + formData[name] = []; + form.find('select[name="' + name + '"] option').each(function () { + if (this.selected) formData[name].push(this.value); + }); + } + else { + switch (type) { + case 'checkbox' : + skipNames.push(name); + formData[name] = []; + form.find('input[name="' + name + '"]').each(function () { + if (this.checked) formData[name].push(this.value); + }); + break; + case 'radio' : + skipNames.push(name); + form.find('input[name="' + name + '"]').each(function () { + if (this.checked) formData[name] = this.value; + }); + break; + default : + formData[name] = input.val(); + break; + } + } + }); + form.trigger('formToJSON formToData form:todata', {formData: formData}); + + return formData; +}; +app.formToJSON = app.formToData; +app.formFromData = function (form, formData) { + form = $(form); + if (form.length !== 1) return false; + + // Skip input types + var skipTypes = ['submit', 'image', 'button', 'file']; + var skipNames = []; + + form.find('input, select, textarea').each(function () { + var input = $(this); + var name = input.attr('name'); + var type = input.attr('type'); + var tag = this.nodeName.toLowerCase(); + if (typeof formData[name] === 'undefined' || formData[name] === null) return; + if (skipTypes.indexOf(type) >= 0) return; + if (skipNames.indexOf(name) >= 0 || !name) return; + if (tag === 'select' && input.prop('multiple')) { + skipNames.push(name); + form.find('select[name="' + name + '"] option').each(function () { + if (formData[name].indexOf(this.value) >= 0) this.selected = true; + else this.selected = false; + }); + } + else { + switch (type) { + case 'checkbox' : + skipNames.push(name); + form.find('input[name="' + name + '"]').each(function () { + if (formData[name].indexOf(this.value) >= 0) this.checked = true; + else this.checked = false; + }); + break; + case 'radio' : + skipNames.push(name); + form.find('input[name="' + name + '"]').each(function () { + if (formData[name] === this.value) this.checked = true; + else this.checked = false; + }); + break; + default : + input.val(formData[name]); + break; + } + } + if (tag === 'select' || tag === 'input' || tag === 'textarea') { + input.trigger('change'); + } + }); + form.trigger('formFromJSON formFromData form:fromdata', {formData: formData}); +}; +app.formFromJSON = app.formFromData; + +app.initFormsStorage = function (pageContainer) { + pageContainer = $(pageContainer); + var forms = pageContainer.find('form.store-data'); + if (forms.length === 0) return; + + // Parse forms data and fill form if there is such data + forms.each(function () { + var id = this.getAttribute('id'); + if (!id) return; + var formData = app.formGetData(id); + if (formData) app.formFromData(this, formData); + }); + // Update forms data on inputs change + function storeForm() { + /*jshint validthis:true */ + var form = $(this); + var formId = form[0].id; + if (!formId) return; + var formJSON = app.formToData(form); + if (!formJSON) return; + app.formStoreData(formId, formJSON); + form.trigger('store form:storedata', {data: formJSON}); + } + forms.on('change submit', storeForm); + + // Detach Listeners + function pageBeforeRemove() { + forms.off('change submit', storeForm); + pageContainer.off('page:beforeremove', pageBeforeRemove); + } + pageContainer.on('page:beforeremove', pageBeforeRemove); +}; \ No newline at end of file diff --git a/bower_components/framework7/src/js/framework7/forms-textarea.js b/bower_components/framework7/src/js/framework7/forms-textarea.js new file mode 100644 index 00000000..f6bef4c8 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/forms-textarea.js @@ -0,0 +1,54 @@ +/*=============================================================================== +************ Resizable textarea ************ +===============================================================================*/ +app.resizeTextarea = function (textarea) { + textarea = $(textarea); + if (!textarea.hasClass('resizable')) { + return; + } + textarea.css({'height': ''}); + var height = textarea[0].offsetHeight; + var diff = height - textarea[0].clientHeight; + var scrollHeight = textarea[0].scrollHeight; + + if (scrollHeight + diff > height) { + var newAreaHeight = scrollHeight + diff; + textarea.css('height', newAreaHeight + 'px'); + } +}; +app.resizableTextarea = function (textarea) { + textarea = $(textarea); + if (textarea.length === 0) return; + var textareaTimeout; + function handleTextarea() { + clearTimeout(textareaTimeout); + textareaTimeout = setTimeout(function () { + app.resizeTextarea(textarea); + }, 0); + } + textarea[0].f7DestroyResizableTextarea = function () { + textarea.off('change keydown keypress keyup paste cut', handleTextarea); + }; + return textarea.on('change keydown keypress keyup paste cut', handleTextarea); +}; +app.destroyResizableTextarea = function (pageContainer) { + pageContainer = $(pageContainer); + if (pageContainer.length > 0 && pageContainer.is('textarea') && pageContainer[0].f7DestroyResizableTextarea) { + pageContainer[0].f7DestroyResizableTextarea(); + } + else if (pageContainer.length > 0) { + pageContainer.find('textarea.resiable').each(function () { + var textarea = this; + if (textarea.f7DestroyResizableTextarea) { + textarea.f7DestroyResizableTextarea (); + } + }); + } +}; +app.initPageResizableTextarea = function (pageContainer) { + pageContainer = $(pageContainer); + var textareas = pageContainer.find('textarea.resizable'); + textareas.each(function () { + app.resizableTextarea(this); + }); +}; \ No newline at end of file diff --git a/bower_components/framework7/src/js/framework7/infinite-scroll.js b/bower_components/framework7/src/js/framework7/infinite-scroll.js new file mode 100644 index 00000000..64e651e4 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/infinite-scroll.js @@ -0,0 +1,54 @@ +/* =============================================================================== +************ Infinite Scroll ************ +=============================================================================== */ +function handleInfiniteScroll() { + /*jshint validthis:true */ + var inf = $(this); + var scrollTop = inf[0].scrollTop; + var scrollHeight = inf[0].scrollHeight; + var height = inf[0].offsetHeight; + var distance = inf[0].getAttribute('data-distance'); + var virtualListContainer = inf.find('.virtual-list'); + var virtualList; + var onTop = inf.hasClass('infinite-scroll-top'); + if (!distance) distance = 50; + if (typeof distance === 'string' && distance.indexOf('%') >= 0) { + distance = parseInt(distance, 10) / 100 * height; + } + if (distance > height) distance = height; + if (onTop) { + if (scrollTop < distance) { + inf.trigger('infinite'); + } + } + else { + if (scrollTop + height >= scrollHeight - distance) { + if (virtualListContainer.length > 0) { + virtualList = virtualListContainer.eq(-1)[0].f7VirtualList; + if (virtualList && !virtualList.reachEnd && !virtualList.params.updatableScroll) { + return; + } + } + inf.trigger('infinite'); + } + } + +} +app.attachInfiniteScroll = function (infiniteContent) { + $(infiniteContent).on('scroll', handleInfiniteScroll); +}; +app.detachInfiniteScroll = function (infiniteContent) { + $(infiniteContent).off('scroll', handleInfiniteScroll); +}; + +app.initPageInfiniteScroll = function (pageContainer) { + pageContainer = $(pageContainer); + var infiniteContent = pageContainer.find('.infinite-scroll'); + if (infiniteContent.length === 0) return; + app.attachInfiniteScroll(infiniteContent); + function detachEvents() { + app.detachInfiniteScroll(infiniteContent); + pageContainer.off('page:beforeremove', detachEvents); + } + pageContainer.on('page:beforeremove', detachEvents); +}; \ No newline at end of file diff --git a/bower_components/framework7/src/js/framework7/init.js b/bower_components/framework7/src/js/framework7/init.js new file mode 100644 index 00000000..41f5dd2e --- /dev/null +++ b/bower_components/framework7/src/js/framework7/init.js @@ -0,0 +1,64 @@ +/*====================================================== +************ App Init ************ +======================================================*/ +app.init = function () { + // Compile Template7 templates on app load + if (app.initTemplate7Templates) app.initTemplate7Templates(); + + // Init Plugins + if (app.initPlugins) app.initPlugins(); + + // Init Device + if (app.getDeviceInfo) app.getDeviceInfo(); + + // Init resize events and calc app sizes + if (app.initResize) app.initResize(); + + // Init Panels Breakpoints + if (app.initPanelsBreakpoints && (app.params.panelLeftBreakpoint || app.params.panelRightBreakpoint)) app.initPanelsBreakpoints(); + + // Init Click events + if (app.initFastClicks && app.params.fastClicks) app.initFastClicks(); + if (app.initClickEvents) app.initClickEvents(); + + // Init each page callbacks + $('.page:not(.cached)').each(function () { + app.initPageWithCallback(this); + }); + + // Init each navbar callbacks + $('.navbar:not(.cached)').each(function () { + app.initNavbarWithCallback(this); + }); + + // Init push state + if (app.initPushState && app.params.pushState) app.initPushState(); + + // Init Live Swipeouts events + if (app.initSwipeout && app.params.swipeout) app.initSwipeout(); + + // Init Live Sortable events + if (app.initSortable && app.params.sortable) app.initSortable(); + + // Init Live Swipe Panels + if (app.initSwipePanels && (app.params.swipePanel || app.params.swipePanelOnlyClose)) app.initSwipePanels(); + + // Init Material Inputs + if (app.params.material && app.initMaterialWatchInputs) app.initMaterialWatchInputs(); + + // Init Material Tabbar + if (app.params.material) { + $('.tabbar').each(function (index, el) { + if ($(el).parents('.page').length === 0) { + app.initMaterialTabbar(el); + } + }); + } + + // App Init callback + if (app.params.onAppInit) app.params.onAppInit(); + + // Plugin app init hook + app.pluginHook('appInit'); +}; +if (app.params.init) app.init(); diff --git a/bower_components/framework7/src/js/framework7/lazy-load.js b/bower_components/framework7/src/js/framework7/lazy-load.js new file mode 100644 index 00000000..589733fb --- /dev/null +++ b/bower_components/framework7/src/js/framework7/lazy-load.js @@ -0,0 +1,171 @@ +/*====================================================== +************ Image Lazy Loading ************ +************ Based on solution by Marc Godard, https://github.com/MarcGodard ************ +======================================================*/ +app.initImagesLazyLoad = function (pageContainer) { + pageContainer = $(pageContainer); + + // Lazy images + var lazyLoadImages; + if (pageContainer.hasClass('lazy')) { + lazyLoadImages = pageContainer; + pageContainer = lazyLoadImages.parents('.page'); + } + else { + lazyLoadImages = pageContainer.find('.lazy'); + } + if (lazyLoadImages.length === 0) return; + + // Scrollable page content + var pageContent; + if (pageContainer.hasClass('page-content')) { + pageContent = pageContainer; + pageContainer = pageContainer.parents('.page'); + } + else { + pageContent = pageContainer.find('.page-content'); + } + if (pageContent.length === 0) return; + + // Placeholder + var placeholderSrc = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEXCwsK592mkAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg=='; + if (typeof app.params.imagesLazyLoadPlaceholder === 'string') { + placeholderSrc = app.params.imagesLazyLoadPlaceholder; + } + if (app.params.imagesLazyLoadPlaceholder !== false) lazyLoadImages.each(function(){ + if ($(this).attr('data-src') && !$(this).attr('src')) $(this).attr('src', placeholderSrc); + }); + + // load image + var imagesSequence = []; + var imageIsLoading = false; + function loadImage(el) { + el = $(el); + + var bg = el.attr('data-background'); + var src = bg ? bg : el.attr('data-src'); + if (!src) return; + + function onLoad() { + el.removeClass('lazy').addClass('lazy-loaded'); + if (bg) { + el.css('background-image', 'url(' + src + ')'); + } + else { + el.attr('src', src); + } + + if (app.params.imagesLazyLoadSequential) { + imageIsLoading = false; + if (imagesSequence.length > 0) { + loadImage(imagesSequence.shift()); + } + } + el.trigger('lazy-loaded'); + if (app.params.onLazyLoaded) app.params.onLazyLoaded(el); + } + + function onError() { + el.removeClass('lazy').addClass('lazy-loaded'); + if (bg) { + el.css('background-image', 'url(' + placeholderSrc + ')'); + } + else { + el.attr('src', placeholderSrc); + } + + if (app.params.imagesLazyLoadSequential) { + imageIsLoading = false; + if (imagesSequence.length > 0) { + loadImage(imagesSequence.shift()); + } + } + el.trigger('lazy-error'); + if (app.params.onLazyError) app.params.onLazyError(el); + } + + if (app.params.imagesLazyLoadSequential) { + if (imageIsLoading) { + if (imagesSequence.indexOf(el[0]) < 0) imagesSequence.push(el[0]); + return; + } + } + + // Loading flag + imageIsLoading = true; + + var image = new Image(); + image.onload = onLoad; + image.onerror = onError; + image.src =src; + + // Add loaded callback and events + el.trigger('lazy-load'); + if (app.params.onLazyLoad && !el.hasClass('lazy-loaded')) app.params.onLazyLoad(el); + } + function lazyHandler() { + lazyLoadImages = pageContainer.find('.lazy'); + lazyLoadImages.each(function(index, el) { + el = $(el); + if (el.parents('.tab:not(.active)').length > 0) { + return; + } + if (isElementInViewport(el[0])) { + loadImage(el); + } + }); + } + + function isElementInViewport (el) { + var rect = el.getBoundingClientRect(); + var threshold = app.params.imagesLazyLoadThreshold || 0; + return ( + rect.top >= (0 - threshold) && + rect.left >= (0 - threshold) && + rect.top <= (app.height + threshold) && + rect.left <= (app.width + threshold) + ); + } + + function attachEvents(destroy) { + var method = destroy ? 'off' : 'on'; + lazyLoadImages[method]('lazy', lazyHandler); + lazyLoadImages.parents('.tab')[method]('show', lazyHandler); + pageContainer[method]('lazy', lazyHandler); + pageContent[method]('lazy', lazyHandler); + pageContent[method]('scroll', lazyHandler); + app[method === 'on' ? 'onResize' : 'offResize'](lazyHandler); + } + function detachEvents() { + attachEvents(true); + } + + // Store detach function + pageContainer[0].f7DestroyImagesLazyLoad = detachEvents; + + // Attach events + attachEvents(); + + // Destroy on page remove + if (pageContainer.hasClass('page')) { + pageContainer.once('page:beforeremove', detachEvents); + } + + // Run loader on page load/init + lazyHandler(); + + // Run after page animation + pageContainer.once('page:afteranimation', lazyHandler); +}; +app.destroyImagesLazyLoad = function (pageContainer) { + pageContainer = $(pageContainer); + if (pageContainer.length > 0 && pageContainer[0].f7DestroyImagesLazyLoad) { + pageContainer[0].f7DestroyImagesLazyLoad(); + } +}; +app.reinitImagesLazyLoad = function (pageContainer) { + pageContainer = $(pageContainer); + if (pageContainer.length > 0) { + pageContainer.trigger('lazy'); + } +}; diff --git a/bower_components/framework7/src/js/framework7/material-inputs.js b/bower_components/framework7/src/js/framework7/material-inputs.js new file mode 100644 index 00000000..37fcabb1 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/material-inputs.js @@ -0,0 +1,68 @@ +/*====================================================== +************ Material Text Inputs ************ +======================================================*/ +app.initPageMaterialInputs = function (pageContainer) { + pageContainer = $(pageContainer); + var textareas = pageContainer.find('textarea.resizable'); + pageContainer.find('.item-input').each(function () { + var itemInput = $(this); + var notInputs = ['checkbox', 'button', 'submit', 'range', 'radio', 'image']; + itemInput.find('input, select, textarea').each(function () { + var input = $(this); + if (notInputs.indexOf(input.attr('type')) < 0) { + itemInput.addClass('item-input-field'); + if (input.val().trim() !== '') { + input.parents('.item-input, .input-field').add(input.parents('.item-inner')).addClass('not-empty-state'); + } + } + }); + if (itemInput.parents('.input-item, .inputs-list').length > 0) return; + itemInput.parents('.list-block').eq(0).addClass('inputs-list'); + }); +}; +/*====================================================== +************ Material Focus Inputs ************ +======================================================*/ +app.initMaterialWatchInputs = function () { + var notInputs = ['checkbox', 'button', 'submit', 'range', 'radio', 'image']; + function addFocusState(e) { + /*jshint validthis:true*/ + var i = $(this); + var type = i.attr('type'); + if (notInputs.indexOf(type) >= 0) return; + var els = i.add(i.parents('.item-input, .input-field')).add(i.parents('.item-inner').eq(0)); + els.removeClass('not-empty-state').addClass('focus-state'); + } + function removeFocusState(e) { + /*jshint validthis:true*/ + var i = $(this), value = i.val(); + var type = i.attr('type'); + if (notInputs.indexOf(type) >= 0) return; + var els = i.add(i.parents('.item-input, .input-field')).add(i.parents('.item-inner').eq(0)); + els.removeClass('focus-state'); + if (value && value.trim() !== '') { + els.removeClass('focus-state').addClass('not-empty-state'); + } + else { + els.removeClass('not-empty-state'); + } + } + function watchChangeState(e) { + /*jshint validthis:true*/ + var input = $(this), + value = input.val(); + var type = input.attr('type'); + if (notInputs.indexOf(type) >= 0) return; + var els = input.add(input.parents('.item-input, .input-field')).add(input.parents('.item-inner').eq(0)); + if (els.length === 0) return; + if (value && (typeof value === 'string' && value.trim() !== '') || (Array.isArray(value) && value.length > 0)) { + els.addClass('not-empty-state'); + } + else { + els.removeClass('not-empty-state'); + } + } + $(document).on('change', 'input, textarea, select', watchChangeState, true); + $(document).on('focus', 'input, textarea, select', addFocusState, true); + $(document).on('blur', 'input, textarea, select', removeFocusState, true); +}; diff --git a/bower_components/framework7/src/js/framework7/material-preloader.js b/bower_components/framework7/src/js/framework7/material-preloader.js new file mode 100644 index 00000000..7fa9e098 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/material-preloader.js @@ -0,0 +1,10 @@ +/*====================================================== +************ Material Preloader ************ +======================================================*/ +app.initPageMaterialPreloader = function (pageContainer) { + $(pageContainer).find('.preloader').each(function () { + if ($(this).children().length === 0) { + $(this).html(app.params.materialPreloaderHtml); + } + }); +}; \ No newline at end of file diff --git a/bower_components/framework7/src/js/framework7/material-tabbar.js b/bower_components/framework7/src/js/framework7/material-tabbar.js new file mode 100644 index 00000000..404d4be1 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/material-tabbar.js @@ -0,0 +1,48 @@ +/*====================================================== +************ Material Tabbar ************ +======================================================*/ +app.materialTabbarSetHighlight = function (tabbar, activeLink) { + $(tabbar).each(function () { + var tabbar = $(this); + activeLink = activeLink || tabbar.find('.tab-link.active'); + + if (activeLink && activeLink.length > 0) { + var tabLinkWidth, highlightTranslate; + if (tabbar.hasClass('tabbar-scrollable')) { + tabLinkWidth = activeLink[0].offsetWidth + 'px'; + highlightTranslate = activeLink[0].offsetLeft + 'px'; + } + else { + tabLinkWidth = 1 / tabbar.find('.tab-link').length * 100 + '%'; + highlightTranslate = (app.rtl ? - activeLink.index(): activeLink.index()) * 100 + '%'; + } + + tabbar.find('.tab-link-highlight') + .css({width: tabLinkWidth}) + .transform('translate3d(' + highlightTranslate + ',0,0)'); + } + }); +}; +app.initPageMaterialTabbar = function (pageContainer) { + pageContainer = $(pageContainer); + var tabbar = pageContainer.find('.tabbar'); + if (tabbar.length === 0 && pageContainer.hasClass('tabbar')) tabbar = pageContainer; + + function tabbarSetHighlight() { + app.materialTabbarSetHighlight(tabbar); + } + if (tabbar.length > 0) { + if (tabbar.find('.tab-link-highlight').length === 0) { + tabbar.find('.toolbar-inner').append(''); + } + + tabbarSetHighlight(); + app.onResize(tabbarSetHighlight); + pageContainer.once('page:beforeremove', function () { + app.offResize(tabbarSetHighlight); + }); + } +}; +app.initMaterialTabbar = function (tabbar) { + return app.initPageMaterialTabbar(tabbar); +}; diff --git a/bower_components/framework7/src/js/framework7/messagebar.js b/bower_components/framework7/src/js/framework7/messagebar.js new file mode 100644 index 00000000..2e401e29 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/messagebar.js @@ -0,0 +1,140 @@ +/*====================================================== +************ Messagebar ************ +======================================================*/ +var Messagebar = function (container, params) { + var defaults = { + textarea: null, + maxHeight: null, + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined' || params[def] === null) { + params[def] = defaults[def]; + } + } + + // Instance + var m = this; + + // Params + m.params = params; + + // Container + m.container = $(container); + if (m.container.length === 0) return; + + // Textarea + m.textarea = m.params.textarea ? $(m.params.textarea) : m.container.find('textarea'); + + // Is In Page + m.pageContainer = m.container.parents('.page').eq(0); + m.pageContent = m.pageContainer.find('.page-content'); + + // Initial Sizes + m.pageContentPadding = parseInt(m.pageContent.css('padding-bottom')); + m.initialBarHeight = m.container[0].offsetHeight; + m.initialAreaHeight = m.textarea[0].offsetHeight; + + + // Resize textarea + m.sizeTextarea = function () { + // Reset + m.textarea.css({'height': ''}); + + var height = m.textarea[0].offsetHeight; + var diff = height - m.textarea[0].clientHeight; + var scrollHeight = m.textarea[0].scrollHeight; + + // Update + if (scrollHeight + diff > height) { + var newAreaHeight = scrollHeight + diff; + var newBarHeight = m.initialBarHeight + (newAreaHeight - m.initialAreaHeight); + var maxBarHeight = m.params.maxHeight || m.container.parents('.view')[0].offsetHeight - 88; + if (newBarHeight > maxBarHeight) { + newBarHeight = parseInt(maxBarHeight, 10); + newAreaHeight = newBarHeight - m.initialBarHeight + m.initialAreaHeight; + } + m.textarea.css('height', newAreaHeight + 'px'); + m.container.css('height', newBarHeight + 'px'); + var onBottom = (m.pageContent[0].scrollTop === m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight); + if (m.pageContent.length > 0) { + m.pageContent.css('padding-bottom', newBarHeight + 'px'); + if (m.pageContent.find('.messages-new-first').length === 0 && onBottom) { + m.pageContent.scrollTop(m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight); + } + } + } + else { + if (m.pageContent.length > 0) { + m.container.css({'height': '', 'bottom': ''}); + m.pageContent.css({'padding-bottom': ''}); + } + } + }; + + // Clear + m.clear = function () { + m.textarea.val('').trigger('change'); + }; + m.value = function (value) { + if (typeof value === 'undefined') return m.textarea.val(); + else m.textarea.val(value).trigger('change'); + }; + + // Handle textarea + m.textareaTimeout = undefined; + m.handleTextarea = function (e) { + clearTimeout(m.textareaTimeout); + m.textareaTimeout = setTimeout(function () { + m.sizeTextarea(); + }, 0); + }; + + //Events + function preventSubmit(e) { + e.preventDefault(); + } + + m.attachEvents = function (destroy) { + var method = destroy ? 'off' : 'on'; + m.container[method]('submit', preventSubmit); + m.textarea[method]('change keydown keypress keyup paste cut', m.handleTextarea); + }; + m.detachEvents = function () { + m.attachEvents(true); + }; + + // Init Destroy + m.init = function () { + m.attachEvents(); + }; + m.destroy = function () { + m.detachEvents(); + m = null; + }; + + // Init + m.init(); + + m.container[0].f7Messagebar = m; + return m; +}; +app.messagebar = function (container, params) { + return new Messagebar(container, params); +}; +app.initPageMessagebar = function (pageContainer) { + pageContainer = $(pageContainer); + var messagebar = pageContainer.hasClass('messagebar') ? pageContainer : pageContainer.find('.messagebar'); + if (messagebar.length === 0) return; + if (!messagebar.hasClass('messagebar-init')) return; + var mb = app.messagebar(messagebar, messagebar.dataset()); + + // Destroy on page remove + function pageBeforeRemove() { + mb.destroy(); + pageContainer.off('page:beforeremove', pageBeforeRemove); + } + if (pageContainer.hasClass('page')) { + pageContainer.on('page:beforeremove', pageBeforeRemove); + } +}; diff --git a/bower_components/framework7/src/js/framework7/messages.js b/bower_components/framework7/src/js/framework7/messages.js new file mode 100644 index 00000000..b6f702cb --- /dev/null +++ b/bower_components/framework7/src/js/framework7/messages.js @@ -0,0 +1,233 @@ +/*====================================================== +************ Messages ************ +======================================================*/ +var Messages = function (container, params) { + var defaults = { + autoLayout: true, + newMessagesFirst: false, + scrollMessages: true, + scrollMessagesOnlyOnEdge: false, + messageTemplate: + '{{#if day}}' + + '
                                                    {{day}} {{#if time}}, {{time}}{{/if}}
                                                    ' + + '{{/if}}' + + '
                                                    ' + + '{{#if name}}
                                                    {{name}}
                                                    {{/if}}' + + '
                                                    {{text}}{{#if date}}
                                                    {{date}}
                                                    {{/if}}
                                                    ' + + '{{#if avatar}}
                                                    {{/if}}' + + '{{#if label}}
                                                    {{label}}
                                                    {{/if}}' + + '
                                                    ' + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined' || params[def] === null) { + params[def] = defaults[def]; + } + } + + // Instance + var m = this; + + // Params + m.params = params; + + // Container + m.container = $(container); + if (m.container.length === 0) return; + + // Autolayout + if (m.params.autoLayout) m.container.addClass('messages-auto-layout'); + + // New messages first + if (m.params.newMessagesFirst) m.container.addClass('messages-new-first'); + + // Is In Page + m.pageContainer = m.container.parents('.page').eq(0); + m.pageContent = m.pageContainer.find('.page-content'); + + // Compiled template + m.template = Template7.compile(m.params.messageTemplate); + + // Auto Layout + m.layout = function () { + if (!m.container.hasClass('messages-auto-layout')) m.container.addClass('messages-auto-layout'); + m.container.find('.message').each(function () { + var message = $(this); + if (message.find('.message-text img').length > 0) { + var childNodes = message.find('.message-text')[0].childNodes; + var onlyPic = true; + for (var i = 0 ; i < childNodes.length; i++) { + if (childNodes[i].nodeType === 1 && childNodes[i].nodeName.toLowerCase() !== 'img') onlyPic = false; + if (childNodes[i].nodeType === 3 && childNodes[i].textContent.trim() !== '') onlyPic = false; + } + if (onlyPic) message.addClass('message-pic'); + else message.removeClass('message-pic'); + } + if (message.find('.message-avatar').length > 0) message.addClass('message-with-avatar'); + }); + m.container.find('.message').each(function () { + var message = $(this); + var isSent = message.hasClass('message-sent'); + var next = message.next('.message-' + (isSent ? 'sent' : 'received')); + var prev = message.prev('.message-' + (isSent ? 'sent' : 'received')); + if (next.length === 0) { + message.addClass('message-last message-with-tail'); + } + else message.removeClass('message-last message-with-tail'); + + if (prev.length === 0) { + message.addClass('message-first'); + } + else message.removeClass('message-first'); + + if (prev.length > 0 && prev.find('.message-name').length > 0 && message.find('.message-name').length > 0) { + if (prev.find('.message-name').text() !== message.find('.message-name').text()) { + prev.addClass('message-last message-with-tail'); + message.addClass('message-first'); + } + } + }); + }; + + // Add Message + m.appendMessage = function (props, animate) { + return m.addMessage(props, 'append', animate); + }; + m.prependMessage = function (props, animate) { + return m.addMessage(props, 'prepend', animate); + }; + m.addMessage = function (props, method, animate) { + return m.addMessages([props], method, animate); + }; + m.addMessages = function (newMessages, method, animate) { + if (typeof animate === 'undefined') { + animate = true; + } + if (typeof method === 'undefined') { + method = m.params.newMessagesFirst ? 'prepend' : 'append'; + } + var newMessagesHTML = '', i; + for (i = 0; i < newMessages.length; i++) { + var props = newMessages[i] || {}; + props.type = props.type || 'sent'; + if (!props.text) continue; + props.hasImage = props.text.indexOf('= 0; + if (props.onlyImage === false) props.hasImage = false; + if (animate) props.position = method === 'append' ? 'bottom' : 'top'; + + newMessagesHTML += m.template(props); + } + var scrollHeightBefore = m.pageContent[0].scrollHeight, + heightBefore = m.pageContent[0].offsetHeight, + scrollBefore = m.pageContent[0].scrollTop; + m.container[method](newMessagesHTML); + if (m.params.autoLayout) m.layout(); + if (method === 'prepend') { + m.pageContent[0].scrollTop = scrollBefore + (m.pageContent[0].scrollHeight - scrollHeightBefore); + } + if (m.params.scrollMessages && (method === 'append' && !m.params.newMessagesFirst) || (method === 'prepend' && m.params.newMessagesFirst)) { + if (m.params.scrollMessagesOnlyOnEdge) { + var onEdge = false; + if (m.params.newMessagesFirst) { + if (scrollBefore === 0) onEdge = true; + } + else { + if (scrollBefore - (scrollHeightBefore - heightBefore) >= -10) onEdge = true; + } + if (onEdge) m.scrollMessages(animate ? undefined : 0); + } + else m.scrollMessages(animate ? undefined : 0); + } + var messages = m.container.find('.message'); + if (newMessages.length === 1) { + return method === 'append' ? messages[messages.length - 1] : messages[0]; + } + else { + var messagesToReturn = []; + if (method === 'append') { + for (i = messages.length - newMessages.length; i < messages.length; i++) { + messagesToReturn.push(messages[i]); + } + } + else { + for (i = 0; i < newMessages.length; i++) { + messagesToReturn.push(messages[i]); + } + } + return messagesToReturn; + } + + }; + m.removeMessage = function (message) { + message = $(message); + if (message.length === 0) { + return false; + } + else { + message.remove(); + if (m.params.autoLayout) m.layout(); + return true; + } + }; + m.removeMessages = function (messages) { + m.removeMessage(messages); + }; + m.clean = function () { + m.container.html(''); + }; + + // Scroll + m.scrollMessages = function (duration, scrollTop) { + if (typeof duration === 'undefined') duration = 400; + var currentScroll = m.pageContent[0].scrollTop; + var newScroll; + if (typeof scrollTop !== 'undefined') newScroll = scrollTop; + else { + newScroll = m.params.newMessagesFirst ? 0 : m.pageContent[0].scrollHeight - m.pageContent[0].offsetHeight; + if (newScroll === currentScroll) return; + } + m.pageContent.scrollTop(newScroll, duration); + }; + + // Init Destroy + m.init = function () { + if (m.params.messages) { + m.addMessages(m.params.messages, undefined, false); + } + else { + if (m.params.autoLayout) m.layout(); + m.scrollMessages(0); + } + + }; + m.destroy = function () { + m = null; + }; + + // Init + m.init(); + + m.container[0].f7Messages = m; + return m; +}; +app.messages = function (container, params) { + return new Messages (container, params); +}; +app.initPageMessages = function (pageContainer) { + pageContainer = $(pageContainer); + var messages = pageContainer.find('.messages'); + if (messages.length === 0) return; + if (!messages.hasClass('messages-init')) { + return; + } + var m = app.messages(messages, messages.dataset()); + + // Destroy on page remove + function pageBeforeRemove() { + m.destroy(); + pageContainer.off('page:beforeremove', pageBeforeRemove); + } + if (pageContainer.hasClass('page')) { + pageContainer.on('page:beforeremove', pageBeforeRemove); + } +}; diff --git a/bower_components/framework7/src/js/framework7/modals.js b/bower_components/framework7/src/js/framework7/modals.js new file mode 100644 index 00000000..315952c2 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/modals.js @@ -0,0 +1,756 @@ +/*====================================================== +************ Modals ************ +======================================================*/ +var _modalTemplateTempDiv = document.createElement('div'); +app.modalStack = []; +app.modalStackClearQueue = function () { + if (app.modalStack.length) { + (app.modalStack.shift())(); + } +}; +app.modal = function (params) { + params = params || {}; + var modalHTML = ''; + if (app.params.modalTemplate) { + if (!app._compiledTemplates.modal) app._compiledTemplates.modal = t7.compile(app.params.modalTemplate); + modalHTML = app._compiledTemplates.modal(params); + } + else { + var buttonsHTML = ''; + if (params.buttons && params.buttons.length > 0) { + for (var i = 0; i < params.buttons.length; i++) { + buttonsHTML += '' + params.buttons[i].text + ''; + } + } + var titleHTML = params.title ? '' : ''; + var textHTML = params.text ? '' : ''; + var afterTextHTML = params.afterText ? params.afterText : ''; + var noButtons = !params.buttons || params.buttons.length === 0 ? 'modal-no-buttons' : ''; + var verticalButtons = params.verticalButtons ? 'modal-buttons-vertical': ''; + var modalButtonsHTML = params.buttons && params.buttons.length > 0 ? '' : ''; + modalHTML = ''; + } + + _modalTemplateTempDiv.innerHTML = modalHTML; + + var modal = $(_modalTemplateTempDiv).children(); + + app.root.append(modal[0]); + + // Add events on buttons + modal.find('.modal-button').each(function (index, el) { + $(el).on('click', function (e) { + if (params.buttons[index].close !== false) app.closeModal(modal); + if (params.buttons[index].onClick) params.buttons[index].onClick(modal, e); + if (params.onClick) params.onClick(modal, index); + }); + }); + app.openModal(modal); + return modal[0]; +}; +app.alert = function (text, title, callbackOk) { + if (typeof title === 'function') { + callbackOk = arguments[1]; + title = undefined; + } + return app.modal({ + text: text || '', + title: typeof title === 'undefined' ? app.params.modalTitle : title, + buttons: [ {text: app.params.modalButtonOk, bold: true, onClick: callbackOk} ] + }); +}; +app.confirm = function (text, title, callbackOk, callbackCancel) { + if (typeof title === 'function') { + callbackCancel = arguments[2]; + callbackOk = arguments[1]; + title = undefined; + } + return app.modal({ + text: text || '', + title: typeof title === 'undefined' ? app.params.modalTitle : title, + buttons: [ + {text: app.params.modalButtonCancel, onClick: callbackCancel}, + {text: app.params.modalButtonOk, bold: true, onClick: callbackOk} + ] + }); +}; +app.prompt = function (text, title, callbackOk, callbackCancel) { + if (typeof title === 'function') { + callbackCancel = arguments[2]; + callbackOk = arguments[1]; + title = undefined; + } + return app.modal({ + text: text || '', + title: typeof title === 'undefined' ? app.params.modalTitle : title, + afterText: '
                                                    ', + buttons: [ + { + text: app.params.modalButtonCancel + }, + { + text: app.params.modalButtonOk, + bold: true + } + ], + onClick: function (modal, index) { + if (index === 0 && callbackCancel) callbackCancel($(modal).find('.modal-text-input').val()); + if (index === 1 && callbackOk) callbackOk($(modal).find('.modal-text-input').val()); + } + }); +}; +app.modalLogin = function (text, title, callbackOk, callbackCancel) { + if (typeof title === 'function') { + callbackCancel = arguments[2]; + callbackOk = arguments[1]; + title = undefined; + } + return app.modal({ + text: text || '', + title: typeof title === 'undefined' ? app.params.modalTitle : title, + afterText: '', + buttons: [ + { + text: app.params.modalButtonCancel + }, + { + text: app.params.modalButtonOk, + bold: true + } + ], + onClick: function (modal, index) { + var username = $(modal).find('.modal-text-input[name="modal-username"]').val(); + var password = $(modal).find('.modal-text-input[name="modal-password"]').val(); + if (index === 0 && callbackCancel) callbackCancel(username, password); + if (index === 1 && callbackOk) callbackOk(username, password); + } + }); +}; +app.modalPassword = function (text, title, callbackOk, callbackCancel) { + if (typeof title === 'function') { + callbackCancel = arguments[2]; + callbackOk = arguments[1]; + title = undefined; + } + return app.modal({ + text: text || '', + title: typeof title === 'undefined' ? app.params.modalTitle : title, + afterText: '
                                                    ', + buttons: [ + { + text: app.params.modalButtonCancel + }, + { + text: app.params.modalButtonOk, + bold: true + } + ], + onClick: function (modal, index) { + var password = $(modal).find('.modal-text-input[name="modal-password"]').val(); + if (index === 0 && callbackCancel) callbackCancel(password); + if (index === 1 && callbackOk) callbackOk(password); + } + }); +}; +app.showPreloader = function (title) { + return app.modal({ + title: title || app.params.modalPreloaderTitle, + text: '
                                                    ' + (app.params.material ? app.params.materialPreloaderHtml : '') + '
                                                    ', + cssClass: 'modal-preloader' + }); +}; +app.hidePreloader = function () { + app.closeModal('.modal-preloader'); +}; +app.showIndicator = function () { + if ($('.preloader-indicator-overlay').length > 0) return; + app.root.append('
                                                    ' + (app.params.material ? app.params.materialPreloaderHtml : '') + '
                                                    '); +}; +app.hideIndicator = function () { + $('.preloader-indicator-overlay, .preloader-indicator-modal').remove(); +}; +// Action Sheet +app.actions = function (target, params, animated) { + var toPopover = false, modal, groupSelector, buttonSelector; + if (arguments.length === 1 || arguments.length === 2 && typeof arguments[1] === 'boolean') { + // Actions + params = arguments[0]; + animated = arguments[1]; + } + else { + // Popover + if (app.device.ios) { + if (app.device.ipad) toPopover = true; + } + else { + if (app.width >= 768) toPopover = true; + } + } + if (typeof animated === 'undefined') animated = true; + + params = params || []; + + if (params.length > 0 && !Array.isArray(params[0])) { + params = [params]; + } + var modalHTML; + if (toPopover) { + var actionsToPopoverTemplate = app.params.modalActionsToPopoverTemplate || + '
                                                    ' + + '
                                                    ' + + '{{#each this}}' + + '
                                                    ' + + '
                                                      ' + + '{{#each this}}' + + '{{#if label}}' + + '
                                                    • {{text}}
                                                    • ' + + '{{else}}' + + '
                                                    • {{text}}
                                                    • ' + + '{{/if}}' + + '{{/each}}' + + '
                                                    ' + + '
                                                    ' + + '{{/each}}' + + '
                                                    ' + + '
                                                    '; + if (!app._compiledTemplates.actionsToPopover) { + app._compiledTemplates.actionsToPopover = t7.compile(actionsToPopoverTemplate); + } + var popoverHTML = app._compiledTemplates.actionsToPopover(params); + modal = $(app.popover(popoverHTML, target, true, animated)); + groupSelector = '.list-block ul'; + buttonSelector = '.list-button'; + } + else { + if (app.params.modalActionsTemplate) { + if (!app._compiledTemplates.actions) app._compiledTemplates.actions = t7.compile(app.params.modalActionsTemplate); + modalHTML = app._compiledTemplates.actions(params); + } + else { + var buttonsHTML = ''; + for (var i = 0; i < params.length; i++) { + for (var j = 0; j < params[i].length; j++) { + if (j === 0) buttonsHTML += '
                                                    '; + var button = params[i][j]; + var buttonClass = button.label ? 'actions-modal-label' : 'actions-modal-button'; + if (button.bold) buttonClass += ' actions-modal-button-bold'; + if (button.color) buttonClass += ' color-' + button.color; + if (button.bg) buttonClass += ' bg-' + button.bg; + if (button.disabled) buttonClass += ' disabled'; + buttonsHTML += '
                                                    ' + button.text + '
                                                    '; + if (j === params[i].length - 1) buttonsHTML += '
                                                    '; + } + } + modalHTML = '
                                                    ' + buttonsHTML + '
                                                    '; + } + _modalTemplateTempDiv.innerHTML = modalHTML; + modal = $(_modalTemplateTempDiv).children(); + app.root.append(modal[0]); + groupSelector = '.actions-modal-group'; + buttonSelector = '.actions-modal-button'; + } + + var groups = modal.find(groupSelector); + groups.each(function (index, el) { + var groupIndex = index; + $(el).children().each(function (index, el) { + var buttonIndex = index; + var buttonParams = params[groupIndex][buttonIndex]; + var clickTarget; + if (!toPopover && $(el).is(buttonSelector)) clickTarget = $(el); + if (toPopover && $(el).find(buttonSelector).length > 0) clickTarget = $(el).find(buttonSelector); + + if (clickTarget) { + clickTarget.on('click', function (e) { + if (buttonParams.close !== false) app.closeModal(modal); + if (buttonParams.onClick) buttonParams.onClick(modal, e); + }); + } + }); + }); + if (!toPopover) app.openModal(modal, animated); + return modal[0]; +}; +app.popover = function (modal, target, removeOnClose, animated, closeByOutside) { + if (typeof removeOnClose === 'undefined') removeOnClose = true; + if (typeof closeByOutside === 'undefined') closeByOutside = true; + if (typeof animated === 'undefined') animated = true; + if (typeof modal === 'string' && modal.indexOf('<') >= 0) { + var _modal = document.createElement('div'); + _modal.innerHTML = modal.trim(); + if (_modal.childNodes.length > 0) { + modal = _modal.childNodes[0]; + if (removeOnClose) modal.classList.add('remove-on-close'); + if (!closeByOutside) modal.classList.add('ignore-close-by-outside'); + app.root.append(modal); + } + else return false; //nothing found + } + modal = $(modal); + target = $(target); + if (modal.length === 0 || target.length === 0) return false; + if (modal.parents('body').length === 0) { + if (removeOnClose) modal.addClass('remove-on-close'); + if (!closeByOutside) modal.addClass.add('ignore-close-by-outside'); + app.root.append(modal[0]); + } + if (modal.find('.popover-angle').length === 0 && !app.params.material) { + modal.append('
                                                    '); + } + modal.show(); + + var material = app.params.material; + + function sizePopover() { + modal.css({left: '', top: ''}); + var modalWidth = modal.width(); + var modalHeight = modal.height(); // 13 - height of angle + var modalAngle, modalAngleSize = 0, modalAngleLeft, modalAngleTop; + if (!material) { + modalAngle = modal.find('.popover-angle'); + modalAngleSize = modalAngle.width() / 2; + modalAngle.removeClass('on-left on-right on-top on-bottom').css({left: '', top: ''}); + } + else { + modal.removeClass('popover-on-left popover-on-right popover-on-top popover-on-bottom').css({left: '', top: ''}); + } + + var targetWidth = target.outerWidth(); + var targetHeight = target.outerHeight(); + var targetOffset = target.offset(); + var targetOffsetLeft = targetOffset.left - app.left; + var targetOffsetTop = targetOffset.top - app.top; + var targetParentPage = target.parents('.page'); + if (targetParentPage.length > 0) { + targetOffsetTop = targetOffsetTop - targetParentPage[0].scrollTop; + } + + var modalTop = 0; + var modalLeft = 0; + var diff = 0; + // Top Position + var modalPosition = material ? 'bottom' : 'top'; + if (material) { + if (modalHeight < app.height - targetOffsetTop - targetHeight) { + // On bottom + modalPosition = 'bottom'; + modalTop = targetOffsetTop; + } + else if (modalHeight < targetOffsetTop) { + // On top + modalTop = targetOffsetTop - modalHeight + targetHeight; + modalPosition = 'top'; + } + else { + // On middle + modalPosition = 'bottom'; + modalTop = targetOffsetTop; + } + + if (modalTop <= 0) { + modalTop = 8; + } + else if (modalTop + modalHeight >= app.height) { + modalTop = app.height - modalHeight - 8; + } + + // Horizontal Position + modalLeft = targetOffsetLeft; + if (modalLeft + modalWidth >= app.width - 8) { + modalLeft = targetOffsetLeft + targetWidth - modalWidth - 8; + } + if (modalLeft < 8) { + modalLeft = 8; + } + if (modalPosition === 'top') { + modal.addClass('popover-on-top'); + } + if (modalPosition === 'bottom') { + modal.addClass('popover-on-bottom'); + } + if (target.hasClass('floating-button-to-popover') && !modal.hasClass('modal-in')) { + modal.addClass('popover-floating-button'); + var diffX = (modalLeft + modalWidth / 2) - (targetOffsetLeft + targetWidth / 2), + diffY = (modalTop + modalHeight / 2) - (targetOffsetTop + targetHeight / 2); + target + .addClass('floating-button-to-popover-in') + .transform('translate3d(' + diffX + 'px, ' + diffY + 'px,0)') + .transitionEnd(function (e) { + if (!target.hasClass('floating-button-to-popover-in')) return; + target + .addClass('floating-button-to-popover-scale') + .transform('translate3d(' + diffX + 'px, ' + diffY + 'px,0) scale(' + (modalWidth/targetWidth) + ', ' + (modalHeight/targetHeight) + ')'); + }); + + modal.once('popover:close', function () { + target + .removeClass('floating-button-to-popover-in floating-button-to-popover-scale') + .addClass('floating-button-to-popover-out') + .transform('') + .transitionEnd(function (e) { + target.removeClass('floating-button-to-popover-out'); + }); + }); + modal.once('popover:closed', function () { + modal.removeClass('popover-floating-button'); + }); + } + else if (target.hasClass('floating-button-to-popover') && modal.hasClass('modal-in')) { + modalLeft = targetOffsetLeft; + modalTop = targetOffsetTop; + } + + } + else { + if ((modalHeight + modalAngleSize) < targetOffsetTop) { + // On top + modalTop = targetOffsetTop - modalHeight - modalAngleSize; + } + else if ((modalHeight + modalAngleSize) < app.height - targetOffsetTop - targetHeight) { + // On bottom + modalPosition = 'bottom'; + modalTop = targetOffsetTop + targetHeight + modalAngleSize; + } + else { + // On middle + modalPosition = 'middle'; + modalTop = targetHeight / 2 + targetOffsetTop - modalHeight / 2; + diff = modalTop; + if (modalTop <= 0) { + modalTop = 5; + } + else if (modalTop + modalHeight >= app.height) { + modalTop = app.height - modalHeight - 5; + } + diff = diff - modalTop; + } + + // Horizontal Position + if (modalPosition === 'top' || modalPosition === 'bottom') { + modalLeft = targetWidth / 2 + targetOffsetLeft - modalWidth / 2; + diff = modalLeft; + if (modalLeft < 5) modalLeft = 5; + if (modalLeft + modalWidth > app.width) modalLeft = app.width - modalWidth - 5; + if (modalPosition === 'top') { + modalAngle.addClass('on-bottom'); + } + if (modalPosition === 'bottom') { + modalAngle.addClass('on-top'); + } + diff = diff - modalLeft; + modalAngleLeft = (modalWidth / 2 - modalAngleSize + diff); + modalAngleLeft = Math.max(Math.min(modalAngleLeft, modalWidth - modalAngleSize * 2 - 13), 13); + modalAngle.css({left: modalAngleLeft + 'px'}); + + } + else if (modalPosition === 'middle') { + modalLeft = targetOffsetLeft - modalWidth - modalAngleSize; + modalAngle.addClass('on-right'); + if (modalLeft < 5 || (modalLeft + modalWidth > app.width)) { + if (modalLeft < 5) modalLeft = targetOffsetLeft + targetWidth + modalAngleSize; + if (modalLeft + modalWidth > app.width) modalLeft = app.width - modalWidth - 5; + modalAngle.removeClass('on-right').addClass('on-left'); + } + modalAngleTop = (modalHeight / 2 - modalAngleSize + diff); + modalAngleTop = Math.max(Math.min(modalAngleTop, modalHeight - modalAngleSize * 2 - 13), 13); + modalAngle.css({top: modalAngleTop + 'px'}); + } + } + + + // Apply Styles + modal.css({top: modalTop + 'px', left: modalLeft + 'px'}); + } + + sizePopover(); + + app.onResize(sizePopover); + + modal.on('popover:close', function () { + app.offResize(sizePopover); + }); + + app.openModal(modal, animated); + return modal[0]; +}; +app.popup = function (modal, removeOnClose, animated) { + if (typeof removeOnClose === 'undefined') removeOnClose = true; + if (typeof animated === 'undefined') animated = true; + if (typeof modal === 'string' && modal.indexOf('<') >= 0) { + var _modal = document.createElement('div'); + _modal.innerHTML = modal.trim(); + if (_modal.childNodes.length > 0) { + modal = _modal.childNodes[0]; + if (removeOnClose) modal.classList.add('remove-on-close'); + app.root.append(modal); + } + else return false; //nothing found + } + modal = $(modal); + if (modal.length === 0) return false; + if (modal.parents('body').length === 0) { + if (removeOnClose) modal.addClass('remove-on-close'); + app.root.append(modal[0]); + } + modal.show(); + + app.openModal(modal, animated); + return modal[0]; +}; +app.pickerModal = function (modal, removeOnClose, animated) { + if (typeof removeOnClose === 'undefined') removeOnClose = true; + if (typeof animated === 'undefined') animated = true; + if (typeof modal === 'string' && modal.indexOf('<') >= 0) { + modal = $(modal); + if (modal.length > 0) { + if (removeOnClose) modal.addClass('remove-on-close'); + app.root.append(modal[0]); + } + else return false; //nothing found + } + modal = $(modal); + if (modal.length === 0) return false; + if (modal.parents('body').length === 0) { + if (removeOnClose) modal.addClass('remove-on-close'); + app.root.append(modal[0]); + } + if ($('.picker-modal.modal-in:not(.modal-out)').length > 0 && !modal.hasClass('modal-in')) { + app.closeModal('.picker-modal.modal-in:not(.modal-out)'); + } + modal.show(); + app.openModal(modal, animated); + return modal[0]; +}; +app.loginScreen = function (modal, animated) { + if (!modal) modal = '.login-screen'; + if (typeof animated === 'undefined') animated = true; + modal = $(modal); + if (modal.length === 0) return false; + if ($('.login-screen.modal-in:not(.modal-out)').length > 0 && !modal.hasClass('modal-in')) { + app.closeModal('.login-screen.modal-in:not(.modal-out)'); + } + modal.show(); + + app.openModal(modal, animated); + return modal[0]; +}; +app.openModal = function (modal, animated) { + if (typeof animated === 'undefined') animated = true; + modal = $(modal); + modal[animated ? 'removeClass' : 'addClass']('not-animated'); + + var isModal = modal.hasClass('modal'); + var isPopover = modal.hasClass('popover'); + var isPopup = modal.hasClass('popup'); + var isLoginScreen = modal.hasClass('login-screen'); + var isPickerModal = modal.hasClass('picker-modal'); + var isActions = modal.hasClass('actions-modal'); + + // Modal Event Prefix + var modalType = 'modal'; + if (isPopover) modalType = 'popover'; + if (isPopup) modalType = 'popup'; + if (isLoginScreen) modalType = 'loginscreen'; + if (isPickerModal) modalType = 'picker'; + if (isActions) modalType = 'actions'; + + if ($('.modal.modal-in:not(.modal-out)').length && app.params.modalStack && isModal) { + app.modalStack.push(function () { + app.openModal(modal); + }); + return; + } + + // do nothing if this modal already shown + if (true === modal.data('f7-modal-shown')) { + return; + } + modal.data('f7-modal-shown', true); + + // Move modal + var modalParent = modal.parent(); + if (app.params.modalsMoveToRoot && !modalParent.is(app.root)) { + app.root.append(modal); + modal.once(modalType + ':closed', function() { + modalParent.append(modal); + }); + } + + modal.once(modalType + ':close', function() { + modal.removeData('f7-modal-shown'); + }); + + if (isModal) { + modal.show(); + modal.css({ + marginTop: - Math.round(modal.outerHeight() / 2) + 'px' + }); + } + + var overlay; + if (!isLoginScreen && !isPickerModal) { + if ($('.modal-overlay').length === 0 && !isPopup) { + app.root.append(''); + } + if ($('.popup-overlay').length === 0 && isPopup) { + app.root.append(''); + } + overlay = isPopup ? $('.popup-overlay') : $('.modal-overlay'); + } + if (app.params.material && isPickerModal) { + if (modal.hasClass('picker-calendar')) { + if ($('.picker-modal-overlay').length === 0 && !isPopup) { + app.root.append('
                                                    '); + } + overlay = $('.picker-modal-overlay'); + } + } + if (overlay) { + overlay[animated ? 'removeClass' : 'addClass']('not-animated'); + } + + //Make sure that styles are applied, trigger relayout; + var clientLeft = modal[0].clientLeft; + + // Trugger open event + modal.trigger('open ' + modalType + ':open'); + + // Picker modal body class + if (isPickerModal) { + $('body').addClass('with-picker-modal'); + } + + // Init Pages and Navbars in modal + if (modal.find('.' + app.params.viewClass).length > 0) { + modal.find('.page').each(function () { + app.initPageWithCallback(this); + }); + modal.find('.navbar').each(function () { + app.initNavbarWithCallback(this); + }); + } + + // Classes for transition in + if (!isLoginScreen && !isPickerModal) overlay.addClass('modal-overlay-visible'); + if (app.params.material && isPickerModal && overlay) overlay.addClass('modal-overlay-visible'); + if (animated) { + modal.removeClass('modal-out').addClass('modal-in').transitionEnd(function (e) { + if (modal.hasClass('modal-out')) modal.trigger('closed ' + modalType + ':closed'); + else modal.trigger('opened ' + modalType + ':opened'); + }); + } + else { + modal.removeClass('modal-out').addClass('modal-in'); + modal.trigger('opened ' + modalType + ':opened'); + } + return true; +}; +app.closeModal = function (modal, animated) { + if (typeof animated === 'undefined') animated = true; + modal = $(modal || '.modal-in'); + if (typeof modal !== 'undefined' && modal.length === 0) { + return; + } + modal[animated ? 'removeClass' : 'addClass']('not-animated'); + var isModal = modal.hasClass('modal'); + var isPopover = modal.hasClass('popover'); + var isPopup = modal.hasClass('popup'); + var isLoginScreen = modal.hasClass('login-screen'); + var isPickerModal = modal.hasClass('picker-modal'); + var isActions = modal.hasClass('actions-modal'); + + // Modal Event Prefix + var modalType = 'modal'; + if (isPopover) modalType = 'popover'; + if (isPopup) modalType = 'popup'; + if (isLoginScreen) modalType = 'loginscreen'; + if (isPickerModal) modalType = 'picker'; + if (isActions) modalType = 'actions'; + + var removeOnClose = modal.hasClass('remove-on-close'); + + // ignore close popover + if (isPopover && !removeOnClose && modal.hasClass('ignore-close-by-outside')) { + return; + } + + // For Actions + var keepOnClose = modal.hasClass('keep-on-close'); + + var overlay; + + if (isPopup) overlay = $('.popup-overlay'); + else { + if (isPickerModal && app.params.material) overlay = $('.picker-modal-overlay'); + else if (!isPickerModal) overlay = $('.modal-overlay'); + } + + if (isPopup){ + if (modal.length === $('.popup.modal-in').length) { + overlay.removeClass('modal-overlay-visible'); + } + } + else if (overlay && overlay.length > 0) { + overlay.removeClass('modal-overlay-visible'); + } + if (overlay) overlay[animated ? 'removeClass' : 'addClass']('not-animated'); + + modal.trigger('close ' + modalType + ':close'); + + // Picker modal body class + if (isPickerModal) { + $('body').removeClass('with-picker-modal'); + $('body').addClass('picker-modal-closing'); + } + + if (!(isPopover && !app.params.material)) { + if (animated) { + modal.removeClass('modal-in').addClass('modal-out').transitionEnd(function (e) { + if (modal.hasClass('modal-out')) modal.trigger('closed ' + modalType + ':closed'); + else { + modal.trigger('opened ' + modalType + ':opened'); + if (isPopover) return; + } + + if (isPickerModal) { + $('body').removeClass('picker-modal-closing'); + } + if (isPopup || isLoginScreen || isPickerModal || isPopover) { + modal.removeClass('modal-out').hide(); + if (removeOnClose && modal.length > 0) { + modal.remove(); + } + } + else if (!keepOnClose) { + modal.remove(); + } + }); + } + else { + modal.trigger('closed ' + modalType + ':closed'); + modal.removeClass('modal-in modal-out'); + if (isPickerModal) { + $('body').removeClass('picker-modal-closing'); + } + if (isPopup || isLoginScreen || isPickerModal || isPopover) { + modal.hide(); + if (removeOnClose && modal.length > 0) { + modal.remove(); + } + } + else if (!keepOnClose) { + modal.remove(); + } + } + if (isModal && app.params.modalStack) { + app.modalStackClearQueue(); + } + } + else { + modal.removeClass('modal-in modal-out not-animated').trigger('closed ' + modalType + ':closed').hide(); + if (removeOnClose) { + modal.remove(); + } + } + return true; +}; diff --git a/bower_components/framework7/src/js/framework7/navbars.js b/bower_components/framework7/src/js/framework7/navbars.js new file mode 100644 index 00000000..c7e06b9e --- /dev/null +++ b/bower_components/framework7/src/js/framework7/navbars.js @@ -0,0 +1,237 @@ +/*====================================================== +************ Navbars && Toolbars ************ +======================================================*/ +// On Navbar Init Callback +app.navbarInitCallback = function (view, pageContainer, navbarContainer, navbarInnerContainer) { + if (!navbarContainer && navbarInnerContainer) navbarContainer = $(navbarInnerContainer).parent('.navbar')[0]; + if (!navbarInnerContainer || navbarInnerContainer.f7NavbarInitialized && view && !view.params.domCache) return; + var navbarData = { + container: navbarContainer, + innerContainer: navbarInnerContainer + }; + var pageData = pageContainer && pageContainer.f7PageData; + + var eventData = { + page: pageData, + navbar: navbarData + }; + + if (navbarInnerContainer.f7NavbarInitialized && ((view && view.params.domCache) || (!view && $(navbarContainer).parents('.popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal').length > 0))) { + // Reinit Navbar + app.reinitNavbar(navbarContainer, navbarInnerContainer); + + // Plugin hook + app.pluginHook('navbarReinit', eventData); + + // Event + $(navbarInnerContainer).trigger('navbarReinit navbar:reinit', eventData); + return; + } + navbarInnerContainer.f7NavbarInitialized = true; + // Before Init + app.pluginHook('navbarBeforeInit', navbarData, pageData); + $(navbarInnerContainer).trigger('navbarBeforeInit navbar:beforeinit', eventData); + + // Initialize Navbar + app.initNavbar(navbarContainer, navbarInnerContainer); + + // On init + app.pluginHook('navbarInit', navbarData, pageData); + $(navbarInnerContainer).trigger('navbarInit navbar:init', eventData); +}; +// Navbar Remove Callback +app.navbarRemoveCallback = function (view, pageContainer, navbarContainer, navbarInnerContainer) { + if (!navbarContainer && navbarInnerContainer) navbarContainer = $(navbarInnerContainer).parent('.navbar')[0]; + var navbarData = { + container: navbarContainer, + innerContainer: navbarInnerContainer + }; + var pageData; + if (pageContainer) { + pageData = pageContainer.f7PageData; + } + + var eventData = { + page: pageData, + navbar: navbarData + }; + app.pluginHook('navbarBeforeRemove', navbarData, pageData); + $(navbarInnerContainer).trigger('navbarBeforeRemove navbar:beforeremove', eventData); + navbarData = null; + pageData = null; +}; +app.initNavbar = function (navbarContainer, navbarInnerContainer) { + // Init Subnavbar Searchbar + if (app.initSearchbar) app.initSearchbar(navbarInnerContainer); +}; +app.reinitNavbar = function (navbarContainer, navbarInnerContainer) { + // Re init navbar methods +}; +app.initNavbarWithCallback = function (navbarContainer) { + navbarContainer = $(navbarContainer); + var viewContainer = navbarContainer.parents('.' + app.params.viewClass); + var view; + if (viewContainer.length === 0) return; + if (navbarContainer.parents('.navbar-through').length === 0 && viewContainer.find('.navbar-through').length === 0) return; + view = viewContainer[0].f7View || undefined; + + navbarContainer.find('.navbar-inner').each(function () { + var navbarInnerContainer = this; + var pageContainer; + if ($(navbarInnerContainer).attr('data-page')) { + // For dom cache + pageContainer = viewContainer.find('.page[data-page="' + $(navbarInnerContainer).attr('data-page') + '"]')[0]; + } + if (!pageContainer) { + var pages = viewContainer.find('.page'); + if (pages.length === 1) { + pageContainer = pages[0]; + } + else { + viewContainer.find('.page').each(function () { + if (this.f7PageData && this.f7PageData.navbarInnerContainer === navbarInnerContainer) { + pageContainer = this; + } + }); + } + } + app.navbarInitCallback(view, pageContainer, navbarContainer[0], navbarInnerContainer); + }); +}; + +// Size Navbars +app.sizeNavbars = function (viewContainer) { + if (app.params.material) return; + var navbarInner = viewContainer ? $(viewContainer).find('.navbar .navbar-inner:not(.cached)') : $('.navbar .navbar-inner:not(.cached)'); + navbarInner.each(function () { + var n = $(this); + if (n.hasClass('cached')) return; + var left = app.rtl ? n.find('.right') : n.find('.left'), + right = app.rtl ? n.find('.left') : n.find('.right'), + center = n.find('.center'), + subnavbar = n.find('.subnavbar'), + noLeft = left.length === 0, + noRight = right.length === 0, + leftWidth = noLeft ? 0 : left.outerWidth(true), + rightWidth = noRight ? 0 : right.outerWidth(true), + centerWidth = center.outerWidth(true), + navbarStyles = n.styles(), + navbarWidth = n[0].offsetWidth - parseInt(navbarStyles.paddingLeft, 10) - parseInt(navbarStyles.paddingRight, 10), + onLeft = n.hasClass('navbar-on-left'), + currLeft, diff; + + if (noRight) { + currLeft = navbarWidth - centerWidth; + } + if (noLeft) { + currLeft = 0; + } + if (!noLeft && !noRight) { + currLeft = (navbarWidth - rightWidth - centerWidth + leftWidth) / 2; + } + var requiredLeft = (navbarWidth - centerWidth) / 2; + if (navbarWidth - leftWidth - rightWidth > centerWidth) { + if (requiredLeft < leftWidth) { + requiredLeft = leftWidth; + } + if (requiredLeft + centerWidth > navbarWidth - rightWidth) { + requiredLeft = navbarWidth - rightWidth - centerWidth; + } + diff = requiredLeft - currLeft; + } + else { + diff = 0; + } + // RTL inverter + var inverter = app.rtl ? -1 : 1; + + if (center.hasClass('sliding')) { + center[0].f7NavbarLeftOffset = -(currLeft + diff) * inverter; + center[0].f7NavbarRightOffset = (navbarWidth - currLeft - diff - centerWidth) * inverter; + if (onLeft) { + if (app.params.animateNavBackIcon) { + var activeNavbarBackLink = n.parent().find('.navbar-on-center').find('.left.sliding .back .icon ~ span'); + if (activeNavbarBackLink.length > 0) { + center[0].f7NavbarLeftOffset += activeNavbarBackLink[0].offsetLeft; + } + } + center.transform('translate3d(' + center[0].f7NavbarLeftOffset + 'px, 0, 0)'); + } + } + if (!noLeft && left.hasClass('sliding')) { + if (app.rtl) { + left[0].f7NavbarLeftOffset = -(navbarWidth - left[0].offsetWidth) / 2 * inverter; + left[0].f7NavbarRightOffset = leftWidth * inverter; + } + else { + left[0].f7NavbarLeftOffset = -leftWidth; + left[0].f7NavbarRightOffset = (navbarWidth - left[0].offsetWidth) / 2; + if (app.params.animateNavBackIcon && left.find('.back .icon').length > 0) { + left[0].f7NavbarRightOffset -= left.find('.back .icon')[0].offsetWidth; + } + } + if (onLeft) left.transform('translate3d(' + left[0].f7NavbarLeftOffset + 'px, 0, 0)'); + } + if (!noRight && right.hasClass('sliding')) { + if (app.rtl) { + right[0].f7NavbarLeftOffset = -rightWidth * inverter; + right[0].f7NavbarRightOffset = (navbarWidth - right[0].offsetWidth) / 2 * inverter; + } + else { + right[0].f7NavbarLeftOffset = -(navbarWidth - right[0].offsetWidth) / 2; + right[0].f7NavbarRightOffset = rightWidth; + } + if (onLeft) right.transform('translate3d(' + right[0].f7NavbarLeftOffset + 'px, 0, 0)'); + } + if (subnavbar.length && subnavbar.hasClass('sliding')) { + subnavbar[0].f7NavbarLeftOffset = app.rtl ? subnavbar[0].offsetWidth : -subnavbar[0].offsetWidth; + subnavbar[0].f7NavbarRightOffset = -subnavbar[0].f7NavbarLeftOffset; + } + + // Center left + var centerLeft = diff; + if (app.rtl && noLeft && noRight && center.length > 0) centerLeft = -centerLeft; + center.css({left: centerLeft + 'px'}); + + }); +}; + +// Hide/Show Navbars/Toolbars +app.hideNavbar = function (navbarContainer, animated) { + if (typeof animated === 'undefined') animated = true; + $(navbarContainer).addClass('navbar-hidden' + (!animated ? (' not-animated') : '')); + return true; +}; +app.showNavbar = function (navbarContainer, animated) { + if (typeof animated === 'undefined') animated = true; + var navbar = $(navbarContainer); + if (animated) { + navbar.removeClass('not-animated'); + navbar.addClass('navbar-hiding').removeClass('navbar-hidden').transitionEnd(function () { + navbar.removeClass('navbar-hiding'); + }); + } + else { + navbar.removeClass('navbar-hidden navbar-hiding not-animated'); + } + return true; +}; +app.hideToolbar = function (toolbarContainer, animated) { + if (typeof animated === 'undefined') animated = true; + $(toolbarContainer).addClass('toolbar-hidden' + (!animated ? (' not-animated') : '')); + return true; +}; +app.showToolbar = function (toolbarContainer, animated) { + if (typeof animated === 'undefined') animated = true; + var toolbar = $(toolbarContainer); + if (animated) { + toolbar.removeClass('not-animated'); + toolbar.addClass('toolbar-hiding').removeClass('toolbar-hidden').transitionEnd(function () { + toolbar.removeClass('toolbar-hiding' + (!animated ? (' not-animated') : '')); + }); + } + else { + toolbar.removeClass('toolbar-hidden toolbar-hiding not-animated'); + } + +}; diff --git a/bower_components/framework7/src/js/framework7/notifications.js b/bower_components/framework7/src/js/framework7/notifications.js new file mode 100644 index 00000000..c6998715 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/notifications.js @@ -0,0 +1,163 @@ +/*====================================================== +************ Notifications ************ +======================================================*/ +var _tempNotificationElement; +app.addNotification = function (params) { + if (!params) return; + + if (typeof params.media === 'undefined') params.media = app.params.notificationMedia; + if (typeof params.title === 'undefined') params.title = app.params.notificationTitle; + if (typeof params.subtitle === 'undefined') params.subtitle = app.params.notificationSubtitle; + if (typeof params.closeIcon === 'undefined') params.closeIcon = app.params.notificationCloseIcon; + if (typeof params.hold === 'undefined') params.hold = app.params.notificationHold; + if (typeof params.closeOnClick === 'undefined') params.closeOnClick = app.params.notificationCloseOnClick; + if (typeof params.button === 'undefined') params.button = app.params.notificationCloseButtonText && { + text: app.params.notificationCloseButtonText, + close: true + }; + + if (!_tempNotificationElement) _tempNotificationElement = document.createElement('div'); + + params.material = app.params.material; + + var container = $('.notifications'); + if (container.length === 0) { + app.root.append('
                                                      '); + container = $('.notifications'); + } + var list = container.children('ul'); + + var notificationTemplate = app.params.notificationTemplate || + '{{#if custom}}' + + '
                                                    • {{custom}}
                                                    • ' + + '{{else}}' + + '
                                                    • ' + + '
                                                      ' + + '{{#if material}}' + + '
                                                      ' + + '
                                                      {{js "this.message || this.title || this.subtitle"}}
                                                      ' + + '{{#if ../button}}{{#button}}' + + '
                                                      ' + + '{{text}}' + + '
                                                      ' + + '{{/button}}{{/if}}' + + '
                                                      ' + + '{{else}}' + + '{{#if media}}' + + '
                                                      {{media}}
                                                      ' + + '{{/if}}' + + '
                                                      ' + + '
                                                      ' + + '{{#if title}}' + + '
                                                      {{title}}
                                                      ' + + '{{/if}}' + + '{{#if closeIcon}}' + + '
                                                      ' + + '{{/if}}' + + '
                                                      ' + + '{{#if subtitle}}' + + '
                                                      {{subtitle}}
                                                      ' + + '{{/if}}' + + '{{#if message}}' + + '
                                                      {{message}}
                                                      ' + + '
                                                      ' + + '{{/if}}' + + '{{/if}}' + + '
                                                      ' + + '
                                                    • ' + + '{{/if}}'; + if (!app._compiledTemplates.notification) { + app._compiledTemplates.notification = t7.compile(notificationTemplate); + } + _tempNotificationElement.innerHTML = app._compiledTemplates.notification(params); + + var item = $(_tempNotificationElement).children(); + + item.on('click', function (e) { + var close = false; + var target = $(e.target); + if (params.material && target.hasClass('button')) { + if (params.button && params.button.onClick) params.button.onClick.call(target[0], e, item[0]); + } + if (target.is('.close-notification') || $(e.target).parents('.close-notification').length > 0) { + close = true; + } + else { + if (params.onClick) params.onClick(e, item[0]); + if (params.closeOnClick) close = true; + } + if (close) app.closeNotification(item[0], e); + }); + if (params.onClose) { + item.data('f7NotificationOnClose', function (e) { + params.onClose(item[0], e); + }); + } + if (params.additionalClass) { + item.addClass(params.additionalClass); + } + if (params.hold) { + setTimeout(function () { + if (item.length > 0) app.closeNotification(item[0]); + }, params.hold); + } + + if (!app.params.material) { + app.closeNotification(list.children('li.notification-item:last-child')); + } + list.append(item[0]); + container.show(); + + var itemHeight = item.outerHeight(), clientLeft; + if (params.material) { + container.transform('translate3d(0, '+itemHeight+'px, 0)'); + container.transition(0); + + clientLeft = item[0].clientLeft; + + container.transform('translate3d(0, 0, 0)'); + container.transition(''); + } + else { + item.transform('translate3d(0,' + (-itemHeight) + 'px,0)'); + item.transition(0); + + clientLeft = item[0].clientLeft; + + item.transition(''); + item.transform('translate3d(0,0px,0)'); + } + + container.transform('translate3d(0, 0,0)'); + item.removeClass('notification-hidden'); + + return item[0]; +}; +app.closeNotification = function (item, event) { + item = $(item); + if (item.length === 0) return; + if (item.hasClass('notification-item-removing')) return; + var container = $('.notifications'); + + var itemHeight = item.outerHeight(); + item.css('height', itemHeight + 'px').transition(0).addClass('notification-item-removing'); + var clientLeft = item[0].clientLeft; + + item.css({ + height: '0px', + marginBottom: '0px' + }).transition(''); + + if (item.data('f7NotificationOnClose')) item.data('f7NotificationOnClose')(event); + + if (container.find('.notification-item:not(.notification-item-removing)').length === 0) { + container.transform(''); + } + + item.addClass('notification-hidden').transitionEnd(function () { + item.remove(); + if (container.find('.notification-item').length === 0) { + container.hide(); + } + }); +}; \ No newline at end of file diff --git a/bower_components/framework7/src/js/framework7/pages.js b/bower_components/framework7/src/js/framework7/pages.js new file mode 100644 index 00000000..64ae778c --- /dev/null +++ b/bower_components/framework7/src/js/framework7/pages.js @@ -0,0 +1,350 @@ +/*====================================================== +************ Pages ************ +======================================================*/ +// Page Callbacks API +app.pageCallbacks = {}; + +app.onPage = function (callbackName, pageName, callback) { + if (pageName && pageName.split(' ').length > 1) { + var pageNames = pageName.split(' '); + var returnCallbacks = []; + for (var i = 0; i < pageNames.length; i++) { + returnCallbacks.push(app.onPage(callbackName, pageNames[i], callback)); + } + returnCallbacks.remove = function () { + for (var i = 0; i < returnCallbacks.length; i++) { + returnCallbacks[i].remove(); + } + }; + returnCallbacks.trigger = function () { + for (var i = 0; i < returnCallbacks.length; i++) { + returnCallbacks[i].trigger(); + } + }; + return returnCallbacks; + } + var callbacks = app.pageCallbacks[callbackName][pageName]; + if (!callbacks) { + callbacks = app.pageCallbacks[callbackName][pageName] = []; + } + app.pageCallbacks[callbackName][pageName].push(callback); + return { + remove: function () { + var removeIndex; + for (var i = 0; i < callbacks.length; i++) { + if (callbacks[i].toString() === callback.toString()) { + removeIndex = i; + } + } + if (typeof removeIndex !== 'undefined') callbacks.splice(removeIndex, 1); + }, + trigger: callback + }; +}; + +//Create callbacks methods dynamically +function createPageCallback(callbackName) { + var capitalized = callbackName.replace(/^./, function (match) { + return match.toUpperCase(); + }); + app['onPage' + capitalized] = function (pageName, callback) { + return app.onPage(callbackName, pageName, callback); + }; +} + +var pageCallbacksNames = ('beforeInit init reinit beforeAnimation afterAnimation back afterBack beforeRemove').split(' '); +for (var i = 0; i < pageCallbacksNames.length; i++) { + app.pageCallbacks[pageCallbacksNames[i]] = {}; + createPageCallback(pageCallbacksNames[i]); +} + +app.triggerPageCallbacks = function (callbackName, pageName, pageData) { + var allPagesCallbacks = app.pageCallbacks[callbackName]['*']; + if (allPagesCallbacks) { + for (var j = 0; j < allPagesCallbacks.length; j++) { + allPagesCallbacks[j](pageData); + } + } + var callbacks = app.pageCallbacks[callbackName][pageName]; + if (!callbacks || callbacks.length === 0) return; + for (var i = 0; i < callbacks.length; i++) { + callbacks[i](pageData); + } +}; + +// On Page Init Callback +app.pageInitCallback = function (view, params) { + var pageContainer = params.pageContainer; + if (!pageContainer) return; + if (pageContainer.f7PageInitialized && view && !view.params.domCache) return; + + var pageQuery = params.query; + if (!pageQuery) { + if (params.url && params.url.indexOf('?') > 0) { + pageQuery = $.parseUrlQuery(params.url || ''); + } + else if (pageContainer.f7PageData && pageContainer.f7PageData.query) { + pageQuery = pageContainer.f7PageData.query; + } + else { + pageQuery = {}; + } + } + + // Page Data + var pageData = { + container: pageContainer, + url: params.url, + query: pageQuery, + name: $(pageContainer).attr('data-page'), + view: view, + from: params.position, + context: params.context, + navbarInnerContainer: params.navbarInnerContainer, + fromPage: params.fromPage + }; + if (params.fromPage && !params.fromPage.navbarInnerContainer && params.oldNavbarInnerContainer) { + params.fromPage.navbarInnerContainer = params.oldNavbarInnerContainer; + } + + if (pageContainer.f7PageInitialized && ((view && view.params.domCache) || (!view && $(pageContainer).parents('.popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal').length > 0))) { + // Reinit Page + app.reinitPage(pageContainer); + + // Callbacks + app.pluginHook('pageReinit', pageData); + if (app.params.onPageReinit) app.params.onPageReinit(app, pageData); + app.triggerPageCallbacks('reinit', pageData.name, pageData); + $(pageData.container).trigger('pageReinit page:reinit', {page: pageData}); + return; + } + pageContainer.f7PageInitialized = true; + + // Store pagedata in page + pageContainer.f7PageData = pageData; + + // Update View's activePage + if (view && !params.preloadOnly && !params.reloadPrevious) { + // Add data-page on view + $(view.container).attr('data-page', pageData.name); + // Update View active page data + view.activePage = pageData; + } + + // Before Init Callbacks + app.pluginHook('pageBeforeInit', pageData); + if (app.params.onPageBeforeInit) app.params.onPageBeforeInit(app, pageData); + app.triggerPageCallbacks('beforeInit', pageData.name, pageData); + $(pageData.container).trigger('pageBeforeInit page:beforeinit', {page: pageData}); + + // Init page + app.initPage(pageContainer); + + // Init Callback + app.pluginHook('pageInit', pageData); + if (app.params.onPageInit) app.params.onPageInit(app, pageData); + app.triggerPageCallbacks('init', pageData.name, pageData); + $(pageData.container).trigger('pageInit page:init', {page: pageData}); +}; +app.pageRemoveCallback = function (view, pageContainer, position) { + var pageContext; + if (!pageContainer) return; + if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context; + // Page Data + var pageData = { + container: pageContainer, + name: $(pageContainer).attr('data-page'), + view: view, + url: pageContainer.f7PageData && pageContainer.f7PageData.url, + query: pageContainer.f7PageData && pageContainer.f7PageData.query, + navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer, + from: position, + context: pageContext + }; + // Before Init Callback + app.pluginHook('pageBeforeRemove', pageData); + if (app.params.onPageBeforeRemove) app.params.onPageBeforeRemove(app, pageData); + app.triggerPageCallbacks('beforeRemove', pageData.name, pageData); + $(pageData.container).trigger('pageBeforeRemove page:beforeremove', {page: pageData}); + pageData = null; +}; +app.pageBackCallback = function (callback, view, params) { + // Page Data + var pageContainer = params.pageContainer; + var pageContext; + if (!pageContainer) return; + if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context; + + var pageData = { + container: pageContainer, + name: $(pageContainer).attr('data-page'), + url: pageContainer.f7PageData && pageContainer.f7PageData.url, + query: pageContainer.f7PageData && pageContainer.f7PageData.query, + view: view, + from: params.position, + context: pageContext, + navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer, + swipeBack: params.swipeBack + }; + + if (callback === 'after') { + app.pluginHook('pageAfterBack', pageData); + if (app.params.onPageAfterBack) app.params.onPageAfterBack(app, pageData); + app.triggerPageCallbacks('afterBack', pageData.name, pageData); + $(pageContainer).trigger('pageAfterBack page:afterback', {page: pageData}); + + } + if (callback === 'before') { + app.pluginHook('pageBack', pageData); + if (app.params.onPageBack) app.params.onPageBack(app, pageData); + app.triggerPageCallbacks('back', pageData.name, pageData); + $(pageData.container).trigger('pageBack page:back', {page: pageData}); + } +}; +app.pageAnimCallback = function (callback, view, params) { + var pageContainer = params.pageContainer; + var pageContext; + if (!pageContainer) return; + if (pageContainer.f7PageData) pageContext = pageContainer.f7PageData.context; + + var pageQuery = params.query; + if (!pageQuery) { + if (params.url && params.url.indexOf('?') > 0) { + pageQuery = $.parseUrlQuery(params.url || ''); + } + else if (pageContainer.f7PageData && pageContainer.f7PageData.query) { + pageQuery = pageContainer.f7PageData.query; + } + else { + pageQuery = {}; + } + } + // Page Data + var pageData = { + container: pageContainer, + url: params.url, + query: pageQuery, + name: $(pageContainer).attr('data-page'), + view: view, + from: params.position, + context: pageContext, + swipeBack: params.swipeBack, + navbarInnerContainer: pageContainer.f7PageData && pageContainer.f7PageData.navbarInnerContainer, + fromPage: params.fromPage + }; + var oldPage = params.oldPage, + newPage = params.newPage; + + // Update page date + pageContainer.f7PageData = pageData; + + if (callback === 'after') { + app.pluginHook('pageAfterAnimation', pageData); + if (app.params.onPageAfterAnimation) app.params.onPageAfterAnimation(app, pageData); + app.triggerPageCallbacks('afterAnimation', pageData.name, pageData); + $(pageData.container).trigger('pageAfterAnimation page:afteranimation', {page: pageData}); + + } + if (callback === 'before') { + // Add data-page on view + $(view.container).attr('data-page', pageData.name); + + // Update View's activePage + if (view) view.activePage = pageData; + + // Hide/show navbar dynamically + if (newPage.hasClass('no-navbar') && !oldPage.hasClass('no-navbar')) { + view.hideNavbar(); + } + if (!newPage.hasClass('no-navbar') && (oldPage.hasClass('no-navbar') || oldPage.hasClass('no-navbar-by-scroll'))) { + view.showNavbar(); + } + // Hide/show navbar toolbar + if (newPage.hasClass('no-toolbar') && !oldPage.hasClass('no-toolbar')) { + view.hideToolbar(); + } + if (!newPage.hasClass('no-toolbar') && (oldPage.hasClass('no-toolbar') || oldPage.hasClass('no-toolbar-by-scroll'))) { + view.showToolbar(); + } + // Hide/show tabbar + var tabBar; + if (newPage.hasClass('no-tabbar') && !oldPage.hasClass('no-tabbar')) { + tabBar = $(view.container).find('.tabbar'); + if (tabBar.length === 0) tabBar = $(view.container).parents('.' + app.params.viewsClass).find('.tabbar'); + app.hideToolbar(tabBar); + } + if (!newPage.hasClass('no-tabbar') && (oldPage.hasClass('no-tabbar') || oldPage.hasClass('no-tabbar-by-scroll'))) { + tabBar = $(view.container).find('.tabbar'); + if (tabBar.length === 0) tabBar = $(view.container).parents('.' + app.params.viewsClass).find('.tabbar'); + app.showToolbar(tabBar); + } + + oldPage.removeClass('no-navbar-by-scroll no-toolbar-by-scroll'); + // Callbacks + app.pluginHook('pageBeforeAnimation', pageData); + if (app.params.onPageBeforeAnimation) app.params.onPageBeforeAnimation(app, pageData); + app.triggerPageCallbacks('beforeAnimation', pageData.name, pageData); + $(pageData.container).trigger('pageBeforeAnimation page:beforeanimation', {page: pageData}); + } +}; + +// Init Page Events and Manipulations +app.initPage = function (pageContainer) { + pageContainer = $(pageContainer); + if (pageContainer.length === 0) return; + // Size navbars on page load + if (app.sizeNavbars) app.sizeNavbars(pageContainer.parents('.' + app.params.viewClass)[0]); + // Init messages + if (app.initPageMessages) app.initPageMessages(pageContainer); + // Init forms storage + if (app.initFormsStorage) app.initFormsStorage(pageContainer); + // Init smart select + if (app.initSmartSelects) app.initSmartSelects(pageContainer); + // Init slider + if (app.initPageSwiper) app.initPageSwiper(pageContainer); + // Init pull to refres + if (app.initPullToRefresh) app.initPullToRefresh(pageContainer); + // Init infinite scroll + if (app.initPageInfiniteScroll) app.initPageInfiniteScroll(pageContainer); + // Init searchbar + if (app.initSearchbar) app.initSearchbar(pageContainer); + // Init message bar + if (app.initPageMessagebar) app.initPageMessagebar(pageContainer); + // Init scroll toolbars + if (app.initPageScrollToolbars) app.initPageScrollToolbars(pageContainer); + // Init lazy images + if (app.initImagesLazyLoad) app.initImagesLazyLoad(pageContainer); + // Init progress bars + if (app.initPageProgressbar) app.initPageProgressbar(pageContainer); + // Init resizeable textareas + if (app.initPageResizableTextarea) app.initPageResizableTextarea(pageContainer); + // Init Data Table + if (app.initPageDataTables) app.initPageDataTables(pageContainer); + // Init Material Preloader + if (app.params.material && app.initPageMaterialPreloader) app.initPageMaterialPreloader(pageContainer); + // Init Material Inputs + if (app.params.material && app.initPageMaterialInputs) app.initPageMaterialInputs(pageContainer); + // Init Material Tabbar + if (app.params.material && app.initPageMaterialTabbar) app.initPageMaterialTabbar(pageContainer); +}; +app.reinitPage = function (pageContainer) { + pageContainer = $(pageContainer); + if (pageContainer.length === 0) return; + // Size navbars on page reinit + if (app.sizeNavbars) app.sizeNavbars(pageContainer.parents('.' + app.params.viewClass)[0]); + // Reinit slider + if (app.reinitPageSwiper) app.reinitPageSwiper(pageContainer); + // Reinit lazy load + if (app.reinitLazyLoad) app.reinitLazyLoad(pageContainer); +}; +app.initPageWithCallback = function (pageContainer) { + pageContainer = $(pageContainer); + var viewContainer = pageContainer.parents('.' + app.params.viewClass); + if (viewContainer.length === 0) return; + var view = viewContainer[0].f7View || undefined; + var url = view && view.url ? view.url : undefined; + if (viewContainer && pageContainer.attr('data-page')) { + viewContainer.attr('data-page', pageContainer.attr('data-page')); + } + app.pageInitCallback(view, {pageContainer: pageContainer[0], url: url, position: 'center'}); +}; diff --git a/bower_components/framework7/src/js/framework7/panels.js b/bower_components/framework7/src/js/framework7/panels.js new file mode 100644 index 00000000..92feeca2 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/panels.js @@ -0,0 +1,476 @@ +/*====================================================== +************ Panels ************ +======================================================*/ +app.allowPanelOpen = true; +app.openPanel = function (panelPosition, animated) { + if (typeof animated === 'undefined') animated = true; + if (!app.allowPanelOpen) return false; + var panel = $('.panel-' + panelPosition); + if (panel.length === 0 || panel.hasClass('active') || panel.hasClass('panel-visible-by-breakpoint')) return false; + app.closePanel(); // Close if some panel is opened + app.allowPanelOpen = false; + var effect = panel.hasClass('panel-reveal') ? 'reveal' : 'cover'; + panel[animated ? 'removeClass' : 'addClass']('not-animated'); + panel.css({display: 'block'}).addClass('active'); + panel.trigger('open panel:open'); + + var panelOverlay = $('.panel-overlay'); + panelOverlay[animated ? 'removeClass' : 'addClass']('not-animated'); + panelOverlay.show(); + + if (panel.find('.' + app.params.viewClass).length > 0) { + if (app.sizeNavbars) app.sizeNavbars(panel.find('.' + app.params.viewClass)[0]); + } + + // Trigger reLayout + var clientLeft = panel[0].clientLeft; + + // Transition End; + var transitionEndTarget = effect === 'reveal' ? $('.' + app.params.viewsClass) : panel; + + function panelTransitionEnd() { + transitionEndTarget.transitionEnd(function (e) { + if ($(e.target).is(transitionEndTarget)) { + if (panel.hasClass('active')) { + panel.trigger('opened panel:opened'); + } + else { + panel.trigger('closed panel:closed'); + } + panelOverlay.css({display: ''}); + app.allowPanelOpen = true; + } + else panelTransitionEnd(); + }); + } + if (animated) { + panelTransitionEnd(); + } + else { + panel.trigger('opened panel:opened'); + panelOverlay.css({display: ''}); + app.allowPanelOpen = true; + } + + $('body').addClass('with-panel-' + panelPosition + '-' + effect); + return true; +}; +app.closePanel = function (animated) { + if (typeof animated === 'undefined') animated = true; + var activePanel = $('.panel.active'); + if (activePanel.length === 0 || activePanel.hasClass('panel-visible-by-breakpoint')) return false; + var effect = activePanel.hasClass('panel-reveal') ? 'reveal' : 'cover'; + var panelPosition = activePanel.hasClass('panel-left') ? 'left' : 'right'; + activePanel[animated ? 'removeClass' : 'addClass']('not-animated'); + activePanel.removeClass('active'); + + var panelOverlay = $('.panel-overlay'); + panelOverlay.removeClass('not-animated'); + + var transitionEndTarget = effect === 'reveal' ? $('.' + app.params.viewsClass) : activePanel; + activePanel.trigger('close panel:close'); + app.allowPanelOpen = false; + if (animated) { + transitionEndTarget.transitionEnd(function () { + if (activePanel.hasClass('active')) return; + activePanel.css({display: ''}); + activePanel.trigger('closed panel:closed'); + $('body').removeClass('panel-closing'); + app.allowPanelOpen = true; + }); + $('body').addClass('panel-closing').removeClass('with-panel-' + panelPosition + '-' + effect); + } + else { + activePanel.css({display: ''}); + activePanel.trigger('closed panel:closed'); + activePanel.removeClass('not-animated'); + $('body').removeClass('with-panel-' + panelPosition + '-' + effect); + app.allowPanelOpen = true; + } +}; +/*====================================================== +************ Panels breakpoints ************ +======================================================*/ +app.initPanelsBreakpoints = function () { + var panelLeft = $('.panel-left'); + var panelRight = $('.panel-right'); + var views = app.root.children('.views'); + var wasVisible; + function setPanels() { + // Left Panel + if (app.params.panelLeftBreakpoint && panelLeft.length > 0) { + wasVisible = panelLeft.hasClass('panel-visible-by-breakpoint'); + if (app.width >= app.params.panelLeftBreakpoint) { + if (!wasVisible) { + $('body').removeClass('with-panel-left-reveal with-panel-left-cover'); + panelLeft.css('display', '').addClass('panel-visible-by-breakpoint').removeClass('active'); + panelLeft.trigger('open panel:open opened panel:opened'); + views.css({ + 'margin-left': panelLeft.width() + 'px' + }); + app.allowPanelOpen = true; + } + } + else { + if (wasVisible) { + panelLeft.css('display', '').removeClass('panel-visible-by-breakpoint active'); + panelLeft.trigger('close panel:close closed panel:closed'); + views.css({ + 'margin-left': '' + }); + app.allowPanelOpen = true; + } + } + } + // Right Panel + if (app.params.panelRightBreakpoint && panelRight.length > 0) { + wasVisible = panelRight.hasClass('panel-visible-by-breakpoint'); + if (app.width >= app.params.panelRightBreakpoint) { + if (!wasVisible) { + $('body').removeClass('with-panel-right-reveal with-panel-right-cover'); + panelRight.css('display', '').addClass('panel-visible-by-breakpoint').removeClass('active'); + panelRight.trigger('open panel:open opened panel:opened'); + views.css({ + 'margin-right': panelRight.width() + 'px' + }); + app.allowPanelOpen = true; + } + } + else { + if (wasVisible) { + panelRight.css('display', '').removeClass('panel-visible-by-breakpoint active'); + panelRight.trigger('close panel:close closed panel:closed'); + views.css({ + 'margin-right': '' + }); + app.allowPanelOpen = true; + } + } + } + } + app.onResize(setPanels); + setPanels(); +}; +/*====================================================== +************ Swipe panels ************ +======================================================*/ +app.initSwipePanels = function () { + var panel, side; + if (app.params.swipePanel) { + panel = $('.panel.panel-' + app.params.swipePanel); + side = app.params.swipePanel; + if (panel.length === 0 && side !== 'both') return; + } + else { + if (app.params.swipePanelOnlyClose) { + if ($('.panel').length === 0) return; + } + else return; + } + + var panelOverlay = $('.panel-overlay'); + var isTouched, isMoved, isScrolling, touchesStart = {}, touchStartTime, touchesDiff, translate, overlayOpacity, opened, panelWidth, effect, direction; + var views = $('.' + app.params.viewsClass); + + function handleTouchStart(e) { + if (!app.allowPanelOpen || (!app.params.swipePanel && !app.params.swipePanelOnlyClose) || isTouched) return; + if ($('.modal-in, .photo-browser-in').length > 0) return; + if (!(app.params.swipePanelCloseOpposite || app.params.swipePanelOnlyClose)) { + if ($('.panel.active').length > 0 && !panel.hasClass('active')) return; + } + if (e.target && e.target.nodeName.toLowerCase() === 'input' && e.target.type === 'range') return; + if ($(e.target).closest('.tabs-swipeable-wrap').length > 0) return; + touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + if (app.params.swipePanelCloseOpposite || app.params.swipePanelOnlyClose) { + if ($('.panel.active').length > 0) { + side = $('.panel.active').hasClass('panel-left') ? 'left' : 'right'; + } + else { + if (app.params.swipePanelOnlyClose) return; + side = app.params.swipePanel; + } + if (!side) return; + } + panel = $('.panel.panel-' + side); + opened = panel.hasClass('active'); + if (app.params.swipePanelActiveArea && !opened) { + if (side === 'left') { + if (touchesStart.x > app.params.swipePanelActiveArea) return; + } + if (side === 'right') { + if (touchesStart.x < app.width - app.params.swipePanelActiveArea) return; + } + } + isMoved = false; + isTouched = true; + isScrolling = undefined; + + touchStartTime = (new Date()).getTime(); + direction = undefined; + } + function handleTouchMove(e) { + if (!isTouched) return; + if (e.f7PreventPanelSwipe) return; + var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (typeof isScrolling === 'undefined') { + isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x)); + } + if (isScrolling) { + isTouched = false; + return; + } + if (!direction) { + if (pageX > touchesStart.x) { + direction = 'to-right'; + } + else { + direction = 'to-left'; + } + + if(side === 'both'){ + if ($('.panel.active').length > 0) { + side = $('.panel.active').hasClass('panel-left') ? 'left' : 'right'; + } + else { + side = direction === 'to-right' ? 'left' : 'right'; + } + if (app.params.swipePanelActiveArea > 0) { + if (side === 'left' && touchesStart.x > app.params.swipePanelActiveArea) { + isTouched = false; + return; + } + if (side === 'right' && touchesStart.x < app.width - app.params.swipePanelActiveArea) { + isTouched = false; + return; + } + } + panel = $('.panel.panel-' + side); + } + if (panel.hasClass('panel-visible-by-breakpoint')) { + isTouched = false; + return; + } + + if ( + side === 'left' && + ( + direction === 'to-left' && !panel.hasClass('active') + ) || + side === 'right' && + ( + direction === 'to-right' && !panel.hasClass('active') + ) + ) + { + isTouched = false; + return; + } + } + + if (app.params.swipePanelNoFollow) { + var timeDiff = (new Date()).getTime() - touchStartTime; + if (timeDiff < 300) { + if (direction === 'to-left') { + if (side === 'right') app.openPanel(side); + if (side === 'left' && panel.hasClass('active')) app.closePanel(); + } + if (direction === 'to-right') { + if (side === 'left') app.openPanel(side); + if (side === 'right' && panel.hasClass('active')) app.closePanel(); + } + } + isTouched = false; + isMoved = false; + return; + } + + if (!isMoved) { + effect = panel.hasClass('panel-cover') ? 'cover' : 'reveal'; + if (!opened) { + panel.show(); + panelOverlay.show(); + } + panelWidth = panel[0].offsetWidth; + panel.transition(0); + if (panel.find('.' + app.params.viewClass).length > 0) { + if (app.sizeNavbars) app.sizeNavbars(panel.find('.' + app.params.viewClass)[0]); + } + } + + isMoved = true; + + e.preventDefault(); + var threshold = opened ? 0 : -app.params.swipePanelThreshold; + if (side === 'right') threshold = -threshold; + + touchesDiff = pageX - touchesStart.x + threshold; + + if (side === 'right') { + if (effect === 'cover') { + translate = touchesDiff + (opened ? 0 : panelWidth); + if (translate < 0) translate = 0; + if (translate > panelWidth) { + translate = panelWidth; + } + } + else { + translate = touchesDiff - (opened ? panelWidth : 0); + if (translate > 0) translate = 0; + if (translate < -panelWidth) { + translate = -panelWidth; + } + } + } + else { + translate = touchesDiff + (opened ? panelWidth : 0); + if (translate < 0) translate = 0; + if (translate > panelWidth) { + translate = panelWidth; + } + } + if (effect === 'reveal') { + views.transform('translate3d(' + translate + 'px,0,0)').transition(0); + panelOverlay.transform('translate3d(' + translate + 'px,0,0)').transition(0); + + panel.trigger('panel:swipe', {progress: Math.abs(translate / panelWidth)}); + app.pluginHook('swipePanelSetTransform', views[0], panel[0], Math.abs(translate / panelWidth)); + } + else { + if (side === 'left') translate = translate - panelWidth; + panel.transform('translate3d(' + (translate) + 'px,0,0)').transition(0); + + panelOverlay.transition(0); + overlayOpacity = 1 - Math.abs(translate/panelWidth); + panelOverlay.css({opacity: overlayOpacity}); + + panel.trigger('panel:swipe', {progress: Math.abs(translate / panelWidth)}); + app.pluginHook('swipePanelSetTransform', views[0], panel[0], Math.abs(translate / panelWidth)); + } + } + function handleTouchEnd(e) { + if (!isTouched || !isMoved) { + isTouched = false; + isMoved = false; + return; + } + isTouched = false; + isMoved = false; + var timeDiff = (new Date()).getTime() - touchStartTime; + var action; + var edge = (translate === 0 || Math.abs(translate) === panelWidth); + + if (!opened) { + if (effect === 'cover') { + if (translate === 0) { + action = 'swap'; //open + } + else if (timeDiff < 300 && Math.abs(translate) > 0) { + action = 'swap'; //open + } + else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) { + action = 'swap'; //open + } + else { + action = 'reset'; //close + } + } + else { + if (translate === 0) { + action = 'reset'; + } + else if ( + timeDiff < 300 && Math.abs(translate) > 0 || + timeDiff >= 300 && (Math.abs(translate) >= panelWidth / 2) + ) { + action = 'swap'; + } + else { + action = 'reset'; + } + } + } + else { + if (effect === 'cover') { + if (translate === 0) { + action = 'reset'; //open + } + else if (timeDiff < 300 && Math.abs(translate) > 0) { + action = 'swap'; //open + } + else if (timeDiff >= 300 && Math.abs(translate) < panelWidth / 2) { + action = 'reset'; //open + } + else { + action = 'swap'; //close + } + } + else { + if (translate === -panelWidth) { + action = 'reset'; + } + else if ( + timeDiff < 300 && Math.abs(translate) >= 0 || + timeDiff >= 300 && (Math.abs(translate) <= panelWidth / 2) + ) { + if (side === 'left' && translate === panelWidth) action = 'reset'; + else action = 'swap'; + } + else { + action = 'reset'; + } + } + } + if (action === 'swap') { + app.allowPanelOpen = true; + if (opened) { + app.closePanel(); + if (edge) { + panel.css({display: ''}); + $('body').removeClass('panel-closing'); + } + } + else { + app.openPanel(side); + } + if (edge) app.allowPanelOpen = true; + } + if (action === 'reset') { + if (opened) { + app.allowPanelOpen = true; + app.openPanel(side); + } + else { + app.closePanel(); + if (edge) { + app.allowPanelOpen = true; + panel.css({display: ''}); + } + else { + var target = effect === 'reveal' ? views : panel; + panel.trigger('close panel:close'); + $('body').addClass('panel-closing'); + target.transitionEnd(function () { + if (panel.hasClass('active')) return; + panel.trigger('close panel:closed'); + panel.css({display: ''}); + $('body').removeClass('panel-closing'); + app.allowPanelOpen = true; + }); + } + } + } + if (effect === 'reveal') { + views.transition(''); + views.transform(''); + } + panel.transition('').transform(''); + panelOverlay.css({display: ''}).transform('').transition('').css('opacity', ''); + } + var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false; + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + $(document).on(app.touchEvents.start, handleTouchStart, passiveListener); + $(document).on(app.touchEvents.move, handleTouchMove, activeListener); + $(document).on(app.touchEvents.end, handleTouchEnd, passiveListener); +}; diff --git a/bower_components/framework7/src/js/framework7/photo-browser.js b/bower_components/framework7/src/js/framework7/photo-browser.js new file mode 100644 index 00000000..ce6a140e --- /dev/null +++ b/bower_components/framework7/src/js/framework7/photo-browser.js @@ -0,0 +1,429 @@ +/*====================================================== +************ Photo Browser ************ +======================================================*/ +var PhotoBrowser = function (params) { + var pb = this, i; + + var defaults = { + photos : [], + initialSlide: 0, + spaceBetween: 20, + speed: 300, + zoom: true, + zoomMax: 3, + zoomMin: 1, + exposition: true, + expositionHideCaptions: false, + type: 'standalone', + navbar: true, + toolbar: true, + theme: 'light', + swipeToClose: true, + backLinkText: 'Close', + ofText: 'of', + loop: false, + lazyLoading: false, + lazyLoadingInPrevNext: false, + lazyLoadingOnTransitionStart: false, + material: app.params.material, + materialPreloaderSvg: app.params.materialPreloaderSvg, + materialPreloaderHtml: app.params.materialPreloaderHtml, + /* + Callbacks: + onLazyImageLoad(pb, slide, img) + onLazyImageReady(pb, slide, img) + onOpen(pb) + onClose(pb) + onTransitionStart(swiper) + onTransitionEnd(swiper) + onSlideChangeStart(swiper) + onSlideChangeEnd(swiper) + onTap(swiper, e) + onClick(swiper, e) + onDoubleTap(swiper, e) + onSwipeToClose(pb) + */ + }; + + params = params || {}; + if (!params.backLinkText && app.params.material) defaults.backLinkText = ''; + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + if (params.maxZoom) { + params.zoomMax = params.maxZoom; + } + if (params.minZoom) { + params.zoomMin = params.minZoom; + } + + pb.params = params; + pb.params.iconsColorClass = pb.params.iconsColor ? 'color-' + pb.params.iconsColor : (pb.params.theme === 'dark' ? 'color-white' : ''); + pb.params.preloaderColorClass = pb.params.theme === 'dark' ? 'preloader-white' : ''; + + // Templates + var photoTemplate = pb.params.photoTemplate || + '
                                                      ' + + '' + + '' + + '' + + '
                                                      '; + var photoLazyTemplate = pb.params.lazyPhotoTemplate || + '
                                                      ' + + '
                                                      {{#if @root.material}}{{@root.materialPreloaderHtml}}{{/if}}
                                                      ' + + '' + + '' + + '' + + '
                                                      '; + var objectTemplate = pb.params.objectTemplate || + '
                                                      {{js "this.html || this"}}
                                                      '; + var captionTemplate = pb.params.captionTemplate || + '
                                                      ' + + '{{caption}}' + + '
                                                      '; + var navbarTemplate = pb.params.navbarTemplate || + ''; + var toolbarTemplate = pb.params.toolbarTemplate || + '
                                                      ' + + '
                                                      ' + + '' + + '' + + '' + + '' + + '' + + '' + + '
                                                      ' + + '
                                                      '; + + var htmlTemplate = t7.compile('
                                                      ' + + '' + + '
                                                      ')(pb.params); + + pb.activeIndex = pb.params.initialSlide; + pb.openIndex = pb.activeIndex; + pb.opened = false; + + pb.open = function (index) { + if (typeof index === 'undefined') index = pb.activeIndex; + index = parseInt(index, 10); + if (pb.opened && pb.swiper) { + pb.swiper.slideTo(index); + return; + } + pb.opened = true; + pb.openIndex = index; + if (pb.params.type === 'standalone') { + app.root.append(htmlTemplate); + } + if (pb.params.type === 'popup') { + pb.popup = app.popup(''); + $(pb.popup).on('popup:closed', pb.onPopupClose); + } + if (pb.params.type === 'page') { + $(document).once('page:beforeinit', pb.onPageBeforeInit); + $(document).once('page:beforeremove', pb.onPageBeforeRemove); + if (!pb.params.view) pb.params.view = app.mainView; + pb.params.view.loadContent(htmlTemplate); + return; + } + pb.layout(pb.openIndex); + if (pb.params.onOpen) { + pb.params.onOpen(pb); + } + + }; + pb.close = function () { + pb.opened = false; + if (!pb.swiperContainer || pb.swiperContainer.length === 0) { + return; + } + if (pb.params.onClose) { + pb.params.onClose(pb); + } + // Detach events + pb.attachEvents(true); + // Delete from DOM + if (pb.params.type === 'standalone') { + pb.container.removeClass('photo-browser-in').addClass('photo-browser-out').animationEnd(function () { + pb.container.remove(); + }); + } + // Destroy slider + pb.swiper.destroy(); + // Delete references + pb.swiper = pb.swiperContainer = pb.swiperWrapper = pb.slides = undefined; //gestureSlide = gestureImg = gestureImgWrap = undefined; + }; + + pb.onPopupClose = function (e) { + pb.close(); + $(pb.popup).off('page:beforeinit', pb.onPopupClose); + }; + pb.onPageBeforeInit = function (e) { + if (e.detail.page.name === 'photo-browser-slides') { + pb.layout(pb.openIndex); + if (pb.params.onOpen) { + pb.params.onOpen(pb); + } + } + }; + pb.onPageBeforeRemove = function (e) { + if (e.detail.page.name === 'photo-browser-slides') { + pb.close(); + } + }; + + pb.onSliderTransitionStart = function (swiper) { + pb.activeIndex = swiper.activeIndex; + + var current = swiper.activeIndex + 1; + var total = swiper.slides.length; + if (pb.params.loop) { + total = total - 2; + current = current - swiper.loopedSlides; + if (current < 1) current = total + current; + if (current > total) current = current - total; + } + pb.container.find('.photo-browser-current').text(current); + pb.container.find('.photo-browser-total').text(total); + + $('.photo-browser-prev, .photo-browser-next').removeClass('photo-browser-link-inactive'); + + if (swiper.isBeginning && !pb.params.loop) { + $('.photo-browser-prev').addClass('photo-browser-link-inactive'); + } + if (swiper.isEnd && !pb.params.loop) { + $('.photo-browser-next').addClass('photo-browser-link-inactive'); + } + + // Update captions + if (pb.captions.length > 0) { + pb.captionsContainer.find('.photo-browser-caption-active').removeClass('photo-browser-caption-active'); + var captionIndex = pb.params.loop ? swiper.slides.eq(swiper.activeIndex).attr('data-swiper-slide-index') : pb.activeIndex; + pb.captionsContainer.find('[data-caption-index="' + captionIndex + '"]').addClass('photo-browser-caption-active'); + } + + + // Stop Video + var previousSlideVideo = swiper.slides.eq(swiper.previousIndex).find('video'); + if (previousSlideVideo.length > 0) { + if ('pause' in previousSlideVideo[0]) previousSlideVideo[0].pause(); + } + // Callback + if (pb.params.onTransitionStart) pb.params.onTransitionStart(swiper); + }; + pb.onSliderTransitionEnd = function (swiper) { + if (pb.params.onTransitionEnd) pb.params.onTransitionEnd(swiper); + }; + + pb.layout = function (index) { + if (pb.params.type === 'page') { + pb.container = $('.photo-browser-swiper-container').parents('.view'); + } + else { + pb.container = $('.photo-browser'); + } + if (pb.params.type === 'standalone') { + pb.container.addClass('photo-browser-in'); + app.sizeNavbars(pb.container); + } + pb.swiperContainer = pb.container.find('.photo-browser-swiper-container'); + pb.swiperWrapper = pb.container.find('.photo-browser-swiper-wrapper'); + pb.slides = pb.container.find('.photo-browser-slide'); + pb.captionsContainer = pb.container.find('.photo-browser-captions'); + pb.captions = pb.container.find('.photo-browser-caption'); + + var sliderSettings = { + nextButton: pb.params.nextButton || '.photo-browser-next', + prevButton: pb.params.prevButton || '.photo-browser-prev', + indexButton: pb.params.indexButton, + initialSlide: index, + spaceBetween: pb.params.spaceBetween, + speed: pb.params.speed, + loop: pb.params.loop, + lazyLoading: pb.params.lazyLoading, + lazyLoadingInPrevNext: pb.params.lazyLoadingInPrevNext, + lazyLoadingOnTransitionStart: pb.params.lazyLoadingOnTransitionStart, + preloadImages: pb.params.lazyLoading ? false : true, + zoom: pb.params.zoom, + zoomMax: pb.params.zoomMax, + zoomMin: pb.params.zoomMin, + onTap: function (swiper, e) { + if (pb.params.onTap) pb.params.onTap(swiper, e); + }, + onClick: function (swiper, e) { + if (pb.params.exposition) pb.toggleExposition(); + if (pb.params.onClick) pb.params.onClick(swiper, e); + }, + onDoubleTap: function (swiper, e) { + // pb.toggleZoom(e); + if (pb.params.onDoubleTap) pb.params.onDoubleTap(swiper, e); + }, + onTransitionStart: function (swiper) { + pb.onSliderTransitionStart(swiper); + }, + onTransitionEnd: function (swiper) { + pb.onSliderTransitionEnd(swiper); + }, + onSlideChangeStart: pb.params.onSlideChangeStart, + onSlideChangeEnd: pb.params.onSlideChangeEnd, + onLazyImageLoad: function (swiper, slide, img) { + if (pb.params.onLazyImageLoad) pb.params.onLazyImageLoad(pb, slide, img); + }, + onLazyImageReady: function (swiper, slide, img) { + $(slide).removeClass('photo-browser-slide-lazy'); + if (pb.params.onLazyImageReady) pb.params.onLazyImageReady(pb, slide, img); + } + }; + + if (pb.params.swipeToClose && pb.params.type !== 'page') { + sliderSettings.onTouchStart = pb.swipeCloseTouchStart; + sliderSettings.onTouchMoveOpposite = pb.swipeCloseTouchMove; + sliderSettings.onTouchEnd = pb.swipeCloseTouchEnd; + } + + pb.swiper = app.swiper(pb.swiperContainer, sliderSettings); + if (index === 0) { + pb.onSliderTransitionStart(pb.swiper); + } + pb.attachEvents(); + }; + pb.attachEvents = function (detach) { + var action = detach ? 'off' : 'on'; + pb.container.find('.photo-browser-close-link')[action]('click', pb.close); + }; + + + // Expose + pb.exposed = false; + pb.toggleExposition = function () { + if (pb.container) pb.container.toggleClass('photo-browser-exposed'); + if (pb.params.expositionHideCaptions) pb.captionsContainer.toggleClass('photo-browser-captions-exposed'); + pb.exposed = !pb.exposed; + }; + pb.enableExposition = function () { + if (pb.container) pb.container.addClass('photo-browser-exposed'); + if (pb.params.expositionHideCaptions) pb.captionsContainer.addClass('photo-browser-captions-exposed'); + pb.exposed = true; + }; + pb.disableExposition = function () { + if (pb.container) pb.container.removeClass('photo-browser-exposed'); + if (pb.params.expositionHideCaptions) pb.captionsContainer.removeClass('photo-browser-captions-exposed'); + pb.exposed = false; + }; + + // Swipe Up To Close + var swipeToCloseIsTouched = false; + var allowSwipeToClose = true; + var swipeToCloseDiff, swipeToCloseStart, swipeToCloseCurrent, swipeToCloseStarted = false, swipeToCloseActiveSlide, swipeToCloseTimeStart; + pb.swipeCloseTouchStart = function (swiper, e) { + if (!allowSwipeToClose) return; + swipeToCloseIsTouched = true; + }; + pb.swipeCloseTouchMove = function (swiper, e) { + if (!swipeToCloseIsTouched) return; + if (!swipeToCloseStarted) { + swipeToCloseStarted = true; + swipeToCloseStart = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + swipeToCloseActiveSlide = pb.swiper.slides.eq(pb.swiper.activeIndex); + swipeToCloseTimeStart = (new Date()).getTime(); + } + e.preventDefault(); + swipeToCloseCurrent = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + swipeToCloseDiff = swipeToCloseStart - swipeToCloseCurrent; + var opacity = 1 - Math.abs(swipeToCloseDiff) / 300; + swipeToCloseActiveSlide.transform('translate3d(0,' + (-swipeToCloseDiff) + 'px,0)'); + pb.swiper.container.css('opacity', opacity).transition(0); + }; + pb.swipeCloseTouchEnd = function (swiper, e) { + swipeToCloseIsTouched = false; + if (!swipeToCloseStarted) { + swipeToCloseStarted = false; + return; + } + swipeToCloseStarted = false; + allowSwipeToClose = false; + var diff = Math.abs(swipeToCloseDiff); + var timeDiff = (new Date()).getTime() - swipeToCloseTimeStart; + if ((timeDiff < 300 && diff > 20) || (timeDiff >= 300 && diff > 100)) { + setTimeout(function () { + if (pb.params.type === 'standalone') { + pb.close(); + } + if (pb.params.type === 'popup') { + app.closeModal(pb.popup); + } + if (pb.params.onSwipeToClose) { + pb.params.onSwipeToClose(pb); + } + allowSwipeToClose = true; + }, 0); + return; + } + if (diff !== 0) { + swipeToCloseActiveSlide.addClass('transitioning').transitionEnd(function () { + allowSwipeToClose = true; + swipeToCloseActiveSlide.removeClass('transitioning'); + }); + } + else { + allowSwipeToClose = true; + } + pb.swiper.container.css('opacity', '').transition(''); + swipeToCloseActiveSlide.transform(''); + }; + + return pb; +}; + +app.photoBrowser = function (params) { + return new PhotoBrowser(params); +}; diff --git a/bower_components/framework7/src/js/framework7/picker.js b/bower_components/framework7/src/js/framework7/picker.js new file mode 100644 index 00000000..e6f7b083 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/picker.js @@ -0,0 +1,621 @@ +/*====================================================== +************ Picker ************ +======================================================*/ +var Picker = function (params) { + var p = this; + var defaults = { + updateValuesOnMomentum: false, + updateValuesOnTouchmove: true, + rotateEffect: false, + momentumRatio: 7, + freeMode: false, + // Common settings + closeByOutsideClick: true, + scrollToInput: true, + inputReadOnly: true, + convertToPopover: true, + onlyInPopover: false, + toolbar: true, + toolbarCloseText: 'Done', + toolbarTemplate: + '
                                                      ' + + '
                                                      ' + + '
                                                      ' + + '
                                                      ' + + '{{closeText}}' + + '
                                                      ' + + '
                                                      ' + + '
                                                      ' + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + p.params = params; + p.cols = []; + p.initialized = false; + + // Inline flag + p.inline = p.params.container ? true : false; + + // 3D Transforms origin bug, only on safari + var originBug = app.device.ios || (navigator.userAgent.toLowerCase().indexOf('safari') >= 0 && navigator.userAgent.toLowerCase().indexOf('chrome') < 0) && !app.device.android; + + // Should be converted to popover + function isPopover() { + var toPopover = false; + if (!p.params.convertToPopover && !p.params.onlyInPopover) return toPopover; + if (!p.inline && p.params.input) { + if (p.params.onlyInPopover) toPopover = true; + else { + if (app.device.ios) { + toPopover = app.device.ipad ? true : false; + } + else { + if (app.width >= 768) toPopover = true; + } + } + } + return toPopover; + } + function inPopover() { + if (p.opened && p.container && p.container.length > 0 && p.container.parents('.popover').length > 0) return true; + else return false; + } + + // Value + p.setValue = function (arrValues, transition) { + var valueIndex = 0; + if (p.cols.length === 0) { + p.value = arrValues; + p.updateValue(arrValues); + return; + } + for (var i = 0; i < p.cols.length; i++) { + if (p.cols[i] && !p.cols[i].divider) { + p.cols[i].setValue(arrValues[valueIndex], transition); + valueIndex++; + } + } + }; + p.updateValue = function (forceValues) { + var newValue = forceValues || []; + var newDisplayValue = [], i, column; + if (p.cols.length === 0) { + for (i = 0; i < p.params.cols.length; i++) { + column = p.params.cols[i]; + if (column.displayValues !== undefined && column.values !== undefined && column.values.indexOf(newValue[i]) !== undefined) { + newDisplayValue.push(column.displayValues[column.values.indexOf(newValue[i])]); + } + else { + newDisplayValue.push(newValue[i]); + } + } + } + else { + for (i = 0; i < p.cols.length; i++) { + if (!p.cols[i].divider) { + newValue.push(p.cols[i].value); + newDisplayValue.push(p.cols[i].displayValue); + } + } + } + + if (newValue.indexOf(undefined) >= 0) { + return; + } + p.value = newValue; + p.displayValue = newDisplayValue; + if (p.params.onChange) { + p.params.onChange(p, p.value, p.displayValue); + } + if (p.input && p.input.length > 0) { + $(p.input).val(p.params.formatValue ? p.params.formatValue(p, p.value, p.displayValue) : p.value.join(' ')); + $(p.input).trigger('change'); + } + }; + + // Columns Handlers + p.initPickerCol = function (colElement, updateItems) { + var colContainer = $(colElement); + var colIndex = colContainer.index(); + var col = p.cols[colIndex]; + if (col.divider) return; + col.container = colContainer; + col.wrapper = col.container.find('.picker-items-col-wrapper'); + col.items = col.wrapper.find('.picker-item'); + + var i, j; + var wrapperHeight, itemHeight, itemsHeight, minTranslate, maxTranslate; + col.replaceValues = function (values, displayValues) { + col.destroyEvents(); + col.values = values; + col.displayValues = displayValues; + var newItemsHTML = p.columnHTML(col, true); + col.wrapper.html(newItemsHTML); + col.items = col.wrapper.find('.picker-item'); + col.calcSize(); + col.setValue(col.values[0], 0, true); + col.initEvents(); + }; + var resizeTimeout; + col.calcSize = function () { + if (p.params.rotateEffect) { + col.container.removeClass('picker-items-col-absolute'); + if (!col.width) col.container.css({width:''}); + } + var colWidth, colHeight; + colWidth = 0; + colHeight = col.container[0].offsetHeight; + wrapperHeight = col.wrapper[0].offsetHeight; + itemHeight = col.items[0].offsetHeight; + itemsHeight = itemHeight * col.items.length; + minTranslate = colHeight / 2 - itemsHeight + itemHeight / 2; + maxTranslate = colHeight / 2 - itemHeight / 2; + if (col.width) { + colWidth = col.width; + if (parseInt(colWidth, 10) === colWidth) colWidth = colWidth + 'px'; + col.container.css({width: colWidth}); + } + if (p.params.rotateEffect) { + if (!col.width) { + col.items.each(function () { + var item = $(this).children('span'); + colWidth = Math.max(colWidth, item[0].offsetWidth); + }); + col.container.css({width: (colWidth + 2) + 'px'}); + } + col.container.addClass('picker-items-col-absolute'); + } + }; + col.calcSize(); + + col.wrapper.transform('translate3d(0,' + maxTranslate + 'px,0)').transition(0); + + + var activeIndex = 0; + var animationFrameId; + + // Set Value Function + col.setValue = function (newValue, transition, valueCallbacks) { + if (typeof transition === 'undefined') transition = ''; + var newActiveIndex = col.wrapper.find('.picker-item[data-picker-value="' + newValue + '"]').index(); + if(typeof newActiveIndex === 'undefined' || newActiveIndex === -1) { + return; + } + var newTranslate = -newActiveIndex * itemHeight + maxTranslate; + // Update wrapper + col.wrapper.transition(transition); + col.wrapper.transform('translate3d(0,' + (newTranslate) + 'px,0)'); + + // Watch items + if (p.params.updateValuesOnMomentum && col.activeIndex && col.activeIndex !== newActiveIndex ) { + $.cancelAnimationFrame(animationFrameId); + col.wrapper.transitionEnd(function(){ + $.cancelAnimationFrame(animationFrameId); + }); + updateDuringScroll(); + } + + // Update items + col.updateItems(newActiveIndex, newTranslate, transition, valueCallbacks); + }; + + col.updateItems = function (activeIndex, translate, transition, valueCallbacks) { + if (typeof translate === 'undefined') { + translate = $.getTranslate(col.wrapper[0], 'y'); + } + if(typeof activeIndex === 'undefined') activeIndex = -Math.round((translate - maxTranslate)/itemHeight); + if (activeIndex < 0) activeIndex = 0; + if (activeIndex >= col.items.length) activeIndex = col.items.length - 1; + var previousActiveIndex = col.activeIndex; + col.activeIndex = activeIndex; + col.wrapper.find('.picker-selected').removeClass('picker-selected'); + + col.items.transition(transition); + + var selectedItem = col.items.eq(activeIndex).addClass('picker-selected').transform(''); + + // Set 3D rotate effect + if (p.params.rotateEffect) { + var percentage = (translate - (Math.floor((translate - maxTranslate)/itemHeight) * itemHeight + maxTranslate)) / itemHeight; + + col.items.each(function () { + var item = $(this); + var itemOffsetTop = item.index() * itemHeight; + var translateOffset = maxTranslate - translate; + var itemOffset = itemOffsetTop - translateOffset; + var percentage = itemOffset / itemHeight; + + var itemsFit = Math.ceil(col.height / itemHeight / 2) + 1; + + var angle = (-18*percentage); + if (angle > 180) angle = 180; + if (angle < -180) angle = -180; + // Far class + if (Math.abs(percentage) > itemsFit) item.addClass('picker-item-far'); + else item.removeClass('picker-item-far'); + // Set transform + item.transform('translate3d(0, ' + (-translate + maxTranslate) + 'px, ' + (originBug ? -110 : 0) + 'px) rotateX(' + angle + 'deg)'); + }); + } + + if (valueCallbacks || typeof valueCallbacks === 'undefined') { + // Update values + col.value = selectedItem.attr('data-picker-value'); + col.displayValue = col.displayValues ? col.displayValues[activeIndex] : col.value; + // On change callback + if (previousActiveIndex !== activeIndex) { + if (col.onChange) { + col.onChange(p, col.value, col.displayValue); + } + p.updateValue(); + } + } + }; + + function updateDuringScroll() { + animationFrameId = $.requestAnimationFrame(function () { + col.updateItems(undefined, undefined, 0); + updateDuringScroll(); + }); + } + + // Update items on init + if (updateItems) col.updateItems(0, maxTranslate, 0); + + var allowItemClick = true; + var isTouched, isMoved, touchStartY, touchCurrentY, touchStartTime, touchEndTime, startTranslate, returnTo, currentTranslate, prevTranslate, velocityTranslate, velocityTime; + function handleTouchStart (e) { + if (isMoved || isTouched) return; + e.preventDefault(); + isTouched = true; + touchStartY = touchCurrentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = (new Date()).getTime(); + + allowItemClick = true; + startTranslate = currentTranslate = $.getTranslate(col.wrapper[0], 'y'); + } + function handleTouchMove (e) { + if (!isTouched) return; + e.preventDefault(); + allowItemClick = false; + touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (!isMoved) { + // First move + $.cancelAnimationFrame(animationFrameId); + isMoved = true; + startTranslate = currentTranslate = $.getTranslate(col.wrapper[0], 'y'); + col.wrapper.transition(0); + } + + var diff = touchCurrentY - touchStartY; + currentTranslate = startTranslate + diff; + returnTo = undefined; + + // Normalize translate + if (currentTranslate < minTranslate) { + currentTranslate = minTranslate - Math.pow(minTranslate - currentTranslate, 0.8); + returnTo = 'min'; + } + if (currentTranslate > maxTranslate) { + currentTranslate = maxTranslate + Math.pow(currentTranslate - maxTranslate, 0.8); + returnTo = 'max'; + } + // Transform wrapper + col.wrapper.transform('translate3d(0,' + currentTranslate + 'px,0)'); + + // Update items + col.updateItems(undefined, currentTranslate, 0, p.params.updateValuesOnTouchmove); + + // Calc velocity + velocityTranslate = currentTranslate - prevTranslate || currentTranslate; + velocityTime = (new Date()).getTime(); + prevTranslate = currentTranslate; + } + function handleTouchEnd (e) { + if (!isTouched || !isMoved) { + isTouched = isMoved = false; + return; + } + isTouched = isMoved = false; + col.wrapper.transition(''); + if (returnTo) { + if (returnTo === 'min') { + col.wrapper.transform('translate3d(0,' + minTranslate + 'px,0)'); + } + else col.wrapper.transform('translate3d(0,' + maxTranslate + 'px,0)'); + } + touchEndTime = new Date().getTime(); + var velocity, newTranslate; + if (touchEndTime - touchStartTime > 300) { + newTranslate = currentTranslate; + } + else { + velocity = Math.abs(velocityTranslate / (touchEndTime - velocityTime)); + newTranslate = currentTranslate + velocityTranslate * p.params.momentumRatio; + } + + newTranslate = Math.max(Math.min(newTranslate, maxTranslate), minTranslate); + + // Active Index + var activeIndex = -Math.floor((newTranslate - maxTranslate)/itemHeight); + + // Normalize translate + if (!p.params.freeMode) newTranslate = -activeIndex * itemHeight + maxTranslate; + + // Transform wrapper + col.wrapper.transform('translate3d(0,' + (parseInt(newTranslate,10)) + 'px,0)'); + + // Update items + col.updateItems(activeIndex, newTranslate, '', true); + + // Watch items + if (p.params.updateValuesOnMomentum) { + updateDuringScroll(); + col.wrapper.transitionEnd(function(){ + $.cancelAnimationFrame(animationFrameId); + }); + } + + // Allow click + setTimeout(function () { + allowItemClick = true; + }, 100); + } + + function handleClick(e) { + if (!allowItemClick) return; + $.cancelAnimationFrame(animationFrameId); + /*jshint validthis:true */ + var value = $(this).attr('data-picker-value'); + col.setValue(value); + } + + col.initEvents = function (detach) { + var method = detach ? 'off' : 'on'; + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + col.container[method](app.touchEvents.start, handleTouchStart, activeListener); + col.container[method](app.touchEvents.move, handleTouchMove, activeListener); + col.container[method](app.touchEvents.end, handleTouchEnd, activeListener); + col.items[method]('click', handleClick); + }; + col.destroyEvents = function () { + col.initEvents(true); + }; + + col.container[0].f7DestroyPickerCol = function () { + col.destroyEvents(); + }; + + col.initEvents(); + + }; + p.destroyPickerCol = function (colContainer) { + colContainer = $(colContainer); + if ('f7DestroyPickerCol' in colContainer[0]) colContainer[0].f7DestroyPickerCol(); + }; + // Resize cols + function resizeCols() { + if (!p.opened) return; + for (var i = 0; i < p.cols.length; i++) { + if (!p.cols[i].divider) { + p.cols[i].calcSize(); + p.cols[i].setValue(p.cols[i].value, 0, false); + } + } + } + app.onResize(resizeCols); + + // HTML Layout + p.columnHTML = function (col, onlyItems) { + var columnItemsHTML = ''; + var columnHTML = ''; + if (col.divider) { + columnHTML += '
                                                      ' + col.content + '
                                                      '; + } + else { + for (var j = 0; j < col.values.length; j++) { + columnItemsHTML += '
                                                      ' + (col.displayValues ? col.displayValues[j] : col.values[j]) + '
                                                      '; + } + columnHTML += '
                                                      ' + columnItemsHTML + '
                                                      '; + } + return onlyItems ? columnItemsHTML : columnHTML; + }; + p.layout = function () { + var pickerHTML = ''; + var pickerClass = ''; + var i; + p.cols = []; + var colsHTML = ''; + for (i = 0; i < p.params.cols.length; i++) { + var col = p.params.cols[i]; + colsHTML += p.columnHTML(p.params.cols[i]); + p.cols.push(col); + } + pickerClass = 'picker-modal picker-columns ' + (p.params.cssClass || '') + (p.params.rotateEffect ? ' picker-3d' : ''); + pickerHTML = + '
                                                      ' + + (p.params.toolbar ? p.params.toolbarTemplate.replace(/{{closeText}}/g, p.params.toolbarCloseText) : '') + + '
                                                      ' + + colsHTML + + '
                                                      ' + + '
                                                      ' + + '
                                                      '; + + p.pickerHTML = pickerHTML; + }; + + // Input Events + function openOnInput(e) { + e.preventDefault(); + if (p.opened) return; + p.open(); + if (p.params.scrollToInput && !isPopover()) { + var pageContent = p.input.parents('.page-content'); + if (pageContent.length === 0) return; + + var paddingTop = parseInt(pageContent.css('padding-top'), 10), + paddingBottom = parseInt(pageContent.css('padding-bottom'), 10), + pageHeight = pageContent[0].offsetHeight - paddingTop - p.container.height(), + pageScrollHeight = pageContent[0].scrollHeight - paddingTop - p.container.height(), + newPaddingBottom; + var inputTop = p.input.offset().top - paddingTop + p.input[0].offsetHeight; + if (inputTop > pageHeight) { + var scrollTop = pageContent.scrollTop() + inputTop - pageHeight; + if (scrollTop + pageHeight > pageScrollHeight) { + newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom; + if (pageHeight === pageScrollHeight) { + newPaddingBottom = p.container.height(); + } + pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'}); + } + pageContent.scrollTop(scrollTop, 300); + } + } + } + function closeOnHTMLClick(e) { + if (inPopover()) return; + if (p.input && p.input.length > 0) { + if (e.target !== p.input[0] && $(e.target).parents('.picker-modal').length === 0) p.close(); + } + else { + if ($(e.target).parents('.picker-modal').length === 0) p.close(); + } + } + + if (p.params.input) { + p.input = $(p.params.input); + if (p.input.length > 0) { + if (p.params.inputReadOnly) p.input.prop('readOnly', true); + if (!p.inline) { + p.input.on('click', openOnInput); + } + if (p.params.inputReadOnly) { + p.input.on('focus mousedown', function (e) { + e.preventDefault(); + }); + } + } + + } + + if (!p.inline && p.params.closeByOutsideClick) $('html').on('click', closeOnHTMLClick); + + // Open + function onPickerClose() { + p.opened = false; + if (p.input && p.input.length > 0) { + p.input.parents('.page-content').css({'padding-bottom': ''}); + if (app.params.material) p.input.trigger('blur'); + } + if (p.params.onClose) p.params.onClose(p); + + // Destroy events + p.container.find('.picker-items-col').each(function () { + p.destroyPickerCol(this); + }); + } + + p.opened = false; + p.open = function () { + var toPopover = isPopover(); + + if (!p.opened) { + + // Layout + p.layout(); + + // Append + if (toPopover) { + p.pickerHTML = '
                                                      ' + p.pickerHTML + '
                                                      '; + p.popover = app.popover(p.pickerHTML, p.params.input, true); + p.container = $(p.popover).find('.picker-modal'); + $(p.popover).on('popover:close', function () { + onPickerClose(); + }); + } + else if (p.inline) { + p.container = $(p.pickerHTML); + p.container.addClass('picker-modal-inline'); + $(p.params.container).append(p.container); + } + else { + p.container = $(app.pickerModal(p.pickerHTML)); + $(p.container) + .on('picker:close', function () { + onPickerClose(); + }); + } + + // Store picker instance + p.container[0].f7Picker = p; + + // Init Events + p.container.find('.picker-items-col').each(function () { + var updateItems = true; + if ((!p.initialized && p.params.value) || (p.initialized && p.value)) updateItems = false; + p.initPickerCol(this, updateItems); + }); + + // Set value + if (!p.initialized) { + if (p.value) p.setValue(p.value, 0); + else if (p.params.value) { + p.setValue(p.params.value, 0); + } + } + else { + if (p.value) p.setValue(p.value, 0); + } + + // Material Focus + if (p.input && p.input.length > 0 && app.params.material) { + p.input.trigger('focus'); + } + } + + // Set flag + p.opened = true; + p.initialized = true; + + if (p.params.onOpen) p.params.onOpen(p); + }; + + // Close + p.close = function () { + if (!p.opened || p.inline) return; + if (inPopover()) { + app.closeModal(p.popover); + return; + } + else { + app.closeModal(p.container); + return; + } + }; + + // Destroy + p.destroy = function () { + p.close(); + if (p.params.input && p.input.length > 0) { + p.input.off('click focus', openOnInput); + } + $('html').off('click', closeOnHTMLClick); + app.offResize(resizeCols); + }; + + if (p.inline) { + p.open(); + } + else { + if (!p.initialized && p.params.value) p.setValue(p.params.value); + } + + return p; +}; +app.picker = function (params) { + return new Picker(params); +}; diff --git a/bower_components/framework7/src/js/framework7/plugins.js b/bower_components/framework7/src/js/framework7/plugins.js new file mode 100644 index 00000000..cba0f2cf --- /dev/null +++ b/bower_components/framework7/src/js/framework7/plugins.js @@ -0,0 +1,40 @@ +/*======================================= +************ Plugins API ************ +=======================================*/ +var _plugins = []; +app.initPlugins = function () { + // Initialize plugins + for (var plugin in app.plugins) { + var p = app.plugins[plugin](app, app.params[plugin]); + if (p) _plugins.push(p); + } +}; +// Plugin Hooks +app.pluginHook = function (hook) { + for (var i = 0; i < _plugins.length; i++) { + if (_plugins[i].hooks && hook in _plugins[i].hooks) { + _plugins[i].hooks[hook](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); + } + } +}; +// Prevented by plugin +app.pluginPrevent = function (action) { + var prevent = false; + for (var i = 0; i < _plugins.length; i++) { + if (_plugins[i].prevents && action in _plugins[i].prevents) { + if (_plugins[i].prevents[action](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5])) prevent = true; + } + } + return prevent; +}; +// Preprocess content by plugin +app.pluginProcess = function (process, data) { + var processed = data; + for (var i = 0; i < _plugins.length; i++) { + if (_plugins[i].preprocess && process in _plugins[i].preprocess) { + processed = _plugins[i].preprocess[process](data, arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]); + } + } + return processed; +}; + diff --git a/bower_components/framework7/src/js/framework7/progressbar.js b/bower_components/framework7/src/js/framework7/progressbar.js new file mode 100644 index 00000000..ee787777 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/progressbar.js @@ -0,0 +1,78 @@ +/*=============================================================================== +************ Progress Bar ************ +===============================================================================*/ +app.setProgressbar = function (container, progress, speed) { + container = $(container || app.root); + if (container.length === 0) return; + if (progress) progress = Math.min(Math.max(progress, 0), 100); + var progressbar; + if (container.hasClass('progressbar')) progressbar = container; + else { + progressbar = container.children('.progressbar'); + } + if (progressbar.length === 0 || progressbar.hasClass('progressbar-infinite')) return; + var clientLeft = progressbar[0].clientLeft; + progressbar.children('span').transform('translate3d(' + (-100 + progress) + '%,0,0)'); + if (typeof speed !== 'undefined') { + progressbar.children('span').transition(speed); + } + else { + progressbar.children('span').transition(''); + } + return progressbar[0]; +}; +app.showProgressbar = function (container, progress, color) { + if (typeof container === 'number') { + container = app.root; + progress = arguments[0]; + color = arguments[1]; + } + if (progress && typeof progress === 'string' && parseFloat(progress) !== progress * 1) { + color = progress; + progress = undefined; + } + container = $(container || app.root); + if (container.length === 0) return; + var progressbar; + if (container.hasClass('progressbar')) progressbar = container; + else { + progressbar = container.children('.progressbar:not(.progressbar-out), .progressbar-infinite:not(.progressbar-out)'); + if (progressbar.length === 0) { + // Create one + if (typeof progress !== 'undefined') { + // Determined + progressbar = $(''); + } + else { + // Infinite + progressbar = $(''); + } + container.append(progressbar); + } + } + if (progress) app.setProgressbar(container, progress); + return progressbar[0]; +}; +app.hideProgressbar = function (container) { + container = $(container || app.root); + if (container.length === 0) return; + var progressbar; + if (container.hasClass('progressbar')) progressbar = container; + else { + progressbar = container.children('.progressbar, .progressbar-infinite'); + } + if (progressbar.length === 0 || !progressbar.hasClass('progressbar-in') || progressbar.hasClass('progressbar-out')) return; + progressbar.removeClass('progressbar-in').addClass('progressbar-out').animationEnd(function () { + progressbar.remove(); + progressbar = null; + }); + return; +}; +app.initPageProgressbar = function (pageContainer) { + pageContainer = $(pageContainer); + pageContainer.find('.progressbar').each(function () { + var p = $(this); + if (p.children('span').length === 0) p.append(''); + if (p.attr('data-progress')) app.setProgressbar(p, p.attr('data-progress')); + }); +}; \ No newline at end of file diff --git a/bower_components/framework7/src/js/framework7/proto-device.js b/bower_components/framework7/src/js/framework7/proto-device.js new file mode 100644 index 00000000..a8759912 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/proto-device.js @@ -0,0 +1,112 @@ +/*=========================== +Device/OS Detection +===========================*/ +Framework7.prototype.device = (function () { + var device = {}; + var ua = navigator.userAgent; + var $ = Dom7; + + var windows = ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/); + var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); + var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); + var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); + var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); + + device.ios = device.android = device.windows = device.iphone = device.ipod = device.ipad = device.androidChrome = false; + + // Windows + if (windows) { + device.os = 'windows'; + device.osVersion = windows[2]; + device.windows = true; + } + // Android + if (android && !windows) { + device.os = 'android'; + device.osVersion = android[2]; + device.android = true; + device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0; + } + if (ipad || iphone || ipod) { + device.os = 'ios'; + device.ios = true; + } + // iOS + if (iphone && !ipod) { + device.osVersion = iphone[2].replace(/_/g, '.'); + device.iphone = true; + } + if (ipad) { + device.osVersion = ipad[2].replace(/_/g, '.'); + device.ipad = true; + } + if (ipod) { + device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null; + device.iphone = true; + } + // iOS 8+ changed UA + if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) { + if (device.osVersion.split('.')[0] === '10') { + device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0]; + } + } + + // Webview + device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i); + + // Minimal UI + if (device.os && device.os === 'ios') { + var osVersionArr = device.osVersion.split('.'); + device.minimalUi = !device.webView && + (ipod || iphone) && + (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7) && + $('meta[name="viewport"]').length > 0 && $('meta[name="viewport"]').attr('content').indexOf('minimal-ui') >= 0; + } + + // Check for status bar and fullscreen app mode + var windowWidth = $(window).width(); + var windowHeight = $(window).height(); + + device.needsStatusBar = function () { + if (device.webView && (windowWidth * windowHeight === screen.width * screen.height)) { + return true; + } + return false; + }; + device.statusBar = device.needsStatusBar(); + + // Classes + var classNames = []; + + // Pixel Ratio + device.pixelRatio = window.devicePixelRatio || 1; + classNames.push('pixel-ratio-' + Math.floor(device.pixelRatio)); + if (device.pixelRatio >= 2) { + classNames.push('retina'); + } + + // OS classes + if (device.os) { + classNames.push(device.os, device.os + '-' + device.osVersion.split('.')[0], device.os + '-' + device.osVersion.replace(/\./g, '-')); + if (device.os === 'ios') { + var major = parseInt(device.osVersion.split('.')[0], 10); + for (var i = major - 1; i >= 6; i--) { + classNames.push('ios-gt-' + i); + } + } + + } + // Status bar classes + if (device.statusBar) { + classNames.push('with-statusbar-overlay'); + } + else { + $('html').removeClass('with-statusbar-overlay'); + } + + // Add html classes + if (classNames.length > 0) $('html').addClass(classNames.join(' ')); + + // Export object + return device; +})(); diff --git a/bower_components/framework7/src/js/framework7/proto-plugins.js b/bower_components/framework7/src/js/framework7/proto-plugins.js new file mode 100644 index 00000000..a1bf4cea --- /dev/null +++ b/bower_components/framework7/src/js/framework7/proto-plugins.js @@ -0,0 +1,4 @@ +/*=========================== +Plugins prototype +===========================*/ +Framework7.prototype.plugins = {}; diff --git a/bower_components/framework7/src/js/framework7/proto-support.js b/bower_components/framework7/src/js/framework7/proto-support.js new file mode 100644 index 00000000..98f8dfd0 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/proto-support.js @@ -0,0 +1,23 @@ +/*=========================== +Features Support Detection +===========================*/ +Framework7.prototype.support = (function () { + var support = { + touch: !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch), + passiveListener: (function () { + var supportsPassive = false; + try { + var opts = Object.defineProperty({}, 'passive', { + get: function() { + supportsPassive = true; + } + }); + window.addEventListener('testPassiveListener', null, opts); + } catch (e) {} + return supportsPassive; + })() + }; + + // Export object + return support; +})(); diff --git a/bower_components/framework7/src/js/framework7/pull-to-refresh.js b/bower_components/framework7/src/js/framework7/pull-to-refresh.js new file mode 100644 index 00000000..4372ae72 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/pull-to-refresh.js @@ -0,0 +1,225 @@ +/*====================================================== +************ Pull To Refresh ************ +======================================================*/ +app.initPullToRefresh = function (pageContainer) { + var eventsTarget = $(pageContainer); + if (!eventsTarget.hasClass('pull-to-refresh-content')) { + eventsTarget = eventsTarget.find('.pull-to-refresh-content'); + } + if (!eventsTarget || eventsTarget.length === 0) return; + + var touchId, isTouched, isMoved, touchesStart = {}, isScrolling, touchesDiff, touchStartTime, container, refresh = false, useTranslate = false, startTranslate = 0, translate, scrollTop, wasScrolled, layer, triggerDistance, dynamicTriggerDistance, pullStarted; + var page = eventsTarget.hasClass('page') ? eventsTarget : eventsTarget.parents('.page'); + var hasNavbar = false; + if (page.find('.navbar').length > 0 || page.parents('.navbar-fixed, .navbar-through').length > 0 || page.hasClass('navbar-fixed') || page.hasClass('navbar-through')) hasNavbar = true; + if (page.hasClass('no-navbar')) hasNavbar = false; + if (!hasNavbar) eventsTarget.addClass('pull-to-refresh-no-navbar'); + + container = eventsTarget; + + // Define trigger distance + if (container.attr('data-ptr-distance')) { + dynamicTriggerDistance = true; + } + else { + triggerDistance = 44; + } + + function handleTouchStart(e) { + if (isTouched) { + if (app.device.os === 'android') { + if ('targetTouches' in e && e.targetTouches.length > 1) return; + } + else return; + } + + /*jshint validthis:true */ + container = $(this); + if (container.hasClass('refreshing')) { + return; + } + + isMoved = false; + pullStarted = false; + isTouched = true; + isScrolling = undefined; + wasScrolled = undefined; + if (e.type === 'touchstart') touchId = e.targetTouches[0].identifier; + touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = (new Date()).getTime(); + + } + + function handleTouchMove(e) { + if (!isTouched) return; + var pageX, pageY, touch; + if (e.type === 'touchmove') { + if (touchId && e.touches) { + for (var i = 0; i < e.touches.length; i++) { + if (e.touches[i].identifier === touchId) { + touch = e.touches[i]; + } + } + } + if (!touch) touch = e.targetTouches[0]; + pageX = touch.pageX; + pageY = touch.pageY; + } + else { + pageX = e.pageX; + pageY = e.pageY; + } + if (!pageX || !pageY) return; + + + if (typeof isScrolling === 'undefined') { + isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x)); + } + if (!isScrolling) { + isTouched = false; + return; + } + + scrollTop = container[0].scrollTop; + if (typeof wasScrolled === 'undefined' && scrollTop !== 0) wasScrolled = true; + + if (!isMoved) { + /*jshint validthis:true */ + container.removeClass('transitioning'); + if (scrollTop > container[0].offsetHeight) { + isTouched = false; + return; + } + if (dynamicTriggerDistance) { + triggerDistance = container.attr('data-ptr-distance'); + if (triggerDistance.indexOf('%') >= 0) triggerDistance = container[0].offsetHeight * parseInt(triggerDistance, 10) / 100; + } + startTranslate = container.hasClass('refreshing') ? triggerDistance : 0; + if (container[0].scrollHeight === container[0].offsetHeight || app.device.os !== 'ios') { + useTranslate = true; + } + else { + useTranslate = false; + } + } + isMoved = true; + touchesDiff = pageY - touchesStart.y; + + if (touchesDiff > 0 && scrollTop <= 0 || scrollTop < 0) { + // iOS 8 fix + if (app.device.os === 'ios' && parseInt(app.device.osVersion.split('.')[0], 10) > 7 && scrollTop === 0 && !wasScrolled) useTranslate = true; + + if (useTranslate) { + e.preventDefault(); + translate = (Math.pow(touchesDiff, 0.85) + startTranslate); + container.transform('translate3d(0,' + translate + 'px,0)'); + } + if ((useTranslate && Math.pow(touchesDiff, 0.85) > triggerDistance) || (!useTranslate && touchesDiff >= triggerDistance * 2)) { + refresh = true; + container.addClass('pull-up').removeClass('pull-down'); + } + else { + refresh = false; + container.removeClass('pull-up').addClass('pull-down'); + } + if (!pullStarted) { + container.trigger('pullstart ptr:pullstart'); + pullStarted = true; + } + container.trigger('pullmove ptr:pullmove', { + event: e, + scrollTop: scrollTop, + translate: translate, + touchesDiff: touchesDiff + }); + } + else { + pullStarted = false; + container.removeClass('pull-up pull-down'); + refresh = false; + return; + } + } + function handleTouchEnd(e) { + if (e.type === 'touchend' && e.changedTouches && e.changedTouches.length > 0 && touchId) { + if (e.changedTouches[0].identifier !== touchId) return; + } + if (!isTouched || !isMoved) { + isTouched = false; + isMoved = false; + return; + } + if (translate) { + container.addClass('transitioning'); + translate = 0; + } + container.transform(''); + if (refresh) { + container.addClass('refreshing'); + container.trigger('refresh ptr:refresh', { + done: function () { + app.pullToRefreshDone(container); + } + }); + } + else { + container.removeClass('pull-down'); + } + isTouched = false; + isMoved = false; + if (pullStarted) container.trigger('pullend ptr:pullend'); + } + + // Attach Events + var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false; + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + eventsTarget.on(app.touchEvents.start, handleTouchStart, passiveListener); + eventsTarget.on(app.touchEvents.move, handleTouchMove, activeListener); + eventsTarget.on(app.touchEvents.end, handleTouchEnd, passiveListener); + + // Detach Events on page remove + if (page.length === 0) return; + function destroyPullToRefresh(destroyTarget) { + destroyTarget.off(app.touchEvents.start, handleTouchStart, passiveListener); + destroyTarget.off(app.touchEvents.move, handleTouchMove, activeListener); + destroyTarget.off(app.touchEvents.end, handleTouchEnd, passiveListener); + } + for (var i = 0; i < eventsTarget.length; i++) { + eventsTarget[i].f7DestroyPullToRefresh = destroyPullToRefresh; + } + function detachEvents() { + destroyPullToRefresh(eventsTarget); + page.off('page:beforeremove', detachEvents); + } + page.on('page:beforeremove', detachEvents); + +}; + +app.pullToRefreshDone = function (container) { + container = $(container); + if (container.length === 0) container = $('.pull-to-refresh-content.refreshing'); + container.removeClass('refreshing').addClass('transitioning'); + container.transitionEnd(function () { + container.removeClass('transitioning pull-up pull-down'); + container.trigger('refreshdone ptr:done'); + }); +}; +app.pullToRefreshTrigger = function (container) { + container = $(container); + if (container.length === 0) container = $('.pull-to-refresh-content'); + if (container.hasClass('refreshing')) return; + container.addClass('transitioning refreshing'); + container.trigger('refresh ptr:refresh', { + done: function () { + app.pullToRefreshDone(container); + } + }); +}; + +app.destroyPullToRefresh = function (pageContainer) { + pageContainer = $(pageContainer); + var pullToRefreshContent = pageContainer.hasClass('pull-to-refresh-content') ? pageContainer : pageContainer.find('.pull-to-refresh-content'); + if (pullToRefreshContent.length === 0) return; + if (pullToRefreshContent[0].f7DestroyPullToRefresh) pullToRefreshContent[0].f7DestroyPullToRefresh(pageContainer); +}; diff --git a/bower_components/framework7/src/js/framework7/push-state.js b/bower_components/framework7/src/js/framework7/push-state.js new file mode 100644 index 00000000..0ef403c0 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/push-state.js @@ -0,0 +1,112 @@ +/*====================================================== +************ Handle Browser's History ************ +======================================================*/ +app.pushStateQueue = []; +app.pushStateClearQueue = function () { + if (app.pushStateQueue.length === 0) return; + var queue = app.pushStateQueue.pop(); + var animatePages; + if (app.params.pushStateNoAnimation === true) animatePages = false; + if (queue.action === 'back') { + app.router.back(queue.view, {animatePages: animatePages}); + } + if (queue.action === 'loadPage') { + app.router.load(queue.view, {url: queue.stateUrl, animatePages: animatePages, pushState: false}); + } + if (queue.action === 'loadContent') { + app.router.load(queue.view, {content: queue.stateContent, animatePages: animatePages, pushState: false}); + } + if (queue.action === 'loadPageName') { + app.router.load(queue.view, {pageName: queue.statePageName, url: queue.stateUrl, animatePages: animatePages, pushState: false}); + } +}; + +app.initPushState = function () { + var blockPopstate = true; + $(window).on('load', function () { + setTimeout(function () { + blockPopstate = false; + }, 0); + }); + + if (document.readyState && document.readyState === 'complete') { + blockPopstate = false; + } + + function handlePopState(e) { + if (blockPopstate) return; + var mainView = app.mainView; + if (!mainView) return; + var state = e.state; + if (!state) { + state = { + viewIndex: app.views.indexOf(mainView), + url : mainView.history[0] + }; + } + if (state.viewIndex < 0) return; + var view = app.views[state.viewIndex]; + var stateUrl = state && state.url || undefined; + var stateContent = state && state.content || undefined; + var statePageName = state && state.pageName || undefined; + var animatePages; + + if (app.params.pushStateNoAnimation === true) animatePages = false; + + if (stateUrl !== view.url) { + if (view.history.indexOf(stateUrl) >= 0) { + // Go Back + if (view.allowPageChange) { + app.router.back(view, {url:undefined, animatePages: animatePages, pushState: false, preloadOnly:false}); + } + else { + app.pushStateQueue.push({ + action: 'back', + view: view + }); + } + } + else if (stateContent) { + // Load Page + if (view.allowPageChange) { + app.router.load(view, {content:stateContent, animatePages: animatePages, pushState: false}); + } + else { + app.pushStateQueue.unshift({ + action: 'loadContent', + stateContent: stateContent, + view: view + }); + } + + } + else if (statePageName) { + // Load Page by page name with Dom Cache + if (view.allowPageChange) { + app.router.load(view, {pageName:statePageName, url: stateUrl, animatePages: animatePages, pushState: false}); + } + else { + app.pushStateQueue.unshift({ + action: 'loadPageName', + statePageName: statePageName, + view: view + }); + } + } + else { + // Load Page + if (view.allowPageChange) { + app.router.load(view, {url:stateUrl, animatePages: animatePages, pushState: false}); + } + else { + app.pushStateQueue.unshift({ + action: 'loadPage', + stateUrl: stateUrl, + view: view + }); + } + } + } + } + $(window).on('popstate', handlePopState); +}; diff --git a/bower_components/framework7/src/js/framework7/resize.js b/bower_components/framework7/src/js/framework7/resize.js new file mode 100644 index 00000000..e75e7278 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/resize.js @@ -0,0 +1,49 @@ +/*====================================================== +************ App Resize Actions ************ +======================================================*/ +// Prevent iPad horizontal body scrolling when soft keyboard is opened +function _fixIpadBodyScrolLeft() { + if (app.device.ipad) { + document.body.scrollLeft = 0; + setTimeout(function () { + document.body.scrollLeft = 0; + }, 0); + } +} +var appResizeCallbacks = []; +app.getSize = function () { + var offset = app.root.offset(); + app.width = app.root[0].offsetWidth; + app.height = app.root[0].offsetHeight; + app.left = offset.left; + app.top = offset.top; +}; +app.onResize = function (callback) { + appResizeCallbacks.push(callback); +}; +app.offResize = function (callback) { + for (var i = 0; i < appResizeCallbacks.length; i++) { + if (appResizeCallbacks[i] === callback) { + appResizeCallbacks.splice(i, 1); + } + } +}; +app.resize = function () { + _fixIpadBodyScrolLeft(); + app.getSize(); + if (app.sizeNavbars) app.sizeNavbars(); + for (var i = 0; i < appResizeCallbacks.length; i++) { + appResizeCallbacks[i](); + } +}; +app.orientationchange = function () { + if (app.device && app.device.minimalUi) { + if (window.orientation === 90 || window.orientation === -90) document.body.scrollTop = 0; + } + _fixIpadBodyScrolLeft(); +}; +app.initResize = function () { + $(window).on('resize', app.resize); + $(window).on('orientationchange', app.orientationchange); + app.getSize(); +}; diff --git a/bower_components/framework7/src/js/framework7/router.js b/bower_components/framework7/src/js/framework7/router.js new file mode 100644 index 00000000..ddabe310 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/router.js @@ -0,0 +1,1296 @@ +/*====================================================== +************ Navigation / Router ************ +======================================================*/ +app.router = { + _remove: function (el) { + if (app.params.routerRemoveTimeout || app.params.routerRemoveWithTimeout) { + setTimeout(function () { + $(el).remove(); + }, 0); + } + else $(el).remove(); + }, + _modalsSelector: '.popup, .modal, .popover, .actions-modal, .picker-modal, .login-screen', + // Temporary DOM Element + temporaryDom: document.createElement('div'), + + // Find page or navbar in passed container which are related to View + findElement: function (selector, container, view, notCached) { + container = $(container); + if (notCached) selector = selector + ':not(.cached)'; + var found = container.find(selector).filter(function (index, el) { + return $(el).parents(app.router._modalsSelector).length === 0; + }); + if (found.length > 1) { + if (typeof view.selector === 'string') { + // Search in related view + found = container.find(view.selector + ' ' + selector); + } + if (found.length > 1) { + // Search in main view + found = container.find('.' + app.params.viewMainClass + ' ' + selector); + } + } + if (found.length === 1) return found; + else { + // Try to find non cached + if (!notCached) found = app.router.findElement(selector, container, view, true); + if (found && found.length === 1) return found; + if (found && found.length > 1) return $(found[0]); + else return undefined; + } + }, + + // Set pages classes for animationEnd + animatePages: function (leftPage, rightPage, direction) { + // Loading new page + var removeClasses = 'page-on-center page-on-right page-on-left'; + if (direction === 'to-left') { + leftPage.removeClass(removeClasses).addClass('page-from-center-to-left'); + rightPage.removeClass(removeClasses).addClass('page-from-right-to-center'); + } + // Go back + if (direction === 'to-right') { + leftPage.removeClass(removeClasses).addClass('page-from-left-to-center'); + rightPage.removeClass(removeClasses).addClass('page-from-center-to-right'); + + } + }, + + // Prepare navbar before animarion + prepareNavbar: function (newNavbarInner, oldNavbarInner, newNavbarPosition) { + $(newNavbarInner).find('.sliding').each(function () { + var sliding = $(this); + var slidingOffset = newNavbarPosition === 'right' ? this.f7NavbarRightOffset : this.f7NavbarLeftOffset; + + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) { + sliding.find('.back .icon').transform('translate3d(' + (-slidingOffset) + 'px,0,0)'); + } + } + sliding.transform('translate3d(' + slidingOffset + 'px,0,0)'); + }); + }, + + // Set navbars classes for animation + animateNavbars: function (leftNavbarInner, rightNavbarInner, direction) { + // Loading new page + var removeClasses = 'navbar-on-right navbar-on-center navbar-on-left'; + if (direction === 'to-left') { + rightNavbarInner.removeClass(removeClasses).addClass('navbar-from-right-to-center'); + rightNavbarInner.find('.sliding').each(function () { + var sliding = $(this); + sliding.transform('translate3d(0px,0,0)'); + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) { + sliding.find('.back .icon').transform('translate3d(0px,0,0)'); + } + } + }); + + leftNavbarInner.removeClass(removeClasses).addClass('navbar-from-center-to-left'); + leftNavbarInner.find('.sliding').each(function () { + var sliding = $(this); + var rightText; + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('center') && rightNavbarInner.find('.sliding.left .back .icon').length > 0) { + rightText = rightNavbarInner.find('.sliding.left .back span'); + if (rightText.length > 0) this.f7NavbarLeftOffset += rightText[0].offsetLeft; + } + if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) { + sliding.find('.back .icon').transform('translate3d(' + (-this.f7NavbarLeftOffset) + 'px,0,0)'); + } + } + sliding.transform('translate3d(' + (this.f7NavbarLeftOffset) + 'px,0,0)'); + }); + } + // Go back + if (direction === 'to-right') { + leftNavbarInner.removeClass(removeClasses).addClass('navbar-from-left-to-center'); + leftNavbarInner.find('.sliding').each(function () { + var sliding = $(this); + sliding.transform('translate3d(0px,0,0)'); + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) { + sliding.find('.back .icon').transform('translate3d(0px,0,0)'); + } + } + }); + + rightNavbarInner.removeClass(removeClasses).addClass('navbar-from-center-to-right'); + rightNavbarInner.find('.sliding').each(function () { + var sliding = $(this); + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && sliding.find('.back .icon').length > 0) { + sliding.find('.back .icon').transform('translate3d(' + (-this.f7NavbarRightOffset) + 'px,0,0)'); + } + } + sliding.transform('translate3d(' + (this.f7NavbarRightOffset) + 'px,0,0)'); + }); + } + }, + + preprocess: function(view, content, url, next) { + // Plugin hook + app.pluginHook('routerPreprocess', view, content, url, next); + + // Preprocess by plugin + content = app.pluginProcess('preprocess', content); + + if (view && view.params && view.params.preprocess) { + content = view.params.preprocess(content, url, next); + if (typeof content !== 'undefined') { + next(content); + } + } + else if (app.params.preprocess) { + content = app.params.preprocess(content, url, next); + if (typeof content !== 'undefined') { + next(content); + } + } + else { + next(content); + } + }, + preroute: function(view, options, isBack) { + if (isBack) options.isBack = true; + app.pluginHook('routerPreroute', view, options); + if ((app.params.preroute && app.params.preroute(view, options) === false) || (view && view.params.preroute && view.params.preroute(view, options) === false)) { + return true; + } + else { + return false; + } + }, + + template7Render: function (view, options) { + var url = options.url, + content = options.content, //initial content + t7_rendered_content = options.content, // will be rendered using Template7 + context = options.context, // Context data for Template7 + contextName = options.contextName, + template = options.template; // Template 7 compiled template + + var t7_ctx, t7_template; + if (typeof content === 'string') { + if (url) { + if (app.template7Cache[url] && !options.ignoreCache) t7_template = t7.cache[url]; + else { + t7_template = t7.compile(content); + t7.cache[url] = t7_template; + } + } + else t7_template = t7.compile(content); + } + else if (template) { + t7_template = template; + } + + if (context) { + t7_ctx = context; + if (context && url) { + view.contextCache[url] = context; + } + } + else { + if (contextName) { + if (contextName.indexOf('.') >= 0) { + var _ctx_path = contextName.split('.'); + var _ctx = t7.data[_ctx_path[0]]; + for (var i = 1; i < _ctx_path.length; i++) { + if (_ctx_path[i]) _ctx = _ctx[_ctx_path[i]]; + } + t7_ctx = _ctx; + } + else t7_ctx = t7.data[contextName]; + } + if (!t7_ctx && url) { + t7_ctx = t7.data['url:' + url]; + } + if (!t7_ctx && typeof content === 'string' && !template) { + //try to find by page name in content + var pageNameMatch = content.match(/(data-page=["'][^"^']*["'])/); + if (pageNameMatch) { + var page = pageNameMatch[0].split('data-page=')[1].replace(/['"]/g, ''); + if (page) t7_ctx = t7.data['page:' + page]; + } + } + if (!t7_ctx && template && t7.templates) { + // Try to find matched template name in t7.templates + for (var templateName in t7.templates) { + if (t7.templates[templateName] === template) t7_ctx = t7.data[templateName]; + } + } + if (!t7_ctx && url && url in view.contextCache) { + t7_ctx = view.contextCache[url]; + } + if (!t7_ctx) { + t7_ctx = {}; + } + } + + if (t7_template && t7_ctx) { + if (typeof t7_ctx === 'function') t7_ctx = t7_ctx(); + if (url) { + // Extend data with URL query + var query = $.parseUrlQuery(url); + t7_ctx.url_query = {}; + for (var key in query) { + t7_ctx.url_query[key] = query[key]; + } + } + try { + t7_rendered_content = t7_template(t7_ctx); + } + catch (e) { + t7_rendered_content = ''; + if (window.console && window.console.error) { + console.error(e); + } + } + } + + return {content: t7_rendered_content, context: t7_ctx}; + } +}; + + +app.router._load = function (view, options) { + // Plugin hook + app.pluginHook('routerLoad', view, options); + + var url = options.url, + content = options.content, //initial content + t7_rendered = {content: options.content}, + template = options.template, // Template 7 compiled template + pageName = options.pageName, + viewContainer = $(view.container), + pagesContainer = $(view.pagesContainer), + animatePages = options.animatePages, + newPage, oldPage, pagesInView, i, oldNavbarInner, newNavbarInner, navbar, dynamicNavbar, reloadPosition, + isDynamicPage = typeof url === 'undefined' && content || template, + pushState = options.pushState, + pageElement = options.pageElement; + + if (typeof animatePages === 'undefined') animatePages = view.params.animatePages; + + // Render with Template7 + if (app.params.template7Pages && typeof content === 'string' || template) { + t7_rendered = app.router.template7Render(view, options); + if (t7_rendered.content && !content) { + content = t7_rendered.content; + } + } + + app.router.temporaryDom.innerHTML = ''; + + // Parse DOM + if (!pageName && !pageElement) { + if ((typeof content === 'string') || (url && (typeof content === 'string'))) { + app.router.temporaryDom.innerHTML = t7_rendered.content; + } else { + if ('length' in content && content.length > 1) { + for (var ci = 0; ci < content.length; ci++) { + $(app.router.temporaryDom).append(content[ci]); + } + } else { + $(app.router.temporaryDom).append(content); + } + } + } + + // Reload position + reloadPosition = options.reload && (options.reloadPrevious ? 'left' : 'center'); + + // Find new page + if (pageName) newPage = pagesContainer.find('.page[data-page="' + pageName + '"]'); + else { + if (pageElement) newPage = $(pageElement); + else newPage = app.router.findElement('.page', app.router.temporaryDom, view); + } + // If page not found exit + if (!newPage || newPage.length === 0 || (pageName && view.activePage && view.activePage.name === pageName)) { + view.allowPageChange = true; + return; + } + + newPage.addClass(options.reload ? 'page-on-' + reloadPosition : 'page-on-right'); + + // Find old page (should be the last one) and remove older pages + pagesInView = pagesContainer.children('.page:not(.cached)'); + if (pageElement) { + pagesInView = pagesInView.filter(function (index, page) { + if (page !== pageElement) return page; + }); + } + + if (options.reload && options.reloadPrevious && pagesInView.length === 1) { + view.allowPageChange = true; + return; + } + + if (options.reload) { + oldPage = pagesInView.eq(pagesInView.length - 1); + } + else { + if (pagesInView.length > 1) { + for (i = 0; i < pagesInView.length - 2; i++) { + if (!view.params.domCache) { + app.pageRemoveCallback(view, pagesInView[i], 'left'); + app.router._remove(pagesInView[i]); + } + else { + $(pagesInView[i]).addClass('cached'); + } + } + if (!view.params.domCache) { + app.pageRemoveCallback(view, pagesInView[i], 'left'); + app.router._remove(pagesInView[i]); + } + else { + $(pagesInView[i]).addClass('cached'); + } + } + oldPage = pagesContainer.children('.page:not(.cached)'); + } + if (pageElement && oldPage.length > 1) { + oldPage = oldPage.filter(function (index, page) { + if (page !== pageElement) return page; + }); + } + if(view.params.domCache || pageElement) newPage.removeClass('cached'); + + // Dynamic navbar + if (view.params.dynamicNavbar) { + dynamicNavbar = true; + // Find navbar + if (pageName) { + newNavbarInner = viewContainer.find('.navbar-inner[data-page="' + pageName + '"]'); + } + else { + newNavbarInner = app.router.findElement('.navbar-inner', app.router.temporaryDom, view); + } + if (!newNavbarInner || newNavbarInner.length === 0) { + // Look in page + newNavbarInner = newPage.find('.navbar-inner'); + if (!newNavbarInner || newNavbarInner.length === 0) { + // Set false + dynamicNavbar = false; + } + else { + if (newNavbarInner.parent('.navbar').length > 0) { + newNavbarInner.prependTo(newPage); + } + } + } + if (dynamicNavbar && newPage.find('.navbar').length > 0) { + app.router._remove(newPage.find('.navbar').filter(function(index, el){ + return $(el).parents(app.router._modalsSelector).length === 0; + })); + } + navbar = viewContainer.children('.navbar'); + if (options.reload) { + oldNavbarInner = navbar.find('.navbar-inner:not(.cached):last-child'); + } + else { + oldNavbarInner = navbar.find('.navbar-inner:not(.cached)'); + + if (oldNavbarInner.length > 0) { + for (i = 0; i < oldNavbarInner.length - 1; i++) { + if (!view.params.domCache) { + app.navbarRemoveCallback(view, pagesInView[i], navbar[0], oldNavbarInner[i]); + app.router._remove(oldNavbarInner[i]); + } + else + $(oldNavbarInner[i]).addClass('cached'); + } + if (!newNavbarInner && oldNavbarInner.length === 1) { + if (!view.params.domCache) { + app.navbarRemoveCallback(view, pagesInView[0], navbar[0], oldNavbarInner[0]); + app.router._remove(oldNavbarInner[0]); + } + else + $(oldNavbarInner[0]).addClass('cached'); + } + oldNavbarInner = navbar.find('.navbar-inner:not(.cached)'); + } + } + } + if (dynamicNavbar) { + newNavbarInner.addClass(options.reload ? 'navbar-on-' + reloadPosition : 'navbar-on-right'); + if(view.params.domCache || pageElement) newNavbarInner.removeClass('cached'); + newPage[0].f7RelatedNavbar = newNavbarInner[0]; + newNavbarInner[0].f7RelatedPage = newPage[0]; + } + + // save content areas into view's cache + if (!url) { + var newPageName = pageName || newPage.attr('data-page'); + if (isDynamicPage) url = '#' + app.params.dynamicPageUrl.replace(/{{name}}/g, newPageName).replace(/{{index}}/g, view.history.length - (options.reload ? 1 : 0)); + else url = '#' + newPageName; + if (!view.params.domCache) { + view.contentCache[url] = content; + } + if (view.params.domCache && pageName) { + view.pagesCache[url] = pageName; + } + } + else if (url && pageElement) { + view.pageElementsCache[url] = { + page: newPage, + navbarInner: newNavbarInner + }; + } + + // Push State + if (app.params.pushState && !options.reloadPrevious && view.main) { + if (typeof pushState === 'undefined') pushState = true; + var pushStateRoot = app.params.pushStateRoot || ''; + var method = options.reload ? 'replaceState' : 'pushState'; + if (pushState) { + if (!isDynamicPage && !pageName) { + history[method]({url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url); + } + else if (isDynamicPage && content) { + history[method]({content: typeof content === 'string' ? content : '', url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url); + } + else if (pageName) { + history[method]({pageName: pageName, url: url, viewIndex: app.views.indexOf(view)}, '', pushStateRoot + app.params.pushStateSeparator + url); + } + } + } + + // Update View history + view.url = url; + if (options.reload) { + var lastUrl = view.history[view.history.length - (options.reloadPrevious ? 2 : 1)]; + if (lastUrl && + lastUrl.indexOf('#') === 0 && + lastUrl in view.contentCache && + lastUrl !== url && + view.history.indexOf(lastUrl) === -1) { + view.contentCache[lastUrl] = null; + delete view.contentCache[lastUrl]; + } + else if (lastUrl && + lastUrl in view.pageElementsCache && + lastUrl !== url && + (view.history.indexOf(lastUrl) === -1 || view.history.indexOf(lastUrl) === view.history.length - 1)) { + view.pageElementsCache[lastUrl] = null; + delete view.pageElementsCache[lastUrl]; + } + if (lastUrl && + lastUrl in view.contextCache && + lastUrl !== url && + (view.history.indexOf(lastUrl) === -1 || view.history.indexOf(lastUrl) === view.history.length - 1)) { + view.contextCache[lastUrl] = null; + delete view.contextCache[lastUrl]; + } + view.history[view.history.length - (options.reloadPrevious ? 2 : 1)] = url; + } + else { + view.history.push(url); + } + + // Unique history + var historyBecameUnique = false; + if (view.params.uniqueHistory) { + var _history = view.history; + var _url = url; + if (view.params.uniqueHistoryIgnoreGetParameters) { + _history = []; + _url = url.split('?')[0]; + for (i = 0; i < view.history.length; i++) { + _history.push(view.history[i].split('?')[0]); + } + } + + if (_history.indexOf(_url) !== _history.lastIndexOf(_url)) { + view.history = view.history.slice(0, _history.indexOf(_url)); + view.history.push(url); + historyBecameUnique = true; + } + } + // Dom manipulations + if (options.reloadPrevious) { + oldPage = oldPage.prev('.page'); + newPage.insertBefore(oldPage); + if (dynamicNavbar) { + oldNavbarInner = oldNavbarInner.prev('.navbar-inner'); + newNavbarInner.insertAfter(oldNavbarInner); + } + } + else { + pagesContainer.append(newPage[0]); + if (dynamicNavbar) navbar.append(newNavbarInner[0]); + } + // Remove Old Page And Navbar + if (options.reload) { + if (view.params.domCache && view.initialPages.indexOf(oldPage[0]) >= 0) { + oldPage.addClass('cached'); + if (dynamicNavbar) oldNavbarInner.addClass('cached'); + } + else { + app.pageRemoveCallback(view, oldPage[0], reloadPosition); + if (dynamicNavbar) app.navbarRemoveCallback(view, oldPage[0], navbar[0], oldNavbarInner[0]); + app.router._remove(oldPage); + if (dynamicNavbar) app.router._remove(oldNavbarInner); + } + } + + // Page Init Events + app.pageInitCallback(view, { + pageContainer: newPage[0], + url: url, + position: options.reload ? reloadPosition : 'right', + navbarInnerContainer: dynamicNavbar ? newNavbarInner && newNavbarInner[0] : undefined, + oldNavbarInnerContainer: dynamicNavbar ? oldNavbarInner && oldNavbarInner[0] : undefined, + context: t7_rendered.context || options.context, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData, + reload: options.reload, + reloadPrevious: options.reloadPrevious + }); + + // Navbar init event + if (dynamicNavbar) { + app.navbarInitCallback(view, newPage[0], navbar[0], newNavbarInner[0], url, options.reload ? reloadPosition : 'right'); + } + + if (options.reload) { + view.allowPageChange = true; + if (historyBecameUnique) view.refreshPreviousPage(); + return; + } + + if (dynamicNavbar && animatePages) { + app.router.prepareNavbar(newNavbarInner, oldNavbarInner, 'right'); + } + // Force reLayout + var clientLeft = newPage[0].clientLeft; + + // Before Anim Callback + app.pageAnimCallback('before', view, { + pageContainer: newPage[0], + url: url, + position: 'right', + oldPage: oldPage, + newPage: newPage, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData + }); + + function afterAnimation() { + view.allowPageChange = true; + newPage.removeClass('page-from-right-to-center page-on-right page-on-left').addClass('page-on-center'); + oldPage.removeClass('page-from-center-to-left page-on-center page-on-right').addClass('page-on-left'); + if (dynamicNavbar) { + newNavbarInner.removeClass('navbar-from-right-to-center navbar-on-left navbar-on-right').addClass('navbar-on-center'); + oldNavbarInner.removeClass('navbar-from-center-to-left navbar-on-center navbar-on-right').addClass('navbar-on-left'); + } + app.pageAnimCallback('after', view, { + pageContainer: newPage[0], + url: url, + position: 'right', + oldPage: oldPage, + newPage: newPage, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData + }); + if (app.params.pushState && view.main) app.pushStateClearQueue(); + if (!(view.params.swipeBackPage || view.params.preloadPreviousPage)) { + if (view.params.domCache) { + oldPage.addClass('cached'); + if (dynamicNavbar) oldNavbarInner.addClass('cached'); + } + else { + if (!(url.indexOf('#') === 0 && newPage.attr('data-page').indexOf('smart-select-') === 0)) { + app.pageRemoveCallback(view, oldPage[0], 'left'); + if (dynamicNavbar) app.navbarRemoveCallback(view, oldPage[0], navbar[0], oldNavbarInner[0]); + app.router._remove(oldPage); + if (dynamicNavbar) app.router._remove(oldNavbarInner); + } + } + } + if (view.params.uniqueHistory && historyBecameUnique) { + view.refreshPreviousPage(); + } + } + if (animatePages) { + // Set pages before animation + if (app.params.material && app.params.materialPageLoadDelay) { + setTimeout(function () { + app.router.animatePages(oldPage, newPage, 'to-left', view); + }, app.params.materialPageLoadDelay); + } + else { + app.router.animatePages(oldPage, newPage, 'to-left', view); + } + + // Dynamic navbar animation + if (dynamicNavbar) { + setTimeout(function() { + app.router.animateNavbars(oldNavbarInner, newNavbarInner, 'to-left', view); + }, 0); + } + newPage.animationEnd(function () { + afterAnimation(); + }); + } + else { + if (dynamicNavbar) newNavbarInner.find('.sliding, .sliding .back .icon').transform(''); + afterAnimation(); + } + +}; + +app.router.load = function (view, options) { + options = options || {}; + if (app.routerPreOptions) { + options = app.routerPreOptions(view, options) || {}; + } + if (options.component && app.componentLoader) { + try { + app.componentLoader(view, options, function (newOptions) { + app.router.load(view, newOptions); + }); + } catch (e) {} + return; + } + if (app.router.preroute(view, options)) { + return false; + } + var url = options.url; + var content = options.content; + var pageName = options.pageName; + var pageElement = options.pageElement; + if (pageName) { + if (pageName.indexOf('?') > 0) { + options.query = $.parseUrlQuery(pageName); + options.pageName = pageName = pageName.split('?')[0]; + } + } + var template = options.template; + if (view.params.reloadPages === true) options.reload = true; + + if (!view.allowPageChange) return false; + if (url && view.url === url && !options.reload && !view.params.allowDuplicateUrls) return false; + view.allowPageChange = false; + if (app.xhr && view.xhr && view.xhr === app.xhr) { + app.xhr.abort(); + app.xhr = false; + } + function proceed(content) { + app.router.preprocess(view, content, url, function (content) { + options.content = content; + app.router._load(view, options); + }); + } + if (content || pageName || pageElement) { + proceed(content); + return; + } + else if (template) { + app.router._load(view, options); + return; + } + + if (!options.url || options.url === '#') { + view.allowPageChange = true; + return; + } + app.get(options.url, view, options.ignoreCache, function (content, error) { + if (error) { + view.allowPageChange = true; + return; + } + proceed(content); + }); +}; + +app.router._back = function (view, options) { + options = options || {}; + + app.pluginHook('routerBack', view, options); + + var url = options.url, + content = options.content, + t7_rendered = {content: options.content}, // will be rendered using Template7 + template = options.template, // Template 7 compiled template + animatePages = options.animatePages, + preloadOnly = options.preloadOnly, + pushState = options.pushState, + ignoreCache = options.ignoreCache, + force = options.force, + pageName = options.pageName, + pageElement = options.pageElement; + + var viewContainer = $(view.container), + pagesContainer = $(view.pagesContainer), + pagesInView = pagesContainer.children('.page:not(.cached)'), + oldPage, newPage, oldNavbarInner, newNavbarInner, navbar, navbarInners, dynamicNavbar, manipulateDom = true; + + if (typeof animatePages === 'undefined') animatePages = view.params.animatePages; + + // Render with Template7 + if (app.params.template7Pages && typeof content === 'string' || template) { + t7_rendered = app.router.template7Render(view, options); + if (t7_rendered.content && !content) { + content = t7_rendered.content; + } + } + + // Animation + function afterAnimation() { + app.pageBackCallback('after', view, { + pageContainer: oldPage[0], + url: url, + position: 'center', + oldPage: oldPage, + newPage: newPage, + }); + app.pageAnimCallback('after', view, { + pageContainer: newPage[0], + url: url, + position: 'left', + oldPage: oldPage, + newPage: newPage, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData + }); + app.router.afterBack(view, oldPage[0], newPage[0]); + } + function animateBack() { + // Page before animation callback + app.pageBackCallback('before', view, { + pageContainer: oldPage[0], + url: url, + position: 'center', + oldPage: oldPage, + newPage: newPage, + }); + app.pageAnimCallback('before', view, { + pageContainer: newPage[0], + url: url, + position: 'left', + oldPage: oldPage, + newPage: newPage, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData + }); + + if (animatePages) { + // Set pages before animation + app.router.animatePages(newPage, oldPage, 'to-right', view); + + // Dynamic navbar animation + if (dynamicNavbar) { + setTimeout(function () { + app.router.animateNavbars(newNavbarInner, oldNavbarInner, 'to-right', view); + }, 0); + } + + newPage.animationEnd(function () { + afterAnimation(); + }); + } + else { + if (dynamicNavbar) newNavbarInner.find('.sliding, .sliding .back .icon').transform(''); + afterAnimation(); + } + } + + function parseNewPage() { + app.router.temporaryDom.innerHTML = ''; + // Parse DOM + if ((typeof content === 'string') || (url && (typeof content === 'string'))) { + app.router.temporaryDom.innerHTML = t7_rendered.content; + } else { + if ('length' in content && content.length > 1) { + for (var ci = 0; ci < content.length; ci++) { + $(app.router.temporaryDom).append(content[ci]); + } + } else { + $(app.router.temporaryDom).append(content); + } + } + if (pageElement) newPage = $(pageElement); + else newPage = app.router.findElement('.page', app.router.temporaryDom, view); + + if (view.params.dynamicNavbar) { + // Find navbar + newNavbarInner = app.router.findElement('.navbar-inner', app.router.temporaryDom, view); + } + } + function setPages() { + // If pages not found or there are still more than one, exit + if (!newPage || newPage.length === 0) { + view.allowPageChange = true; + return; + } + if (view.params.dynamicNavbar && typeof dynamicNavbar === 'undefined') { + if (!newNavbarInner || newNavbarInner.length === 0) { + dynamicNavbar = false; + } + else { + dynamicNavbar = true; + } + } + + newPage.addClass('page-on-left').removeClass('cached'); + if (dynamicNavbar) { + navbar = viewContainer.children('.navbar'); + navbarInners = navbar.find('.navbar-inner:not(.cached)'); + newNavbarInner.addClass('navbar-on-left').removeClass('cached'); + } + // Remove/hide previous page in force mode + if (force) { + var pageToRemove, navbarToRemove; + pageToRemove = $(pagesInView[pagesInView.length - 2]); + + if (dynamicNavbar) navbarToRemove = $(pageToRemove[0] && pageToRemove[0].f7RelatedNavbar || navbarInners[navbarInners.length - 2]); + if (view.params.domCache && view.initialPages.indexOf(pageToRemove[0]) >= 0) { + if (pageToRemove.length && pageToRemove[0] !== newPage[0]) pageToRemove.addClass('cached'); + if (dynamicNavbar && navbarToRemove.length && navbarToRemove[0] !== newNavbarInner[0]) { + navbarToRemove.addClass('cached'); + } + } + else { + var removeNavbar = dynamicNavbar && navbarToRemove.length; + if (pageToRemove.length) { + app.pageRemoveCallback(view, pageToRemove[0], 'right'); + if (removeNavbar) { + app.navbarRemoveCallback(view, pageToRemove[0], navbar[0], navbarToRemove[0]); + } + app.router._remove(pageToRemove); + if (removeNavbar) app.router._remove(navbarToRemove); + } + else if (removeNavbar) { + app.navbarRemoveCallback(view, pageToRemove[0], navbar[0], navbarToRemove[0]); + app.router._remove(navbarToRemove); + } + } + pagesInView = pagesContainer.children('.page:not(.cached)'); + if (dynamicNavbar) { + navbarInners = viewContainer.children('.navbar').find('.navbar-inner:not(.cached)'); + } + if (view.history.indexOf(url) >= 0) { + view.history = view.history.slice(0, view.history.indexOf(url) + 2); + } + else { + if (view.history[[view.history.length - 2]]) { + view.history[view.history.length - 2] = url; + } + else { + view.history.unshift(url); + } + } + } + + oldPage = $(pagesInView[pagesInView.length - 1]); + if (view.params.domCache) { + if (oldPage[0] === newPage[0]) { + oldPage = pagesContainer.children('.page.page-on-center'); + if (oldPage.length === 0 && view.activePage) oldPage = $(view.activePage.container); + } + } + + if (dynamicNavbar && !oldNavbarInner) { + oldNavbarInner = $(navbarInners[navbarInners.length - 1]); + if (view.params.domCache) { + if (oldNavbarInner[0] === newNavbarInner[0]) { + oldNavbarInner = navbar.children('.navbar-inner.navbar-on-center:not(.cached)'); + } + if (oldNavbarInner.length === 0) { + oldNavbarInner = navbar.children('.navbar-inner[data-page="'+oldPage.attr('data-page')+'"]'); + } + } + if (oldNavbarInner.length === 0 || newNavbarInner[0] === oldNavbarInner[0]) dynamicNavbar = false; + } + + if (dynamicNavbar) { + if (manipulateDom) newNavbarInner.insertBefore(oldNavbarInner); + newNavbarInner[0].f7RelatedPage = newPage[0]; + newPage[0].f7RelatedNavbar = newNavbarInner[0]; + } + if (manipulateDom) newPage.insertBefore(oldPage); + + // Page Init Events + app.pageInitCallback(view, { + pageContainer: newPage[0], + url: url, + position: 'left', + navbarInnerContainer: dynamicNavbar ? newNavbarInner[0] : undefined, + oldNavbarInnerContainer: dynamicNavbar ? oldNavbarInner && oldNavbarInner[0] : undefined, + context: t7_rendered.context, + query: options.query, + fromPage: oldPage && oldPage.length && oldPage[0].f7PageData, + preloadOnly: preloadOnly + }); + if (dynamicNavbar) { + app.navbarInitCallback(view, newPage[0], navbar[0], newNavbarInner[0], url, 'right'); + } + + if (dynamicNavbar && newNavbarInner.hasClass('navbar-on-left') && animatePages) { + app.router.prepareNavbar(newNavbarInner, oldNavbarInner, 'left'); + } + + if (preloadOnly) { + view.allowPageChange = true; + return; + } + + // Update View's URL + view.url = url; + + // Force reLayout + var clientLeft = newPage[0].clientLeft; + + animateBack(); + + // Push state + if (app.params.pushState && view.main) { + if (typeof pushState === 'undefined') pushState = true; + if (!preloadOnly && history.state && pushState) { + history.back(); + } + } + return; + } + + // Simple go back when we have pages on left + if (pagesInView.length > 1 && !force) { + // Exit if only preloadOnly + if (preloadOnly) { + view.allowPageChange = true; + return; + } + // Update View's URL + view.url = view.history[view.history.length - 2]; + url = view.url; + + // Define old and new pages + newPage = $(pagesInView[pagesInView.length - 2]); + oldPage = $(pagesInView[pagesInView.length - 1]); + + // Dynamic navbar + if (view.params.dynamicNavbar) { + dynamicNavbar = true; + // Find navbar + navbarInners = viewContainer.children('.navbar').find('.navbar-inner:not(.cached)'); + newNavbarInner = $(navbarInners[0]); + oldNavbarInner = $(navbarInners[1]); + if (newNavbarInner.length === 0 || oldNavbarInner.length === 0 || oldNavbarInner[0] === newNavbarInner[0]) { + dynamicNavbar = false; + } + } + manipulateDom = false; + setPages(); + return; + } + + if (!force) { + // Go back when there is no pages on left + if (!preloadOnly) { + view.url = view.history[view.history.length - 2]; + url = view.url; + } + + if (content) { + parseNewPage(); + setPages(); + return; + } + else if (pageName) { + // Get dom cached pages + newPage = $(viewContainer).find('.page[data-page="' + pageName + '"]'); + if (view.params.dynamicNavbar) { + newNavbarInner = $(viewContainer).children('.navbar').find('.navbar-inner[data-page="' + pageName + '"]'); + if (newNavbarInner.length === 0 && newPage[0].f7RelatedNavbar) { + newNavbarInner = $(newPage[0].f7RelatedNavbar); + } + if (newNavbarInner.length === 0 && newPage[0].f7PageData) { + newNavbarInner = $(newPage[0].f7PageData.navbarInnerContainer); + } + } + setPages(); + return; + } + else if (url && url in view.pageElementsCache) { + newPage = view.pageElementsCache[url].page; + newNavbarInner = view.pageElementsCache[url].navbarInner; + setPages(); + return; + } + else { + view.allowPageChange = true; + return; + } + } + else { + if (url && url === view.url || pageName && view.activePage && view.activePage.name === pageName) { + view.allowPageChange = true; + return; + } + // Go back with force url + if (content) { + parseNewPage(); + setPages(); + return; + } + else if (pageName && view.params.domCache) { + if (pageName) url = '#' + pageName; + + newPage = $(viewContainer).find('.page[data-page="' + pageName + '"]'); + if (newPage[0].f7PageData && newPage[0].f7PageData.url) { + url = newPage[0].f7PageData.url; + } + if (view.params.dynamicNavbar) { + newNavbarInner = $(viewContainer).children('.navbar').find('.navbar-inner[data-page="' + pageName + '"]'); + if (newNavbarInner.length === 0 && newPage[0].f7RelatedNavbar) { + newNavbarInner = $(newPage[0].f7RelatedNavbar); + } + if (newNavbarInner.length === 0 && newPage[0].f7PageData) { + newNavbarInner = $(newPage[0].f7PageData.navbarInnerContainer); + } + } + setPages(); + return; + } + else if (pageElement && url) { + newPage = $(pageElement); + if (view.params.dynamicNavbar) { + newNavbarInner = newPage.find('.navbar-inner').filter(function (index, el) { + return $(el).parents(app.router._modalsSelector).length === 0; + }); + if (newNavbarInner.length > 0) { + newPage.prepend(newNavbarInner); + app.router._remove(newPage.find('.navbar').filter(function (index, el) { + return $(el).parents(app.router._modalsSelector).length === 0; + })); + } + } + setPages(); + return; + } + else { + view.allowPageChange = true; + return; + } + } + +}; +app.router.back = function (view, options) { + options = options || {}; + if (app.routerPreOptions) { + options = app.routerPreOptions(view, options) || {}; + } + if (options.component && app.componentLoader) { + try { + app.componentLoader(view, options, function (newOptions) { + app.router.load(view, newOptions); + }); + } catch (e) {} + return; + } + if (app.router.preroute(view, options, true)) { + return false; + } + var url = options.url; + var content = options.content; + var pageName = options.pageName; + var pageElement = options.pageElement; + if (pageName) { + if (pageName.indexOf('?') > 0) { + options.query = $.parseUrlQuery(pageName); + options.pageName = pageName = pageName.split('?')[0]; + } + } + var force = options.force; + if (!view.allowPageChange) return false; + view.allowPageChange = false; + if (app.xhr && view.xhr && view.xhr === app.xhr) { + app.xhr.abort(); + app.xhr = false; + } + var pagesInView = $(view.pagesContainer).find('.page:not(.cached)'); + + function proceed(content) { + app.router.preprocess(view, content, url, function (content) { + options.content = content; + app.router._back(view, options); + }); + } + if (pagesInView.length > 1 && !force) { + // Simple go back to previos page in view + app.router._back(view, options); + return; + } + if (!force) { + url = view.history[view.history.length - 2] || options.url; + if (!options.url) options.url = url; + if (!url) { + view.allowPageChange = true; + return; + } + if (url.indexOf('#') === 0 && view.contentCache[url]) { + proceed(view.contentCache[url]); + return; + } + else if (url.indexOf('#') === 0 && view.params.domCache) { + if (!pageName) options.pageName = url.split('#')[1]; + proceed(); + return; + } + else if (url && url in view.pageElementsCache) { + proceed(); + } + else if (url.indexOf('#') !== 0) { + // Load ajax page + app.get(options.url, view, options.ignoreCache, function (content, error) { + if (error) { + view.allowPageChange = true; + return; + } + proceed(content); + }); + return; + } + } + else { + // Go back with force url + if (!url && content) { + proceed(content); + return; + } + else if (!url && pageName) { + if (pageName) url = '#' + pageName; + proceed(); + return; + } + else if (url && pageElement) { + proceed(); + return; + } + else if (url) { + app.get(options.url, view, options.ignoreCache, function (content, error) { + if (error) { + view.allowPageChange = true; + return; + } + proceed(content); + }); + return; + } + } + view.allowPageChange = true; + return; +}; + +app.router.afterBack = function (view, oldPage, newPage) { + // Remove old page and set classes on new one + oldPage = $(oldPage); + newPage = $(newPage); + + if (view.params.domCache && view.initialPages.indexOf(oldPage[0]) >= 0) { + oldPage.removeClass('page-from-center-to-right').addClass('cached'); + } + else { + app.pageRemoveCallback(view, oldPage[0], 'right'); + app.router._remove(oldPage); + } + + newPage.removeClass('page-from-left-to-center page-on-left').addClass('page-on-center'); + view.allowPageChange = true; + + // Update View's History + var previousURL = view.history.pop(); + + var newNavbar; + + // Updated dynamic navbar + if (view.params.dynamicNavbar) { + var inners = $(view.container).children('.navbar').find('.navbar-inner:not(.cached)'); + var oldNavbar = $(oldPage[0].f7RelatedNavbar || inners[1]); + if (view.params.domCache && view.initialNavbars.indexOf(oldNavbar[0]) >= 0) { + oldNavbar.removeClass('navbar-from-center-to-right').addClass('cached'); + } + else { + app.navbarRemoveCallback(view, oldPage[0], undefined, oldNavbar[0]); + app.router._remove(oldNavbar); + } + newNavbar = $(inners[0]).removeClass('navbar-on-left navbar-from-left-to-center').addClass('navbar-on-center'); + } + + // Remove pages in dom cache + if (view.params.domCache) { + $(view.container).find('.page.cached').each(function () { + var page = $(this); + var pageUrl = page[0].f7PageData && page[0].f7PageData.url; + if (pageUrl && view.history.indexOf(pageUrl) < 0 && view.initialPages.indexOf(this) < 0) { + app.pageRemoveCallback(view, page[0], 'right'); + if (page[0].f7RelatedNavbar && view.params.dynamicNavbar) app.navbarRemoveCallback(view, page[0], undefined, page[0].f7RelatedNavbar); + app.router._remove(page); + if (page[0].f7RelatedNavbar && view.params.dynamicNavbar) app.router._remove(page[0].f7RelatedNavbar); + } + }); + } + + // Check previous page is content based only and remove it from content cache + if (!view.params.domCache && + previousURL && + previousURL.indexOf('#') > -1 && + (previousURL in view.contentCache) && + // If the same page is in the history multiple times, don't remove it. + view.history.indexOf(previousURL) === -1) { + view.contentCache[previousURL] = null; + delete view.contentCache[previousURL]; + } + if (previousURL && + (previousURL in view.pageElementsCache) && + // If the same page is in the history multiple times, don't remove it. + view.history.indexOf(previousURL) === -1) { + view.pageElementsCache[previousURL] = null; + delete view.pageElementsCache[previousURL]; + } + // Check for context cache + if (previousURL && + (previousURL in view.contextCache) && + // If the same page is in the history multiple times, don't remove it. + view.history.indexOf(previousURL) === -1) { + view.contextCache[previousURL] = null; + delete view.contextCache[previousURL]; + } + + if (app.params.pushState && view.main) app.pushStateClearQueue(); + + // Preload previous page + if (view.params.preloadPreviousPage) { + if (view.params.domCache && view.history.length > 1) { + var preloadUrl = view.history[view.history.length - 2]; + var previousPage; + var previousNavbar; + if (preloadUrl && view.pagesCache[preloadUrl]) { + // Load by page name + previousPage = $(view.container).find('.page[data-page="' + view.pagesCache[preloadUrl] + '"]'); + if (previousPage.next('.page')[0] !== newPage[0]) previousPage.insertBefore(newPage); + if (newNavbar) { + previousNavbar = $(view.container).children('.navbar').find('.navbar-inner[data-page="' + view.pagesCache[preloadUrl] + '"]'); + if(!previousNavbar || previousNavbar.length === 0) previousNavbar = newNavbar.prev('.navbar-inner.cached'); + if (previousNavbar.next('.navbar-inner')[0] !== newNavbar[0]) previousNavbar.insertBefore(newNavbar); + } + } + else { + // Just load previous page + previousPage = newPage.prev('.page.cached'); + if (newNavbar) previousNavbar = newNavbar.prev('.navbar-inner.cached'); + } + if (previousPage && previousPage.length > 0) previousPage.removeClass('cached page-on-right page-on-center').addClass('page-on-left'); + if (previousNavbar && previousNavbar.length > 0) previousNavbar.removeClass('cached navbar-on-right navbar-on-center').addClass('navbar-on-left'); + } + else { + app.router.back(view, {preloadOnly: true}); + } + } +}; diff --git a/bower_components/framework7/src/js/framework7/scroll-toolbars.js b/bower_components/framework7/src/js/framework7/scroll-toolbars.js new file mode 100644 index 00000000..81640ac0 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/scroll-toolbars.js @@ -0,0 +1,117 @@ +/*============================================================= +************ Hide/show Toolbar/Navbar on scroll ************ +=============================================================*/ +app.initPageScrollToolbars = function (pageContainer) { + pageContainer = $(pageContainer); + var scrollContent = pageContainer.find('.page-content'); + if (scrollContent.length === 0) return; + var hideNavbar = (app.params.hideNavbarOnPageScroll || scrollContent.hasClass('hide-navbar-on-scroll') || scrollContent.hasClass('hide-bars-on-scroll')) && !(scrollContent.hasClass('keep-navbar-on-scroll') || scrollContent.hasClass('keep-bars-on-scroll')); + var hideToolbar = (app.params.hideToolbarOnPageScroll || scrollContent.hasClass('hide-toolbar-on-scroll') || scrollContent.hasClass('hide-bars-on-scroll')) && !(scrollContent.hasClass('keep-toolbar-on-scroll') || scrollContent.hasClass('keep-bars-on-scroll')); + var hideTabbar = (app.params.hideTabbarOnPageScroll || scrollContent.hasClass('hide-tabbar-on-scroll')) && !(scrollContent.hasClass('keep-tabbar-on-scroll')); + + if (!(hideNavbar || hideToolbar || hideTabbar)) return; + + var viewContainer = scrollContent.parents('.' + app.params.viewClass); + if (viewContainer.length === 0) return; + + var navbar = viewContainer.find('.navbar'), + toolbar = viewContainer.find('.toolbar'), + tabbar; + if (hideTabbar) { + tabbar = viewContainer.find('.tabbar'); + if (tabbar.length === 0) tabbar = viewContainer.parents('.' + app.params.viewsClass).find('.tabbar'); + } + + var hasNavbar = navbar.length > 0, + hasToolbar = toolbar.length > 0, + hasTabbar = tabbar && tabbar.length > 0; + + var previousScroll, currentScroll; + previousScroll = currentScroll = scrollContent[0].scrollTop; + + var scrollHeight, offsetHeight, reachEnd, action, navbarHidden, toolbarHidden, tabbarHidden; + + var toolbarHeight = (hasToolbar && hideToolbar) ? toolbar[0].offsetHeight : 0; + var tabbarHeight = (hasTabbar && hideTabbar) ? tabbar[0].offsetHeight : 0; + var bottomBarHeight = tabbarHeight || toolbarHeight; + + function handleScroll(e) { + if (pageContainer.hasClass('page-on-left')) return; + currentScroll = scrollContent[0].scrollTop; + scrollHeight = scrollContent[0].scrollHeight; + offsetHeight = scrollContent[0].offsetHeight; + reachEnd = currentScroll + offsetHeight >= scrollHeight - bottomBarHeight; + navbarHidden = navbar.hasClass('navbar-hidden'); + toolbarHidden = toolbar.hasClass('toolbar-hidden'); + tabbarHidden = tabbar && tabbar.hasClass('toolbar-hidden'); + + if (reachEnd) { + if (app.params.showBarsOnPageScrollEnd) { + action = 'show'; + } + } + else if (previousScroll > currentScroll) { + if (app.params.showBarsOnPageScrollTop || currentScroll <= 44) { + action = 'show'; + } + else { + action = 'hide'; + } + } + else { + if (currentScroll > 44) { + action = 'hide'; + } + else { + action = 'show'; + } + } + + if (action === 'show') { + if (hasNavbar && hideNavbar && navbarHidden) { + app.showNavbar(navbar); + pageContainer.removeClass('no-navbar-by-scroll'); + navbarHidden = false; + } + if (hasToolbar && hideToolbar && toolbarHidden) { + app.showToolbar(toolbar); + pageContainer.removeClass('no-toolbar-by-scroll'); + toolbarHidden = false; + } + if (hasTabbar && hideTabbar && tabbarHidden) { + app.showToolbar(tabbar); + pageContainer.removeClass('no-tabbar-by-scroll'); + tabbarHidden = false; + } + } + else { + if (hasNavbar && hideNavbar && !navbarHidden) { + app.hideNavbar(navbar); + pageContainer.addClass('no-navbar-by-scroll'); + navbarHidden = true; + } + if (hasToolbar && hideToolbar && !toolbarHidden) { + app.hideToolbar(toolbar); + pageContainer.addClass('no-toolbar-by-scroll'); + toolbarHidden = true; + } + if (hasTabbar && hideTabbar && !tabbarHidden) { + app.hideToolbar(tabbar); + pageContainer.addClass('no-tabbar-by-scroll'); + tabbarHidden = true; + } + } + + previousScroll = currentScroll; + } + scrollContent.on('scroll', handleScroll); + scrollContent[0].f7ScrollToolbarsHandler = handleScroll; +}; +app.destroyScrollToolbars = function (pageContainer) { + pageContainer = $(pageContainer); + var scrollContent = pageContainer.find('.page-content'); + if (scrollContent.length === 0) return; + var handler = scrollContent[0].f7ScrollToolbarsHandler; + if (!handler) return; + scrollContent.off('scroll', scrollContent[0].f7ScrollToolbarsHandler); +}; diff --git a/bower_components/framework7/src/js/framework7/searchbar.js b/bower_components/framework7/src/js/framework7/searchbar.js new file mode 100644 index 00000000..2b07c927 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/searchbar.js @@ -0,0 +1,346 @@ +/*====================================================== +************ Searchbar ************ +======================================================*/ +var Searchbar = function (container, params) { + var defaults = { + input: null, + clearButton: null, + cancelButton: null, + searchList: null, + searchIn: '.item-title', + searchBy: '', + found: null, + notFound: null, + overlay: null, + ignore: '.searchbar-ignore', + customSearch: false, + removeDiacritics: false, + hideDividers: true, + hideGroups: true, + /* Callbacks + onSearch + onEnable + onDisable + onClear + */ + + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined' || params[def] === null && defaults.hasOwnProperty(def)) { + params[def] = defaults[def]; + } + } + + // Instance + var s = this; + + // Material + s.material = app.params.material; + + // Params + s.params = params; + + // Container + container = $(container); + s.container = container; + + // Active + s.active = false; + + // Input + s.input = s.params.input ? $(s.params.input) : s.container.find('input[type="search"]'); + s.clearButton = s.params.clearButton ? $(s.params.clearButton) : s.container.find('.searchbar-clear'); + s.cancelButton = s.params.cancelButton ? $(s.params.cancelButton) : s.container.find('.searchbar-cancel'); + + // Search List + s.searchList = $(s.params.searchList); + + // Is Virtual List + s.isVirtualList = s.searchList.hasClass('virtual-list'); + + // Is In Page + s.pageContainer = s.container.parents('.page').eq(0); + + // Overlay + if (!s.params.overlay) { + s.overlay = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-overlay') : $('.searchbar-overlay'); + } + else { + s.overlay = $(s.params.overlay); + } + // Found and not found + if (!s.params.found) { + s.found = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-found') : $('.searchbar-found'); + } + else { + s.found = $(s.params.found); + } + if (!s.params.notFound) { + s.notFound = s.pageContainer.length > 0 ? s.pageContainer.find('.searchbar-not-found') : $('.searchbar-not-found'); + } + else { + s.notFound = $(s.params.notFound); + } + + // Set Cancel button + var cancelMarginProp = app.rtl ? 'margin-left' : 'margin-right'; + var cancelButtonHasMargin = false; + s.setCancelButtonMargin = function () { + s.cancelButton.transition(0).show(); + s.cancelButton.css(cancelMarginProp, -s.cancelButton[0].offsetWidth + 'px'); + var clientLeft = s.cancelButton[0].clientLeft; + s.cancelButton.transition(''); + cancelButtonHasMargin = true; + }; + + // Trigger + s.triggerEvent = function (eventName, callbackName, eventData) { + s.container.trigger(eventName, eventData); + if (s.searchList.length > 0) s.searchList.trigger(eventName, eventData); + if (callbackName && s.params[callbackName]) s.params[callbackName](s, eventData); + }; + + // Enable/disalbe + s.enable = function (e) { + function _enable() { + if ((s.searchList.length || s.params.customSearch) && !s.container.hasClass('searchbar-active') && !s.query) s.overlay.addClass('searchbar-overlay-active'); + s.container.addClass('searchbar-active'); + if (s.cancelButton.length > 0 && !s.material) { + if (!cancelButtonHasMargin) { + s.setCancelButtonMargin(); + } + s.cancelButton.css(cancelMarginProp, '0px'); + } + s.triggerEvent('enableSearch searchbar:enable', 'onEnable'); + s.active = true; + } + if (app.device.ios && !app.params.material && e && e.type === 'focus') { + setTimeout(function () { + _enable(); + }, 400); + } + else { + _enable(); + } + }; + + s.disable = function () { + s.input.val('').trigger('change'); + s.container.removeClass('searchbar-active searchbar-not-empty'); + if (s.cancelButton.length > 0 && !s.material) s.cancelButton.css(cancelMarginProp, -s.cancelButton[0].offsetWidth + 'px'); + + if (s.searchList.length || s.params.customSearch) s.overlay.removeClass('searchbar-overlay-active'); + + s.active = false; + function _disable() { + s.input.blur(); + } + if (app.device.ios) { + setTimeout(function () { + _disable(); + }, 400); + } + else { + _disable(); + } + s.triggerEvent('disableSearch searchbar:disable', 'onDisable'); + }; + + // Clear + s.clear = function (e) { + if (!s.query && e && $(e.target).hasClass('searchbar-clear')) { + s.disable(); + return; + } + var previousQuery = s.value; + s.input.val('').trigger('change').focus(); + s.triggerEvent('clearSearch searchbar:clear', 'onClear', {previousQuery: previousQuery}); + }; + + // Search + s.handleInput = function () { + setTimeout(function () { + var value = s.input.val().trim(); + if ((s.searchList.length > 0 || s.params.customSearch) && (s.params.searchIn || s.isVirtualList)) s.search(value, true); + }, 0); + }; + + var previousQuery = ''; + var virtualList; + s.search = function (query, internal) { + if (previousQuery && query.trim() === previousQuery) return; + previousQuery = query.trim(); + + if (!internal) { + if (!s.active) { + s.enable(); + } + s.input.val(query); + } + s.query = s.value = query; + // Add active/inactive classes on overlay + if (query.length === 0) { + s.container.removeClass('searchbar-not-empty'); + if (s.searchList.length && s.container.hasClass('searchbar-active')) s.overlay.addClass('searchbar-overlay-active'); + } + else { + s.container.addClass('searchbar-not-empty'); + if (s.searchList.length && s.container.hasClass('searchbar-active')) s.overlay.removeClass('searchbar-overlay-active'); + } + + if (s.params.customSearch) { + s.triggerEvent('search searchbar:search', 'onSearch', {query: query}); + return; + } + + var foundItems = [], _vlQuery; + if (s.isVirtualList) { + virtualList = s.searchList[0].f7VirtualList; + if (query.trim() === '') { + virtualList.resetFilter(); + s.notFound.hide(); + s.found.show(); + return; + } + _vlQuery = s.params.removeDiacritics ? $.removeDiacritics(query) : query; + if (virtualList.params.searchAll) { + foundItems = virtualList.params.searchAll(_vlQuery, virtualList.items) || []; + } + else if (virtualList.params.searchByItem) { + for (var i = 0; i < virtualList.items.length; i++) { + if(virtualList.params.searchByItem(_vlQuery, i, virtualList.params.items[i])) { + foundItems.push(i); + } + } + } + } + else { + var values; + if (s.params.removeDiacritics) values = $.removeDiacritics(query.trim().toLowerCase()).split(' '); + else { + values = query.trim().toLowerCase().split(' '); + } + s.searchList.find('li').removeClass('hidden-by-searchbar').each(function (index, el) { + el = $(el); + var compareWithText = []; + el.find(s.params.searchIn).each(function () { + var itemText = $(this).text().trim().toLowerCase(); + if (s.params.removeDiacritics) itemText = $.removeDiacritics(itemText); + compareWithText.push(itemText); + }); + compareWithText = compareWithText.join(' '); + var wordsMatch = 0; + for (var i = 0; i < values.length; i++) { + if (compareWithText.indexOf(values[i]) >= 0) wordsMatch++; + } + if (wordsMatch !== values.length && !(s.params.ignore && el.is(s.params.ignore))) { + el.addClass('hidden-by-searchbar'); + } + else { + foundItems.push(el[0]); + } + }); + + if (s.params.hideDividers) { + s.searchList.find('.item-divider, .list-group-title').each(function () { + var title = $(this); + var nextElements = title.nextAll('li'); + var hide = true; + for (var i = 0; i < nextElements.length; i++) { + var nextEl = $(nextElements[i]); + if (nextEl.hasClass('list-group-title') || nextEl.hasClass('item-divider')) break; + if (!nextEl.hasClass('hidden-by-searchbar')) { + hide = false; + } + } + var ignore = s.params.ignore && title.is(s.params.ignore); + if (hide && !ignore) title.addClass('hidden-by-searchbar'); + else title.removeClass('hidden-by-searchbar'); + }); + } + if (s.params.hideGroups) { + s.searchList.find('.list-group').each(function () { + var group = $(this); + var ignore = s.params.ignore && group.is(s.params.ignore); + var notHidden = group.find('li:not(.hidden-by-searchbar)'); + if (notHidden.length === 0 && !ignore) { + group.addClass('hidden-by-searchbar'); + } + else { + group.removeClass('hidden-by-searchbar'); + } + }); + } + } + s.triggerEvent('search searchbar:search', 'onSearch', {query: query, foundItems: foundItems}); + if (foundItems.length === 0) { + s.notFound.show(); + s.found.hide(); + } + else { + s.notFound.hide(); + s.found.show(); + } + if (s.isVirtualList) { + virtualList.filterItems(foundItems); + } + }; + + // Events + function preventSubmit(e) { + e.preventDefault(); + } + + s.attachEvents = function (destroy) { + var method = destroy ? 'off' : 'on'; + s.container[method]('submit', preventSubmit); + if (!s.material) s.cancelButton[method]('click', s.disable); + s.overlay[method]('click', s.disable); + s.input[method]('focus', s.enable); + s.input[method]('change keydown keypress keyup compositionend', s.handleInput); + s.clearButton[method]('click', s.clear); + + }; + s.detachEvents = function() { + s.attachEvents(true); + }; + + // Init Destroy + s.init = function () { + s.attachEvents(); + }; + s.destroy = function () { + if (!s) return; + s.detachEvents(); + s = null; + }; + + // Init + s.init(); + + s.container[0].f7Searchbar = s; + return s; + +}; +app.searchbar = function (container, params) { + return new Searchbar(container, params); +}; +app.initSearchbar = function (container) { + container = $(container); + var searchbar = container.hasClass('searchbar') ? container : container.find('.searchbar'); + if (searchbar.length === 0) return; + if (!searchbar.hasClass('searchbar-init')) return; + + var sb = app.searchbar(searchbar, searchbar.dataset()); + + function onBeforeRemove() { + if (sb) sb.destroy(); + } + if (container.hasClass('page')) { + container.once('pageBeforeRemove', onBeforeRemove); + } + else if (container.hasClass('navbar-inner')) { + container.once('navbarBeforeRemove', onBeforeRemove); + } +}; diff --git a/bower_components/framework7/src/js/framework7/smart-select.js b/bower_components/framework7/src/js/framework7/smart-select.js new file mode 100644 index 00000000..1c718088 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/smart-select.js @@ -0,0 +1,541 @@ +/*=============================================================================== +************ Smart Select ************ +===============================================================================*/ +app.initSmartSelects = function (pageContainer) { + pageContainer = $(pageContainer); + var selects; + if (pageContainer.is('.smart-select')) { + selects = pageContainer; + } + else { + selects = pageContainer.find('.smart-select'); + } + if (selects.length === 0) return; + + selects.each(function () { + var smartSelect = $(this); + + var $select = smartSelect.find('select'); + if ($select.length === 0) return; + + var select = $select[0]; + if (select.length === 0) return; + + var valueText = []; + var displayAs; + for (var i = 0; i < select.length; i++) { + if (select[i].selected) { + displayAs = select[i].dataset ? select[i].dataset.displayAs : $(select[i]).data('display-as'); + if (displayAs && typeof displayAs !== 'undefined') { + valueText.push(displayAs); + } else { + valueText.push(select[i].textContent.trim()); + } + } + } + + var itemAfter = smartSelect.find('.item-after'); + if (itemAfter.length === 0) { + smartSelect.find('.item-inner').append('
                                                      ' + valueText.join(', ') + '
                                                      '); + } + else { + var selectedText = itemAfter.text(); + if (itemAfter.hasClass('smart-select-value')) { + for (i = 0; i < select.length; i++) { + select[i].selected = select[i].textContent.trim() === selectedText.trim(); + } + } else { + itemAfter.text(valueText.join(', ')); + } + } + + $select.on('change', function () { + var valueText = []; + for (var i = 0; i < select.length; i++) { + if (select[i].selected) { + var displayAs = select[i].dataset ? select[i].dataset.displayAs : $(select[i]).data('display-as'); + if (displayAs && typeof displayAs !== 'undefined') { + valueText.push(displayAs); + } else { + valueText.push(select[i].textContent.trim()); + } + } + } + smartSelect.find('.item-after').text(valueText.join(', ')); + }); + + }); + +}; +app.smartSelectAddOption = function (select, option, index) { + select = $(select); + var smartSelect = select.parents('.smart-select'); + if (typeof index === 'undefined') { + select.append(option); + } + else { + $(option).insertBefore(select.find('option').eq(index)); + } + app.initSmartSelects(smartSelect); + var selectName = smartSelect.find('select').attr('name'); + var opened = $('.page.smart-select-page[data-select-name="' + selectName + '"]').length > 0; + if (opened) { + app.smartSelectOpen(smartSelect, true); + } +}; +app.smartSelectOpen = function (smartSelect, reLayout) { + smartSelect = $(smartSelect); + if (smartSelect.length === 0) return; + + // Find related view + var view = smartSelect.parents('.' + app.params.viewClass); + if (view.length === 0) return; + view = view[0].f7View; + + // Parameters + var openIn = smartSelect.attr('data-open-in') || app.params.smartSelectOpenIn; + if (openIn === 'popup') { + if ($('.popup.smart-select-popup').length > 0) return; + } + else if (openIn === 'picker') { + if ($('.picker-modal.modal-in').length > 0 && !reLayout){ + if (smartSelect[0].f7SmartSelectPicker !== $('.picker-modal.modal-in:not(.modal-out)')[0]) app.closeModal($('.picker-modal.modal-in:not(.modal-out)')); + else return; + } + } + else { + if (!view) return; + } + + var smartSelectData = smartSelect.dataset(); + var pageTitle = smartSelectData.pageTitle || smartSelect.find('.item-title').text(); + var backText = smartSelectData.backText || app.params.smartSelectBackText; + var closeText; + if (openIn === 'picker') { + closeText = smartSelectData.pickerCloseText || smartSelectData.backText || app.params.smartSelectPickerCloseText ; + } + else { + closeText = smartSelectData.popupCloseText || smartSelectData.backText || app.params.smartSelectPopupCloseText ; + } + var backOnSelect = smartSelectData.backOnSelect !== undefined ? smartSelectData.backOnSelect : app.params.smartSelectBackOnSelect; + var formTheme = smartSelectData.formTheme || app.params.smartSelectFormTheme; + var navbarTheme = smartSelectData.navbarTheme || app.params.smartSelectNavbarTheme; + var toolbarTheme = smartSelectData.toolbarTheme || app.params.smartSelectToolbarTheme; + var virtualList = smartSelectData.virtualList; + var virtualListHeight = smartSelectData.virtualListHeight; + var material = app.params.material; + var pickerHeight = smartSelectData.pickerHeight || app.params.smartSelectPickerHeight; + + // Collect all options/values + var select = smartSelect.find('select')[0]; + var $select = $(select); + var $selectData = $select.dataset(); + if (select.disabled || smartSelect.hasClass('disabled') || $select.hasClass('disabled')) { + return; + } + var values = []; + var id = (new Date()).getTime(); + var inputType = select.multiple ? 'checkbox' : 'radio'; + var inputName = inputType + '-' + id; + var maxLength = $select.attr('maxlength'); + var selectName = select.name; + var option, optionHasMedia, optionImage, optionIcon, optionGroup, optionGroupLabel, optionPreviousGroup, optionIsLabel, previousGroup, optionColor, optionClassName, optionData; + for (var i = 0; i < select.length; i++) { + option = $(select[i]); + optionData = option.dataset(); + optionImage = optionData.optionImage || $selectData.optionImage || smartSelectData.optionImage; + optionIcon = optionData.optionIcon || $selectData.optionIcon || smartSelectData.optionIcon; + optionHasMedia = optionImage || optionIcon || inputType === 'checkbox'; + if (material) optionHasMedia = optionImage || optionIcon; + optionColor = optionData.optionColor; + optionClassName = optionData.optionClass; + if (option[0].disabled) optionClassName += ' disabled'; + optionGroup = option.parent('optgroup')[0]; + optionGroupLabel = optionGroup && optionGroup.label; + optionIsLabel = false; + if (optionGroup) { + if (optionGroup !== previousGroup) { + optionIsLabel = true; + previousGroup = optionGroup; + values.push({ + groupLabel: optionGroupLabel, + isLabel: optionIsLabel + }); + } + } + values.push({ + value: option[0].value, + text: option[0].textContent.trim(), + selected: option[0].selected, + group: optionGroup, + groupLabel: optionGroupLabel, + image: optionImage, + icon: optionIcon, + color: optionColor, + className: optionClassName, + disabled: option[0].disabled, + inputType: inputType, + id: id, + hasMedia: optionHasMedia, + checkbox: inputType === 'checkbox', + inputName: inputName, + material: app.params.material + }); + } + + + // Item template/HTML + if (!app._compiledTemplates.smartSelectItem) { + app._compiledTemplates.smartSelectItem = t7.compile(app.params.smartSelectItemTemplate || + '{{#if isLabel}}' + + '
                                                    • {{groupLabel}}
                                                    • ' + + '{{else}}' + + '' + + '' + + '' + + '{{/if}}' + ); + } + var smartSelectItemTemplate = app._compiledTemplates.smartSelectItem; + + var inputsHTML = ''; + if (!virtualList) { + for (var j = 0; j < values.length; j++) { + inputsHTML += smartSelectItemTemplate(values[j]); + } + } + + // Toolbar / Navbar + var toolbarHTML = '', navbarHTML; + var noNavbar = '', noToolbar = '', noTabbar = '', navbarLayout; + + if (openIn === 'picker') { + if (!app._compiledTemplates.smartSelectToolbar) { + app._compiledTemplates.smartSelectToolbar = t7.compile(app.params.smartSelectToolbarTemplate || + '
                                                      ' + + '
                                                      ' + + '
                                                      ' + + '' + + '
                                                      ' + + '
                                                      ' + ); + } + + toolbarHTML = app._compiledTemplates.smartSelectToolbar({ + pageTitle: pageTitle, + closeText: closeText, + openIn: openIn, + toolbarTheme: toolbarTheme, + inPicker: openIn === 'picker' + }); + } + else { + // Navbar HTML + if (!app._compiledTemplates.smartSelectNavbar) { + app._compiledTemplates.smartSelectNavbar = t7.compile(app.params.smartSelectNavbarTemplate || + '' + ); + } + navbarHTML = app._compiledTemplates.smartSelectNavbar({ + pageTitle: pageTitle, + backText: backText, + closeText: closeText, + openIn: openIn, + navbarTheme: navbarTheme, + inPopup: openIn === 'popup', + inPage: openIn === 'page', + leftTemplate: openIn === 'popup' ? + (app.params.smartSelectPopupCloseTemplate || (material ? '
                                                      ' : '')).replace(/{{closeText}}/g, closeText) : + (app.params.smartSelectBackTemplate || (material ? '
                                                      ' : '')).replace(/{{backText}}/g, backText) + }); + // Determine navbar layout type - static/fixed/through + if (openIn === 'page') { + navbarLayout = 'static'; + if (smartSelect.parents('.navbar-through').length > 0) navbarLayout = 'through'; + if (smartSelect.parents('.navbar-fixed').length > 0) navbarLayout = 'fixed'; + noToolbar = smartSelect.parents('.page').hasClass('no-toolbar') ? 'no-toolbar' : ''; + noNavbar = smartSelect.parents('.page').hasClass('no-navbar') ? 'no-navbar' : 'navbar-' + navbarLayout; + noTabbar = smartSelect.parents('.page').hasClass('no-tabbar') ? 'no-tabbar' : ''; + } + else { + navbarLayout = 'fixed'; + } + } + + + // Page Layout + var pageName = 'smart-select-' + inputName; + + var useSearchbar = typeof smartSelect.data('searchbar') === 'undefined' ? app.params.smartSelectSearchbar : (smartSelect.data('searchbar') === 'true' ? true : false); + var searchbarPlaceholder, searchbarCancel; + + if (useSearchbar) { + searchbarPlaceholder = smartSelect.data('searchbar-placeholder') || 'Search'; + searchbarCancel = smartSelect.data('searchbar-cancel') || 'Cancel'; + } + + var searchbarHTML = '' + + '
                                                      '; + + var pageHTML = + (openIn !== 'picker' && navbarLayout === 'through' ? navbarHTML : '') + + '
                                                      ' + + '
                                                      ' + + (openIn !== 'picker' && navbarLayout === 'fixed' ? navbarHTML : '') + + (useSearchbar ? searchbarHTML : '') + + '
                                                      ' + + (openIn !== 'picker' && navbarLayout === 'static' ? navbarHTML : '') + + '
                                                      ' + + '
                                                        ' + + (virtualList ? '' : inputsHTML) + + '
                                                      ' + + '
                                                      ' + + '
                                                      ' + + '
                                                      ' + + '
                                                      '; + + // Define popup and picker + var popup, picker; + + // Scroll SS Picker To Input + function scrollToInput() { + var pageContent = smartSelect.parents('.page-content'); + if (pageContent.length === 0) return; + var paddingTop = parseInt(pageContent.css('padding-top'), 10), + paddingBottom = parseInt(pageContent.css('padding-bottom'), 10), + pageHeight = pageContent[0].offsetHeight - paddingTop - picker.height(), + pageScrollHeight = pageContent[0].scrollHeight - paddingTop - picker.height(), + newPaddingBottom; + var inputTop = smartSelect.offset().top - paddingTop + smartSelect[0].offsetHeight; + if (inputTop > pageHeight) { + var scrollTop = pageContent.scrollTop() + inputTop - pageHeight; + if (scrollTop + pageHeight > pageScrollHeight) { + newPaddingBottom = scrollTop + pageHeight - pageScrollHeight + paddingBottom; + if (pageHeight === pageScrollHeight) { + newPaddingBottom = picker.height(); + } + pageContent.css({'padding-bottom': (newPaddingBottom) + 'px'}); + } + pageContent.scrollTop(scrollTop, 300); + } + } + // Close SS Picker on HTML Click + function closeOnHTMLClick(e) { + var close = true; + if (e.target === smartSelect[0] || $(e.target).parents(smartSelect[0]).length > 0) { + close = false; + } + if ($(e.target).parents('.picker-modal').length > 0) { + close = false; + } + if (close) { + app.closeModal('.smart-select-picker.modal-in'); + } + } + + // Check max length + function checkMaxLength(container) { + if (select.selectedOptions.length >= maxLength) { + container.find('input[type="checkbox"]').each(function () { + if (!this.checked) { + $(this).parents('li').addClass('disabled'); + } + else { + $(this).parents('li').removeClass('disabled'); + } + }); + } + else { + container.find('.disabled').removeClass('disabled'); + } + } + // Event Listeners on new page + function handleInputs(container) { + container = $(container); + if (virtualList) { + var virtualListInstance = app.virtualList(container.find('.virtual-list'), { + items: values, + template: smartSelectItemTemplate, + height: virtualListHeight || undefined, + searchByItem: function (query, index, item) { + if (item.text && item.text.toLowerCase().indexOf(query.trim().toLowerCase()) >=0 ) return true; + return false; + } + }); + container.once(openIn === 'popup' || openIn === 'picker' ? 'closed': 'pageBeforeRemove', function () { + if (virtualListInstance && virtualListInstance.destroy) virtualListInstance.destroy(); + }); + } + if (maxLength) { + checkMaxLength(container); + } + if (backOnSelect) { + container.find('input[type="radio"][name="' + inputName + '"]:checked').parents('label').once('click', function () { + if (openIn === 'popup') app.closeModal(popup); + else if (openIn === 'picker') app.closeModal(picker); + else view.router.back(); + }); + } + container.on('change', 'input[name="' + inputName + '"]', function () { + var option, text; + var input = this; + var value = input.value; + var optionText = []; + var displayAs; + if (input.type === 'checkbox') { + var values = []; + for (var i = 0; i < select.options.length; i++) { + option = select.options[i]; + if (option.value === value) { + option.selected = input.checked; + } + if (option.selected) { + displayAs = option.dataset ? option.dataset.displayAs : $(option).data('display-as'); + text = displayAs && typeof displayAs !== 'undefined' ? displayAs : option.textContent; + optionText.push(text.trim()); + } + } + if (maxLength) { + checkMaxLength(container); + } + } + else { + option = smartSelect.find('option[value="' + value + '"]')[0]; + displayAs = option.dataset ? option.dataset.displayAs : $(option).data('display-as'); + text = displayAs && typeof displayAs !== 'undefined' ? displayAs : option.textContent; + optionText = [text]; + select.value = value; + } + + $select.trigger('change'); + smartSelect.find('.item-after').text(optionText.join(', ')); + if (backOnSelect && inputType === 'radio') { + if (openIn === 'popup') app.closeModal(popup); + else if (openIn === 'picker') app.closeModal(picker); + else view.router.back(); + } + }); + } + function pageInit(e) { + var page = e.detail.page; + if (page.name === pageName) { + handleInputs(page.container); + } + } + if (openIn === 'popup') { + if (reLayout) { + popup = $('.popup.smart-select-popup .view'); + popup.html(pageHTML); + } + else { + popup = app.popup( + '' + ); + popup = $(popup); + } + app.initPage(popup.find('.page')); + handleInputs(popup); + } + else if (openIn === 'picker') { + if (reLayout) { + picker = $('.picker-modal.smart-select-picker .view'); + picker.html(pageHTML); + } + else { + picker = app.pickerModal( + '
                                                      ' + + toolbarHTML + + '
                                                      ' + + '
                                                      ' + + pageHTML + + '
                                                      ' + + '
                                                      ' + + '
                                                      ' + ); + picker = $(picker); + + // Scroll To Input + scrollToInput(); + + // Close On Click + $('html').on('click', closeOnHTMLClick); + + // On Close + picker.once('picker:close', function () { + // Reset linked picker + smartSelect[0].f7SmartSelectPicker = undefined; + + // Detach html click + $('html').off('click', closeOnHTMLClick); + + // Restore page padding bottom + smartSelect.parents('.page-content').css({paddingBottom: ''}); + }); + + // Link Picker + smartSelect[0].f7SmartSelectPicker = picker[0]; + } + + // Init Page + app.initPage(picker.find('.page')); + + // Attach events + handleInputs(picker); + } + else { + $(document).once('page:init', '.smart-select-page', pageInit); + view.router.load({ + content: pageHTML, + reload: reLayout ? true : undefined + }); + } +}; diff --git a/bower_components/framework7/src/js/framework7/sortable.js b/bower_components/framework7/src/js/framework7/sortable.js new file mode 100644 index 00000000..8fd7bee4 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/sortable.js @@ -0,0 +1,130 @@ +/*=============================================================================== +************ Sortable ************ +===============================================================================*/ +app.sortableToggle = function (sortableContainer) { + sortableContainer = $(sortableContainer); + if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable'); + sortableContainer.toggleClass('sortable-opened'); + if (sortableContainer.hasClass('sortable-opened')) { + sortableContainer.trigger('open sortable:open'); + } + else { + sortableContainer.trigger('close sortable:close'); + } + return sortableContainer; +}; +app.sortableOpen = function (sortableContainer) { + sortableContainer = $(sortableContainer); + if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable'); + sortableContainer.addClass('sortable-opened'); + sortableContainer.trigger('open sortable:open'); + return sortableContainer; +}; +app.sortableClose = function (sortableContainer) { + sortableContainer = $(sortableContainer); + if (sortableContainer.length === 0) sortableContainer = $('.list-block.sortable'); + sortableContainer.removeClass('sortable-opened'); + sortableContainer.trigger('close sortable:close'); + return sortableContainer; +}; +app.initSortable = function () { + var isTouched, isMoved, touchStartY, touchesDiff, sortingEl, sortingElHeight, sortingItems, minTop, maxTop, insertAfter, insertBefore, sortableContainer, startIndex; + + function handleTouchStart(e) { + isMoved = false; + isTouched = true; + touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + /*jshint validthis:true */ + sortingEl = $(this).parent(); + startIndex = sortingEl.index(); + sortingItems = sortingEl.parent().children('li'); + sortableContainer = sortingEl.parents('.sortable'); + e.preventDefault(); + app.allowPanelOpen = app.allowSwipeout = false; + } + function handleTouchMove(e) { + if (!isTouched || !sortingEl) return; + var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (!isMoved) { + sortingEl.addClass('sorting'); + sortableContainer.addClass('sortable-sorting'); + minTop = sortingEl[0].offsetTop; + maxTop = sortingEl.parent().height() - sortingEl[0].offsetTop - sortingEl.height(); + sortingElHeight = sortingEl[0].offsetHeight; + } + isMoved = true; + + e.preventDefault(); + e.f7PreventPanelSwipe = true; + touchesDiff = pageY - touchStartY; + var translate = touchesDiff; + if (translate < -minTop) translate = -minTop; + if (translate > maxTop) translate = maxTop; + sortingEl.transform('translate3d(0,' + translate + 'px,0)'); + + insertBefore = insertAfter = undefined; + + sortingItems.each(function () { + var currentEl = $(this); + if (currentEl[0] === sortingEl[0]) return; + var currentElOffset = currentEl[0].offsetTop; + var currentElHeight = currentEl.height(); + var sortingElOffset = sortingEl[0].offsetTop + translate; + + if ((sortingElOffset >= currentElOffset - currentElHeight / 2) && sortingEl.index() < currentEl.index()) { + currentEl.transform('translate3d(0, '+(-sortingElHeight)+'px,0)'); + insertAfter = currentEl; + insertBefore = undefined; + } + else if ((sortingElOffset <= currentElOffset + currentElHeight / 2) && sortingEl.index() > currentEl.index()) { + currentEl.transform('translate3d(0, '+(sortingElHeight)+'px,0)'); + insertAfter = undefined; + if (!insertBefore) insertBefore = currentEl; + } + else { + $(this).transform('translate3d(0, 0%,0)'); + } + }); + } + function handleTouchEnd(e) { + app.allowPanelOpen = app.allowSwipeout = true; + if (!isTouched || !isMoved) { + isTouched = false; + isMoved = false; + return; + } + e.preventDefault(); + sortingItems.transform(''); + sortingEl.removeClass('sorting'); + sortableContainer.removeClass('sortable-sorting'); + var virtualList, oldIndex, newIndex; + if (insertAfter) { + sortingEl.insertAfter(insertAfter); + sortingEl.trigger('sort sortable:sort', {startIndex: startIndex, newIndex: sortingEl.index()}); + } + if (insertBefore) { + sortingEl.insertBefore(insertBefore); + sortingEl.trigger('sort sortable:sort', {startIndex: startIndex, newIndex: sortingEl.index()}); + } + if ((insertAfter || insertBefore) && sortableContainer.hasClass('virtual-list')) { + virtualList = sortableContainer[0].f7VirtualList; + oldIndex = sortingEl[0].f7VirtualListIndex; + newIndex = insertBefore ? insertBefore[0].f7VirtualListIndex : insertAfter[0].f7VirtualListIndex; + if (virtualList) virtualList.moveItem(oldIndex, newIndex); + } + insertAfter = insertBefore = undefined; + isTouched = false; + isMoved = false; + } + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + $(document).on(app.touchEvents.start, '.list-block.sortable .sortable-handler', handleTouchStart, activeListener); + if (app.support.touch) { + $(document).on(app.touchEvents.move, '.list-block.sortable .sortable-handler', handleTouchMove, activeListener); + $(document).on(app.touchEvents.end, '.list-block.sortable .sortable-handler', handleTouchEnd, activeListener); + } + else { + $(document).on(app.touchEvents.move, handleTouchMove, activeListener); + $(document).on(app.touchEvents.end, handleTouchEnd, activeListener); + } +}; diff --git a/bower_components/framework7/src/js/framework7/swipeout.js b/bower_components/framework7/src/js/framework7/swipeout.js new file mode 100644 index 00000000..46374be0 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/swipeout.js @@ -0,0 +1,404 @@ +/*=============================================================================== +************ Swipeout Actions (Swipe to delete) ************ +===============================================================================*/ +app.swipeoutOpenedEl = undefined; +app.allowSwipeout = true; +app.initSwipeout = function (swipeoutEl) { + var isTouched, isMoved, isScrolling, touchesStart = {}, touchStartTime, touchesDiff, swipeOutEl, swipeOutContent, actionsRight, actionsLeft, actionsLeftWidth, actionsRightWidth, translate, opened, openedActions, buttonsLeft, buttonsRight, direction, overswipeLeftButton, overswipeRightButton, overswipeLeft, overswipeRight, noFoldLeft, noFoldRight; + + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + + $(document).on(app.touchEvents.start, function (e) { + if (app.swipeoutOpenedEl) { + var target = $(e.target); + if (!( + app.swipeoutOpenedEl.is(target[0]) || + target.parents('.swipeout').is(app.swipeoutOpenedEl) || + target.hasClass('modal-in') || + target.hasClass('modal-overlay') || + target.hasClass('actions-modal') || + target.parents('.actions-modal.modal-in, .modal.modal-in').length > 0 + )) { + app.swipeoutClose(app.swipeoutOpenedEl); + } + } + }, activeListener); + + function handleTouchStart(e) { + if (!app.allowSwipeout) return; + isMoved = false; + isTouched = true; + isScrolling = undefined; + touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = (new Date()).getTime(); + } + function handleTouchMove(e) { + if (!isTouched) return; + var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (typeof isScrolling === 'undefined') { + isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x)); + } + if (isScrolling) { + isTouched = false; + return; + } + + if (!isMoved) { + if ($('.list-block.sortable-opened').length > 0) return; + /*jshint validthis:true */ + swipeOutEl = $(this); + swipeOutContent = swipeOutEl.find('.swipeout-content'); + actionsRight = swipeOutEl.find('.swipeout-actions-right'); + actionsLeft = swipeOutEl.find('.swipeout-actions-left'); + actionsLeftWidth = actionsRightWidth = buttonsLeft = buttonsRight = overswipeRightButton = overswipeLeftButton = null; + noFoldLeft = actionsLeft.hasClass('swipeout-actions-no-fold') || app.params.swipeoutActionsNoFold; + noFoldRight = actionsRight.hasClass('swipeout-actions-no-fold') || app.params.swipeoutActionsNoFold; + if (actionsLeft.length > 0) { + actionsLeftWidth = actionsLeft.outerWidth(); + buttonsLeft = actionsLeft.children('a'); + overswipeLeftButton = actionsLeft.find('.swipeout-overswipe'); + } + if (actionsRight.length > 0) { + actionsRightWidth = actionsRight.outerWidth(); + buttonsRight = actionsRight.children('a'); + overswipeRightButton = actionsRight.find('.swipeout-overswipe'); + } + opened = swipeOutEl.hasClass('swipeout-opened'); + if (opened) { + openedActions = swipeOutEl.find('.swipeout-actions-left.swipeout-actions-opened').length > 0 ? 'left' : 'right'; + } + swipeOutEl.removeClass('transitioning'); + if (!app.params.swipeoutNoFollow) { + swipeOutEl.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened'); + swipeOutEl.removeClass('swipeout-opened'); + } + } + isMoved = true; + e.preventDefault(); + + touchesDiff = pageX - touchesStart.x; + translate = touchesDiff; + + if (opened) { + if (openedActions === 'right') translate = translate - actionsRightWidth; + else translate = translate + actionsLeftWidth; + } + + if (translate > 0 && actionsLeft.length === 0 || translate < 0 && actionsRight.length === 0) { + if (!opened) { + isTouched = isMoved = false; + swipeOutContent.transform(''); + if (buttonsRight && buttonsRight.length > 0) { + buttonsRight.transform(''); + } + if (buttonsLeft && buttonsLeft.length > 0) { + buttonsLeft.transform(''); + } + return; + } + translate = 0; + } + + if (translate < 0) direction = 'to-left'; + else if (translate > 0) direction = 'to-right'; + else { + if (!direction) direction = 'to-left'; + } + + var i, buttonOffset, progress; + + e.f7PreventPanelSwipe = true; + if (app.params.swipeoutNoFollow) { + if (opened) { + if (openedActions === 'right' && touchesDiff > 0) { + app.swipeoutClose(swipeOutEl); + } + if (openedActions === 'left' && touchesDiff < 0) { + app.swipeoutClose(swipeOutEl); + } + } + else { + if (touchesDiff < 0 && actionsRight.length > 0) { + app.swipeoutOpen(swipeOutEl, 'right'); + } + if (touchesDiff > 0 && actionsLeft.length > 0) { + app.swipeoutOpen(swipeOutEl, 'left'); + } + } + isTouched = false; + isMoved = false; + return; + } + overswipeLeft = false; + overswipeRight = false; + var $button; + if (actionsRight.length > 0) { + // Show right actions + progress = translate / actionsRightWidth; + if (translate < -actionsRightWidth) { + translate = -actionsRightWidth - Math.pow(-translate - actionsRightWidth, 0.8); + if (overswipeRightButton.length > 0) { + overswipeRight = true; + } + } + for (i = 0; i < buttonsRight.length; i++) { + if (typeof buttonsRight[i]._buttonOffset === 'undefined') { + buttonsRight[i]._buttonOffset = buttonsRight[i].offsetLeft; + } + buttonOffset = buttonsRight[i]._buttonOffset; + $button = $(buttonsRight[i]); + if (overswipeRightButton.length > 0 && $button.hasClass('swipeout-overswipe')) { + $button.css({left: (overswipeRight ? -buttonOffset : 0) + 'px'}); + if (overswipeRight) { + $button.addClass('swipeout-overswipe-active'); + } + else { + $button.removeClass('swipeout-overswipe-active'); + } + } + $button.transform('translate3d(' + (translate - buttonOffset * (1 + Math.max(progress, -1))) + 'px,0,0)'); + } + } + if (actionsLeft.length > 0) { + // Show left actions + progress = translate / actionsLeftWidth; + if (translate > actionsLeftWidth) { + translate = actionsLeftWidth + Math.pow(translate - actionsLeftWidth, 0.8); + if (overswipeLeftButton.length > 0) { + overswipeLeft = true; + } + } + for (i = 0; i < buttonsLeft.length; i++) { + if (typeof buttonsLeft[i]._buttonOffset === 'undefined') { + buttonsLeft[i]._buttonOffset = actionsLeftWidth - buttonsLeft[i].offsetLeft - buttonsLeft[i].offsetWidth; + } + buttonOffset = buttonsLeft[i]._buttonOffset; + $button = $(buttonsLeft[i]); + if (overswipeLeftButton.length > 0 && $button.hasClass('swipeout-overswipe')) { + $button.css({left: (overswipeLeft ? buttonOffset : 0) + 'px'}); + if (overswipeLeft) { + $button.addClass('swipeout-overswipe-active'); + } + else { + $button.removeClass('swipeout-overswipe-active'); + } + } + if (buttonsLeft.length > 1) { + $button.css('z-index', buttonsLeft.length - i); + } + $button.transform('translate3d(' + (translate + buttonOffset * (1 - Math.min(progress, 1))) + 'px,0,0)'); + } + } + swipeOutContent.transform('translate3d(' + translate + 'px,0,0)'); + } + function handleTouchEnd(e) { + if (!isTouched || !isMoved) { + isTouched = false; + isMoved = false; + return; + } + + isTouched = false; + isMoved = false; + var timeDiff = (new Date()).getTime() - touchStartTime; + var action, actionsWidth, actions, buttons, i; + + actions = direction === 'to-left' ? actionsRight : actionsLeft; + actionsWidth = direction === 'to-left' ? actionsRightWidth : actionsLeftWidth; + + if ( + timeDiff < 300 && (touchesDiff < -10 && direction === 'to-left' || touchesDiff > 10 && direction === 'to-right') || + timeDiff >= 300 && Math.abs(translate) > actionsWidth / 2 + ) { + action = 'open'; + } + else { + action = 'close'; + } + if (timeDiff < 300) { + if (Math.abs(translate) === 0) action = 'close'; + if (Math.abs(translate) === actionsWidth) action = 'open'; + } + + if (action === 'open') { + app.swipeoutOpenedEl = swipeOutEl; + swipeOutEl.trigger('open swipeout:open'); + swipeOutEl.addClass('swipeout-opened transitioning'); + var newTranslate = direction === 'to-left' ? -actionsWidth : actionsWidth; + swipeOutContent.transform('translate3d(' + newTranslate + 'px,0,0)'); + actions.addClass('swipeout-actions-opened'); + buttons = direction === 'to-left' ? buttonsRight : buttonsLeft; + if (buttons) { + for (i = 0; i < buttons.length; i++) { + $(buttons[i]).transform('translate3d(' + newTranslate + 'px,0,0)'); + } + } + if (overswipeRight) { + actionsRight.find('.swipeout-overswipe')[0].click(); + } + if (overswipeLeft) { + actionsLeft.find('.swipeout-overswipe')[0].click(); + } + } + else { + swipeOutEl.trigger('close swipeout:close'); + app.swipeoutOpenedEl = undefined; + swipeOutEl.addClass('transitioning').removeClass('swipeout-opened'); + swipeOutContent.transform(''); + actions.removeClass('swipeout-actions-opened'); + } + + var buttonOffset; + if (buttonsLeft && buttonsLeft.length > 0 && buttonsLeft !== buttons) { + for (i = 0; i < buttonsLeft.length; i++) { + buttonOffset = buttonsLeft[i]._buttonOffset; + if (typeof buttonOffset === 'undefined') { + buttonsLeft[i]._buttonOffset = actionsLeftWidth - buttonsLeft[i].offsetLeft - buttonsLeft[i].offsetWidth; + } + $(buttonsLeft[i]).transform('translate3d(' + (buttonOffset) + 'px,0,0)'); + } + } + if (buttonsRight && buttonsRight.length > 0 && buttonsRight !== buttons) { + for (i = 0; i < buttonsRight.length; i++) { + buttonOffset = buttonsRight[i]._buttonOffset; + if (typeof buttonOffset === 'undefined') { + buttonsRight[i]._buttonOffset = buttonsRight[i].offsetLeft; + } + $(buttonsRight[i]).transform('translate3d(' + (-buttonOffset) + 'px,0,0)'); + } + } + swipeOutContent.transitionEnd(function (e) { + if (opened && action === 'open' || closed && action === 'close') return; + swipeOutEl.trigger(action === 'open' ? 'opened' : 'closed'); + if (opened && action === 'close') { + if (actionsRight.length > 0) { + buttonsRight.transform(''); + } + if (actionsLeft.length > 0) { + buttonsLeft.transform(''); + } + } + }); + } + if (swipeoutEl) { + $(swipeoutEl).on(app.touchEvents.start, handleTouchStart, activeListener); + $(swipeoutEl).on(app.touchEvents.move, handleTouchMove, activeListener); + $(swipeoutEl).on(app.touchEvents.end, handleTouchEnd, activeListener); + } + else { + $(document).on(app.touchEvents.start, '.list-block li.swipeout', handleTouchStart, activeListener); + $(document).on(app.touchEvents.move, '.list-block li.swipeout', handleTouchMove, activeListener); + $(document).on(app.touchEvents.end, '.list-block li.swipeout', handleTouchEnd, activeListener); + } + +}; +app.swipeoutOpen = function (el, dir, callback) { + el = $(el); + if (arguments.length === 2) { + if (typeof arguments[1] === 'function') { + callback = dir; + } + } + + if (el.length === 0) return; + if (el.length > 1) el = $(el[0]); + if (!el.hasClass('swipeout') || el.hasClass('swipeout-opened')) return; + if (!dir) { + if (el.find('.swipeout-actions-right').length > 0) dir = 'right'; + else dir = 'left'; + } + var swipeOutActions = el.find('.swipeout-actions-' + dir); + if (swipeOutActions.length === 0) return; + el.trigger('open swipeout:open').addClass('swipeout-opened').removeClass('transitioning'); + swipeOutActions.addClass('swipeout-actions-opened'); + var buttons = swipeOutActions.children('a'); + var swipeOutActionsWidth = swipeOutActions.outerWidth(); + var translate = dir === 'right' ? -swipeOutActionsWidth : swipeOutActionsWidth; + var i; + if (buttons.length > 1) { + for (i = 0; i < buttons.length; i++) { + if (dir === 'right') { + $(buttons[i]).transform('translate3d(' + (- buttons[i].offsetLeft) + 'px,0,0)'); + } + else { + $(buttons[i]).css('z-index', buttons.length - i).transform('translate3d(' + (swipeOutActionsWidth - buttons[i].offsetWidth - buttons[i].offsetLeft) + 'px,0,0)'); + } + } + var clientLeft = buttons[1].clientLeft; + } + el.addClass('transitioning'); + for (i = 0; i < buttons.length; i++) { + $(buttons[i]).transform('translate3d(' + (translate) + 'px,0,0)'); + } + el.find('.swipeout-content').transform('translate3d(' + translate + 'px,0,0)').transitionEnd(function () { + el.trigger('opened swipeout:opened'); + if (callback) callback.call(el[0]); + }); + app.swipeoutOpenedEl = el; +}; +app.swipeoutClose = function (el, callback) { + el = $(el); + if (el.length === 0) return; + if (!el.hasClass('swipeout-opened')) return; + var dir = el.find('.swipeout-actions-opened').hasClass('swipeout-actions-right') ? 'right' : 'left'; + var swipeOutActions = el.find('.swipeout-actions-opened').removeClass('swipeout-actions-opened'); + var buttons = swipeOutActions.children('a'); + var swipeOutActionsWidth = swipeOutActions.outerWidth(); + app.allowSwipeout = false; + el.trigger('close swipeout:close'); + el.removeClass('swipeout-opened').addClass('transitioning'); + + var closeTO; + function onSwipeoutClose() { + app.allowSwipeout = true; + if (el.hasClass('swipeout-opened')) return; + el.removeClass('transitioning'); + buttons.transform(''); + el.trigger('closed swipeout:closed'); + if (callback) callback.call(el[0]); + if (closeTO) clearTimeout(closeTO); + } + el.find('.swipeout-content').transform('').transitionEnd(onSwipeoutClose); + closeTO = setTimeout(onSwipeoutClose, 500); + + for (var i = 0; i < buttons.length; i++) { + if (dir === 'right') { + $(buttons[i]).transform('translate3d(' + (-buttons[i].offsetLeft) + 'px,0,0)'); + } + else { + $(buttons[i]).transform('translate3d(' + (swipeOutActionsWidth - buttons[i].offsetWidth - buttons[i].offsetLeft) + 'px,0,0)'); + } + $(buttons[i]).css({left:0 + 'px'}).removeClass('swipeout-overswipe-active'); + } + if (app.swipeoutOpenedEl && app.swipeoutOpenedEl[0] === el[0]) app.swipeoutOpenedEl = undefined; +}; +app.swipeoutDelete = function (el, callback) { + el = $(el); + if (el.length === 0) return; + if (el.length > 1) el = $(el[0]); + app.swipeoutOpenedEl = undefined; + el.trigger('delete swipeout:delete'); + el.css({height: el.outerHeight() + 'px'}); + var clientLeft = el[0].clientLeft; + el.css({height: 0 + 'px'}).addClass('deleting transitioning').transitionEnd(function () { + el.trigger('deleted swipeout:deleted'); + if (callback) callback.call(el[0]); + if (el.parents('.virtual-list').length > 0) { + var virtualList = el.parents('.virtual-list')[0].f7VirtualList; + var virtualIndex = el[0].f7VirtualListIndex; + if (virtualList && typeof virtualIndex !== 'undefined') virtualList.deleteItem(virtualIndex); + } + else { + if (app.params.swipeoutRemoveWithTimeout) { + setTimeout(function () { + el.remove(); + }, 0); + } + else el.remove(); + } + }); + var translate = '-100%'; + el.find('.swipeout-content').transform('translate3d(' + translate + ',0,0)'); +}; diff --git a/bower_components/framework7/src/js/framework7/swiper-init.js b/bower_components/framework7/src/js/framework7/swiper-init.js new file mode 100644 index 00000000..3ee2a441 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/swiper-init.js @@ -0,0 +1,53 @@ +/*=========================== +Framework7 Swiper Additions +===========================*/ +app.swiper = function (container, params) { + return new Swiper(container, params); +}; +app.initPageSwiper = function (pageContainer) { + pageContainer = $(pageContainer); + var swipers = pageContainer.find('.swiper-init, .tabs-swipeable-wrap'); + if (swipers.length === 0) return; + function destroySwiperOnRemove(slider) { + function destroySwiper() { + slider.destroy(); + pageContainer.off('page:beforeremove', destroySwiper); + } + pageContainer.on('page:beforeremove', destroySwiper); + } + swipers.each(function () { + var swiper = $(this), initialSlide; + var params; + if (swiper.hasClass('tabs-swipeable-wrap')) { + swiper.addClass('swiper-container').children('.tabs').addClass('swiper-wrapper').children('.tab').addClass('swiper-slide'); + initialSlide = swiper.children('.tabs').children('.tab.active').index(); + } + if (swiper.data('swiper')) { + params = JSON.parse(swiper.data('swiper')); + } + else { + params = swiper.dataset(); + } + if (typeof params.initialSlide === 'undefined' && typeof initialSlide !== 'undefined') { + params.initialSlide = initialSlide; + } + if (swiper.hasClass('tabs-swipeable-wrap')) { + params.onSlideChangeStart = function (s) { + app.showTab(s.slides.eq(s.activeIndex)); + }; + } + var _slider = app.swiper(swiper[0], params); + destroySwiperOnRemove(_slider); + }); +}; +app.reinitPageSwiper = function (pageContainer) { + pageContainer = $(pageContainer); + var sliders = pageContainer.find('.swiper-init, .tabs-swipeable-wrap'); + if (sliders.length === 0) return; + for (var i = 0; i < sliders.length; i++) { + var sliderInstance = sliders[0].swiper; + if (sliderInstance) { + sliderInstance.update(true); + } + } +}; diff --git a/bower_components/framework7/src/js/framework7/tabs.js b/bower_components/framework7/src/js/framework7/tabs.js new file mode 100644 index 00000000..fc99f279 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/tabs.js @@ -0,0 +1,104 @@ +/* =============================================================================== +************ Tabs ************ +=============================================================================== */ +app.showTab = function (tab, tabLink, animated, force) { + var newTab = $(tab); + if (arguments.length === 2 && typeof arguments[1] === 'boolean') { + tab = arguments[0]; + animated = arguments[1]; + } + if (arguments.length === 3 && typeof arguments[1] === 'boolean' && typeof arguments[2] === 'boolean') { + tab = arguments[0]; + animated = arguments[1]; + force = arguments[2]; + } + if (typeof animated === 'undefined') animated = true; + if (newTab.length === 0) return false; + if (newTab.hasClass('active')) { + if (force) newTab.trigger('show tab:show'); + return false; + } + var tabs = newTab.parent('.tabs'); + if (tabs.length === 0) return false; + + // Return swipeouts in hidden tabs + app.allowSwipeout = true; + + // Animated tabs + var isAnimatedTabs = tabs.parent().hasClass('tabs-animated-wrap'); + if (isAnimatedTabs) { + tabs.parent()[animated ? 'removeClass' : 'addClass']('not-animated'); + var tabTranslate = (app.rtl ? newTab.index() : -newTab.index()) * 100; + tabs.transform('translate3d(' + tabTranslate + '%,0,0)'); + } + + // Swipeable tabs + var isSwipeableTabs = tabs.parent().hasClass('tabs-swipeable-wrap'), swiper; + if (isSwipeableTabs) { + swiper = tabs.parent()[0].swiper; + if (swiper.activeIndex !== newTab.index()) swiper.slideTo(newTab.index(), animated ? undefined : 0, false); + } + + // Remove active class from old tabs + var oldTab = tabs.children('.tab.active').removeClass('active').trigger('hide tab:hide'); + // Add active class to new tab + newTab.addClass('active'); + // Trigger 'show' event on new tab + newTab.trigger('show tab:show'); + + // Update navbars in new tab + if (!isAnimatedTabs && !isSwipeableTabs && newTab.find('.navbar').length > 0) { + // Find tab's view + var viewContainer; + if (newTab.hasClass(app.params.viewClass)) viewContainer = newTab[0]; + else viewContainer = newTab.parents('.' + app.params.viewClass)[0]; + app.sizeNavbars(viewContainer); + } + + // Find related link for new tab + if (tabLink) tabLink = $(tabLink); + else { + // Search by id + if (typeof tab === 'string') tabLink = $('.tab-link[href="' + tab + '"]'); + else tabLink = $('.tab-link[href="#' + newTab.attr('id') + '"]'); + // Search by data-tab + if (!tabLink || tabLink && tabLink.length === 0) { + $('[data-tab]').each(function () { + if (newTab.is($(this).attr('data-tab'))) tabLink = $(this); + }); + } + } + if (tabLink.length === 0) return; + + // Find related link for old tab + var oldTabLink; + if (oldTab && oldTab.length > 0) { + // Search by id + var oldTabId = oldTab.attr('id'); + if (oldTabId) oldTabLink = $('.tab-link[href="#' + oldTabId + '"]'); + // Search by data-tab + if (!oldTabLink || oldTabLink && oldTabLink.length === 0) { + $('[data-tab]').each(function () { + if (oldTab.is($(this).attr('data-tab'))) oldTabLink = $(this); + }); + } + } + + // Update links' classes + if (tabLink && tabLink.length > 0) { + tabLink.addClass('active'); + // Material Highlight + if (app.params.material) { + var tabbar = tabLink.parents('.tabbar'); + if (tabbar.length > 0) { + if (tabbar.find('.tab-link-highlight').length === 0) { + tabbar.find('.toolbar-inner').append(''); + } + app.materialTabbarSetHighlight(tabbar, tabLink); + } + } + } + if (oldTabLink && oldTabLink.length > 0) oldTabLink.removeClass('active'); + + return true; +}; \ No newline at end of file diff --git a/bower_components/framework7/src/js/framework7/template7-templates.js b/bower_components/framework7/src/js/framework7/template7-templates.js new file mode 100644 index 00000000..82a67f0f --- /dev/null +++ b/bower_components/framework7/src/js/framework7/template7-templates.js @@ -0,0 +1,21 @@ +/*=========================== +Compile Template7 Templates On App Init +===========================*/ +app.initTemplate7Templates = function () { + if (!window.Template7) return; + Template7.templates = Template7.templates || app.params.templates || {}; + Template7.data = Template7.data || app.params.template7Data || {}; + Template7.cache = Template7.cache || {}; + + app.templates = Template7.templates; + app.template7Data = Template7.data; + app.template7Cache = Template7.cache; + + // Precompile templates on app init + if (!app.params.precompileTemplates) return; + $('script[type="text/template7"]').each(function () { + var id = $(this).attr('id'); + if (!id) return; + Template7.templates[id] = Template7.compile($(this).html()); + }); +}; diff --git a/bower_components/framework7/src/js/framework7/views.js b/bower_components/framework7/src/js/framework7/views.js new file mode 100644 index 00000000..87ac4888 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/views.js @@ -0,0 +1,682 @@ +/*====================================================== +************ Views ************ +======================================================*/ +app.views = []; +var View = function (selector, params) { + var defaults = { + dynamicNavbar: false, + domCache: false, + linksView: undefined, + reloadPages: false, + uniqueHistory: app.params.uniqueHistory, + uniqueHistoryIgnoreGetParameters: app.params.uniqueHistoryIgnoreGetParameters, + allowDuplicateUrls: app.params.allowDuplicateUrls, + swipeBackPage: app.params.swipeBackPage, + swipeBackPageAnimateShadow: app.params.swipeBackPageAnimateShadow, + swipeBackPageAnimateOpacity: app.params.swipeBackPageAnimateOpacity, + swipeBackPageActiveArea: app.params.swipeBackPageActiveArea, + swipeBackPageThreshold: app.params.swipeBackPageThreshold, + animatePages: app.params.animatePages, + preloadPreviousPage: app.params.preloadPreviousPage + }; + var i; + + // Params + params = params || {}; + + // Disable dynamic navbar for material theme + if (params.dynamicNavbar && app.params.material) params.dynamicNavbar = false; + + // Extend params with defaults + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + // View + var view = this; + view.params = params; + + // Selector + view.selector = selector; + + // Container + var container = $(selector); + view.container = container[0]; + + // Fix Selector + + if (typeof selector !== 'string') { + // Supposed to be HTMLElement or Dom7 + selector = (container.attr('id') ? '#' + container.attr('id') : '') + (container.attr('class') ? '.' + container.attr('class').replace(/ /g, '.').replace('.active', '') : ''); + view.selector = selector; + } + + // Is main + view.main = container.hasClass(app.params.viewMainClass); + + // Content cache + view.contentCache = {}; + + // Context cache + view.contextCache = {}; + + // Pages cache + view.pagesCache = {}; + view.pageElementsCache = {}; + + // Store View in element for easy access + container[0].f7View = view; + + // Pages + view.pagesContainer = container.find('.pages')[0]; + view.initialPages = []; + view.initialPagesUrl = []; + view.initialNavbars = []; + if (view.params.domCache) { + var initialPages = container.find('.page'); + for (i = 0; i < initialPages.length; i++) { + view.initialPages.push(initialPages[i]); + view.initialPagesUrl.push('#' + initialPages.eq(i).attr('data-page')); + } + if (view.params.dynamicNavbar) { + var initialNavbars = container.find('.navbar-inner'); + for (i = 0; i < initialNavbars.length; i++) { + view.initialNavbars.push(initialNavbars[i]); + } + } + + } + + view.allowPageChange = true; + + // Location + var docLocation = document.location.href; + + // History + view.history = []; + var viewURL = docLocation; + var pushStateSeparator = app.params.pushStateSeparator; + var pushStateRoot = app.params.pushStateRoot; + if (app.params.pushState && view.main) { + if (pushStateRoot) { + viewURL = pushStateRoot; + } + else { + if (pushStateSeparator && viewURL.indexOf(pushStateSeparator) >= 0 && viewURL.indexOf(pushStateSeparator + '#') < 0) viewURL = viewURL.split(pushStateSeparator)[0]; + } + + } + + // Active Page + var currentPage, currentPageData; + if (!view.activePage) { + currentPage = $(view.pagesContainer).find('.page-on-center'); + if (currentPage.length === 0) { + currentPage = $(view.pagesContainer).find('.page:not(.cached)'); + currentPage = currentPage.eq(currentPage.length - 1); + } + if (currentPage.length > 0) { + currentPageData = currentPage[0].f7PageData; + } + } + + // View startup URL + if (view.params.domCache && currentPage) { + view.url = container.attr('data-url') || view.params.url || '#' + currentPage.attr('data-page'); + view.pagesCache[view.url] = currentPage.attr('data-page'); + } + else view.url = container.attr('data-url') || view.params.url || viewURL; + + // Update current page Data + if (currentPageData) { + currentPageData.view = view; + currentPageData.url = view.url; + if (view.params.domCache && view.params.dynamicNavbar && !currentPageData.navbarInnerContainer) { + currentPageData.navbarInnerContainer = view.initialNavbars[view.initialPages.indexOf(currentPageData.container)]; + } + view.activePage = currentPageData; + currentPage[0].f7PageData = currentPageData; + } + + // Store to history main view's url + if (view.url) { + view.history.push(view.url); + } + + // Touch events + var isTouched = false, + isMoved = false, + touchesStart = {}, + isScrolling, + activePage = [], + previousPage = [], + viewContainerWidth, + touchesDiff, + allowViewTouchMove = true, + touchStartTime, + activeNavbar = [], + previousNavbar = [], + activeNavElements, + previousNavElements, + activeNavBackIcon, + previousNavBackIcon, + dynamicNavbar, + pageShadow, + pageOpacity, + el; + + view.handleTouchStart = function (e) { + if (!allowViewTouchMove || !view.params.swipeBackPage || isTouched || app.swipeoutOpenedEl || !view.allowPageChange) return; + isMoved = false; + isTouched = true; + isScrolling = undefined; + touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = (new Date()).getTime(); + dynamicNavbar = view.params.dynamicNavbar && container.find('.navbar-inner').length > 1; + }; + + view.handleTouchMove = function (e) { + if (!isTouched) return; + var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + if (typeof isScrolling === 'undefined') { + isScrolling = !!(isScrolling || Math.abs(pageY - touchesStart.y) > Math.abs(pageX - touchesStart.x)); + } + if (isScrolling || e.f7PreventSwipeBack || app.preventSwipeBack) { + isTouched = false; + return; + } + if (!isMoved) { + var cancel = false; + // Calc values during first move fired + viewContainerWidth = container.width(); + var target = $(e.target); + var swipeout = target.hasClass('swipeout') ? target : target.parents('.swipeout'); + if (swipeout.length > 0) { + if (!app.rtl && swipeout.find('.swipeout-actions-left').length > 0) cancel = true; + if (app.rtl && swipeout.find('.swipeout-actions-right').length > 0) cancel = true; + } + activePage = target.is('.page') ? target : target.parents('.page'); + if (activePage.hasClass('no-swipeback')) cancel = true; + previousPage = container.find('.page-on-left:not(.cached)'); + var notFromBorder = touchesStart.x - container.offset().left > view.params.swipeBackPageActiveArea; + if (app.rtl) { + notFromBorder = touchesStart.x < container.offset().left - container[0].scrollLeft + viewContainerWidth - view.params.swipeBackPageActiveArea; + } + else { + notFromBorder = touchesStart.x - container.offset().left > view.params.swipeBackPageActiveArea; + } + if (notFromBorder) cancel = true; + if (previousPage.length === 0 || activePage.length === 0) cancel = true; + if (cancel) { + isTouched = false; + return; + } + + if (view.params.swipeBackPageAnimateShadow && !app.device.android) { + pageShadow = activePage.find('.swipeback-page-shadow'); + if (pageShadow.length === 0) { + pageShadow = $('
                                                      '); + activePage.append(pageShadow); + } + } + if (view.params.swipeBackPageAnimateOpacity) { + pageOpacity = previousPage.find('.swipeback-page-opacity'); + if (pageOpacity.length === 0) { + pageOpacity = $('
                                                      '); + previousPage.append(pageOpacity); + } + } + + if (dynamicNavbar) { + activeNavbar = container.find('.navbar-on-center:not(.cached)'); + previousNavbar = container.find('.navbar-on-left:not(.cached)'); + activeNavElements = activeNavbar.find('.left, .center, .right, .subnavbar, .fading'); + previousNavElements = previousNavbar.find('.left, .center, .right, .subnavbar, .fading'); + if (app.params.animateNavBackIcon) { + activeNavBackIcon = activeNavbar.find('.left.sliding .back .icon'); + previousNavBackIcon = previousNavbar.find('.left.sliding .back .icon'); + } + } + + // Close/Hide Any Picker + if ($('.picker-modal.modal-in').length > 0) { + app.closeModal($('.picker-modal.modal-in')); + } + } + e.f7PreventPanelSwipe = true; + isMoved = true; + e.preventDefault(); + + // RTL inverter + var inverter = app.rtl ? -1 : 1; + + // Touches diff + touchesDiff = (pageX - touchesStart.x - view.params.swipeBackPageThreshold) * inverter; + if (touchesDiff < 0) touchesDiff = 0; + var percentage = touchesDiff / viewContainerWidth; + + // Swipe Back Callback + var callbackData = { + percentage: percentage, + activePage: activePage[0], + previousPage: previousPage[0], + activeNavbar: activeNavbar[0], + previousNavbar: previousNavbar[0] + }; + if (view.params.onSwipeBackMove) { + view.params.onSwipeBackMove(callbackData); + } + container.trigger('swipeBackMove swipeback:move', callbackData); + + // Transform pages + var activePageTranslate = touchesDiff * inverter; + var previousPageTranslate = (touchesDiff / 5 - viewContainerWidth / 5) * inverter; + if (app.device.pixelRatio === 1) { + activePageTranslate = Math.round(activePageTranslate); + previousPageTranslate = Math.round(previousPageTranslate); + } + + activePage.transform('translate3d(' + activePageTranslate + 'px,0,0)'); + if (view.params.swipeBackPageAnimateShadow && !app.device.android) pageShadow[0].style.opacity = 1 - 1 * percentage; + + previousPage.transform('translate3d(' + previousPageTranslate + 'px,0,0)'); + if (view.params.swipeBackPageAnimateOpacity) pageOpacity[0].style.opacity = 1 - 1 * percentage; + + // Dynamic Navbars Animation + if (dynamicNavbar) { + var i; + for (i = 0; i < activeNavElements.length; i++) { + el = $(activeNavElements[i]); + if (!el.is('.subnavbar.sliding')) el[0].style.opacity = (1 - percentage * 1.3); + if (el[0].className.indexOf('sliding') >= 0) { + var activeNavTranslate = percentage * el[0].f7NavbarRightOffset; + if (app.device.pixelRatio === 1) activeNavTranslate = Math.round(activeNavTranslate); + el.transform('translate3d(' + activeNavTranslate + 'px,0,0)'); + if (app.params.animateNavBackIcon) { + if (el[0].className.indexOf('left') >= 0 && activeNavBackIcon.length > 0) { + activeNavBackIcon.transform('translate3d(' + -activeNavTranslate + 'px,0,0)'); + } + } + } + } + for (i = 0; i < previousNavElements.length; i++) { + el = $(previousNavElements[i]); + if (!el.is('.subnavbar.sliding')) el[0].style.opacity = percentage * 1.3 - 0.3; + if (el[0].className.indexOf('sliding') >= 0) { + var previousNavTranslate = el[0].f7NavbarLeftOffset * (1 - percentage); + if (app.device.pixelRatio === 1) previousNavTranslate = Math.round(previousNavTranslate); + el.transform('translate3d(' + previousNavTranslate + 'px,0,0)'); + if (app.params.animateNavBackIcon) { + if (el[0].className.indexOf('left') >= 0 && previousNavBackIcon.length > 0) { + previousNavBackIcon.transform('translate3d(' + -previousNavTranslate + 'px,0,0)'); + } + } + } + } + } + }; + + view.handleTouchEnd = function (e) { + if (!isTouched || !isMoved) { + isTouched = false; + isMoved = false; + return; + } + isTouched = false; + isMoved = false; + if (touchesDiff === 0) { + $([activePage[0], previousPage[0]]).transform(''); + if (dynamicNavbar) { + activeNavElements.transform('').css({opacity: ''}); + previousNavElements.transform('').css({opacity: ''}); + if (activeNavBackIcon && activeNavBackIcon.length > 0) activeNavBackIcon.transform(''); + if (previousNavBackIcon && activeNavBackIcon.length > 0) previousNavBackIcon.transform(''); + } + return; + } + var timeDiff = (new Date()).getTime() - touchStartTime; + var pageChanged = false; + // Swipe back to previous page + if ( + timeDiff < 300 && touchesDiff > 10 || + timeDiff >= 300 && touchesDiff > viewContainerWidth / 2 + ) { + activePage.removeClass('page-on-center').addClass('page-on-right'); + previousPage.removeClass('page-on-left').addClass('page-on-center'); + if (dynamicNavbar) { + activeNavbar.removeClass('navbar-on-center').addClass('navbar-on-right'); + previousNavbar.removeClass('navbar-on-left').addClass('navbar-on-center'); + } + pageChanged = true; + } + // Reset custom styles + // Add transitioning class for transition-duration + $([activePage[0], previousPage[0]]).transform('').addClass('page-transitioning'); + if (dynamicNavbar) { + activeNavElements.css({opacity: ''}) + .each(function () { + var translate = pageChanged ? this.f7NavbarRightOffset : 0; + var sliding = $(this); + sliding.transform('translate3d(' + translate + 'px,0,0)'); + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && activeNavBackIcon.length > 0) { + activeNavBackIcon.addClass('page-transitioning').transform('translate3d(' + -translate + 'px,0,0)'); + } + } + + }).addClass('page-transitioning'); + + previousNavElements.transform('').css({opacity: ''}).each(function () { + var translate = pageChanged ? 0 : this.f7NavbarLeftOffset; + var sliding = $(this); + sliding.transform('translate3d(' + translate + 'px,0,0)'); + if (app.params.animateNavBackIcon) { + if (sliding.hasClass('left') && previousNavBackIcon.length > 0) { + previousNavBackIcon.addClass('page-transitioning').transform('translate3d(' + -translate + 'px,0,0)'); + } + } + }).addClass('page-transitioning'); + } + allowViewTouchMove = false; + view.allowPageChange = false; + // Swipe Back Callback + var callbackData = { + activePage: activePage[0], + previousPage: previousPage[0], + activeNavbar: activeNavbar[0], + previousNavbar: previousNavbar[0] + }; + if (pageChanged) { + // Update View's URL + var url = view.history[view.history.length - 2]; + view.url = url; + + // Page before animation callback + app.pageBackCallback('before', view, {pageContainer: activePage[0], url: url, position: 'center', newPage: previousPage, oldPage: activePage, swipeBack: true}); + app.pageAnimCallback('before', view, {pageContainer: previousPage[0], url: url, position: 'left', newPage: previousPage, oldPage: activePage, swipeBack: true}); + + if (view.params.onSwipeBackBeforeChange) { + view.params.onSwipeBackBeforeChange(callbackData); + } + container.trigger('swipeBackBeforeChange swipeback:beforechange', callbackData); + } + else { + if (view.params.onSwipeBackBeforeReset) { + view.params.onSwipeBackBeforeReset(callbackData); + } + container.trigger('swipeBackBeforeReset swipeback:beforereset', callbackData); + } + + activePage.transitionEnd(function () { + $([activePage[0], previousPage[0]]).removeClass('page-transitioning'); + if (dynamicNavbar) { + activeNavElements.removeClass('page-transitioning').css({opacity: ''}); + previousNavElements.removeClass('page-transitioning').css({opacity: ''}); + if (activeNavBackIcon && activeNavBackIcon.length > 0) activeNavBackIcon.removeClass('page-transitioning'); + if (previousNavBackIcon && previousNavBackIcon.length > 0) previousNavBackIcon.removeClass('page-transitioning'); + } + allowViewTouchMove = true; + view.allowPageChange = true; + if (pageChanged) { + if (app.params.pushState && view.main) history.back(); + // Page after animation callback + app.pageBackCallback('after', view, {pageContainer: activePage[0], url: url, position: 'center', newPage: previousPage, oldPage: activePage, swipeBack: true}); + app.pageAnimCallback('after', view, {pageContainer: previousPage[0], url: url, position: 'left', newPage: previousPage, oldPage: activePage, swipeBack: true}); + app.router.afterBack(view, activePage, previousPage); + + if (view.params.onSwipeBackAfterChange) { + view.params.onSwipeBackAfterChange(callbackData); + } + container.trigger('swipeBackAfterChange swipeback:afterchange', callbackData); + } + else { + if (view.params.onSwipeBackAfterReset) { + view.params.onSwipeBackAfterReset(callbackData); + } + container.trigger('swipeBackAfterReset swipeback:afterreset', callbackData); + } + if (pageShadow && pageShadow.length > 0) pageShadow.remove(); + if (pageOpacity && pageOpacity.length > 0) pageOpacity.remove(); + }); + }; + view.attachEvents = function (detach) { + var action = detach ? 'off' : 'on'; + var passiveListener = app.touchEvents.start === 'touchstart' && app.support.passiveListener ? {passive: true, capture: false} : false; + var activeListener = app.support.passiveListener ? {passive: false, capture: false} : false; + container[action](app.touchEvents.start, view.handleTouchStart, passiveListener); + container[action](app.touchEvents.move, view.handleTouchMove, activeListener); + container[action](app.touchEvents.end, view.handleTouchEnd, passiveListener); + }; + view.detachEvents = function () { + view.attachEvents(true); + }; + + // Init + if (view.params.swipeBackPage && !app.params.material) { + view.attachEvents(); + } + + // Check view name to delete unwanted characters + if (view.params.name) view.params.name = view.params.name.replace(/[^a-zA-Z]/g, ''); + + // Add view to app + app.views.push(view); + if (view.main) { + app.mainView = view; + app.views.main = view; + } + else if(view.params.name) { + app[view.params.name + 'View'] = view; + app.views[view.params.name] = view; + } + + // Router + view.router = { + load: function (options) { + return app.router.load(view, options); + }, + back: function (options) { + return app.router.back(view, options); + }, + // Shortcuts + loadPage: function (options) { + options = options || {}; + if (typeof options === 'string') { + var url = options; + options = {}; + if (url && url.indexOf('#') === 0 && view.params.domCache) { + options.pageName = url.split('#')[1]; + } + else options.url = url; + } + return app.router.load(view, options); + }, + loadContent: function (content) { + return app.router.load(view, {content: content}); + }, + reloadPage: function (url) { + return app.router.load(view, {url: url, reload: true}); + }, + reloadContent: function (content) { + return app.router.load(view, {content: content, reload: true}); + }, + reloadPreviousPage: function (url) { + return app.router.load(view, {url: url, reloadPrevious: true, reload: true}); + }, + reloadPreviousContent: function (content) { + return app.router.load(view, {content: content, reloadPrevious: true, reload: true}); + }, + refreshPage: function () { + var options = { + url: view.url, + reload: true, + ignoreCache: true + }; + if (options.url && options.url.indexOf('#') === 0) { + if (view.params.domCache && view.pagesCache[options.url]) { + options.pageName = view.pagesCache[options.url]; + options.url = undefined; + delete options.url; + } + else if (view.contentCache[options.url]) { + options.content = view.contentCache[options.url]; + options.url = undefined; + delete options.url; + } + } + return app.router.load(view, options); + }, + refreshPreviousPage: function () { + var options = { + url: view.history[view.history.length - 2], + reload: true, + reloadPrevious: true, + ignoreCache: true + }; + if (options.url && options.url.indexOf('#') === 0 && view.params.domCache && view.pagesCache[options.url]) { + options.pageName = view.pagesCache[options.url]; + options.url = undefined; + delete options.url; + } + return app.router.load(view, options); + } + }; + + // Aliases for temporary backward compatibility + view.loadPage = view.router.loadPage; + view.loadContent = view.router.loadContent; + view.reloadPage = view.router.reloadPage; + view.reloadContent = view.router.reloadContent; + view.reloadPreviousPage = view.router.reloadPreviousPage; + view.reloadPreviousContent = view.router.reloadPreviousContent; + view.refreshPage = view.router.refreshPage; + view.refreshPreviousPage = view.router.refreshPreviousPage; + view.back = view.router.back; + + // Bars methods + view.hideNavbar = function (animated) { + return app.hideNavbar(container.find('.navbar'), animated); + }; + view.showNavbar = function (animated) { + return app.showNavbar(container.find('.navbar'), animated); + }; + view.hideToolbar = function (animated) { + return app.hideToolbar(container.find('.toolbar'), animated); + }; + view.showToolbar = function (animated) { + return app.showToolbar(container.find('.toolbar'), animated); + }; + + // Push State on load + if (app.params.pushState && app.params.pushStateOnLoad && view.main) { + var pushStateUrl; + var pushStateUrlSplit = docLocation.split(pushStateSeparator)[1]; + if (pushStateRoot) { + pushStateUrl = docLocation.split(app.params.pushStateRoot + pushStateSeparator)[1]; + } + else if (pushStateSeparator && docLocation.indexOf(pushStateSeparator) >= 0 && docLocation.indexOf(pushStateSeparator + '#') < 0) { + pushStateUrl = pushStateUrlSplit; + } + var pushStateAnimatePages = app.params.pushStateNoAnimation ? false : undefined; + var historyState = history.state; + if (pushStateUrl) { + if (pushStateUrl.indexOf('#') >= 0 && view.params.domCache && historyState && historyState.pageName && 'viewIndex' in historyState) { + app.router.load(view, {pageName: historyState.pageName, url: historyState.url, animatePages: pushStateAnimatePages, pushState: false}); + } + else if (pushStateUrl.indexOf('#') >= 0 && view.params.domCache && view.initialPagesUrl.indexOf(pushStateUrl) >= 0) { + app.router.load(view, {pageName: pushStateUrl.replace('#',''), animatePages: pushStateAnimatePages, pushState: false}); + } + else app.router.load(view, {url: pushStateUrl, animatePages: pushStateAnimatePages, pushState: false}); + } + else if (view.params.domCache && docLocation.indexOf(pushStateSeparator + '#') >= 0) { + if (historyState && historyState.pageName && 'viewIndex' in historyState) { + app.router.load(view, {pageName: historyState.pageName, url: historyState.url, animatePages: pushStateAnimatePages, pushState: false}); + } + else if (pushStateSeparator && pushStateUrlSplit.indexOf('#') === 0) { + if (view.initialPagesUrl.indexOf(pushStateUrlSplit)) { + app.router.load(view, {pageName: pushStateUrlSplit.replace('#', ''), animatePages: pushStateAnimatePages, pushState: false}); + } + } + } + } + + // Destroy + view.destroy = function () { + view.detachEvents(); + if (view.main) { + app.mainView = null; + delete app.mainView; + app.views.main = null; + delete app.views.main; + } + else if(view.params.name) { + app[view.params.name + 'View'] = null; + delete app[view.params.name + 'View']; + app.views[view.params.name] = null; + delete app.views[view.params.name]; + } + container.removeAttr('data-page'); + container[0].f7View = null; + delete container[0].f7View; + + app.views.splice(app.views.indexOf(view), 1); + + // Delete props & methods + for (var prop in view) { + if (view.hasOwnProperty(prop)) { + view[prop] = null; + delete view[prop]; + } + } + view = null; + }; + + // Plugin hook + app.pluginHook('addView', view); + + // Return view + return view; +}; + +app.addView = function (selector, params) { + return new View(selector, params); +}; + +app.getCurrentView = function (index) { + var popoverView = $('.popover.modal-in .view'); + var popupView = $('.popup.modal-in .view'); + var panelView = $('.panel.active .view'); + var appViews = $('.views'); + // Find active view as tab + var appView = appViews.children('.view'); + // Propably in tabs or split view + if (appView.length > 1) { + if (appView.hasClass('tab')) { + // Tabs + appView = appViews.children('.view.active'); + } + else { + // Split View, leave appView intact + } + } + if (popoverView.length > 0 && popoverView[0].f7View) return popoverView[0].f7View; + if (popupView.length > 0 && popupView[0].f7View) return popupView[0].f7View; + if (panelView.length > 0 && panelView[0].f7View) return panelView[0].f7View; + if (appView.length > 0) { + if (appView.length === 1 && appView[0].f7View) return appView[0].f7View; + if (appView.length > 1) { + var currentViews = []; + for (var i = 0; i < appView.length; i++) { + if (appView[i].f7View) currentViews.push(appView[i].f7View); + } + if (currentViews.length > 0 && typeof index !== 'undefined') return currentViews[index]; + if (currentViews.length > 1) return currentViews; + if (currentViews.length === 1) return currentViews[0]; + return undefined; + } + } + return undefined; +}; diff --git a/bower_components/framework7/src/js/framework7/virtual-list.js b/bower_components/framework7/src/js/framework7/virtual-list.js new file mode 100644 index 00000000..55e02a9c --- /dev/null +++ b/bower_components/framework7/src/js/framework7/virtual-list.js @@ -0,0 +1,513 @@ +/*=============================================================================== +************ Virtual List ************ +===============================================================================*/ +var VirtualList = function (listBlock, params) { + var defaults = { + cols: 1, + height: app.params.material ? 48 : 44, + cache: true, + dynamicHeightBufferSize: 1, + showFilteredItemsOnly: false, + renderExternal: undefined, + template: + '
                                                    • ' + + '
                                                      ' + + '
                                                      ' + + '
                                                      {{this}}
                                                      ' + + '
                                                      ' + + '
                                                      ' + + '
                                                    • ' + }; + params = params || {}; + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + } + + // Preparation + var vl = this; + vl.listBlock = $(listBlock); + vl.params = params; + vl.items = vl.params.items; + if (vl.params.showFilteredItemsOnly) { + vl.filteredItems = []; + } + if (vl.params.template && !vl.params.renderItem) { + if (typeof vl.params.template === 'string') vl.template = t7.compile(vl.params.template); + else if (typeof vl.params.template === 'function') vl.template = vl.params.template; + } + vl.pageContent = vl.listBlock.parents('.page-content'); + + // Bad scroll + var updatableScroll; + if (typeof vl.params.updatableScroll !== 'undefined') { + updatableScroll = vl.params.updatableScroll; + } + else { + updatableScroll = true; + if (app.device.ios && app.device.osVersion.split('.')[0] < 8) { + updatableScroll = false; + } + vl.params.updatableScroll = updatableScroll; + } + + // Append
                                                        + vl.ul = vl.params.ul ? $(vl.params.ul) : vl.listBlock.children('ul'); + if (vl.ul.length === 0) { + vl.listBlock.append('
                                                          '); + vl.ul = vl.listBlock.children('ul'); + } + + // DOM cached items + vl.domCache = {}; + vl.displayDomCache = {}; + + // Temporary DOM Element + vl.tempDomElement = document.createElement('ul'); + + // Last repain position + vl.lastRepaintY = null; + + // Fragment + vl.fragment = document.createDocumentFragment(); + + // Filter + vl.filterItems = function (indexes, resetScrollTop) { + vl.filteredItems = []; + var firstIndex = indexes[0]; + var lastIndex = indexes[indexes.length - 1]; + for (var i = 0; i < indexes.length; i++) { + vl.filteredItems.push(vl.items[indexes[i]]); + } + if (typeof resetScrollTop === 'undefined') resetScrollTop = true; + if (resetScrollTop) { + vl.pageContent[0].scrollTop = 0; + } + vl.update(); + }; + vl.resetFilter = function () { + if (vl.params.showFilteredItemsOnly) { + vl.filteredItems = []; + } + else { + vl.filteredItems = null; + delete vl.filteredItems; + } + vl.update(); + }; + + var pageHeight, rowsPerScreen, rowsBefore, rowsAfter, rowsToRender, maxBufferHeight = 0, listHeight; + var dynamicHeight = typeof vl.params.height === 'function'; + + // Set list size + vl.setListSize = function () { + var items = vl.filteredItems || vl.items; + pageHeight = vl.pageContent[0].offsetHeight; + if (dynamicHeight) { + listHeight = 0; + vl.heights = []; + for (var i = 0; i < items.length; i++) { + var itemHeight = vl.params.height(items[i]); + listHeight += itemHeight; + vl.heights.push(itemHeight); + } + } + else { + listHeight = Math.ceil(items.length / vl.params.cols) * vl.params.height; + rowsPerScreen = Math.ceil(pageHeight / vl.params.height); + rowsBefore = vl.params.rowsBefore || rowsPerScreen * 2; + rowsAfter = vl.params.rowsAfter || rowsPerScreen; + rowsToRender = (rowsPerScreen + rowsBefore + rowsAfter); + maxBufferHeight = rowsBefore / 2 * vl.params.height; + } + + if (updatableScroll) { + vl.ul.css({height: listHeight + 'px'}); + } + }; + + // Render items + vl.render = function (force, forceScrollTop) { + if (force) vl.lastRepaintY = null; + + var scrollTop = -(vl.listBlock[0].getBoundingClientRect().top - vl.pageContent[0].getBoundingClientRect().top); + + if (typeof forceScrollTop !== 'undefined') scrollTop = forceScrollTop; + + if (vl.lastRepaintY === null || Math.abs(scrollTop - vl.lastRepaintY) > maxBufferHeight || (!updatableScroll && (vl.pageContent[0].scrollTop + pageHeight >= vl.pageContent[0].scrollHeight))) { + vl.lastRepaintY = scrollTop; + } + else { + return; + } + + var items = vl.filteredItems || vl.items, + fromIndex, toIndex, heightBeforeFirstItem = 0, heightBeforeLastItem = 0; + if (dynamicHeight) { + var itemTop = 0, j, itemHeight; + maxBufferHeight = pageHeight; + + for (j = 0; j < vl.heights.length; j++) { + itemHeight = vl.heights[j]; + if (typeof fromIndex === 'undefined') { + if (itemTop + itemHeight >= scrollTop - pageHeight * 2 * vl.params.dynamicHeightBufferSize) fromIndex = j; + else heightBeforeFirstItem += itemHeight; + } + + if (typeof toIndex === 'undefined') { + if (itemTop + itemHeight >= scrollTop + pageHeight * 2 * vl.params.dynamicHeightBufferSize || j === vl.heights.length - 1) toIndex = j + 1; + heightBeforeLastItem += itemHeight; + } + itemTop += itemHeight; + } + toIndex = Math.min(toIndex, items.length); + } + else { + fromIndex = (parseInt(scrollTop / vl.params.height) - rowsBefore) * vl.params.cols; + if (fromIndex < 0) { + fromIndex = 0; + } + toIndex = Math.min(fromIndex + rowsToRender * vl.params.cols, items.length); + } + + var topPosition, renderExternalItems = []; + vl.reachEnd = false; + for (var i = fromIndex; i < toIndex; i++) { + var item, index; + // Define real item index + index = vl.items.indexOf(items[i]); + + if (i === fromIndex) vl.currentFromIndex = index; + if (i === toIndex - 1) vl.currentToIndex = index; + if (vl.filteredItems) { + if (vl.items[index] === vl.filteredItems[vl.filteredItems.length - 1]) vl.reachEnd = true; + } + else { + if (index === vl.items.length - 1) vl.reachEnd = true; + } + + // Find items + if (vl.params.renderExternal) { + renderExternalItems.push(items[i]) + } + else { + if (vl.domCache[index]) { + item = vl.domCache[index]; + item.f7VirtualListIndex = index; + } + else { + if (vl.template && !vl.params.renderItem) { + vl.tempDomElement.innerHTML = vl.template(items[i], {index: index}).trim(); + } + else if (vl.params.renderItem) { + vl.tempDomElement.innerHTML = vl.params.renderItem(index, items[i]).trim(); + } + else { + vl.tempDomElement.innerHTML = items[i].toString().trim(); + } + item = vl.tempDomElement.childNodes[0]; + if (vl.params.cache) vl.domCache[index] = item; + item.f7VirtualListIndex = index; + } + } + + // Set item top position + if (i === fromIndex) { + if (dynamicHeight) { + topPosition = heightBeforeFirstItem; + } + else { + topPosition = (i * vl.params.height / vl.params.cols); + } + } + if (!vl.params.renderExternal) { + item.style.top = topPosition + 'px'; + + // Before item insert + if (vl.params.onItemBeforeInsert) vl.params.onItemBeforeInsert(vl, item); + + // Append item to fragment + vl.fragment.appendChild(item); + } + } + + // Update list height with not updatable scroll + if (!updatableScroll) { + if (dynamicHeight) { + vl.ul[0].style.height = heightBeforeLastItem + 'px'; + } + else { + vl.ul[0].style.height = i * vl.params.height / vl.params.cols + 'px'; + } + } + + // Update list html + if (vl.params.renderExternal) { + if (items && items.length === 0) { + vl.reachEnd = true; + } + } + else { + if (vl.params.onBeforeClear) vl.params.onBeforeClear(vl, vl.fragment); + vl.ul[0].innerHTML = ''; + + if (vl.params.onItemsBeforeInsert) vl.params.onItemsBeforeInsert(vl, vl.fragment); + if (items && items.length === 0) { + vl.reachEnd = true; + if (vl.params.emptyTemplate) vl.ul[0].innerHTML = vl.params.emptyTemplate; + } + else { + vl.ul[0].appendChild(vl.fragment); + } + + if (vl.params.onItemsAfterInsert) vl.params.onItemsAfterInsert(vl, vl.fragment); + } + + if (typeof forceScrollTop !== 'undefined' && force) { + vl.pageContent.scrollTop(forceScrollTop, 0); + } + if (vl.params.renderExternal) { + vl.params.renderExternal(vl, { + fromIndex: fromIndex, + toIndex: toIndex, + listHeight: listHeight, + topPosition: topPosition, + items: renderExternalItems + }); + } + }; + + vl.scrollToItem = function (index) { + if (index > vl.items.length) return false; + + var itemTop = 0, listTop; + if (dynamicHeight) { + for (var i = 0; i < index; i++) { + itemTop += vl.heights[i]; + } + } + else { + itemTop = index * vl.params.height; + } + listTop = vl.listBlock[0].offsetTop; + vl.render(true, listTop + itemTop - parseInt(vl.pageContent.css('padding-top'), 10)); + return true; + }; + + // Handle scroll event + vl.handleScroll = function (e) { + vl.render(); + }; + // Handle resize event + vl._isVisible = function (el) { + return !!( el.offsetWidth || el.offsetHeight || el.getClientRects().length ); + }; + vl.handleResize = function (e) { + if (vl._isVisible(vl.listBlock[0])) { + vl.setListSize(); + vl.render(true); + } + }; + + vl.attachEvents = function (detach) { + var action = detach ? 'off' : 'on'; + vl.pageContent[action]('scroll', vl.handleScroll); + vl.listBlock.parents('.tab').eq(0)[action]('tab:show', vl.handleResize); + vl.listBlock.parents('.panel').eq(0)[action]('panel:open', vl.handleResize); + vl.listBlock.parents('.popup').eq(0)[action]('popup:open', vl.handleResize); + app[action === 'on' ? 'onResize' : 'offResize'](vl.handleResize); + }; + + // Init Virtual List + vl.init = function () { + vl.attachEvents(); + vl.setListSize(); + vl.render(); + }; + + // Append + vl.appendItems = function (items) { + for (var i = 0; i < items.length; i++) { + vl.items.push(items[i]); + } + vl.update(); + }; + vl.appendItem = function (item) { + vl.appendItems([item]); + }; + // Replace + vl.replaceAllItems = function (items) { + vl.items = items; + delete vl.filteredItems; + vl.domCache = {}; + vl.update(); + }; + vl.replaceItem = function (index, item) { + vl.items[index] = item; + if (vl.params.cache) delete vl.domCache[index]; + vl.update(); + }; + // Prepend + vl.prependItems = function (items) { + for (var i = items.length - 1; i >= 0; i--) { + vl.items.unshift(items[i]); + } + if (vl.params.cache) { + var newCache = {}; + for (var cached in vl.domCache) { + newCache[parseInt(cached, 10) + items.length] = vl.domCache[cached]; + } + vl.domCache = newCache; + } + vl.update(); + }; + vl.prependItem = function (item) { + vl.prependItems([item]); + }; + + // Move + vl.moveItem = function (oldIndex, newIndex) { + if (oldIndex === newIndex) return; + // remove item from array + var item = vl.items.splice(oldIndex, 1)[0]; + if (newIndex >= vl.items.length) { + // Add item to the end + vl.items.push(item); + newIndex = vl.items.length - 1; + } + else { + // Add item to new index + vl.items.splice(newIndex, 0, item); + } + // Update cache + if (vl.params.cache) { + var newCache = {}; + for (var cached in vl.domCache) { + var cachedIndex = parseInt(cached, 10); + var leftIndex = oldIndex < newIndex ? oldIndex : newIndex; + var rightIndex = oldIndex < newIndex ? newIndex : oldIndex; + var indexShift = oldIndex < newIndex ? -1 : 1; + if (cachedIndex < leftIndex || cachedIndex > rightIndex) newCache[cachedIndex] = vl.domCache[cachedIndex]; + if (cachedIndex === leftIndex) newCache[rightIndex] = vl.domCache[cachedIndex]; + if (cachedIndex > leftIndex && cachedIndex <= rightIndex) newCache[cachedIndex + indexShift] = vl.domCache[cachedIndex]; + } + vl.domCache = newCache; + } + vl.update(); + }; + // Insert before + vl.insertItemBefore = function (index, item) { + if (index === 0) { + vl.prependItem(item); + return; + } + if (index >= vl.items.length) { + vl.appendItem(item); + return; + } + vl.items.splice(index, 0, item); + // Update cache + if (vl.params.cache) { + var newCache = {}; + for (var cached in vl.domCache) { + var cachedIndex = parseInt(cached, 10); + if (cachedIndex >= index) { + newCache[cachedIndex + 1] = vl.domCache[cachedIndex]; + } + } + vl.domCache = newCache; + } + vl.update(); + }; + // Delete + vl.deleteItems = function (indexes) { + var prevIndex, indexShift = 0; + for (var i = 0; i < indexes.length; i++) { + var index = indexes[i]; + if (typeof prevIndex !== 'undefined') { + if (index > prevIndex) { + indexShift = -i; + } + } + index = index + indexShift; + prevIndex = indexes[i]; + // Delete item + var deletedItem = vl.items.splice(index, 1)[0]; + + // Delete from filtered + if (vl.filteredItems && vl.filteredItems.indexOf(deletedItem) >= 0) { + vl.filteredItems.splice(vl.filteredItems.indexOf(deletedItem), 1); + } + // Update cache + if (vl.params.cache) { + var newCache = {}; + for (var cached in vl.domCache) { + var cachedIndex = parseInt(cached, 10); + if (cachedIndex === index) { + delete vl.domCache[index]; + } + else if (parseInt(cached, 10) > index) { + newCache[cachedIndex - 1] = vl.domCache[cached]; + } + else { + newCache[cachedIndex] = vl.domCache[cached]; + } + } + vl.domCache = newCache; + } + } + vl.update(); + }; + vl.deleteAllItems = function () { + vl.items = []; + delete vl.filteredItems; + if (vl.params.cache) vl.domCache = {}; + vl.update(); + }; + vl.deleteItem = function (index) { + vl.deleteItems([index]); + }; + + // Clear cache + vl.clearCache = function () { + vl.domCache = {}; + }; + + // Update Virtual List + vl.update = function () { + vl.setListSize(); + vl.render(true); + }; + + // Destroy + vl.destroy = function () { + vl.attachEvents(true); + delete vl.items; + delete vl.domCache; + }; + + // Init Virtual List + vl.init(); + + // Store vl in container + vl.listBlock[0].f7VirtualList = vl; + return vl; +}; + +// App Method +app.virtualList = function (listBlock, params) { + return new VirtualList(listBlock, params); +}; + +app.reinitVirtualList = function (pageContainer) { + var page = $(pageContainer); + var vlists = page.find('.virtual-list'); + if (vlists.length === 0) return; + for (var i = 0; i < vlists.length; i++) { + var vlistInstance = vlists[i].f7VirtualList; + if (vlistInstance) { + vlistInstance.update(); + } + } +}; diff --git a/bower_components/framework7/src/js/framework7/xhr.js b/bower_components/framework7/src/js/framework7/xhr.js new file mode 100644 index 00000000..81b05b24 --- /dev/null +++ b/bower_components/framework7/src/js/framework7/xhr.js @@ -0,0 +1,65 @@ +/*====================================================== +************ XHR ************ +======================================================*/ +// XHR Caching +app.cache = []; +app.removeFromCache = function (url) { + var index = false; + for (var i = 0; i < app.cache.length; i++) { + if (app.cache[i].url === url) index = i; + } + if (index !== false) app.cache.splice(index, 1); +}; + +// XHR +app.xhr = false; +app.get = function (url, view, ignoreCache, callback) { + // should we ignore get params or not + var _url = url; + if (app.params.cacheIgnoreGetParameters && url.indexOf('?') >= 0) { + _url = url.split('?')[0]; + } + if (app.params.cache && !ignoreCache && url.indexOf('nocache') < 0 && app.params.cacheIgnore.indexOf(_url) < 0) { + // Check is the url cached + for (var i = 0; i < app.cache.length; i++) { + if (app.cache[i].url === _url) { + // Check expiration + if ((new Date()).getTime() - app.cache[i].time < app.params.cacheDuration) { + // Load from cache + callback(app.cache[i].content); + return false; + } + } + } + } + + app.xhr = $.ajax({ + url: url, + method: 'GET', + beforeSend: app.params.onAjaxStart, + complete: function (xhr, status) { + if (status !== 'error' && status !== 'timeout' && (xhr.status >= 200 && xhr.status < 300) || xhr.status === 0) { + if (app.params.cache && xhr.responseText !== '') { + app.removeFromCache(_url); + app.cache.push({ + url: _url, + time: (new Date()).getTime(), + content: xhr.responseText + }); + } + callback(xhr.responseText, false); + } + else { + callback(xhr.responseText, true); + } + if (app.params.onAjaxComplete) app.params.onAjaxComplete(xhr); + }, + error: function (xhr) { + callback(xhr.responseText, true); + if (app.params.onAjaxError) app.params.onAjaxError(xhr); + } + }); + if (view) view.xhr = app.xhr; + + return app.xhr; +}; diff --git a/bower_components/framework7/src/js/swiper/swiper.js b/bower_components/framework7/src/js/swiper/swiper.js new file mode 100644 index 00000000..3199fdc7 --- /dev/null +++ b/bower_components/framework7/src/js/swiper/swiper.js @@ -0,0 +1,4050 @@ +/*=========================== +Swiper +===========================*/ +window.Swiper = function (container, params) { + if (!(this instanceof Swiper)) return new Swiper(container, params); + + var defaults = { + direction: 'horizontal', + touchEventsTarget: 'container', + initialSlide: 0, + speed: 300, + // autoplay + autoplay: false, + autoplayDisableOnInteraction: true, + autoplayStopOnLast: false, + // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView). + iOSEdgeSwipeDetection: false, + iOSEdgeSwipeThreshold: 20, + // Free mode + freeMode: false, + freeModeMomentum: true, + freeModeMomentumRatio: 1, + freeModeMomentumBounce: true, + freeModeMomentumBounceRatio: 1, + freeModeMomentumVelocityRatio: 1, + freeModeSticky: false, + freeModeMinimumVelocity: 0.02, + // Autoheight + autoHeight: false, + // Set wrapper width + setWrapperSize: false, + // Virtual Translate + virtualTranslate: false, + // Effects + effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' + coverflow: { + rotate: 50, + stretch: 0, + depth: 100, + modifier: 1, + slideShadows : true + }, + flip: { + slideShadows : true, + limitRotation: true + }, + cube: { + slideShadows: true, + shadow: true, + shadowOffset: 20, + shadowScale: 0.94 + }, + fade: { + crossFade: false + }, + // Parallax + parallax: false, + // Zoom + zoom: false, + zoomMax: 3, + zoomMin: 1, + zoomToggle: true, + // Scrollbar + scrollbar: null, + scrollbarHide: true, + scrollbarDraggable: false, + scrollbarSnapOnRelease: false, + // Keyboard Mousewheel + keyboardControl: false, + mousewheelControl: false, + mousewheelReleaseOnEdges: false, + mousewheelInvert: false, + mousewheelForceToAxis: false, + mousewheelSensitivity: 1, + mousewheelEventsTarged: 'container', + // Hash Navigation + hashnav: false, + hashnavWatchState: false, + // History + history: false, + // Commong Nav State + replaceState: false, + // Breakpoints + breakpoints: undefined, + // Slides grid + spaceBetween: 0, + slidesPerView: 1, + slidesPerColumn: 1, + slidesPerColumnFill: 'column', + slidesPerGroup: 1, + centeredSlides: false, + slidesOffsetBefore: 0, // in px + slidesOffsetAfter: 0, // in px + // Round length + roundLengths: false, + // Touches + touchRatio: 1, + touchAngle: 45, + simulateTouch: true, + shortSwipes: true, + longSwipes: true, + longSwipesRatio: 0.5, + longSwipesMs: 300, + followFinger: true, + onlyExternal: false, + threshold: 0, + touchMoveStopPropagation: true, + touchReleaseOnEdges: false, + // Unique Navigation Elements + uniqueNavElements: true, + // Pagination + pagination: null, + paginationElement: 'span', + paginationClickable: false, + paginationHide: false, + paginationBulletRender: null, + paginationProgressRender: null, + paginationFractionRender: null, + paginationCustomRender: null, + paginationType: 'bullets', // 'bullets' or 'progress' or 'fraction' or 'custom' + // Resistance + resistance: true, + resistanceRatio: 0.85, + // Next/prev buttons + nextButton: null, + prevButton: null, + // Progress + watchSlidesProgress: false, + watchSlidesVisibility: false, + // Cursor + grabCursor: false, + // Clicks + preventClicks: true, + preventClicksPropagation: true, + slideToClickedSlide: false, + // Lazy Loading + lazyLoading: false, + lazyLoadingInPrevNext: false, + lazyLoadingInPrevNextAmount: 1, + lazyLoadingOnTransitionStart: false, + // Images + preloadImages: true, + updateOnImagesReady: true, + // loop + loop: false, + loopAdditionalSlides: 0, + loopedSlides: null, + // Control + control: undefined, + controlInverse: false, + controlBy: 'slide', //or 'container' + normalizeSlideIndex: true, + // Swiping/no swiping + allowSwipeToPrev: true, + allowSwipeToNext: true, + swipeHandler: null, //'.swipe-handler', + noSwiping: true, + noSwipingClass: 'swiper-no-swiping', + // Passive Listeners + passiveListeners: true, + // NS + containerModifierClass: 'swiper-container-', // NEW + slideClass: 'swiper-slide', + slideActiveClass: 'swiper-slide-active', + slideDuplicateActiveClass: 'swiper-slide-duplicate-active', + slideVisibleClass: 'swiper-slide-visible', + slideDuplicateClass: 'swiper-slide-duplicate', + slideNextClass: 'swiper-slide-next', + slideDuplicateNextClass: 'swiper-slide-duplicate-next', + slidePrevClass: 'swiper-slide-prev', + slideDuplicatePrevClass: 'swiper-slide-duplicate-prev', + wrapperClass: 'swiper-wrapper', + bulletClass: 'swiper-pagination-bullet', + bulletActiveClass: 'swiper-pagination-bullet-active', + buttonDisabledClass: 'swiper-button-disabled', + paginationCurrentClass: 'swiper-pagination-current', + paginationTotalClass: 'swiper-pagination-total', + paginationHiddenClass: 'swiper-pagination-hidden', + paginationProgressbarClass: 'swiper-pagination-progressbar', + paginationClickableClass: 'swiper-pagination-clickable', // NEW + paginationModifierClass: 'swiper-pagination-', // NEW + lazyLoadingClass: 'swiper-lazy', + lazyStatusLoadingClass: 'swiper-lazy-loading', + lazyStatusLoadedClass: 'swiper-lazy-loaded', + lazyPreloaderClass: 'swiper-lazy-preloader', + notificationClass: 'swiper-notification', + preloaderClass: 'preloader', + zoomContainerClass: 'swiper-zoom-container', + + // Observer + observer: false, + observeParents: false, + // Accessibility + a11y: false, + prevSlideMessage: 'Previous slide', + nextSlideMessage: 'Next slide', + firstSlideMessage: 'This is the first slide', + lastSlideMessage: 'This is the last slide', + paginationBulletMessage: 'Go to slide {{index}}', + // Callbacks + runCallbacksOnInit: true + /* + Callbacks: + onInit: function (swiper) + onDestroy: function (swiper) + onBeforeResize: function (swiper) + onAfterResize: function (swiper) + onClick: function (swiper, e) + onTap: function (swiper, e) + onDoubleTap: function (swiper, e) + onSliderMove: function (swiper, e) + onSlideChangeStart: function (swiper) + onSlideChangeEnd: function (swiper) + onTransitionStart: function (swiper) + onTransitionEnd: function (swiper) + onImagesReady: function (swiper) + onProgress: function (swiper, progress) + onTouchStart: function (swiper, e) + onTouchMove: function (swiper, e) + onTouchMoveOpposite: function (swiper, e) + onTouchEnd: function (swiper, e) + onReachBeginning: function (swiper) + onReachEnd: function (swiper) + onSetTransition: function (swiper, duration) + onSetTranslate: function (swiper, translate) + onAutoplayStart: function (swiper) + onAutoplayStop: function (swiper), + onLazyImageLoad: function (swiper, slide, image) + onLazyImageReady: function (swiper, slide, image) + onKeyPress: function (swiper, keyCode) + */ + + }; + var initialVirtualTranslate = params && params.virtualTranslate; + + params = params || {}; + var originalParams = {}; + for (var param in params) { + if (typeof params[param] === 'object' && params[param] !== null && !(params[param].nodeType || params[param] === window || params[param] === document || (typeof Dom7 !== 'undefined' && params[param] instanceof Dom7) || (typeof jQuery !== 'undefined' && params[param] instanceof jQuery))) { + originalParams[param] = {}; + for (var deepParam in params[param]) { + originalParams[param][deepParam] = params[param][deepParam]; + } + } + else { + originalParams[param] = params[param]; + } + } + for (var def in defaults) { + if (typeof params[def] === 'undefined') { + params[def] = defaults[def]; + } + else if (typeof params[def] === 'object') { + for (var deepDef in defaults[def]) { + if (typeof params[def][deepDef] === 'undefined') { + params[def][deepDef] = defaults[def][deepDef]; + } + } + } + } + + // Swiper + var s = this; + + // Params + s.params = params; + s.originalParams = originalParams; + + // Classname + s.classNames = []; + /*========================= + Dom Library and plugins + ===========================*/ + var $ = $; + if (typeof $ !== 'undefined' && typeof Dom7 !== 'undefined'){ + $ = Dom7; + } + if (typeof $ === 'undefined') { + if (typeof Dom7 === 'undefined') { + $ = window.Dom7 || window.Zepto || window.jQuery; + } + else { + $ = Dom7; + } + if (!$) return; + } + // Export it to Swiper instance + s.$ = $; + + /*========================= + Breakpoints + ===========================*/ + s.currentBreakpoint = undefined; + s.getActiveBreakpoint = function () { + //Get breakpoint for window width + if (!s.params.breakpoints) return false; + var breakpoint = false; + var points = [], point; + for ( point in s.params.breakpoints ) { + if (s.params.breakpoints.hasOwnProperty(point)) { + points.push(point); + } + } + points.sort(function (a, b) { + return parseInt(a, 10) > parseInt(b, 10); + }); + for (var i = 0; i < points.length; i++) { + point = points[i]; + if (point >= window.innerWidth && !breakpoint) { + breakpoint = point; + } + } + return breakpoint || 'max'; + }; + s.setBreakpoint = function () { + //Set breakpoint for window width and update parameters + var breakpoint = s.getActiveBreakpoint(); + if (breakpoint && s.currentBreakpoint !== breakpoint) { + var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams; + var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView); + for ( var param in breakPointsParams ) { + s.params[param] = breakPointsParams[param]; + } + s.currentBreakpoint = breakpoint; + if(needsReLoop && s.destroyLoop) { + s.reLoop(true); + } + } + }; + // Set breakpoint on load + if (s.params.breakpoints) { + s.setBreakpoint(); + } + + /*========================= + Preparation - Define Container, Wrapper and Pagination + ===========================*/ + s.container = $(container); + if (s.container.length === 0) return; + if (s.container.length > 1) { + var swipers = []; + s.container.each(function () { + var container = this; + swipers.push(new Swiper(this, params)); + }); + return swipers; + } + + // Save instance in container HTML Element and in data + s.container[0].swiper = s; + s.container.data('swiper', s); + + s.classNames.push(s.params.containerModifierClass + s.params.direction); + + if (s.params.freeMode) { + s.classNames.push(s.params.containerModifierClass + 'free-mode'); + } + if (!s.support.flexbox) { + s.classNames.push(s.params.containerModifierClass + 'no-flexbox'); + s.params.slidesPerColumn = 1; + } + if (s.params.autoHeight) { + s.classNames.push(s.params.containerModifierClass + 'autoheight'); + } + // Enable slides progress when required + if (s.params.parallax || s.params.watchSlidesVisibility) { + s.params.watchSlidesProgress = true; + } + // Max resistance when touchReleaseOnEdges + if (s.params.touchReleaseOnEdges) { + s.params.resistanceRatio = 0; + } + // Coverflow / 3D + if (['cube', 'coverflow', 'flip'].indexOf(s.params.effect) >= 0) { + if (s.support.transforms3d) { + s.params.watchSlidesProgress = true; + s.classNames.push(s.params.containerModifierClass + '3d'); + } + else { + s.params.effect = 'slide'; + } + } + if (s.params.effect !== 'slide') { + s.classNames.push(s.params.containerModifierClass + s.params.effect); + } + if (s.params.effect === 'cube') { + s.params.resistanceRatio = 0; + s.params.slidesPerView = 1; + s.params.slidesPerColumn = 1; + s.params.slidesPerGroup = 1; + s.params.centeredSlides = false; + s.params.spaceBetween = 0; + s.params.virtualTranslate = true; + } + if (s.params.effect === 'fade' || s.params.effect === 'flip') { + s.params.slidesPerView = 1; + s.params.slidesPerColumn = 1; + s.params.slidesPerGroup = 1; + s.params.watchSlidesProgress = true; + s.params.spaceBetween = 0; + if (typeof initialVirtualTranslate === 'undefined') { + s.params.virtualTranslate = true; + } + } + + // Grab Cursor + if (s.params.grabCursor && s.support.touch) { + s.params.grabCursor = false; + } + + // Wrapper + s.wrapper = s.container.children('.' + s.params.wrapperClass); + + // Pagination + if (s.params.pagination) { + s.paginationContainer = $(s.params.pagination); + if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) { + s.paginationContainer = s.container.find(s.params.pagination); + } + + if (s.params.paginationType === 'bullets' && s.params.paginationClickable) { + s.paginationContainer.addClass(s.params.paginationModifierClass + 'clickable'); + } + else { + s.params.paginationClickable = false; + } + s.paginationContainer.addClass(s.params.paginationModifierClass + s.params.paginationType); + } + // Next/Prev Buttons + if (s.params.nextButton || s.params.prevButton) { + if (s.params.nextButton) { + s.nextButton = $(s.params.nextButton); + if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) { + s.nextButton = s.container.find(s.params.nextButton); + } + } + if (s.params.prevButton) { + s.prevButton = $(s.params.prevButton); + if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) { + s.prevButton = s.container.find(s.params.prevButton); + } + } + } + + // Is Horizontal + s.isHorizontal = function () { + return s.params.direction === 'horizontal'; + }; + // s.isH = isH; + + // RTL + s.rtl = s.isHorizontal() && (s.container[0].dir.toLowerCase() === 'rtl' || s.container.css('direction') === 'rtl'); + if (s.rtl) { + s.classNames.push(s.params.containerModifierClass + 'rtl'); + } + + // Wrong RTL support + if (s.rtl) { + s.wrongRTL = s.wrapper.css('display') === '-webkit-box'; + } + + // Columns + if (s.params.slidesPerColumn > 1) { + s.classNames.push(s.params.containerModifierClass + 'multirow'); + } + + // Check for Android + if (s.device.android) { + s.classNames.push(s.params.containerModifierClass + 'android'); + } + + // Add classes + s.container.addClass(s.classNames.join(' ')); + + // Translate + s.translate = 0; + + // Progress + s.progress = 0; + + // Velocity + s.velocity = 0; + + /*========================= + Locks, unlocks + ===========================*/ + s.lockSwipeToNext = function () { + s.params.allowSwipeToNext = false; + if (s.params.allowSwipeToPrev === false && s.params.grabCursor) { + s.unsetGrabCursor(); + } + }; + s.lockSwipeToPrev = function () { + s.params.allowSwipeToPrev = false; + if (s.params.allowSwipeToNext === false && s.params.grabCursor) { + s.unsetGrabCursor(); + } + }; + s.lockSwipes = function () { + s.params.allowSwipeToNext = s.params.allowSwipeToPrev = false; + if (s.params.grabCursor) s.unsetGrabCursor(); + }; + s.unlockSwipeToNext = function () { + s.params.allowSwipeToNext = true; + if (s.params.allowSwipeToPrev === true && s.params.grabCursor) { + s.setGrabCursor(); + } + }; + s.unlockSwipeToPrev = function () { + s.params.allowSwipeToPrev = true; + if (s.params.allowSwipeToNext === true && s.params.grabCursor) { + s.setGrabCursor(); + } + }; + s.unlockSwipes = function () { + s.params.allowSwipeToNext = s.params.allowSwipeToPrev = true; + if (s.params.grabCursor) s.setGrabCursor(); + }; + + /*========================= + Round helper + ===========================*/ + function round(a) { + return Math.floor(a); + } + /*========================= + Set grab cursor + ===========================*/ + s.setGrabCursor = function(moving) { + s.container[0].style.cursor = 'move'; + s.container[0].style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab'; + s.container[0].style.cursor = moving ? '-moz-grabbin' : '-moz-grab'; + s.container[0].style.cursor = moving ? 'grabbing': 'grab'; + }; + s.unsetGrabCursor = function () { + s.container[0].style.cursor = ''; + }; + if (s.params.grabCursor) { + s.setGrabCursor(); + } + /*========================= + Update on Images Ready + ===========================*/ + s.imagesToLoad = []; + s.imagesLoaded = 0; + + s.loadImage = function (imgElement, src, srcset, sizes, checkForComplete, callback) { + var image; + function onReady () { + if (callback) callback(); + } + if (!imgElement.complete || !checkForComplete) { + if (src) { + image = new window.Image(); + image.onload = onReady; + image.onerror = onReady; + if (sizes) { + image.sizes = sizes; + } + if (srcset) { + image.srcset = srcset; + } + if (src) { + image.src = src; + } + } else { + onReady(); + } + + } else {//image already loaded... + onReady(); + } + }; + s.preloadImages = function () { + s.imagesToLoad = s.container.find('img'); + function _onReady() { + if (typeof s === 'undefined' || s === null || !s) return; + if (s.imagesLoaded !== undefined) s.imagesLoaded++; + if (s.imagesLoaded === s.imagesToLoad.length) { + if (s.params.updateOnImagesReady) s.update(); + s.emit('onImagesReady', s); + } + } + for (var i = 0; i < s.imagesToLoad.length; i++) { + s.loadImage(s.imagesToLoad[i], (s.imagesToLoad[i].currentSrc || s.imagesToLoad[i].getAttribute('src')), (s.imagesToLoad[i].srcset || s.imagesToLoad[i].getAttribute('srcset')), s.imagesToLoad[i].sizes || s.imagesToLoad[i].getAttribute('sizes'), true, _onReady); + } + }; + + /*========================= + Autoplay + ===========================*/ + s.autoplayTimeoutId = undefined; + s.autoplaying = false; + s.autoplayPaused = false; + function autoplay() { + var autoplayDelay = s.params.autoplay; + var activeSlide = s.slides.eq(s.activeIndex); + if (activeSlide.attr('data-swiper-autoplay')) { + autoplayDelay = activeSlide.attr('data-swiper-autoplay') || s.params.autoplay; + } + s.autoplayTimeoutId = setTimeout(function () { + if (s.params.loop) { + s.fixLoop(); + s._slideNext(); + s.emit('onAutoplay', s); + } + else { + if (!s.isEnd) { + s._slideNext(); + s.emit('onAutoplay', s); + } + else { + if (!params.autoplayStopOnLast) { + s._slideTo(0); + s.emit('onAutoplay', s); + } + else { + s.stopAutoplay(); + } + } + } + }, autoplayDelay); + } + s.startAutoplay = function () { + if (typeof s.autoplayTimeoutId !== 'undefined') return false; + if (!s.params.autoplay) return false; + if (s.autoplaying) return false; + s.autoplaying = true; + s.emit('onAutoplayStart', s); + autoplay(); + }; + s.stopAutoplay = function (internal) { + if (!s.autoplayTimeoutId) return; + if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId); + s.autoplaying = false; + s.autoplayTimeoutId = undefined; + s.emit('onAutoplayStop', s); + }; + s.pauseAutoplay = function (speed) { + if (s.autoplayPaused) return; + if (s.autoplayTimeoutId) clearTimeout(s.autoplayTimeoutId); + s.autoplayPaused = true; + if (speed === 0) { + s.autoplayPaused = false; + autoplay(); + } + else { + s.wrapper.transitionEnd(function () { + if (!s) return; + s.autoplayPaused = false; + if (!s.autoplaying) { + s.stopAutoplay(); + } + else { + autoplay(); + } + }); + } + }; + /*========================= + Min/Max Translate + ===========================*/ + s.minTranslate = function () { + return (-s.snapGrid[0]); + }; + s.maxTranslate = function () { + return (-s.snapGrid[s.snapGrid.length - 1]); + }; + /*========================= + Slider/slides sizes + ===========================*/ + s.updateAutoHeight = function () { + var activeSlides = []; + var newHeight = 0; + var i; + + // Find slides currently in view + if(s.params.slidesPerView !== 'auto' && s.params.slidesPerView > 1) { + for (i = 0; i < Math.ceil(s.params.slidesPerView); i++) { + var index = s.activeIndex + i; + if(index > s.slides.length) break; + activeSlides.push(s.slides.eq(index)[0]); + } + } else { + activeSlides.push(s.slides.eq(s.activeIndex)[0]); + } + + // Find new height from heighest slide in view + for (i = 0; i < activeSlides.length; i++) { + if (typeof activeSlides[i] !== 'undefined') { + var height = activeSlides[i].offsetHeight; + newHeight = height > newHeight ? height : newHeight; + } + } + + // Update Height + if (newHeight) s.wrapper.css('height', newHeight + 'px'); + }; + s.updateContainerSize = function () { + var width, height; + if (typeof s.params.width !== 'undefined') { + width = s.params.width; + } + else { + width = s.container[0].clientWidth; + } + if (typeof s.params.height !== 'undefined') { + height = s.params.height; + } + else { + height = s.container[0].clientHeight; + } + if (width === 0 && s.isHorizontal() || height === 0 && !s.isHorizontal()) { + return; + } + + //Subtract paddings + width = width - parseInt(s.container.css('padding-left'), 10) - parseInt(s.container.css('padding-right'), 10); + height = height - parseInt(s.container.css('padding-top'), 10) - parseInt(s.container.css('padding-bottom'), 10); + + // Store values + s.width = width; + s.height = height; + s.size = s.isHorizontal() ? s.width : s.height; + }; + + s.updateSlidesSize = function () { + s.slides = s.wrapper.children('.' + s.params.slideClass); + s.snapGrid = []; + s.slidesGrid = []; + s.slidesSizesGrid = []; + + var spaceBetween = s.params.spaceBetween, + slidePosition = -s.params.slidesOffsetBefore, + i, + prevSlideSize = 0, + index = 0; + if (typeof s.size === 'undefined') return; + if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { + spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size; + } + + s.virtualSize = -spaceBetween; + // reset margins + if (s.rtl) s.slides.css({marginLeft: '', marginTop: ''}); + else s.slides.css({marginRight: '', marginBottom: ''}); + + var slidesNumberEvenToRows; + if (s.params.slidesPerColumn > 1) { + if (Math.floor(s.slides.length / s.params.slidesPerColumn) === s.slides.length / s.params.slidesPerColumn) { + slidesNumberEvenToRows = s.slides.length; + } + else { + slidesNumberEvenToRows = Math.ceil(s.slides.length / s.params.slidesPerColumn) * s.params.slidesPerColumn; + } + if (s.params.slidesPerView !== 'auto' && s.params.slidesPerColumnFill === 'row') { + slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, s.params.slidesPerView * s.params.slidesPerColumn); + } + } + + // Calc slides + var slideSize; + var slidesPerColumn = s.params.slidesPerColumn; + var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn; + var numFullColumns = slidesPerRow - (s.params.slidesPerColumn * slidesPerRow - s.slides.length); + for (i = 0; i < s.slides.length; i++) { + slideSize = 0; + var slide = s.slides.eq(i); + if (s.params.slidesPerColumn > 1) { + // Set slides order + var newSlideOrderIndex; + var column, row; + if (s.params.slidesPerColumnFill === 'column') { + column = Math.floor(i / slidesPerColumn); + row = i - column * slidesPerColumn; + if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn-1)) { + if (++row >= slidesPerColumn) { + row = 0; + column++; + } + } + newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn; + slide + .css({ + '-webkit-box-ordinal-group': newSlideOrderIndex, + '-moz-box-ordinal-group': newSlideOrderIndex, + '-ms-flex-order': newSlideOrderIndex, + '-webkit-order': newSlideOrderIndex, + 'order': newSlideOrderIndex + }); + } + else { + row = Math.floor(i / slidesPerRow); + column = i - row * slidesPerRow; + } + slide + .css( + 'margin-' + (s.isHorizontal() ? 'top' : 'left'), + (row !== 0 && s.params.spaceBetween) && (s.params.spaceBetween + 'px') + ) + .attr('data-swiper-column', column) + .attr('data-swiper-row', row); + + } + if (slide.css('display') === 'none') continue; + if (s.params.slidesPerView === 'auto') { + slideSize = s.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true); + if (s.params.roundLengths) slideSize = round(slideSize); + } + else { + slideSize = (s.size - (s.params.slidesPerView - 1) * spaceBetween) / s.params.slidesPerView; + if (s.params.roundLengths) slideSize = round(slideSize); + + if (s.isHorizontal()) { + s.slides[i].style.width = slideSize + 'px'; + } + else { + s.slides[i].style.height = slideSize + 'px'; + } + } + s.slides[i].swiperSlideSize = slideSize; + s.slidesSizesGrid.push(slideSize); + + + if (s.params.centeredSlides) { + slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; + if(prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - s.size / 2 - spaceBetween; + if (i === 0) slidePosition = slidePosition - s.size / 2 - spaceBetween; + if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0; + if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition); + s.slidesGrid.push(slidePosition); + } + else { + if ((index) % s.params.slidesPerGroup === 0) s.snapGrid.push(slidePosition); + s.slidesGrid.push(slidePosition); + slidePosition = slidePosition + slideSize + spaceBetween; + } + + s.virtualSize += slideSize + spaceBetween; + + prevSlideSize = slideSize; + + index ++; + } + s.virtualSize = Math.max(s.virtualSize, s.size) + s.params.slidesOffsetAfter; + var newSlidesGrid; + + if ( + s.rtl && s.wrongRTL && (s.params.effect === 'slide' || s.params.effect === 'coverflow')) { + s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'}); + } + if (!s.support.flexbox || s.params.setWrapperSize) { + if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'}); + else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'}); + } + + if (s.params.slidesPerColumn > 1) { + s.virtualSize = (slideSize + s.params.spaceBetween) * slidesNumberEvenToRows; + s.virtualSize = Math.ceil(s.virtualSize / s.params.slidesPerColumn) - s.params.spaceBetween; + if (s.isHorizontal()) s.wrapper.css({width: s.virtualSize + s.params.spaceBetween + 'px'}); + else s.wrapper.css({height: s.virtualSize + s.params.spaceBetween + 'px'}); + if (s.params.centeredSlides) { + newSlidesGrid = []; + for (i = 0; i < s.snapGrid.length; i++) { + if (s.snapGrid[i] < s.virtualSize + s.snapGrid[0]) newSlidesGrid.push(s.snapGrid[i]); + } + s.snapGrid = newSlidesGrid; + } + } + + // Remove last grid elements depending on width + if (!s.params.centeredSlides) { + newSlidesGrid = []; + for (i = 0; i < s.snapGrid.length; i++) { + if (s.snapGrid[i] <= s.virtualSize - s.size) { + newSlidesGrid.push(s.snapGrid[i]); + } + } + s.snapGrid = newSlidesGrid; + if (Math.floor(s.virtualSize - s.size) - Math.floor(s.snapGrid[s.snapGrid.length - 1]) > 1) { + s.snapGrid.push(s.virtualSize - s.size); + } + } + if (s.snapGrid.length === 0) s.snapGrid = [0]; + + if (s.params.spaceBetween !== 0) { + if (s.isHorizontal()) { + if (s.rtl) s.slides.css({marginLeft: spaceBetween + 'px'}); + else s.slides.css({marginRight: spaceBetween + 'px'}); + } + else s.slides.css({marginBottom: spaceBetween + 'px'}); + } + if (s.params.watchSlidesProgress) { + s.updateSlidesOffset(); + } + }; + s.updateSlidesOffset = function () { + for (var i = 0; i < s.slides.length; i++) { + s.slides[i].swiperSlideOffset = s.isHorizontal() ? s.slides[i].offsetLeft : s.slides[i].offsetTop; + } + }; + + /*========================= + Dynamic Slides Per View + ===========================*/ + s.currentSlidesPerView = function () { + var spv = 1, i, j; + if (s.params.centeredSlides) { + var size = s.slides[s.activeIndex].swiperSlideSize; + var breakLoop; + for (i = s.activeIndex + 1; i < s.slides.length; i++) { + if (s.slides[i] && !breakLoop) { + size += s.slides[i].swiperSlideSize; + spv ++; + if (size > s.size) breakLoop = true; + } + } + for (j = s.activeIndex - 1; j >= 0; j--) { + if (s.slides[j] && !breakLoop) { + size += s.slides[j].swiperSlideSize; + spv ++; + if (size > s.size) breakLoop = true; + } + } + } + else { + for (i = s.activeIndex + 1; i < s.slides.length; i++) { + if (s.slidesGrid[i] - s.slidesGrid[s.activeIndex] < s.size) { + spv++; + } + } + } + return spv; + }; + /*========================= + Slider/slides progress + ===========================*/ + s.updateSlidesProgress = function (translate) { + if (typeof translate === 'undefined') { + translate = s.translate || 0; + } + if (s.slides.length === 0) return; + if (typeof s.slides[0].swiperSlideOffset === 'undefined') s.updateSlidesOffset(); + + var offsetCenter = -translate; + if (s.rtl) offsetCenter = translate; + + // Visible Slides + s.slides.removeClass(s.params.slideVisibleClass); + for (var i = 0; i < s.slides.length; i++) { + var slide = s.slides[i]; + var slideProgress = (offsetCenter + (s.params.centeredSlides ? s.minTranslate() : 0) - slide.swiperSlideOffset) / (slide.swiperSlideSize + s.params.spaceBetween); + if (s.params.watchSlidesVisibility) { + var slideBefore = -(offsetCenter - slide.swiperSlideOffset); + var slideAfter = slideBefore + s.slidesSizesGrid[i]; + var isVisible = + (slideBefore >= 0 && slideBefore < s.size) || + (slideAfter > 0 && slideAfter <= s.size) || + (slideBefore <= 0 && slideAfter >= s.size); + if (isVisible) { + s.slides.eq(i).addClass(s.params.slideVisibleClass); + } + } + slide.progress = s.rtl ? -slideProgress : slideProgress; + } + }; + s.updateProgress = function (translate) { + if (typeof translate === 'undefined') { + translate = s.translate || 0; + } + var translatesDiff = s.maxTranslate() - s.minTranslate(); + var wasBeginning = s.isBeginning; + var wasEnd = s.isEnd; + if (translatesDiff === 0) { + s.progress = 0; + s.isBeginning = s.isEnd = true; + } + else { + s.progress = (translate - s.minTranslate()) / (translatesDiff); + s.isBeginning = s.progress <= 0; + s.isEnd = s.progress >= 1; + } + if (s.isBeginning && !wasBeginning) s.emit('onReachBeginning', s); + if (s.isEnd && !wasEnd) s.emit('onReachEnd', s); + + if (s.params.watchSlidesProgress) s.updateSlidesProgress(translate); + s.emit('onProgress', s, s.progress); + }; + s.updateActiveIndex = function () { + var translate = s.rtl ? s.translate : -s.translate; + var newActiveIndex, i, snapIndex; + for (i = 0; i < s.slidesGrid.length; i ++) { + if (typeof s.slidesGrid[i + 1] !== 'undefined') { + if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1] - (s.slidesGrid[i + 1] - s.slidesGrid[i]) / 2) { + newActiveIndex = i; + } + else if (translate >= s.slidesGrid[i] && translate < s.slidesGrid[i + 1]) { + newActiveIndex = i + 1; + } + } + else { + if (translate >= s.slidesGrid[i]) { + newActiveIndex = i; + } + } + } + // Normalize slideIndex + if(s.params.normalizeSlideIndex){ + if (newActiveIndex < 0 || typeof newActiveIndex === 'undefined') newActiveIndex = 0; + } + // for (i = 0; i < s.slidesGrid.length; i++) { + // if (- translate >= s.slidesGrid[i]) { + // newActiveIndex = i; + // } + // } + snapIndex = Math.floor(newActiveIndex / s.params.slidesPerGroup); + if (snapIndex >= s.snapGrid.length) snapIndex = s.snapGrid.length - 1; + + if (newActiveIndex === s.activeIndex) { + return; + } + s.snapIndex = snapIndex; + s.previousIndex = s.activeIndex; + s.activeIndex = newActiveIndex; + s.updateClasses(); + s.updateRealIndex(); + }; + s.updateRealIndex = function(){ + s.realIndex = parseInt(s.slides.eq(s.activeIndex).attr('data-swiper-slide-index') || s.activeIndex, 10); + }; + + /*========================= + Classes + ===========================*/ + s.updateClasses = function () { + s.slides.removeClass(s.params.slideActiveClass + ' ' + s.params.slideNextClass + ' ' + s.params.slidePrevClass + ' ' + s.params.slideDuplicateActiveClass + ' ' + s.params.slideDuplicateNextClass + ' ' + s.params.slideDuplicatePrevClass); + var activeSlide = s.slides.eq(s.activeIndex); + // Active classes + activeSlide.addClass(s.params.slideActiveClass); + if (params.loop) { + // Duplicate to all looped slides + if (activeSlide.hasClass(s.params.slideDuplicateClass)) { + s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + s.realIndex + '"]').addClass(s.params.slideDuplicateActiveClass); + } + else { + s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + s.realIndex + '"]').addClass(s.params.slideDuplicateActiveClass); + } + } + // Next Slide + var nextSlide = activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass); + if (s.params.loop && nextSlide.length === 0) { + nextSlide = s.slides.eq(0); + nextSlide.addClass(s.params.slideNextClass); + } + // Prev Slide + var prevSlide = activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass); + if (s.params.loop && prevSlide.length === 0) { + prevSlide = s.slides.eq(-1); + prevSlide.addClass(s.params.slidePrevClass); + } + if (params.loop) { + // Duplicate to all looped slides + if (nextSlide.hasClass(s.params.slideDuplicateClass)) { + s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + nextSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicateNextClass); + } + else { + s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + nextSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicateNextClass); + } + if (prevSlide.hasClass(s.params.slideDuplicateClass)) { + s.wrapper.children('.' + s.params.slideClass + ':not(.' + s.params.slideDuplicateClass + ')[data-swiper-slide-index="' + prevSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicatePrevClass); + } + else { + s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + prevSlide.attr('data-swiper-slide-index') + '"]').addClass(s.params.slideDuplicatePrevClass); + } + } + + // Pagination + if (s.paginationContainer && s.paginationContainer.length > 0) { + // Current/Total + var current, + total = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length; + if (s.params.loop) { + current = Math.ceil((s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup); + if (current > s.slides.length - 1 - s.loopedSlides * 2) { + current = current - (s.slides.length - s.loopedSlides * 2); + } + if (current > total - 1) current = current - total; + if (current < 0 && s.params.paginationType !== 'bullets') current = total + current; + } + else { + if (typeof s.snapIndex !== 'undefined') { + current = s.snapIndex; + } + else { + current = s.activeIndex || 0; + } + } + // Types + if (s.params.paginationType === 'bullets' && s.bullets && s.bullets.length > 0) { + s.bullets.removeClass(s.params.bulletActiveClass); + if (s.paginationContainer.length > 1) { + s.bullets.each(function () { + if ($(this).index() === current) $(this).addClass(s.params.bulletActiveClass); + }); + } + else { + s.bullets.eq(current).addClass(s.params.bulletActiveClass); + } + } + if (s.params.paginationType === 'fraction') { + s.paginationContainer.find('.' + s.params.paginationCurrentClass).text(current + 1); + s.paginationContainer.find('.' + s.params.paginationTotalClass).text(total); + } + if (s.params.paginationType === 'progress') { + var scale = (current + 1) / total, + scaleX = scale, + scaleY = 1; + if (!s.isHorizontal()) { + scaleY = scale; + scaleX = 1; + } + s.paginationContainer.find('.' + s.params.paginationProgressbarClass).transform('translate3d(0,0,0) scaleX(' + scaleX + ') scaleY(' + scaleY + ')').transition(s.params.speed); + } + if (s.params.paginationType === 'custom' && s.params.paginationCustomRender) { + s.paginationContainer.html(s.params.paginationCustomRender(s, current + 1, total)); + s.emit('onPaginationRendered', s, s.paginationContainer[0]); + } + } + + // Next/active buttons + if (!s.params.loop) { + if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) { + if (s.isBeginning) { + s.prevButton.addClass(s.params.buttonDisabledClass); + if (s.params.a11y && s.a11y) s.a11y.disable(s.prevButton); + } + else { + s.prevButton.removeClass(s.params.buttonDisabledClass); + if (s.params.a11y && s.a11y) s.a11y.enable(s.prevButton); + } + } + if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) { + if (s.isEnd) { + s.nextButton.addClass(s.params.buttonDisabledClass); + if (s.params.a11y && s.a11y) s.a11y.disable(s.nextButton); + } + else { + s.nextButton.removeClass(s.params.buttonDisabledClass); + if (s.params.a11y && s.a11y) s.a11y.enable(s.nextButton); + } + } + } + }; + + /*========================= + Pagination + ===========================*/ + s.updatePagination = function () { + if (!s.params.pagination) return; + if (s.paginationContainer && s.paginationContainer.length > 0) { + var paginationHTML = ''; + if (s.params.paginationType === 'bullets') { + var numberOfBullets = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length; + for (var i = 0; i < numberOfBullets; i++) { + if (s.params.paginationBulletRender) { + paginationHTML += s.params.paginationBulletRender(s, i, s.params.bulletClass); + } + else { + paginationHTML += '<' + s.params.paginationElement+' class="' + s.params.bulletClass + '">'; + } + } + s.paginationContainer.html(paginationHTML); + s.bullets = s.paginationContainer.find('.' + s.params.bulletClass); + if (s.params.paginationClickable && s.params.a11y && s.a11y) { + s.a11y.initPagination(); + } + } + if (s.params.paginationType === 'fraction') { + if (s.params.paginationFractionRender) { + paginationHTML = s.params.paginationFractionRender(s, s.params.paginationCurrentClass, s.params.paginationTotalClass); + } + else { + paginationHTML = + '' + + ' / ' + + ''; + } + s.paginationContainer.html(paginationHTML); + } + if (s.params.paginationType === 'progress') { + if (s.params.paginationProgressRender) { + paginationHTML = s.params.paginationProgressRender(s, s.params.paginationProgressbarClass); + } + else { + paginationHTML = ''; + } + s.paginationContainer.html(paginationHTML); + } + if (s.params.paginationType !== 'custom') { + s.emit('onPaginationRendered', s, s.paginationContainer[0]); + } + } + }; + /*========================= + Common update method + ===========================*/ + s.update = function (updateTranslate) { + if (!s) return; + s.updateContainerSize(); + s.updateSlidesSize(); + s.updateProgress(); + s.updatePagination(); + s.updateClasses(); + if (s.params.scrollbar && s.scrollbar) { + s.scrollbar.set(); + } + var newTranslate; + function forceSetTranslate() { + var translate = s.rtl ? -s.translate : s.translate; + newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate()); + s.setWrapperTranslate(newTranslate); + s.updateActiveIndex(); + s.updateClasses(); + } + if (updateTranslate) { + var translated; + if (s.controller && s.controller.spline) { + s.controller.spline = undefined; + } + if (s.params.freeMode) { + forceSetTranslate(); + if (s.params.autoHeight) { + s.updateAutoHeight(); + } + } + else { + if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) { + translated = s.slideTo(s.slides.length - 1, 0, false, true); + } + else { + translated = s.slideTo(s.activeIndex, 0, false, true); + } + if (!translated) { + forceSetTranslate(); + } + } + } + else if (s.params.autoHeight) { + s.updateAutoHeight(); + } + }; + + /*========================= + Resize Handler + ===========================*/ + s.onResize = function (forceUpdatePagination) { + if (s.params.onBeforeResize) s.params.onBeforeResize(s); + //Breakpoints + if (s.params.breakpoints) { + s.setBreakpoint(); + } + + // Disable locks on resize + var allowSwipeToPrev = s.params.allowSwipeToPrev; + var allowSwipeToNext = s.params.allowSwipeToNext; + s.params.allowSwipeToPrev = s.params.allowSwipeToNext = true; + + s.updateContainerSize(); + s.updateSlidesSize(); + if (s.params.slidesPerView === 'auto' || s.params.freeMode || forceUpdatePagination) s.updatePagination(); + if (s.params.scrollbar && s.scrollbar) { + s.scrollbar.set(); + } + if (s.controller && s.controller.spline) { + s.controller.spline = undefined; + } + var slideChangedBySlideTo = false; + if (s.params.freeMode) { + var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate()); + s.setWrapperTranslate(newTranslate); + s.updateActiveIndex(); + s.updateClasses(); + + if (s.params.autoHeight) { + s.updateAutoHeight(); + } + } + else { + s.updateClasses(); + if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) { + slideChangedBySlideTo = s.slideTo(s.slides.length - 1, 0, false, true); + } + else { + slideChangedBySlideTo = s.slideTo(s.activeIndex, 0, false, true); + } + } + if (s.params.lazyLoading && !slideChangedBySlideTo && s.lazy) { + s.lazy.load(); + } + // Return locks after resize + s.params.allowSwipeToPrev = allowSwipeToPrev; + s.params.allowSwipeToNext = allowSwipeToNext; + if (s.params.onAfterResize) s.params.onAfterResize(s); + }; + + /*========================= + Events + ===========================*/ + + //Define Touch Events + s.touchEventsDesktop = {start: 'mousedown', move: 'mousemove', end: 'mouseup'}; + if (window.navigator.pointerEnabled) s.touchEventsDesktop = {start: 'pointerdown', move: 'pointermove', end: 'pointerup'}; + else if (window.navigator.msPointerEnabled) s.touchEventsDesktop = {start: 'MSPointerDown', move: 'MSPointerMove', end: 'MSPointerUp'}; + s.touchEvents = { + start : s.support.touch || !s.params.simulateTouch ? 'touchstart' : s.touchEventsDesktop.start, + move : s.support.touch || !s.params.simulateTouch ? 'touchmove' : s.touchEventsDesktop.move, + end : s.support.touch || !s.params.simulateTouch ? 'touchend' : s.touchEventsDesktop.end + }; + + + // WP8 Touch Events Fix + if (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) { + (s.params.touchEventsTarget === 'container' ? s.container : s.wrapper).addClass('swiper-wp8-' + s.params.direction); + } + + // Attach/detach events + s.initEvents = function (detach) { + var actionDom = detach ? 'off' : 'on'; + var action = detach ? 'removeEventListener' : 'addEventListener'; + var touchEventsTarget = s.params.touchEventsTarget === 'container' ? s.container[0] : s.wrapper[0]; + var target = s.support.touch ? touchEventsTarget : document; + + var moveCapture = s.params.nested ? true : false; + + //Touch Events + if (s.browser.ie) { + touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, false); + target[action](s.touchEvents.move, s.onTouchMove, moveCapture); + target[action](s.touchEvents.end, s.onTouchEnd, false); + } + else { + if (s.support.touch) { + var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false; + touchEventsTarget[action](s.touchEvents.start, s.onTouchStart, passiveListener); + touchEventsTarget[action](s.touchEvents.move, s.onTouchMove, moveCapture); + touchEventsTarget[action](s.touchEvents.end, s.onTouchEnd, passiveListener); + } + if ((params.simulateTouch && !s.device.ios && !s.device.android) || (params.simulateTouch && !s.support.touch && s.device.ios)) { + touchEventsTarget[action]('mousedown', s.onTouchStart, false); + document[action]('mousemove', s.onTouchMove, moveCapture); + document[action]('mouseup', s.onTouchEnd, false); + } + } + window[action]('resize', s.onResize); + + // Next, Prev, Index + if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) { + s.nextButton[actionDom]('click', s.onClickNext); + if (s.params.a11y && s.a11y) s.nextButton[actionDom]('keydown', s.a11y.onEnterKey); + } + if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) { + s.prevButton[actionDom]('click', s.onClickPrev); + if (s.params.a11y && s.a11y) s.prevButton[actionDom]('keydown', s.a11y.onEnterKey); + } + if (s.params.pagination && s.params.paginationClickable) { + s.paginationContainer[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex); + if (s.params.a11y && s.a11y) s.paginationContainer[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey); + } + + // Prevent Links Clicks + if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true); + }; + s.attachEvents = function () { + s.initEvents(); + }; + s.detachEvents = function () { + s.initEvents(true); + }; + + /*========================= + Handle Clicks + ===========================*/ + // Prevent Clicks + s.allowClick = true; + s.preventClicks = function (e) { + if (!s.allowClick) { + if (s.params.preventClicks) e.preventDefault(); + if (s.params.preventClicksPropagation && s.animating) { + e.stopPropagation(); + e.stopImmediatePropagation(); + } + } + }; + // Clicks + s.onClickNext = function (e) { + e.preventDefault(); + if (s.isEnd && !s.params.loop) return; + s.slideNext(); + }; + s.onClickPrev = function (e) { + e.preventDefault(); + if (s.isBeginning && !s.params.loop) return; + s.slidePrev(); + }; + s.onClickIndex = function (e) { + e.preventDefault(); + var index = $(this).index() * s.params.slidesPerGroup; + if (s.params.loop) index = index + s.loopedSlides; + s.slideTo(index); + }; + + /*========================= + Handle Touches + ===========================*/ + function findElementInEvent(e, selector) { + var el = $(e.target); + if (!el.is(selector)) { + if (typeof selector === 'string') { + el = el.parents(selector); + } + else if (selector.nodeType) { + var found; + el.parents().each(function (index, _el) { + if (_el === selector) found = selector; + }); + if (!found) return undefined; + else return selector; + } + } + if (el.length === 0) { + return undefined; + } + return el[0]; + } + s.updateClickedSlide = function (e) { + var slide = findElementInEvent(e, '.' + s.params.slideClass); + var slideFound = false; + if (slide) { + for (var i = 0; i < s.slides.length; i++) { + if (s.slides[i] === slide) slideFound = true; + } + } + + if (slide && slideFound) { + s.clickedSlide = slide; + s.clickedIndex = $(slide).index(); + } + else { + s.clickedSlide = undefined; + s.clickedIndex = undefined; + return; + } + if (s.params.slideToClickedSlide && s.clickedIndex !== undefined && s.clickedIndex !== s.activeIndex) { + var slideToIndex = s.clickedIndex, + realIndex, + duplicatedSlides, + slidesPerView = s.params.slidesPerView === 'auto' ? s.currentSlidesPerView() : s.params.slidesPerView; + if (s.params.loop) { + if (s.animating) return; + realIndex = parseInt($(s.clickedSlide).attr('data-swiper-slide-index'), 10); + if (s.params.centeredSlides) { + if ((slideToIndex < s.loopedSlides - slidesPerView/2) || (slideToIndex > s.slides.length - s.loopedSlides + slidesPerView/2)) { + s.fixLoop(); + slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index(); + setTimeout(function () { + s.slideTo(slideToIndex); + }, 0); + } + else { + s.slideTo(slideToIndex); + } + } + else { + if (slideToIndex > s.slides.length - slidesPerView) { + s.fixLoop(); + slideToIndex = s.wrapper.children('.' + s.params.slideClass + '[data-swiper-slide-index="' + realIndex + '"]:not(.' + s.params.slideDuplicateClass + ')').eq(0).index(); + setTimeout(function () { + s.slideTo(slideToIndex); + }, 0); + } + else { + s.slideTo(slideToIndex); + } + } + } + else { + s.slideTo(slideToIndex); + } + } + }; + + var isTouched, + isMoved, + allowTouchCallbacks, + touchStartTime, + isScrolling, + currentTranslate, + startTranslate, + allowThresholdMove, + // Form elements to match + formElements = 'input, select, textarea, button, video', + // Last click time + lastClickTime = Date.now(), clickTimeout, + //Velocities + velocities = [], + allowMomentumBounce; + + // Animating Flag + s.animating = false; + + // Touches information + s.touches = { + startX: 0, + startY: 0, + currentX: 0, + currentY: 0, + diff: 0 + }; + + // Touch handlers + var isTouchEvent, startMoving; + s.onTouchStart = function (e) { + if (e.originalEvent) e = e.originalEvent; + isTouchEvent = e.type === 'touchstart'; + if (!isTouchEvent && 'which' in e && e.which === 3) return; + if (s.params.noSwiping && findElementInEvent(e, '.' + s.params.noSwipingClass)) { + s.allowClick = true; + return; + } + if (s.params.swipeHandler) { + if (!findElementInEvent(e, s.params.swipeHandler)) return; + } + + var startX = s.touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + var startY = s.touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + + // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore + if(s.device.ios && s.params.iOSEdgeSwipeDetection && startX <= s.params.iOSEdgeSwipeThreshold) { + return; + } + + isTouched = true; + isMoved = false; + allowTouchCallbacks = true; + isScrolling = undefined; + startMoving = undefined; + s.touches.startX = startX; + s.touches.startY = startY; + touchStartTime = Date.now(); + s.allowClick = true; + s.updateContainerSize(); + s.swipeDirection = undefined; + if (s.params.threshold > 0) allowThresholdMove = false; + if (e.type !== 'touchstart') { + var preventDefault = true; + if ($(e.target).is(formElements)) preventDefault = false; + if (document.activeElement && $(document.activeElement).is(formElements)) { + document.activeElement.blur(); + } + if (preventDefault) { + e.preventDefault(); + } + } + s.emit('onTouchStart', s, e); + }; + + s.onTouchMove = function (e) { + if (e.originalEvent) e = e.originalEvent; + if (isTouchEvent && e.type === 'mousemove') return; + if (e.preventedByNestedSwiper) { + s.touches.startX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + s.touches.startY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + return; + } + if (s.params.onlyExternal) { + // isMoved = true; + s.allowClick = false; + if (isTouched) { + s.touches.startX = s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + s.touches.startY = s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + touchStartTime = Date.now(); + } + return; + } + if (isTouchEvent && s.params.touchReleaseOnEdges && !s.params.loop) { + if (!s.isHorizontal()) { + // Vertical + if ( + (s.touches.currentY < s.touches.startY && s.translate <= s.maxTranslate()) || + (s.touches.currentY > s.touches.startY && s.translate >= s.minTranslate()) + ) { + return; + } + } + else { + if ( + (s.touches.currentX < s.touches.startX && s.translate <= s.maxTranslate()) || + (s.touches.currentX > s.touches.startX && s.translate >= s.minTranslate()) + ) { + return; + } + } + } + if (isTouchEvent && document.activeElement) { + if (e.target === document.activeElement && $(e.target).is(formElements)) { + isMoved = true; + s.allowClick = false; + return; + } + } + if (allowTouchCallbacks) { + s.emit('onTouchMove', s, e); + } + if (e.targetTouches && e.targetTouches.length > 1) return; + + s.touches.currentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + s.touches.currentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + + if (typeof isScrolling === 'undefined') { + var touchAngle; + if (s.isHorizontal() && s.touches.currentY === s.touches.startY || !s.isHorizontal() && s.touches.currentX === s.touches.startX) { + isScrolling = false; + } + else { + touchAngle = Math.atan2(Math.abs(s.touches.currentY - s.touches.startY), Math.abs(s.touches.currentX - s.touches.startX)) * 180 / Math.PI; + isScrolling = s.isHorizontal() ? touchAngle > s.params.touchAngle : (90 - touchAngle > s.params.touchAngle); + } + } + if (isScrolling) { + s.emit('onTouchMoveOpposite', s, e); + } + if (typeof startMoving === 'undefined') { + if (s.touches.currentX !== s.touches.startX || s.touches.currentY !== s.touches.startY) { + startMoving = true; + } + } + if (!isTouched) return; + if (isScrolling) { + isTouched = false; + return; + } + if (!startMoving) { + return; + } + s.allowClick = false; + s.emit('onSliderMove', s, e); + e.preventDefault(); + if (s.params.touchMoveStopPropagation && !s.params.nested) { + e.stopPropagation(); + } + + if (!isMoved) { + if (params.loop) { + s.fixLoop(); + } + startTranslate = s.getWrapperTranslate(); + s.setWrapperTransition(0); + if (s.animating) { + s.wrapper.trigger('webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd'); + } + if (s.params.autoplay && s.autoplaying) { + if (s.params.autoplayDisableOnInteraction) { + s.stopAutoplay(); + } + else { + s.pauseAutoplay(); + } + } + allowMomentumBounce = false; + //Grab Cursor + if (s.params.grabCursor && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) { + s.setGrabCursor(true); + } + } + isMoved = true; + + var diff = s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY; + + diff = diff * s.params.touchRatio; + if (s.rtl) diff = -diff; + + s.swipeDirection = diff > 0 ? 'prev' : 'next'; + currentTranslate = diff + startTranslate; + + var disableParentSwiper = true; + if ((diff > 0 && currentTranslate > s.minTranslate())) { + disableParentSwiper = false; + if (s.params.resistance) currentTranslate = s.minTranslate() - 1 + Math.pow(-s.minTranslate() + startTranslate + diff, s.params.resistanceRatio); + } + else if (diff < 0 && currentTranslate < s.maxTranslate()) { + disableParentSwiper = false; + if (s.params.resistance) currentTranslate = s.maxTranslate() + 1 - Math.pow(s.maxTranslate() - startTranslate - diff, s.params.resistanceRatio); + } + + if (disableParentSwiper) { + e.preventedByNestedSwiper = true; + } + + // Directions locks + if (!s.params.allowSwipeToNext && s.swipeDirection === 'next' && currentTranslate < startTranslate) { + currentTranslate = startTranslate; + } + if (!s.params.allowSwipeToPrev && s.swipeDirection === 'prev' && currentTranslate > startTranslate) { + currentTranslate = startTranslate; + } + + + // Threshold + if (s.params.threshold > 0) { + if (Math.abs(diff) > s.params.threshold || allowThresholdMove) { + if (!allowThresholdMove) { + allowThresholdMove = true; + s.touches.startX = s.touches.currentX; + s.touches.startY = s.touches.currentY; + currentTranslate = startTranslate; + s.touches.diff = s.isHorizontal() ? s.touches.currentX - s.touches.startX : s.touches.currentY - s.touches.startY; + return; + } + } + else { + currentTranslate = startTranslate; + return; + } + } + + if (!s.params.followFinger) return; + + // Update active index in free mode + if (s.params.freeMode || s.params.watchSlidesProgress) { + s.updateActiveIndex(); + } + if (s.params.freeMode) { + //Velocity + if (velocities.length === 0) { + velocities.push({ + position: s.touches[s.isHorizontal() ? 'startX' : 'startY'], + time: touchStartTime + }); + } + velocities.push({ + position: s.touches[s.isHorizontal() ? 'currentX' : 'currentY'], + time: (new window.Date()).getTime() + }); + } + // Update progress + s.updateProgress(currentTranslate); + // Update translate + s.setWrapperTranslate(currentTranslate); + }; + s.onTouchEnd = function (e) { + if (e.originalEvent) e = e.originalEvent; + if (allowTouchCallbacks) { + s.emit('onTouchEnd', s, e); + } + allowTouchCallbacks = false; + if (!isTouched) return; + //Return Grab Cursor + if (s.params.grabCursor && isMoved && isTouched && (s.params.allowSwipeToNext === true || s.params.allowSwipeToPrev === true)) { + s.setGrabCursor(false); + } + + // Time diff + var touchEndTime = Date.now(); + var timeDiff = touchEndTime - touchStartTime; + + // Tap, doubleTap, Click + if (s.allowClick) { + s.updateClickedSlide(e); + s.emit('onTap', s, e); + if (timeDiff < 300 && (touchEndTime - lastClickTime) > 300) { + if (clickTimeout) clearTimeout(clickTimeout); + clickTimeout = setTimeout(function () { + if (!s) return; + if (s.params.paginationHide && s.paginationContainer.length > 0 && !$(e.target).hasClass(s.params.bulletClass)) { + s.paginationContainer.toggleClass(s.params.paginationHiddenClass); + } + s.emit('onClick', s, e); + }, 300); + + } + if (timeDiff < 300 && (touchEndTime - lastClickTime) < 300) { + if (clickTimeout) clearTimeout(clickTimeout); + s.emit('onDoubleTap', s, e); + } + } + + lastClickTime = Date.now(); + setTimeout(function () { + if (s) s.allowClick = true; + }, 0); + + if (!isTouched || !isMoved || !s.swipeDirection || s.touches.diff === 0 || currentTranslate === startTranslate) { + isTouched = isMoved = false; + return; + } + isTouched = isMoved = false; + + var currentPos; + if (s.params.followFinger) { + currentPos = s.rtl ? s.translate : -s.translate; + } + else { + currentPos = -currentTranslate; + } + if (s.params.freeMode) { + if (currentPos < -s.minTranslate()) { + s.slideTo(s.activeIndex); + return; + } + else if (currentPos > -s.maxTranslate()) { + if (s.slides.length < s.snapGrid.length) { + s.slideTo(s.snapGrid.length - 1); + } + else { + s.slideTo(s.slides.length - 1); + } + return; + } + + if (s.params.freeModeMomentum) { + if (velocities.length > 1) { + var lastMoveEvent = velocities.pop(), velocityEvent = velocities.pop(); + + var distance = lastMoveEvent.position - velocityEvent.position; + var time = lastMoveEvent.time - velocityEvent.time; + s.velocity = distance / time; + s.velocity = s.velocity / 2; + if (Math.abs(s.velocity) < s.params.freeModeMinimumVelocity) { + s.velocity = 0; + } + // this implies that the user stopped moving a finger then released. + // There would be no events with distance zero, so the last event is stale. + if (time > 150 || (new window.Date().getTime() - lastMoveEvent.time) > 300) { + s.velocity = 0; + } + } else { + s.velocity = 0; + } + s.velocity = s.velocity * s.params.freeModeMomentumVelocityRatio; + + velocities.length = 0; + var momentumDuration = 1000 * s.params.freeModeMomentumRatio; + var momentumDistance = s.velocity * momentumDuration; + + var newPosition = s.translate + momentumDistance; + if (s.rtl) newPosition = - newPosition; + var doBounce = false; + var afterBouncePosition; + var bounceAmount = Math.abs(s.velocity) * 20 * s.params.freeModeMomentumBounceRatio; + if (newPosition < s.maxTranslate()) { + if (s.params.freeModeMomentumBounce) { + if (newPosition + s.maxTranslate() < -bounceAmount) { + newPosition = s.maxTranslate() - bounceAmount; + } + afterBouncePosition = s.maxTranslate(); + doBounce = true; + allowMomentumBounce = true; + } + else { + newPosition = s.maxTranslate(); + } + } + else if (newPosition > s.minTranslate()) { + if (s.params.freeModeMomentumBounce) { + if (newPosition - s.minTranslate() > bounceAmount) { + newPosition = s.minTranslate() + bounceAmount; + } + afterBouncePosition = s.minTranslate(); + doBounce = true; + allowMomentumBounce = true; + } + else { + newPosition = s.minTranslate(); + } + } + else if (s.params.freeModeSticky) { + var j = 0, + nextSlide; + for (j = 0; j < s.snapGrid.length; j += 1) { + if (s.snapGrid[j] > -newPosition) { + nextSlide = j; + break; + } + + } + if (Math.abs(s.snapGrid[nextSlide] - newPosition) < Math.abs(s.snapGrid[nextSlide - 1] - newPosition) || s.swipeDirection === 'next') { + newPosition = s.snapGrid[nextSlide]; + } else { + newPosition = s.snapGrid[nextSlide - 1]; + } + if (!s.rtl) newPosition = - newPosition; + } + //Fix duration + if (s.velocity !== 0) { + if (s.rtl) { + momentumDuration = Math.abs((-newPosition - s.translate) / s.velocity); + } + else { + momentumDuration = Math.abs((newPosition - s.translate) / s.velocity); + } + } + else if (s.params.freeModeSticky) { + s.slideReset(); + return; + } + + if (s.params.freeModeMomentumBounce && doBounce) { + s.updateProgress(afterBouncePosition); + s.setWrapperTransition(momentumDuration); + s.setWrapperTranslate(newPosition); + s.onTransitionStart(); + s.animating = true; + s.wrapper.transitionEnd(function () { + if (!s || !allowMomentumBounce) return; + s.emit('onMomentumBounce', s); + + s.setWrapperTransition(s.params.speed); + s.setWrapperTranslate(afterBouncePosition); + s.wrapper.transitionEnd(function () { + if (!s) return; + s.onTransitionEnd(); + }); + }); + } else if (s.velocity) { + s.updateProgress(newPosition); + s.setWrapperTransition(momentumDuration); + s.setWrapperTranslate(newPosition); + s.onTransitionStart(); + if (!s.animating) { + s.animating = true; + s.wrapper.transitionEnd(function () { + if (!s) return; + s.onTransitionEnd(); + }); + } + + } else { + s.updateProgress(newPosition); + } + + s.updateActiveIndex(); + } + if (!s.params.freeModeMomentum || timeDiff >= s.params.longSwipesMs) { + s.updateProgress(); + s.updateActiveIndex(); + } + return; + } + + // Find current slide + var i, stopIndex = 0, groupSize = s.slidesSizesGrid[0]; + for (i = 0; i < s.slidesGrid.length; i += s.params.slidesPerGroup) { + if (typeof s.slidesGrid[i + s.params.slidesPerGroup] !== 'undefined') { + if (currentPos >= s.slidesGrid[i] && currentPos < s.slidesGrid[i + s.params.slidesPerGroup]) { + stopIndex = i; + groupSize = s.slidesGrid[i + s.params.slidesPerGroup] - s.slidesGrid[i]; + } + } + else { + if (currentPos >= s.slidesGrid[i]) { + stopIndex = i; + groupSize = s.slidesGrid[s.slidesGrid.length - 1] - s.slidesGrid[s.slidesGrid.length - 2]; + } + } + } + + // Find current slide size + var ratio = (currentPos - s.slidesGrid[stopIndex]) / groupSize; + + if (timeDiff > s.params.longSwipesMs) { + // Long touches + if (!s.params.longSwipes) { + s.slideTo(s.activeIndex); + return; + } + if (s.swipeDirection === 'next') { + if (ratio >= s.params.longSwipesRatio) s.slideTo(stopIndex + s.params.slidesPerGroup); + else s.slideTo(stopIndex); + + } + if (s.swipeDirection === 'prev') { + if (ratio > (1 - s.params.longSwipesRatio)) s.slideTo(stopIndex + s.params.slidesPerGroup); + else s.slideTo(stopIndex); + } + } + else { + // Short swipes + if (!s.params.shortSwipes) { + s.slideTo(s.activeIndex); + return; + } + if (s.swipeDirection === 'next') { + s.slideTo(stopIndex + s.params.slidesPerGroup); + + } + if (s.swipeDirection === 'prev') { + s.slideTo(stopIndex); + } + } + }; + /*========================= + Transitions + ===========================*/ + s._slideTo = function (slideIndex, speed) { + return s.slideTo(slideIndex, speed, true, true); + }; + s.slideTo = function (slideIndex, speed, runCallbacks, internal) { + if (typeof runCallbacks === 'undefined') runCallbacks = true; + if (typeof slideIndex === 'undefined') slideIndex = 0; + if (slideIndex < 0) slideIndex = 0; + s.snapIndex = Math.floor(slideIndex / s.params.slidesPerGroup); + if (s.snapIndex >= s.snapGrid.length) s.snapIndex = s.snapGrid.length - 1; + + var translate = - s.snapGrid[s.snapIndex]; + // Stop autoplay + if (s.params.autoplay && s.autoplaying) { + if (internal || !s.params.autoplayDisableOnInteraction) { + s.pauseAutoplay(speed); + } + else { + s.stopAutoplay(); + } + } + // Update progress + s.updateProgress(translate); + + // Normalize slideIndex + if(s.params.normalizeSlideIndex){ + for (var i = 0; i < s.slidesGrid.length; i++) { + if (- Math.floor(translate * 100) >= Math.floor(s.slidesGrid[i] * 100)) { + slideIndex = i; + } + } + } + + // Directions locks + if (!s.params.allowSwipeToNext && translate < s.translate && translate < s.minTranslate()) { + return false; + } + if (!s.params.allowSwipeToPrev && translate > s.translate && translate > s.maxTranslate()) { + if ((s.activeIndex || 0) !== slideIndex ) return false; + } + + // Update Index + if (typeof speed === 'undefined') speed = s.params.speed; + s.previousIndex = s.activeIndex || 0; + s.activeIndex = slideIndex; + s.updateRealIndex(); + if ((s.rtl && -translate === s.translate) || (!s.rtl && translate === s.translate)) { + // Update Height + if (s.params.autoHeight) { + s.updateAutoHeight(); + } + s.updateClasses(); + if (s.params.effect !== 'slide') { + s.setWrapperTranslate(translate); + } + return false; + } + s.updateClasses(); + s.onTransitionStart(runCallbacks); + + if (speed === 0 || s.browser.lteIE9) { + s.setWrapperTranslate(translate); + s.setWrapperTransition(0); + s.onTransitionEnd(runCallbacks); + } + else { + s.setWrapperTranslate(translate); + s.setWrapperTransition(speed); + if (!s.animating) { + s.animating = true; + s.wrapper.transitionEnd(function () { + if (!s) return; + s.onTransitionEnd(runCallbacks); + }); + } + + } + + return true; + }; + + s.onTransitionStart = function (runCallbacks) { + if (typeof runCallbacks === 'undefined') runCallbacks = true; + if (s.params.autoHeight) { + s.updateAutoHeight(); + } + if (s.lazy) s.lazy.onTransitionStart(); + if (runCallbacks) { + s.emit('onTransitionStart', s); + if (s.activeIndex !== s.previousIndex) { + s.emit('onSlideChangeStart', s); + if (s.activeIndex > s.previousIndex) { + s.emit('onSlideNextStart', s); + } + else { + s.emit('onSlidePrevStart', s); + } + } + + } + }; + s.onTransitionEnd = function (runCallbacks) { + s.animating = false; + s.setWrapperTransition(0); + if (typeof runCallbacks === 'undefined') runCallbacks = true; + if (s.lazy) s.lazy.onTransitionEnd(); + if (runCallbacks) { + s.emit('onTransitionEnd', s); + if (s.activeIndex !== s.previousIndex) { + s.emit('onSlideChangeEnd', s); + if (s.activeIndex > s.previousIndex) { + s.emit('onSlideNextEnd', s); + } + else { + s.emit('onSlidePrevEnd', s); + } + } + } + if (s.params.history && s.history) { + s.history.setHistory(s.params.history, s.activeIndex); + } + if (s.params.hashnav && s.hashnav) { + s.hashnav.setHash(); + } + + }; + s.slideNext = function (runCallbacks, speed, internal) { + if (s.params.loop) { + if (s.animating) return false; + s.fixLoop(); + var clientLeft = s.container[0].clientLeft; + return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal); + } + else return s.slideTo(s.activeIndex + s.params.slidesPerGroup, speed, runCallbacks, internal); + }; + s._slideNext = function (speed) { + return s.slideNext(true, speed, true); + }; + s.slidePrev = function (runCallbacks, speed, internal) { + if (s.params.loop) { + if (s.animating) return false; + s.fixLoop(); + var clientLeft = s.container[0].clientLeft; + return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal); + } + else return s.slideTo(s.activeIndex - 1, speed, runCallbacks, internal); + }; + s._slidePrev = function (speed) { + return s.slidePrev(true, speed, true); + }; + s.slideReset = function (runCallbacks, speed, internal) { + return s.slideTo(s.activeIndex, speed, runCallbacks); + }; + + s.disableTouchControl = function () { + s.params.onlyExternal = true; + return true; + }; + s.enableTouchControl = function () { + s.params.onlyExternal = false; + return true; + }; + + /*========================= + Translate/transition helpers + ===========================*/ + s.setWrapperTransition = function (duration, byController) { + s.wrapper.transition(duration); + if (s.params.effect !== 'slide' && s.effects[s.params.effect]) { + s.effects[s.params.effect].setTransition(duration); + } + if (s.params.parallax && s.parallax) { + s.parallax.setTransition(duration); + } + if (s.params.scrollbar && s.scrollbar) { + s.scrollbar.setTransition(duration); + } + if (s.params.control && s.controller) { + s.controller.setTransition(duration, byController); + } + s.emit('onSetTransition', s, duration); + }; + s.setWrapperTranslate = function (translate, updateActiveIndex, byController) { + var x = 0, y = 0, z = 0; + if (s.isHorizontal()) { + x = s.rtl ? -translate : translate; + } + else { + y = translate; + } + + if (s.params.roundLengths) { + x = round(x); + y = round(y); + } + + if (!s.params.virtualTranslate) { + if (s.support.transforms3d) s.wrapper.transform('translate3d(' + x + 'px, ' + y + 'px, ' + z + 'px)'); + else s.wrapper.transform('translate(' + x + 'px, ' + y + 'px)'); + } + + s.translate = s.isHorizontal() ? x : y; + + // Check if we need to update progress + var progress; + var translatesDiff = s.maxTranslate() - s.minTranslate(); + if (translatesDiff === 0) { + progress = 0; + } + else { + progress = (translate - s.minTranslate()) / (translatesDiff); + } + if (progress !== s.progress) { + s.updateProgress(translate); + } + + if (updateActiveIndex) s.updateActiveIndex(); + if (s.params.effect !== 'slide' && s.effects[s.params.effect]) { + s.effects[s.params.effect].setTranslate(s.translate); + } + if (s.params.parallax && s.parallax) { + s.parallax.setTranslate(s.translate); + } + if (s.params.scrollbar && s.scrollbar) { + s.scrollbar.setTranslate(s.translate); + } + if (s.params.control && s.controller) { + s.controller.setTranslate(s.translate, byController); + } + s.emit('onSetTranslate', s, s.translate); + }; + + s.getTranslate = function (el, axis) { + var matrix, curTransform, curStyle, transformMatrix; + + // automatic axis detection + if (typeof axis === 'undefined') { + axis = 'x'; + } + + if (s.params.virtualTranslate) { + return s.rtl ? -s.translate : s.translate; + } + + curStyle = window.getComputedStyle(el, null); + if (window.WebKitCSSMatrix) { + curTransform = curStyle.transform || curStyle.webkitTransform; + if (curTransform.split(',').length > 6) { + curTransform = curTransform.split(', ').map(function(a){ + return a.replace(',','.'); + }).join(', '); + } + // Some old versions of Webkit choke when 'none' is passed; pass + // empty string instead in this case + transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); + } + else { + transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); + matrix = transformMatrix.toString().split(','); + } + + if (axis === 'x') { + //Latest Chrome and webkits Fix + if (window.WebKitCSSMatrix) + curTransform = transformMatrix.m41; + //Crazy IE10 Matrix + else if (matrix.length === 16) + curTransform = parseFloat(matrix[12]); + //Normal Browsers + else + curTransform = parseFloat(matrix[4]); + } + if (axis === 'y') { + //Latest Chrome and webkits Fix + if (window.WebKitCSSMatrix) + curTransform = transformMatrix.m42; + //Crazy IE10 Matrix + else if (matrix.length === 16) + curTransform = parseFloat(matrix[13]); + //Normal Browsers + else + curTransform = parseFloat(matrix[5]); + } + if (s.rtl && curTransform) curTransform = -curTransform; + return curTransform || 0; + }; + s.getWrapperTranslate = function (axis) { + if (typeof axis === 'undefined') { + axis = s.isHorizontal() ? 'x' : 'y'; + } + return s.getTranslate(s.wrapper[0], axis); + }; + + /*========================= + Observer + ===========================*/ + s.observers = []; + function initObserver(target, options) { + options = options || {}; + // create an observer instance + var ObserverFunc = window.MutationObserver || window.WebkitMutationObserver; + var observer = new ObserverFunc(function (mutations) { + mutations.forEach(function (mutation) { + s.onResize(true); + s.emit('onObserverUpdate', s, mutation); + }); + }); + + observer.observe(target, { + attributes: typeof options.attributes === 'undefined' ? true : options.attributes, + childList: typeof options.childList === 'undefined' ? true : options.childList, + characterData: typeof options.characterData === 'undefined' ? true : options.characterData + }); + + s.observers.push(observer); + } + s.initObservers = function () { + if (s.params.observeParents) { + var containerParents = s.container.parents(); + for (var i = 0; i < containerParents.length; i++) { + initObserver(containerParents[i]); + } + } + + // Observe container + initObserver(s.container[0], {childList: false}); + + // Observe wrapper + initObserver(s.wrapper[0], {attributes: false}); + }; + s.disconnectObservers = function () { + for (var i = 0; i < s.observers.length; i++) { + s.observers[i].disconnect(); + } + s.observers = []; + }; + /*========================= + Loop + ===========================*/ + // Create looped slides + s.createLoop = function () { + // Remove duplicated slides + s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove(); + + var slides = s.wrapper.children('.' + s.params.slideClass); + + if(s.params.slidesPerView === 'auto' && !s.params.loopedSlides) s.params.loopedSlides = slides.length; + + s.loopedSlides = parseInt(s.params.loopedSlides || s.params.slidesPerView, 10); + s.loopedSlides = s.loopedSlides + s.params.loopAdditionalSlides; + if (s.loopedSlides > slides.length) { + s.loopedSlides = slides.length; + } + + var prependSlides = [], appendSlides = [], i; + slides.each(function (index, el) { + var slide = $(this); + if (index < s.loopedSlides) appendSlides.push(el); + if (index < slides.length && index >= slides.length - s.loopedSlides) prependSlides.push(el); + slide.attr('data-swiper-slide-index', index); + }); + for (i = 0; i < appendSlides.length; i++) { + s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass)); + } + for (i = prependSlides.length - 1; i >= 0; i--) { + s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass)); + } + }; + s.destroyLoop = function () { + s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove(); + s.slides.removeAttr('data-swiper-slide-index'); + }; + s.reLoop = function (updatePosition) { + var oldIndex = s.activeIndex - s.loopedSlides; + s.destroyLoop(); + s.createLoop(); + s.updateSlidesSize(); + if (updatePosition) { + s.slideTo(oldIndex + s.loopedSlides, 0, false); + } + + }; + s.fixLoop = function () { + var newIndex; + //Fix For Negative Oversliding + if (s.activeIndex < s.loopedSlides) { + newIndex = s.slides.length - s.loopedSlides * 3 + s.activeIndex; + newIndex = newIndex + s.loopedSlides; + s.slideTo(newIndex, 0, false, true); + } + //Fix For Positive Oversliding + else if ((s.params.slidesPerView === 'auto' && s.activeIndex >= s.loopedSlides * 2) || (s.activeIndex > s.slides.length - s.params.slidesPerView * 2)) { + newIndex = -s.slides.length + s.activeIndex + s.loopedSlides; + newIndex = newIndex + s.loopedSlides; + s.slideTo(newIndex, 0, false, true); + } + }; + /*========================= + Append/Prepend/Remove Slides + ===========================*/ + s.appendSlide = function (slides) { + if (s.params.loop) { + s.destroyLoop(); + } + if (typeof slides === 'object' && slides.length) { + for (var i = 0; i < slides.length; i++) { + if (slides[i]) s.wrapper.append(slides[i]); + } + } + else { + s.wrapper.append(slides); + } + if (s.params.loop) { + s.createLoop(); + } + if (!(s.params.observer && s.support.observer)) { + s.update(true); + } + }; + s.prependSlide = function (slides) { + if (s.params.loop) { + s.destroyLoop(); + } + var newActiveIndex = s.activeIndex + 1; + if (typeof slides === 'object' && slides.length) { + for (var i = 0; i < slides.length; i++) { + if (slides[i]) s.wrapper.prepend(slides[i]); + } + newActiveIndex = s.activeIndex + slides.length; + } + else { + s.wrapper.prepend(slides); + } + if (s.params.loop) { + s.createLoop(); + } + if (!(s.params.observer && s.support.observer)) { + s.update(true); + } + s.slideTo(newActiveIndex, 0, false); + }; + s.removeSlide = function (slidesIndexes) { + if (s.params.loop) { + s.destroyLoop(); + s.slides = s.wrapper.children('.' + s.params.slideClass); + } + var newActiveIndex = s.activeIndex, + indexToRemove; + if (typeof slidesIndexes === 'object' && slidesIndexes.length) { + for (var i = 0; i < slidesIndexes.length; i++) { + indexToRemove = slidesIndexes[i]; + if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove(); + if (indexToRemove < newActiveIndex) newActiveIndex--; + } + newActiveIndex = Math.max(newActiveIndex, 0); + } + else { + indexToRemove = slidesIndexes; + if (s.slides[indexToRemove]) s.slides.eq(indexToRemove).remove(); + if (indexToRemove < newActiveIndex) newActiveIndex--; + newActiveIndex = Math.max(newActiveIndex, 0); + } + + if (s.params.loop) { + s.createLoop(); + } + + if (!(s.params.observer && s.support.observer)) { + s.update(true); + } + if (s.params.loop) { + s.slideTo(newActiveIndex + s.loopedSlides, 0, false); + } + else { + s.slideTo(newActiveIndex, 0, false); + } + + }; + s.removeAllSlides = function () { + var slidesIndexes = []; + for (var i = 0; i < s.slides.length; i++) { + slidesIndexes.push(i); + } + s.removeSlide(slidesIndexes); + }; + + + /*========================= + Effects + ===========================*/ + s.effects = { + fade: { + setTranslate: function () { + for (var i = 0; i < s.slides.length; i++) { + var slide = s.slides.eq(i); + var offset = slide[0].swiperSlideOffset; + var tx = -offset; + if (!s.params.virtualTranslate) tx = tx - s.translate; + var ty = 0; + if (!s.isHorizontal()) { + ty = tx; + tx = 0; + } + var slideOpacity = s.params.fade.crossFade ? + Math.max(1 - Math.abs(slide[0].progress), 0) : + 1 + Math.min(Math.max(slide[0].progress, -1), 0); + slide + .css({ + opacity: slideOpacity + }) + .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px)'); + + } + + }, + setTransition: function (duration) { + s.slides.transition(duration); + if (s.params.virtualTranslate && duration !== 0) { + var eventTriggered = false; + s.slides.transitionEnd(function () { + if (eventTriggered) return; + if (!s) return; + eventTriggered = true; + s.animating = false; + var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd']; + for (var i = 0; i < triggerEvents.length; i++) { + s.wrapper.trigger(triggerEvents[i]); + } + }); + } + } + }, + flip: { + setTranslate: function () { + for (var i = 0; i < s.slides.length; i++) { + var slide = s.slides.eq(i); + var progress = slide[0].progress; + if (s.params.flip.limitRotation) { + progress = Math.max(Math.min(slide[0].progress, 1), -1); + } + var offset = slide[0].swiperSlideOffset; + var rotate = -180 * progress, + rotateY = rotate, + rotateX = 0, + tx = -offset, + ty = 0; + if (!s.isHorizontal()) { + ty = tx; + tx = 0; + rotateX = -rotateY; + rotateY = 0; + } + else if (s.rtl) { + rotateY = -rotateY; + } + + slide[0].style.zIndex = -Math.abs(Math.round(progress)) + s.slides.length; + + if (s.params.flip.slideShadows) { + //Set shadows + var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top'); + var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom'); + if (shadowBefore.length === 0) { + shadowBefore = $('
                                                          '); + slide.append(shadowBefore); + } + if (shadowAfter.length === 0) { + shadowAfter = $('
                                                          '); + slide.append(shadowAfter); + } + if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); + if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); + } + + slide + .transform('translate3d(' + tx + 'px, ' + ty + 'px, 0px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)'); + } + }, + setTransition: function (duration) { + s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + if (s.params.virtualTranslate && duration !== 0) { + var eventTriggered = false; + s.slides.eq(s.activeIndex).transitionEnd(function () { + if (eventTriggered) return; + if (!s) return; + if (!$(this).hasClass(s.params.slideActiveClass)) return; + eventTriggered = true; + s.animating = false; + var triggerEvents = ['webkitTransitionEnd', 'transitionend', 'oTransitionEnd', 'MSTransitionEnd', 'msTransitionEnd']; + for (var i = 0; i < triggerEvents.length; i++) { + s.wrapper.trigger(triggerEvents[i]); + } + }); + } + } + }, + cube: { + setTranslate: function () { + var wrapperRotate = 0, cubeShadow; + if (s.params.cube.shadow) { + if (s.isHorizontal()) { + cubeShadow = s.wrapper.find('.swiper-cube-shadow'); + if (cubeShadow.length === 0) { + cubeShadow = $('
                                                          '); + s.wrapper.append(cubeShadow); + } + cubeShadow.css({height: s.width + 'px'}); + } + else { + cubeShadow = s.container.find('.swiper-cube-shadow'); + if (cubeShadow.length === 0) { + cubeShadow = $('
                                                          '); + s.container.append(cubeShadow); + } + } + } + for (var i = 0; i < s.slides.length; i++) { + var slide = s.slides.eq(i); + var slideAngle = i * 90; + var round = Math.floor(slideAngle / 360); + if (s.rtl) { + slideAngle = -slideAngle; + round = Math.floor(-slideAngle / 360); + } + var progress = Math.max(Math.min(slide[0].progress, 1), -1); + var tx = 0, ty = 0, tz = 0; + if (i % 4 === 0) { + tx = - round * 4 * s.size; + tz = 0; + } + else if ((i - 1) % 4 === 0) { + tx = 0; + tz = - round * 4 * s.size; + } + else if ((i - 2) % 4 === 0) { + tx = s.size + round * 4 * s.size; + tz = s.size; + } + else if ((i - 3) % 4 === 0) { + tx = - s.size; + tz = 3 * s.size + s.size * 4 * round; + } + if (s.rtl) { + tx = -tx; + } + + if (!s.isHorizontal()) { + ty = tx; + tx = 0; + } + + var transform = 'rotateX(' + (s.isHorizontal() ? 0 : -slideAngle) + 'deg) rotateY(' + (s.isHorizontal() ? slideAngle : 0) + 'deg) translate3d(' + tx + 'px, ' + ty + 'px, ' + tz + 'px)'; + if (progress <= 1 && progress > -1) { + wrapperRotate = i * 90 + progress * 90; + if (s.rtl) wrapperRotate = -i * 90 - progress * 90; + } + slide.transform(transform); + if (s.params.cube.slideShadows) { + //Set shadows + var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top'); + var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom'); + if (shadowBefore.length === 0) { + shadowBefore = $('
                                                          '); + slide.append(shadowBefore); + } + if (shadowAfter.length === 0) { + shadowAfter = $('
                                                          '); + slide.append(shadowAfter); + } + if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); + if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); + } + } + s.wrapper.css({ + '-webkit-transform-origin': '50% 50% -' + (s.size / 2) + 'px', + '-moz-transform-origin': '50% 50% -' + (s.size / 2) + 'px', + '-ms-transform-origin': '50% 50% -' + (s.size / 2) + 'px', + 'transform-origin': '50% 50% -' + (s.size / 2) + 'px' + }); + + if (s.params.cube.shadow) { + if (s.isHorizontal()) { + cubeShadow.transform('translate3d(0px, ' + (s.width / 2 + s.params.cube.shadowOffset) + 'px, ' + (-s.width / 2) + 'px) rotateX(90deg) rotateZ(0deg) scale(' + (s.params.cube.shadowScale) + ')'); + } + else { + var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90; + var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2); + var scale1 = s.params.cube.shadowScale, + scale2 = s.params.cube.shadowScale / multiplier, + offset = s.params.cube.shadowOffset; + cubeShadow.transform('scale3d(' + scale1 + ', 1, ' + scale2 + ') translate3d(0px, ' + (s.height / 2 + offset) + 'px, ' + (-s.height / 2 / scale2) + 'px) rotateX(-90deg)'); + } + } + var zFactor = (s.isSafari || s.isUiWebView) ? (-s.size / 2) : 0; + s.wrapper.transform('translate3d(0px,0,' + zFactor + 'px) rotateX(' + (s.isHorizontal() ? 0 : wrapperRotate) + 'deg) rotateY(' + (s.isHorizontal() ? -wrapperRotate : 0) + 'deg)'); + }, + setTransition: function (duration) { + s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + if (s.params.cube.shadow && !s.isHorizontal()) { + s.container.find('.swiper-cube-shadow').transition(duration); + } + } + }, + coverflow: { + setTranslate: function () { + var transform = s.translate; + var center = s.isHorizontal() ? -transform + s.width / 2 : -transform + s.height / 2; + var rotate = s.isHorizontal() ? s.params.coverflow.rotate: -s.params.coverflow.rotate; + var translate = s.params.coverflow.depth; + //Each slide offset from center + for (var i = 0, length = s.slides.length; i < length; i++) { + var slide = s.slides.eq(i); + var slideSize = s.slidesSizesGrid[i]; + var slideOffset = slide[0].swiperSlideOffset; + var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * s.params.coverflow.modifier; + + var rotateY = s.isHorizontal() ? rotate * offsetMultiplier : 0; + var rotateX = s.isHorizontal() ? 0 : rotate * offsetMultiplier; + // var rotateZ = 0 + var translateZ = -translate * Math.abs(offsetMultiplier); + + var translateY = s.isHorizontal() ? 0 : s.params.coverflow.stretch * (offsetMultiplier); + var translateX = s.isHorizontal() ? s.params.coverflow.stretch * (offsetMultiplier) : 0; + + //Fix for ultra small values + if (Math.abs(translateX) < 0.001) translateX = 0; + if (Math.abs(translateY) < 0.001) translateY = 0; + if (Math.abs(translateZ) < 0.001) translateZ = 0; + if (Math.abs(rotateY) < 0.001) rotateY = 0; + if (Math.abs(rotateX) < 0.001) rotateX = 0; + + var slideTransform = 'translate3d(' + translateX + 'px,' + translateY + 'px,' + translateZ + 'px) rotateX(' + rotateX + 'deg) rotateY(' + rotateY + 'deg)'; + + slide.transform(slideTransform); + slide[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; + if (s.params.coverflow.slideShadows) { + //Set shadows + var shadowBefore = s.isHorizontal() ? slide.find('.swiper-slide-shadow-left') : slide.find('.swiper-slide-shadow-top'); + var shadowAfter = s.isHorizontal() ? slide.find('.swiper-slide-shadow-right') : slide.find('.swiper-slide-shadow-bottom'); + if (shadowBefore.length === 0) { + shadowBefore = $('
                                                          '); + slide.append(shadowBefore); + } + if (shadowAfter.length === 0) { + shadowAfter = $('
                                                          '); + slide.append(shadowAfter); + } + if (shadowBefore.length) shadowBefore[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; + if (shadowAfter.length) shadowAfter[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0; + } + } + + //Set correct perspective for IE10 + if (s.browser.ie) { + var ws = s.wrapper[0].style; + ws.perspectiveOrigin = center + 'px 50%'; + } + }, + setTransition: function (duration) { + s.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + } + } + }; + + + /*========================= + Images Lazy Loading + ===========================*/ + s.lazy = { + initialImageLoaded: false, + loadImageInSlide: function (index, loadInDuplicate) { + if (typeof index === 'undefined') return; + if (typeof loadInDuplicate === 'undefined') loadInDuplicate = true; + if (s.slides.length === 0) return; + + var slide = s.slides.eq(index); + var img = slide.find('.' + s.params.lazyLoadingClass + ':not(.' + s.params.lazyStatusLoadedClass + '):not(.' + s.params.lazyStatusLoadingClass + ')'); + if (slide.hasClass(s.params.lazyLoadingClass) && !slide.hasClass(s.params.lazyStatusLoadedClass) && !slide.hasClass(s.params.lazyStatusLoadingClass)) { + img = img.add(slide[0]); + } + if (img.length === 0) return; + + img.each(function () { + var _img = $(this); + _img.addClass(s.params.lazyStatusLoadingClass); + var background = _img.attr('data-background'); + var src = _img.attr('data-src'), + srcset = _img.attr('data-srcset'), + sizes = _img.attr('data-sizes'); + s.loadImage(_img[0], (src || background), srcset, sizes, false, function () { + if (typeof s === 'undefined' || s === null || !s) return; + if (background) { + _img.css('background-image', 'url("' + background + '")'); + _img.removeAttr('data-background'); + } + else { + if (srcset) { + _img.attr('srcset', srcset); + _img.removeAttr('data-srcset'); + } + if (sizes) { + _img.attr('sizes', sizes); + _img.removeAttr('data-sizes'); + } + if (src) { + _img.attr('src', src); + _img.removeAttr('data-src'); + } + + } + + _img.addClass(s.params.lazyStatusLoadedClass).removeClass(s.params.lazyStatusLoadingClass); + slide.find('.' + s.params.lazyPreloaderClass + ', .' + s.params.preloaderClass).remove(); + if (s.params.loop && loadInDuplicate) { + var slideOriginalIndex = slide.attr('data-swiper-slide-index'); + if (slide.hasClass(s.params.slideDuplicateClass)) { + var originalSlide = s.wrapper.children('[data-swiper-slide-index="' + slideOriginalIndex + '"]:not(.' + s.params.slideDuplicateClass + ')'); + s.lazy.loadImageInSlide(originalSlide.index(), false); + } + else { + var duplicatedSlide = s.wrapper.children('.' + s.params.slideDuplicateClass + '[data-swiper-slide-index="' + slideOriginalIndex + '"]'); + s.lazy.loadImageInSlide(duplicatedSlide.index(), false); + } + } + s.emit('onLazyImageReady', s, slide[0], _img[0]); + }); + + s.emit('onLazyImageLoad', s, slide[0], _img[0]); + }); + + }, + load: function () { + var i; + var slidesPerView = s.params.slidesPerView; + if (slidesPerView === 'auto') { + slidesPerView = 0; + } + if (!s.lazy.initialImageLoaded) s.lazy.initialImageLoaded = true; + if (s.params.watchSlidesVisibility) { + s.wrapper.children('.' + s.params.slideVisibleClass).each(function () { + s.lazy.loadImageInSlide($(this).index()); + }); + } + else { + if (slidesPerView > 1) { + for (i = s.activeIndex; i < s.activeIndex + slidesPerView ; i++) { + if (s.slides[i]) s.lazy.loadImageInSlide(i); + } + } + else { + s.lazy.loadImageInSlide(s.activeIndex); + } + } + if (s.params.lazyLoadingInPrevNext) { + if (slidesPerView > 1 || (s.params.lazyLoadingInPrevNextAmount && s.params.lazyLoadingInPrevNextAmount > 1)) { + var amount = s.params.lazyLoadingInPrevNextAmount; + var spv = slidesPerView; + var maxIndex = Math.min(s.activeIndex + spv + Math.max(amount, spv), s.slides.length); + var minIndex = Math.max(s.activeIndex - Math.max(spv, amount), 0); + // Next Slides + for (i = s.activeIndex + slidesPerView; i < maxIndex; i++) { + if (s.slides[i]) s.lazy.loadImageInSlide(i); + } + // Prev Slides + for (i = minIndex; i < s.activeIndex ; i++) { + if (s.slides[i]) s.lazy.loadImageInSlide(i); + } + } + else { + var nextSlide = s.wrapper.children('.' + s.params.slideNextClass); + if (nextSlide.length > 0) s.lazy.loadImageInSlide(nextSlide.index()); + + var prevSlide = s.wrapper.children('.' + s.params.slidePrevClass); + if (prevSlide.length > 0) s.lazy.loadImageInSlide(prevSlide.index()); + } + } + }, + onTransitionStart: function () { + if (s.params.lazyLoading) { + if (s.params.lazyLoadingOnTransitionStart || (!s.params.lazyLoadingOnTransitionStart && !s.lazy.initialImageLoaded)) { + s.lazy.load(); + } + } + }, + onTransitionEnd: function () { + if (s.params.lazyLoading && !s.params.lazyLoadingOnTransitionStart) { + s.lazy.load(); + } + } + }; + + + /*========================= + Scrollbar + ===========================*/ + s.scrollbar = { + isTouched: false, + setDragPosition: function (e) { + var sb = s.scrollbar; + var x = 0, y = 0; + var translate; + var pointerPosition = s.isHorizontal() ? + ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX) : + ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY) ; + var position = (pointerPosition) - sb.track.offset()[s.isHorizontal() ? 'left' : 'top'] - sb.dragSize / 2; + var positionMin = -s.minTranslate() * sb.moveDivider; + var positionMax = -s.maxTranslate() * sb.moveDivider; + if (position < positionMin) { + position = positionMin; + } + else if (position > positionMax) { + position = positionMax; + } + position = -position / sb.moveDivider; + s.updateProgress(position); + s.setWrapperTranslate(position, true); + }, + dragStart: function (e) { + var sb = s.scrollbar; + sb.isTouched = true; + e.preventDefault(); + e.stopPropagation(); + + sb.setDragPosition(e); + clearTimeout(sb.dragTimeout); + + sb.track.transition(0); + if (s.params.scrollbarHide) { + sb.track.css('opacity', 1); + } + s.wrapper.transition(100); + sb.drag.transition(100); + s.emit('onScrollbarDragStart', s); + }, + dragMove: function (e) { + var sb = s.scrollbar; + if (!sb.isTouched) return; + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + sb.setDragPosition(e); + s.wrapper.transition(0); + sb.track.transition(0); + sb.drag.transition(0); + s.emit('onScrollbarDragMove', s); + }, + dragEnd: function (e) { + var sb = s.scrollbar; + if (!sb.isTouched) return; + sb.isTouched = false; + if (s.params.scrollbarHide) { + clearTimeout(sb.dragTimeout); + sb.dragTimeout = setTimeout(function () { + sb.track.css('opacity', 0); + sb.track.transition(400); + }, 1000); + + } + s.emit('onScrollbarDragEnd', s); + if (s.params.scrollbarSnapOnRelease) { + s.slideReset(); + } + }, + draggableEvents: (function () { + if ((s.params.simulateTouch === false && !s.support.touch)) return s.touchEventsDesktop; + else return s.touchEvents; + })(), + enableDraggable: function () { + var sb = s.scrollbar; + var target = s.support.touch ? sb.track : document; + $(sb.track).on(sb.draggableEvents.start, sb.dragStart); + $(target).on(sb.draggableEvents.move, sb.dragMove); + $(target).on(sb.draggableEvents.end, sb.dragEnd); + }, + disableDraggable: function () { + var sb = s.scrollbar; + var target = s.support.touch ? sb.track : document; + $(sb.track).off(sb.draggableEvents.start, sb.dragStart); + $(target).off(sb.draggableEvents.move, sb.dragMove); + $(target).off(sb.draggableEvents.end, sb.dragEnd); + }, + set: function () { + if (!s.params.scrollbar) return; + var sb = s.scrollbar; + sb.track = $(s.params.scrollbar); + if (s.params.uniqueNavElements && typeof s.params.scrollbar === 'string' && sb.track.length > 1 && s.container.find(s.params.scrollbar).length === 1) { + sb.track = s.container.find(s.params.scrollbar); + } + sb.drag = sb.track.find('.swiper-scrollbar-drag'); + if (sb.drag.length === 0) { + sb.drag = $('
                                                          '); + sb.track.append(sb.drag); + } + sb.drag[0].style.width = ''; + sb.drag[0].style.height = ''; + sb.trackSize = s.isHorizontal() ? sb.track[0].offsetWidth : sb.track[0].offsetHeight; + + sb.divider = s.size / s.virtualSize; + sb.moveDivider = sb.divider * (sb.trackSize / s.size); + sb.dragSize = sb.trackSize * sb.divider; + + if (s.isHorizontal()) { + sb.drag[0].style.width = sb.dragSize + 'px'; + } + else { + sb.drag[0].style.height = sb.dragSize + 'px'; + } + + if (sb.divider >= 1) { + sb.track[0].style.display = 'none'; + } + else { + sb.track[0].style.display = ''; + } + if (s.params.scrollbarHide) { + sb.track[0].style.opacity = 0; + } + }, + setTranslate: function () { + if (!s.params.scrollbar) return; + var diff; + var sb = s.scrollbar; + var translate = s.translate || 0; + var newPos; + + var newSize = sb.dragSize; + newPos = (sb.trackSize - sb.dragSize) * s.progress; + if (s.rtl && s.isHorizontal()) { + newPos = -newPos; + if (newPos > 0) { + newSize = sb.dragSize - newPos; + newPos = 0; + } + else if (-newPos + sb.dragSize > sb.trackSize) { + newSize = sb.trackSize + newPos; + } + } + else { + if (newPos < 0) { + newSize = sb.dragSize + newPos; + newPos = 0; + } + else if (newPos + sb.dragSize > sb.trackSize) { + newSize = sb.trackSize - newPos; + } + } + if (s.isHorizontal()) { + if (s.support.transforms3d) { + sb.drag.transform('translate3d(' + (newPos) + 'px, 0, 0)'); + } + else { + sb.drag.transform('translateX(' + (newPos) + 'px)'); + } + sb.drag[0].style.width = newSize + 'px'; + } + else { + if (s.support.transforms3d) { + sb.drag.transform('translate3d(0px, ' + (newPos) + 'px, 0)'); + } + else { + sb.drag.transform('translateY(' + (newPos) + 'px)'); + } + sb.drag[0].style.height = newSize + 'px'; + } + if (s.params.scrollbarHide) { + clearTimeout(sb.timeout); + sb.track[0].style.opacity = 1; + sb.timeout = setTimeout(function () { + sb.track[0].style.opacity = 0; + sb.track.transition(400); + }, 1000); + } + }, + setTransition: function (duration) { + if (!s.params.scrollbar) return; + s.scrollbar.drag.transition(duration); + } + }; + + + /*========================= + Controller + ===========================*/ + s.controller = { + LinearSpline: function (x, y) { + var binarySearch = (function() { + var maxIndex, minIndex, guess; + return function(array, val) { + minIndex = -1; + maxIndex = array.length; + while (maxIndex - minIndex > 1) + if (array[guess = maxIndex + minIndex >> 1] <= val) { + minIndex = guess; + } else { + maxIndex = guess; + } + return maxIndex; + }; + })(); + this.x = x; + this.y = y; + this.lastIndex = x.length - 1; + // Given an x value (x2), return the expected y2 value: + // (x1,y1) is the known point before given value, + // (x3,y3) is the known point after given value. + var i1, i3; + var l = this.x.length; + + this.interpolate = function (x2) { + if (!x2) return 0; + + // Get the indexes of x1 and x3 (the array indexes before and after given x2): + i3 = binarySearch(this.x, x2); + i1 = i3 - 1; + + // We have our indexes i1 & i3, so we can calculate already: + // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1 + return ((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1]) + this.y[i1]; + }; + }, + //xxx: for now i will just save one spline function to to + getInterpolateFunction: function(c){ + if(!s.controller.spline) s.controller.spline = s.params.loop ? + new s.controller.LinearSpline(s.slidesGrid, c.slidesGrid) : + new s.controller.LinearSpline(s.snapGrid, c.snapGrid); + }, + setTranslate: function (translate, byController) { + var controlled = s.params.control; + var multiplier, controlledTranslate; + function setControlledTranslate(c) { + // this will create an Interpolate function based on the snapGrids + // x is the Grid of the scrolled scroller and y will be the controlled scroller + // it makes sense to create this only once and recall it for the interpolation + // the function does a lot of value caching for performance + translate = c.rtl && c.params.direction === 'horizontal' ? -s.translate : s.translate; + if (s.params.controlBy === 'slide') { + s.controller.getInterpolateFunction(c); + // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid + // but it did not work out + controlledTranslate = -s.controller.spline.interpolate(-translate); + } + + if(!controlledTranslate || s.params.controlBy === 'container'){ + multiplier = (c.maxTranslate() - c.minTranslate()) / (s.maxTranslate() - s.minTranslate()); + controlledTranslate = (translate - s.minTranslate()) * multiplier + c.minTranslate(); + } + + if (s.params.controlInverse) { + controlledTranslate = c.maxTranslate() - controlledTranslate; + } + c.updateProgress(controlledTranslate); + c.setWrapperTranslate(controlledTranslate, false, s); + c.updateActiveIndex(); + } + if (Array.isArray(controlled)) { + for (var i = 0; i < controlled.length; i++) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTranslate(controlled[i]); + } + } + } + else if (controlled instanceof Swiper && byController !== controlled) { + + setControlledTranslate(controlled); + } + }, + setTransition: function (duration, byController) { + var controlled = s.params.control; + var i; + function setControlledTransition(c) { + c.setWrapperTransition(duration, s); + if (duration !== 0) { + c.onTransitionStart(); + c.wrapper.transitionEnd(function(){ + if (!controlled) return; + if (c.params.loop && s.params.controlBy === 'slide') { + c.fixLoop(); + } + c.onTransitionEnd(); + + }); + } + } + if (Array.isArray(controlled)) { + for (i = 0; i < controlled.length; i++) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTransition(controlled[i]); + } + } + } + else if (controlled instanceof Swiper && byController !== controlled) { + setControlledTransition(controlled); + } + } + }; + + + /*========================= + Parallax + ===========================*/ + function setParallaxTransform(el, progress) { + el = $(el); + var p, pX, pY; + var rtlFactor = s.rtl ? -1 : 1; + + p = el.attr('data-swiper-parallax') || '0'; + pX = el.attr('data-swiper-parallax-x'); + pY = el.attr('data-swiper-parallax-y'); + if (pX || pY) { + pX = pX || '0'; + pY = pY || '0'; + } + else { + if (s.isHorizontal()) { + pX = p; + pY = '0'; + } + else { + pY = p; + pX = '0'; + } + } + + if ((pX).indexOf('%') >= 0) { + pX = parseInt(pX, 10) * progress * rtlFactor + '%'; + } + else { + pX = pX * progress * rtlFactor + 'px' ; + } + if ((pY).indexOf('%') >= 0) { + pY = parseInt(pY, 10) * progress + '%'; + } + else { + pY = pY * progress + 'px' ; + } + + el.transform('translate3d(' + pX + ', ' + pY + ',0px)'); + } + s.parallax = { + setTranslate: function () { + s.container.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){ + setParallaxTransform(this, s.progress); + + }); + s.slides.each(function () { + var slide = $(this); + slide.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function () { + var progress = Math.min(Math.max(slide[0].progress, -1), 1); + setParallaxTransform(this, progress); + }); + }); + }, + setTransition: function (duration) { + if (typeof duration === 'undefined') duration = s.params.speed; + s.container.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]').each(function(){ + var el = $(this); + var parallaxDuration = parseInt(el.attr('data-swiper-parallax-duration'), 10) || duration; + if (duration === 0) parallaxDuration = 0; + el.transition(parallaxDuration); + }); + } + }; + + + /*========================= + Zoom + ===========================*/ + s.zoom = { + // "Global" Props + scale: 1, + currentScale: 1, + isScaling: false, + gesture: { + slide: undefined, + slideWidth: undefined, + slideHeight: undefined, + image: undefined, + imageWrap: undefined, + zoomMax: s.params.zoomMax + }, + image: { + isTouched: undefined, + isMoved: undefined, + currentX: undefined, + currentY: undefined, + minX: undefined, + minY: undefined, + maxX: undefined, + maxY: undefined, + width: undefined, + height: undefined, + startX: undefined, + startY: undefined, + touchesStart: {}, + touchesCurrent: {} + }, + velocity: { + x: undefined, + y: undefined, + prevPositionX: undefined, + prevPositionY: undefined, + prevTime: undefined + }, + // Calc Scale From Multi-touches + getDistanceBetweenTouches: function (e) { + if (e.targetTouches.length < 2) return 1; + var x1 = e.targetTouches[0].pageX, + y1 = e.targetTouches[0].pageY, + x2 = e.targetTouches[1].pageX, + y2 = e.targetTouches[1].pageY; + var distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); + return distance; + }, + // Events + onGestureStart: function (e) { + var z = s.zoom; + if (!s.support.gestures) { + if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) { + return; + } + z.gesture.scaleStart = z.getDistanceBetweenTouches(e); + } + if (!z.gesture.slide || !z.gesture.slide.length) { + z.gesture.slide = $(this); + if (z.gesture.slide.length === 0) z.gesture.slide = s.slides.eq(s.activeIndex); + z.gesture.image = z.gesture.slide.find('img, svg, canvas'); + z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass); + z.gesture.zoomMax = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax ; + if (z.gesture.imageWrap.length === 0) { + z.gesture.image = undefined; + return; + } + } + z.gesture.image.transition(0); + z.isScaling = true; + }, + onGestureChange: function (e) { + var z = s.zoom; + if (!s.support.gestures) { + if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) { + return; + } + z.gesture.scaleMove = z.getDistanceBetweenTouches(e); + } + if (!z.gesture.image || z.gesture.image.length === 0) return; + if (s.support.gestures) { + z.scale = e.scale * z.currentScale; + } + else { + z.scale = (z.gesture.scaleMove / z.gesture.scaleStart) * z.currentScale; + } + if (z.scale > z.gesture.zoomMax) { + z.scale = z.gesture.zoomMax - 1 + Math.pow((z.scale - z.gesture.zoomMax + 1), 0.5); + } + if (z.scale < s.params.zoomMin) { + z.scale = s.params.zoomMin + 1 - Math.pow((s.params.zoomMin - z.scale + 1), 0.5); + } + z.gesture.image.transform('translate3d(0,0,0) scale(' + z.scale + ')'); + }, + onGestureEnd: function (e) { + var z = s.zoom; + if (!s.support.gestures) { + if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2) { + return; + } + } + if (!z.gesture.image || z.gesture.image.length === 0) return; + z.scale = Math.max(Math.min(z.scale, z.gesture.zoomMax), s.params.zoomMin); + z.gesture.image.transition(s.params.speed).transform('translate3d(0,0,0) scale(' + z.scale + ')'); + z.currentScale = z.scale; + z.isScaling = false; + if (z.scale === 1) z.gesture.slide = undefined; + }, + onTouchStart: function (s, e) { + var z = s.zoom; + if (!z.gesture.image || z.gesture.image.length === 0) return; + if (z.image.isTouched) return; + if (s.device.os === 'android') e.preventDefault(); + z.image.isTouched = true; + z.image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + z.image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + }, + onTouchMove: function (e) { + var z = s.zoom; + if (!z.gesture.image || z.gesture.image.length === 0) return; + s.allowClick = false; + if (!z.image.isTouched || !z.gesture.slide) return; + + if (!z.image.isMoved) { + z.image.width = z.gesture.image[0].offsetWidth; + z.image.height = z.gesture.image[0].offsetHeight; + z.image.startX = s.getTranslate(z.gesture.imageWrap[0], 'x') || 0; + z.image.startY = s.getTranslate(z.gesture.imageWrap[0], 'y') || 0; + z.gesture.slideWidth = z.gesture.slide[0].offsetWidth; + z.gesture.slideHeight = z.gesture.slide[0].offsetHeight; + z.gesture.imageWrap.transition(0); + if (s.rtl) z.image.startX = -z.image.startX; + if (s.rtl) z.image.startY = -z.image.startY; + } + // Define if we need image drag + var scaledWidth = z.image.width * z.scale; + var scaledHeight = z.image.height * z.scale; + + if (scaledWidth < z.gesture.slideWidth && scaledHeight < z.gesture.slideHeight) return; + + z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0); + z.image.maxX = -z.image.minX; + z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0); + z.image.maxY = -z.image.minY; + + z.image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + z.image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + + if (!z.image.isMoved && !z.isScaling) { + if (s.isHorizontal() && + (Math.floor(z.image.minX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x < z.image.touchesStart.x) || + (Math.floor(z.image.maxX) === Math.floor(z.image.startX) && z.image.touchesCurrent.x > z.image.touchesStart.x) + ) { + z.image.isTouched = false; + return; + } + else if (!s.isHorizontal() && + (Math.floor(z.image.minY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y < z.image.touchesStart.y) || + (Math.floor(z.image.maxY) === Math.floor(z.image.startY) && z.image.touchesCurrent.y > z.image.touchesStart.y) + ) { + z.image.isTouched = false; + return; + } + } + e.preventDefault(); + e.stopPropagation(); + + z.image.isMoved = true; + z.image.currentX = z.image.touchesCurrent.x - z.image.touchesStart.x + z.image.startX; + z.image.currentY = z.image.touchesCurrent.y - z.image.touchesStart.y + z.image.startY; + + if (z.image.currentX < z.image.minX) { + z.image.currentX = z.image.minX + 1 - Math.pow((z.image.minX - z.image.currentX + 1), 0.8); + } + if (z.image.currentX > z.image.maxX) { + z.image.currentX = z.image.maxX - 1 + Math.pow((z.image.currentX - z.image.maxX + 1), 0.8); + } + + if (z.image.currentY < z.image.minY) { + z.image.currentY = z.image.minY + 1 - Math.pow((z.image.minY - z.image.currentY + 1), 0.8); + } + if (z.image.currentY > z.image.maxY) { + z.image.currentY = z.image.maxY - 1 + Math.pow((z.image.currentY - z.image.maxY + 1), 0.8); + } + + //Velocity + if (!z.velocity.prevPositionX) z.velocity.prevPositionX = z.image.touchesCurrent.x; + if (!z.velocity.prevPositionY) z.velocity.prevPositionY = z.image.touchesCurrent.y; + if (!z.velocity.prevTime) z.velocity.prevTime = Date.now(); + z.velocity.x = (z.image.touchesCurrent.x - z.velocity.prevPositionX) / (Date.now() - z.velocity.prevTime) / 2; + z.velocity.y = (z.image.touchesCurrent.y - z.velocity.prevPositionY) / (Date.now() - z.velocity.prevTime) / 2; + if (Math.abs(z.image.touchesCurrent.x - z.velocity.prevPositionX) < 2) z.velocity.x = 0; + if (Math.abs(z.image.touchesCurrent.y - z.velocity.prevPositionY) < 2) z.velocity.y = 0; + z.velocity.prevPositionX = z.image.touchesCurrent.x; + z.velocity.prevPositionY = z.image.touchesCurrent.y; + z.velocity.prevTime = Date.now(); + + z.gesture.imageWrap.transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)'); + }, + onTouchEnd: function (s, e) { + var z = s.zoom; + if (!z.gesture.image || z.gesture.image.length === 0) return; + if (!z.image.isTouched || !z.image.isMoved) { + z.image.isTouched = false; + z.image.isMoved = false; + return; + } + z.image.isTouched = false; + z.image.isMoved = false; + var momentumDurationX = 300; + var momentumDurationY = 300; + var momentumDistanceX = z.velocity.x * momentumDurationX; + var newPositionX = z.image.currentX + momentumDistanceX; + var momentumDistanceY = z.velocity.y * momentumDurationY; + var newPositionY = z.image.currentY + momentumDistanceY; + + //Fix duration + if (z.velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - z.image.currentX) / z.velocity.x); + if (z.velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - z.image.currentY) / z.velocity.y); + var momentumDuration = Math.max(momentumDurationX, momentumDurationY); + + z.image.currentX = newPositionX; + z.image.currentY = newPositionY; + + // Define if we need image drag + var scaledWidth = z.image.width * z.scale; + var scaledHeight = z.image.height * z.scale; + z.image.minX = Math.min((z.gesture.slideWidth / 2 - scaledWidth / 2), 0); + z.image.maxX = -z.image.minX; + z.image.minY = Math.min((z.gesture.slideHeight / 2 - scaledHeight / 2), 0); + z.image.maxY = -z.image.minY; + z.image.currentX = Math.max(Math.min(z.image.currentX, z.image.maxX), z.image.minX); + z.image.currentY = Math.max(Math.min(z.image.currentY, z.image.maxY), z.image.minY); + + z.gesture.imageWrap.transition(momentumDuration).transform('translate3d(' + z.image.currentX + 'px, ' + z.image.currentY + 'px,0)'); + }, + onTransitionEnd: function (s) { + var z = s.zoom; + if (z.gesture.slide && s.previousIndex !== s.activeIndex) { + z.gesture.image.transform('translate3d(0,0,0) scale(1)'); + z.gesture.imageWrap.transform('translate3d(0,0,0)'); + z.gesture.slide = z.gesture.image = z.gesture.imageWrap = undefined; + z.scale = z.currentScale = 1; + } + }, + // Toggle Zoom + toggleZoom: function (s, e) { + var z = s.zoom; + if (!z.gesture.slide) { + z.gesture.slide = s.clickedSlide ? $(s.clickedSlide) : s.slides.eq(s.activeIndex); + z.gesture.image = z.gesture.slide.find('img, svg, canvas'); + z.gesture.imageWrap = z.gesture.image.parent('.' + s.params.zoomContainerClass); + } + if (!z.gesture.image || z.gesture.image.length === 0) return; + + var touchX, touchY, offsetX, offsetY, diffX, diffY, translateX, translateY, imageWidth, imageHeight, scaledWidth, scaledHeight, translateMinX, translateMinY, translateMaxX, translateMaxY, slideWidth, slideHeight; + + if (typeof z.image.touchesStart.x === 'undefined' && e) { + touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX; + touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY; + } + else { + touchX = z.image.touchesStart.x; + touchY = z.image.touchesStart.y; + } + + if (z.scale && z.scale !== 1) { + // Zoom Out + z.scale = z.currentScale = 1; + z.gesture.imageWrap.transition(300).transform('translate3d(0,0,0)'); + z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(1)'); + z.gesture.slide = undefined; + } + else { + // Zoom In + z.scale = z.currentScale = z.gesture.imageWrap.attr('data-swiper-zoom') || s.params.zoomMax; + if (e) { + slideWidth = z.gesture.slide[0].offsetWidth; + slideHeight = z.gesture.slide[0].offsetHeight; + offsetX = z.gesture.slide.offset().left; + offsetY = z.gesture.slide.offset().top; + diffX = offsetX + slideWidth/2 - touchX; + diffY = offsetY + slideHeight/2 - touchY; + + imageWidth = z.gesture.image[0].offsetWidth; + imageHeight = z.gesture.image[0].offsetHeight; + scaledWidth = imageWidth * z.scale; + scaledHeight = imageHeight * z.scale; + + translateMinX = Math.min((slideWidth / 2 - scaledWidth / 2), 0); + translateMinY = Math.min((slideHeight / 2 - scaledHeight / 2), 0); + translateMaxX = -translateMinX; + translateMaxY = -translateMinY; + + translateX = diffX * z.scale; + translateY = diffY * z.scale; + + if (translateX < translateMinX) { + translateX = translateMinX; + } + if (translateX > translateMaxX) { + translateX = translateMaxX; + } + + if (translateY < translateMinY) { + translateY = translateMinY; + } + if (translateY > translateMaxY) { + translateY = translateMaxY; + } + } + else { + translateX = 0; + translateY = 0; + } + z.gesture.imageWrap.transition(300).transform('translate3d(' + translateX + 'px, ' + translateY + 'px,0)'); + z.gesture.image.transition(300).transform('translate3d(0,0,0) scale(' + z.scale + ')'); + } + }, + // Attach/Detach Events + attachEvents: function (detach) { + var action = detach ? 'off' : 'on'; + + if (s.params.zoom) { + var target = s.slides; + var passiveListener = s.touchEvents.start === 'touchstart' && s.support.passiveListener && s.params.passiveListeners ? {passive: true, capture: false} : false; + // Scale image + if (s.support.gestures) { + s.slides[action]('gesturestart', s.zoom.onGestureStart, passiveListener); + s.slides[action]('gesturechange', s.zoom.onGestureChange, passiveListener); + s.slides[action]('gestureend', s.zoom.onGestureEnd, passiveListener); + } + else if (s.touchEvents.start === 'touchstart') { + s.slides[action](s.touchEvents.start, s.zoom.onGestureStart, passiveListener); + s.slides[action](s.touchEvents.move, s.zoom.onGestureChange, passiveListener); + s.slides[action](s.touchEvents.end, s.zoom.onGestureEnd, passiveListener); + } + + // Move image + s[action]('touchStart', s.zoom.onTouchStart); + s.slides.each(function (index, slide){ + if ($(slide).find('.' + s.params.zoomContainerClass).length > 0) { + $(slide)[action](s.touchEvents.move, s.zoom.onTouchMove); + } + }); + s[action]('touchEnd', s.zoom.onTouchEnd); + + // Scale Out + s[action]('transitionEnd', s.zoom.onTransitionEnd); + if (s.params.zoomToggle) { + s.on('doubleTap', s.zoom.toggleZoom); + } + } + }, + init: function () { + s.zoom.attachEvents(); + }, + destroy: function () { + s.zoom.attachEvents(true); + } + }; + + + /*========================= + Plugins API. Collect all and init all plugins + ===========================*/ + s._plugins = []; + for (var plugin in s.plugins) { + var p = s.plugins[plugin](s, s.params[plugin]); + if (p) s._plugins.push(p); + } + // Method to call all plugins event/method + s.callPlugins = function (eventName) { + for (var i = 0; i < s._plugins.length; i++) { + if (eventName in s._plugins[i]) { + s._plugins[i][eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); + } + } + }; + + + /*========================= + Events/Callbacks/Plugins Emitter + ===========================*/ + function normalizeEventName (eventName) { + if (eventName.indexOf('on') !== 0) { + if (eventName[0] !== eventName[0].toUpperCase()) { + eventName = 'on' + eventName[0].toUpperCase() + eventName.substring(1); + } + else { + eventName = 'on' + eventName; + } + } + return eventName; + } + s.emitterEventListeners = { + + }; + s.emit = function (eventName) { + // Trigger callbacks + if (s.params[eventName]) { + s.params[eventName](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); + } + var i; + // Trigger events + if (s.emitterEventListeners[eventName]) { + for (i = 0; i < s.emitterEventListeners[eventName].length; i++) { + s.emitterEventListeners[eventName][i](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); + } + } + // Trigger plugins + if (s.callPlugins) s.callPlugins(eventName, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); + }; + s.on = function (eventName, handler) { + eventName = normalizeEventName(eventName); + if (!s.emitterEventListeners[eventName]) s.emitterEventListeners[eventName] = []; + s.emitterEventListeners[eventName].push(handler); + return s; + }; + s.off = function (eventName, handler) { + var i; + eventName = normalizeEventName(eventName); + if (typeof handler === 'undefined') { + // Remove all handlers for such event + s.emitterEventListeners[eventName] = []; + return s; + } + if (!s.emitterEventListeners[eventName] || s.emitterEventListeners[eventName].length === 0) return; + for (i = 0; i < s.emitterEventListeners[eventName].length; i++) { + if(s.emitterEventListeners[eventName][i] === handler) s.emitterEventListeners[eventName].splice(i, 1); + } + return s; + }; + s.once = function (eventName, handler) { + eventName = normalizeEventName(eventName); + var _handler = function () { + handler(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]); + s.off(eventName, _handler); + }; + s.on(eventName, _handler); + return s; + }; + + + // Accessibility tools + s.a11y = { + makeFocusable: function ($el) { + $el.attr('tabIndex', '0'); + return $el; + }, + addRole: function ($el, role) { + $el.attr('role', role); + return $el; + }, + + addLabel: function ($el, label) { + $el.attr('aria-label', label); + return $el; + }, + + disable: function ($el) { + $el.attr('aria-disabled', true); + return $el; + }, + + enable: function ($el) { + $el.attr('aria-disabled', false); + return $el; + }, + + onEnterKey: function (event) { + if (event.keyCode !== 13) return; + if ($(event.target).is(s.params.nextButton)) { + s.onClickNext(event); + if (s.isEnd) { + s.a11y.notify(s.params.lastSlideMessage); + } + else { + s.a11y.notify(s.params.nextSlideMessage); + } + } + else if ($(event.target).is(s.params.prevButton)) { + s.onClickPrev(event); + if (s.isBeginning) { + s.a11y.notify(s.params.firstSlideMessage); + } + else { + s.a11y.notify(s.params.prevSlideMessage); + } + } + if ($(event.target).is('.' + s.params.bulletClass)) { + $(event.target)[0].click(); + } + }, + + liveRegion: $(''), + + notify: function (message) { + var notification = s.a11y.liveRegion; + if (notification.length === 0) return; + notification.html(''); + notification.html(message); + }, + init: function () { + // Setup accessibility + if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) { + s.a11y.makeFocusable(s.nextButton); + s.a11y.addRole(s.nextButton, 'button'); + s.a11y.addLabel(s.nextButton, s.params.nextSlideMessage); + } + if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) { + s.a11y.makeFocusable(s.prevButton); + s.a11y.addRole(s.prevButton, 'button'); + s.a11y.addLabel(s.prevButton, s.params.prevSlideMessage); + } + + $(s.container).append(s.a11y.liveRegion); + }, + initPagination: function () { + if (s.params.pagination && s.params.paginationClickable && s.bullets && s.bullets.length) { + s.bullets.each(function () { + var bullet = $(this); + s.a11y.makeFocusable(bullet); + s.a11y.addRole(bullet, 'button'); + s.a11y.addLabel(bullet, s.params.paginationBulletMessage.replace(/{{index}}/, bullet.index() + 1)); + }); + } + }, + destroy: function () { + if (s.a11y.liveRegion && s.a11y.liveRegion.length > 0) s.a11y.liveRegion.remove(); + } + }; + + + /*========================= + Init/Destroy + ===========================*/ + s.init = function () { + if (s.params.loop) s.createLoop(); + s.updateContainerSize(); + s.updateSlidesSize(); + s.updatePagination(); + if (s.params.scrollbar && s.scrollbar) { + s.scrollbar.set(); + if (s.params.scrollbarDraggable) { + s.scrollbar.enableDraggable(); + } + } + if (s.params.effect !== 'slide' && s.effects[s.params.effect]) { + if (!s.params.loop) s.updateProgress(); + s.effects[s.params.effect].setTranslate(); + } + if (s.params.loop) { + s.slideTo(s.params.initialSlide + s.loopedSlides, 0, s.params.runCallbacksOnInit); + } + else { + s.slideTo(s.params.initialSlide, 0, s.params.runCallbacksOnInit); + if (s.params.initialSlide === 0) { + if (s.parallax && s.params.parallax) s.parallax.setTranslate(); + if (s.lazy && s.params.lazyLoading) { + s.lazy.load(); + s.lazy.initialImageLoaded = true; + } + } + } + s.attachEvents(); + if (s.params.observer && s.support.observer) { + s.initObservers(); + } + if (s.params.preloadImages && !s.params.lazyLoading) { + s.preloadImages(); + } + if (s.params.zoom && s.zoom) { + s.zoom.init(); + } + if (s.params.autoplay) { + s.startAutoplay(); + } + if (s.params.keyboardControl) { + if (s.enableKeyboardControl) s.enableKeyboardControl(); + } + if (s.params.mousewheelControl) { + if (s.enableMousewheelControl) s.enableMousewheelControl(); + } + // Deprecated hashnavReplaceState changed to replaceState for use in hashnav and history + if (s.params.hashnavReplaceState) { + s.params.replaceState = s.params.hashnavReplaceState; + } + if (s.params.history) { + if (s.history) s.history.init(); + } + if (s.params.hashnav) { + if (s.hashnav) s.hashnav.init(); + } + if (s.params.a11y && s.a11y) s.a11y.init(); + s.emit('onInit', s); + }; + + // Cleanup dynamic styles + s.cleanupStyles = function () { + // Container + s.container.removeClass(s.classNames.join(' ')).removeAttr('style'); + + // Wrapper + s.wrapper.removeAttr('style'); + + // Slides + if (s.slides && s.slides.length) { + s.slides + .removeClass([ + s.params.slideVisibleClass, + s.params.slideActiveClass, + s.params.slideNextClass, + s.params.slidePrevClass + ].join(' ')) + .removeAttr('style') + .removeAttr('data-swiper-column') + .removeAttr('data-swiper-row'); + } + + // Pagination/Bullets + if (s.paginationContainer && s.paginationContainer.length) { + s.paginationContainer.removeClass(s.params.paginationHiddenClass); + } + if (s.bullets && s.bullets.length) { + s.bullets.removeClass(s.params.bulletActiveClass); + } + + // Buttons + if (s.params.prevButton) $(s.params.prevButton).removeClass(s.params.buttonDisabledClass); + if (s.params.nextButton) $(s.params.nextButton).removeClass(s.params.buttonDisabledClass); + + // Scrollbar + if (s.params.scrollbar && s.scrollbar) { + if (s.scrollbar.track && s.scrollbar.track.length) s.scrollbar.track.removeAttr('style'); + if (s.scrollbar.drag && s.scrollbar.drag.length) s.scrollbar.drag.removeAttr('style'); + } + }; + + // Destroy + s.destroy = function (deleteInstance, cleanupStyles) { + // Detach evebts + s.detachEvents(); + // Stop autoplay + s.stopAutoplay(); + // Disable draggable + if (s.params.scrollbar && s.scrollbar) { + if (s.params.scrollbarDraggable) { + s.scrollbar.disableDraggable(); + } + } + // Destroy loop + if (s.params.loop) { + s.destroyLoop(); + } + // Cleanup styles + if (cleanupStyles) { + s.cleanupStyles(); + } + // Disconnect observer + s.disconnectObservers(); + + // Destroy zoom + if (s.params.zoom && s.zoom) { + s.zoom.destroy(); + } + // Disable keyboard/mousewheel + if (s.params.keyboardControl) { + if (s.disableKeyboardControl) s.disableKeyboardControl(); + } + if (s.params.mousewheelControl) { + if (s.disableMousewheelControl) s.disableMousewheelControl(); + } + // Disable a11y + if (s.params.a11y && s.a11y) s.a11y.destroy(); + // Delete history popstate + if (s.params.history && !s.params.replaceState) { + window.removeEventListener('popstate', s.history.setHistoryPopState); + } + if (s.params.hashnav && s.hashnav) { + s.hashnav.destroy(); + } + // Destroy callback + s.emit('onDestroy'); + // Delete instance + if (deleteInstance !== false) s = null; + }; + + s.init(); + + + + // Return swiper instance + return s; +}; + +/*================================================== + Prototype +====================================================*/ +Swiper.prototype = { + isSafari: (function () { + var ua = window.navigator.userAgent.toLowerCase(); + return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0); + })(), + isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent), + isArray: function (arr) { + return Object.prototype.toString.apply(arr) === '[object Array]'; + }, + /*================================================== + Browser + ====================================================*/ + browser: { + ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled, + ieTouch: (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1) || (window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1), + lteIE9: (function() { + // create temporary DIV + var div = document.createElement('div'); + // add content to tmp DIV which is wrapped into the IE HTML conditional statement + div.innerHTML = ''; + // return true / false value based on what will browser render + return div.getElementsByTagName('i').length === 1; + })() + }, + /*================================================== + Devices + ====================================================*/ + device: (function () { + var ua = window.navigator.userAgent; + var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); + var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); + var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); + var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); + return { + ios: ipad || iphone || ipod, + android: android + }; + })(), + /*================================================== + Feature Detection + ====================================================*/ + support: { + touch : (window.Modernizr && Modernizr.touch === true) || (function () { + return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch); + })(), + + transforms3d : (window.Modernizr && Modernizr.csstransforms3d === true) || (function () { + var div = document.createElement('div').style; + return ('webkitPerspective' in div || 'MozPerspective' in div || 'OPerspective' in div || 'MsPerspective' in div || 'perspective' in div); + })(), + + flexbox: (function () { + var div = document.createElement('div').style; + var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' '); + for (var i = 0; i < styles.length; i++) { + if (styles[i] in div) return true; + } + })(), + + observer: (function () { + return ('MutationObserver' in window || 'WebkitMutationObserver' in window); + })(), + + passiveListener: (function () { + var supportsPassive = false; + try { + var opts = Object.defineProperty({}, 'passive', { + get: function() { + supportsPassive = true; + } + }); + window.addEventListener('testPassiveListener', null, opts); + } catch (e) {} + return supportsPassive; + })(), + + gestures: (function () { + return 'ongesturestart' in window; + })() + }, + /*================================================== + Plugins + ====================================================*/ + plugins: {} +}; diff --git a/bower_components/framework7/src/js/wrap-end.js b/bower_components/framework7/src/js/wrap-end.js new file mode 100644 index 00000000..0319a0fe --- /dev/null +++ b/bower_components/framework7/src/js/wrap-end.js @@ -0,0 +1 @@ +})(); diff --git a/bower_components/framework7/src/js/wrap-start.js b/bower_components/framework7/src/js/wrap-start.js new file mode 100644 index 00000000..5d11b979 --- /dev/null +++ b/bower_components/framework7/src/js/wrap-start.js @@ -0,0 +1 @@ +(function () { diff --git a/bower_components/framework7/src/less/ios/_colors-vars.less b/bower_components/framework7/src/less/ios/_colors-vars.less new file mode 100644 index 00000000..55f3a448 --- /dev/null +++ b/bower_components/framework7/src/less/ios/_colors-vars.less @@ -0,0 +1,12 @@ +@blue: #007aff; +@red: #ff3b30; +@white: #ffffff; +@black: #000000; +@lightblue: #5ac8fa; +@yellow: #ffcc00; +@orange: #ff9500; +@pink: #ff2d55; +@green: #4cd964; +@gray: #8e8e93; + +@themeColor: @blue; diff --git a/bower_components/framework7/src/less/ios/_mixins.less b/bower_components/framework7/src/less/ios/_mixins.less new file mode 100644 index 00000000..6ee48169 --- /dev/null +++ b/bower_components/framework7/src/less/ios/_mixins.less @@ -0,0 +1,302 @@ +.transition(@d) { + -webkit-transition-duration: @d; + transition-duration: @d; +} +.delay(@d) { + -webkit-transition-delay: @d; + transition-delay: @d; +} +.transform(@t) { + -webkit-transform: @t; + transform: @t; +} +.transform-origin(@to) { + -webkit-transform-origin: @to; + transform-origin: @to; +} +.translate3d(@x:0, @y:0, @z:0) { + -webkit-transform: translate3d(@x,@y,@z); + transform: translate3d(@x,@y,@z); +} +.animation(@a) { + -webkit-animation: @a; + animation: @a; +} +.scrollable(){ + overflow: auto; + -webkit-overflow-scrolling: touch; +} +.flexbox() { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.flexbox-inline() { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: -webkit-inline-flex; + display: inline-flex; +} +.flex-wrap(@fw) when (@fw = nowrap) { + -webkit-box-lines: single; + -moz-box-lines: single; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: none; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; +} +.flex-wrap(@fw) when (@fw = wrap) { + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} +.flex-wrap(@fw) when not (@fw = wrap) and not (@fw = nowrap) { + -webkit-flex-wrap: @fw; + -ms-flex-wrap: @fw; + flex-wrap: @fw; +} +.flex-shrink(@fs) { + -webkit-flex-shrink: @fs; + -ms-flex: 0 @fs auto; + flex-shrink: @fs; +} +.justify-content(@jc) when (@jc = flex-start) { + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; +} +.justify-content(@jc) when (@jc = flex-end) { + -webkit-box-pack: end; + -ms-flex-pack: end; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} +.justify-content(@jc) when (@jc = space-between) { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} +.justify-content(@jc) when not (@jc = flex-start) and not (@jc = flex-end) and not (@jc = space-between) { + -webkit-box-pack: @jc; + -ms-flex-pack: @jc; + -webkit-justify-content: @jc; + justify-content: @jc; +} +.align-items(@ai) when (@ai = flex-start) { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.align-items(@ai) when (@ai = flex-end) { + -webkit-box-align: end; + -ms-flex-align: end; + -webkit-align-items: flex-end; + align-items: flex-end; +} +.align-items(@ai) when not (@ai = flex-start) and not (@ai = flex-end) { + -webkit-box-align: @ai; + -ms-flex-align: @ai; + -webkit-align-items: @ai; + align-items: @ai; +} +.align-content(@ai) { + -ms-flex-line-pack: @ai; + -webkit-align-content: @ai; + align-content: @ai; +} +.align-self(@as) { + -ms-flex-item-align: @as; + -webkit-align-self: @as; + align-self: @as; +} +.clearfix() { + &:before, + &:after { + content: " "; + display: table; + } + &:after { + clear: both; + } +} +.hairline(@position, @color) when (@position = top) { + &:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: @color; + display: block; + z-index: 15; + .transform-origin(50% 0%); + html.pixel-ratio-2 & { + .transform(scaleY(0.5)); + } + html.pixel-ratio-3 & { + .transform(scaleY(0.33)); + } + } +} +.hairline(@position, @color) when (@position = left) { + &:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + width: 1px; + height: 100%; + background-color: @color; + display: block; + z-index: 15; + .transform-origin(0% 50%); + html.pixel-ratio-2 & { + .transform(scaleX(0.5)); + } + html.pixel-ratio-3 & { + .transform(scaleX(0.33)); + } + } +} +.hairline(@position, @color) when (@position = bottom) { + &:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: @color; + display: block; + z-index: 15; + .transform-origin(50% 100%); + html.pixel-ratio-2 & { + .transform(scaleY(0.5)); + } + html.pixel-ratio-3 & { + .transform(scaleY(0.33)); + } + } +} +.hairline(@position, @color) when (@position = right) { + &:after { + content: ''; + position: absolute; + right: 0; + top: 0; + left: auto; + bottom: auto; + width: 1px; + height: 100%; + background-color: @color; + display: block; + z-index: 15; + .transform-origin(100% 50%); + html.pixel-ratio-2 & { + .transform(scaleX(0.5)); + } + html.pixel-ratio-3 & { + .transform(scaleX(0.33)); + } + } +} +// For right and bottom +.hairline-remove(@position) when not (@position = left) and not (@position = top) { + &:after { + display: none; + } +} +// For left and top +.hairline-remove(@position) when not (@position = right) and not (@position = bottom) { + &:before { + display: none; + } +} +// For right and bottom +.hairline-color(@position, @color) when not (@position = left) and not (@position = top) { + &:after { + background-color: @color; + } +} +// For left and top +.hairline-color(@position, @color) when not (@position = right) and not (@position = bottom) { + &:before { + background-color: @color; + } +} + +// Encoded SVG Background +.encoded-svg-background(@svg) { + @url: `encodeURIComponent(@{svg})`; + background-image: url("data:image/svg+xml;charset=utf-8,@{url}"); +} + +// Backdrop Blur +.backdrop-blur(@blur) { + -webkit-backdrop-filter: blur(@blur); + backdrop-filter: blur(@blur); +} + +// Preserve3D +.preserve3d() { + -webkit-transform-style: preserve-3d; + -moz-transform-style: preserve-3d; + -ms-transform-style: preserve-3d; + transform-style: preserve-3d; +} + +// No Scrollbar +.no-scrollbar() { + &::-webkit-scrollbar { + display: none !important; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + opacity: 0 !important; + } +} +// Bars Input +.bars-input() { + box-sizing: border-box; + width: 100%; + height: 28px; + display: block; + border: none; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border-radius: 5px; + font-family: inherit; + color:#000; + font-size: 14px; + font-weight: normal; + padding: 0 8px; + background-color: #fff; +} +.no-hairlines() { + &.no-hairlines, &.no-hairlines ul, &.no-hairlines .content-block-inner { + .hairline-remove(top); + .hairline-remove(bottom); + } +} +.no-hairlines-between() { + &.no-hairlines-between { + .item-inner, .list-button, .item-divider, .list-group-title, .list-group-title { + .hairline-remove(bottom); + } + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/accordion.less b/bower_components/framework7/src/less/ios/accordion.less new file mode 100644 index 00000000..31511d93 --- /dev/null +++ b/bower_components/framework7/src/less/ios/accordion.less @@ -0,0 +1,72 @@ +/* === Accordion === */ +.list-block { + .accordion-item-toggle { + cursor: pointer; + .transition(300ms); + .item-inner { + padding-right: 35px; + background: no-repeat -webkit-calc(~"100% - 15px") center; + background: no-repeat calc(~"100% - 15px") center; + .encoded-svg-background(""); + background-size: 10px 20px; + + } + html:not(.watch-active-state) &:active, &.active-state { + .transition(0ms); + background-color: #d9d9d9; + > .item-inner { + .hairline-color(bottom, transparent); + } + } + } + .accordion-item-toggle, .accordion-item > .item-link { + .item-inner { + .transition(300ms); + &:after { + .transition(300ms); + } + -webkit-transition-property: background-color; + transition-property: background-color; + } + } + &:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner, + &:not(.media-list) .accordion-item-expanded:not(.media-item) > .item-link .item-inner, + &.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row, + &.media-list .accordion-item-expanded > .item-link .item-title-row, + .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row, + .accordion-item-expanded.media-item > .item-link .item-title-row, + { + .encoded-svg-background(""); + background-size: 20px 20px; + } + .accordion-item-expanded { + .accordion-item-toggle .item-inner, > .item-link .item-inner { + .hairline-color(bottom, transparent); + } + } + + + .accordion-item { + .content-block, .list-block { + margin-top: 0; + margin-bottom: 0; + } + ul { + padding-left: 0; + } + } +} +.accordion-item-content { + position: relative; + overflow: hidden; + height: 0; + font-size: 14px; + .transition(300ms); + .transform(translate3d(0,0,0)); + .accordion-item-expanded > &{ + height: auto; + } + html.android-4 & { + .transform(none); + } +} diff --git a/bower_components/framework7/src/less/ios/autocomplete.less b/bower_components/framework7/src/less/ios/autocomplete.less new file mode 100644 index 00000000..19a80385 --- /dev/null +++ b/bower_components/framework7/src/less/ios/autocomplete.less @@ -0,0 +1,80 @@ +/* === Autocomplete === */ +.autocomplete-page { + .autocomplete-found { + display: block; + } + .autocomplete-not-found { + display: none; + } + .autocomplete-values { + display: block; + } + .list-block ul:empty { + display: none; + } +} +.autocomplete-preloader:not(.autocomplete-preloader-visible) { + -webkit-animation: none; + animation: none; + visibility: hidden; +} + +.autocomplete-dropdown { + background: #fff; + box-sizing: border-box; + position: absolute; + z-index: 500; + box-shadow: 0px 3px 3px rgba(0,0,0,0.2); + width: 100%; + left: 0; + .autocomplete-dropdown-inner { + position: relative; + overflow: auto; + -webkit-overflow-scrolling: touch; + height: 100%; + z-index: 1; + } + .autocomplete-preloader { + display: none; + position: absolute; + right: 15px; + bottom: 100%; + margin-bottom: 12px; + width: 20px; + height: 20px; + } + .autocomplete-preloader-visible { + display: block; + } + .autocomplete-dropdown-placeholder { + color: #a9a9a9; + } + .list-block { + margin: 0; + ul { + .hairline-remove(top); + .hairline-remove(bottom); + background: none !important; + } + b { + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } + } + } +} +.list-block { + .item-content-dropdown-expand { + .item-title.label { + width: 0; + .flex-shrink(10); + + .item-input { + margin-left: 0; + } + } + .item-input { + width: 100%; + } + } +} diff --git a/bower_components/framework7/src/less/ios/badges.less b/bower_components/framework7/src/less/ios/badges.less new file mode 100644 index 00000000..eecebd94 --- /dev/null +++ b/bower_components/framework7/src/less/ios/badges.less @@ -0,0 +1,28 @@ +.badge { + font-size: 13px; + display: inline-block; + color:#fff; + background: #8e8e93; + border-radius: 20px; + padding: 0px 6px; + height: 20px; + line-height: 20px; + box-sizing: border-box; + text-align: center; + .item-after & { + min-width: 20px; + } + .icon &, .f7-icons &, .framework7-icons & { + position: absolute; + left: 100%; + margin-left: -10px; + top: -2px; + font-size: 10px; + line-height: 16px; + height: 16px; + border-radius: 16px; + padding: 0px 4px; + min-width: 16px; + font-family: -apple-system, SF UI Text, Helvetica Neue, Helvetica, Arial, sans-serif; + } +} diff --git a/bower_components/framework7/src/less/ios/calendar.less b/bower_components/framework7/src/less/ios/calendar.less new file mode 100644 index 00000000..b5aad31a --- /dev/null +++ b/bower_components/framework7/src/less/ios/calendar.less @@ -0,0 +1,188 @@ +/* === Calendar === */ +.picker-calendar { + background: #fff; + height: 320px; + width: 100%; + overflow: hidden; + @media (orientation: landscape) and (max-height: 415px) { + &:not(.picker-modal-inline) { + height: 220px; + } + } + .picker-modal-inner { + overflow: hidden; + } + .popover-picker-calendar & { + height: 320px; + } +} +.popover.popover-picker-calendar { + width: 320px; +} + +.picker-calendar-week-days { + height: 18px; + background: #f7f7f8; + .flexbox(); + .hairline(bottom, #c4c4c4); + font-size: 11px; + box-sizing: border-box; + position: relative; + .picker-calendar-week-day { + .flex-shrink(1); + width: 100% / 7; + width: ~"-webkit-calc(100% / 7)"; + width: ~"-moz-calc(100% / 7)"; + width: ~"calc(100% / 7)"; + line-height: 17px; + text-align: center; + } + + .picker-calendar-months { + height: ~"-webkit-calc(100% - 18px)"; + height: ~"-moz-calc(100% - 18px)"; + height: ~"calc(100% - 18px)"; + } +} +.picker-calendar-months { + width: 100%; + height: 100%; + overflow: hidden; + position: relative; +} +.picker-calendar-months-wrapper { + position: relative; + width: 100%; + height: 100%; + .transition(300ms); +} +.picker-calendar-month { + .flexbox(); + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; +} +.picker-calendar-row { + height: 100% / 6; + height: ~"-webkit-calc(100% / 6)"; + height: ~"-moz-calc(100% / 6)"; + height: ~"calc(100% / 6)"; + .flexbox(); + .flex-shrink(1); + width: 100%; + position: relative; + .hairline(bottom, #ccc); + &:last-child { + .hairline-remove(bottom); + } +} +.picker-calendar-day { + .flex-shrink(1); + .flexbox(); + .justify-content(center); + .align-items(center); + box-sizing: border-box; + width: 100% / 7; + width: ~"-webkit-calc(100% / 7)"; + width: ~"-moz-calc(100% / 7)"; + width: ~"calc(100% / 7)"; + text-align: center; + color:#000; + font-size: 15px; + cursor: pointer; + z-index: 20; + height: 100%; + &.picker-calendar-day-weekend { + } + &.picker-calendar-day-prev, &.picker-calendar-day-next { + color: #b8b8b8; + } + .picker-calendar-month-prev &, .picker-calendar-month-next & { + + } + &.picker-calendar-day-disabled { + color: #d4d4d4; + cursor: auto; + } + &.picker-calendar-day-today span { + background: #e3e3e3; + } + &.picker-calendar-day-selected span { + background: @themeColor; + color:#fff; + } + &.picker-calendar-day-has-events span { + &:after { + content: ''; + width: 4px; + height: 4px; + border-radius: 50%; + background: #ccc; + position: absolute; + margin-left: -2px; + left: 50%; + bottom: 1px; + } + } + &.picker-calendar-day-has-events.picker-calendar-day-selected span:after { + display: none; + } + span { + display: inline-block; + border-radius: 100%; + width: 30px; + height: 30px; + line-height: 30px; + position: relative; + + } + .picker-calendar-range &.picker-calendar-day-selected { + .align-items(stretch); + .align-content(stretch); + span { + width: 100%; + border-radius: 0; + height: auto; + text-align: center; + .flexbox(); + .align-items(center); + .justify-content(center); + } + } +} +.picker-calendar-month-picker, .picker-calendar-year-picker { + .flexbox(); + .align-items(center); + .justify-content(space-between); + width: 50%; + max-width: 200px; + .flex-shrink(10); + a.icon-only { + min-width: 36px; + } + span { + .flex-shrink(1); + position: relative; + overflow: hidden; + text-overflow: ellipsis; + } +} +// Inline and popover borders +.popover .picker-calendar, .picker-calendar.picker-modal-inline { + .picker-calendar-week-days { + background: none; + } + .toolbar, .picker-calendar-week-days { + .hairline-remove(top); + .hairline-remove(bottom); + } + .toolbar ~ .picker-modal-inner .picker-calendar-months, .picker-calendar-week-days ~ .picker-calendar-months { + .hairline(top, #c4c4c4); + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/cards.less b/bower_components/framework7/src/less/ios/cards.less new file mode 100644 index 00000000..06b1b773 --- /dev/null +++ b/bower_components/framework7/src/less/ios/cards.less @@ -0,0 +1,102 @@ +/* === Cards === */ +.cards-list, .card .list-block { + ul { + background: none; + } + > ul { + .hairline-remove(top); + .hairline-remove(bottom); + } +} +.card { + background: #fff; + box-shadow: 0px 1px 2px rgba(0,0,0,0.3); + margin: 10px; + position: relative; + border-radius: 2px; + font-size: 14px; + .list-block, .content-block { + margin: 0; + } + .row:not(.no-gutter) .col > & { + margin-left: 0; + margin-right: 0; + } +} +.card-content { + position: relative; +} +.card-content-inner { + padding: 15px; + position: relative; + > p:first-child { + margin-top: 0; + } + > p:last-child { + margin-bottom: 0; + } + > .list-block, >.content-block { + margin: -15px; + } +} +.card-header, .card-footer { + min-height: 44px; + position: relative; + padding: 10px 15px; + box-sizing: border-box; + .flexbox(); + .justify-content(space-between); + .align-items(center); + &[valign="top"] { + .align-items(flex-start); + } + &[valign="bottom"] { + .align-items(flex-end); + } + a.link { + line-height: 44px; + height: 44px; + text-decoration: none; + position: relative; + margin-top: -10px; + margin-bottom: -10px; + .flexbox(); + .justify-content(flex-start); + .align-items(center); + .transition(300ms); + html:not(.watch-active-state) &:active, &.active-state { + opacity: 0.3; + .transition(0ms); + } + i+span, i+i, span+i, span+span { + margin-left: 7px; + } + i.icon { + display: block; + } + } + a.icon-only { + min-width: 44px; + .flexbox(); + .justify-content(center); + .align-items(center); + margin: 0; + } +} +.card-header { + border-radius: 2px 2px 0 0; + font-size: 17px; + .hairline(bottom, #e1e1e1); + &.no-border { + .hairline-remove(bottom); + } +} +.card-footer { + border-radius: 0 0 2px 2px; + color:#6d6d72; + .hairline(top, #e1e1e1); + &.no-border { + .hairline-remove(top); + } + +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/chips.less b/bower_components/framework7/src/less/ios/chips.less new file mode 100644 index 00000000..20b3659e --- /dev/null +++ b/bower_components/framework7/src/less/ios/chips.less @@ -0,0 +1,74 @@ +/* === Chips === */ +@chipSize: 23px; +.chip { + font-size: 14px; + font-weight: normal; + color: #fff; + background: rgba(0,0,0,0.37); + display: inline-block; + height: @chipSize; + line-height: @chipSize; + border-radius: 5px; + padding: 0 6px; + box-sizing: border-box; + vertical-align: middle; + .flexbox-inline(); + .align-items(center); + margin: 2px 0; +} +.chip-media { + width: 16px; + height: 16px; + vertical-align: middle; + border-radius: 50%; + text-align: center; + line-height: 16px; + color: #fff; + font-size: 12px; + box-sizing: border-box; + .flex-shrink(0); + .flexbox(); + .align-items(center); + .justify-content(center); + img { + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; + border-radius: 50%; + display: block; + } + + .chip-label { + margin-left: 4px; + } + i.icon { + font-size: 16px; + height: 16px; + } +} +.chip-label { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + position: relative; + .flex-shrink(1); + min-width: 0; +} +.chip-delete { + margin-right: -6px; + width: @chipSize; + height: @chipSize; + text-align: center; + line-height: @chipSize; + cursor: pointer; + .flex-shrink(0); + .encoded-svg-background(""); + background-repeat: no-repeat; + background-position: center; + -webkit-background-size: 13px 13px; + background-size: 13px 13px; + opacity: 0.7; + html:not(.watch-active-state) &:active, &.active-state { + opacity: 1; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/contacts.less b/bower_components/framework7/src/less/ios/contacts.less new file mode 100644 index 00000000..a65615c6 --- /dev/null +++ b/bower_components/framework7/src/less/ios/contacts.less @@ -0,0 +1,24 @@ +/* === Contacts === */ +.contacts-content { + background: #fff; +} +.contacts-block { + margin: 0; + .list-group-title { + padding: 0 15px; + background: #f7f7f7; + color:#000; + font-weight: 500; + line-height: 22px; + height: 22px; + html.ios-gt-8 & { + font-weight: 600; + } + } + .list-group:first-child ul { + .hairline-remove(top); + } + .list-group:last-child ul { + .hairline-remove(bottom); + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/content-block.less b/bower_components/framework7/src/less/ios/content-block.less new file mode 100644 index 00000000..0f78b12d --- /dev/null +++ b/bower_components/framework7/src/less/ios/content-block.less @@ -0,0 +1,59 @@ +/* === Content Block === */ +@contentBlockBorderColor: #c8c7cc; +@contentBlockColor: #6d6d72; +@contentBlockTitle: @contentBlockColor; +.content-block { + margin: 35px 0; + padding: 0 15px; + color: @contentBlockTitle; + box-sizing: border-box; + .no-hairlines(); +} +.content-block-title { + position: relative; + overflow: hidden; + margin: 0; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 14px; + text-transform: uppercase; + line-height: 1; + color: @contentBlockColor; + margin: 35px 15px 10px; + + .list-block, + .content-block, +.card, +.timeline { + margin-top: 10px; + } +} +.content-block-inner { + background: #fff; + padding: 10px 15px; + margin-left: -15px; + width: 100%; + position: relative; + .hairline(top, @contentBlockBorderColor); + .hairline(bottom, @contentBlockBorderColor); + color: #000; +} +.content-block.inset { + margin-left: 15px; + margin-right: 15px; + border-radius: 7px; + .content-block-inner { + .hairline-remove(top); + .hairline-remove(bottom); + border-radius: 7px; + } +} +@media all and (min-width:768px) { + .content-block.tablet-inset { + margin-left: 15px; + margin-right: 15px; + border-radius: 7px + } + + .content-block.tablet-inset .content-block-inner { + .hairline-remove(top); + .hairline-remove(bottom); + border-radius: 7px; + } +} diff --git a/bower_components/framework7/src/less/ios/data-table.less b/bower_components/framework7/src/less/ios/data-table.less new file mode 100644 index 00000000..5e26ccc1 --- /dev/null +++ b/bower_components/framework7/src/less/ios/data-table.less @@ -0,0 +1,290 @@ +.data-table { + overflow-x: auto; + table { + width: 100%; + border: none; + padding: 0; + margin: 0; + border-collapse: collapse; + text-align: left; + } + thead { + font-size: 12px; + th, td { + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + line-height: 16px; + &:not(.sortable-active) { + color: #8e8e93; + } + + } + i.icon, i.f7-icons { + font-size: 18px; + width: 18px; + height: 18px; + vertical-align: top; + } + } + tbody { + tr.data-table-row-selected { + background: #f7f7f8; + } + td { + .hairline(top, #c8c7cc); + } + } + html:not(.ios):not(.android) & { + tbody tr:hover { + background: #f7f7f8; + } + } + th, td { + padding: 0; + position: relative; + padding-left: 15px; + padding-right: 15px; + height: 44px; + &.numeric-cell { + text-align: right; + } + &.checkbox-cell { + padding-right: 7px; + width: 22px; + overflow: visible; + & + td, & + th { + padding-left: 8px; + } + } + &.actions-cell { + text-align: right; + white-space: nowrap; + a.link { + position: relative; + z-index: 1; + cursor: pointer; + + a.link { + margin-left: 15px; + } + } + a.icon-only { + width: 18px; + height: 18px; + display: inline-block; + vertical-align: middle; + font-size: 18px; + line-height: 18px; + text-align: center; + font-size: 0; + i { + font-size: 18px; + vertical-align: middle; + } + } + } + } + // Sortable + .sortable-cell { + cursor: pointer; + position: relative; + } + .sortable-cell:not(.numeric-cell):after, .sortable-cell.numeric-cell:before { + content: ''; + display: inline-block; + vertical-align: top; + width: 16px; + height: 16px; + .encoded-svg-background(""); + background-size: 100% auto; + background-position: center; + background-repeat: no-repeat; + font-size: 0; + .transition(300ms); + .transform(rotate(0)); + opacity: 0; + } + html:not(.ios):not(.android) & { + .sortable-cell:not(.sortable-active):hover { + &:after, &:before { + opacity: 0.54; + } + } + } + .sortable-cell.sortable-active { + &:after, &:before { + opacity: 0.87; + } + } + .sortable-cell.sortable-asc { + + } + .sortable-cell.sortable-desc { + &:after, &:before { + .transform(rotate(180deg)); + } + } + .sortable-cell:not(.numeric-cell):after { + margin-left: 5px; + } + .sortable-cell.numeric-cell:before { + margin-right: 5px; + } + // Cards + &.card, .card & { + .card-header, .card-footer { + padding-left: 15px; + padding-right: 8px; + } + .card-header { + height: 64px; + } + .card-content { + overflow-x: auto; + } + } + .data-table-title { + font-size: 17px; + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } + } + .data-table-links, .data-table-actions { + .flexbox(); + .justify-content(space-between); + a.link { + cursor: pointer; + } + a.link + a.link { + margin-left: 15px; + } + } + .data-table-actions { + margin-left: auto; + .align-items(center); + a.link { + min-width: 0; + cursor: pointer; + } + a.link.icon-only { + width: 44px; + height: 44px; + line-height: 1; + } + i.icon, i.f7-icons { + font-size: 22px; + } + } + .data-table-header, .data-table-header-selected { + .flexbox(); + .justify-content(space-between); + .align-items(center); + width: 100%; + } + .card-header { + > .data-table-header, > .data-table-header-selected { + padding-left: 15px; + padding-right: 8px; + margin-left: -15px; + margin-right: -8px; + height: 100%; + padding-top: 10px; + padding-bottom: 10px; + } + } + .data-table-header-selected { + display: none; + background: rgba(red(@themeColor), green(@themeColor), blue(@themeColor), 0.1); + } + &.data-table-has-checked { + .data-table-header { + display: none; + } + .data-table-header-selected { + .flexbox(); + } + } + .data-table-title-selected { + color: @themeColor; + font-size: 14px; + } + + // Collapsible + @media (max-width:480px) and (orientation:portrait) { + &.data-table-collapsible { + thead { + display: none; + } + tbody, tr, td { + display: block; + } + tr { + position: relative; + .hairline(top, #c8c7cc); + } + tr:hover { + background-color: inherit; + } + td { + text-align: left; + .hairline-remove(top); + .flexbox(); + .align-content(center); + .align-items(center); + .justify-content(flex-start); + } + td:not(.checkbox-cell) { + font-size: 17px; + line-height: 17px; + &:before { + width: 40%; + display: block; + content: attr(data-collapsible-title); + position: relative; + height: auto; + background: none; + .transform(none) !important; + color: #8e8e93; + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } + font-size: 12px; + margin-right: 16px; + .flex-shrink(0); + } + } + td.checkbox-cell { + position: absolute; + left: 0; + top: 0; + + td { + padding-left: 16px; + } + ~ td { + margin-left: 16px + 16px; + } + } + } + + } + // Responsive queries + .tablet-only, .tablet-landscape-only { + display: none; + } + @media (min-width: 768px) { + .tablet-only { + display: table-cell; + } + } + @media (min-width: 768px) and (orientation:landscape) { + .tablet-landscape-only { + display: table-cell; + } + } +} diff --git a/bower_components/framework7/src/less/ios/disabled.less b/bower_components/framework7/src/less/ios/disabled.less new file mode 100644 index 00000000..f480f6a6 --- /dev/null +++ b/bower_components/framework7/src/less/ios/disabled.less @@ -0,0 +1,8 @@ +/* === Disabled elements === */ +.disabled, [disabled] { + opacity: 0.55; + pointer-events: none; + .disabled &, [disabled] & { + opacity: 1; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/floating-button.less b/bower_components/framework7/src/less/ios/floating-button.less new file mode 100644 index 00000000..1153dbca --- /dev/null +++ b/bower_components/framework7/src/less/ios/floating-button.less @@ -0,0 +1,172 @@ +/* === Floating Action Button === */ +.floating-button { + position: absolute; + right: 15px; + bottom: 15px; + width: 50px; + height: 50px; + border-radius: 50%; + z-index: 1500; + background-color: @themeColor; + color:#fff; + overflow: hidden; + .transition(300ms); + .flexbox(); + .align-items(center); + .justify-content(center); + html:not(.watch-active-state) &:active, &.active-state { + .transition(0ms); + background: darken(@themeColor, 8%); + } + .toolbar-fixed &, .toolbar-through &{ + bottom: 15px + 44px; + } + .tabbar-labels-fixed &, .tabbar-labels-through &{ + bottom: 15px + 50px; + @media (min-width: 768px) { + bottom: 15px + 56px; + } + } +} +.floating-button-toolbar, .speed-dial { + position: absolute; + right: 15px; + bottom: 15px; + z-index: 1500; + .toolbar-fixed &, .toolbar-through &{ + bottom: 15px + 44px; + } + .tabbar-labels-fixed &, .tabbar-labels-through &{ + bottom: 15px + 50px; + @media (min-width: 768px) { + bottom: 15px + 56px; + } + } + .floating-button { + right: 0; + bottom: 0; + position: relative; + } +} +// Speed Dial +.speed-dial { + .floating-button { + i { + position: absolute; + left: 50%; + top: 50%; + .transform(translate3d(-50%, -50%, 0) rotate(0deg) scale(1)); + .transition(300ms); + } + i + i { + .transform(translate3d(-50%, -50%, 0) rotate(-90deg) scale(0.5)); + opacity: 0; + } + } + &.speed-dial-opened { + .floating-button { + i { + .transform(translate3d(-50%, -50%, 0) rotate(90deg) scale(0.5)); + opacity: 0; + } + i + i { + .transform(translate3d(-50%, -50%, 0) rotate(0deg) scale(1)); + opacity: 1; + } + } + } +} +.speed-dial-buttons { + position: absolute; + width: 40px; + left: 50%; + margin-left: -20px; + bottom: 100%; + margin-bottom: 16px; + .flexbox(); + -webkit-box-orient: vertical; + -webkit-box-direction: reverse; + -moz-box-orient: vertical; + -moz-box-direction: reverse; + -ms-flex-direction: column-reverse; + -webkit-flex-direction: column-reverse; + flex-direction: column-reverse; + visibility: hidden; + pointer-events: none; + a { + width: 40px; + height: 40px; + opacity: 0; + color: #fff; + border-radius: 50%; + position: relative; + z-index: 1; + overflow: hidden; + background-color: @themeColor; + .transition(300ms); + .flexbox(); + .align-items(center); + .justify-content(center); + .transform(translate3d(0, 8px, 0) scale(0.3)); + .transform-origin(center bottom); + + a { + margin-bottom: 16px; + } + html:not(.watch-active-state) &:active, &.active-state { + .transition(0ms); + background: darken(@themeColor, 8%); + } + } + .speed-dial-opened & { + visibility: visible; + pointer-events: auto; + a { + opacity: 1; + .transform(translate3d(0, 0, 0) scaleY(1)); + // .depth(3); + &:nth-child(2) { + .delay(50ms); + } + &:nth-child(3) { + .delay(100ms); + } + &:nth-child(4) { + .delay(150ms); + } + &:nth-child(5) { + .delay(200ms); + } + &:nth-child(6) { + .delay(250ms); + } + } + } +} + +// Popove Morph +.floating-button-to-popover { + &.floating-button-to-popover { + .transition(300ms); + } + &.floating-button-to-popover-in { + .transition(100ms); + i { + opacity: 0; + .transition(100ms); + } + } + &.floating-button-to-popover-scale { + border-radius: 0; + .transition(300ms); + box-shadow: none; + } + &.floating-button-to-popover-out { + .delay(0ms); + .transition(300ms); + i { + opacity: 1; + .transition(100ms); + .delay(200ms); + } + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/forms.less b/bower_components/framework7/src/less/ios/forms.less new file mode 100644 index 00000000..c09db92c --- /dev/null +++ b/bower_components/framework7/src/less/ios/forms.less @@ -0,0 +1,474 @@ +/* === Forms === */ +// Inputs +.list-block { + input[type="text"], input[type="password"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], input[type="datetime-local"], input[type="time"], input[type="number"], select, textarea { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + box-sizing: border-box; + border: none; + background: none; + border-radius: 0 0 0 0; + box-shadow: none; + display: block; + padding: 0px; + margin: 0; + width: 100%; + height: 43px; + color: #000; + font-size: 17px; + font-family: inherit; + + } + .item-title.label { + vertical-align: top; + + .item-input { + margin-left: 5px; + } + } + input[type="date"], input[type="datetime-local"] { + line-height: 44px; + } + select { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + } + textarea { + height: 100px; + resize:none; + line-height: 1.4; + padding-top: 8px; + padding-bottom: 7px; + &.resizable { + height: 43px; + } + } + .item-input { + width: 100%; + margin-top: -8px; + margin-bottom: -7px; + -webkit-box-flex:1; + -ms-flex:1; + .flex-shrink(1); + } + .item-title.label { + width: 35%; + .flex-shrink(0); + } +} + +//Switch +.label-switch { + display: inline-block; + vertical-align: middle; + width: 52px; + border-radius: 16px; + box-sizing: border-box; + height: 32px; + position: relative; + cursor: pointer; + .align-self(center); + .checkbox { + width: 52px; + border-radius: 16px; + box-sizing: border-box; + height: 32px; + background: #e5e5e5; + z-index: 0; + margin: 0; + padding: 0; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border:none; + cursor: pointer; + position: relative; + .transition(300ms); + &:before { + content:' '; + position: absolute; + left: 2px; + top: 2px; + width: 48px; + border-radius: 16px; + box-sizing: border-box; + height: 28px; + background: #fff; + z-index: 1; + .transition(300ms); + .transform(scale(1)); + } + &:after { + content:' '; + height: 28px; + width: 28px; + border-radius: 28px; + background: #fff; + position: absolute; + z-index: 2; + top: 2px; + left: 2px; + box-shadow: 0 2px 5px rgba(0,0,0,0.4); + .transform(translateX(0px)); + .transition(300ms); + } + } + input[type="checkbox"] { + display: none; + &:checked { + &+ .checkbox { + background: #4cd964; + &:before { + .transform(scale(0)); + } + &:after { + .transform(translateX(20px)); + } + } + } + } +} +html.android { + .label-switch input[type="checkbox"] { + &+ .checkbox { + .transition(0); + &:after, &:before { + .transition(0); + } + } + } +} +//Buttons +.button { + border: 1px solid @themeColor; + color: @themeColor; + text-decoration: none; + text-align: center; + display: block; + border-radius: 5px; + line-height: 27px; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + background: none; + padding: 0 10px; + margin: 0; + height: 29px; + white-space: nowrap; + position: relative; + overflow: hidden; + text-overflow:ellipsis; + font-size: 14px; + font-family: inherit; + cursor: pointer; + outline: 0; + input[type="submit"]&, input[type="button"]&{ + width: 100%; + } + + html:not(.watch-active-state) &:active, &.active-state { + background: rgba(red(@themeColor), green(@themeColor), blue(@themeColor), .15); + } + &.button-round { + border-radius: 27px; + } + &.active { + background: @themeColor; + color: #fff; + } + &.button-big { + font-size: 17px; + height: 44px; + line-height: 42px; + } + &.button-fill { + color:#fff; + background: @themeColor; + border-color: transparent; + html:not(.watch-active-state) &:active, &.active-state { + opacity: 0.8; + } + } + i.icon { + &:first-child { + margin-right: 10px; + } + &:last-child { + margin-left: 10px; + } + &:first-child:last-child { + margin-left: 0; + margin-right: 0; + } + } +} +.buttons-row { + .align-self(center); + .flexbox(); + .flex-wrap(nowrap); + .button { + border-radius: 0 0 0 0; + border-left-width: 0; + width: 100%; + -webkit-box-flex:1; + -ms-flex:1; + } + .button:first-child { + border-radius: 5px 0 0 5px; + border-left-width: 1px; + border-left-style: solid; + } + .button:last-child { + border-radius: 0 5px 5px 0; + } + .button:first-child:last-child { + border-radius: 5px; + } + .button.button-round:first-child { + border-radius: 27px 0 0 27px; + } + .button.button-round:last-child { + border-radius: 0 27px 27px 0; + } +} + + +// Slider +.range-slider { + width: 100%; + position: relative; + overflow: hidden; + padding-left: 3px; + padding-right: 3px; + margin-left: -1px; + .align-self(center); + input[type="range"] { + position: relative; + height: 28px; + width: 100%; + margin: 4px 0 5px 0; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + background: -webkit-gradient(linear, 50% 0, 50% 100%, color-stop(0, #b7b8b7), color-stop(100%, #b7b8b7)); + background: linear-gradient(to right, #b7b8b7 0, #b7b8b7 100%); + background-position: center; + background-size: 100% 2px; + background-repeat: no-repeat; + outline: 0; + border: none; + box-sizing: content-box; + -ms-background-position-y: 500px; + &:focus, &:active { + border: 0; + outline: 0; + } + } + + + + // Range thumb mixin + .range-thumb() { + height: 28px; + width: 28px; + border-radius: 28px; + background: #fff; + z-index: 10; + box-shadow: 0 2px 4px rgba(0,0,0,0.4); + border: 0; + outline: 0; + position: absolute; + box-sizing: border-box; + content: ' '; + } + + // ======= WebKit/Blink ======== + + // Before Track + input[type="range"]:after { + height: 2px; + background: #fff; + content:' '; + width: 5px; + top: 50%; + margin-top: -1px; + left: -5px; + z-index: 1; + position: absolute; + } + // Thumb + input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + .range-thumb(); + position: relative; + cursor: pointer; + margin-top: -1px; + } + input[type="range"]::-webkit-slider-thumb:after { + .range-thumb(); + left: 0; + top: 0; + } + // Track Active Highlight + input[type="range"]::-webkit-slider-thumb:before { + position: absolute; + top: 50%; + right: 100%; + width: 2000px; + height: 2px; + margin-top: -1px; + z-index: 1; + background: @themeColor; + content: ' '; + } + + // ======= FireFox ======== + input[type="range"]::-moz-range-track { + width: 100%; + height: 2px; + background: #b7b8b7; + border: none; + outline: 0; + } + input[type="range"]::-moz-range-thumb { + .range-thumb(); + } + + // ======= IE ======== + input[type="range"]::-ms-track { + width: 100%; + height: 2px; + cursor: pointer; + background: transparent; + border-color: transparent; + color: transparent; + } + input[type="range"]::-ms-thumb { + .range-thumb(); + box-shadow: none; + border: 1px solid rgba(0,0,0,0.2); + box-sizing: border-box; + margin-top: 0; + top: 50%; + } + + input[type="range"]::-ms-fill-lower { + background: @themeColor; + } + input[type="range"]::-ms-fill-upper { + background: #b7b8b7; + } +} + +// Checkboxes +.form-checkbox { + position: relative; + display: inline-block; + vertical-align: middle; +} +label.label-checkbox, .form-checkbox { + cursor: pointer; + input[type="checkbox"], input[type="radio"] { + display: none; + } +} +label.label-checkbox i.icon-form-checkbox, .form-checkbox i { + width: 22px; + height: 22px; + position: relative; + border-radius: 22px; + border: 1px solid #c7c7cc; + box-sizing: border-box; + display: block; + &:after { + content:' '; + position: absolute; + left: 50%; + margin-left: -6px; + top: 50%; + margin-top: -4px; + width: 12px; + height: 9px; + } +} +label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +.form-checkbox input[type="checkbox"]:checked ~ i { + border: none; + background-color: @themeColor; + &:after { + background: no-repeat center; + .encoded-svg-background(""); + -webkit-background-size: 12px 9px; + background-size: 12px 9px; + } +} +// Radios +.form-radio { + display: inline-block; + vertical-align: middle; + position: relative; + i { + width: 22px; + height: 22px; + position: relative; + border-radius: 4px; + border: 1px solid #c7c7cc; + box-sizing: border-box; + display: block; + } +} +label.label-radio, .form-radio { + cursor: pointer; + input[type="checkbox"], input[type="radio"] { + display: none; + } +} +.form-radio input[type="radio"]:checked ~ i, +label.label-radio input[type="checkbox"]:checked ~ .item-inner, +label.label-radio input[type="radio"]:checked ~ .item-inner { + background: no-repeat center; + .encoded-svg-background(""); + -webkit-background-size: 13px 10px; + background-size: 13px 10px; +} +label.label-radio { + input[type="checkbox"], input[type="radio"] { + display: none; + ~ .item-inner { + padding-right: 35px; + } + &:checked ~ .item-inner{ + background-position: 90% center; + background-position: ~"-webkit-calc(100% - 15px)" center; + background-position: ~"calc(100% - 15px)" center; + } + } +} +label.label-checkbox, label.label-radio { + .transition(300ms); + html:not(.watch-active-state) &:active, &.active-state { + .transition(0ms); + background-color: #d9d9d9; + .item-inner { + .hairline-color(bottom, transparent); + } + } +} + +// Smart selects +.smart-select { + select { + display: none; + } +} diff --git a/bower_components/framework7/src/less/ios/framework7.ios.colors.less b/bower_components/framework7/src/less/ios/framework7.ios.colors.less new file mode 100644 index 00000000..8b61d694 --- /dev/null +++ b/bower_components/framework7/src/less/ios/framework7.ios.colors.less @@ -0,0 +1,742 @@ +@import url('_mixins.less'); +@import url('_colors-vars.less'); +/*========================== +Framework7 Color Themes +==========================*/ +.theme-mixin(@colorName, @color, @colorHex) { + //Buttons + .theme-@{colorName} .button:not(.button-fill) { + border-color: @color; + html:not(.watch-active-state) &:active, &.active-state { + background-color: rgba(red(@color), green(@color), blue(@color), 0.15); + } + &.active { + background-color: @color; + color:#fff; + } + } + .theme-@{colorName} .button.button-fill { + background: @color; + color:#fff; + } + // Progress bar + .progressbar { + &.theme-@{colorName}, .theme-@{colorName} & { + span { + background-color: @color; + } + } + } + .progressbar-infinite { + &.theme-@{colorName}, .theme-@{colorName} & { + &:before { + background-color: @color; + } + } + } + //Icons + .theme-@{colorName} { + i.icon, i.icon& { + color:@color; + } + } + i.icon-next.color-@{colorName}, i.icon-next.theme-@{colorName}, .theme-@{colorName} i.icon-next { + .encoded-svg-background(""); + } + i.icon-prev.color-@{colorName}, i.icon-prev.theme-@{colorName}, .theme-@{colorName} i.icon-prev { + .encoded-svg-background(""); + } + i.icon-back.color-@{colorName}, i.icon-back.theme-@{colorName}, .theme-@{colorName} i.icon-back { + .encoded-svg-background(""); + } + i.icon-forward.color-@{colorName}, i.icon-forward.theme-@{colorName}, .theme-@{colorName} i.icon-forward { + .encoded-svg-background(""); + } + i.icon-bars.color-@{colorName}, i.icon-bars.theme-@{colorName}, .theme-@{colorName} i.icon-bars { + .encoded-svg-background(""); + @media (-webkit-min-device-pixel-ratio: 2) { + .encoded-svg-background(""); + } + } + + // Theme + .theme-@{colorName} { + a, .item-link.list-button, .list-button { + color: @color; + } + .tabbar, .tabbar& { + a, a i { + color:inherit; + } + a.active, a.active i { + color:@color; + } + } + .messagebar .messagebar-send-link { + background-color: @color; + } + label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, + label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, + .form-checkbox input[type="checkbox"]:checked ~ i, + label.label-checkbox& input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, + label.label-checkbox& input[type="radio"]:checked + .item-media i.icon-form-checkbox, + .form-checkbox& input[type="checkbox"]:checked ~ i { + background-color: @color; + } + .form-radio input[type="radio"]:checked ~ i, + label.label-radio input[type="checkbox"]:checked ~ .item-inner, + label.label-radio input[type="radio"]:checked ~ .item-inner, + .form-radio& input[type="radio"]:checked ~ i, + label.label-radio& input[type="checkbox"]:checked ~ .item-inner, + label.label-radio& input[type="radio"]:checked ~ .item-inner { + .encoded-svg-background(""); + } + .picker-calendar-day.picker-calendar-day-selected span { + background-color: @color !important; + } + // Data Tables + .data-table, .data-table& { + .data-table-header-selected { + background: rgba(red(@color), green(@color), blue(@color), 0.1); + } + .data-table-title-selected { + color: @color; + } + } + } + .swiper-pagination { + &.color-@{colorName}, .theme-@{colorName} & { + .swiper-pagination-bullet-active { + background-color: @color; + } + .swiper-pagination-progressbar { + background-color: @color; + } + } + &.swiper-pagination-progress.bg-@{colorName} { + background-color: rgba(red(@color), green(@color), blue(@color), 0.25); + } + } + .swiper-button-next, .swiper-container-rtl .swiper-button-prev { + &.color-@{colorName}, .theme-@{colorName} & { + .encoded-svg-background(""); + } + } + .swiper-button-prev, .swiper-container-rtl .swiper-button-next { + &.color-@{colorName}, .theme-@{colorName} & { + .encoded-svg-background(""); + } + } + // Floating Button + .floating-button, .speed-dial-buttons a { + .theme-@{colorName} &, &.theme-@{colorName} { + color:#fff; + background: @color; + html:not(.watch-active-state) &:active, &.active-state { + background: darken(@color, 8%); + } + i { + color: inherit; + } + } + } + // Range Slider + .range-slider { + .theme-@{colorName} &, &.theme-@{colorName} { + input[type="range"]::-webkit-slider-thumb:before { + background-color: @color; + } + input[type="range"]::-ms-fill-lower { + background-color: @color; + } + } + } + // Badges + .badge.theme-@{colorName} { + background-color:@color; + color: #fff; + } +} +.theme-mixin(e('gray'), #8e8e93, '8e8e93'); +.theme-mixin(e('white'), #ffffff, 'ffffff'); +.theme-mixin(e('black'), #000000, '000000'); +.theme-mixin(e('lightblue'), #5ac8fa, '5ac8fa'); +.theme-mixin(e('yellow'), #ffcc00, 'ffcc00'); +.theme-mixin(e('orange'), #ff9500, 'ff9500'); +.theme-mixin(e('pink'), #ff2d55, 'ff2d55'); +.theme-mixin(e('blue'), #007aff, '007aff'); +.theme-mixin(e('green'), #4cd964, '4cd964'); +.theme-mixin(e('red'), #ff3b30, 'ff3b30'); + +/*========================== +Framework7 Color + Bg + Border +==========================*/ +.color-mixin(@colorName, @color, @colorHex) { + // Overwrite colors for links, icons, buttons, badges, icon, preloader + //Plain color and links + .color-@{colorName} { + color: @color; + .list-block .item-link.list-button&, .list-button&, .tabbar a.active&, a& { + color: @color; + } + .label-switch input[type="checkbox"]:checked + .checkbox&, .label-switch& input[type="checkbox"]:checked + .checkbox{ + background-color: @color; + } + } + //Buttons + .color-@{colorName}.button:not(.button-fill), .color-@{colorName}.buttons-row .button { + border-color: @color; + html:not(.watch-active-state) &:active, &.active-state { + background-color: rgba(red(@color), green(@color), blue(@color), 0.15); + } + &.active { + background-color: @color; + color:#fff; + } + } + .button.button-fill.color-@{colorName} { + background: @color; + color:#fff; + } + // Progress bar + .progressbar { + &.color-@{colorName}, &.bg-@{colorName} { + span { + background-color: @color; + } + } + } + .progressbar-infinite { + &.color-@{colorName}, &.bg-@{colorName} { + &:before { + background-color: @color; + } + } + } + //Icons + .color-@{colorName} { + i.icon, i.icon& { + color:@color; + } + } + // Preloader + .preloader.color-@{colorName}, .preloader.preloader-@{colorName} { + .encoded-svg-background(""); + } + // Bg rule + .bg-@{colorName}, .button.button-fill.bg-@{colorName}, a.bg-@{colorName}, .list-block .swipeout-actions-left a.bg-@{colorName}, .list-block .swipeout-actions-right a.bg-@{colorName} { + background-color: @color; + } + // Border rule + .border-@{colorName} { + border-color: @color; + .list-block &.item-inner, .list-block ul&, & { + &:after, &:before { + background-color: @color; + } + } + } + // Floating Button + .floating-button, .speed-dial-buttons a { + &.color-@{colorName}, &.bg-@{colorName} { + color:#fff; + background: @color; + html:not(.watch-active-state) &:active, &.active-state { + background: darken(@color, 8%); + } + i { + color: inherit; + } + } + } + // Range Slider + .range-slider { + &.color-@{colorName} { + input[type="range"]::-webkit-slider-thumb:before { + background-color: @color; + } + input[type="range"]::-ms-fill-lower { + background-color: @color; + } + } + } + // Badges + .badge.color-@{colorName} { + background-color:@color; + color: #fff; + } +} +.color-mixin(e('gray'), #8e8e93, '8e8e93'); +.color-mixin(e('white'), #ffffff, 'ffffff'); +.color-mixin(e('black'), #000000, '000000'); +.color-mixin(e('lightblue'), #5ac8fa, '5ac8fa'); +.color-mixin(e('yellow'), #ffcc00, 'ffcc00'); +.color-mixin(e('orange'), #ff9500, 'ff9500'); +.color-mixin(e('pink'), #ff2d55, 'ff2d55'); +.color-mixin(e('blue'), #007aff, '007aff'); +.color-mixin(e('green'), #4cd964, '4cd964'); +.color-mixin(e('red'), #ff3b30, 'ff3b30'); + +/*========================== +Framework7 Layouts Themes +==========================*/ +/* === Dark layout === */ +.layout-dark { + @pageBg: #222426; + @barsBg: #131313; + @barsBorder: #333; + @barsText: #fff; + @tabBarText: #fff; + @text: #ddd; + @lightText: #bbb; + @strongText: #fff; + @activeLink: #29292f; + @blockBg: #1c1d1f; + @blockBorder: #393939; + @blockStrongBg: #1c1d1f; + @dividerBg: #1a1a1a; + @itemAfterText: @lightText; + @searchbarBg: #333; + @searchbarBorder: #333; + @swipeoutButton: #444; + @checkboxBorder: @blockBorder; + .navbar, .navbar&, .subnavbar, .subnavbar& { + .hairline-color(bottom, @barsBorder); + background-color: @barsBg; + color:@barsText; + } + .toolbar, .toolbar& { + .hairline-color(top, @barsBorder); + background-color: @barsBg; + color:@barsText; + } + // Picker + .picker-modal { + .toolbar { + background-color: @barsBg; + } + } + .popover .picker-modal .toolbar { + background: none; + } + .picker-calendar-week-days { + color:#fff; + background-color: @barsBg; + } + .popover .picker-modal, .picker-modal.picker-modal-inline { + .picker-center-highlight { + .hairline-color(top, @barsBorder); + .hairline-color(bottom, @barsBorder); + } + .picker-item.picker-selected { + color:#fff; + } + .picker-calendar-week-days { + color: #fff; + } + .picker-calendar-day { + color:#fff; + &.picker-calendar-day-prev, &.picker-calendar-day-next { + color: #777; + } + &.picker-calendar-day-disabled { + color: #555; + } + &.picker-calendar-day-today span { + background: #333; + } + &.picker-calendar-day-has-events span:after { + background: #555; + } + } + .picker-calendar-week-days, .picker-calendar-row { + .hairline-color(bottom, @barsBorder); + } + .toolbar ~ .picker-modal-inner .picker-calendar-months, .picker-calendar-week-days ~ .picker-calendar-months { + .hairline-color(top, @barsBorder); + } + + } + .popover .picker-modal { + .toolbar { + .hairline-color(bottom, @barsBorder); + } + } + // Photo Browser + .photo-browser, .views .view[data-page="photo-browser-slides"] { + .navbar, .toolbar { + color:#000; + background: rgba(247,247,247,0.95); + } + } + .photo-browser-dark { + .navbar, .toolbar { + background: rgba(30,30,30,0.8); + color:#fff; + } + } + + .tabbar a:not(.active) { + color:@tabBarText; + } + .page, .login-screen-content, .page&, .panel, .panel& { + background-color: @pageBg; + color:@text; + } + .content-block-title { + color:@strongText; + } + .content-block, .content-block& { + color:@lightText; + } + .content-block-inner { + background: @blockStrongBg; + color:@text; + .hairline-color(top, @blockBorder); + .hairline-color(bottom, @blockBorder); + } + .list-block, .list-block& { + ul { + background: @blockBg; + .hairline-color(top, @blockBorder); + .hairline-color(bottom, @blockBorder); + } + &.inset ul{ + background: @blockStrongBg; + } + &.notifications > ul { + background: none; + } + } + .autocomplete-dropdown { + background: @blockBg; + .list-block b { + color: #fff; + } + } + .card { + background: @blockBg; + } + .card-header{ + .hairline-color(bottom, @blockBorder); + } + .card-footer { + .hairline-color(top, @blockBorder); + color:@lightText; + } + .popover, .popover& { + background: rgba(0,0,0,0.8); + .popover-angle:after { + background: rgba(0,0,0,0.8); + } + .list-block ul { + background: none; + } + + } + .actions-popover .list-block ul { + .hairline-color(top, @blockBorder); + .hairline-color(bottom, @blockBorder); + } + .actions-popover .actions-popover-label { + .hairline-color(bottom, @blockBorder); + } + li.sorting { + background-color: @activeLink; + } + .swipeout-actions-left a, .swipeout-actions-right a { + background-color: @swipeoutButton; + } + .item-inner, .list-block ul ul li:last-child .item-inner { + .hairline-color(bottom, @blockBorder); + } + .item-after { + color:@itemAfterText; + } + .item-link, label.label-checkbox, label.label-radio { + html:not(.watch-active-state) &:active, &.active-state { + background-color: @activeLink; + } + } + .item-link.list-button, .list-button { + .hairline-color(bottom, @blockBorder); + } + .list-block-label { + color:@lightText; + } + .item-divider, .list-group-title { + background: @dividerBg; + color:@lightText; + .hairline-color(top, @blockBorder); + } + + // Searchbar + .searchbar { + background: @searchbarBg; + .hairline-color(bottom, @searchbarBorder); + } + + // Forms + .list-block, .list-block& { + input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], input[type="datetime-local"], input[type="number"], select, textarea { + color:@strongText; + } + } + .label-switch .checkbox { + background-color: @checkboxBorder; + &:before { + background-color: @blockBg; + } + } + .range-slider input[type="range"]:after { + background: @blockBg; + } + .range-slider input[type="range"]::-ms-thumb { + border: none; + } + // Timeline + .timeline-item-inner { + background: @blockBg; + } + .timeline-item-divider { + background: rgba(255,255,255,0.3); + } + .content-block-inner .timeline-item-inner { + border-color: @blockBorder; + } + .timeline-item-time { + color: #8e8e93; + } + .timeline-horizontal .timeline-item-date { + .hairline-color(bottom, @barsBorder); + background-color: @barsBg; + } + .timeline-horizontal .timeline-item { + .hairline-color(right, @barsBorder); + } + .timeline-year-title, .timeline-month-title { + background-color: @barsBg; + } + .timeline-month .timeline-item { + .hairline-color(top, @barsBorder); + } + .timeline-year { + .hairline-color(right, @barsBorder); + } + // Data Table + .data-table { + tbody { + tr.data-table-row-selected { + background: rgba(255,255,255,0.05); + } + td { + .hairline(top, @blockBorder); + } + } + html:not(.ios):not(.android) & { + tbody tr:hover { + background: rgba(255,255,255,0.05); + } + } + .sortable-cell:not(.numeric-cell):after, .sortable-cell.numeric-cell:before { + .encoded-svg-background(""); + } + + // Collapsible + @media (max-width:480px) and (orientation:portrait) { + &.data-table-collapsible { + tr { + .hairline(top, @blockBorder); + } + tr:hover { + background-color: inherit; + } + } + } + } +} + +/* === White layout === */ +.layout-white { + @pageBg: #fff; + @barsBg: #fff; + @barsBorder: #ddd; + @barsText: #000; + @tabBarText: #777; + @text: #000; + @lightText: #777; + @strongText: #777; + @activeLink: #eee; + @blockBg: @pageBg; + @blockBorder: #ddd; + @blockStrongBg: #fafafa; + @dividerBg: #f7f7f7; + @itemAfterText: #8e8e93; + @searchbarBg: #c9c9ce; + @searchbarBorder: #b4b4b4; + @swipeoutButton: #c7c7cc; + @checkboxBorder: #e5e5e5; + .navbar, .navbar&, .subnavbar, .subnavbar& { + .hairline-color(bottom, @barsBorder); + background-color: @barsBg; + color:@barsText; + } + .toolbar, .toolbar& { + .hairline-color(top, @barsBorder); + background-color: @barsBg; + color:@barsText; + } + + // Picker + .picker-modal { + .toolbar { + background-color: @barsBg; + } + } + .popover .picker-modal .toolbar { + background: none; + } + .popover .picker-modal, .picker-modal.picker-modal-inline { + .picker-center-highlight { + .hairline-color(top, @barsBorder); + .hairline-color(bottom, @barsBorder); + } + .picker-calendar-week-days, .picker-calendar-row { + .hairline-color(bottom, @barsBorder); + } + .toolbar ~ .picker-modal-inner .picker-calendar-months, .picker-calendar-week-days ~ .picker-calendar-months { + .hairline-color(top, @barsBorder); + } + } + .popover .picker-modal { + .toolbar { + .hairline-color(bottom, @barsBorder); + } + } + // Photo Browser + .photo-browser, .views .view[data-page="photo-browser-slides"] { + .navbar, .toolbar { + color:#000; + background: rgba(247,247,247,0.95); + } + } + .photo-browser-dark { + .navbar, .toolbar { + background: rgba(30,30,30,0.8); + color:#fff; + } + } + .tabbar a:not(.active) { + color:@tabBarText; + } + .page, .login-screen-content, .page&, .panel, .panel& { + background-color: @pageBg; + color: @text; + } + .content-block-title { + color:@strongText; + } + .content-block, .content-block& { + color:@lightText; + } + .content-block-inner { + background: @blockStrongBg; + color:@text; + .hairline-color(bottom, @blockBorder); + .hairline-color(top, @blockBorder); + } + .list-block, .list-block& { + ul { + background: @blockBg; + .hairline-color(bottom, @blockBorder); + .hairline-color(top, @blockBorder); + } + &.inset ul{ + background: @blockStrongBg; + } + &.notifications > ul { + background: none; + } + } + .popover-inner > .list-block ul { + background: none; + } + li.sorting { + background-color: @activeLink; + } + .swipeout-actions-left a, .swipeout-actions-right a { + background-color: @swipeoutButton; + } + .item-inner, .list-block ul ul li:last-child .item-inner { + border-color: @blockBorder; + .hairline-color(bottom, @blockBorder); + } + .item-after { + color:@itemAfterText; + } + .item-link, label.label-checkbox, label.label-radio { + html:not(.watch-active-state) &:active, &.active-state { + background-color: @activeLink; + } + } + .item-link.list-button, .list-button { + .hairline-color(bottom, @blockBorder); + } + .list-block-label { + color:@lightText; + } + .item-divider, .list-group-title { + background: @dividerBg; + color:@lightText; + .hairline-color(top, @blockBorder); + } + + // Searchbar + .searchbar { + background: @searchbarBg; + .hairline-color(bottom, @searchbarBorder); + } + + // Forms + .list-block, .list-block& { + input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], input[type="datetime-local"], input[type="number"], select, textarea { + color:@strongText; + } + } + .label-switch .checkbox { + background-color: @checkboxBorder; + &:before { + background-color: @blockBg; + } + } + .range-slider input[type="range"]:after { + background: @blockBg; + } + // Timeline + .timeline-item-inner { + background: @blockStrongBg; + } + .content-block-inner .timeline-item-inner { + border-color: @blockBorder; + } + .timeline-item-time { + color: #8e8e93; + } + .timeline-horizontal .timeline-item-date { + .hairline-color(bottom, @barsBorder); + background-color: @barsBg; + } + .timeline-horizontal .timeline-item { + .hairline-color(right, @barsBorder); + } + .timeline-year-title, .timeline-month-title { + background-color: @barsBg; + } + .timeline-month .timeline-item { + .hairline-color(top, @barsBorder); + } + .timeline-year { + .hairline-color(right, @barsBorder); + } +} + diff --git a/bower_components/framework7/src/less/ios/framework7.ios.less b/bower_components/framework7/src/less/ios/framework7.ios.less new file mode 100644 index 00000000..3bbaaba3 --- /dev/null +++ b/bower_components/framework7/src/less/ios/framework7.ios.less @@ -0,0 +1,40 @@ +@import url('_mixins.less'); +@import url('_colors-vars.less'); +@import url('intro.less'); +@import url('grid.less'); +@import url('views.less'); +@import url('pages.less'); +@import url('toolbars.less'); +@import url('toolbars-pages.less'); +@import url('searchbar.less'); +@import url('messagebar.less'); +@import url('icons.less'); +@import url('badges.less'); +@import url('chips.less'); +@import url('content-block.less'); +@import url('lists.less'); +@import url('contacts.less'); +@import url('forms.less'); +@import url('floating-button.less'); +@import url('accordion.less'); +@import url('cards.less'); +@import url('modals.less'); +@import url('panels.less'); +@import url('lazy-load.less'); +@import url('tabs.less'); +@import url('messages.less'); +@import url('statusbar.less'); +@import url('preloader.less'); +@import url('progressbar.less'); +@import url('pull-to-refresh.less'); +@import url('infinite-scroll.less'); +@import url('autocomplete.less'); +@import url('timeline.less'); +@import url('swiper.less'); +@import url('photo-browser.less'); +@import url('picker.less'); +@import url('calendar.less'); +@import url('notifications.less'); +@import url('login-screen.less'); +@import url('disabled.less'); +@import url('data-table.less'); diff --git a/bower_components/framework7/src/less/ios/framework7.ios.rtl.less b/bower_components/framework7/src/less/ios/framework7.ios.rtl.less new file mode 100644 index 00000000..cacae724 --- /dev/null +++ b/bower_components/framework7/src/less/ios/framework7.ios.rtl.less @@ -0,0 +1,473 @@ +@import url('_mixins.less'); +@import url('_colors-vars.less'); +/*============= + Framework 7 RTL Additions +=============*/ +html { + direction: rtl; +} + +/* === Lists === */ +.list-block { + ul ul { + padding-left: 0; + padding-right: 45px; + } + .item-content { + padding-left: 0; + padding-right: 15px; + } + .item-inner { + padding-right: 0; + padding-left: 15px; + } + .item-after { + margin-left: 0; + margin-right: 5px; + } + .item-media { + i + i, i + img { + margin-left: 0; + margin-right: 5px; + } + & + .item-inner { + margin-left: 0; + margin-right: 15px; + } + } + .item-link { + .item-inner { + padding-right: 0; + padding-left: 35px; + background-position: 15px center; + .encoded-svg-background(""); + } + } + + &.media-list, li.media-item { + .item-link { + .item-inner { + padding-right: 0; + padding-left: 15px; + } + .item-title-row { + padding-right: 0; + padding-left: 20px; + background-position: center left; + .encoded-svg-background(""); + } + } + } + .sortable-handler { + right: auto; + left: 0; + } + &.sortable-opened { + .item-inner, .item-link .item-inner { + padding-right: 0; + padding-left: 35px; + } + .item-link .item-inner, .item-link .item-title-row { + background-image: none; + } + } + .swipeout-actions-left, .swipeout-actions-right { + direction: ltr; + } +} + +/* === Toolbars === */ +.navbar, .toolbar { + a.link { + i+span, i+i, span+i, span+span { + margin-left: 0; + margin-right: 7px; + } + } + +} +.navbar { + .left, .right { + a+a { + margin-left: 0; + margin-right: 15px; + } + } + .left { + margin-right: 0px; + margin-left: 10px; + } + .right { + margin-left: 0px; + margin-right: 10px; + } + .right:first-child { + right: auto; + left: 8px; + } +} +/* === Forms === */ +.list-block { + input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], input[type="datetime-local"], input[type="number"], select, textarea { + padding-left: 0; + padding-right: 5px; + } +} +.buttons-row { + .button:first-child { + border-radius: 0 5px 5px 0; + border-left: none; + } + .button:last-child { + border-radius: 5px 0 0 5px; + border-left-width: 1px; + border-left-style: solid; + } + .button.button-round:first-child { + border-radius: 0 27px 27px 0; + } + .button.button-round:last-child { + border-radius: 27px 0 0 27px; + } +} +.label-switch { + input[type="checkbox"] { + &+ .checkbox { + &:before { + left: auto; + right: 2px; + } + &:after { + right: 2px; + left: auto; + .translate3d(0,0,0); + } + } + &:checked { + &+ .checkbox { + &:after { + left: auto; + .transform(translateX(-20px)); + } + } + } + } +} +.range-slider { + padding-left: 0; + padding-right: 0; + margin-left: 0; + padding-right: 3px; + padding-left: 3px; + margin-right: -1px; + input[type="range"]:after { + left: auto; + right: -5px; + } + input[type="range"]::-webkit-slider-thumb:after { + left: auto; + right: 0; + } + input[type="range"]::-webkit-slider-thumb:before { + right: auto; + left: 100%; + } +} +label.label-radio { + input[type="checkbox"], input[type="radio"] { + ~ .item-inner { + padding-left: 35px; + padding-right: 0; + } + &:checked ~ .item-inner{ + background-position: 15px center; + } + } +} + +/* === Search Bar === */ +.searchbar { + input[type="search"] { + background-position: right center; + background-position: ~"-webkit-calc(100% - 8px)" center; + background-position: ~"calc(100% - 8px)" center; + } + .searchbar-clear { + right: auto; + left: 0; + } + &.searchbar-active { + .searchbar-cancel { + margin-left: 0; + margin-right: 8px; + } + } +} +/* === Message Bar === */ +.messagebar { + .link + textarea { + margin-left: 0; + margin-right: 8px; + } + textarea + .link { + margin-left: 0; + margin-right: 8px; + } +} +/* === Modals === */ +.modal-button { + &:first-child { + border-radius: 0 0 7px 0; + border-right: none; + } + &:last-child { + border-right: 1px solid #b5b5b5; + border-radius: 0 0 0 7px; + } + &:first-child:last-child { + border-radius: 0 0 7px 7px; + } +} + +/* === Content Block === */ +.content-block-inner { + margin-left: 0; + margin-right: -15px; +} + +/* === Pages === */ +.page-from-right-to-center:before, .page-from-center-to-right:before, .page-fake-shadow { + right: auto; + left: 100%; + background: -webkit-linear-gradient(right, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 10%, rgba(0,0,0,0.01) 50%, rgba(0,0,0,0.2) 100%); + background: linear-gradient(to left, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 10%, rgba(0,0,0,0.01) 50%, rgba(0,0,0,0.2) 100%); +} +.page-on-left { + .translate3d(20%); +} +.page-on-right { + .translate3d(-100%); +} +@-webkit-keyframes pageFromRightToCenter { + from { + -webkit-transform: translate3d(-100%,0,0); + } + to { + -webkit-transform: translate3d(0,0,0); + } +} +@-webkit-keyframes pageFromCenterToRight { + from { + -webkit-transform: translate3d(0,0,0); + } + to { + -webkit-transform: translate3d(-100%,0,0); + } +} +@keyframes pageFromRightToCenter { + from { + transform: translate3d(-100%,0,0); + } + to { + transform: translate3d(0,0,0); + } +} +@keyframes pageFromCenterToRight { + from { + transform: translate3d(0,0,0); + } + to { + transform: translate3d(-100%,0,0); + } +} +@-webkit-keyframes pageFromCenterToLeft { + from { + opacity: 1; + -webkit-transform: translate3d(0,0,0); + } + to { + opacity: 0.9; + -webkit-transform: translate3d(20%,0,0); + } +} +@-webkit-keyframes pageFromLeftToCenter { + from { + opacity: 0.9; + -webkit-transform: translate3d(20%,0,0); + } + to { + opacity: 1; + -webkit-transform: translate3d(0,0,0); + } +} +@keyframes pageFromCenterToLeft { + from { + opacity: 1; + transform: translate3d(0,0,0); + } + to { + opacity: 0.9; + transform: translate3d(20%,0,0); + } +} +@keyframes pageFromLeftToCenter { + from { + opacity: 0.9; + transform: translate3d(20%,0,0); + } + to { + opacity: 1; + transform: translate3d(0,0,0); + } +} + +/* === Messages === */ +.message-received { + -ms-flex-item-align: end; + -webkit-align-self: flex-end; + align-self: flex-end; + .align-items(flex-end); +} +.message-sent { + -ms-flex-item-align: start; + -webkit-align-self: flex-start; + align-self: flex-start; + .align-items(flex-start); +} +/* === Chips === */ +.chip { + +} +.chip-media { + + .chip-label{ + margin-left: 0px; + margin-right: 4px; + } +} +.chip-delete { + margin-right: 0; + margin-left: -6px; +} +/* === Back Icons === */ +i.icon { + &.icon-back { + .encoded-svg-background(""); + } + &.icon-forward { + .encoded-svg-background(""); + } + &.icon-next { + .encoded-svg-background(""); + } + &.icon-prev { + .encoded-svg-background(""); + } +} +.rtl-icon-color-mixin(@colorName, @color) { + i.icon-back.color-@{colorName}, i.icon-back.theme-@{colorName}, .theme-@{colorName} i.icon-back { + .encoded-svg-background(""); + } + i.icon-forward.color-@{colorName}, i.icon-forward.theme-@{colorName}, .theme-@{colorName} i.icon-forward { + .encoded-svg-background(""); + } + i.icon-next.color-@{colorName}, i.icon-next.theme-@{colorName}, .theme-@{colorName} i.icon-next { + .encoded-svg-background(""); + } + i.icon-prev.color-@{colorName}, i.icon-prev.theme-@{colorName}, .theme-@{colorName} i.icon-prev { + .encoded-svg-background(""); + } +} +.rtl-icon-color-mixin(e('gray'), #8e8e93); +.rtl-icon-color-mixin(e('white'), #ffffff); +.rtl-icon-color-mixin(e('black'), #000000); +.rtl-icon-color-mixin(e('lightblue'), #5ac8fa); +.rtl-icon-color-mixin(e('yellow'), #ffcc00); +.rtl-icon-color-mixin(e('orange'), #ff9500); +.rtl-icon-color-mixin(e('pink'), #ff2d55); +.rtl-icon-color-mixin(e('blue'), #007aff); +.rtl-icon-color-mixin(e('green'), #4cd964); +.rtl-icon-color-mixin(e('red'), #ff3b30); + +/* === Accordion === */ +.list-block { + .accordion-toggle { + .item-inner { + padding-right: 0; + padding-left: 35px; + background-position: 15px center; + .encoded-svg-background(""); + } + } + &:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner, + &:not(.media-list) .accordion-item-expanded:not(.media-item) > .item-link .item-inner, + &.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row, + &.media-list .accordion-item-expanded > .item-link .item-title-row, + .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row, + .accordion-item-expanded.media-item > .item-link .item-title-row, + { + .encoded-svg-background(""); + background-size: 20px 20px; + } + .accordion-item ul { + padding-right: 0; + } +} + +/* === Timeline === */ +.timelineItemLeft() { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-left: ~"-moz-calc(50% - (30px + 10px) / 2 - 50px)"; + margin-left: ~"-webkit-calc(50% - (30px + 10px) / 2 - 50px)"; + margin-left: ~"calc(50% - (30px + 10px) / 2 - 50px)"; + margin-right: 0; + .timeline-item-date { + text-align: right; + } +} +.timelineItemRight() { + margin-right: ~"-moz-calc(50% - (30px + 10px) / 2 - 50px)"; + margin-right: ~"-webkit-calc(50% - (30px + 10px) / 2 - 50px)"; + margin-right: ~"calc(50% - (30px + 10px) / 2 - 50px)"; + margin-left: 0; + .timeline-item-date { + text-align: left; + } +} +.timeline-sides { + .timeline-item { + .timelineItemRight(); + &:not(.timeline-item-right):nth-child(2n) { + .timelineItemLeft(); + } + } + .timeline-item-left { + .timelineItemLeft() + } + .timeline-item-right { + .timelineItemRight(); + } +} +@media (min-width:768px) { + .tablet-sides { + .timeline-sides; + } +} + +@toolbarBorderColor: #c4c4c4; +.timeline-horizontal .timeline-item-date { + text-align: right; +} +.timeline-horizontal { + .timeline-month:last-child .timeline-item:last-child { + .hairline(right, @toolbarBorderColor); + } +} +.timeline-year { + &:last-child { + .hairline(right, @toolbarBorderColor); + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/grid.less b/bower_components/framework7/src/less/ios/grid.less new file mode 100644 index 00000000..636c497b --- /dev/null +++ b/bower_components/framework7/src/less/ios/grid.less @@ -0,0 +1,87 @@ +/* === Grid === */ +.row { + .flexbox(); + .justify-content(space-between); + .flex-wrap(wrap); + .align-items(flex-start); + > [class*="col-"] { + box-sizing: border-box; + } +} +@cols: 5, 10, 15, 20, 25, 30, 100/3, 35, 40, 45, 50, 55, 60, 65, 100*(2/3), 70, 75, 80, 85, 90, 95, 100; +.row { + .col-auto { + width: 100%; + } + .-(@i: length(@cols)) when (@i > 0) { + @divider: e(extract(@cols, @i)); + @className: `Math.floor(@{divider})`; + @n: `100/parseFloat(@{divider})`; + @n-1: @n - 1; + .col-@{className} { + width: ~"@{divider}%"; + width: ~"-webkit-calc((100% - 15px*@{n-1}) / @{n})"; + width: ~"calc((100% - 15px*@{n-1}) / @{n})"; + } + &.no-gutter { + .col-@{className} { + width: ~"@{divider}%"; + } + } + .-((@i - 1)); + } .-; + .--(@j: 1) when (@j < length(@cols)) { + @divider: e(extract(@cols, @j)); + @className: `Math.floor(@{divider})`; + .col-auto:nth-last-child(@{j}), .col-auto:nth-last-child(@{j}) ~ .col-auto { + @j-1: @j - 1; + width: 100% / @j; + width: ~"-webkit-calc((100% - 15px*@{j-1}) / @{j})"; + width: ~"calc((100% - 15px*@{j-1}) / @{j})"; + } + &.no-gutter { + .col-auto:nth-last-child(@{j}), .col-auto:nth-last-child(@{j}) ~ .col-auto { + width: 100% / @j; + } + } + .--((@j + 1)); + } .--; + +} + +@media all and (min-width:768px) { + .row { + .-(@i: length(@cols)) when (@i > 0) { + @divider: e(extract(@cols, @i)); + @className: `Math.floor(@{divider})`; + @n: `100/parseFloat(@{divider})`; + @n-1: @n - 1; + .tablet-@{className} { + width: ~"@{divider}%"; + width: ~"-webkit-calc((100% - 15px*@{n-1}) / @{n})"; + width: ~"calc((100% - 15px*@{n-1}) / @{n})"; + } + &.no-gutter { + .tablet-@{className} { + width: ~"@{divider}%"; + } + } + .-((@i - 1)); + } .-; + .--(@j: 1) when (@j < length(@cols)) { + .tablet-auto:nth-last-child(@{j}), .tablet-auto:nth-last-child(@{j}) ~ .col-auto { + @j-1: @j - 1; + width: 100% / @j; + width: ~"-webkit-calc((100% - 15px*@{j-1}) / @{j})"; + width: ~"calc((100% - 15px*@{j-1}) / @{j})"; + } + &.no-gutter { + .tablet-auto:nth-last-child(@{j}), .tablet-auto:nth-last-child(@{j}) ~ .tablet-auto { + width: 100% / @j; + } + } + .--((@j + 1)); + } .--; + } + +} diff --git a/bower_components/framework7/src/less/ios/icons.less b/bower_components/framework7/src/less/ios/icons.less new file mode 100644 index 00000000..e3702a3e --- /dev/null +++ b/bower_components/framework7/src/less/ios/icons.less @@ -0,0 +1,76 @@ +/* === Icons === */ +i.icon { + display: inline-block; + vertical-align: middle; + background-size: 100% auto; + background-position: center; + background-repeat: no-repeat; + font-style: normal; + position: relative; + &.icon-back { + width: 12px; + height: 20px; + .encoded-svg-background(""); + } + &.icon-forward { + width: 12px; + height: 20px; + .encoded-svg-background(""); + } + &.icon-bars { + width: 21px; + height: 14px; + .encoded-svg-background(""); + @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2ddpx) { + .encoded-svg-background(""); + height: 13px; + } + } + &.icon-camera { + width: 25px; + height: 20px; + .encoded-svg-background(""); + } + &.icon-f7 { + width: 29px; + height: 29px; + background-image: url("@{imgBaseUrl}/i-f7-ios.png"); + border-radius: 6px; + } + &.icon-next, &.icon-prev { + width: 15px; + height: 15px; + } + &.icon-next { + .encoded-svg-background(""); + } + &.icon-prev { + .encoded-svg-background(""); + } + &.icon-plus { + width: 25px; + height: 25px; + font-size: 31px; + line-height: 20px; + text-align: center; + font-weight: 100; + } +} +.framework7-icons, .f7-icons { + .navbar &, .toolbar & { + font-size: 22px; + } + .tabbar &, .tabbar-labels & { + font-size: 25px; + } + .item-media & { + font-size: 29px; + } + .button & { + font-size: 22px; + } + .item-actions & { + font-size: 23px; + vertical-align: top; + } +} diff --git a/bower_components/framework7/src/less/ios/infinite-scroll.less b/bower_components/framework7/src/less/ios/infinite-scroll.less new file mode 100644 index 00000000..f351cb16 --- /dev/null +++ b/bower_components/framework7/src/less/ios/infinite-scroll.less @@ -0,0 +1,5 @@ +/* === Infinite Scroll Preloader === */ +.infinite-scroll-preloader { + text-align: center; + padding: 5px 0; +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/intro.less b/bower_components/framework7/src/less/ios/intro.less new file mode 100644 index 00000000..14b3532b --- /dev/null +++ b/bower_components/framework7/src/less/ios/intro.less @@ -0,0 +1,49 @@ +@imgBaseUrl: "../img"; +html, body, .framework7-root { + position: relative; + height: 100%; + width: 100%; + overflow-x: hidden; +} +body { + font-family: -apple-system, SF UI Text, Helvetica Neue, Helvetica, Arial, sans-serif; + margin: 0; + padding: 0; + color: #000; + font-size: 14px; + line-height: 1.4; + width: 100%; + -webkit-text-size-adjust:100%; + background: #fff; + overflow: hidden; +} +.framework7-root { + overflow: hidden; +} +// Fix for iPad in Safari in Lanscape mode +@media all and (width:1024px) and (height:691px) and (orientation:landscape) { + html, body, .framework7-root { + height: 671px; + } +} +@media all and (width:1024px) and (height:692px) and (orientation:landscape) { + html, body, .framework7-root { + height: 672px; + } +} + +* { + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout:none; +} +a, input, textarea, select { + outline: 0; +} + +a { + text-decoration: none; + color: @themeColor; +} +p { + margin: 1em 0; +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/lazy-load.less b/bower_components/framework7/src/less/ios/lazy-load.less new file mode 100644 index 00000000..0482f8c2 --- /dev/null +++ b/bower_components/framework7/src/less/ios/lazy-load.less @@ -0,0 +1,20 @@ +/* === Images Lazy Loading === */ +.lazy-loaded.lazy-fadeIn { + .animation(lazyFadeIn 600ms); +} +@-webkit-keyframes lazyFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes lazyFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/lists.less b/bower_components/framework7/src/less/ios/lists.less new file mode 100644 index 00000000..752a3dc6 --- /dev/null +++ b/bower_components/framework7/src/less/ios/lists.less @@ -0,0 +1,426 @@ +/* === Lists === */ +@listBlockBorderColor: #c8c7cc; +@listBlockBg: #fff; +@dividerBg: #F7F7F7; +@dividerColor: #8e8e93; +.list-block { + margin: 35px 0; + font-size: 17px; + ul { + background: @listBlockBg; + list-style: none; + padding: 0; + margin: 0; + position: relative; + .hairline(top, @listBlockBorderColor); + .hairline(bottom, @listBlockBorderColor); + ul { + .hairline-remove(top); + .hairline-remove(bottom); + padding-left: 45px; + } + } + + .align-top, .align-top .item-content, .align-top .item-inner { + .align-items(flex-start); + } + + .inset() { + margin-left: 15px; + margin-right: 15px; + border-radius: 7px; + .content-block-title { + margin-left: 0; + margin-right: 0; + } + ul { + border-radius: 7px; + .hairline-remove(top); + .hairline-remove(bottom); + } + li:first-child > a{ + border-radius: 7px 7px 0 0; + } + li:last-child > a{ + border-radius: 0 0 7px 7px; + } + li:first-child:last-child > a { + border-radius: 7px; + } + } + &.inset { + .inset() + } + &.tablet-inset { + @media all and (min-width:768px) { + .inset(); + } + } + + // List items + li { + box-sizing: border-box; + position: relative; + } + + .item-media { + .flexbox(); + .flex-shrink(0); + .flex-wrap(nowrap); + box-sizing: border-box; + .align-items(center); + padding-top: 7px; + padding-bottom: 8px; + i + i { + margin-left: 5px; + } + i + img { + margin-left: 5px; + } + } + .item-media + .item-inner { + margin-left: 15px; + } + .item-inner { + padding-right: 15px; + position: relative; + .hairline(bottom, @listBlockBorderColor); + width: 100%; + padding-top: 8px; + padding-bottom: 7px; + min-height: 44px; + box-sizing: border-box; + .flexbox(); + -webkit-box-flex:1; + -ms-flex:1; + overflow: hidden; + .justify-content(space-between); + .align-items(center); + .align-self(stretch); + } + .item-title { + .flex-shrink(1); + min-width: 0; + white-space: nowrap; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; + } + .item-after { + white-space: nowrap; + color: #8e8e93; + .flex-shrink(0); + margin-left: auto; + padding-left: 5px; + .flexbox(); + max-height: 28px; + } + .smart-select .item-after, .autocomplete-opener .item-after { + max-width: 70%; + overflow: hidden; + text-overflow: ellipsis; + position: relative; + display: block; + } + .item-actions { + margin-left: auto; + padding-left: 15px; + .flexbox(); + .align-items(center); + .justify-content(space-between); + a { + min-width: 23px; + .flexbox(); + .align-items(center); + .justify-content(center); + .transition(300ms); + html:not(.watch-active-state) &:active, &.active-state { + opacity: 0.3; + .transition(0ms); + } + + a { + margin-left: 8px; + } + } + } + .item-after + .item-actions { + margin-left: 0; + } + .item-link, .list-button { + .transition(300ms); + display: block; + color: inherit; + + .item-inner { + padding-right: 35px; + .encoded-svg-background(""); + background-size: 10px 20px; + background-repeat: no-repeat; + background-position: 95% center; + background-position: -webkit-calc(~"100% - 15px") center; + background-position: calc(~"100% - 15px") center; + } + html:not(.watch-active-state) &:active, &.active-state { + .transition(0ms); + background-color: #d9d9d9; + .item-inner { + .hairline-color(bottom, transparent); + } + } + } + .list-button { + padding: 0 15px; + text-align: center; + color: @themeColor; + display: block; + .hairline(bottom, @listBlockBorderColor); + line-height: 43px; + } + .item-content { + box-sizing: border-box; + padding-left: 15px; + min-height: 44px; + .flexbox(); + .justify-content(space-between); + .align-items(center); + } + // Label after List block + .list-block-label { + margin: 10px 0 35px; + padding: 0 15px; + font-size: 14px; + color: #8f8f94; + } + + // Swipe outs + .swipeout { + overflow: hidden; + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; + } + .swipeout.deleting { + .transition(300ms); + .swipeout-content { + .transform(translateX(-100%)); + } + } + .swipeout.transitioning { + .swipeout-content, .swipeout-actions-right a, .swipeout-actions-left a, .swipeout-overswipe { + -webkit-transition: 300ms; + transition: 300ms; + } + } + .swipeout-content { + position: relative; + z-index: 10; + } + .swipeout-overswipe { + -webkit-transition: 200ms left; + transition: 200ms left; + } + .swipeout-actions-left, .swipeout-actions-right { + position: absolute; + top: 0; + height: 100%; + .flexbox(); + a { + padding: 0 30px; + color:#fff; + background: #c7c7cc; + .flexbox(); + .align-items(center); + position: relative; + left: 0; + &:after { + content:''; + position: absolute; + top: 0; + width: 600%; + height: 100%; + background: inherit; + z-index: -1; + } + } + a.swipeout-delete { + background: @red; + } + } + .swipeout-actions-right { + right: 0%; + .transform(translateX(100%)); + a:after { + left: 100%; + margin-left: -1px; + } + } + .swipeout-actions-left { + left: 0%; + .transform(translateX(-100%)); + a:after { + right: 100%; + margin-right: -1px; + } + } + .item-subtitle { + font-size: 15px; + position: relative; + overflow: hidden; + white-space: nowrap; + max-width: 100%; + text-overflow:ellipsis; + } + .item-text { + font-size: 15px; + color: #8e8e93; + line-height: 21px; + position: relative; + overflow: hidden; + height: 42px; + text-overflow:ellipsis; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + display: -webkit-box; + } + &.media-list, li.media-item { + .item-title { + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } + } + .item-inner { + display: block; + padding-top: 10px; + padding-bottom: 9px; + .align-self(stretch); + } + .item-link .item-inner { + background: none; + padding-right: 15px; + } + .item-link .item-title-row { + padding-right: 20px; + background: no-repeat right center; + .encoded-svg-background(""); + background-size: 10px 20px; + } + .item-media { + padding-top: 9px; + padding-bottom: 10px; + img { + display: block; + } + } + .item-title-row { + .flexbox(); + .justify-content(space-between); + } + .item-content > .item-after { + margin-right: 15px; + margin-left: 15px; + } + } + .list-group { + ul { + &:after, &:before { + z-index: 25; + } + } + + .list-group ul { + .hairline-remove(top); + } + } + .item-divider, .list-group-title { + background: @dividerBg; + .hairline(top, @listBlockBorderColor); + margin-top: -1px; + padding: 4px 15px; + white-space: nowrap; + position: relative; + max-width: 100%; + text-overflow: ellipsis; + overflow: hidden; + color: @dividerColor; + z-index: 15; + } + .list-group-title { + position: relative; + position: -webkit-sticky; + position: -moz-sticky; + position: sticky; + top: 0px; + z-index: 20; + margin-top: 0; + .hairline-remove(top); + } + // Sortable + .sortable-handler { + position: absolute; + right: 0; + top: 0; + bottom: 1px; + z-index: 10; + background-repeat: no-repeat; + background-size: 18px 12px; + background-position: center; + width: 35px; + .encoded-svg-background(""); + opacity: 0; + visibility: hidden; + cursor: pointer; + .transition(300ms); + } + &.sortable { + .item-inner { + .transition(300ms); + } + } + &.sortable-opened { + .sortable-handler { + visibility: visible; + opacity: 1; + } + .item-inner, .item-link .item-inner { + padding-right: 35px; + } + .item-link .item-inner, .item-link .item-title-row { + background-image: none; + } + } + &.sortable-sorting { + li { + .transition(300ms); + } + } + li.sorting { + z-index: 50; + background: rgba(255,255,255,0.8); + box-shadow: 0px 2px 8px rgba(0,0,0,0.6); + .transition(0ms); + .item-inner { + .hairline-remove(bottom); + } + } + + // Last-childs + li { + &:last-child { + .list-button { + .hairline-remove(bottom); + } + } + &:last-child, &:last-child li:last-child { + .item-inner { + .hairline-remove(bottom); + } + } + li:last-child, &:last-child li { + .item-inner { + .hairline(bottom, @listBlockBorderColor); + } + } + } + .no-hairlines(); + .no-hairlines-between() +} diff --git a/bower_components/framework7/src/less/ios/login-screen.less b/bower_components/framework7/src/less/ios/login-screen.less new file mode 100644 index 00000000..a9a69b52 --- /dev/null +++ b/bower_components/framework7/src/less/ios/login-screen.less @@ -0,0 +1,20 @@ +/* === Login screen === */ +.login-screen-content { + background: #fff; + .login-screen-title, .list-block, .content-block, .list-block-label { + max-width: 480px; + margin: 25px auto; + } + .list-block ul { + .hairline-remove(top); + .hairline-remove(bottom); + background: none; + } + .list-block-label { + text-align: center; + } +} +.login-screen-title { + text-align: center; + font-size: 30px; +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/messagebar.less b/bower_components/framework7/src/less/ios/messagebar.less new file mode 100644 index 00000000..9aba3cc5 --- /dev/null +++ b/bower_components/framework7/src/less/ios/messagebar.less @@ -0,0 +1,53 @@ +/* === Message Bar === */ +.messagebar { + .translate3d(0,0,0); + .transition(0ms); + background: #fff; + .hairline-remove(top); + textarea { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid #c8c8cd; + background: #fff; + border-radius: 17px; + box-shadow: none; + display: block; + padding: 6px 15px; + margin: 0; + width: 100%; + height: 34px; + color: #000; + font-size: 17px; + line-height: 20px; + font-family: inherit; + resize:none; + .flex-shrink(1); + } + .link { + .align-self(flex-end); + } + .link.icon-only:first-child { + margin-left: -6px; + } + .link:not(.icon-only) + textarea { + margin-left: 8px; + } + textarea + .link { + margin-left: 8px; + } + .link { + .flex-shrink(0); + } + .page.no-toolbar & ~.page-content, .page.no-tabbar & ~.page-content { + padding-bottom: @toolbarSize; + } + .hidden-toolbar & { + .translate3d(0,0,0); + .transition(0ms); + } +} diff --git a/bower_components/framework7/src/less/ios/messages.less b/bower_components/framework7/src/less/ios/messages.less new file mode 100644 index 00000000..d5feeb5b --- /dev/null +++ b/bower_components/framework7/src/less/ios/messages.less @@ -0,0 +1,255 @@ +/* === Messages === */ +.messages-content { + background: #fff; +} +.messages { + .flexbox(); + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.messages-date { + text-align: center; + font-weight: 500; + font-size: 11px; + line-height: 1; + margin: 10px 15px; + color: #8e8e93; + html.ios-gt-8 & { + font-weight: 600; + } + span { + font-weight: 400; + } +} +.message { + box-sizing: border-box; + margin: 1px 10px 0; + max-width: 70%; + .flexbox(); + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; + &:first-child { + margin-top: 10px; + } + .message-text { + box-sizing: border-box; + border-radius: 16px; + padding: 6px 16px 9px; + min-width: 48px; + min-height: 35px; + font-size: 17px; + line-height: 1.2; + word-break: break-word; + img { + max-width: 100%; + height: auto; + } + } + &.message-pic { + .message-text { + padding: 0; + background: none; + } + img { + display: block; + border-radius: 16px; + } + } +} +.message-name { + font-size: 12px; + line-height: 1; + color: #8e8e93; + margin-bottom: 2px; + margin-top: 7px; + .message-hide-name & { + display: none; + } +} +.message-label { + font-size: 12px; + line-height: 1; + color: #8e8e93; + margin-top: 4px; + .message-hide-label & { + display: none; + } +} +.message-avatar { + width: 29px; + height: 29px; + border-radius: 100%; + margin-top: -29px; + position: relative; + top: 1px; + background-size: cover; + opacity: 1; + .transition(400ms); + .message-hide-avatar & { + opacity: 0; + } +} +.message-date { + font-size: 12px; + margin-top: 4px; + opacity: 0.8; + .message-pic img + & { + margin-top: 8px; + } + .message-sent & { + text-align: right; + } +} +.message-sent { + -ms-flex-item-align: end; + -webkit-align-self: flex-end; + align-self: flex-end; + .align-items(flex-end); + .message-name { + margin-right: 16px; + } + .message-label { + margin-right: 6px; + } + &.message-with-avatar { + .message-text { + margin-right: 29px; + } + .message-name { + margin-right: 45px; + } + .message-label { + margin-right: 34px; + } + } + .message-text { + padding-right: 22px; + background-color: #00d449; + color: white; + margin-left: auto; + -webkit-mask-box-image: url("data:image/svg+xml;charset=utf-8,") 50% 56% 46% 42%; + } + &.message-last, &.message-with-tail { + .message-text { + border-radius: 16px 16px 0 16px; + -webkit-mask-box-image: url("data:image/svg+xml;charset=utf-8,") 50% 56% 46% 42%; + } + &.message-pic img{ + border-radius: 16px 16px 0 16px; + } + } +} +.message-received { + -ms-flex-item-align: start; + -webkit-align-self: flex-start; + align-self: flex-start; + .align-items(flex-start); + .message-text { + padding-left: 22px; + background-color: #e5e5ea; + color: #000; + -webkit-mask-box-image: url("data:image/svg+xml;charset=utf-8,") 50% 42% 46% 56%; + } + .message-name { + margin-left: 16px; + } + .message-label { + margin-left: 6px; + } + &.message-with-avatar { + .message-text { + margin-left: 29px; + } + .message-name { + margin-left: 45px; + } + .message-label { + margin-left: 34px; + } + } + &.message-last, &.message-with-tail { + .message-text { + border-radius: 16px 16px 16px 0; + -webkit-mask-box-image: url("data:image/svg+xml;charset=utf-8,") 50% 42% 46% 56%; + } + &.message-pic img{ + border-radius: 16px 16px 16px 0; + } + } +} +.message-last { + margin-bottom: 8px; +} +.message-appear-from-bottom { + -webkit-animation: messageAppearFromBottom 400ms; + animation: messageAppearFromBottom 400ms; +} +.message-appear-from-top { + -webkit-animation: messageAppearFromTop 400ms; + animation: messageAppearFromTop 400ms; +} +.messages-auto-layout { + .message-name, .message-label { + display: none; + } + .message-avatar { + opacity: 0; + } + .message-first { + .message-name { + display: block; + } + } + .message-last { + .message-avatar { + opacity: 1; + } + .message-label { + display: block; + } + } +} +html.retina.ios-6 { + .message, .message.message-pic img { + -webkit-mask-box-image:none; + border-radius: 16px; + } +} +@-webkit-keyframes messageAppearFromBottom { + from { + -webkit-transform: translate3d(0,100%,0); + } + to { + -webkit-transform: translate3d(0,0,0); + } +} +@keyframes messageAppearFromBottom { + from { + transform: translate3d(0,100%,0); + } + to { + transform: translate3d(0,0,0); + } +} +@-webkit-keyframes messageAppearFromTop { + from { + -webkit-transform: translate3d(0,-100%,0); + } + to { + -webkit-transform: translate3d(0,0,0); + } +} +@keyframes messageAppearFromTop { + from { + transform: translate3d(0,-100%,0); + } + to { + transform: translate3d(0,0,0); + } +} diff --git a/bower_components/framework7/src/less/ios/modals.less b/bower_components/framework7/src/less/ios/modals.less new file mode 100644 index 00000000..c941f8a6 --- /dev/null +++ b/bower_components/framework7/src/less/ios/modals.less @@ -0,0 +1,613 @@ +/* === Modals === */ +@modalBg: rgba(255,255,255,0.95); +@modalButonColor : @themeColor; +@modalButonActiveBg: rgba(230,230,230,0.95); +@modalHairlineColor: rgba(0,0,0,0.2); +@modalDuration: 400ms; + +@actionsModalBg: rgba(255,255,255,0.95); +@actionsModalButtonActiveBg: rgba(230,230,230,0.9); +@actionsModalHairlineColor: rgba(0,0,0,0.2); +@actionsModalDuration: 300ms; + +@popoverBg: rgba(255,255,255,0.95); + +@popupDuration: 400ms; + +@actionsPopoverHairline: rgba(0,0,0,0.2); +.modal-overlay, .preloader-indicator-overlay, .popup-overlay, .picker-modal-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.4); + z-index: 13000; + visibility: hidden; + opacity: 0; + .transition(@modalDuration); + &.not-animated { + .transition(0ms); + } + &.modal-overlay-visible { + visibility: visible; + opacity: 1; + } +} +.picker-modal-overlay { + z-index: 12000; +} +.popup-overlay { + z-index: 10500; +} +.modal { + width: 270px; + position: absolute; + z-index: 13500; + left: 50%; + margin-left: -135px; + margin-top: 0; + top: 50%; + text-align: center; + border-radius: 13px; + overflow: hidden; + opacity: 0; + .transform(translate3d(0,0,0) scale(1.185)); + -webkit-transition-property: -webkit-transform, opacity; + -moz-transition-property: -moz-transform, opacity; + -ms-transition-property: -ms-transform, opacity; + -o-transition-property: -o-transform, opacity; + transition-property: transform, opacity; + color:#000; + display: none; + + &.modal-in { + opacity: 1; + .transition(@modalDuration); + .transform(translate3d(0,0,0) scale(1)); + } + &.modal-out { + opacity: 0; + z-index: 13500-1; + .transition(@modalDuration); + .transform(translate3d(0,0,0) scale(1)); + } +} +.modal-inner { + padding: 15px; + border-radius: 13px 13px 0 0; + position: relative; + background: @modalBg; + .hairline(bottom, @modalHairlineColor); + +} +.modal-title { + font-weight: 500; + font-size: 18px; + text-align: center; + html.ios-gt-8 & { + font-weight: 600; + } + +.modal-text { + margin-top: 5px; + } +} +.modal-buttons { + height: 44px; + position: relative; + .flexbox(); + .justify-content(center); + &.modal-buttons-vertical { + display: block; + height: auto; + } +} +.modal-button { + width: 100%; + padding: 0 5px; + height: 44px; + font-size: 17px; + line-height: 44px; + text-align: center; + color: @modalButonColor; + display: block; + position: relative; + white-space: nowrap; + text-overflow:ellipsis; + overflow: hidden; + cursor: pointer; + box-sizing: border-box; + -webkit-box-flex:1; + -ms-flex:1; + background: @modalBg; + .hairline(right, @modalHairlineColor); + &:first-child { + border-radius: 0 0 0 13px; + } + &:last-child { + .hairline-remove(right); + border-radius: 0 0 13px 0; + } + &:first-child:last-child { + border-radius: 0 0 13px 13px; + } + &.modal-button-bold { + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } + } + html:not(.watch-active-state) &:active, &.active-state { + background: @modalButonActiveBg; + } + .modal-buttons-vertical & { + border-radius: 0; + .hairline-remove(right); + .hairline-remove(top); + .hairline(bottom, @modalHairlineColor); + &:last-child { + border-radius: 0 0 13px 13px; + .hairline-remove(bottom); + } + } +} +.modal-no-buttons { + .modal-inner { + border-radius: 13px; + .hairline-remove(bottom); + } + .modal-buttons { + display: none; + } +} +// Action sheet +.actions-modal { + position: absolute; + left: 0; + bottom: 0; + z-index: 13500; + width: 100%; + .transform(translate3d(0,100%,0)); + max-height: 100%; + .scrollable(); + @media (min-width:496px) { + width: 480px; + left: 50%; + margin-left: -240px; + } + &.modal-in, &.modal-out { + .transition(@actionsModalDuration); + &.not-animated { + .transition(0ms); + } + } + &.modal-in { + .transform(translate3d(0,0,0)); + } + &.modal-out { + z-index: 13500-1; + .transform(translate3d(0,100%,0)); + } +} +.actions-modal-group { + margin: 8px; + position: relative; + border-radius: 13px; + overflow: hidden; + .transform(translate3d(0,0,0)); +} +.actions-modal-button, .actions-modal-label { + width: 100%; + text-align: center; + font-weight: normal; + margin: 0; + background: @actionsModalBg; + box-sizing: border-box; + display: block; + position: relative; + overflow: hidden; + .hairline(bottom, @actionsModalHairlineColor); + a { + text-decoration: none; + color: inherit; + display: block; + } + b { + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } + } + &.actions-modal-button-bold { + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } + } + &.actions-modal-button-red { + color: @red; + } + &:first-child { + border-radius: 13px 13px 0 0; + } + &:last-child { + .hairline-remove(bottom); + border-radius: 0 0 13px 13px; + } + &:first-child:last-child { + border-radius: 13px; + } + &.disabled { + opacity: 0.9; + color:@gray; + } +} +.actions-modal-button { + cursor: pointer; + height: 57px; + line-height: 57px; + font-size: 20px; + color: @themeColor; + white-space: normal; + text-overflow: ellipsis; + html:not(.watch-active-state) &:active, &.active-state { + background: @actionsModalButtonActiveBg; + } +} +.actions-modal-label { + font-size: 13px; + line-height: 1.3; + min-height: 57px; + padding: 8px 10px; + color: #8a8a8a; + .flexbox(); + .justify-content(center); + .align-items(center); +} +@media (orientation:landscape) { + .actions-modal-label { + min-height: 44px; + } + .actions-modal-button { + height: 44px; + line-height: 44px; + } +} +// Prompt +input.modal-text-input { + box-sizing: border-box; + height: 26px; + background: #fff; + margin: 0; + margin-top: 15px; + padding: 0 5px; + border: 1px solid rgba(0,0,0,0.3); + border-radius: 0; + width: 100%; + font-size: 14px; + font-family: inherit; + display: block; + box-shadow: 0 0 0 rgba(0,0,0,0); + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + + input.modal-text-input { + margin-top: 5px; + } +} +.modal-input-double { + input.modal-text-input { + } + .modal-input-double + & { + input.modal-text-input { + border-top: 0; + margin-top: 0; + } + } +} +// Popover +.popover { + width: 320px; + background:@popoverBg; + z-index: 13500; + margin: 0; + top: 0; + opacity: 0; + left: 0; + border-radius: 13px; + position: absolute; + display: none; + .transform(none); + -webkit-transition-property: opacity; + -moz-transition-property: opacity; + -ms-transition-property: opacity; + -o-transition-property: opacity; + transition-property: opacity; + &.modal-in { + .transition(@actionsModalDuration); + &.not-animated { + .transition(0ms); + } + opacity: 1; + } + .list-block { + margin: 0; + ul { + background: none; + } + &:first-child { + ul { + .hairline-remove(top); + border-radius: 13px 13px 0 0; + } + li:first-child a{ + border-radius: 13px 13px 0 0; + } + } + &:last-child { + ul { + .hairline-remove(bottom); + border-radius: 0 0 13px 13px; + } + li:last-child a{ + border-radius: 0 0 13px 13px; + } + } + &:first-child:last-child { + li:first-child:last-child a, ul:first-child:last-child { + border-radius: 13px; + } + } + + .list-block { + margin-top: 35px; + } + } +} +.popover-angle { + width: 26px; + height: 26px; + position: absolute; + left: -26px; + top: 0; + z-index: 100; + overflow: hidden; + &:after { + content:' '; + background: @popoverBg; + width: 26px; + height: 26px; + position: absolute; + left: 0; + top: 0; + border-radius: 3px; + .transform(rotate(45deg)); + } + &.on-left { + left: -26px; + &:after { + left: 19px; + top: 0; + } + } + &.on-right { + left: 100%; + &:after { + left: -19px; + top: 0; + } + } + &.on-top { + left: 0; + top: -26px; + &:after { + left: 0; + top: 19px; + } + } + &.on-bottom { + left: 0; + top: 100%; + &:after { + left: 0; + top: -19px; + } + } +} +.popover-inner { + .scrollable(); +} +.actions-popover { + .list-block + .list-block { + margin-top: 20px; + } + .list-block ul { + background: #fff; + } +} +.actions-popover-label { + padding: 8px 10px; + color:#8a8a8a; + font-size: 13px; + line-height: 1.3; + text-align: center; + position: relative; + .hairline(bottom, @actionsPopoverHairline); + &:last-child { + .hairline-remove(bottom); + } +} +// Popup +.popup, .login-screen { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 11000; + background: #fff; + box-sizing: border-box; + display: none; + .scrollable(); + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -ms-transition-property: -ms-transform; + -o-transition-property: -o-transform; + transition-property: transform; + .translate3d(0,100%,0); + &.modal-in, &.modal-out { + .transition(@popupDuration); + &.not-animated { + .transition(0ms); + } + } + &.modal-in { + .translate3d(0,0,0); + } + &.modal-out { + .translate3d(0,100%,0); + } +} +.login-screen.modal-in, .login-screen.modal-out { + display: block; +} +// iPad Popup +@media all and (min-width:630px) and (min-height:630px) { + .popup:not(.tablet-fullscreen) { + width: 630px; + height: 630px; + left: 50%; + top: 50%; + margin-left: -315px; + margin-top: -315px; + .translate3d(0,1024px,0); + &.modal-in { + .translate3d(0,0,0); + } + &.modal-out { + .translate3d(0,1024px,0); + } + } +} +html.with-statusbar-overlay { + // iPhone with statusbar overlay + @media all and (max-width:629px), (max-height:629px) { + .popup { + height: ~"-webkit-calc(100% - 20px)"; + height: ~"calc(100% - 20px)"; + top: 20px; + } + .popup-overlay { + z-index: 9500; + } + } + .login-screen, .popup.tablet-fullscreen { + height: ~"-webkit-calc(100% - 20px)"; + height: ~"calc(100% - 20px)"; + top: 20px; + } +} + +//Preloaders modals +.modal .preloader { + width: 34px; + height: 34px; +} +.preloader-indicator-overlay { + visibility: visible; + opacity: 0; + background: none; +} +.preloader-indicator-modal { + position: absolute; + left: 50%; + top: 50%; + padding: 8px; + margin-left: -25px; + margin-top: -25px; + background: rgba(0,0,0,0.8); + z-index: 13500; + border-radius: 5px; + .preloader { + display: block; + width: 34px; + height: 34px; + } +} + +// Picker Modal +.picker-modal { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 260px; + z-index: 12500; + display: none; + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -ms-transition-property: -ms-transform; + -o-transition-property: -o-transform; + transition-property: transform; + background: #cfd5da; + .translate3d(0,100%,0); + &.modal-in, &.modal-out { + .transition(400ms); + &.not-animated { + .transition(0ms); + } + } + &.modal-in { + .translate3d(0,0,0); + } + &.modal-out { + .translate3d(0,100%,0); + } + .picker-modal-inner { + height: 100%; + position: relative; + } + .toolbar { + .hairline(top, #929499); + position: relative; + width: 100%; + background: #f7f7f8; + + .picker-modal-inner { + height: ~"-webkit-calc(100% - @{toolbarSize})"; + height: ~"-moz-calc(100% - @{toolbarSize})"; + height: ~"calc(100% - @{toolbarSize})"; + } + } + &.picker-modal-inline, .popover & { + display: block; + position: relative; + background: none; + z-index: inherit; + .translate3d(0,0,0); + .toolbar { + .hairline-remove(top); + .hairline(bottom, #929499); + } + } + .popover & { + width: auto; + .toolbar { + background: none; + } + } + &.smart-select-picker { + .page { + background: #fff; + } + .toolbar { + .hairline(bottom, #c4c4c4); + } + .list-block { + margin: 0; + ul { + .hairline-remove(top); + .hairline-remove(bottom); + } + } + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/notifications.less b/bower_components/framework7/src/less/ios/notifications.less new file mode 100644 index 00000000..e3d654e4 --- /dev/null +++ b/bower_components/framework7/src/less/ios/notifications.less @@ -0,0 +1,159 @@ +/* === Notifications === */ +@notificationsDuration: 450ms; +.notifications { + position: absolute; + left: 0; + top: 0; + width: 100%; + z-index: 20000; + font-size: 14px; + margin: 0; + border: none; + display: none; + box-sizing: border-box; + max-height: 100%; + .transition(@notificationsDuration); + -webkit-perspective: 1200px; + perspective: 1200px; + padding-top: 8px; + padding-bottom: 8px; + &.list-block > ul { + .hairline-remove(top); + .hairline-remove(bottom); + background: none; + margin: 0 auto; + max-width: 568px + 16px; + } + .with-statusbar-overlay & { + padding-top: 20px; + .translate3d(0, -20px, 0); + } + .item-content { + padding-left: 8px; + .align-items(flex-start); + } + .item-title-row { + margin-bottom: 8px; + &:before { + position: absolute; + left: 0; + top: 0; + height: 36px; + border-radius: 12px 12px 0 0; + z-index: -1; + background: #fff; + content: ''; + width: 100%; + } + } + .item-title { + font-weight: 400 !important; + height: 36px; + text-transform: uppercase; + line-height: 35px; + font-size: 13px; + html.ios-gt-8 & { + font-weight: 400 !important; + } + } + .item-subtitle { + font-size: 15px; + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } + } + .item-text { + font-size: 14px; + color: inherit; + height: auto; + line-height: inherit; + } + .item-subtitle, .item-text { + &:first-child { + margin-top: 8px; + } + } + .item-content, .item-inner { + min-height: 0; + } + .item-inner { + position: static; + .hairline-remove(bottom); + } + .item-media { + width: 20px; + img { + max-width: 20px; + max-height: 20px; + } + i.icon { + width: 20px; + height: 20px; + -webkit-background-size: cover; + background-size: cover; + background-position: center; + background-repeat: no-repeat; + } + + .item-inner { + margin-left: 8px; + overflow: visible; + } + } + li.notification-item { + box-shadow: 0px 0px 10px rgba(0,0,0,0.15); + .item-inner { + padding-top: 0; + } + .item-media { + padding-top: 8px; + } + + } + .item-after { + margin-top: auto; + margin-bottom: auto; + } + .close-notification { + width: 22px; + height: 22px; + .encoded-svg-background(""); + background-position: center top; + background-repeat: no-repeat; + -webkit-background-size: 100% auto; + background-size: 100% auto; + position: relative; + opacity: 0.2; + span { + position: absolute; + width: 44px; + height: 44px; + left: 50%; + top: 50%; + margin-left: -22px; + margin-top: -22px; + } + } + .notification-item { + max-width: 568px; + margin: 0 auto 8px; + .transition(@notificationsDuration); + .translate3d(0,0,0); + opacity: 1; + background: rgba(250,250,250,0.95); + border-radius: 12px; + width: ~"-webkit-calc(100% - 16px)"; + width: ~"-moz-calc(100% - 16px)"; + width: ~"calc(100% - 16px)"; + position: absolute; + left: 8px; + top: 0; + &:last-child { + margin-bottom: 0; + } + } + .notification-hidden { + opacity: 0; + .translate3d(0,0,0); + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/pages.less b/bower_components/framework7/src/less/ios/pages.less new file mode 100644 index 00000000..99a3a3f5 --- /dev/null +++ b/bower_components/framework7/src/less/ios/pages.less @@ -0,0 +1,266 @@ +/* === Pages === */ + +// Pages animations +@pageDuration: 400ms; + +.pages { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; + background: #000; +} +.page { + box-sizing: border-box; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: #efeff4; + .translate3d(0,0,0); + &.cached { + display: none; + } +} +.page-on-left { + .translate3d(-20%); + .swipeback-page-opacity { + opacity: 1; + } + &:after { + opacity: 1; + } +} +.page-on-center { + .swipeback-page-shadow { + opacity: 1; + } + .swipeback-page-opacity { + opacity: 0 !important; + } +} +.page-on-right { + .translate3d(100%); + .swipeback-page-shadow { + opacity: 0 !important; + } +} +.page-content { + .scrollable(); + box-sizing: border-box; + height: 100%; + position: relative; + z-index: 1; +} + +// Page Shadow +.page-fake-opacity() { + position: absolute; + left: 0; + top: 0; + background: rgba(0,0,0,0.1); + width: 100%; + height: 100%; + content: ''; + opacity: 0; + z-index: 10000; + will-change: opacity; + contain: strict; +} +.page-fake-shadow() { + position: absolute; + right: 100%; + top: 0; + width: 16px; + height: 100%; + background: -webkit-linear-gradient(left, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 10%, rgba(0,0,0,0.01) 50%, rgba(0,0,0,0.2) 100%); + background: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 10%, rgba(0,0,0,0.01) 50%, rgba(0,0,0,0.2) 100%); + z-index: -1; + content: ''; + will-change: opacity; + contain: strict; + html.android & { + display: none; + .animation(none); + } +} +.swipeback-page-shadow { + .page-fake-shadow(); +} +.swipeback-page-opacity { + .page-fake-opacity(); +} + + +//Class that will trigger transition during page custom transitions (like swipe-back) +.page-transitioning { + &, .swipeback-page-shadow, .swipeback-page-opacity { + .transition(@pageDuration); + } +} +.page-from-right-to-center, .page-from-center-to-right { + &:before { + .page-fake-shadow(); + } +} +// From/to Right To/from Center animations +.page-from-right-to-center { + &:before { + .animation(pageFromRightToCenterShadow @pageDuration forwards); + } + .animation(pageFromRightToCenter @pageDuration forwards); +} +.page-from-center-to-right { + &:before { + .animation(pageFromCenterToRightShadow @pageDuration forwards); + } + .animation(pageFromCenterToRight @pageDuration forwards); +} +@-webkit-keyframes pageFromRightToCenter { + from { + -webkit-transform: translate3d(100%,0,0); + } + to { + -webkit-transform: translate3d(0,0,0); + } +} +@keyframes pageFromRightToCenter { + from { + transform: translate3d(100%,0,0); + } + to { + transform: translate3d(0,0,0); + } +} +@-webkit-keyframes pageFromRightToCenterShadow { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes pageFromRightToCenterShadow { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@-webkit-keyframes pageFromCenterToRight { + from { + -webkit-transform: translate3d(0,0,0); + } + to { + -webkit-transform: translate3d(100%,0,0); + } +} +@keyframes pageFromCenterToRight { + from { + transform: translate3d(0,0,0); + } + to { + transform: translate3d(100%,0,0); + } +} +@-webkit-keyframes pageFromCenterToRightShadow { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@keyframes pageFromCenterToRightShadow { + from { + opacity: 1; + } + to { + opacity: 0; + } +} + + +// From/to Center To/from Left animations +.page-from-center-to-left { + .animation(pageFromCenterToLeft @pageDuration forwards); + &:after { + .page-fake-opacity(); + .animation(pageFromCenterToLeftOpacity @pageDuration forwards); + } +} +.page-from-left-to-center { + .animation(pageFromLeftToCenter @pageDuration forwards); + &:after { + .page-fake-opacity(); + .animation(pageFromLeftToCenterOpacity @pageDuration forwards); + } +} + +@-webkit-keyframes pageFromCenterToLeft { + from { + -webkit-transform: translate3d(0,0,0); + } + to { + -webkit-transform: translate3d(-20%,0,0); + } +} +@keyframes pageFromCenterToLeft { + from { + transform: translate3d(0,0,0); + } + to { + transform: translate3d(-20%,0,0); + } +} +@-webkit-keyframes pageFromLeftToCenter { + from { + -webkit-transform: translate3d(-20%,0,0); + } + to { + -webkit-transform: translate3d(0,0,0); + } +} +@keyframes pageFromLeftToCenter { + from { + transform: translate3d(-20%,0,0); + } + to { + transform: translate3d(0,0,0); + } +} + +@-webkit-keyframes pageFromCenterToLeftOpacity { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes pageFromCenterToLeftOpacity { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@-webkit-keyframes pageFromLeftToCenterOpacity { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@keyframes pageFromLeftToCenterOpacity { + from { + opacity: 1; + } + to { + opacity: 0; + } +} diff --git a/bower_components/framework7/src/less/ios/panels.less b/bower_components/framework7/src/less/ios/panels.less new file mode 100644 index 00000000..e14eeb5a --- /dev/null +++ b/bower_components/framework7/src/less/ios/panels.less @@ -0,0 +1,122 @@ +/* === Panels === */ +@panelWidth:260px; +@panelsDuration: 400ms; +.panel-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(0,0,0,0); + opacity: 0; + z-index: 5999; + display: none; + .transform(translate3d(0,0,0)); + .transition(@panelsDuration); + &.not-animated { + .transition(0ms); + } +} +.panel { + z-index: 1000; + display: none; + background: #111; + box-sizing: border-box; + .scrollable(); + position: absolute; + width: @panelWidth; + top: 0; + height: 100%; + .translate3d(0); + .transition(@panelsDuration); + &.not-animated { + .transition(0ms); + } + + &.panel-left { + left: 0; + &.panel-cover { + z-index: 6000; + .translate3d(-100%); + } + } + &.panel-right { + right: 0; + &.panel-cover { + z-index: 6000; + .translate3d(100%); + } + } + &.panel-visible-by-breakpoint { + display: block; + .translate3d(0) !important; + &.panel-cover { + z-index: 5900; + } + } +} +body.with-panel-left-cover, body.with-panel-right-cover { + .views { + .translate3d(0); + } + .panel-overlay { + display: block; + opacity: 1; + } +} +body.with-panel-left-reveal, body.with-panel-right-reveal { + .views { + .transition(@panelsDuration); + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + transition-property: transform; + } + .panel.not-animated ~ .views { + .transition(0ms); + } + .panel-overlay { + background: rgba(0,0,0,0); + display: block; + opacity: 0; + } +} +body.with-panel-left-reveal { + .views { + .translate3d(@panelWidth); + } + .panel-overlay { + .translate3d(@panelWidth); + } +} +body.with-panel-left-cover { + .panel.panel-left { + .translate3d(0); + } +} +body.with-panel-right-reveal { + .views { + .translate3d(-@panelWidth); + } + .panel-overlay { + .translate3d(-@panelWidth); + } +} +body.with-panel-right-cover { + .panel.panel-right { + .translate3d(0); + } +} +body.panel-closing { + .panel-overlay { + display: block; + } + .views { + .transition(@panelsDuration); + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + transition-property: transform; + } + .panel.not-animated ~ .views { + .transition(0ms); + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/photo-browser.less b/bower_components/framework7/src/less/ios/photo-browser.less new file mode 100644 index 00000000..347df1f6 --- /dev/null +++ b/bower_components/framework7/src/less/ios/photo-browser.less @@ -0,0 +1,247 @@ +/* === Photo Browser === */ +.photo-browser { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 11500; + body > &, .framework7-root > & { + opacity: 0; + display: none; + .transform(translate3d(0,0,0)); + &.photo-browser-in { + display: block; + .animation(photoBrowserIn 400ms forwards); + } + &.photo-browser-out { + display: block; + .animation(photoBrowserOut 400ms forwards); + } + html.with-statusbar-overlay & { + height: ~"-webkit-calc(100% - 20px)"; + height: ~"calc(100% - 20px)"; + top: 20px; + } + } + .popup > &, body > &, .framework7-root > & { + .navbar, .toolbar { + .transform(translate3d(0,0,0)); + } + } + .page[data-page="photo-browser-slides"] { + background:none; + } + +} +.photo-browser-popup { + background: none; +} +.photo-browser, .views .view[data-page="photo-browser-slides"] { + .navbar, .toolbar { + background: rgba(247,247,247,0.95); + .transition(400ms); + } +} + +.view[data-page="photo-browser-slides"] .page[data-page="photo-browser-slides"]{ + .navbar, .toolbar { + .transform(translate3d(0,0,0)); + } +} +.photo-browser-exposed { + .navbar, .toolbar { + opacity: 0; + visibility: hidden; + pointer-events:none; + } + .photo-browser-swiper-container { + background: #000; + } +} +.photo-browser-of { + margin: 0 5px; +} +.photo-browser-captions { + pointer-events:none; + position: absolute; + left: 0; + width: 100%; + bottom: 0; + z-index: 10; + opacity: 1; + .transition(400ms); + &.photo-browser-captions-exposed { + opacity: 0; + } +} +.toolbar ~ .photo-browser-captions { + bottom: @toolbarSize; + .transform(translate3d(0, 0px, 0)); + .photo-browser-exposed & { + .transform(translate3d(0, @toolbarSize, 0)); + } + &.photo-browser-captions-exposed { + .transform(translate3d(0, 0px, 0)); + } +} + +.photo-browser-caption { + box-sizing: border-box; + .transition(300ms); + position:absolute; + bottom:0; + left:0; + opacity: 0; + padding:4px 5px; + width:100%; + text-align:center; + color:#fff; + background: rgba(0,0,0,0.8); + + &:empty { + display: none; + } + &.photo-browser-caption-active { + opacity: 1; + } + .photo-browser-captions-light & { + background: rgba(255,255,255,0.8); + color:#000; + } + .photo-browser-exposed & { + color:#fff; + background: rgba(0,0,0,0.8); + } +} + +.photo-browser-swiper-container { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: hidden; + background: #fff; + .transition(400ms); +} +.photo-browser-swiper-wrapper { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + padding: 0; + .flexbox(); +} +.photo-browser-link-inactive { + opacity: 0.3; +} +.photo-browser-slide { + width: 100%; + height: 100%; + position: relative; + overflow: hidden; + .flexbox(); + .justify-content(center); + .align-items(center); + .flex-shrink(0); + box-sizing: border-box; + &.transitioning { + .transition(400ms); + } + span.swiper-zoom-container { + display: none; + } + img { + width: auto; + height: auto; + max-width: 100%; + max-height: 100%; + display: none; + } + &.swiper-slide-active, &.swiper-slide-next, &.swiper-slide-prev { + span.swiper-zoom-container { + .flexbox(); + } + img { + display: inline; + } + &.photo-browser-slide-lazy { + .preloader { + display: block; + } + } + } + iframe { + width: 100%; + height: 100%; + } + .preloader { + display: none; + position: absolute; + width: 42px; + height: 42px; + margin-left: -21px; + margin-top: -21px; + left: 50%; + top: 50%; + } +} + +.photo-browser-dark { + .navbar, .toolbar { + background: rgba(30,30,30,0.8); + .hairline-remove(top); + .hairline-remove(bottom); + color:#fff; + a { + color:#fff; + } + } + .photo-browser-swiper-container { + background: #000; + } + +} + +@-webkit-keyframes photoBrowserIn { + 0% { + -webkit-transform: translate3d(0,0,0) scale(0.5); + opacity: 0; + } + 100% { + -webkit-transform: translate3d(0,0,0) scale(1); + opacity: 1; + } +} +@keyframes photoBrowserIn { + 0% { + transform: translate3d(0,0,0) scale(0.5); + opacity: 0; + } + 100% { + transform: translate3d(0,0,0) scale(1); + opacity: 1; + } +} +@-webkit-keyframes photoBrowserOut { + 0% { + -webkit-transform: translate3d(0,0,0) scale(1); + opacity: 1; + } + 100% { + -webkit-transform: translate3d(0,0,0) scale(0.5); + opacity: 0; + } +} +@keyframes photoBrowserOut { + 0% { + transform: translate3d(0,0,0) scale(1); + opacity: 1; + } + 100% { + transform: translate3d(0,0,0) scale(0.5); + opacity: 0; + } +} diff --git a/bower_components/framework7/src/less/ios/picker.less b/bower_components/framework7/src/less/ios/picker.less new file mode 100644 index 00000000..0ef58be9 --- /dev/null +++ b/bower_components/framework7/src/less/ios/picker.less @@ -0,0 +1,114 @@ +/* === Columns Picker === */ +.picker-columns { + width: 100%; + height: 260px; + z-index: 11500; + &.picker-modal-inline, .popover & { + height: 200px; + } + @media (orientation: landscape) and (max-height: 415px) { + &:not(.picker-modal-inline) { + height: 200px; + } + } +} +.popover.popover-picker-columns { + width: 280px; +} +.picker-items { + .flexbox(); + .justify-content(center); + padding: 0; + text-align: right; + font-size: 24px; + -webkit-mask-box-image: -webkit-linear-gradient(bottom, transparent, transparent 5%, white 20%, white 80%, transparent 95%, transparent); + -webkit-mask-box-image: linear-gradient(to top, transparent, transparent 5%, white 20%, white 80%, transparent 95%, transparent); +} +.picker-items-col { + overflow: hidden; + position: relative; + max-height: 100%; + + &.picker-items-col-left { + text-align: left; + } + &.picker-items-col-center { + text-align: center; + } + &.picker-items-col-right { + text-align: right; + } + &.picker-items-col-divider { + color:#000; + .flexbox(); + .align-items(center); + } +} +.picker-items-col-wrapper { + .transition(300ms); + + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; +} +.picker-item { + height: 36px; + line-height: 36px; + white-space: nowrap; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + color:#707274; + left: 0; + top: 0; + width: 100%; + box-sizing: border-box; + span { + padding: 0 10px; + } + .transition(300ms); + .picker-items-col-absolute &{ + position: absolute; + } + &.picker-item-far { + pointer-events: none; + } + &.picker-selected { + color: #000; + .transform(translate3d(0,0,0) rotateX(0deg)); + } +} +.picker-center-highlight { + height: 36px; + box-sizing: border-box; + position: absolute; + left: 0; + width: 100%; + top: 50%; + margin-top: -18px; + .hairline(top, #a8abb0); + .hairline(bottom, #a8abb0); + pointer-events: none; +} +// 3D Picker +.picker-3d { + .picker-items { + overflow: hidden; + -webkit-perspective: 1200px; + perspective: 1200px; + } + .picker-items-col, .picker-items-col-wrapper, .picker-item { + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; + } + .picker-items-col { + overflow: visible; + } + .picker-item { + -webkit-transform-origin: center center -110px; + transform-origin: center center -110px; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/preloader.less b/bower_components/framework7/src/less/ios/preloader.less new file mode 100644 index 00000000..205bc28a --- /dev/null +++ b/bower_components/framework7/src/less/ios/preloader.less @@ -0,0 +1,22 @@ +/* === Preloader === */ +.preloader { + display: inline-block; + width: 20px; + height: 20px; + .encoded-svg-background(""); + background-position: 50%; + background-size: 100%; + background-repeat: no-repeat; + -webkit-animation: preloader-spin 1s steps(12, end) infinite; + animation: preloader-spin 1s steps(12, end) infinite; +} +@-webkit-keyframes preloader-spin { + 100% { + -webkit-transform: rotate(360deg); + } +} +@keyframes preloader-spin { + 100% { + transform: rotate(360deg); + } +} diff --git a/bower_components/framework7/src/less/ios/progressbar.less b/bower_components/framework7/src/less/ios/progressbar.less new file mode 100644 index 00000000..a74da0a3 --- /dev/null +++ b/bower_components/framework7/src/less/ios/progressbar.less @@ -0,0 +1,158 @@ +/* === Progress Bar === */ +.progressbar, .progressbar-infinite { + height: 2px; + width: 100%; + overflow: hidden; + position: relative; + display: block; + background: #b6b6b6; + border-radius: 2px; + .transform-origin(center top); + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; +} +// Determined +.progressbar { + vertical-align: middle; + span { + width: 100%; + background: @themeColor; + height: 100%; + position: absolute; + left: 0; + top: 0; + .translate3d(-100%, 0, 0); + .transition(150ms); + } +} +// Infinite +.progressbar-infinite { + &:before { + content: ''; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: @themeColor; + .translate3d(0, 0, 0); + .transform-origin(left center); + .animation(progressbar-infinite 1s linear infinite); + } + html.with-statusbar-overlay body > &, html.with-statusbar-overlay .framework7-root > & { + top: 20px; + } +} +// Multicolor +.progressbar-infinite.color-multi { + background: none; + &:before { + content: ''; + position: absolute; + left: 0; + top: 0; + width: 400%; + height: 100%; + background-image: -webkit-linear-gradient(left, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55, #5856d6, #34aadc, #007aff, #5ac8fa, #4cd964); + background-image: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55, #5856d6, #34aadc, #007aff, #5ac8fa, #4cd964); + background-size: 25% 100%; + background-repeat: repeat-x; + .translate3d(0, 0, 0); + .animation(progressbar-infinite-multicolor 3s linear infinite); + } + html.with-statusbar-overlay body > & , html.with-statusbar-overlay .framework7-root > & { + top: 20px; + } +} +body, .view, .views, .page, .panel, .popup, .framework7-root { + > .progressbar, > .progressbar-infinite { + position: absolute; + left: 0; + top: 0; + z-index: 15000; + border-radius: 0; + } +} +// Animations +.progressbar-in { + .animation(progressbar-in 300ms forwards); +} +.progressbar-out { + .animation(progressbar-out 300ms forwards); +} + +html.with-statusbar-overlay .framework7-root > .progressbar, html.with-statusbar-overlay body > .progressbar { + top: 20px; +} +@-webkit-keyframes progressbar-in { + from { + opacity: 0; + -webkit-transform: scaleY(0); + } + to { + opacity: 1; + -webkit-transform: scaleY(1); + } +} +@keyframes progressbar-in { + from { + opacity: 0; + transform: scaleY(0); + } + to { + opacity: 1; + transform: scaleY(1); + } +} +@-webkit-keyframes progressbar-out { + from { + opacity: 1; + -webkit-transform: scaleY(1); + } + to { + opacity: 0; + -webkit-transform: scaleY(0); + } +} +@keyframes progressbar-out { + from { + opacity: 1; + transform: scaleY(1); + } + to { + opacity: 0; + transform: scaleY(0); + } +} +@-webkit-keyframes progressbar-infinite { + 0% { + -webkit-transform: translate3d(-50%, 0, 0) scaleX(0.5); + } + 100% { + -webkit-transform: translate3d(100%, 0, 0) scaleX(0.5); + } +} +@keyframes progressbar-infinite { + 0% { + transform: translate3d(-50%, 0, 0) scaleX(0.5); + } + 100% { + transform: translate3d(100%, 0, 0) scaleX(0.5); + } +} +@-webkit-keyframes progressbar-infinite-multicolor { + from { + -webkit-transform: translate3d(0%, 0, 0); + } + to { + -webkit-transform: translate3d(-50%, 0, 0); + } +} +@keyframes progressbar-infinite-multicolor { + from { + transform: translate3d(0%, 0, 0); + } + to { + transform: translate3d(-50%, 0, 0); + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/pull-to-refresh.less b/bower_components/framework7/src/less/ios/pull-to-refresh.less new file mode 100644 index 00000000..ab86b0b1 --- /dev/null +++ b/bower_components/framework7/src/less/ios/pull-to-refresh.less @@ -0,0 +1,71 @@ +/* === Pull To Refresh === */ +.pull-to-refresh-layer { + position:absolute; + position: relative; + margin-top: -@toolbarSize; + left:0; + top:0; + width:100%; + height:@toolbarSize; + + .preloader { + position: absolute; + left: 50%; + top: 50%; + margin-left: -10px; + margin-top: -10px; + visibility: hidden; + + } + .pull-to-refresh-arrow { + width: 13px; + height: 20px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -6px; + margin-top: -10px; + background: no-repeat center; + .encoded-svg-background(""); + background-size: 13px 20px; + z-index: 10; + .transform(rotate(0deg) translate3d(0,0,0)); + .transition(300ms); + } + +} +.pull-to-refresh-content { + &.pull-to-refresh-no-navbar { + margin-top: -@toolbarSize; + height: ~"-webkit-calc(100% + @{toolbarSize})"; + height: ~"-moz-calc(100% + @{toolbarSize})"; + height: ~"calc(100% + @{toolbarSize})"; + .pull-to-refresh-layer { + margin-top: 0; + } + } + &.transitioning, &.refreshing { + .transition(400ms); + } + &:not(.refreshing) { + .pull-to-refresh-layer .preloader { + .animation(none); + } + } + &.refreshing { + .translate3d(0,@toolbarSize,0); + .pull-to-refresh-arrow { + visibility: hidden; + .transition(0ms); + } + .preloader { + visibility: visible; + } + } + &.pull-up { + .pull-to-refresh-arrow { + .transform(rotate(180deg) translate3d(0,0,0)); + } + } + +} diff --git a/bower_components/framework7/src/less/ios/searchbar.less b/bower_components/framework7/src/less/ios/searchbar.less new file mode 100644 index 00000000..f1360c52 --- /dev/null +++ b/bower_components/framework7/src/less/ios/searchbar.less @@ -0,0 +1,124 @@ +/* === Search Bar === */ +@searchbarBg: #c9c9ce; +@searchbarBorderColor: #b4b4b4; +@searchbarSize: 44px; +.searchbar { + height: @searchbarSize; + width: 100%; + background: @searchbarBg; + box-sizing: border-box; + .hairline(bottom, @searchbarBorderColor); + padding: 0 8px; + overflow: hidden; + position: relative; + .flexbox(); + .align-items(center); + .searchbar-input { + width: 100%; + height: 28px; + position: relative; + .flex-shrink(1); + } + input[type="search"] { + .bars-input(); + padding: 0 28px; + height: 100%; + background-repeat: no-repeat; + background-position: 8px center; + .encoded-svg-background(""); + -webkit-background-size: 13px 13px; + background-size: 13px 13px; + &::-webkit-input-placeholder { + color: #939398; + opacity: 1; + } + &::-webkit-search-cancel-button { + -webkit-appearance:none; + } + } + .searchbar-clear { + position: absolute; + width: 28px; + height: 28px; + right: 0; + top: 0; + opacity: 0; + pointer-events:none; + background-position: center; + background-repeat: no-repeat; + .encoded-svg-background(""); + -webkit-background-size: 14px 14px; + background-size: 14px 14px; + .transition(300ms); + cursor: pointer; + } + .searchbar-cancel { + .transition(300ms); + .translate3d(0,0,0); + font-size: 17px; + cursor: pointer; + opacity: 0; + .flex-shrink(0); + margin-left: 0; + pointer-events:none; + display: none; + } + &.searchbar-active { + .searchbar-cancel { + margin-left: 8px; + opacity: 1; + pointer-events: auto; + html:not(.watch-active-state) &:active, &.active-state { + opacity: 0.3; + .transition(0ms); + } + } + } + &.searchbar-not-empty { + .searchbar-clear { + pointer-events: auto; + opacity: 1; + } + } +} +.searchbar-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 100; + opacity: 0; + pointer-events:none; + background: rgba(0,0,0,0.4); + .transition(300ms); + .translate3d(0,0,0); + &.searchbar-overlay-active { + opacity: 1; + pointer-events: auto; + } +} +.searchbar-not-found { + display: none; +} +.hidden-by-searchbar, .list-block .hidden-by-searchbar, .list-block li.hidden-by-searchbar { + display: none; +} +.page > .searchbar { + position: absolute; + width: 100%; + left: 0; + top: 0; + z-index: 200; + & ~ .page-content { + padding-top: @searchbarSize; + } +} +.navbar-fixed, .navbar-through { + .page > .searchbar, > .searchbar { + top: @toolbarSize; + & ~ .page-content { + padding-top: @searchbarSize + @toolbarSize; + } + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/statusbar.less b/bower_components/framework7/src/less/ios/statusbar.less new file mode 100644 index 00000000..a8e016f6 --- /dev/null +++ b/bower_components/framework7/src/less/ios/statusbar.less @@ -0,0 +1,22 @@ +/* === Statusbar overlay === */ +html.with-statusbar-overlay .framework7-root { + padding-top: 20px; + box-sizing: border-box; + .statusbar-overlay { + display: block; + } + .panel { + padding-top: 20px; + } +} +.statusbar-overlay { + background: @toolbarBg; + z-index: 10000; // A bit lower than .modals-overlay + position: absolute; + left: 0; + top: 0; + height: 20px; + width: 100%; + display: none; + .transition(@panelsDuration); +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/swiper.less b/bower_components/framework7/src/less/ios/swiper.less new file mode 100644 index 00000000..ed0d9e5d --- /dev/null +++ b/bower_components/framework7/src/less/ios/swiper.less @@ -0,0 +1,466 @@ +/* === Swiper === */ +.swiper-container { + margin-left: auto; + margin-right: auto; + position:relative; + overflow:hidden; + /* Fix of Webkit flickering */ + z-index:1; +} +.swiper-container-no-flexbox { + .swiper-slide { + float: left; + } +} +.swiper-container-vertical > .swiper-wrapper{ + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.swiper-wrapper { + position:relative; + width: 100%; + height: 100%; + z-index: 1; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + + -webkit-transition-property:-webkit-transform; + -moz-transition-property:-moz-transform; + -o-transition-property:-o-transform; + -ms-transition-property:-ms-transform; + transition-property:transform; + + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +.swiper-container-android .swiper-slide, .swiper-wrapper { + -webkit-transform:translate3d(0px,0,0); + -moz-transform:translate3d(0px,0,0); + -o-transform:translate(0px,0px); + -ms-transform:translate3d(0px,0,0); + transform:translate3d(0px,0,0); +} +.swiper-container-multirow > .swiper-wrapper { + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -ms-flex-wrap: wrap; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; +} +.swiper-container-free-mode > .swiper-wrapper { + -webkit-transition-timing-function: ease-out; + -moz-transition-timing-function: ease-out; + -ms-transition-timing-function: ease-out; + -o-transition-timing-function: ease-out; + transition-timing-function: ease-out; + margin: 0 auto; +} +.swiper-slide { + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + width: 100%; + height: 100%; + position: relative; +} +/* Auto Height */ +.swiper-container-autoheight, .swiper-container-autoheight .swiper-slide { + height: auto; +} +.swiper-container-autoheight .swiper-wrapper { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; + -webkit-transition-property: -webkit-transform, height; + -moz-transition-property: -moz-transform; + -o-transition-property: -o-transform; + -ms-transition-property: -ms-transform; + transition-property: transform, height; +} +/* a11y */ +.swiper-container .swiper-notification { + position: absolute; + left: 0; + top: 0; + pointer-events: none; + opacity: 0; + z-index: -1000; +} + +/* IE10 Windows Phone 8 Fixes */ +.swiper-wp8-horizontal { + -ms-touch-action: pan-y; + touch-action: pan-y; +} +.swiper-wp8-vertical { + -ms-touch-action: pan-x; + touch-action: pan-x; +} +/* Arrows */ +.swiper-button-prev, .swiper-button-next { + position: absolute; + top: 50%; + width: 27px; + height: 44px; + margin-top: -22px; + z-index: 10; + cursor: pointer; + -moz-background-size: 27px 44px; + -webkit-background-size: 27px 44px; + background-size: 27px 44px; + background-position: center; + background-repeat: no-repeat; + &.swiper-button-disabled { + opacity: 0.35; + cursor: auto; + pointer-events: none; + } +} +.swiper-button-prev, .swiper-container-rtl .swiper-button-next { + .encoded-svg-background(""); + left: 10px; + right: auto; +} +.swiper-button-next, .swiper-container-rtl .swiper-button-prev { + .encoded-svg-background(""); + right: 10px; + left: auto; +} + +/* Pagination Styles */ +.swiper-pagination { + position: absolute; + text-align: center; + -webkit-transition: 300ms; + -moz-transition: 300ms; + -o-transition: 300ms; + transition: 300ms; + -webkit-transform: translate3d(0,0,0); + -ms-transform: translate3d(0,0,0); + -o-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); + z-index: 10; + &.swiper-pagination-hidden { + opacity: 0; + } +} +/* Common Styles */ +.swiper-pagination-fraction, .swiper-pagination-custom, .swiper-container-horizontal > .swiper-pagination-bullets{ + bottom: 10px; + left: 0; + width: 100%; +} +/* Bullets */ +.swiper-pagination-bullet { + width: 8px; + height: 8px; + display: inline-block; + border-radius: 100%; + background: #000; + opacity: 0.2; + button& { + border: none; + margin: 0; + padding: 0; + box-shadow: none; + -moz-appearance: none; + -ms-appearance: none; + -webkit-appearance: none; + appearance: none; + } + .swiper-pagination-clickable & { + cursor: pointer; + } +} +.swiper-pagination-bullet-active { + opacity: 1; + background: #007aff; +} +.swiper-container-vertical { + > .swiper-pagination-bullets { + right: 10px; + top: 50%; + -webkit-transform:translate3d(0px,-50%,0); + -moz-transform:translate3d(0px,-50%,0); + -o-transform:translate(0px,-50%); + -ms-transform:translate3d(0px,-50%,0); + transform:translate3d(0px,-50%,0); + .swiper-pagination-bullet { + margin: 5px 0; + display: block; + } + } +} +.swiper-container-horizontal { + > .swiper-pagination-bullets { + .swiper-pagination-bullet { + margin: 0 5px; + } + } +} +/* Progress */ +.swiper-pagination-progress { + background: rgba(0,0,0,0.25); + position: absolute; + .swiper-pagination-progressbar { + background: #007aff; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + -webkit-transform: scale(0); + -ms-transform: scale(0); + -o-transform: scale(0); + transform: scale(0); + -webkit-transform-origin: left top; + -moz-transform-origin: left top; + -ms-transform-origin: left top; + -o-transform-origin: left top; + transform-origin: left top; + } + .swiper-container-rtl & .swiper-pagination-progressbar { + -webkit-transform-origin: right top; + -moz-transform-origin: right top; + -ms-transform-origin: right top; + -o-transform-origin: right top; + transform-origin: right top; + } + .swiper-container-horizontal > & { + width: 100%; + height: 4px; + left: 0; + top: 0; + } + .swiper-container-vertical > & { + width: 4px; + height: 100%; + left: 0; + top: 0; + } +} +/* 3D Container */ +.swiper-container-3d { + -webkit-perspective: 1200px; + -moz-perspective: 1200px; + -o-perspective: 1200px; + perspective: 1200px; + .swiper-wrapper, .swiper-slide, .swiper-slide-shadow-left, .swiper-slide-shadow-right, .swiper-slide-shadow-top, .swiper-slide-shadow-bottom, .swiper-cube-shadow { + .preserve3d(); + } + .swiper-slide-shadow-left, .swiper-slide-shadow-right, .swiper-slide-shadow-top, .swiper-slide-shadow-bottom { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + pointer-events: none; + z-index: 10; + } + .swiper-slide-shadow-left { + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */ + background-image: linear-gradient(to left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */ + } + .swiper-slide-shadow-right { + background-image: -webkit-gradient(linear, right top, left top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */ + background-image: linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */ + } + .swiper-slide-shadow-top { + background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */ + background-image: linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */ + } + .swiper-slide-shadow-bottom { + background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */ + background-image: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */ + } +} +/* Coverflow */ +.swiper-container-coverflow, .swiper-container-flip { + .swiper-wrapper { + /* Windows 8 IE 10 fix */ + -ms-perspective:1200px; + } +} +/* Cube + Flip */ +.swiper-container-cube, .swiper-container-flip { + overflow: visible; + .swiper-slide { + pointer-events: none; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; + z-index: 1; + .swiper-slide { + pointer-events: none; + } + } + .swiper-slide-active { + &, & .swiper-slide-active { + pointer-events: auto; + } + } + .swiper-slide-shadow-top, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left, .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; + } +} +/* Cube */ +.swiper-container-cube { + .swiper-slide { + visibility: hidden; + -webkit-transform-origin: 0 0; + -moz-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + width: 100%; + height: 100%; + } + &.swiper-container-rtl .swiper-slide{ + -webkit-transform-origin: 100% 0; + -moz-transform-origin: 100% 0; + -ms-transform-origin: 100% 0; + transform-origin: 100% 0; + } + .swiper-slide-active, .swiper-slide-next, .swiper-slide-prev, .swiper-slide-next + .swiper-slide { + pointer-events: auto; + visibility: visible; + } + .swiper-cube-shadow { + position: absolute; + left: 0; + bottom: 0px; + width: 100%; + height: 100%; + background: #000; + opacity: 0.6; + -webkit-filter: blur(50px); + filter: blur(50px); + z-index: 0; + } +} +/* Fade */ +.swiper-container-fade { + &.swiper-container-free-mode { + .swiper-slide { + -webkit-transition-timing-function: ease-out; + -moz-transition-timing-function: ease-out; + -ms-transition-timing-function: ease-out; + -o-transition-timing-function: ease-out; + transition-timing-function: ease-out; + } + } + .swiper-slide { + pointer-events: none; + -webkit-transition-property: opacity; + -moz-transition-property: opacity; + -o-transition-property: opacity; + transition-property: opacity; + .swiper-slide { + pointer-events: none; + } + } + .swiper-slide-active { + &, & .swiper-slide-active { + pointer-events: auto; + } + } +} +.swiper-zoom-container { + width: 100%; + height: 100%; + + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + + -webkit-box-pack: center; + -moz-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + + -webkit-box-align: center; + -moz-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + + text-align: center; + > img, > svg, > canvas { + max-width: 100%; + max-height: 100%; + object-fit: contain; + } +} +/* Scrollbar */ +.swiper-scrollbar { + border-radius: 10px; + position: relative; + -ms-touch-action: none; + background: rgba(0,0,0,0.1); + .swiper-container-horizontal > & { + position: absolute; + left: 1%; + bottom: 3px; + z-index: 50; + height: 5px; + width: 98%; + } + .swiper-container-vertical > & { + position: absolute; + right: 3px; + top: 1%; + z-index: 50; + width: 5px; + height: 98%; + } +} +.swiper-scrollbar-drag { + height: 100%; + width: 100%; + position: relative; + background: rgba(0,0,0,0.5); + border-radius: 10px; + left: 0; + top: 0; +} +.swiper-scrollbar-cursor-drag { + cursor: move; +} +/* Preloader */ +.swiper-slide .preloader { + width: 42px; + height: 42px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -21px; + margin-top: -21px; + z-index: 10; +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/tabs.less b/bower_components/framework7/src/less/ios/tabs.less new file mode 100644 index 00000000..edd72762 --- /dev/null +++ b/bower_components/framework7/src/less/ios/tabs.less @@ -0,0 +1,34 @@ +/* === Tabs === */ +.tabs { + .tab { + display: none; + } + .tab.active { + display: block; + } +} +.tabs-animated-wrap { + position: relative; + width: 100%; + overflow: hidden; + height: 100%; + >.tabs { + .flexbox(); + height: 100%; + .transition(300ms); + >.tab { + width: 100%; + display: block; + .flex-shrink(0); + } + } + &.not-animated > .tabs { + .transition(0ms); + } +} +.tabs-swipeable-wrap { + height: 100%; + > .tabs > .tab { + display: block; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/timeline.less b/bower_components/framework7/src/less/ios/timeline.less new file mode 100644 index 00000000..69b89833 --- /dev/null +++ b/bower_components/framework7/src/less/ios/timeline.less @@ -0,0 +1,294 @@ +/* === Timeline === */ +.timeline { + margin: 35px 0; + padding: 0 15px; + box-sizing: border-box; + .content-block-inner & { + padding: 0; + margin: 0; + } +} +.timeline-item { + .flexbox(); + .justify-content(flex-start); + position: relative; + overflow: hidden; + padding: 2px 0px 15px; + box-sizing: border-box; + position: relative; + &:last-child { + padding-bottom: 2px; + } +} +.timeline-item-date { + .flex-shrink(0); + width: 50px; + text-align: right; + box-sizing: border-box; + small { + font-size: 10px; + } +} +.timeline-item-content { + margin: 2px; + min-width: 0; + position: relative; + .flex-shrink(10); + p, ul, ol, h1, h2, h3, h4 { + &:first-child { + margin-top: 0; + } + &:last-child { + margin-bottom: 0; + } + } + .card, &.card, .list-block, &.list-block, .content-block, &.content-block { + margin: 0; + width: 100%; + } + .card, .list-block, .content-block { + + .card, + .list-block, + .content-block { + margin: 15px 0 0; + } + } +} +.timeline-item-inner { + border-radius: 7px; + padding: 8px 15px; + background: #fff; + box-sizing: border-box; + .content-block { + padding: 0; + color: inherit; + } + .content-block-inner { + .hairline-remove(top); + .hairline-remove(bottom); + padding-left: 0; + padding-right: 0; + margin: 0; + } + .list-block { + ul { + .hairline-remove(top); + .hairline-remove(bottom); + } + } + .content-block-inner & { + border-radius: 3px; + border: 1px solid rgba(0,0,0,0.1); + } + + .timeline-item-inner { + margin-top: 15px; + } +} +.timeline-item-divider { + width: 1px; + margin: 0 15px; + position: relative; + width: 10px; + height: 10px; + background: #bbb; + border-radius: 50%; + margin-top: 3px; + .flex-shrink(0); + &:after, &:before { + content: ' '; + width: 1px; + height: 100vh; + position: absolute; + left: 50%; + background: inherit; + .transform(translate3d(-50%, 0, 0)); + } + &:after { + top: 100%; + } + &:before { + bottom: 100%; + } + .timeline-item:last-child &:after { + display: none; + } + .timeline-item:first-child &:before { + display: none; + } +} +.timeline-item-time { + margin-top: 15px; + font-size: 13px; + color: #6d6d72; + &:first-child, &:last-child { + margin-top: 0; + } + .timeline-item-title + & { + margin-top: 0; + } +} +.timeline-item-title { + font-size: 17px; + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } +} +.timeline-item-subtitle { + font-size: 15px; +} +.timelineItemLeft() { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-right: ~"-moz-calc(50% - (30px + 10px) / 2 - 50px)"; + margin-right: ~"-webkit-calc(50% - (30px + 10px) / 2 - 50px)"; + margin-right: ~"calc(50% - (30px + 10px) / 2 - 50px)"; + margin-left: 0; + .timeline-item-date { + text-align: left; + } +} +.timelineItemRight() { + margin-left: ~"-moz-calc(50% - (30px + 10px) / 2 - 50px)"; + margin-left: ~"-webkit-calc(50% - (30px + 10px) / 2 - 50px)"; + margin-left: ~"calc(50% - (30px + 10px) / 2 - 50px)"; + margin-right: 0; + .timeline-item-date { + text-align: right; + } +} +.timeline-sides { + .timeline-item { + .timelineItemRight(); + &:not(.timeline-item-right):nth-child(2n) { + .timelineItemLeft(); + } + } + .timeline-item-left { + .timelineItemLeft() + } + .timeline-item-right { + .timelineItemRight(); + } +} +@media (min-width:768px) { + .tablet-sides { + .timeline-sides; + } +} + +.timeline-horizontal { + padding: 0; + margin: 0; + height: 100%; + .flexbox(); + .timeline-item { + display: block; + .hairline(right, @toolbarBorderColor); + width: 100/3vw; + margin: 0; + padding: 0; + .flex-shrink(0); + padding-top: 34px; + padding-bottom: 10px; + position: relative; + height: 100%; + } + .timeline-month:last-child .timeline-item:last-child { + .hairline-remove(right); + } + .timeline-item-date { + background: @toolbarBg; + width: auto; + text-align: left; + padding: 0px 10px; + line-height: 34px; + .hairline(bottom, @toolbarBorderColor); + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 34px; + } + .timeline-item-content { + padding: 10px; + overflow: auto; + -webkit-overflow-scrolling: touch; + margin: 0; + height: ~"-webkit-calc(100% - 10px)"; + height: ~"-moz-calc(100% - 10px)"; + height: ~"calc(100% - 10px)"; + } + .timeline-item-divider { + display: none; + } + @cols: 5, 10, 15, 20, 25, 30, 100/3, 35, 40, 45, 50, 55, 60, 65, 100*(2/3), 70, 75, 80, 85, 90, 95, 100; + .-(@i: length(@cols)) when (@i > 0) { + @divider: e(extract(@cols, @i)); + @className: `Math.floor(@{divider})`; + &.col-@{className} .timeline-item { + width: ~"@{divider}vw"; + } + .-((@i - 1)); + } .-; + @media all and (min-width:768px) { + .-(@i: length(@cols)) when (@i > 0) { + @divider: e(extract(@cols, @i)); + @className: `Math.floor(@{divider})`; + &.tablet-@{className} .timeline-item { + width: ~"@{divider}vw"; + } + .-((@i - 1)); + } .-; + } +} +@timelineMonthYearHeight: 24px; +.timeline-year, .timeline-month { + .flexbox(); + .flex-shrink(0); + padding-top: @timelineMonthYearHeight; + position: relative; + box-sizing: border-box; + height: 100%; +} +.timeline-year { + .hairline(right, @toolbarBorderColor); + &:last-child { + .hairline-remove(right); + } +} +.timeline-month{ + .timeline-item { + .hairline(top, @toolbarBorderColor); + } +} +.timeline-year-title, .timeline-month-title { + position: absolute; + left: 0; + top: 0; + width: 100%; + line-height: @timelineMonthYearHeight; + height: @timelineMonthYearHeight; + padding: 0 10px; + box-sizing: border-box; + background: @toolbarBg; + span { + display: inline-block; + position: -webkit-sticky; + position: -moz-sticky; + position: sticky; + left: 10px; + } +} +.timeline-year-title { + font-size: 16px; + span { + margin-top: 3px; + } +} +.timeline-month-title { + span { + margin-top: -2px; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/ios/toolbars-pages.less b/bower_components/framework7/src/less/ios/toolbars-pages.less new file mode 100644 index 00000000..7e54ae2b --- /dev/null +++ b/bower_components/framework7/src/less/ios/toolbars-pages.less @@ -0,0 +1,91 @@ +/* === Relation between toolbar/navbar types and pages === */ +.page, .view, .views{ + >.navbar, >.toolbar { + position: absolute; + } +} +.subnavbar ~ .page-content { + padding-top: @toolbarSize; +} +.navbar-through, .navbar-fixed { + .page-content { + padding-top: @toolbarSize; + } + .with-subnavbar .page-content, .page-content.with-subnavbar, .subnavbar ~ .page-content { + padding-top: @toolbarSize * 2; + } + .page .subnavbar, &.page .subnavbar { + top: @toolbarSize; + } +} + +.toolbar-through, .toolbar-fixed, .tabbar-through, .tabbar-fixed { + .page-content { + padding-bottom: @toolbarSize; + } +} +.tabbar-labels-fixed, .tabbar-labels-through { + .page-content { + padding-bottom: @tabbarLabelsSize; + @media all and (min-width:768px) { + padding-bottom: @tabbarLabelsSizeTablet; + } + } +} +// Page Hidden Navbar +.navbar { + &.navbar-hiding { + .transition(400ms); + .translate3d(0,0,0); + & ~ .page-content, & ~ .pages, & ~ .page { + .list-group-title { + .transition(400ms); + } + .subnavbar { + .transition(400ms); + } + } + } + &.navbar-hidden { + .transition(400ms); + .translate3d(0,-100%,0); + & ~ .page-content, & ~ .pages, & ~ .page { + .list-group-title { + .transition(400ms); + top:-@toolbarSize; + } + .subnavbar { + .translate3d(0,-100%,0); + .transition(400ms); + } + } + } + &.not-animated { + .transition(0ms); + } +} +.page.no-navbar { + .page-content { + padding-top: 0; + } + &.with-subnavbar .page-content, .with-subnavbar & .page-content, .page-content.with-subnavbar { + padding-top: @toolbarSize; + } +} +// Page Hidden Toolbar +.toolbar, .tabbar { + &.toolbar-hiding, &.tabbar-hiding { + .transition(400ms); + .translate3d(0,0,0); + } + &.toolbar-hidden, &.tabbar-hidden { + .transition(400ms); + .translate3d(0,100%,0); + } + &.not-animated { + .transition(0ms); + } +} +.page.no-toolbar .page-content, .page.no-tabbar .page-content { + padding-bottom: 0; +} diff --git a/bower_components/framework7/src/less/ios/toolbars.less b/bower_components/framework7/src/less/ios/toolbars.less new file mode 100644 index 00000000..d97e2db4 --- /dev/null +++ b/bower_components/framework7/src/less/ios/toolbars.less @@ -0,0 +1,385 @@ +/* === Toolbars === */ + +//Toolbar/Navbar +@toolbarBg : #f7f7f8; +@toolbarBgBlured: rgba(248,248,249, 0.85); +@toolbarBorderColor: #c4c4c4; +@toolbarLinksColor: @themeColor; +@toolbarSize: 44px; + +//Tab bar +@tabbarLabelsSize: 50px; +@tabbarLinksColor: #929292; +@tabbarActiveLinksColor: @themeColor; +@tabbarLabelsSizeTablet: 56px; + +// Toolbars animations +@toolbarDuration: 400ms; + +.navbar-inner, .toolbar-inner { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + padding: 0 8px; + box-sizing: border-box; + .flexbox(); + .justify-content(space-between); + .align-items(center); +} +.navbar-inner.cached { + display: none; +} +.navbar, .toolbar { + height: @toolbarSize; + width: 100%; + box-sizing: border-box; + font-size: 17px; + position: relative; + margin: 0; + z-index: 500; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + .translate3d(0,0,0); + b { + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } + } +} +.navbar, .toolbar, .subnavbar { + background: @toolbarBg; + a.link { + line-height: @toolbarSize; + height: @toolbarSize; + text-decoration: none; + position: relative; + .flexbox(); + .justify-content(flex-start); + .align-items(center); + .transition(300ms); + .transform(translateZ(0px)); + html:not(.watch-active-state) &:active, &.active-state { + opacity: 0.3; + .transition(0ms); + } + i+span, i+i, span+i, span+span { + margin-left: 7px; + } + } + a.icon-only { + min-width: @toolbarSize; + .flexbox(); + .justify-content(center); + .align-items(center); + margin: 0; + } + i.icon { + display: block; + } +} +.navbar { + left: 0; + top: 0; + .hairline(bottom, @toolbarBorderColor); + &:after { + backface-visibility: hidden; + } + &.no-border { + .hairline-remove(bottom); + } + .center { + font-size: 17px; + font-weight: 500; + html.ios-gt-8 & { + font-weight: 600; + } + text-align: center; + margin: 0; + position: relative; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; + line-height: @toolbarSize; + .flex-shrink(10); + .flexbox(); + .align-items(center); + .subtitle { + color: #6d6d72; + display: block; + line-height: 1; + bottom: 3px; + font-size: 10px; + position: absolute; + text-align: center; + width: 100%; + } + } + .left, .right { + .flex-shrink(0); + .flexbox(); + .justify-content(flex-start); + .align-items(center); + .translate3d(0,0,0); + a+a { + margin-left: 15px; + } + } + .left { + margin-right: 10px; + } + .right { + margin-left: 10px; + } + .right:first-child { + position: absolute; + right: 8px; + height: 100%; + } + .popup & { + .translate3d(0,0,0); + } +} +.subnavbar { + height: @toolbarSize; + width: 100%; + position: absolute; + left: 0; + top: 100%; + margin-top: -1px; + z-index: 20; + box-sizing: border-box; + padding: 0 8px; + .flexbox(); + .justify-content(space-between); + .align-items(center); + .hairline(bottom, @toolbarBorderColor); + &.no-border { + .hairline-remove(bottom); + } + .navbar.no-border & { + margin-top: 0; + } + .navbar-on-left &, .navbar-on-right &{ + pointer-events: none; + } + .navbar &, .page & { + position: absolute; + } + .page > & { + top: 0; + margin-top: 0; + } + > .buttons-row { + width: 100%; + } + .searchbar, &.searchbar { + position: absolute; + } + &.searchbar, .searchbar { + position: absolute; + } + .searchbar { + left: 0; + top: 0; + } +} +.toolbar { + left: 0; + bottom: 0; + .hairline(top, @toolbarBorderColor); + &.no-border { + .hairline-remove(top); + } + a { + .flex-shrink(1); + position: relative; + white-space: nowrap; + text-overflow:ellipsis; + overflow: hidden; + } +} + +// Tabbar +.tabbar { + color: @tabbarLinksColor; + z-index: 5001; + a { + color: @tabbarLinksColor; + } + a.active { + color: @tabbarActiveLinksColor; + } + a.link { + line-height: 1.4; + } + a.tab-link, a.link { + height: 100%; + width: 100%; + box-sizing: border-box; + .flexbox(); + .justify-content(center); + .align-items(center); + overflow: visible; + -webkit-box-flex: 1; + -ms-flex: 1; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; + } + i.icon { + height: 30px; + } +} +.tabbar-labels { + height: @tabbarLabelsSize; + a.tab-link, a.link { + padding-top: 4px; + padding-bottom: 4px; + height: 100%; + .justify-content(space-between); + i + span { + margin: 0; + } + } + span.tabbar-label { + line-height: 1; + display: block; + margin: 0; + letter-spacing: 0.01em; + font-size: 10px; + position: relative; + text-overflow: ellipsis; + white-space: nowrap; + } +} +.subnavbar, .navbar { + input[type="text"], input[type="password"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"] { + .bars-input(); + } +} +@media all and (min-width:768px) { + .tabbar { + .toolbar-inner { + .justify-content(center); + } + a.tab-link, a.link { + width: auto; + min-width: 105px; + } + } + .tabbar-labels { + height: @tabbarLabelsSizeTablet; + span.tabbar-label { + font-size: 14px; + } + } +} + +.navbar-from-right-to-center { + .left, .right, .center, .subnavbar, .fading { + .animation(navbarElementFadeIn @toolbarDuration forwards); + } + .sliding { + opacity: 1; + } + +} +.navbar-from-center-to-right { + .left, .right, .center, .subnavbar, .fading { + .animation(navbarElementFadeOut @toolbarDuration forwards); + } + .sliding { + opacity: 0; + } + .subnavbar.sliding { + opacity: 1; + } +} +@-webkit-keyframes navbarElementFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes navbarElementFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +.navbar-from-center-to-left { + .left, .right, .center, .subnavbar, .fading { + .animation(navbarElementFadeOut @toolbarDuration forwards); + } + .sliding { + opacity: 0; + } + .subnavbar.sliding { + opacity: 1; + } +} +.navbar-from-left-to-center { + .left, .right, .center, .subnavbar, .fading { + .animation(navbarElementFadeIn @toolbarDuration forwards); + } + .sliding { + opacity: 1; + } +} +.navbar-on-left { + .left, .right, .center, .subnavbar, .fading { + opacity: 0; + } + .sliding { + opacity: 0; + } + .subnavbar.sliding { + opacity: 1; + .translate3d(-100%,0,0); + } +} +.navbar-on-right { + .left, .right, .center, .subnavbar, .fading { + opacity: 0; + } + .sliding { + opacity: 0; + } + .subnavbar.sliding { + .translate3d(100%,0,0); + } +} +@-webkit-keyframes navbarElementFadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +@keyframes navbarElementFadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} +.navbar-from-right-to-center, .navbar-from-center-to-right, .navbar-from-center-to-left, .navbar-from-left-to-center { + .left.sliding .back.link .icon { + .transition(@toolbarDuration); + } + .sliding { + .transition(@toolbarDuration); + .animation(none); + } +} diff --git a/bower_components/framework7/src/less/ios/views.less b/bower_components/framework7/src/less/ios/views.less new file mode 100644 index 00000000..e1f6b448 --- /dev/null +++ b/bower_components/framework7/src/less/ios/views.less @@ -0,0 +1,14 @@ +/* === Views === */ +.views, .view { + position: relative; + height: 100%; + z-index: 5000; +} +.views { + .scrollable(); +} +.view { + overflow: hidden; + box-sizing: border-box; + width: 100%; +} diff --git a/bower_components/framework7/src/less/material/_colors-vars.less b/bower_components/framework7/src/less/material/_colors-vars.less new file mode 100644 index 00000000..7e1cf551 --- /dev/null +++ b/bower_components/framework7/src/less/material/_colors-vars.less @@ -0,0 +1,24 @@ +@red: #f44336; +@pink: #e91e63; +@purple: #9c27b0; +@deeppurple:#673ab7; +@indigo: #3f51b5; +@blue: #2196f3; +@lightblue: #03a9f4; +@cyan: #00bcd4; +@teal: #009688; +@green: #4caf50; +@lightgreen: #8bc34a; +@lime: #cddc39; +@yellow: #ffeb3b; +@amber: #ffc107; +@orange: #ff9800; +@deeporange: #ff5722; +@brown: #795548; +@gray: #9e9e9e; +@bluegray: #607d8b; +@white: #ffffff; +@black: #000000; + +// Theme Color +@themeColor: @blue; diff --git a/bower_components/framework7/src/less/material/_dark-colors-vars.less b/bower_components/framework7/src/less/material/_dark-colors-vars.less new file mode 100644 index 00000000..76d670e0 --- /dev/null +++ b/bower_components/framework7/src/less/material/_dark-colors-vars.less @@ -0,0 +1,22 @@ +@darkred: #B71C1C; +@darkpink: #880E4F; +@darkpurple: #4A148C; +@darkdeeppurple:#311B92; +@darkindigo: #1A237E; +@darkblue: #0D47A1; +@darklightblue: #01579B; +@darkcyan: #006064; +@darkteal: #004D40; +@darkgreen: #1B5E20; +@darklightgreen: #33691E; +@darklime: #827717; +@darkyellow: #F57F17; +@darkamber: #FF6F00; +@darkorange: #E65100; +@darkdeeporange: #BF360C; +@darkbrown: #3E2723; +@darkgray: #212121; +@darkbluegray: #263238; + +// Theme Color +@darkThemeColor: @darkblue; diff --git a/bower_components/framework7/src/less/material/_mixins.less b/bower_components/framework7/src/less/material/_mixins.less new file mode 100644 index 00000000..ab3e4bfc --- /dev/null +++ b/bower_components/framework7/src/less/material/_mixins.less @@ -0,0 +1,352 @@ +.transition(@d) { + -webkit-transition-duration: @d; + transition-duration: @d; +} +.delay(@d) { + -webkit-transition-delay: @d; + transition-delay: @d; +} +.transform(@t) { + -webkit-transform: @t; + transform: @t; +} +.transform-origin(@to) { + -webkit-transform-origin: @to; + transform-origin: @to; +} +.translate3d(@x:0, @y:0, @z:0) { + -webkit-transform: translate3d(@x,@y,@z); + transform: translate3d(@x,@y,@z); +} +.animation(@a) { + -webkit-animation: @a; + animation: @a; +} +.scrollable(){ + overflow: auto; + -webkit-overflow-scrolling: touch; +} +.flexbox() { + display: -webkit-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; +} +.flexbox-inline() { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: -webkit-inline-flex; + display: inline-flex; +} +.flex-wrap(@fw) when (@fw = nowrap) { + -webkit-box-lines: single; + -moz-box-lines: single; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: none; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; +} +.flex-wrap(@fw) when (@fw = wrap) { + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} +.flex-wrap(@fw) when not (@fw = wrap) and not (@fw = nowrap) { + -webkit-flex-wrap: @fw; + -ms-flex-wrap: @fw; + flex-wrap: @fw; +} +.flex-shrink(@fs) { + -webkit-box-flex: @fs; + -webkit-flex-shrink: @fs; + -ms-flex: 0 @fs auto; + flex-shrink: @fs; +} +.justify-content(@jc) when (@jc = flex-start) { + -webkit-box-pack: start; + -ms-flex-pack: start; + -webkit-justify-content: flex-start; + justify-content: flex-start; +} +.justify-content(@jc) when (@jc = flex-end) { + -webkit-box-pack: end; + -ms-flex-pack: end; + -webkit-justify-content: flex-end; + justify-content: flex-end; +} +.justify-content(@jc) when (@jc = space-between) { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + -webkit-justify-content: space-between; + justify-content: space-between; +} +.justify-content(@jc) when not (@jc = flex-start) and not (@jc = flex-end) and not (@jc = space-between) { + -webkit-box-pack: @jc; + -ms-flex-pack: @jc; + -webkit-justify-content: @jc; + justify-content: @jc; +} +.align-items(@ai) when (@ai = flex-start) { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; +} +.align-items(@ai) when (@ai = flex-end) { + -webkit-box-align: end; + -ms-flex-align: end; + -webkit-align-items: flex-end; + align-items: flex-end; +} +.align-items(@ai) when not (@ai = flex-start) and not (@ai = flex-end) { + -webkit-box-align: @ai; + -ms-flex-align: @ai; + -webkit-align-items: @ai; + align-items: @ai; +} +.align-content(@ai) { + -ms-flex-line-pack: @ai; + -webkit-align-content: @ai; + align-content: @ai; +} +.align-self(@as) { + -ms-flex-item-align: @as; + -webkit-align-self: @as; + align-self: @as; +} +.clearfix() { + &:before, + &:after { + content: " "; + display: table; + } + &:after { + clear: both; + } +} +.hairline(@position, @color) when (@position = top) { + &:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + height: 1px; + width: 100%; + background-color: @color; + display: block; + z-index: 15; + .transform-origin(50% 0%); + html.pixel-ratio-2 &{ + .transform(scaleY(0.5)); + } + html.pixel-ratio-3 &{ + .transform(scaleY(0.33)); + } + } +} +.hairline(@position, @color) when (@position = left) { + &:before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: auto; + right: auto; + width: 1px; + height: 100%; + background-color: @color; + display: block; + z-index: 15; + .transform-origin(0% 50%); + html.pixel-ratio-2 &{ + .transform(scaleX(0.5)); + } + html.pixel-ratio-3 &{ + .transform(scaleX(0.33)); + } + } +} +.hairline(@position, @color) when (@position = bottom) { + &:after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: auto; + top: auto; + height: 1px; + width: 100%; + background-color: @color; + display: block; + z-index: 15; + .transform-origin(50% 100%); + html.pixel-ratio-2 &{ + .transform(scaleY(0.5)); + } + html.pixel-ratio-3 &{ + .transform(scaleY(0.33)); + } + } +} +.hairline(@position, @color) when (@position = right) { + &:after { + content: ''; + position: absolute; + right: 0; + top: 0; + left: auto; + bottom: auto; + width: 1px; + height: 100%; + background-color: @color; + display: block; + z-index: 15; + .transform-origin(100% 50%); + html.pixel-ratio-2 &{ + .transform(scaleX(0.5)); + } + html.pixel-ratio-3 &{ + .transform(scaleX(0.33)); + } + } +} +// For right and bottom +.hairline-remove(@position) when not (@position = left) and not (@position = top) { + &:after { + display: none; + } +} +// For left and top +.hairline-remove(@position) when not (@position = right) and not (@position = bottom) { + &:before { + display: none; + } +} +// For right and bottom +.hairline-color(@position, @color) when not (@position = left) and not (@position = top) { + &:after { + background-color: @color; + } +} +// For left and top +.hairline-color(@position, @color) when not (@position = right) and not (@position = bottom) { + &:before { + background-color: @color; + } +} + +// Encoded SVG Background +.encoded-svg-background(@svg) { + @url: `encodeURIComponent(@{svg})`; + background-image: url("data:image/svg+xml;charset=utf-8,@{url}"); +} + +// Preserve3D +.preserve3d() { + -webkit-transform-style: preserve-3d; + -moz-transform-style: preserve-3d; + -ms-transform-style: preserve-3d; + transform-style: preserve-3d; +} + +// Shadow +.depth(@level:1) { + & when (@level = 1) { + box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); + } + & when (@level = 2) { + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); + } + & when (@level = 3) { + box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); + } + & when (@level = 4) { + box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); + } + & when (@level = 5) { + box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); + } +} + +// Highlighted Links +.active-highlight(@color:rgba(255,255,255,0.15)) { + &:before { + content: ''; + width: 152%; + height: 152%; + position: absolute; + left: -26%; + top: -26%; + background-image: -webkit-radial-gradient(center, circle cover, @color 66%, rgba(red(@color),green(@color),blue(@color),0) 66%); + background-image: radial-gradient(circle at center, @color 66%, rgba(red(@color),green(@color),blue(@color),0) 66%); + background-repeat: no-repeat; + background-position: center; + background-size: 100% 100%; + opacity: 0; + pointer-events: none; + .transition(600ms); + } + html:not(.watch-active-state) &:active:before, &.active-state:before { + opacity: 1; + .transition(150ms); + } +} +.active-highlight-color(@color) { + &:before { + background-image: -webkit-radial-gradient(center, circle cover, @color 66%, rgba(red(@color),green(@color),blue(@color),0) 66%); + background-image: radial-gradient(circle at center, @color 66%, rgba(red(@color),green(@color),blue(@color),0) 66%); + } +} + +// No Scrollbar +.no-scrollbar() { + &::-webkit-scrollbar { + display: none !important; + width: 0 !important; + height: 0 !important; + -webkit-appearance: none; + opacity: 0 !important; + } +} + +// Bars Input +.bars-input() { + box-sizing: border-box; + width: 100%; + height: 32px; + display: block; + border: none; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border-radius: 0; + font-family: inherit; + color: #fff; + font-size: 16px; + font-weight: 400; + background-color: transparent; + padding: 0; + border-bottom: 1px solid #fff; + &::-webkit-input-placeholder { + color: rgba(255,255,255,1); + opacity: 1; + } +} +.no-hairlines() { + &.no-hairlines, &.no-hairlines ul, &.no-hairlines .content-block-inner { + .hairline-remove(top); + .hairline-remove(bottom); + } +} +.no-hairlines-between() { + &.no-hairlines-between { + .item-inner, .list-button, .item-divider, .list-group-title, .list-group-title { + .hairline-remove(bottom); + } + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/accordion.less b/bower_components/framework7/src/less/material/accordion.less new file mode 100644 index 00000000..6d9f0147 --- /dev/null +++ b/bower_components/framework7/src/less/material/accordion.less @@ -0,0 +1,70 @@ +/* === Accordion === */ +.list-block { + .accordion-item-toggle { + cursor: pointer; + .transition(300ms); + .item-inner { + padding-right: 42px; + background: no-repeat -webkit-calc(~"100% - 15px") center; + background: no-repeat calc(~"100% - 15px") center; + .encoded-svg-background(""); + background-size: 10px 20px; + + } + html:not(.watch-active-state) &:active, &.active-state { + .transition(0ms); + background-color: #d9d9d9; + > .item-inner { + .hairline-color(bottom, transparent); + } + } + } + .accordion-item-toggle, .accordion-item > .item-link { + .item-inner { + .transition(300ms); + &:after { + .transition(300ms); + } + -webkit-transition-property: background-color; + transition-property: background-color; + } + } + &:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner, + &:not(.media-list) .accordion-item-expanded:not(.media-item) > .item-link .item-inner, + &.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row, + &.media-list .accordion-item-expanded > .item-link .item-title-row, + .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row, + .accordion-item-expanded.media-item > .item-link .item-title-row, + { + .encoded-svg-background(""); + background-size: 20px 20px; + } + .accordion-item-expanded { + .accordion-item-toggle .item-inner, > .item-link .item-inner { + .hairline-color(bottom, transparent); + } + } + .accordion-item { + .content-block, .list-block { + margin-top: 0; + margin-bottom: 0; + } + ul { + padding-left: 0; + } + } +} +.accordion-item-content { + position: relative; + overflow: hidden; + height: 0; + font-size: 14px; + .transition(300ms); + .transform(translate3d(0,0,0)); + .accordion-item-expanded > &{ + height: auto; + } + html.android-4 & { + .transform(none); + } +} diff --git a/bower_components/framework7/src/less/material/autocomplete.less b/bower_components/framework7/src/less/material/autocomplete.less new file mode 100644 index 00000000..26187f05 --- /dev/null +++ b/bower_components/framework7/src/less/material/autocomplete.less @@ -0,0 +1,70 @@ +/* === Autocomplete === */ +.autocomplete-page { + .autocomplete-found { + display: block; + } + .autocomplete-not-found { + display: none; + } + .autocomplete-values { + display: block; + } + .list-block ul:empty { + display: none; + } + .navbar .autocomplete-preloader{ + margin-right: 16px; + } +} +.autocomplete-preloader:not(.autocomplete-preloader-visible) { + -webkit-animation: none; + animation: none; + visibility: hidden; +} +.autocomplete-dropdown { + background: #fff; + box-sizing: border-box; + position: absolute; + z-index: 500; + box-shadow: 0 2px 2px rgba(0,0,0,0.25); + width: 100%; + left: 0; + .autocomplete-dropdown-inner { + position: relative; + overflow: auto; + -webkit-overflow-scrolling: touch; + height: 100%; + z-index: 1; + } + .autocomplete-preloader { + display: none; + position: absolute; + right: 16px; + bottom: 100%; + margin-bottom: 8px; + width: 20px; + height: 20px; + .preloader-inner-gap, .preloader-inner-half-circle { + border-width: 3px; + } + } + .autocomplete-preloader-visible { + display: block; + } + .autocomplete-dropdown-placeholder { + color: #a9a9a9; + } + .list-block { + margin: 0; + color: rgba(0,0,0,0.54); + ul { + .hairline-remove(top); + .hairline-remove(bottom); + background: none !important; + } + b { + font-weight: normal; + color: #212121; + } + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/badges.less b/bower_components/framework7/src/less/material/badges.less new file mode 100644 index 00000000..87ae42a8 --- /dev/null +++ b/bower_components/framework7/src/less/material/badges.less @@ -0,0 +1,20 @@ +.badge { + font-size: 10px; + display: inline-block; + color:#fff; + background: #8e8e93; + border-radius: 3px; + padding: 1px 6px; + box-sizing: border-box; + vertical-align: middle; + .icon &, .f7-icons &, .material-icons &, .framework7-icons & { + position: absolute; + left: 100%; + margin-left: -10px; + top: -2px; + font-size: 10px; + line-height: 1.4; + padding: 1px 5px; + font-family: Roboto, Noto, Helvetica, Arial, sans-serif; + } +} diff --git a/bower_components/framework7/src/less/material/calendar.less b/bower_components/framework7/src/less/material/calendar.less new file mode 100644 index 00000000..8fd394d4 --- /dev/null +++ b/bower_components/framework7/src/less/material/calendar.less @@ -0,0 +1,197 @@ +/* === Calendar === */ +.picker-calendar { + background: #fff; + height: 420px; + overflow: hidden; + bottom: auto; + width: 90%; + left: 50%; + top: 50%; + min-width: 300px; + max-width: 380px; + .translate3d(-50%,100%,0); + .depth(5); + @media (orientation: landscape) and (max-height: 460px) { + &:not(.picker-modal-inline) { + height: ~"-webkit-calc(100% - 40px)"; + height: ~"calc(100% - 40px)"; + } + } + .popover-picker-calendar & { + height: 420px; + } + .picker-modal-inner { + overflow: hidden; + } + &.modal-in { + .translate3d(-50%,-50%,0); + } + &.modal-out { + .translate3d(-50%,100%,0); + } + &.picker-modal-inline { + height: 300px; + } + &.picker-modal-inline, .popover-picker-calendar & { + .translate3d(0%,0%,0); + width: auto; + max-width: none; + left: 0; + top: 0; + box-shadow: none; + } + &.picker-modal { + z-index: 12500; + } + +} +.popover.popover-picker-calendar { + width: 320px; +} +.picker-calendar-selected-date { + line-height: 48px; + color:#fff; + padding: 0 24px; + font-size: 20px; + position: relative; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} +.picker-calendar-week-days { + height: 100% / 7; + .flexbox(); + font-size: 12px; + box-sizing: border-box; + position: relative; + color: rgba(0,0,0,0.54); + .picker-calendar-week-day { + .flex-shrink(1); + width: 100% / 7; + width: ~"-webkit-calc(100% / 7)"; + width: ~"-moz-calc(100% / 7)"; + width: ~"calc(100% / 7)"; + text-align: center; + .flexbox(); + .justify-content(center); + .align-items(center); + } + + .picker-calendar-months { + height: ~"-webkit-calc(100% - 100% / 7)"; + height: ~"-moz-calc(100% - 100% / 7)"; + height: ~"calc(100% - 100% / 7)"; + } +} +.picker-calendar-months { + width: 100%; + height: 100%; + overflow: hidden; + position: relative; +} +.picker-calendar-months-wrapper { + position: relative; + width: 100%; + height: 100%; + .transition(300ms); +} +.picker-calendar-month { + .flexbox(); + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; +} +.picker-calendar-row { + height: 100% / 6; + height: ~"-webkit-calc(100% / 6)"; + height: ~"-moz-calc(100% / 6)"; + height: ~"calc(100% / 6)"; + .flexbox(); + .flex-shrink(1); + width: 100%; + position: relative; +} +.picker-calendar-day { + .flex-shrink(1); + .flexbox(); + .justify-content(center); + .align-items(center); + box-sizing: border-box; + width: 100% / 7; + width: ~"-webkit-calc(100% / 7)"; + width: ~"-moz-calc(100% / 7)"; + width: ~"calc(100% / 7)"; + text-align: center; + font-size: 12px; + cursor: pointer; + &.picker-calendar-day-weekend { + } + &.picker-calendar-day-prev, &.picker-calendar-day-next { + color: #b8b8b8; + } + .picker-calendar-month-prev &, .picker-calendar-month-next & { + + } + &.picker-calendar-day-disabled { + color: #d4d4d4; + cursor: auto; + } + &.picker-calendar-day-today span { + color:@themeColor; + } + &.picker-calendar-day-selected span { + background: @themeColor; + color:#fff; + } + .picker-calendar-range &.picker-calendar-day-selected span { + border-radius: 0; + width: 100%; + } + &.picker-calendar-day-has-events span { + &:after { + content: ''; + width: 4px; + height: 4px; + border-radius: 50%; + background: @themeColor; + position: absolute; + margin-left: -2px; + left: 50%; + bottom: 2px; + } + } + &.picker-calendar-day-has-events.picker-calendar-day-selected span:after { + display: none; + } + span { + display: inline-block; + border-radius: 100%; + width: 36px; + height: 36px; + line-height: 36px; + position: relative; + + } +} +.picker-calendar-month-picker, .picker-calendar-year-picker { + .flexbox(); + .align-items(center); + .justify-content(space-between); + width: 50%; + max-width: 200px; + .flex-shrink(10); + span { + .flex-shrink(1); + position: relative; + overflow: hidden; + text-overflow: ellipsis; + width: 100%; + text-align: center; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/cards.less b/bower_components/framework7/src/less/material/cards.less new file mode 100644 index 00000000..abdce584 --- /dev/null +++ b/bower_components/framework7/src/less/material/cards.less @@ -0,0 +1,94 @@ +/* === Cards === */ +.cards-list, .card .list-block { + ul { + background: none; + } + > ul { + .hairline-remove(top); + .hairline-remove(bottom); + } +} +.card { + background: #fff; + margin: 8px; + position: relative; + border-radius: 2px; + font-size: 14px; + .depth(1); + .list-block, .content-block { + margin: 0; + } + .row:not(.no-gutter) .col > & { + margin-left: 0; + margin-right: 0; + } +} +.page-content > .card:last-child { + margin-bottom: 32px; +} +.card-content { + position: relative; +} +.card-content-inner { + padding: 16px; + position: relative; + > p:first-child { + margin-top: 0; + } + > p:last-child { + margin-bottom: 0; + } + > .list-block, >.content-block { + margin: -15px; + } +} +.card-header, .card-footer { + min-height: 48px; + position: relative; + padding: 4px 16px; + box-sizing: border-box; + .flexbox(); + .justify-content(space-between); + .align-items(center); + &[valign="top"] { + .align-items(flex-start); + } + &[valign="bottom"] { + .align-items(flex-end); + } + a.link { + position: relative; + .button; + i+span, i+i, span+i, span+span { + margin-left: 7px; + } + i.icon { + display: block; + } + } + a.icon-only { + min-width: 48px; + .flexbox(); + .justify-content(center); + .align-items(center); + margin: 0; + } +} +.card-header { + border-radius: 2px 2px 0 0; + font-size: 16px; + .hairline(bottom, #e1e1e1); + &.no-border { + .hairline-remove(bottom); + } +} +.card-footer { + border-radius: 0 0 2px 2px; + // color:#6d6d72; + color: #757575; + .hairline(top, #e1e1e1); + &.no-border { + .hairline-remove(top); + } + +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/chips.less b/bower_components/framework7/src/less/material/chips.less new file mode 100644 index 00000000..3e3e12b1 --- /dev/null +++ b/bower_components/framework7/src/less/material/chips.less @@ -0,0 +1,71 @@ +/* === Chips === */ +.chip { + font-size: 13px; + font-weight: normal; + color: rgba(0,0,0,0.87); + background: rgba(0,0,0,0.12); + display: inline-block; + height: 32px; + line-height: 32px; + border-radius: 16px; + padding: 0 12px; + box-sizing: border-box; + vertical-align: middle; + .flexbox-inline(); + .align-items(center); + margin: 2px 0; +} +.chip-media { + width: 32px; + height: 32px; + margin-left: -12px; + vertical-align: top; + border-radius: 50%; + text-align: center; + line-height: 32px; + color: #fff; + .flex-shrink(0); + font-size: 16px; + .flexbox(); + .align-items(center); + .justify-content(center); + img { + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; + border-radius: 50%; + display: block; + } + + .chip-label { + margin-left: 8px; + } +} +.chip-label { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + position: relative; + .flex-shrink(1); + min-width: 0; + + .chip-delete { + margin-left: 4px; + } +} +.chip-delete { + margin-right: -8px; + width: 24px; + height: 24px; + text-align: center; + line-height: 24px; + cursor: pointer; + .flex-shrink(0); + .encoded-svg-background(""); + background-repeat: no-repeat; + background-position: center; + background-size: 20px 20px; + opacity: 0.54; + html:not(.watch-active-state) &:active, &.active-state { + opacity: 1; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/contacts.less b/bower_components/framework7/src/less/material/contacts.less new file mode 100644 index 00000000..bea763ec --- /dev/null +++ b/bower_components/framework7/src/less/material/contacts.less @@ -0,0 +1,30 @@ +/* === Contacts === */ +.contacts-block { + margin: 0; + .list-group-title { + padding: 0 16px; + pointer-events: none; + background: none; + color:#888888; + font-weight: 500; + line-height: 48px; + height: 48px; + font-size: 20px; + font-weight: 500; + overflow: visible; + width: 56px; + top: 0; + + li { + margin-top: -48px; + } + } + .list-group:first-child ul { + .hairline-remove(top); + } + .list-group:last-child ul { + .hairline-remove(bottom); + } + li:not(.list-group-title) { + padding-left: 40px + 16px; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/content-block.less b/bower_components/framework7/src/less/material/content-block.less new file mode 100644 index 00000000..ea46cf36 --- /dev/null +++ b/bower_components/framework7/src/less/material/content-block.less @@ -0,0 +1,63 @@ +/* === Content Block === */ +@contentBlockBorderColor: rgba(0,0,0,0.12); +.content-block { + margin: 32px 0; + padding: 0 16px; + box-sizing: border-box; + .no-hairlines(); +} +.content-block-title { + position: relative; + overflow: hidden; + margin: 0; + white-space: nowrap; + text-overflow: ellipsis; + font-size: 14px; + line-height: 1; + margin: 16px 16px 16px; + padding-top: 16px; + line-height: 16px; + font-weight: 500; + color: rgba(0,0,0,0.54); + + .list-block, + .content-block, +.card, +.timeline { + margin-top: 0px; + } + +} +.content-block-inner { + padding: 16px 16px; + margin-left: -16px; + width: 100%; + position: relative; + .hairline(top, @contentBlockBorderColor); + .hairline(bottom, @contentBlockBorderColor); + >p:first-child { + margin-top: 0; + } + >p:last-child { + margin-bottom: 0; + } +} +.content-block.inset { + margin-left: 16px; + margin-right: 16px; + border-radius: 7px; + .content-block-inner { + .hairline-remove(top); + .hairline-remove(bottom); + border-radius: 4px; + } +} +@media all and (min-width:768px) { + .content-block.tablet-inset { + margin-left: 16px; + margin-right: 16px; + border-radius: 4px + } + + .content-block.tablet-inset .content-block-inner { + .hairline-remove(top); + .hairline-remove(bottom); + border-radius: 4px; + } +} diff --git a/bower_components/framework7/src/less/material/data-table.less b/bower_components/framework7/src/less/material/data-table.less new file mode 100644 index 00000000..81a34ac7 --- /dev/null +++ b/bower_components/framework7/src/less/material/data-table.less @@ -0,0 +1,301 @@ +.data-table { + overflow-x: auto; + table { + width: 100%; + border: none; + padding: 0; + margin: 0; + border-collapse: collapse; + text-align: left; + } + thead { + font-size: 12px; + th, td { + font-weight: 500; + height: 56px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + line-height: 16px; + &:not(.sortable-active) { + color: rgba(0,0,0,0.54); + } + + } + i.icon, i.material-icons { + font-size: 16px; + width: 16px; + height: 16px; + vertical-align: top; + } + } + tbody { + font-size: 13px; + tr.data-table-row-selected { + background: #f5f5f5; + } + td { + height: 48px; + .hairline(top, rgba(0,0,0,0.12)); + } + } + html:not(.ios):not(.android) & { + tbody tr:hover { + background: #f5f5f5; + } + } + th, td { + padding: 0; + position: relative; + padding-left: 28px; + padding-right: 28px; + &.label-cell { + padding-left: 24px; + padding-right: 24px; + } + &:first-child { + padding-left: 24px; + } + &:last-child { + padding-right: 24px; + } + &.numeric-cell { + text-align: right; + } + &.checkbox-cell { + padding-left: 24px; + padding-right: 12px; + width: 18px; + overflow: visible; + & + td, & + th { + padding-left: 12px; + } + } + &.actions-cell { + text-align: right; + white-space: nowrap; + a.link { + color: rgba(0,0,0,0.54); + position: relative; + z-index: 1; + cursor: pointer; + + a.link { + margin-left: 24px; + } + } + a.icon-only { + width: 24px; + height: 24px; + display: inline-block; + vertical-align: middle; + font-size: 18px; + line-height: 24px; + text-align: center; + font-size: 0; + i { + font-size: 18px; + vertical-align: middle; + } + } + } + } + // Sortable + .sortable-cell { + cursor: pointer; + position: relative; + } + .sortable-cell:not(.numeric-cell):after, .sortable-cell.numeric-cell:before { + content: ''; + display: inline-block; + vertical-align: top; + width: 16px; + height: 16px; + .encoded-svg-background(""); + background-size: 100% auto; + background-position: center; + background-repeat: no-repeat; + font-size: 0; + .transition(300ms); + .transform(rotate(0)); + opacity: 0; + } + html:not(.ios):not(.android) & { + .sortable-cell:not(.sortable-active):hover { + &:after, &:before { + opacity: 0.54; + } + } + } + .sortable-cell.sortable-active { + &:after, &:before { + opacity: 0.87; + } + } + .sortable-cell.sortable-asc { + + } + .sortable-cell.sortable-desc { + &:after, &:before { + .transform(rotate(180deg)); + } + } + .sortable-cell:not(.numeric-cell):after { + margin-left: 8px; + } + .sortable-cell.numeric-cell:before { + margin-right: 8px; + } + // Cards + &.card, .card & { + .card-header, .card-footer { + padding-left: 24px; + padding-right: 14px; + } + .card-header { + height: 64px; + } + .card-footer { + height: 56px; + } + .card-content { + overflow-x: auto; + } + } + .data-table-title { + font-size: 20px; + } + .data-table-links, .data-table-actions { + .flexbox(); + .justify-content(space-between); + a.link { + cursor: pointer; + } + a.link + a.link { + margin-left: 24px; + } + } + .data-table-actions { + margin-left: auto; + .align-items(center); + a.link { + cursor: pointer; + min-width: 0; + color: rgba(0,0,0,0.54); + } + a.link.icon-only { + width: 24px; + height: 24px; + line-height: 1; + overflow: visible; + &.active-state, html:not(.watch-active-state) &:active { + background: none; + } + } + } + .data-table-header, .data-table-header-selected { + .flexbox(); + .justify-content(space-between); + .align-items(center); + width: 100%; + } + .card-header { + > .data-table-header, > .data-table-header-selected { + padding-left: 24px; + padding-right: 14px; + margin-left: -24px; + margin-right: -14px; + height: 100%; + padding-top: 4px; + padding-bottom: 4px; + } + } + .data-table-header-selected { + display: none; + background: rgba(red(@themeColor), green(@themeColor), blue(@themeColor), 0.1); + } + &.data-table-has-checked { + .data-table-header { + display: none; + } + .data-table-header-selected { + .flexbox(); + } + } + .data-table-title-selected { + color: @themeColor; + font-size: 14px; + } + + // Collapsible + @media (max-width:480px) and (orientation:portrait) { + &.data-table-collapsible { + thead { + display: none; + } + tbody, tr, td { + display: block; + } + tr { + position: relative; + .hairline(top, rgba(0,0,0,0.12)); + } + tr:hover { + background-color: inherit; + } + td { + text-align: left; + padding-left: 16px; + padding-right: 16px; + .hairline-remove(top); + .flexbox(); + .align-content(center); + .align-items(center); + .justify-content(flex-start); + } + td:not(.checkbox-cell) { + font-size: 16px; + &:before { + width: 40%; + display: block; + content: attr(data-collapsible-title); + position: relative; + height: auto; + background: none; + .transform(none) !important; + color: rgba(0,0,0,0.54); + font-weight: 500; + font-size: 12px; + margin-right: 16px; + line-height: 16px; + .flex-shrink(0); + } + } + td.checkbox-cell { + position: absolute; + left: 0; + top: 0; + + td { + padding-left: 16px; + } + ~ td { + margin-left: 16px + 16px; + } + } + } + + } + // Responsive queries + .tablet-only, .tablet-landscape-only { + display: none; + } + @media (min-width: 768px) { + .tablet-only { + display: table-cell; + } + } + @media (min-width: 768px) and (orientation:landscape) { + .tablet-landscape-only { + display: table-cell; + } + } +} diff --git a/bower_components/framework7/src/less/material/disabled.less b/bower_components/framework7/src/less/material/disabled.less new file mode 100644 index 00000000..f480f6a6 --- /dev/null +++ b/bower_components/framework7/src/less/material/disabled.less @@ -0,0 +1,8 @@ +/* === Disabled elements === */ +.disabled, [disabled] { + opacity: 0.55; + pointer-events: none; + .disabled &, [disabled] & { + opacity: 1; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/floating-button.less b/bower_components/framework7/src/less/material/floating-button.less new file mode 100644 index 00000000..9d3d0c1d --- /dev/null +++ b/bower_components/framework7/src/less/material/floating-button.less @@ -0,0 +1,153 @@ +/* === Floating Action Button === */ +.floating-button { + position: absolute; + right: 16px; + bottom: 16px; + width: 56px; + height: 56px; + border-radius: 50%; + z-index: 1500; + .depth(3); + background-color: @themeColor; + color:#fff; + overflow: hidden; + .transition(300ms); + .flexbox(); + .align-items(center); + .justify-content(center); + html:not(.watch-active-state) &:active, &.active-state { + background: darken(@themeColor, 8%); + } +} +.floating-button-toolbar, .speed-dial { + position: absolute; + right: 16px; + bottom: 16px; + z-index: 1500; + .floating-button { + right: 0; + bottom: 0; + position: relative; + } +} +// Speed Dial +.speed-dial { + .floating-button { + i { + position: absolute; + left: 50%; + top: 50%; + .transform(translate3d(-50%, -50%, 0) rotate(0deg) scale(1)); + .transition(300ms); + } + i + i { + .transform(translate3d(-50%, -50%, 0) rotate(-90deg) scale(0.5)); + opacity: 0; + } + } + &.speed-dial-opened { + .floating-button { + i { + .transform(translate3d(-50%, -50%, 0) rotate(90deg) scale(0.5)); + opacity: 0; + } + i + i { + .transform(translate3d(-50%, -50%, 0) rotate(0deg) scale(1)); + opacity: 1; + } + } + } +} +.speed-dial-buttons { + position: absolute; + width: 40px; + left: 50%; + margin-left: -20px; + bottom: 100%; + margin-bottom: 16px; + .flexbox(); + -webkit-box-orient: vertical; + -webkit-box-direction: reverse; + -moz-box-orient: vertical; + -moz-box-direction: reverse; + -ms-flex-direction: column-reverse; + -webkit-flex-direction: column-reverse; + flex-direction: column-reverse; + visibility: hidden; + pointer-events: none; + a { + width: 40px; + height: 40px; + opacity: 0; + color: #fff; + border-radius: 50%; + position: relative; + z-index: 1; + overflow: hidden; + background-color: @themeColor; + html:not(.watch-active-state) &:active, &.active-state { + background: darken(@themeColor, 8%); + } + .transition(300ms); + .flexbox(); + .align-items(center); + .justify-content(center); + .transform(translate3d(0, 8px, 0) scale(0.3)); + .transform-origin(center bottom); + + a { + margin-bottom: 16px; + } + } + .speed-dial-opened & { + visibility: visible; + pointer-events: auto; + a { + opacity: 1; + .transform(translate3d(0, 0, 0) scaleY(1)); + .depth(3); + &:nth-child(2) { + .delay(50ms); + } + &:nth-child(3) { + .delay(100ms); + } + &:nth-child(4) { + .delay(150ms); + } + &:nth-child(5) { + .delay(200ms); + } + &:nth-child(6) { + .delay(250ms); + } + } + } +} + +// Popove Morph +.floating-button-to-popover { + &.floating-button-to-popover { + .transition(300ms); + } + &.floating-button-to-popover-in { + .transition(100ms); + i { + opacity: 0; + .transition(100ms); + } + } + &.floating-button-to-popover-scale { + border-radius: 0; + .transition(300ms); + box-shadow: none; + } + &.floating-button-to-popover-out { + .delay(0ms); + .transition(300ms); + i { + opacity: 1; + .transition(100ms); + .delay(200ms); + } + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/forms.less b/bower_components/framework7/src/less/material/forms.less new file mode 100644 index 00000000..68a5860f --- /dev/null +++ b/bower_components/framework7/src/less/material/forms.less @@ -0,0 +1,517 @@ +/* === Forms === */ +// Inputs +.list-block { + input[type="text"], input[type="password"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], input[type="datetime-local"], input[type="time"], input[type="number"], select, textarea { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + box-sizing:border-box; + border: none; + background: none; + border-radius: 0 0 0 0; + box-shadow: none; + display: block; + padding: 0; + margin: 0; + width: 100%; + height: 36px; + color: #212121; + font-size: 16px; + font-family: inherit; + &::-webkit-input-placeholder { + color: rgba(0,0,0,0.35); + } + } + .label, .floating-label { + vertical-align: top; + color:rgba(0,0,0,0.65); + .transition(200ms); + width: 35%; + .flex-shrink(0); + } + + input[type="date"], input[type="datetime-local"] { + line-height: 44px; + } + select { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + } + textarea { + resize:none; + line-height: 1.4; + padding-top: 8px; + padding-bottom: 7px; + height: 100px; + &.resizable { + height: 36px; + } + } + + .item-input { + width: 100%; + -ms-flex:1; + .flex-shrink(1); + font-size: 0; + position: relative; + margin-bottom: 4px; + min-height: 36px; + } + + // Inputs List + .input-item, &.inputs-list { + ul { + .hairline-remove(bottom); + } + .item-media { + .align-self(flex-end); + min-height: 36px; + margin-bottom: 8px; + padding: 0; + } + .item-inner { + display: block; + margin-bottom: 4px; + padding-bottom: 0; + .hairline-remove(bottom); + } + .label, .floating-label { + width: 100%; + font-size: 12px; + } + .floating-label { + .transform-origin(left); + .transform(scale(16/12) translateY(21px)); + color: rgba(0,0,0,0.35); + width: auto; + max-width: 75%; + ~.item-input input::-webkit-input-placeholder { + color: transparent; + } + } + } + .focus-state, .not-empty-state { + .floating-label { + color:rgba(0,0,0,0.65); + .transform(scale(1) translateY(0)); + } + } + .focus-state { + &.item-inner { + .label { + color: @themeColor; + } + } + &.input-field:after, + .item-input-field:after { + background: @themeColor; + } + .label, .floating-label { + color: @themeColor; + } + } + .not-empty-state { + &.item-inner { + .label { + color: rgba(0, 0, 0, 0.65); + } + } + &.input-field:after, + .item-input-field:after { + background: rgba(0, 0, 0, 0.12); + transform: none !important; + } + } +} +.item-input-field, .input-field { + position: relative; + .hairline(bottom, rgba(0, 0, 0, 0.12)); + &:after { + .transition(200ms); + } + &.focus-state:after, &.not-empty-state:after, .focus-state &:after, .not-empty-state &:after{ + background: @themeColor; + .transform(scaleY(2)) !important; + } +} +textarea.resizable { + overflow: hidden; +} +//Switch +.label-switch { + display: inline-block; + vertical-align: middle; + width: 36px; + height: 14px; + position: relative; + cursor: pointer; + .align-self(center); + .checkbox { + width: 36px; + border-radius: 36px; + box-sizing:border-box; + height: 14px; + background: #b0afaf; + z-index: 0; + margin: 0; + padding: 0; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border:none; + cursor: pointer; + position: relative; + .transition(300ms); + &:after { + content:' '; + height: 20px; + width: 20px; + border-radius: 20px; + background: #fff; + position: absolute; + z-index: 2; + top: -3px; + left: 0px; + box-shadow: 0 2px 5px rgba(0,0,0,0.4); + .transform(translateX(0px)); + .transition(300ms); + } + } + input[type="checkbox"] { + display: none; + &:checked { + &+ .checkbox { + background: rgba(red(@themeColor), green(@themeColor), blue(@themeColor), 0.5); + &:after { + .transform(translateX(16px)); + background: @themeColor; + } + } + } + } + .item-input & { + top: (36px - 14px) / 2; + } +} + +//Buttons +.button { + color:@themeColor; + text-decoration: none; + text-align: center; + display: block; + border-radius: 2px; + line-height: 36px; + box-sizing:border-box; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + background: none; + padding: 0 10px; + margin: 0; + height: 36px; + white-space: nowrap; + text-overflow:ellipsis; + font-size: 14px; + text-transform: uppercase; + font-family: inherit; + cursor: pointer; + min-width: 64px; + padding: 0 8px; + position: relative; + overflow: hidden; + outline: 0; + border: none; + .transition(300ms); + .translate3d(0,0,0); + input[type="submit"]&, input[type="button"]&{ + width: 100%; + } + html:not(.watch-active-state) &:active, &.active-state { + background: rgba(0,0,0,0.1); + } + &.button-fill { + background-color: @themeColor; + color: #fff; + html:not(.watch-active-state) &:active, &.active-state { + background: darken(@themeColor, 8%); + } + } + &.button-big { + height: 48px; + line-height: 48px; + border-radius: 3px; + } + + i.icon + span, + span:not(.ripple-wave) + span, + span:not(.ripple-wave) + i.icon, + i.icon + i.icon { + margin-left: 8px; + } + + .navbar &, .toolbar &, .subnavbar &, .notifications & { + &:not(.button-fill) { + color:#fff; + html:not(.watch-active-state) &:active, &.active-state { + background: rgba(255,255,255,0.15); + } + } + } +} +.button-raised { + .depth(1); + html:not(.watch-active-state) &:active, &.active-state { + .depth(2); + } +} +.buttons-row { + .align-self(center); + .flexbox(); + .flex-wrap(nowrap); + .button { + margin-left: 16px; + width: 100%; + -webkit-box-flex:1; + -ms-flex:1; + } + .button:first-child { + margin-left: 0; + } +} + + +// Slider +.range-slider { + width: 100%; + position: relative; + overflow: hidden; + .align-self(center); + input[type="range"] { + position: relative; + height: 20px; + width: 100%; + margin: 0; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + background: -webkit-gradient(linear, 50% 0, 50% 100%, color-stop(0, #b9b9b9), color-stop(100%, #b9b9b9)); + background: linear-gradient(to right, #b9b9b9 0, #b9b9b9 100%); + background-position: center; + background-size: 100% 2px; + background-repeat: no-repeat; + outline: 0; + -ms-background-position-y: 500px; + &:focus, &:active { + border: 0; + outline: 0 none; + } + } + + // Range thumb mixin + .range-thumb() { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + border: none; + outline: 0; + height: 20px; + width: 20px; + position: relative; + background: @themeColor; + border-radius: 20px; + } + + // ======= Webkit ======== + input[type="range"]::-webkit-slider-thumb { + .range-thumb(); + } + + input[type="range"]::-webkit-slider-thumb:before { + position: absolute; + top: 50%; + right: 100%; + width: 2000px; + height: 2px; + margin-top: -1px; + z-index: 1; + background: @themeColor; + content: ' '; + } + + // ======= FireFox ======== + input[type="range"]::-moz-range-track { + width: 100%; + height: 2px; + background: #b7b8b7; + border: none; + outline: 0; + } + input[type="range"]::-moz-range-thumb { + .range-thumb(); + } + + // ======= IE ======== + input[type="range"]::-ms-track { + width: 100%; + height: 2px; + cursor: pointer; + background: transparent; + border-color: transparent; + color: transparent; + } + input[type="range"]::-ms-thumb { + .range-thumb(); + } + + input[type="range"]::-ms-fill-lower { + background: @themeColor; + } + input[type="range"]::-ms-fill-upper { + background: #b7b8b7; + } + + .item-input & { + top: (36px - 20px) / 2; + } +} + +// Checkboxes +.form-checkbox { + position: relative; + display: inline-block; + vertical-align: middle; +} +label.label-checkbox, .form-checkbox { + cursor: pointer; + input[type="checkbox"], input[type="radio"] { + display: none; + } +} +label.label-checkbox i.icon-form-checkbox, .form-checkbox i { + width: 18px; + height: 18px; + position: relative; + border-radius: 2px; + border: 2px solid #6d6d6d; + box-sizing:border-box; + .transition(300ms); + background: transparent; + display: block; + &:after { + content:' '; + position: absolute; + width: 18px; + height: 18px; + left: -2px; + top: -2px; + .transition(300ms); + opacity: 0; + background: no-repeat center; + .encoded-svg-background(""); + -webkit-background-size: 100% auto; + background-size: 100% auto; + } +} +label.label-checkbox input[type="checkbox"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox input[type="checkbox"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox input[type="checkbox"]:checked ~ .item-inner i.icon-form-checkbox, +label.label-checkbox input[type="radio"]:checked + .item-media i.icon-form-checkbox, +label.label-checkbox input[type="radio"]:checked ~ .item-after i.icon-form-checkbox, +label.label-checkbox input[type="radio"]:checked ~ .item-inner i.icon-form-checkbox, +.form-checkbox input[type="checkbox"]:checked ~ i { + border-color: @themeColor; + background-color: @themeColor; + &:after { + opacity: 1; + } +} +// Radio +.form-radio { + position: relative; + display: inline-block; + vertical-align: middle; +} +label.label-radio, .form-radio { + cursor: pointer; + input[type="checkbox"], input[type="radio"] { + display: none; + } +} +label.label-radio i.icon-form-radio, .form-radio i { + width: 20px; + height: 20px; + position: relative; + border-radius: 20px; + border: 2px solid #6d6d6d; + box-sizing:border-box; + .transition(300ms); + display: block; + &:after { + content:' '; + position: absolute; + width: 10px; + height: 10px; + left: 50%; + top: 50%; + margin-left: -5px; + margin-top: -5px; + background-color: @themeColor; + border-radius: 100%; + .transform(scale(0)); + .transition(300ms); + } +} +label.label-radio input[type="checkbox"]:checked + .item-media i.icon-form-radio, +label.label-radio input[type="checkbox"]:checked ~ .item-after i.icon-form-radio, +label.label-radio input[type="checkbox"]:checked ~ .item-inner i.icon-form-radio, +label.label-radio input[type="radio"]:checked + .item-media i.icon-form-radio, +label.label-radio input[type="radio"]:checked ~ .item-after i.icon-form-radio, +label.label-radio input[type="radio"]:checked ~ .item-inner i.icon-form-radio, +.form-radio input[type="radio"]:checked ~ i { + border-color: @themeColor; + &:after { + background-color: @themeColor; + .transform(scale(1)); + } +} + +label.label-checkbox, label.label-radio { + position: relative; + overflow: hidden; + z-index: 0; + .transition(300ms); + .item-after { + i.icon-form-checkbox, i.icon-form-radio { + margin-left: 8px; + margin-right: 16px; + } + } + .media-list &, .media-item & { + .item-media { + i.icon-form-checkbox, i.icon-form-radio { + margin-top: 4px; + } + } + } + html:not(.watch-active-state) &:active, &.active-state { + background-color: rgba(0,0,0,0.1); + .item-inner { + .hairline-color(bottom, transparent); + } + } +} + +// Smart selects +.smart-select { + select { + display: none; + } +} diff --git a/bower_components/framework7/src/less/material/framework7.material.colors.less b/bower_components/framework7/src/less/material/framework7.material.colors.less new file mode 100644 index 00000000..27206267 --- /dev/null +++ b/bower_components/framework7/src/less/material/framework7.material.colors.less @@ -0,0 +1,640 @@ +@import url('_mixins.less'); +@import url('_colors-vars.less'); +@import url('_dark-colors-vars.less'); +/*========================== +Framework7 Layouts Themes +==========================*/ +/* === Dark layout === */ +.layout-dark { + @pageBg: #222; + @barsBg: #131313; + @barsBorder: #333; + @barsText: #fff; + @tabBarText: #fff; + @text: #ddd; + @lightText: #bbb; + @strongText: #fff; + @activeLink: rgba(255,255,255,0.05); + @blockBg: #1c1c1c; + @blockBorder: #393939; + @blockStrongBg: #1c1c1c; + @dividerBg: #1a1a1a; + @itemAfterText: @lightText; + @searchbarBg: #333; + @searchbarBorder: #333; + @swipeoutButton: #444; + @checkboxBorder: @blockBorder; + + // Photo Browser + .page, .login-screen-content, .page&, .panel, .panel& { + background-color: @pageBg; + color:rgba(255,255,255,0.87); + } + // Content Block + .content-block-title { + color:rgba(255,255,255,0.87); + } + + .content-block-inner { + .hairline-color(top, @blockBorder); + .hairline-color(bottom, @blockBorder); + } + // Popover + .popover .list-block ul { + background: none; + } + // Card + .card { + background: @blockBg; + } + .card-header{ + .hairline-color(bottom, @blockBorder); + } + .card-footer { + .hairline-color(top, @blockBorder); + color:@lightText; + } + // List + .list-block, .list-block& { + ul { + .hairline-color(top, @blockBorder); + .hairline-color(bottom, @blockBorder); + } + &.inset ul{ + background: @blockStrongBg; + } + &.notifications > ul { + background: none; + } + } + li.sorting { + background-color: rgba(34,34,34,0.8); + } + .swipeout-actions-left a, .swipeout-actions-right a { + background-color: @swipeoutButton; + } + .item-inner, .list-block ul ul li:last-child .item-inner { + .hairline-color(bottom, @blockBorder); + } + .item-after, .item-text { + color: rgba(255,255,255,0.7); + } + .list-block-label { + color:@lightText; + } + .item-divider, .list-group-title { + background: @dividerBg; + color:@lightText; + .hairline-color(top, @blockBorder); + } + .contacts-block .list-group-title { + background: none; + } + .autocomplete-dropdown { + background: @blockBg; + .list-block { + color: rgba(255,255,255,0.54); + } + .list-block b { + color: rgba(255,255,255,0.87); + } + } + // Forms + .item-link, label.label-checkbox, label.label-radio { + html:not(.watch-active-state) &:active, &.active-state { + background-color: @activeLink; + } + } + .list-block { + input[type="text"], input[type="password"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], input[type="datetime-local"], input[type="time"], input[type="number"], select, textarea { + color:@strongText; + &::-webkit-input-placeholder { + color: rgba(255,255,255,0.35); + } + } + } + .label-switch { + .checkbox { + background: rgba(255,255,255,0.3); + } + } + .item-inner:not(.focus-state) .label, .item-inner:not(.focus-state) .floating-label { + color: rgba(255,255,255,0.7); + } + .item-inner:not(.focus-state):not(.not-empty-state) .item-input-field, .item-inner:not(.focus-state):not(.not-empty-state) .input-field { + .hairline-color(bottom, rgba(255, 255, 255, 0.12)); + } + + label.label-checkbox { + i.icon-form-checkbox { + border-color: rgba(255,255,255,0.7); + } + } + label.label-radio { + i.icon-form-radio { + border-color: rgba(255,255,255,0.7); + } + } + .item-link.list-button, .list-button { + .hairline-color(bottom, @blockBorder); + } + .page-content .ripple-wave { + background:rgba(255,255,255,0.3); + } + .button:not(.button-fill) { + html:not(.watch-active-state) &:active, &.active-state { + background:rgba(255,255,255,0.1); + } + } + // Chips + .chip { + background: rgba(255,255,255,0.87); + } + + // Timeline + .timeline-item-inner { + background: @blockBg; + } + .timeline-item-divider { + background: rgba(255,255,255,0.3); + } + .content-block-inner .timeline-item-inner { + border-color: @blockBorder; + } + .timeline-item-time { + color: rgba(255,255,255,0.7); + } + // Data Table + .data-table { + tbody { + tr.data-table-row-selected { + background: rgba(255,255,255,0.05); + } + td { + .hairline(top, @blockBorder); + } + } + html:not(.ios):not(.android) & { + tbody tr:hover { + background: rgba(255,255,255,0.05); + } + } + thead { + th, td { + &:not(.sortable-active) { + color: rgba(255,255,255,0.5); + } + } + } + th, td { + &.actions-cell { + a.link { + color: rgba(255,255,255,0.5); + } + } + } + .sortable-cell:not(.numeric-cell):after, .sortable-cell.numeric-cell:before { + .encoded-svg-background(""); + } + .data-table-actions { + a.link { + color: rgba(255,255,255,0.5); + } + } + // Collapsible + @media (max-width:480px) and (orientation:portrait) { + &.data-table-collapsible { + tr { + .hairline(top, @blockBorder); + } + tr:hover { + background-color: inherit; + } + td:not(.checkbox-cell) { + &:before { + color: rgba(255,255,255,0.5); + } + } + } + } + } +} + +/*========================== +Framework7 Color Themes +==========================*/ +.theme-mixin(@colorName, @color, @pressColor, @darkcolor) { + //Buttons + .button { + .theme-@{colorName} & { + &:not(.button-fill) { + color:@color; + } + } + .theme-@{colorName} .navbar &, .theme-@{colorName}.navbar &, .theme-@{colorName} .toolbar &, .theme-@{colorName}.toolbar &, .theme-@{colorName} .subnavbar &, .theme-@{colorName}.subnavbar & { + &:not(.button-fill) { + color:#fff; + } + } + .theme-@{colorName} &.button-fill { + background: @color; + color:#fff; + html:not(.watch-active-state) &:active, &.active-state { + background: @pressColor; + } + } + } + // Progress bar + .progressbar { + &.theme-@{colorName}, .theme-@{colorName} & { + background-color: rgba(red(@color), green(@color), blue(@color), 0.5); + span { + background-color: @color; + } + } + } + .progressbar-infinite{ + &.theme-@{colorName}, .theme-@{colorName} & { + background-color: rgba(red(@color), green(@color), blue(@color), 0.5); + &:after, &:before { + background-color: @color; + } + } + } + //Icons + .color-@{colorName} { + i.icon, i.icon& { + color:@color; + } + } + i.icon-next.color-@{colorName}, i.icon-next.theme-@{colorName} { + .encoded-svg-background(""); + } + i.icon-prev.color-@{colorName}, i.icon-prev.theme-@{colorName} { + .encoded-svg-background(""); + } + i.icon-back.color-@{colorName}, i.icon-back.theme-@{colorName} { + .encoded-svg-background(""); + } + i.icon-forward.color-@{colorName}, i.icon-forward.theme-@{colorName} { + .encoded-svg-background(""); + } + i.icon-bars.color-@{colorName}, i.icon-bars.theme-@{colorName} { + .encoded-svg-background(""); + } + + // Theme + .theme-@{colorName} { + // Links + a, .card a { + color: @color; + } + // Toolbars + .navbar, .navbar& , .toolbar, .toolbar&, .subnavbar, .subnavbar&, .searchbar, .searchbar&{ + background-color: @color; + } + // Forms + .label-switch, .label-switch& { + input[type="checkbox"] { + &:checked { + &+ .checkbox { + background-color: rgba(red(@color), green(@color), blue(@color), 0.5); + &:after { + background-color: @color; + } + } + } + } + } + label.label-checkbox, label.label-checkbox& { + i.icon-form-checkbox { + &:after { + .encoded-svg-background(""); + } + } + input[type="checkbox"], input[type="radio"] { + &:checked + .item-media, &:checked ~ .item-after, &:checked ~ .item-inner{ + i.icon-form-checkbox { + border-color: @color; + background-color: @color; + } + } + } + } + label.label-radio, label.label-radio& { + i.icon-form-radio:after { + background-color: @color; + } + input[type="checkbox"], input[type="radio"] { + &:checked + .item-media, &:checked ~ .item-after, &:checked ~ .item-inner{ + i.icon-form-radio { + border-color: @color; + } + i.icon-form-radio:after { + background-color: @color; + } + } + } + } + .form-checkbox, .form-checkbox& { + input[type="checkbox"]:checked { + ~ i { + border-color: @color; + background-color: @color; + } + } + } + .form-radio, .form-radio& { + input[type="radio"]:checked { + ~ i { + border-color: @color; + } + ~ i:after { + background-color: @color; + } + } + } + .form-checkbox, .form-radio { + .ripple-wave { + background: rgba(red(@color), green(@color), blue(@color), 0.5); + } + } + .focus-state { + .label, .floating-label { + color: @color; + } + } + .item-input-field, .input-field { + &.focus-state:after, &.not-empty-state:after { + background: @color; + } + } + // Calendar + .picker-calendar-day.picker-calendar-day-today span { + color: @color; + } + .picker-calendar-day.picker-calendar-day-selected span { + background-color: @color; + color:#fff; + } + .picker-calendar-day.picker-calendar-day-has-events span:after { + background-color: @color; + } + // Picker Header + .picker-header { + background-color: @color; + } + // Modal buttons + .modal-button { + color: @color; + } + // Timeline + .timeline-horizontal .timeline-item-date, .timeline-horizontal& .timeline-item-date { + background-color: @color; + } + .timeline-year-title, .timeline-month-title { + background-color: @color; + } + // Status Bar Overlay + .statusbar-overlay { + background-color: @darkcolor; + } + // Data Tables + .data-table, .data-table& { + .data-table-header-selected { + background: rgba(red(@color), green(@color), blue(@color), 0.1); + } + .data-table-title-selected { + color: @color; + } + } + } + .swiper-pagination { + &.color-@{colorName}, .theme-@{colorName} & { + .swiper-pagination-bullet-active { + background-color: @color; + } + .swiper-pagination-progressbar { + background-color: @color; + } + } + &.swiper-pagination-progress.bg-@{colorName} { + background-color: rgba(red(@color), green(@color), blue(@color), 0.25); + } + } + .swiper-button-next, .swiper-container-rtl .swiper-button-prev { + &.color-@{colorName}, .theme-@{colorName} & { + .encoded-svg-background(""); + } + } + .swiper-button-prev, .swiper-container-rtl .swiper-button-next { + &.color-@{colorName}, .theme-@{colorName} & { + .encoded-svg-background(""); + } + } + // Floating Button + .floating-button, .speed-dial-buttons a { + .theme-@{colorName} &, &.theme-@{colorName} { + color:#fff; + background: @color; + html:not(.watch-active-state) &:active, &.active-state { + background: @pressColor; + } + i { + color: inherit; + } + } + } + + // Range Slider + .range-slider { + .theme-@{colorName} &, &.theme-@{colorName} { + input[type="range"]::-webkit-slider-thumb:before { + background-color: @color; + } + input[type="range"]::-webkit-slider-thumb { + background-color: @color; + } + input[type="range"]::-ms-thumb { + background-color: @color; + } + input[type="range"]::-ms-fill-lower { + background-color: @color; + } + input[type="range"]::-moz-range-thumb { + background-color: @color; + } + } + } + // Badges + .badge.theme-@{colorName} { + background-color:@color; + color: #fff; + } +} +.theme-mixin(e('red'), @red, #D32F2F, @darkred); +.theme-mixin(e('pink'), @pink, #C2185B, @darkpink); +.theme-mixin(e('purple'), @purple, #7B1FA2, @darkpurple); +.theme-mixin(e('deeppurple'), @deeppurple, #512DA8, @darkdeeppurple); +.theme-mixin(e('indigo'), @indigo, #303F9F, @darkindigo); +.theme-mixin(e('blue'), @blue, #1976D2, @darkblue); +.theme-mixin(e('lightblue'), @lightblue, #0288D1, @darklightblue); +.theme-mixin(e('cyan'), @cyan, #0097A7, @darkcyan); +.theme-mixin(e('teal'), @teal, #00897B, @darkteal); +.theme-mixin(e('green'), @green, #388E3C, @darkgreen); +.theme-mixin(e('lightgreen'), @lightgreen, #689F38, @darklightgreen); +.theme-mixin(e('lime'), @lime, #AFB42B, @darklime); +.theme-mixin(e('yellow'), @yellow, #FBC02D, @darkyellow); +.theme-mixin(e('amber'), @amber, #FFA000, @darkamber); +.theme-mixin(e('orange'), @orange, #F57C00, @darkorange); +.theme-mixin(e('deeporange'), @deeporange, #E64A19, @darkdeeporange); +.theme-mixin(e('brown'), @brown, #5D4037, @darkbrown); +.theme-mixin(e('gray'), @gray, #616161, @darkgray); +.theme-mixin(e('bluegray'), @bluegray, #455A64, @darkbluegray); +.theme-mixin(e('white'), @white, rgba(0,0,0,0.1), @white); +.theme-mixin(e('black'), @black, #333, @black); + +/*========================== +Framework7 Color + Bg + Border +==========================*/ +.color-mixin(@colorName, @color, @pressColor) { + //Plain color and links + .color-@{colorName} { + color: @color; + .list-block .item-link.list-button&, .list-button&, .list-block .item-link&, .tabbar a.active&, a& { + color: @color; + } + .label-switch input[type="checkbox"]:checked + .checkbox&, .label-switch& input[type="checkbox"]:checked + .checkbox{ + background-color: @color; + } + } + //Buttons + .button { + &.color-@{colorName}:not(.button-fill), .color-@{colorName}.buttons-row &:not(.button-fill) { + color: @color !important; + } + &.button-fill.bg-@{colorName}, &.button-fill.color-@{colorName} { + background: @color !important; + color:#fff; + html:not(.watch-active-state) &:active, &.active-state { + background: @pressColor !important; + } + } + + } + // Progress bar + .progressbar { + &.color-@{colorName}, &.bg-@{colorName} { + background-color: rgba(red(@color), green(@color), blue(@color), 0.5); + span { + background-color: @color; + } + } + } + .progressbar-infinite{ + &.color-@{colorName}, &.bg-@{colorName} { + background-color: rgba(red(@color), green(@color), blue(@color), 0.5); + &:after, &:before { + background-color: @color; + } + } + } + //Icons + .color-@{colorName} { + i.icon, i.icon& { + color:@color; + } + } + // Preloader + .preloader.color-@{colorName}, .preloader.preloader-@{colorName} { + svg circle { + stroke: @color; + } + .preloader-inner-gap, .preloader-inner-half-circle { + border-color: @color; + } + } + // Bg rule + .bg-@{colorName}, a.bg-@{colorName}, .list-block .swipeout-actions-left a.bg-@{colorName}, .list-block .swipeout-actions-right a.bg-@{colorName} { + background-color: @color; + .list-block & .item-link, .list-block& .item-link, .list-block .item-link& { + html:not(.watch-active-state) &:active, &.active-state { + background: @pressColor; + } + } + } + // Border rule + .border-@{colorName} { + border-color: @color; + .list-block &.item-inner, .list-block ul&, & { + &:after, &:before { + background-color: @color; + } + } + } + // Floating Button + .floating-button, .speed-dial-buttons a { + &.color-@{colorName}, &.bg-@{colorName} { + color:#fff; + background: @color; + html:not(.watch-active-state) &:active, &.active-state { + background: @pressColor; + } + i { + color: inherit; + } + } + } + // Ripple + .ripple-@{colorName} { + .ripple-wave { + background-color: rgba(red(@color), green(@color), blue(@color), 0.3); + } + } + // Range Slider + .range-slider { + &.color-@{colorName} { + input[type="range"]::-webkit-slider-thumb:before { + background-color: @color; + } + input[type="range"]::-webkit-slider-thumb { + background-color: @color; + } + input[type="range"]::-ms-thumb { + background-color: @color; + } + input[type="range"]::-ms-fill-lower { + background-color: @color; + } + input[type="range"]::-moz-range-thumb { + background-color: @color; + } + } + } + // Badges + .badge.color-@{colorName} { + background-color:@color; + color: #fff; + } +} +.color-mixin(e('red'), @red, #D32F2F); +.color-mixin(e('pink'), @pink, #C2185B); +.color-mixin(e('purple'), @purple, #7B1FA2); +.color-mixin(e('deeppurple'), @deeppurple, #512DA8); +.color-mixin(e('indigo'), @indigo, #303F9F); +.color-mixin(e('blue'), @blue, #1976D2); +.color-mixin(e('lightblue'), @lightblue, #0288D1); +.color-mixin(e('cyan'), @cyan, #0097A7); +.color-mixin(e('teal'), @teal, #00897B); +.color-mixin(e('green'), @green, #388E3C); +.color-mixin(e('lightgreen'), @lightgreen, #689F38); +.color-mixin(e('lime'), @lime, #AFB42B); +.color-mixin(e('yellow'), @yellow, #FBC02D); +.color-mixin(e('amber'), @amber, #FFA000); +.color-mixin(e('orange'), @orange, #F57C00); +.color-mixin(e('deeporange'), @deeporange, #E64A19); +.color-mixin(e('brown'), @brown, #5D4037); +.color-mixin(e('gray'), @gray, #616161); +.color-mixin(e('bluegray'), @bluegray, #455A64); +.color-mixin(e('white'), @white, rgba(0,0,0,0.1)); +.color-mixin(e('black'), @black, #333); diff --git a/bower_components/framework7/src/less/material/framework7.material.less b/bower_components/framework7/src/less/material/framework7.material.less new file mode 100644 index 00000000..916209fb --- /dev/null +++ b/bower_components/framework7/src/less/material/framework7.material.less @@ -0,0 +1,42 @@ +@import url('_mixins.less'); +@import url('_colors-vars.less'); +@import url('_dark-colors-vars.less'); +@import url('intro.less'); +@import url('grid.less'); +@import url('views.less'); +@import url('pages.less'); +@import url('toolbars.less'); +@import url('toolbars-pages.less'); +@import url('searchbar.less'); +@import url('messagebar.less'); +@import url('icons.less'); +@import url('badges.less'); +@import url('chips.less'); +@import url('content-block.less'); +@import url('lists.less'); +@import url('contacts.less'); +@import url('forms.less'); +@import url('floating-button.less'); +@import url('accordion.less'); +@import url('cards.less'); +@import url('modals.less'); +@import url('panels.less'); +@import url('lazy-load.less'); +@import url('tabs.less'); +@import url('messages.less'); +@import url('statusbar.less'); +@import url('preloader.less'); +@import url('progressbar.less'); +@import url('pull-to-refresh.less'); +@import url('infinite-scroll.less'); +@import url('autocomplete.less'); +@import url('timeline.less'); +@import url('swiper.less'); +@import url('photo-browser.less'); +@import url('picker.less'); +@import url('calendar.less'); +@import url('notifications.less'); +@import url('login-screen.less'); +@import url('ripple.less'); +@import url('disabled.less'); +@import url('data-table.less'); diff --git a/bower_components/framework7/src/less/material/framework7.material.rtl.less b/bower_components/framework7/src/less/material/framework7.material.rtl.less new file mode 100644 index 00000000..17edf34a --- /dev/null +++ b/bower_components/framework7/src/less/material/framework7.material.rtl.less @@ -0,0 +1,339 @@ +@import url('_mixins.less'); +@import url('_colors-vars.less'); +@import url('_dark-colors-vars.less'); +/*============= + Framework 7 RTL Additions +=============*/ +html { + direction: rtl; +} + +/* === Lists === */ +.list-block { + ul ul { + padding-left: 0; + padding-right: 56px; + } + .item-content { + padding-left: 0; + padding-right: 16px; + } + .item-inner { + padding-right: 0; + padding-left: 16px; + } + .item-after { + margin-left: 0; + margin-right: 8px; + } + .item-media { + i + i, i + img { + margin-left: 0; + margin-right: 8px; + } + & + .item-inner { + margin-left: 0; + margin-right: 16px; + } + } + .item-link { + .item-inner { + padding-right: 0; + padding-left: 42px; + background-position: 16px center; + .encoded-svg-background(""); + } + } + + &.media-list, li.media-item { + .item-link { + .item-inner { + padding-right: 0; + padding-left: 16px; + } + .item-title-row { + padding-right: 0; + padding-left: 26px; + background-position: center left; + .encoded-svg-background(""); + } + } + } + .sortable-handler { + right: auto; + left: 0; + } + &.sortable-opened { + .item-inner, .item-link .item-inner { + padding-right: 0; + padding-left: 50px; + } + .item-link .item-inner, .item-link .item-title-row { + background-image: none; + } + } + .swipeout-actions-left, .swipeout-actions-right { + direction: ltr; + } +} + +/* === Toolbars === */ +.navbar, .toolbar { + a.link { + i+span, i+i, span+i, span+span { + margin-left: 0; + margin-right: 8px; + } + } + +} +.navbar { + .right { + margin-left: 0; + margin-right: auto; + } +} +.tabbar .tab-link-highlight { + left: auto; + right: 0; +} +.tabbar-scrollable .tab-link-highlight { + left: 0; + right: auto; +} +/* === Forms === */ +.list-block { + input[type="text"], input[type="password"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], input[type="datetime-local"], input[type="time"], input[type="number"], select, textarea { + text-align: right; + } + .input-item, &.inputs-list { + .floating-label { + .transform-origin(right); + } + } +} +.buttons-row { + .button { + margin-left: 0; + margin-right: 8px; + &:first-child { + margin-right: 0; + } + } +} + +.label-switch { + .checkbox { + &:after { + left: auto; + right: 0; + } + } + input[type="checkbox"]:checked + .checkbox:after { + .transform(translateX(-16px)); + } +} +.range-slider { + input[type="range"]::-webkit-slider-thumb:before { + right: auto; + left: 100%; + } +} + +label.label-checkbox, label.label-radio { + .item-after { + i.icon-form-checkbox, i.icon-form-radio { + margin-left: 16px; + margin-right: 8px; + } + } +} +/* === Search Bar === */ +.searchbar { + input[type="search"] { + background-position: right center; + padding: 0 24px 0 36px + } + .searchbar-clear { + right: auto; + left: -16px; + } +} +/* === Modals === */ +.modal-button { + + .modal-button { + margin-left: 0; + margin-right: 4px; + } +} + +/* === Content Block === */ +.content-block-inner { + margin-left: 0; + margin-right: -16px; +} + +/* === Messages === */ +.message-received { + -ms-flex-item-align: end; + -webkit-align-self: flex-end; + align-self: flex-end; + .align-items(flex-end); +} +.message-sent { + -ms-flex-item-align: start; + -webkit-align-self: flex-start; + align-self: flex-start; + .align-items(flex-start); +} + +/* === Chips === */ +.chip{ + +} +.chip-media { + margin-left: 0; + margin-right: -12px; + + .chip-label{ + margin-left: 0px; + margin-right: 8px; + } +} +.chip-label { + + .chip-delete { + margin-left: -8px; + margin-right: 4px; + } +} +.chip-delete { + margin-left: -8px; +} +/* === Accordion === */ +.list-block { + .accordion-toggle { + .item-inner { + padding-right: 0; + padding-left: 42px; + background-position: 16px center; + .encoded-svg-background(""); + } + } + &:not(.media-list) .accordion-item-expanded:not(.media-item) .accordion-item-toggle .item-inner, + &:not(.media-list) .accordion-item-expanded:not(.media-item) > .item-link .item-inner, + &.media-list .accordion-item-expanded .accordion-item-toggle .item-title-row, + &.media-list .accordion-item-expanded > .item-link .item-title-row, + .accordion-item-expanded.media-item .accordion-item-toggle .item-title-row, + .accordion-item-expanded.media-item > .item-link .item-title-row, + { + .encoded-svg-background(""); + background-size: 20px 20px; + } + .accordion-item ul { + padding-right: 0; + } +} +/* === Icons === */ +.contacts-block { + li:not(.list-group-title) { + padding-left: 0; + padding-right: 40px + 16px; + } +} +/* === Icons === */ +i.icon { + &.icon-back { + .encoded-svg-background(""); + } + &.icon-forward { + .encoded-svg-background(""); + } + &.icon-next { + .encoded-svg-background(""); + } + &.icon-prev { + .encoded-svg-background(""); + } +} +.rtl-icon-color-mixin(@colorName, @color) { + i.icon-back.color-@{colorName}, i.icon-back.theme-@{colorName} { + .encoded-svg-background(""); + } + i.icon-forward.color-@{colorName}, i.icon-forward.theme-@{colorName} { + .encoded-svg-background(""); + } + i.icon-next.color-@{colorName}, i.icon-next.theme-@{colorName} { + .encoded-svg-background(""); + } + i.icon-prev.color-@{colorName}, i.icon-prev.theme-@{colorName} { + .encoded-svg-background(""); + } +} +.rtl-icon-color-mixin(e('red'), @red); +.rtl-icon-color-mixin(e('pink'), @pink); +.rtl-icon-color-mixin(e('purple'), @purple); +.rtl-icon-color-mixin(e('deeppurple'), @deeppurple); +.rtl-icon-color-mixin(e('indigo'), @indigo); +.rtl-icon-color-mixin(e('blue'), @blue); +.rtl-icon-color-mixin(e('lightblue'), @lightblue); +.rtl-icon-color-mixin(e('cyan'), @cyan); +.rtl-icon-color-mixin(e('teal'), @teal); +.rtl-icon-color-mixin(e('green'), @green); +.rtl-icon-color-mixin(e('lightgreen'), @lightgreen); +.rtl-icon-color-mixin(e('lime'), @lime); +.rtl-icon-color-mixin(e('yellow'), @yellow); +.rtl-icon-color-mixin(e('amber'), @amber); +.rtl-icon-color-mixin(e('orange'), @orange); +.rtl-icon-color-mixin(e('deeporange'), @deeporange); +.rtl-icon-color-mixin(e('brown'), @brown); +.rtl-icon-color-mixin(e('gray'), @gray); +.rtl-icon-color-mixin(e('bluegray'), @bluegray); +.rtl-icon-color-mixin(e('white'), @white); +.rtl-icon-color-mixin(e('black'), @black); + +/* === Timeline === */ +.timelineItemLeft() { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-left: ~"-moz-calc(50% - (32px + 10px) / 2 - 50px)"; + margin-left: ~"-webkit-calc(50% - (32px + 10px) / 2 - 50px)"; + margin-left: ~"calc(50% - (32px + 10px) / 2 - 50px)"; + margin-right: 0; + .timeline-item-date { + text-align: right; + } +} +.timelineItemRight() { + margin-right: ~"-moz-calc(50% - (32px + 10px) / 2 - 50px)"; + margin-right: ~"-webkit-calc(50% - (32px + 10px) / 2 - 50px)"; + margin-right: ~"calc(50% - (32px + 10px) / 2 - 50px)"; + margin-left: 0; + .timeline-item-date { + text-align: left; + } +} +.timeline-sides { + .timeline-item { + .timelineItemRight(); + &:not(.timeline-item-right):nth-child(2n) { + .timelineItemLeft(); + } + } + .timeline-item-left { + .timelineItemLeft() + } + .timeline-item-right { + .timelineItemRight(); + } +} +@media (min-width:768px) { + .tablet-sides { + .timeline-sides; + } +} + +.timeline-horizontal .timeline-item-date { + text-align: right; +} diff --git a/bower_components/framework7/src/less/material/grid.less b/bower_components/framework7/src/less/material/grid.less new file mode 100644 index 00000000..09081ee3 --- /dev/null +++ b/bower_components/framework7/src/less/material/grid.less @@ -0,0 +1,87 @@ +/* === Grid === */ +.row { + .flexbox(); + .justify-content(space-between); + .flex-wrap(wrap); + .align-items(flex-start); + > [class*="col-"] { + box-sizing: border-box; + } +} +@cols: 5, 10, 15, 20, 25, 30, 100/3, 35, 40, 45, 50, 55, 60, 65, 100*(2/3), 70, 75, 80, 85, 90, 95, 100; +.row { + .col-auto { + width: 100%; + } + .-(@i: length(@cols)) when (@i > 0) { + @divider: e(extract(@cols, @i)); + @className: `Math.floor(@{divider})`; + @n: `100/parseFloat(@{divider})`; + @n-1: @n - 1; + .col-@{className} { + width: ~"@{divider}%"; + width: ~"-webkit-calc((100% - 16px*@{n-1}) / @{n})"; + width: ~"calc((100% - 16px*@{n-1}) / @{n})"; + } + &.no-gutter { + .col-@{className} { + width: ~"@{divider}%"; + } + } + .-((@i - 1)); + } .-; + .--(@j: 1) when (@j < length(@cols)) { + @divider: e(extract(@cols, @j)); + @className: `Math.floor(@{divider})`; + .col-auto:nth-last-child(@{j}), .col-auto:nth-last-child(@{j}) ~ .col-auto { + @j-1: @j - 1; + width: 100% / @j; + width: ~"-webkit-calc((100% - 16px*@{j-1}) / @{j})"; + width: ~"calc((100% - 16px*@{j-1}) / @{j})"; + } + &.no-gutter { + .col-auto:nth-last-child(@{j}), .col-auto:nth-last-child(@{j}) ~ .col-auto { + width: 100% / @j; + } + } + .--((@j + 1)); + } .--; + +} + +@media all and (min-width:768px) { + .row { + .-(@i: length(@cols)) when (@i > 0) { + @divider: e(extract(@cols, @i)); + @className: `Math.floor(@{divider})`; + @n: `100/parseFloat(@{divider})`; + @n-1: @n - 1; + .tablet-@{className} { + width: ~"@{divider}%"; + width: ~"-webkit-calc((100% - 16px*@{n-1}) / @{n})"; + width: ~"calc((100% - 16px*@{n-1}) / @{n})"; + } + &.no-gutter { + .tablet-@{className} { + width: ~"@{divider}%"; + } + } + .-((@i - 1)); + } .-; + .--(@j: 1) when (@j < length(@cols)) { + .tablet-auto:nth-last-child(@{j}), .tablet-auto:nth-last-child(@{j}) ~ .col-auto { + @j-1: @j - 1; + width: 100% / @j; + width: ~"-webkit-calc((100% - 16px*@{j-1}) / @{j})"; + width: ~"calc((100% - 16px*@{j-1}) / @{j})"; + } + &.no-gutter { + .tablet-auto:nth-last-child(@{j}), .tablet-auto:nth-last-child(@{j}) ~ .tablet-auto { + width: 100% / @j; + } + } + .--((@j + 1)); + } .--; + } + +} diff --git a/bower_components/framework7/src/less/material/icons.less b/bower_components/framework7/src/less/material/icons.less new file mode 100644 index 00000000..b3434860 --- /dev/null +++ b/bower_components/framework7/src/less/material/icons.less @@ -0,0 +1,59 @@ +/* === Icons === */ +i.icon { + display: inline-block; + vertical-align: middle; + background-size: 100% auto; + background-position: center; + background-repeat: no-repeat; + font-style: normal; + position: relative; + /* Material Icons http://google.github.io/material-design-icons/ */ + &.icon-back { + width: 24px; + height: 24px; + .encoded-svg-background("") + } + &.icon-forward { + width: 24px; + height: 24px; + .encoded-svg-background(""); + } + &.icon-bars { + width: 24px; + height: 24px; + .encoded-svg-background(""); + } + &.icon-camera { + width: 24px; + height: 24px; + .encoded-svg-background(""); + } + &.icon-f7 { + width: 24px; + height: 24px; + background-image: url("@{imgBaseUrl}/i-f7-material.png"); + border-radius: 3px; + } + &.icon-next, &.icon-prev { + width: 24px; + height: 24px; + } + &.icon-next { + .encoded-svg-background(""); + } + &.icon-prev { + .encoded-svg-background(""); + } + &.icon-plus { + width: 24px; + height: 24px; + font-size: 0; + .encoded-svg-background(""); + } + &.icon-close { + width: 24px; + height: 24px; + font-size: 0; + .encoded-svg-background(""); + } +} diff --git a/bower_components/framework7/src/less/material/infinite-scroll.less b/bower_components/framework7/src/less/material/infinite-scroll.less new file mode 100644 index 00000000..5531c9bd --- /dev/null +++ b/bower_components/framework7/src/less/material/infinite-scroll.less @@ -0,0 +1,5 @@ +/* === Infinite Scroll Preloader === */ +.infinite-scroll-preloader { + text-align: center; + padding: 8px 0; +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/intro.less b/bower_components/framework7/src/less/material/intro.less new file mode 100644 index 00000000..9d3d8d41 --- /dev/null +++ b/bower_components/framework7/src/less/material/intro.less @@ -0,0 +1,37 @@ +@imgBaseUrl: "../img"; +html, body, .framework7-root { + position: relative; + height: 100%; + width: 100%; + overflow-x: hidden; +} +body { + font-family: Roboto, Noto, Helvetica, Arial, sans-serif; + margin: 0; + padding: 0; + color: #212121; + font-size: 14px; + line-height: 1.5; + width: 100%; + -webkit-text-size-adjust:100%; + background: #fff; + overflow: hidden; +} +.framework7-root { + overflow: hidden; +} +* { + -webkit-tap-highlight-color: rgba(0,0,0,0); + -webkit-touch-callout:none; +} +a, input, textarea, select { + outline: 0; +} + +a { + text-decoration: none; + color: @themeColor; +} +p { + margin: 1em 0; +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/lazy-load.less b/bower_components/framework7/src/less/material/lazy-load.less new file mode 100644 index 00000000..0482f8c2 --- /dev/null +++ b/bower_components/framework7/src/less/material/lazy-load.less @@ -0,0 +1,20 @@ +/* === Images Lazy Loading === */ +.lazy-loaded.lazy-fadeIn { + .animation(lazyFadeIn 600ms); +} +@-webkit-keyframes lazyFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes lazyFadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/lists.less b/bower_components/framework7/src/less/material/lists.less new file mode 100644 index 00000000..ec39e838 --- /dev/null +++ b/bower_components/framework7/src/less/material/lists.less @@ -0,0 +1,415 @@ +/* === Lists === */ +@listBlockBorderColor: rgba(0,0,0,0.12); +.list-block { + margin: 32px 0; + font-size: 16px; + ul { + list-style: none; + padding: 0; + margin: 0; + position: relative; + .hairline(top, @listBlockBorderColor); + .hairline(bottom, @listBlockBorderColor); + ul { + .hairline-remove(top); + .hairline-remove(bottom); + padding-left: 56px; + } + } + + .align-top, .align-top .item-content, .align-top .item-inner { + .align-items(flex-start); + } + + .inset() { + margin-left: 16px; + margin-right: 16px; + border-radius: 4px; + .content-block-title { + margin-left: 0; + margin-right: 0; + } + ul { + border-radius: 4px; + .hairline-remove(top); + .hairline-remove(bottom); + } + li:first-child > a{ + border-radius: 4px 4px 0 0; + } + li:last-child > a{ + border-radius: 0 0 4px 4px; + } + li:first-child:last-child > a { + border-radius: 4px; + } + } + &.inset { + .inset() + } + &.tablet-inset { + @media all and (min-width:768px) { + .inset(); + } + } + + // List items + li { + box-sizing:border-box; + position: relative; + } + + .item-media { + .flexbox(); + .flex-shrink(0); + .flex-wrap(nowrap); + .align-items(center); + box-sizing:border-box; + padding-top: 8px; + padding-bottom: 8px; + min-width: 40px; + i + i { + margin-left: 8px; + } + i + img { + margin-left: 8px; + } + } + .item-media + .item-inner { + margin-left: 16px; + } + .item-inner { + padding-right: 16px; + position: relative; + .hairline(bottom, @listBlockBorderColor); + width: 100%; + padding-top: 8px; + padding-bottom: 8px; + min-height: 48px; + box-sizing:border-box; + -webkit-box-flex:1; + -ms-flex:1; + min-width: 0; + .flexbox(); + .justify-content(space-between); + .align-items(center); + .align-self(stretch); + } + .item-title { + min-width: 0; + .flex-shrink(1); + white-space: nowrap; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; + } + + .item-after { + white-space: nowrap; + color: #757575; + .flex-shrink(0); + margin-left: auto; + padding-left: 8px; + .flexbox(); + max-height: 28px; + font-size: 14px; + } + .smart-select .item-after, .autocomplete-opener .item-after { + max-width: 70%; + overflow: hidden; + text-overflow: ellipsis; + position: relative; + display: block; + } + .item-actions { + margin-left: auto; + padding-left: 8px; + .flexbox(); + .align-items(center); + .justify-content(space-between); + a { + min-width: 24px; + position: relative; + .flexbox(); + .align-items(center); + .justify-content(center); + + a { + margin-left: 8px; + } + } + } + .item-after + .item-actions { + margin-left: 0; + } + .item-link, .list-button { + .transition(300ms); + display: block; + color: inherit; + position: relative; + overflow: hidden; + z-index: 0; + .item-inner { + padding-right: 42px; + .encoded-svg-background(""); + background-size: 10px 20px; + background-repeat: no-repeat; + background-position: 95% center; + background-position: -webkit-calc(~"100% - 16px") center; + background-position: calc(~"100% - 16px") center; + } + html:not(.watch-active-state) &:active, &.active-state { + background-color: rgba(0,0,0,0.1); + } + } + .list-button { + padding: 0 16px; + font-size: 16px; + display: block; + line-height: 48px; + } + .item-content { + box-sizing:border-box; + padding-left: 16px; + min-height: 48px; + .flexbox(); + .justify-content(space-between); + .align-items(center); + } + // Label after List block + .list-block-label { + margin: 10px 0 35px; + padding: 0 16px; + font-size: 14px; + color: rgba(0,0,0,0.54); + } + + // Swipe outs + .swipeout { + overflow: hidden; + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; + } + .swipeout.deleting { + .transition(300ms); + .swipeout-content { + .transform(translateX(-100%)); + } + } + .swipeout.transitioning { + .swipeout-content, .swipeout-actions-right a, .swipeout-actions-left a, .swipeout-overswipe { + -webkit-transition: 300ms; + transition: 300ms; + } + } + .swipeout-content { + position: relative; + z-index: 10; + } + .swipeout-overswipe { + -webkit-transition: 200ms left; + transition: 200ms left; + } + .swipeout-actions-left, .swipeout-actions-right { + position: absolute; + top: 0; + height: 100%; + .flexbox(); + a { + padding: 0 24px; + color:#fff; + background: #c7c7cc; + .flexbox(); + .align-items(center); + position: relative; + left: 0; + &:after { + content:''; + position: absolute; + top: 0; + width: 600%; + height: 100%; + background: inherit; + z-index: -1; + } + } + a.swipeout-delete { + background: @red; + } + } + .swipeout-actions-right { + right: 0%; + .transform(translateX(100%)); + a:after { + left: 100%; + margin-left: -1px; + } + } + .swipeout-actions-left { + left: 0%; + .transform(translateX(-100%)); + a:after { + right: 100%; + margin-right: -1px; + } + } + .item-subtitle { + font-size: 14px; + position: relative; + overflow: hidden; + white-space: nowrap; + max-width: 100%; + text-overflow:ellipsis; + } + .item-text { + font-size: 14px; + color: #757575; + line-height: 20px; + position: relative; + overflow: hidden; + max-height: 40px; + text-overflow:ellipsis; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + display: -webkit-box; + } + &.media-list, li.media-item { + .item-inner { + display: block; + padding-top: 14px; + padding-bottom: 14px; + .align-self(stretch); + } + .item-link .item-inner { + background: none; + padding-right: 16px; + } + .item-link .item-title-row { + padding-right: 26px; + background: no-repeat right top; + .encoded-svg-background(""); + background-size: 10px 20px; + } + .item-media { + padding-top: 14px; + padding-bottom: 14px; + .align-self(flex-start); + img { + display: block; + } + } + .item-title-row { + .flexbox(); + .justify-content(space-between); + } + .item-content > .item-after { + padding-top: 14px; + padding-bottom: 14px; + .align-self(flex-start); + } + } + .list-group { + ul { + &:after, &:before { + z-index: 11; + } + } + + .list-group ul { + .hairline-remove(top); + } + } + .item-divider, .list-group-title { + background: #f4f4f4; + .hairline-remove(top); + padding: 0px 16px; + white-space: nowrap; + position: relative; + max-width: 100%; + text-overflow: ellipsis; + overflow: hidden; + color: rgba(0,0,0,0.54); + height: 48px; + box-sizing: border-box; + line-height: 48px; + font-size: 14px; + } + .list-group-title { + position: relative; + position: -webkit-sticky; + position: -moz-sticky; + position: sticky; + top: 0px; + z-index: 10; + margin-top: 0; + } + // Sortable + .sortable-handler { + position: absolute; + right: 0; + top: 0; + bottom: 1px; + z-index: 10; + background-repeat: no-repeat; + background-size: 18px 12px; + background-position: center; + width: 50px; + .encoded-svg-background(""); + opacity: 0; + visibility: hidden; + cursor: pointer; + .transition(300ms); + } + &.sortable { + .item-inner { + .transition(300ms); + } + } + &.sortable-opened { + .sortable-handler { + visibility: visible; + opacity: 1; + } + .item-inner, .item-link .item-inner { + padding-right: 16px + 18px + 16px; + } + .item-link .item-inner, .item-link .item-title-row { + background-image: none; + } + } + &.sortable-sorting { + li { + .transition(300ms); + } + } + li.sorting { + z-index: 50; + background: rgba(255,255,255,0.8); + .depth(2); + .transition(0ms); + .item-inner { + .hairline-remove(bottom); + } + } + + // Last-childs + li { + &:last-child { + .list-button { + .hairline-remove(bottom); + } + } + &:last-child, &:last-child li:last-child { + .item-inner { + .hairline-remove(bottom); + } + } + li:last-child, &:last-child li { + .item-inner { + .hairline(bottom, @listBlockBorderColor); + } + } + } + + .no-hairlines(); + .no-hairlines-between() +} diff --git a/bower_components/framework7/src/less/material/login-screen.less b/bower_components/framework7/src/less/material/login-screen.less new file mode 100644 index 00000000..b5edfa0d --- /dev/null +++ b/bower_components/framework7/src/less/material/login-screen.less @@ -0,0 +1,23 @@ +/* === Login screen === */ +.login-screen-content { + background: #fff; + .login-screen-title, .list-block, .content-block, .list-block-label { + max-width: 480px; + margin: 24px auto; + } + .list-block ul { + .hairline-remove(top); + .hairline-remove(bottom); + background: none; + } + .list-block-label { + text-align: center; + } +} +.navbar-fixed .page .login-screen-content { + padding-top: 0; +} +.login-screen-title { + text-align: center; + font-size: 34px; +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/messagebar.less b/bower_components/framework7/src/less/material/messagebar.less new file mode 100644 index 00000000..c2282a43 --- /dev/null +++ b/bower_components/framework7/src/less/material/messagebar.less @@ -0,0 +1,56 @@ +/* === Message Bar === */ +.toolbar.messagebar { + .translate3d(0,0,0); + background: #fff; + .hairline(top, #d1d1d1); + height: 48px; + top: auto; + bottom: 0; + font-size: 16px; + overflow: hidden; + textarea { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + border: none; + background: none; + border-radius: 0; + box-shadow: none; + display: block; + padding: 3px 8px 3px; + margin: 0; + width: 100%; + height: 28px; + color: #333; + font-size: 16px; + line-height: 22px; + font-family: inherit; + resize:none; + .flex-shrink(1); + } + a.link { + color: #333; + .align-self(flex-end); + height: @toolbarSize; + line-height: @toolbarSize; + .active-highlight-color(rgba(0,0,0,0.1)); + + } + .link { + .flex-shrink(0); + } + ~ .page-content { + padding-bottom: @toolbarSize; + } + .page.no-toolbar & ~.page-content, .page.no-tabbar & ~.page-content { + padding-bottom: @toolbarSize; + } + .hidden-toolbar & { + .translate3d(0,0,0); + .transition(0ms); + } +} diff --git a/bower_components/framework7/src/less/material/messages.less b/bower_components/framework7/src/less/material/messages.less new file mode 100644 index 00000000..66af384a --- /dev/null +++ b/bower_components/framework7/src/less/material/messages.less @@ -0,0 +1,206 @@ +/* === Messages === */ +@messagesAvatarSize: 48px; +.messages-content { + background: #eee; +} +.messages { + .flexbox(); + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.messages-date { + text-align: center; + font-weight: 500; + font-size: 12px; + line-height: 1; + margin: 10px 15px; + span { + font-weight: 400; + } +} +.message { + box-sizing: border-box; + margin: 0px 8px 8px 8px; + max-width: 80%; + .flexbox(); + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; + &:first-child { + margin-top: 8px; + } + &.message-pic { + img { + display: block; + } + } +} +.message-name, .message-label, .message-date, .messages-date { + color:rgba(0,0,0,0.51); +} +.message-name { + font-size: 12px; + line-height: 1; + margin-bottom: 2px; + margin-top: 7px; + .message-hide-name & { + display: none; + } +} +.message-label { + font-size: 12px; + line-height: 1; + margin-top: 4px; + .message-hide-label & { + display: none; + } +} +.message-avatar { + width: @messagesAvatarSize; + height: @messagesAvatarSize; + border-radius: 100%; + margin-top: -@messagesAvatarSize; + position: relative; + top: 1px; + background-size: cover; + opacity: 1; + .transition(400ms); + .message-hide-avatar & { + opacity: 0; + } +} +.message-text { + box-sizing: border-box; + border-radius: 2px; + padding: 6px 8px; + min-width: 48px; + font-size: 16px; + line-height: 1.2; + word-break: break-word; + color:#333; + min-height: @messagesAvatarSize; + position: relative; + .translate3d(0,0,0); + img { + max-width: 100%; + height: auto; + } + .message-pic & { + padding: 8px; + } +} +.message-date { + font-size: 12px; + margin-top: 4px; + .message-pic img + & { + margin-top: 8px; + } +} +.message-sent { + -ms-flex-item-align: end; + -webkit-align-self: flex-end; + align-self: flex-end; + .align-items(flex-end); + .message-name, .message-label { + margin-right: 8px; + } + .message-text { + background-color: #C8E6C9; + margin-left: auto; + border-radius: 2px 2px 0 2px; + margin-right: 8px; + &:before { + position: absolute; + content: ''; + border-left: 0px solid transparent; + border-right: 8px solid transparent; + border-bottom: 8px solid #C8E6C9; + left: 100%; + bottom: 0; + width: 0; + height: 0; + } + } + &.message-with-avatar { + .message-text, .message-name, .message-label { + margin-right: @messagesAvatarSize + 8px; + } + } +} +.message-received { + -ms-flex-item-align: start; + -webkit-align-self: flex-start; + align-self: flex-start; + .align-items(flex-start); + .message-text { + background-color: #fff; + border-radius: 2px 2px 2px 0px; + margin-left: 8px; + &:before { + position: absolute; + content: ''; + border-left: 8px solid transparent; + border-right: 0px solid transparent; + border-bottom: 8px solid #fff; + right: 100%; + bottom: 0; + width: 0; + height: 0; + } + } + .message-name, .message-label { + margin-left: 8px; + } + &.message-with-avatar { + .message-text, .message-name, .message-label { + margin-left: @messagesAvatarSize + 8px; + } + } +} + +.message-appear-from-bottom { + -webkit-animation: messageAppearFromBottom 400ms; + animation: messageAppearFromBottom 400ms; +} +.message-appear-from-top { + -webkit-animation: messageAppearFromTop 400ms; + animation: messageAppearFromTop 400ms; +} + +@-webkit-keyframes messageAppearFromBottom { + from { + -webkit-transform: translate3d(0,100%,0); + } + to { + -webkit-transform: translate3d(0,0,0); + } +} +@keyframes messageAppearFromBottom { + from { + transform: translate3d(0,100%,0); + } + to { + transform: translate3d(0,0,0); + } +} +@-webkit-keyframes messageAppearFromTop { + from { + -webkit-transform: translate3d(0,-100%,0); + } + to { + -webkit-transform: translate3d(0,0,0); + } +} +@keyframes messageAppearFromTop { + from { + transform: translate3d(0,-100%,0); + } + to { + transform: translate3d(0,0,0); + } +} diff --git a/bower_components/framework7/src/less/material/modals.less b/bower_components/framework7/src/less/material/modals.less new file mode 100644 index 00000000..112d1ee8 --- /dev/null +++ b/bower_components/framework7/src/less/material/modals.less @@ -0,0 +1,581 @@ +/* === Modals === */ +@modalBgColor:#fff; +@modalButonColor : #4285f4; +@modalButonBg: @modalBgColor; +@modalDuration:400ms; +@actionsModalDuration:300ms; +@popoverDuration: 300ms; +@popupDuration: 400ms; +.modal-overlay, .preloader-indicator-overlay, .popup-overlay, .picker-modal-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.4); + z-index: 13000; + visibility: hidden; + opacity: 0; + .transition(@modalDuration); + &.not-animated { + .transition(0ms); + } + &.modal-overlay-visible { + visibility: visible; + opacity: 1; + } +} +.popup-overlay { + z-index: 10500; +} +.picker-modal-overlay { + z-index: 12000; +} +.modal { + width: 280px; + position: absolute; + z-index: 13500; + left: 50%; + margin-left: -140px; + margin-top: 0; + top: 50%; + border-radius: 3px; + opacity: 0; + .transform(translate3d(0,0,0) scale(1.185)); + -webkit-transition-property: -webkit-transform, opacity; + -moz-transition-property: -moz-transform, opacity; + -ms-transition-property: -ms-transform, opacity; + -o-transition-property: -o-transform, opacity; + transition-property: transform, opacity; + color:#757575; + display: none; + background: #fff; + font-size: 16px; + .depth(5); + &.modal-in { + opacity: 1; + .transition(@modalDuration); + .transform(translate3d(0,0,0) scale(1)); + } + &.modal-out { + opacity: 0; + z-index: 13500-1; + .transition(@modalDuration); + .transform(translate3d(0,0,0) scale(0.815)); + } +} +.modal-inner { + padding: 24px 24px 20px; + position: relative; +} +.modal-title { + font-weight: 500; + font-size: 20px; + color:#212121; + line-height: 1.3; + +.modal-text { + margin-top: 20px; + } +} +.modal-text { + line-height: 1.5; +} +.modal-buttons { + height: 48px; + padding: 6px 8px; + overflow: hidden; + box-sizing:border-box; + .flexbox(); + .justify-content(flex-end); + &.modal-buttons-vertical { + display: block; + height: auto; + padding: 0 0 8px 0; + .modal-button { + margin-left: 0; + text-align: right; + height: 48px; + line-height: 48px; + border-radius: 0; + padding-left: 16px; + padding-right: 16px; + } + } +} +.modal-button, .modal-buttons .button { + .button; + &.modal-button-bold { + font-weight: 700; + } + + .modal-button { + margin-left: 4px; + } +} +.modal-no-buttons { + .modal-buttons { + display: none; + } +} +// Action sheet +.actions-modal { + position: absolute; + left: 0; + bottom: 0; + z-index: 13500; + width: 100%; + background: #fff; + .transform(translate3d(0,100%,0)); + max-height: 100%; + .scrollable(); + &.modal-in, &.modal-out { + .transition(@actionsModalDuration); + &.not-animated { + .transition(0ms); + } + } + &.modal-in { + .transform(translate3d(0,0,0)); + } + &.modal-out { + z-index: 13500-1; + .transform(translate3d(0,100%,0)); + } +} +.actions-modal-group { + position: relative; + .hairline(bottom, #d2d2d6); + &:last-child { + .hairline-remove(bottom); + } +} +.actions-modal-button, .actions-modal-label { + width: 100%; + font-weight: normal; + margin: 0; + box-sizing: border-box; + display: block; + position: relative; + padding: 0 16px; + a { + text-decoration: none; + color: inherit; + display: block; + } + b { + font-weight: 500; + } + &.actions-modal-button-bold { + font-weight: 500; + } + &.actions-modal-button-red { + color: @red; + } + &.disabled { + opacity: 0.95; + color:@gray; + } +} +.actions-modal-button { + cursor: pointer; + line-height: 48px; + font-size: 16px; + color: rgba(0,0,0,0.87); + .transition(300ms); + a, & { + position: relative; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + html:not(.watch-active-state) &:active, &.active-state { + background: rgba(0,0,0,0.1); + } +} +.actions-modal-label { + font-size: 16px; + color: rgba(0,0,0,0.54); + min-height: 56px; + line-height: 1.3; + padding-top: 12px; + padding-bottom: 12px; + .flexbox(); + .justify-content(flex-start); + .align-items(center); +} +// Prompt +input.modal-text-input { + box-sizing:border-box; + height: 36px; + background: #fff; + margin: 0; + margin-top: 15px; + padding: 0; + border: none; + width: 100%; + font-size: 16px; + font-family: inherit; + display: block; + box-shadow: none; + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + appearance: none; + .transition(200ms); + &::-webkit-input-placeholder { + color: rgba(0,0,0,0.35); + } + + input.modal-text-input { + margin-top: 16px; + } +} +// Popover +.popover { + width: 320px; + background: #fff; + z-index: 13500; + margin: 0; + top: 0; + opacity: 0; + left: 0; + border-radius: 3px; + position: absolute; + display: none; + .depth(2); + .transform(scale(0.85, 0.6)); + -webkit-transition-property: opacity, -webkit-transform, border-radius; + -moz-transition-property: opacity, -moz-transform, border-radius; + transition-property: opacity, transform, border-radius; + &.popover-on-top { + .transform-origin(center bottom); + } + &.popover-on-bottom { + .transform-origin(center top); + } + &.modal-in, &.modal-out { + .transition(@popoverDuration); + &.not-animated { + .transition(0ms); + } + } + &.modal-in { + .transform(scale(1)); + opacity: 1; + } + &.modal-out { + .transform(scale(1)); + opacity: 0; + } + .list-block { + margin: 0; + &:first-child:last-child ul { + .hairline-remove(top); + .hairline-remove(bottom); + } + ul { + background: none; + .hairline-remove(top); + } + &:first-child { + ul { + border-radius: 3px 3px 0 0; + } + li:first-child a { + border-radius: 3px 3px 0 0; + } + } + &:last-child { + ul { + .hairline-remove(bottom); + border-radius: 0 0 3px 3px; + } + li:last-child a { + border-radius: 0 0 3px 3px; + } + } + &:first-child:last-child { + li:first-child:last-child a, ul:first-child:last-child { + border-radius: 3px; + } + } + } + &.popover-floating-button { + .transform-origin(center center); + .transform(scale(0.7)); + border-radius: 50%; + box-shadow: none; + .depth(3); + &.modal-in { + border-radius: 0%; + .transform(scale(1)); + .delay(200ms); + .transition(200ms); + } + &.modal-out { + border-radius: 50%; + .transform(scale(0.7)); + .delay(0ms); + .transition(100ms); + } + .list-block { + margin: 0; + &:first-child { + ul { + border-radius: 0; + } + li:first-child a { + border-radius: 0; + } + } + &:last-child { + ul { + border-radius: 0; + } + li:last-child a { + border-radius: 0; + } + } + &:first-child:last-child { + li:first-child:last-child a, ul:first-child:last-child { + border-radius: 0; + } + } + } + } +} +.popover-inner { + .scrollable(); +} +.actions-popover { + .list-block { + margin: 0; + } +} +.actions-popover-label { + padding: 8px 16px; + color:rgba(0,0,0,0.54); + font-size: 16px; + line-height: 1.3; + padding-top: 12px; + padding-bottom: 12px; + position: relative; + .hairline(bottom, #d2d2d6); + &:last-child { + .hairline-remove(bottom); + } +} +// Popup +.popup, .login-screen { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 11000; + background: #fff; + box-sizing:border-box; + display: none; + .scrollable(); + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -ms-transition-property: -ms-transform; + -o-transition-property: -o-transform; + transition-property: transform; + .translate3d(0,100%,0); + &.modal-in, &.modal-out { + .transition(@popupDuration); + &.not-animated { + .transition(0ms); + } + } + &.modal-in { + .translate3d(0,0,0); + } + &.modal-out { + .translate3d(0,100%,0); + } +} +.login-screen.modal-in, .login-screen.modal-out { + display: block; +} +// iPad Popup +@media all and (min-width:630px) and (min-height:630px) { + .popup:not(.tablet-fullscreen) { + width: 630px; + height: 630px; + left: 50%; + top: 50%; + margin-left: -315px; + margin-top: -315px; + box-shadow: 0px 20px 44px rgba(0,0,0,0.5); + border-radius: 3px; + .translate3d(0,1024px,0); + &.modal-in { + .translate3d(0,0,0); + } + &.modal-out { + .translate3d(0,1024px,0); + } + } +} +html.with-statusbar-overlay { + // iPhone with statusbar overlay + @media all and (max-width:629px), (max-height:629px) { + .popup { + height: ~"-webkit-calc(100% - 24px)"; + height: ~"calc(100% - 24px)"; + top: 24px; + } + .popup-overlay { + z-index: 9500; + } + &.ios .popup{ + height: ~"-webkit-calc(100% - 20px)"; + height: ~"calc(100% - 20px)"; + top: 20px; + } + } + .login-screen, .popup.tablet-fullscreen { + height: ~"-webkit-calc(100% - 24px)"; + height: ~"calc(100% - 24px)"; + top: 24px; + } + &.ios { + .login-screen, .popup.tablet-fullscreen { + height: ~"-webkit-calc(100% - 20px)"; + height: ~"calc(100% - 20px)"; + top: 20px; + } + } +} + +//Preloaders modals +.modal-preloader { + .modal-title, .modal-inner { + text-align: center; + } +} +.preloader-indicator-overlay { + visibility: visible; + opacity: 0; + background: none; +} +.preloader-indicator-modal { + position: absolute; + left: 50%; + top: 50%; + padding: 8px; + margin-left: -24px; + margin-top: -24px; + background: rgba(0,0,0,0.8); + z-index: 13500; + border-radius: 4px; + .preloader { + display: block; + } +} + +// Picker Modal +.picker-modal { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + height: 260px; + z-index: 12000; + display: none; + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -ms-transition-property: -ms-transform; + -o-transition-property: -o-transform; + transition-property: transform; + background: #fff; + .translate3d(0,100%,0); + &.modal-in, &.modal-out { + .transition(400ms); + &.not-animated { + .transition(0ms); + } + } + &.modal-in { + .translate3d(0,0,0); + } + &.modal-out { + .translate3d(0,100%,0); + } + .picker-modal-inner { + height: 100%; + position: relative; + } + .toolbar { + position: relative; + width: 100%; + top: 0; + + .picker-modal-inner { + height: ~"-webkit-calc(100% - @{toolbarSize})"; + height: ~"-moz-calc(100% - @{toolbarSize})"; + height: ~"calc(100% - @{toolbarSize})"; + } + a.link { + .flex-shrink(0); + } + } + .picker-header, .picker-footer { + height: @toolbarSize; + } + .picker-header { + background: @themeColor; + + .toolbar .toolbar-inner { + overflow: visible; + } + + .picker-footer + .toolbar + .picker-modal-inner { + height: ~"-webkit-calc(100% - @{toolbarSize} * 3)"; + height: ~"-moz-calc(100% - @{toolbarSize} * 3)"; + height: ~"calc(100% - @{toolbarSize} * 3)"; + } + } + .picker-footer { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + .modal-buttons; + + } + .picker-header, .picker-footer { + + .picker-modal-inner { + height: ~"-webkit-calc(100% - @{toolbarSize})"; + height: ~"-moz-calc(100% - @{toolbarSize})"; + height: ~"calc(100% - @{toolbarSize})"; + } + + .toolbar + .picker-modal-inner { + height: ~"-webkit-calc(100% - @{toolbarSize} * 2)"; + height: ~"-moz-calc(100% - @{toolbarSize} * 2)"; + height: ~"calc(100% - @{toolbarSize} * 2)"; + } + } + &.picker-modal-inline, .popover & { + display: block; + position: relative; + background: none; + z-index: inherit; + .translate3d(0,0,0); + .toolbar { + top: 0; + } + } + .popover & { + width: auto; + .toolbar:first-child, .picker-header:first-child { + border-radius: 2px 2px 0 0; + } + } + &.smart-select-picker { + .list-block { + margin: 0; + ul { + .hairline-remove(top); + .hairline-remove(bottom); + } + } + } +} diff --git a/bower_components/framework7/src/less/material/notifications.less b/bower_components/framework7/src/less/material/notifications.less new file mode 100644 index 00000000..584472df --- /dev/null +++ b/bower_components/framework7/src/less/material/notifications.less @@ -0,0 +1,75 @@ +/* === Notifications === */ +@notificationsDuration: 450ms; +.notifications { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + z-index: 20000; + color: #fff; + font-size: 14px; + margin: 0; + border: none; + display: none; + box-sizing: border-box; + max-height: 100%; + overflow: hidden; + -webkit-overflow-scrolling: touch; + .transition(@notificationsDuration); + -webkit-perspective:1200px; + perspective:1200px; + + &.list-block > ul { + .hairline-remove(top); + .hairline-remove(bottom); + max-width: 568px; + background: #323232; + margin: 0 auto; + } + .item-content { + .align-items(flex-start); + padding-left: 24px; + } + .item-title { + font-size: 14px; + font-weight: normal; + white-space: normal; + padding-top: 14px; + padding-bottom: 14px; + } + .item-inner { + padding-right: 24px; + padding-top: 0; + padding-bottom: 0; + .hairline-remove(bottom); + } + .item-after { + max-height: none; + margin-left: 16px; + } + .button.close-notification { + color: lighten(saturate(@themeColor, 10%), 10%); + } + .notification-item { + margin: 0 auto; + .transition(@notificationsDuration); + .delay(100ms); + .translate3d(0,0,0); + opacity: 1; + } + .notification-hidden { + opacity: 0; + .delay(0ms); + .translate3d(0,0,0); + } + .notification-item-removing { + .delay(0ms); + } + @media (min-width: 569px) { + &.list-block > ul { + border-radius: 2px; + width: auto; + min-width: 288px; + } + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/pages.less b/bower_components/framework7/src/less/material/pages.less new file mode 100644 index 00000000..3e8aabc7 --- /dev/null +++ b/bower_components/framework7/src/less/material/pages.less @@ -0,0 +1,137 @@ +/* === Pages === */ + +// Pages animations +@pageDuration: 300ms; +@newPageOffset: 56px; + +.pages { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; +} +.page { + box-sizing: border-box; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: #fff; + .translate3d(0,0,0); + &.cached { + display: none; + } +} +.page-on-left { + opacity: 1; + .translate3d(0,0,0); +} +.page-on-right { + opacity: 0; + pointer-events: none; + .translate3d(0, @newPageOffset, 0); +} +.page-content { + .scrollable(); + box-sizing: border-box; + height: 100%; + position: relative; + z-index: 1; +} + +//Class that will trigger transition during page custom transitions (like swipe-back) +.page-transitioning { + .transition(@pageDuration); +} +// From/to Right To/from Center animations +.page-from-right-to-center { + pointer-events: none; + .animation(pageFromRightToCenter @pageDuration forwards); +} +.page-from-center-to-right { + pointer-events: none; + .animation(pageFromCenterToRight @pageDuration forwards); +} +@-webkit-keyframes pageFromRightToCenter { + from { + opacity: 0; + -webkit-transform: translate3d(0, @newPageOffset,0); + } + to { + opacity: 1; + -webkit-transform: translate3d(0,0,0); + } +} +@keyframes pageFromRightToCenter { + from { + opacity: 0; + transform: translate3d(0, @newPageOffset,0); + } + to { + opacity: 1; + transform: translate3d(0,0,0); + } +} +@-webkit-keyframes pageFromCenterToRight { + from { + opacity: 1; + -webkit-transform: translate3d(0,0,0); + } + to { + opacity: 0; + -webkit-transform: translate3d(0, @newPageOffset,0); + } +} +@keyframes pageFromCenterToRight { + from { + opacity: 1; + transform: translate3d(0,0,0); + } + to { + opacity: 0; + transform: translate3d(0, @newPageOffset,0); + } +} + + +// From/to Center To/from Left animations +.page-from-center-to-left { + .animation(pageFromCenterToLeft @pageDuration forwards); +} +.page-from-left-to-center { + .animation(pageFromLeftToCenter @pageDuration forwards); +} + +@-webkit-keyframes pageFromCenterToLeft { + from { + opacity: 1; + } + to { + opacity: 1; + } +} +@keyframes pageFromCenterToLeft { + from { + opacity: 1; + } + to { + opacity: 1; + } +} +@-webkit-keyframes pageFromLeftToCenter { + from { + opacity: 1; + } + to { + opacity: 1; + } +} +@keyframes pageFromLeftToCenter { + from { + opacity: 1; + } + to { + opacity: 1; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/panels.less b/bower_components/framework7/src/less/material/panels.less new file mode 100644 index 00000000..48687ab1 --- /dev/null +++ b/bower_components/framework7/src/less/material/panels.less @@ -0,0 +1,130 @@ +/* === Panels === */ +@panelWidth:260px; +@panelsDuration: 300ms; +.panel-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.2); + opacity: 0; + z-index: 5999; + display: none; + .transform(translate3d(0,0,0)); + .transition(@panelsDuration); + &.not-animated { + .transition(0ms); + } +} +.panel { + z-index: 1000; + display: none; + background: #fff; + box-sizing: border-box; + .scrollable(); + position: absolute; + width: @panelWidth; + top: 0; + height: 100%; + .translate3d(0); + .transition(@panelsDuration); + &.not-animated { + .transition(0ms); + } + &.panel-visible { + display: block; + } + &.panel-left { + left: 0; + &.panel-cover { + z-index: 6000; + .translate3d(-100%); + } + + } + &.panel-right { + right: 0; + &.panel-cover { + z-index: 6000; + .translate3d(100%); + } + } + &.panel-visible-by-breakpoint { + display: block; + .translate3d(0) !important; + box-shadow: none !important; + &.panel-cover { + z-index: 5900; + } + } +} +body.with-panel-left-cover, body.with-panel-right-cover { + .panel { + box-shadow: 0px 0px 20px rgba(0,0,0,0.5); + } + .views { + .translate3d(0); + } + .panel-overlay { + display: block; + opacity: 1; + } +} +body.with-panel-left-reveal, body.with-panel-right-reveal { + .views { + box-shadow: 0px 0px 20px rgba(0,0,0,0.5); + .transition(@panelsDuration); + -webkit-transition-property: -webkit-transform, box-shadow; + -moz-transition-property: -moz-transform, box-shadow; + transition-property: transform, box-shadow; + } + .panel.not-animated ~ .views { + .transition(0ms); + } + .panel-overlay { + background: rgba(0,0,0,0); + display: block; + opacity: 0; + } +} +body.with-panel-left-reveal { + .views { + .translate3d(@panelWidth); + } + .panel-overlay { + .translate3d(@panelWidth); + } +} +body.with-panel-left-cover { + .panel.panel-left { + .translate3d(0); + } +} +body.with-panel-right-reveal { + .views { + .translate3d(-@panelWidth); + } + .panel-overlay { + .translate3d(-@panelWidth); + } +} +body.with-panel-right-cover { + .panel.panel-right { + .translate3d(0); + } +} +body.panel-closing { + .panel-overlay { + display: block; + } + .views { + .transition(@panelsDuration); + -webkit-transition-property: -webkit-transform, box-shadow; + -moz-transition-property: -moz-transform, box-shadow; + transition-property: transform, box-shadow; + } + .panel.not-animated ~ .views { + .transition(0ms); + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/photo-browser.less b/bower_components/framework7/src/less/material/photo-browser.less new file mode 100644 index 00000000..ab845ef2 --- /dev/null +++ b/bower_components/framework7/src/less/material/photo-browser.less @@ -0,0 +1,258 @@ +/* === Photo Browser === */ +.photo-browser { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 11500; + body > &, .framework7-root > & { + opacity: 0; + display: none; + .transform(translate3d(0,0,0)); + &.photo-browser-in { + display: block; + .animation(photoBrowserIn 400ms forwards); + } + &.photo-browser-out { + display: block; + .animation(photoBrowserOut 400ms forwards); + } + html.with-statusbar-overlay & { + height: ~"-webkit-calc(100% - 24px)"; + height: ~"calc(100% - 24px)"; + top: 24px; + } + html.with-statusbar-overlay.ios & { + height: ~"-webkit-calc(100% - 20px)"; + height: ~"calc(100% - 20px)"; + top: 20px; + } + } + .popup > &, body > &, .framework7-root > & { + .navbar, .toolbar { + .transform(translate3d(0,0,0)); + } + } + .page[data-page="photo-browser-slides"] { + background:none; + } + +} +.photo-browser-popup { + background: none; +} +.photo-browser, .views .view[data-page="photo-browser-slides"] { + .navbar, .toolbar { + background: rgba(red(@themeColor),green(@themeColor),blue(@themeColor),0.95); + .transition(400ms); + } +} + +.view[data-page="photo-browser-slides"] .page[data-page="photo-browser-slides"]{ + .navbar, .toolbar { + .transform(translate3d(0,0,0)); + } +} +.view[data-page="photo-browser-slides"] .page[data-page="photo-browser-slides"], .photo-browser .page[data-page="photo-browser-slides"] { + .toolbar { + bottom: 0; + top:auto; + } +} +.photo-browser-exposed { + .navbar, .toolbar { + opacity: 0; + visibility: hidden; + pointer-events:none; + } + .photo-browser-swiper-container { + background: #000; + } +} +.photo-browser-of { + margin: 0 5px; +} +.photo-browser-captions { + pointer-events:none; + position: absolute; + left: 0; + width: 100%; + bottom: 0; + z-index: 10; + opacity: 1; + .transition(400ms); + &.photo-browser-captions-exposed { + opacity: 0; + } +} +.toolbar ~ .photo-browser-captions { + bottom: @toolbarSize; + .transform(translate3d(0, 0px, 0)); + .photo-browser-exposed & { + .transform(translate3d(0, @toolbarSize, 0)); + } + &.photo-browser-captions-exposed { + .transform(translate3d(0, 0px, 0)); + } +} + +.photo-browser-caption { + box-sizing: border-box; + .transition(300ms); + position:absolute; + bottom:0; + left:0; + opacity: 0; + padding:4px 5px; + width:100%; + text-align:center; + background: rgba(0,0,0,0.8); + &:empty { + display: none; + } + &.photo-browser-caption-active { + opacity: 1; + } + .photo-browser-captions-light & { + background: rgba(255,255,255,0.8); + } + .photo-browser-captions-dark & { + color: #fff; + } + .photo-browser-exposed & { + color:#fff; + background: rgba(0,0,0,0.8); + } +} + +.photo-browser-swiper-container { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: hidden; + background: #fff; + .transition(400ms); +} +.photo-browser-swiper-wrapper { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + padding: 0; + .flexbox(); +} +.photo-browser-link-inactive { + opacity: 0.3; +} +.photo-browser-slide { + width: 100%; + height: 100%; + position: relative; + overflow: hidden; + .flexbox(); + .justify-content(center); + .align-items(center); + .flex-shrink(0); + box-sizing: border-box; + &.transitioning { + .transition(400ms); + } + span.swiper-zoom-container { + display: none; + } + img { + width: auto; + height: auto; + max-width: 100%; + max-height: 100%; + display: none; + } + &.swiper-slide-active, &.swiper-slide-next, &.swiper-slide-prev { + span.swiper-zoom-container { + .flexbox(); + } + img { + display: inline; + } + &.photo-browser-slide-lazy { + .preloader { + display: block; + } + } + } + iframe { + width: 100%; + height: 100%; + } + .preloader { + display: none; + position: absolute; + width: 42px; + height: 42px; + margin-left: -21px; + margin-top: -21px; + left: 50%; + top: 50%; + } +} + +.photo-browser.photo-browser-dark { + .navbar, .toolbar { + background: rgba(30,30,30,0.8); + .hairline-remove(top); + .hairline-remove(bottom); + color:#fff; + a { + color:#fff; + } + } + .photo-browser-swiper-container { + background: #000; + } + +} + +@-webkit-keyframes photoBrowserIn { + 0% { + -webkit-transform: translate3d(0,0,0) scale(0.5); + opacity: 0; + } + 100% { + -webkit-transform: translate3d(0,0,0) scale(1); + opacity: 1; + } +} +@keyframes photoBrowserIn { + 0% { + transform: translate3d(0,0,0) scale(0.5); + opacity: 0; + } + 100% { + transform: translate3d(0,0,0) scale(1); + opacity: 1; + } +} +@-webkit-keyframes photoBrowserOut { + 0% { + -webkit-transform: translate3d(0,0,0) scale(1); + opacity: 1; + } + 100% { + -webkit-transform: translate3d(0,0,0) scale(0.5); + opacity: 0; + } +} +@keyframes photoBrowserOut { + 0% { + transform: translate3d(0,0,0) scale(1); + opacity: 1; + } + 100% { + transform: translate3d(0,0,0) scale(0.5); + opacity: 0; + } +} diff --git a/bower_components/framework7/src/less/material/picker.less b/bower_components/framework7/src/less/material/picker.less new file mode 100644 index 00000000..8342cc82 --- /dev/null +++ b/bower_components/framework7/src/less/material/picker.less @@ -0,0 +1,117 @@ +/* === Columns Picker === */ +.picker-columns { + width: 100%; + height: 260px; + z-index: 11500; + &.picker-modal-inline { + height: 200px; + } + @media (orientation: landscape) and (max-height: 415px) { + &:not(.picker-modal-inline) { + height: 200px; + } + } +} +.popover.popover-picker-columns { + width: 280px; + .toolbar { + border-radius: 2px 2px 0 0; + } +} +.picker-items { + .flexbox(); + .justify-content(center); + padding: 0; + text-align: right; + font-size: 20px; + -webkit-mask-box-image: -webkit-linear-gradient(bottom, transparent, transparent 5%, white 20%, white 80%, transparent 95%, transparent); + -webkit-mask-box-image: linear-gradient(to top, transparent, transparent 5%, white 20%, white 80%, transparent 95%, transparent); +} +.picker-items-col { + overflow: hidden; + position: relative; + max-height: 100%; + + &.picker-items-col-left { + text-align: left; + } + &.picker-items-col-center { + text-align: center; + } + &.picker-items-col-right { + text-align: right; + } + &.picker-items-col-divider { + color: rgba(0,0,0,0.87); + .flexbox(); + .align-items(center); + } +} +.picker-items-col-wrapper { + .transition(300ms); + + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; +} +.picker-item { + height: 36px; + line-height: 36px; + white-space: nowrap; + position: relative; + overflow: hidden; + text-overflow: ellipsis; + color: rgba(0,0,0,0.54); + left: 0; + top: 0; + width: 100%; + box-sizing: border-box; + span { + padding: 0 10px; + } + .transition(300ms); + .picker-items-col-absolute &{ + position: absolute; + } + &.picker-item-far { + pointer-events: none; + } + &.picker-selected { + color: rgba(0,0,0,0.87); + .transform(translate3d(0,0,0) rotateX(0deg)); + } +} +.picker-center-highlight { + height: 36px; + box-sizing: border-box; + position: absolute; + left: 0; + width: 100%; + top: 50%; + margin-top: -18px; + .hairline(top, rgba(0,0,0,0.15)); + .hairline(bottom, rgba(0,0,0,0.15)); + pointer-events: none; +} +// 3D Picker +.picker-3d { + .picker-items { + overflow: hidden; + -webkit-perspective: 1200px; + perspective: 1200px; + } + .picker-items-col, .picker-items-col-wrapper, .picker-item { + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; + } + .picker-items-col { + overflow: visible; + } + .picker-item { + -webkit-transform-origin: center center -110px; + transform-origin: center center -110px; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-transition-timing-function: ease-out; + transition-timing-function: ease-out; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/preloader.less b/bower_components/framework7/src/less/material/preloader.less new file mode 100644 index 00000000..aceb5461 --- /dev/null +++ b/bower_components/framework7/src/less/material/preloader.less @@ -0,0 +1,346 @@ +/* === + Preloader + By Rudi Theunissen (https://github.com/rtheunissen/md-preloader) +=== */ +.preloader { + @easing: cubic-bezier(.8,.0,.4,.8); + + @speed: 1320ms; // animation time for each loop + @color: #757575; // Blue A200 in the Material Design color palette + @linecap: square; // could be 'round', but the official one is square + @loops: 5; // number of points where the arc meets + @arc: 0.72; // fraction of the circumference that the arc grows to + @perimeter: 67px * pi(); // circumference of the raw svg inner cricle + + font-size: 0; + + display: inline-block; + width: 32px; + height: 32px; + -webkit-animation: preloader-outer @speed * @loops / 2 linear infinite; + animation: preloader-outer @speed * @loops / 2 linear infinite; + + svg { + width: 100%; + height: 100%; + -webkit-animation: preloader-inner @speed linear infinite; + animation: preloader-inner @speed linear infinite; + + circle { + fill: none; + stroke: @color; + stroke-linecap: @linecap; + -webkit-animation: preloader-arc @speed @easing infinite; + animation: preloader-arc @speed @easing infinite; + } + } + @-webkit-keyframes preloader-outer { + 0% { + -webkit-transform: rotate(0); + } + 100% { + -webkit-transform: rotate(360deg); + } + } + @keyframes preloader-outer { + 0% { + transform: rotate(0); + } + 100% { + transform: rotate(360deg); + } + } + + @-webkit-keyframes preloader-inner { + 0% { + -webkit-transform: rotate(-360deg * (1 - @arc)); + } + 100% { + -webkit-transform: rotate(0); + } + } + @keyframes preloader-inner { + 0% { + transform: rotate(-360deg * (1 - @arc)); + } + 100% { + transform: rotate(0); + } + } + @-webkit-keyframes preloader-arc { + 0% { + stroke-dasharray: 1 @perimeter; + stroke-dashoffset: 0; + } + 40% { + stroke-dasharray: @arc * @perimeter, @perimeter; + stroke-dashoffset: 0; + } + 100% { + stroke-dasharray: 1 @perimeter; + stroke-dashoffset: -@arc * @perimeter; + } + } + @keyframes preloader-arc { + 0% { + stroke-dasharray: 1 @perimeter; + stroke-dashoffset: 0; + } + 40% { + stroke-dasharray: @arc * @perimeter, @perimeter; + stroke-dashoffset: 0; + } + 100% { + stroke-dasharray: 1 @perimeter; + stroke-dashoffset: -@arc * @perimeter; + } + } +} +.preloader-inner { + @preloader-inner-ease: cubic-bezier(0.35, 0, 0.25, 1); + @preloader-inner-duration: 5.25s; + @preloader-inner-circle-duration: @preloader-inner-duration * 0.25; + @preloader-inner-outer-duration: @preloader-inner-duration * (5/9); + + position: relative; + display: block; + width: 100%; + height: 100%; + -webkit-animation: preloader-inner-rotate @preloader-inner-duration @preloader-inner-ease infinite; + animation: preloader-inner-rotate @preloader-inner-duration @preloader-inner-ease infinite; + .preloader-inner-gap { + position: absolute; + width: 2px; + left: 50%; + margin-left: -1px; + top: 0; + bottom: 0; + box-sizing: border-box; + border-top: 4px solid #757575; + } + .preloader-inner-left, .preloader-inner-right { + position: absolute; + top: 0; + height: 100%; + width: 50%; + overflow: hidden; + } + .preloader-inner-half-circle { + position: absolute; + top: 0; + height: 100%; + width: 200%; + box-sizing: border-box; + border: 4px solid #757575; + border-bottom-color: transparent !important; + border-radius: 50%; + -webkit-animation-iteration-count: infinite; + -webkit-animation-duration: (@preloader-inner-duration * 0.25); + -webkit-animation-timing-function: @preloader-inner-ease; + animation-iteration-count: infinite; + animation-duration: (@preloader-inner-duration * 0.25); + animation-timing-function: @preloader-inner-ease; + } + .preloader-white & { + .preloader-inner-gap, .preloader-inner-half-circle { + border-color: #fff; + } + } + .preloader-inner-left { + left: 0; + .preloader-inner-half-circle { + left: 0; + border-right-color: transparent !important; + -webkit-animation-name: preloader-left-rotate; + animation-name: preloader-left-rotate; + } + } + .preloader-inner-right { + right: 0; + .preloader-inner-half-circle { + right: 0; + border-left-color: transparent !important; + -webkit-animation-name: preloader-right-rotate; + animation-name: preloader-right-rotate; + } + } + .color-multi & { + .preloader-inner-left { + .preloader-inner-half-circle { + -webkit-animation-name: preloader-left-rotate-multicolor; + animation-name: preloader-left-rotate-multicolor; + } + } + .preloader-inner-right { + .preloader-inner-half-circle { + -webkit-animation-name: preloader-right-rotate-multicolor; + animation-name: preloader-right-rotate-multicolor; + } + } + } +} +@-webkit-keyframes preloader-left-rotate { + 0%, 100% { + -webkit-transform: rotate(130deg); + } + 50% { + -webkit-transform: rotate(-5deg); + } +} +@keyframes preloader-left-rotate { + 0%, 100% { + transform: rotate(130deg); + } + 50% { + transform: rotate(-5deg); + } +} +@-webkit-keyframes preloader-right-rotate { + 0%, 100% { + -webkit-transform: rotate(-130deg); + } + 50% { + -webkit-transform: rotate(5deg); + } +} +@keyframes preloader-right-rotate { + 0%, 100% { + transform: rotate(-130deg); + } + 50% { + transform: rotate(5deg); + } +} + +@-webkit-keyframes preloader-inner-rotate { + 12.5% { + -webkit-transform: rotate(135deg); + } + 25% { + -webkit-transform: rotate(270deg); + } + 37.5% { + -webkit-transform: rotate(405deg); + } + 50% { + -webkit-transform: rotate(540deg); + } + 62.5% { + -webkit-transform: rotate(675deg); + } + 75% { + -webkit-transform: rotate(810deg); + } + 87.5% { + -webkit-transform: rotate(945deg); + } + 100% { + -webkit-transform: rotate(1080deg); + } +} +@keyframes preloader-inner-rotate { + 12.5% { + transform: rotate(135deg); + } + 25% { + transform: rotate(270deg); + } + 37.5% { + transform: rotate(405deg); + } + 50% { + transform: rotate(540deg); + } + 62.5% { + transform: rotate(675deg); + } + 75% { + transform: rotate(810deg); + } + 87.5% { + transform: rotate(945deg); + } + 100% { + transform: rotate(1080deg); + } +} +@-webkit-keyframes preloader-left-rotate-multicolor { + 0%, + 100% { + border-left-color: #4285F4; + -webkit-transform: rotate(130deg); + } + 75% { + border-left-color: #1B9A59; + border-top-color: #1B9A59; + } + 50% { + border-left-color: #F7C223; + border-top-color: #F7C223; + -webkit-transform: rotate(-5deg); + } + 25% { + border-left-color: #DE3E35; + border-top-color: #DE3E35; + } +} +@keyframes preloader-left-rotate-multicolor { + 0%, + 100% { + border-left-color: #4285F4; + transform: rotate(130deg); + } + 75% { + border-left-color: #1B9A59; + border-top-color: #1B9A59; + } + 50% { + border-left-color: #F7C223; + border-top-color: #F7C223; + transform: rotate(-5deg); + } + 25% { + border-left-color: #DE3E35; + border-top-color: #DE3E35; + } +} +@-webkit-keyframes preloader-right-rotate-multicolor { + 0%, + 100% { + border-right-color: #4285F4; + -webkit-transform: rotate(-130deg); + } + 75% { + border-right-color: #1B9A59; + border-top-color: #1B9A59; + } + 50% { + border-right-color: #F7C223; + border-top-color: #F7C223; + -webkit-transform: rotate(5deg); + } + 25% { + border-top-color: #DE3E35; + border-right-color: #DE3E35; + } +} +@keyframes preloader-right-rotate-multicolor { + 0%, + 100% { + border-right-color: #4285F4; + transform: rotate(-130deg); + } + 75% { + border-right-color: #1B9A59; + border-top-color: #1B9A59; + } + 50% { + border-right-color: #F7C223; + border-top-color: #F7C223; + transform: rotate(5deg); + } + 25% { + border-top-color: #DE3E35; + border-right-color: #DE3E35; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/progressbar.less b/bower_components/framework7/src/less/material/progressbar.less new file mode 100644 index 00000000..eb4c0e32 --- /dev/null +++ b/bower_components/framework7/src/less/material/progressbar.less @@ -0,0 +1,296 @@ +/* === Progress Bar === */ +.progressbar, .progressbar-infinite { + height: 4px; + width: 100%; + overflow: hidden; + display: block; + position: relative; + .transform-origin(center bottom); + background: rgba(red(@themeColor), green(@themeColor), blue(@themeColor), 0.5); +} +// Determined +.progressbar { + display: block; + vertical-align: middle; + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; + span { + content: ''; + width: 100%; + background: @themeColor; + height: 100%; + position: absolute; + left: 0; + top: 0; + .translate3d(-100%, 0, 0); + .transition(150ms); + } +} +// Infinite +.progressbar-infinite { + z-index: 15000; + &:before, &:after { + content: ''; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: @themeColor; + .transform-origin(left center); + } + &:before { + .animation(progressbar-infinite-1 2s linear infinite); + } + &:after { + .animation(progressbar-infinite-2 2s linear infinite); + } + html.with-statusbar-overlay body > &, html.with-statusbar-overlay .framework7-root > & { + top: 24px; + } + html.with-statusbar-overlay.ios body > &, html.with-statusbar-overlay.ios .framework7-root > & { + top: 20px; + } +} + + +// Multicolor +.progressbar-infinite.color-multi { + background: none !important; + &:before, &:after { + width: 100%; + animation: none; + } + &:before { + background: none; + .animation(progressbar-infinite-multicolor-bg 3s step-end infinite); + } + &:after { + background: none; + .animation(progressbar-infinite-multicolor-fill 3s linear infinite); + .transform-origin(center center); + } +} + +body, .view, .views, .page, .panel, .popup, .framework7-root { + > .progressbar, > .progressbar-infinite { + position: absolute; + left: 0; + top: 0; + z-index: 15000; + .transform-origin(center top); + } +} +// Animations +.progressbar-in { + .animation(progressbar-in 300ms forwards); +} +.progressbar-out { + .animation(progressbar-out 300ms forwards); +} + +html.with-statusbar-overlay body > .progressbar, html.with-statusbar-overlay .framework7-root > .progressbar { + top: 24px; +} +html.with-statusbar-overlay.ios body > .progressbar, html.with-statusbar-overlay.ios .framework7-root > .progressbar { + top: 20px; +} +@-webkit-keyframes progressbar-in { + from { + opacity: 0; + -webkit-transform: scaleY(0); + } + to { + opacity: 1; + -webkit-transform: scaleY(1); + } +} +@keyframes progressbar-in { + from { + opacity: 0; + transform: scaleY(0); + } + to { + opacity: 1; + transform: scaleY(1); + } +} +@-webkit-keyframes progressbar-out { + from { + opacity: 1; + -webkit-transform: scaleY(1); + } + to { + opacity: 0; + -webkit-transform: scaleY(0); + } +} +@keyframes progressbar-out { + from { + opacity: 1; + transform: scaleY(1); + } + to { + opacity: 0; + transform: scaleY(0); + } +} +@-webkit-keyframes progressbar-infinite-1 { + 0% { + -webkit-transform: translateX(-10%) scaleX(0.1); + } + 25% { + -webkit-transform: translateX(30%) scaleX(0.6); + } + 50% { + -webkit-transform: translateX(100%) scaleX(1); + } + 100% { + -webkit-transform: translateX(100%) scaleX(1); + } +} +@keyframes progressbar-infinite-1 { + 0% { + transform: translateX(-10%) scaleX(0.1); + } + 25% { + transform: translateX(30%) scaleX(0.6); + } + 50% { + transform: translateX(100%) scaleX(1); + } + 100% { + transform: translateX(100%) scaleX(1); + } +} +@-webkit-keyframes progressbar-infinite-2 { + 0% { + -webkit-transform: translateX(-100%) scaleX(1); + } + 40% { + -webkit-transform: translateX(-100%) scaleX(1); + } + 75% { + -webkit-transform: translateX(60%) scaleX(0.35); + } + 90% { + -webkit-transform: translateX(100%) scaleX(0.1); + } + 100% { + -webkit-transform: translateX(100%) scaleX(0.1); + } +} +@keyframes progressbar-infinite-2 { + 0% { + transform: translateX(-100%) scaleX(1); + } + 40% { + transform: translateX(-100%) scaleX(1); + } + 75% { + transform: translateX(60%) scaleX(0.35); + } + 90% { + transform: translateX(100%) scaleX(0.1); + } + 100% { + transform: translateX(100%) scaleX(0.1); + } +} + +@-webkit-keyframes progressbar-infinite-multicolor-bg { + 0% { + background-color: @green; + } + 25% { + background-color: @red; + } + 50% { + background-color: @blue; + } + 75% { + background-color: @yellow; + } +} +@keyframes progressbar-infinite-multicolor-bg { + 0% { + background-color: @green; + } + 25% { + background-color: @red; + } + 50% { + background-color: @blue; + } + 75% { + background-color: @yellow; + } +} +@-webkit-keyframes progressbar-infinite-multicolor-fill { + 0% { + -webkit-transform: scaleX(0); + background-color: @red; + } + 24.9% { + -webkit-transform: scaleX(1); + background-color: @red; + } + 25% { + -webkit-transform: scaleX(0); + background-color: @blue; + } + 49.9% { + -webkit-transform: scaleX(1); + background-color: @blue; + } + 50% { + -webkit-transform: scaleX(0); + background-color: @yellow; + } + 74.9% { + -webkit-transform: scaleX(1); + background-color: @yellow; + } + 75% { + -webkit-transform: scaleX(0); + background-color: @green; + } + 100% { + -webkit-transform: scaleX(1); + background-color: @green; + } +} +@keyframes progressbar-infinite-multicolor-fill { + 0% { + transform: scaleX(0); + background-color: @red; + } + 24.9% { + transform: scaleX(1); + background-color: @red; + } + 25% { + transform: scaleX(0); + background-color: @blue; + } + 49.9% { + transform: scaleX(1); + background-color: @blue; + } + 50% { + transform: scaleX(0); + background-color: @yellow; + } + 74.9% { + transform: scaleX(1); + background-color: @yellow; + } + 75% { + transform: scaleX(0); + background-color: @green; + } + 100% { + transform: scaleX(1); + background-color: @green; + } +} diff --git a/bower_components/framework7/src/less/material/pull-to-refresh.less b/bower_components/framework7/src/less/material/pull-to-refresh.less new file mode 100644 index 00000000..6e69310e --- /dev/null +++ b/bower_components/framework7/src/less/material/pull-to-refresh.less @@ -0,0 +1,69 @@ +/* === Pull To Refresh === */ +.pull-to-refresh-layer { + position: relative; + margin-top: -@toolbarSize; + left:0; + top:0; + width:100%; + height:@toolbarSize; + + .preloader { + position: absolute; + left: 50%; + top: 50%; + margin-left: -16px; + margin-top: -16px; + visibility: hidden; + + } + .pull-to-refresh-arrow { + width: 24px; + height: 24px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -12px; + margin-top: -12px; + background: no-repeat center; + .encoded-svg-background(""); + z-index: 10; + .transform(rotate(0deg) translate3d(0,0,0)); + .transition(300ms); + } + +} +.pull-to-refresh-content { + &.pull-to-refresh-no-navbar { + margin-top: -@toolbarSize; + height: ~"-webkit-calc(100% + @{toolbarSize})"; + height: ~"-moz-calc(100% + @{toolbarSize})"; + height: ~"calc(100% + @{toolbarSize})"; + .pull-to-refresh-layer { + margin-top: 0; + } + } + &.transitioning, &.refreshing { + .transition(400ms); + } + &:not(.refreshing) { + .pull-to-refresh-layer .preloader { + .animation(none); + } + } + &.refreshing { + .translate3d(0,@toolbarSize,0); + .pull-to-refresh-arrow { + visibility: hidden; + .transition(0ms); + } + .preloader { + visibility: visible; + } + } + &.pull-up { + .pull-to-refresh-arrow { + .transform(rotate(180deg) translate3d(0,0,0)); + } + } + +} diff --git a/bower_components/framework7/src/less/material/ripple.less b/bower_components/framework7/src/less/material/ripple.less new file mode 100644 index 00000000..d16d87de --- /dev/null +++ b/bower_components/framework7/src/less/material/ripple.less @@ -0,0 +1,53 @@ +/* === Touch ripple === */ +// Ripple Elements +.ripple, a.floating-button, .floating-button > a, a.link, a.item-link, .button, .modal-button, .tab-link, .label-radio, .label-checkbox, .actions-modal-button, .speed-dial-buttons a { + -webkit-user-select: none; + user-select: none; +} +// Ripple +.ripple-wave { + left: 0; + top: 0; + position: absolute !important; + border-radius: 50%; + pointer-events: none; + z-index:-1; + background:rgba(0,0,0,0.1); + padding: 0; + margin: 0; + font-size: 0; + .transform(translate3d(0px, 0px, 0) scale(0)); + .transition(1400ms); + &.ripple-wave-fill { + .transition(300ms); + opacity: 0.35; + } + &.ripple-wave-out { + .transition(600ms); + opacity: 0; + } + .button-fill &, .picker-calendar-day &{ + z-index: 1; + } +} +.button-fill, .navbar, .toolbar, .subnavbar, .searchbar, .notifications, .floating-button, .speed-dial-buttons a { + .ripple-wave { + background:rgba(255,255,255,0.3); + } +} +.messagebar { + .ripple-wave { + background:rgba(0,0,0,0.1); + } +} +.data-table .sortable-cell { + .ripple-wave { + z-index: 0; + } +} +.form-checkbox, .form-radio { + .ripple-wave { + background: rgba(red(@themeColor), green(@themeColor), blue(@themeColor), 0.5); + z-index: 0; + } +} diff --git a/bower_components/framework7/src/less/material/searchbar.less b/bower_components/framework7/src/less/material/searchbar.less new file mode 100644 index 00000000..a9720c73 --- /dev/null +++ b/bower_components/framework7/src/less/material/searchbar.less @@ -0,0 +1,125 @@ +/* === Search Bar === */ +@searchbarBorderColor: #b4b4b4; +@searchbarSize: @toolbarSize; +@toolbarShadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); +.searchbar { + height: @searchbarSize; + width: 100%; + background: @themeColor; + box-sizing: border-box; + padding: 0 16px; + overflow: hidden; + position: relative; + .flexbox(); + .align-items(center); + color:#fff; + &.no-shadow { + box-shadow: none; + } + a { + position: relative; + color:#fff; + .active-highlight(); + } + .searchbar-input { + width: 100%; + height: 32px; + position: relative; + .flex-shrink(1); + } + input[type="search"] { + .bars-input(); + height: 100%; + padding: 0 36px 0 24px; + background-color: transparent; + background-repeat: no-repeat; + background-position: 0 center; + opacity: 0.6; + -webkit-background-size: 24px 24px; + background-size: 24px 24px; + .transition(300ms); + .encoded-svg-background(""); + &::-webkit-search-cancel-button { + -webkit-appearance:none; + } + } + .searchbar-clear { + position: absolute; + width: 56px; + height: 100%; + right: -16px; + top: 0; + opacity: 0; + pointer-events:none; + background-position: center; + background-repeat: no-repeat; + .encoded-svg-background(""); + -webkit-background-size: 24px 24px; + background-size: 24px 24px; + .transition(300ms); + cursor: pointer; + } + .searchbar-cancel { + display: none; + } + &.searchbar-active { + input[type="search"] { + opacity: 1; + } + .searchbar-clear { + pointer-events: auto; + opacity: 1; + } + } + &.searchbar-not-empty { + .searchbar-clear { + pointer-events: auto; + opacity: 1; + } + } +} +.searchbar-overlay { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + z-index: 100; + opacity: 0; + pointer-events:none; + background: rgba(0,0,0,0.25); + .transition(300ms); + .translate3d(0,0,0); + &.searchbar-overlay-active { + opacity: 1; + pointer-events: auto; + } +} +.searchbar-not-found { + display: none; +} +.hidden-by-searchbar, .list-block .hidden-by-searchbar, .list-block li.hidden-by-searchbar { + display: none; +} +.page > .searchbar { + position: absolute; + width: 100%; + left: 0; + top: 0; + z-index: 200; + box-shadow: @toolbarShadow; + & ~ .page-content { + padding-top: @searchbarSize; + } + &.no-shadow { + box-shadow: none; + } +} +.navbar-fixed, .navbar-through { + .page > .searchbar, > .searchbar { + top: @navbarSize; + & ~ .page-content { + padding-top: @searchbarSize + @navbarSize; + } + } +} diff --git a/bower_components/framework7/src/less/material/statusbar.less b/bower_components/framework7/src/less/material/statusbar.less new file mode 100644 index 00000000..06320621 --- /dev/null +++ b/bower_components/framework7/src/less/material/statusbar.less @@ -0,0 +1,31 @@ +/* === Statusbar overlay === */ +html.with-statusbar-overlay .framework7-root { + padding-top: 24px; + box-sizing: border-box; + .statusbar-overlay { + display: block; + } + .panel { + padding-top: 24px; + } +} +.statusbar-overlay { + background: @darkThemeColor; + z-index: 10000; // A bit lower than .modals-overlay + position: absolute; + left: 0; + top: 0; + height: 24px; + width: 100%; + display: none; + .transition(@panelsDuration); +} +html.with-statusbar-overlay.ios .framework7-root { + padding-top: 20px; + .panel { + padding-top: 20px; + } +} +html.ios .statusbar-overlay { + height: 20px; +} diff --git a/bower_components/framework7/src/less/material/swiper.less b/bower_components/framework7/src/less/material/swiper.less new file mode 100644 index 00000000..ed0d9e5d --- /dev/null +++ b/bower_components/framework7/src/less/material/swiper.less @@ -0,0 +1,466 @@ +/* === Swiper === */ +.swiper-container { + margin-left: auto; + margin-right: auto; + position:relative; + overflow:hidden; + /* Fix of Webkit flickering */ + z-index:1; +} +.swiper-container-no-flexbox { + .swiper-slide { + float: left; + } +} +.swiper-container-vertical > .swiper-wrapper{ + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; +} +.swiper-wrapper { + position:relative; + width: 100%; + height: 100%; + z-index: 1; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + + -webkit-transition-property:-webkit-transform; + -moz-transition-property:-moz-transform; + -o-transition-property:-o-transform; + -ms-transition-property:-ms-transform; + transition-property:transform; + + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +.swiper-container-android .swiper-slide, .swiper-wrapper { + -webkit-transform:translate3d(0px,0,0); + -moz-transform:translate3d(0px,0,0); + -o-transform:translate(0px,0px); + -ms-transform:translate3d(0px,0,0); + transform:translate3d(0px,0,0); +} +.swiper-container-multirow > .swiper-wrapper { + -webkit-box-lines: multiple; + -moz-box-lines: multiple; + -ms-flex-wrap: wrap; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; +} +.swiper-container-free-mode > .swiper-wrapper { + -webkit-transition-timing-function: ease-out; + -moz-transition-timing-function: ease-out; + -ms-transition-timing-function: ease-out; + -o-transition-timing-function: ease-out; + transition-timing-function: ease-out; + margin: 0 auto; +} +.swiper-slide { + -webkit-flex-shrink: 0; + -ms-flex: 0 0 auto; + flex-shrink: 0; + width: 100%; + height: 100%; + position: relative; +} +/* Auto Height */ +.swiper-container-autoheight, .swiper-container-autoheight .swiper-slide { + height: auto; +} +.swiper-container-autoheight .swiper-wrapper { + -webkit-box-align: start; + -ms-flex-align: start; + -webkit-align-items: flex-start; + align-items: flex-start; + -webkit-transition-property: -webkit-transform, height; + -moz-transition-property: -moz-transform; + -o-transition-property: -o-transform; + -ms-transition-property: -ms-transform; + transition-property: transform, height; +} +/* a11y */ +.swiper-container .swiper-notification { + position: absolute; + left: 0; + top: 0; + pointer-events: none; + opacity: 0; + z-index: -1000; +} + +/* IE10 Windows Phone 8 Fixes */ +.swiper-wp8-horizontal { + -ms-touch-action: pan-y; + touch-action: pan-y; +} +.swiper-wp8-vertical { + -ms-touch-action: pan-x; + touch-action: pan-x; +} +/* Arrows */ +.swiper-button-prev, .swiper-button-next { + position: absolute; + top: 50%; + width: 27px; + height: 44px; + margin-top: -22px; + z-index: 10; + cursor: pointer; + -moz-background-size: 27px 44px; + -webkit-background-size: 27px 44px; + background-size: 27px 44px; + background-position: center; + background-repeat: no-repeat; + &.swiper-button-disabled { + opacity: 0.35; + cursor: auto; + pointer-events: none; + } +} +.swiper-button-prev, .swiper-container-rtl .swiper-button-next { + .encoded-svg-background(""); + left: 10px; + right: auto; +} +.swiper-button-next, .swiper-container-rtl .swiper-button-prev { + .encoded-svg-background(""); + right: 10px; + left: auto; +} + +/* Pagination Styles */ +.swiper-pagination { + position: absolute; + text-align: center; + -webkit-transition: 300ms; + -moz-transition: 300ms; + -o-transition: 300ms; + transition: 300ms; + -webkit-transform: translate3d(0,0,0); + -ms-transform: translate3d(0,0,0); + -o-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); + z-index: 10; + &.swiper-pagination-hidden { + opacity: 0; + } +} +/* Common Styles */ +.swiper-pagination-fraction, .swiper-pagination-custom, .swiper-container-horizontal > .swiper-pagination-bullets{ + bottom: 10px; + left: 0; + width: 100%; +} +/* Bullets */ +.swiper-pagination-bullet { + width: 8px; + height: 8px; + display: inline-block; + border-radius: 100%; + background: #000; + opacity: 0.2; + button& { + border: none; + margin: 0; + padding: 0; + box-shadow: none; + -moz-appearance: none; + -ms-appearance: none; + -webkit-appearance: none; + appearance: none; + } + .swiper-pagination-clickable & { + cursor: pointer; + } +} +.swiper-pagination-bullet-active { + opacity: 1; + background: #007aff; +} +.swiper-container-vertical { + > .swiper-pagination-bullets { + right: 10px; + top: 50%; + -webkit-transform:translate3d(0px,-50%,0); + -moz-transform:translate3d(0px,-50%,0); + -o-transform:translate(0px,-50%); + -ms-transform:translate3d(0px,-50%,0); + transform:translate3d(0px,-50%,0); + .swiper-pagination-bullet { + margin: 5px 0; + display: block; + } + } +} +.swiper-container-horizontal { + > .swiper-pagination-bullets { + .swiper-pagination-bullet { + margin: 0 5px; + } + } +} +/* Progress */ +.swiper-pagination-progress { + background: rgba(0,0,0,0.25); + position: absolute; + .swiper-pagination-progressbar { + background: #007aff; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + -webkit-transform: scale(0); + -ms-transform: scale(0); + -o-transform: scale(0); + transform: scale(0); + -webkit-transform-origin: left top; + -moz-transform-origin: left top; + -ms-transform-origin: left top; + -o-transform-origin: left top; + transform-origin: left top; + } + .swiper-container-rtl & .swiper-pagination-progressbar { + -webkit-transform-origin: right top; + -moz-transform-origin: right top; + -ms-transform-origin: right top; + -o-transform-origin: right top; + transform-origin: right top; + } + .swiper-container-horizontal > & { + width: 100%; + height: 4px; + left: 0; + top: 0; + } + .swiper-container-vertical > & { + width: 4px; + height: 100%; + left: 0; + top: 0; + } +} +/* 3D Container */ +.swiper-container-3d { + -webkit-perspective: 1200px; + -moz-perspective: 1200px; + -o-perspective: 1200px; + perspective: 1200px; + .swiper-wrapper, .swiper-slide, .swiper-slide-shadow-left, .swiper-slide-shadow-right, .swiper-slide-shadow-top, .swiper-slide-shadow-bottom, .swiper-cube-shadow { + .preserve3d(); + } + .swiper-slide-shadow-left, .swiper-slide-shadow-right, .swiper-slide-shadow-top, .swiper-slide-shadow-bottom { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + pointer-events: none; + z-index: 10; + } + .swiper-slide-shadow-left { + background-image: -webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */ + background-image: linear-gradient(to left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */ + } + .swiper-slide-shadow-right { + background-image: -webkit-gradient(linear, right top, left top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(left, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */ + background-image: linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */ + } + .swiper-slide-shadow-top { + background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */ + background-image: linear-gradient(to top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */ + } + .swiper-slide-shadow-bottom { + background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0))); /* Safari 4+, Chrome */ + background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Chrome 10+, Safari 5.1+, iOS 5+ */ + background-image: -moz-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 3.6-15 */ + background-image: -o-linear-gradient(top, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Opera 11.10-12.00 */ + background-image: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0)); /* Firefox 16+, IE10, Opera 12.50+ */ + } +} +/* Coverflow */ +.swiper-container-coverflow, .swiper-container-flip { + .swiper-wrapper { + /* Windows 8 IE 10 fix */ + -ms-perspective:1200px; + } +} +/* Cube + Flip */ +.swiper-container-cube, .swiper-container-flip { + overflow: visible; + .swiper-slide { + pointer-events: none; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; + z-index: 1; + .swiper-slide { + pointer-events: none; + } + } + .swiper-slide-active { + &, & .swiper-slide-active { + pointer-events: auto; + } + } + .swiper-slide-shadow-top, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left, .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + backface-visibility: hidden; + } +} +/* Cube */ +.swiper-container-cube { + .swiper-slide { + visibility: hidden; + -webkit-transform-origin: 0 0; + -moz-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + width: 100%; + height: 100%; + } + &.swiper-container-rtl .swiper-slide{ + -webkit-transform-origin: 100% 0; + -moz-transform-origin: 100% 0; + -ms-transform-origin: 100% 0; + transform-origin: 100% 0; + } + .swiper-slide-active, .swiper-slide-next, .swiper-slide-prev, .swiper-slide-next + .swiper-slide { + pointer-events: auto; + visibility: visible; + } + .swiper-cube-shadow { + position: absolute; + left: 0; + bottom: 0px; + width: 100%; + height: 100%; + background: #000; + opacity: 0.6; + -webkit-filter: blur(50px); + filter: blur(50px); + z-index: 0; + } +} +/* Fade */ +.swiper-container-fade { + &.swiper-container-free-mode { + .swiper-slide { + -webkit-transition-timing-function: ease-out; + -moz-transition-timing-function: ease-out; + -ms-transition-timing-function: ease-out; + -o-transition-timing-function: ease-out; + transition-timing-function: ease-out; + } + } + .swiper-slide { + pointer-events: none; + -webkit-transition-property: opacity; + -moz-transition-property: opacity; + -o-transition-property: opacity; + transition-property: opacity; + .swiper-slide { + pointer-events: none; + } + } + .swiper-slide-active { + &, & .swiper-slide-active { + pointer-events: auto; + } + } +} +.swiper-zoom-container { + width: 100%; + height: 100%; + + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + + -webkit-box-pack: center; + -moz-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + + -webkit-box-align: center; + -moz-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + align-items: center; + + text-align: center; + > img, > svg, > canvas { + max-width: 100%; + max-height: 100%; + object-fit: contain; + } +} +/* Scrollbar */ +.swiper-scrollbar { + border-radius: 10px; + position: relative; + -ms-touch-action: none; + background: rgba(0,0,0,0.1); + .swiper-container-horizontal > & { + position: absolute; + left: 1%; + bottom: 3px; + z-index: 50; + height: 5px; + width: 98%; + } + .swiper-container-vertical > & { + position: absolute; + right: 3px; + top: 1%; + z-index: 50; + width: 5px; + height: 98%; + } +} +.swiper-scrollbar-drag { + height: 100%; + width: 100%; + position: relative; + background: rgba(0,0,0,0.5); + border-radius: 10px; + left: 0; + top: 0; +} +.swiper-scrollbar-cursor-drag { + cursor: move; +} +/* Preloader */ +.swiper-slide .preloader { + width: 42px; + height: 42px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -21px; + margin-top: -21px; + z-index: 10; +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/tabs.less b/bower_components/framework7/src/less/material/tabs.less new file mode 100644 index 00000000..edd72762 --- /dev/null +++ b/bower_components/framework7/src/less/material/tabs.less @@ -0,0 +1,34 @@ +/* === Tabs === */ +.tabs { + .tab { + display: none; + } + .tab.active { + display: block; + } +} +.tabs-animated-wrap { + position: relative; + width: 100%; + overflow: hidden; + height: 100%; + >.tabs { + .flexbox(); + height: 100%; + .transition(300ms); + >.tab { + width: 100%; + display: block; + .flex-shrink(0); + } + } + &.not-animated > .tabs { + .transition(0ms); + } +} +.tabs-swipeable-wrap { + height: 100%; + > .tabs > .tab { + display: block; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/timeline.less b/bower_components/framework7/src/less/material/timeline.less new file mode 100644 index 00000000..6e15b355 --- /dev/null +++ b/bower_components/framework7/src/less/material/timeline.less @@ -0,0 +1,273 @@ +/* === Timeline === */ +.timeline { + margin: 32px 0; + padding: 0 16px; + box-sizing: border-box; + .content-block-inner & { + padding: 0; + margin: 0; + } +} +.timeline-item { + .flexbox(); + .justify-content(flex-start); + position: relative; + overflow: hidden; + padding: 2px 0px 16px; + box-sizing: border-box; + position: relative; + &:last-child { + padding-bottom: 2px; + } +} +.timeline-item-date { + .flex-shrink(0); + width: 50px; + text-align: right; + box-sizing: border-box; + small { + font-size: 10px; + } +} +.timeline-item-content { + margin: 2px; + min-width: 0; + position: relative; + .flex-shrink(10); + p, ul, ol, h1, h2, h3, h4 { + &:first-child { + margin-top: 0; + } + &:last-child { + margin-bottom: 0; + } + } + .card, &.card, .list-block, &.list-block, .content-block, &.content-block { + margin: 0; + width: 100%; + } + .card, .list-block, .content-block { + + .card, + .list-block, + .content-block { + margin: 16px 0 0; + } + } +} +.timeline-item-inner { + border-radius: 2px; + padding: 8px 16px; + background: #fff; + box-sizing: border-box; + .depth(1); + .content-block { + padding: 0; + color: inherit; + } + .content-block-inner { + .hairline-remove(top); + .hairline-remove(bottom); + padding-left: 0; + padding-right: 0; + margin: 0; + } + .list-block { + ul { + .hairline-remove(top); + .hairline-remove(bottom); + } + } + + .timeline-item-inner { + margin-top: 16px; + } +} +.timeline-item-divider { + width: 1px; + margin: 0 16px; + position: relative; + width: 10px; + height: 10px; + background: #bbb; + border-radius: 50%; + margin-top: 3px; + .flex-shrink(0); + &:after, &:before { + content: ' '; + width: 1px; + height: 100vh; + position: absolute; + left: 50%; + background: inherit; + .transform(translate3d(-50%, 0, 0)); + } + &:after { + top: 100%; + } + &:before { + bottom: 100%; + } + .timeline-item:last-child &:after { + display: none; + } + .timeline-item:first-child &:before { + display: none; + } +} +.timeline-item-time { + color: rgba(0, 0, 0, 0.54); + margin-top: 16px; + font-size: 13px; + &:first-child { + margin-top: 0; + } + .timeline-item-title + & { + margin-top: 0; + } +} +.timeline-item-title { + font-size: 16px; +} +.timelineItemLeft() { + -webkit-box-direction: reverse; + -moz-box-direction: reverse; + -ms-flex-direction: row-reverse; + -webkit-flex-direction: row-reverse; + flex-direction: row-reverse; + margin-right: ~"-moz-calc(50% - (32px + 10px) / 2 - 50px)"; + margin-right: ~"-webkit-calc(50% - (32px + 10px) / 2 - 50px)"; + margin-right: ~"calc(50% - (32px + 10px) / 2 - 50px)"; + margin-left: 0; + .timeline-item-date { + text-align: left; + } +} +.timelineItemRight() { + margin-left: ~"-moz-calc(50% - (32px + 10px) / 2 - 50px)"; + margin-left: ~"-webkit-calc(50% - (32px + 10px) / 2 - 50px)"; + margin-left: ~"calc(50% - (32px + 10px) / 2 - 50px)"; + margin-right: 0; + .timeline-item-date { + text-align: right; + } +} +.timeline-sides { + .timeline-item { + .timelineItemRight(); + &:not(.timeline-item-right):nth-child(2n) { + .timelineItemLeft(); + } + } + .timeline-item-left { + .timelineItemLeft() + } + .timeline-item-right { + .timelineItemRight(); + } +} +@media (min-width:768px) { + .tablet-sides { + .timeline-sides; + } +} +.timeline-horizontal { + padding: 0; + margin: 0; + height: 100%; + .flexbox(); + position: relative; + .timeline-item { + display: block; + width: 100/3vw; + margin: 0; + padding: 0; + .flex-shrink(0); + padding-top: 34px; + padding-bottom: 12px; + position: relative; + height: 100%; + .hairline(right, @contentBlockBorderColor); + .hairline(top, @contentBlockBorderColor); + } + .timeline-item-date { + background: @toolbarBg; + width: auto; + text-align: left; + padding: 0px 12px; + line-height: 34px; + .hairline(bottom, @contentBlockBorderColor); + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 34px; + color:#fff; + } + .timeline-item-content { + padding: 12px; + overflow: auto; + -webkit-overflow-scrolling: touch; + margin: 0; + height: ~"-webkit-calc(100% - 12px)"; + height: ~"-moz-calc(100% - 12px)"; + height: ~"calc(100% - 12px)"; + } + .timeline-item-divider { + display: none; + } + @cols: 5, 10, 15, 20, 25, 30, 100/3, 35, 40, 45, 50, 55, 60, 65, 100*(2/3), 70, 75, 80, 85, 90, 95, 100; + .-(@i: length(@cols)) when (@i > 0) { + @divider: e(extract(@cols, @i)); + @className: `Math.floor(@{divider})`; + &.col-@{className} .timeline-item { + width: ~"@{divider}vw"; + } + .-((@i - 1)); + } .-; + @media all and (min-width:768px) { + .-(@i: length(@cols)) when (@i > 0) { + @divider: e(extract(@cols, @i)); + @className: `Math.floor(@{divider})`; + &.tablet-@{className} .timeline-item { + width: ~"@{divider}vw"; + } + .-((@i - 1)); + } .-; + } +} +@timelineMonthYearHeight: 24px; +.timeline-year, .timeline-month { + .flexbox(); + .flex-shrink(0); + padding-top: @timelineMonthYearHeight; + position: relative; + box-sizing: border-box; + height: 100%; +} +.timeline-year-title, .timeline-month-title { + position: absolute; + left: 0; + top: 0; + width: 100%; + line-height: @timelineMonthYearHeight; + height: @timelineMonthYearHeight; + padding: 0 12px; + box-sizing: border-box; + background: @toolbarBg; + color: #fff; + span { + display: inline-block; + position: -webkit-sticky; + position: -moz-sticky; + position: sticky; + left: 12px; + } +} +.timeline-year-title { + font-size: 16px; + span { + margin-top: 2px; + } +} +.timeline-month-title { + span { + margin-top: -2px; + } +} \ No newline at end of file diff --git a/bower_components/framework7/src/less/material/toolbars-pages.less b/bower_components/framework7/src/less/material/toolbars-pages.less new file mode 100644 index 00000000..6799624e --- /dev/null +++ b/bower_components/framework7/src/less/material/toolbars-pages.less @@ -0,0 +1,212 @@ +@toolbarShadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); +@subnavbarShadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.2), 0px 4px 4px 0px rgba(0, 0, 0, 0.14), 0px 1px 1px 0px rgba(0, 0, 0, 0.12); +@toolbarBottomShadow: 0px -2px 4px -1px rgba(0, 0, 0, 0.2), 0px -4px 5px 0px rgba(0, 0, 0, 0.14), 0px -1px 10px 0px rgba(0, 0, 0, 0.12); +@toolbarShadowHidden: 0px 2px 4px -1px rgba(0, 0, 0, 0), 0px 4px 5px 0px rgba(0, 0, 0, 0), 0px 1px 10px 0px rgba(0, 0, 0, 0); + +/* === Relation between toolbar/navbar types and pages === */ +.page, .view, .views{ + >.navbar, >.toolbar { + position: absolute; + } +} +.subnavbar ~ .page-content { + padding-top: @toolbarSize; +} +.toolbar-fixed, .tabbar-fixed { + .page-content { + padding-top: @toolbarSize; + } +} +.tabbar-labels-fixed { + .page-content { + padding-top: @tabbarLabelsSize; + } +} + +.toolbar ~ .page-content { + padding-top: @toolbarSize; +} +.tabbar-labels ~ .page-content { + padding-top: @tabbarLabelsSize; +} +.toolbar-bottom, .messagebar { + ~ .page-content, ~.pages .page-content, ~ .view .page-content { + padding-top: 0; + padding-bottom: @toolbarSize; + } +} +.tabbar-labels.toolbar-bottom { + ~ .page-content, ~.pages .page-content, ~.page .page-content, ~ .view .page-content { + padding-bottom: @tabbarLabelsSize; + } +} +.navbar-fixed, .navbar-through { + .page-content, &.pages .page-content, &.view .page-content { + padding-top: @navbarSize; + } + + &.toolbar-fixed, &.tabbar-fixed, .toolbar-fixed, .tabbar-fixed, .toolbar-fixed &, .tabbar-fixed & { + + .page-content { + padding-top: @navbarSize + @toolbarSize; + } + .toolbar-bottom ~ .pages .page-content, .toolbar-bottom ~ .view .page-content { + padding-top: @navbarSize; + } + } + &.tabbar-labels-fixed, .tabbar-labels-fixed, .tabbar-labels-fixed & { + .page-content { + padding-top: @navbarSize + @tabbarLabelsSize; + } + .toolbar-bottom ~ .pages .page-content, .toolbar-bottom ~ .view .page-content { + padding-top: @navbarSize; + } + } + .toolbar ~ .page-content { + padding-top: @navbarSize + @toolbarSize; + } + .messagebar ~ .page-content, .toolbar-bottom ~ .page-content { + padding-top: @navbarSize; + } + + .tabbar-labels ~ .page-content { + padding-top: @navbarSize + @tabbarLabelsSize; + } + .tabbar-labels.toolbar-bottom ~ .page-content { + padding-top: @navbarSize; + } + + .with-subnavbar .page-content, .page-content.with-subnavbar, .subnavbar ~ .page-content { + padding-top: @navbarSize + @toolbarSize; + } + + .page .subnavbar, &.page .subnavbar { + top: @navbarSize; + } + + .toolbar { + top: @navbarSize; + } + .messagebar, .toolbar-bottom { + top: auto; + } +} +// Page Hidden Navbar +.navbar { + &.navbar-hiding { + .transition(400ms); + .translate3d(0,0,0); + & ~ .page-content, & ~ .pages, & ~ .page { + .list-group-title { + .transition(400ms); + } + .subnavbar { + .transition(400ms); + } + } + & ~ .subnavbar, & ~ .toolbar { + .transition(400ms); + } + } + &.navbar-hidden { + .transition(400ms); + .translate3d(0,-100%,0); + & ~ .page-content, & ~ .pages, & ~ .page { + .list-group-title { + .transition(400ms); + top:-@navbarSize; + } + .subnavbar { + .translate3d(0,-@navbarSize,0); + .transition(400ms); + } + } + & ~ .subnavbar, & ~ .toolbar:not(.messagebar):not(.toolbar-bottom) { + .translate3d(0,-@navbarSize,0); + .transition(400ms); + } + } + &.not-animated { + .transition(0ms); + } +} +.page.no-navbar { + .page-content { + padding-top: 0; + } + &.with-subnavbar .page-content, .with-subnavbar & .page-content, .page-content.with-subnavbar { + padding-top: @toolbarSize; + } +} +// Page Hidden Toolbar +.toolbar, .tabbar { + &.toolbar-hiding, &.tabbar-hiding { + .transition(400ms); + .translate3d(0,0,0); + } + &.toolbar-hidden, &.tabbar-hidden { + .transition(400ms); + } + &.not-animated { + .transition(0ms); + } + + &.toolbar-hidden, &.tabbar-hidden { + .translate3d(0,-100%,0); + } + .navbar ~ &.toolbar-hidden:not(.messagebar):not(.toolbar-bottom), .navbar ~ &.tabbar-hidden { + .translate3d(0,-104px,0); + } + .navbar ~ &.tabbar-labels.toolbar-hidden { + .translate3d(0,-128px,0); + } + &.toolbar-hidden.messagebar, &.toolbar-hidden.toolbar-bottom { + .translate3d(0, 100%,0); + } + +} +.page.no-toolbar .page-content, .page.no-tabbar .page-content { + padding-bottom: 0; +} + +// Shadows +.navbar, .toolbar { + &.no-shadow { + box-shadow: none !important; + } +} +.navbar-fixed, .navbar-through { + .subnavbar { + box-shadow: @subnavbarShadow; + } + .navbar { + box-shadow: @toolbarShadow; + &.navbar-hidden { + box-shadow: @toolbarShadowHidden !important; + } + } +} + +.toolbar-fixed, .tabbar-fixed, .tabbar-labels-fixed { + .toolbar { + box-shadow: @toolbarShadow; + &.toolbar-hidden { + box-shadow: @toolbarShadowHidden !important; + } + } +} +.toolbar-bottom { + .toolbar-fixed &, .tabbar-fixed &, .tabbar-labels-fixed &, & { + box-shadow: @toolbarBottomShadow; + } + &.toolbar-hidden { + box-shadow: @toolbarShadowHidden !important; + } +} +.navbar-fixed, .navbar-through { + &.toolbar-fixed, .toolbar-fixed, &.tabbar-fixed, .tabbar-fixed, &.tabbar-labels-fixed, .tabbar-labels-fixed { + .navbar { + box-shadow: none; + } + } +} diff --git a/bower_components/framework7/src/less/material/toolbars.less b/bower_components/framework7/src/less/material/toolbars.less new file mode 100644 index 00000000..1d39d959 --- /dev/null +++ b/bower_components/framework7/src/less/material/toolbars.less @@ -0,0 +1,296 @@ +/* === Toolbars === */ + +//Toolbar/Navbar +@toolbarBg : @themeColor; +@toolbarColor: #fff; +@toolbarLinksColor: #fff; +@navbarSize: 56px; +@toolbarSize: 48px; + +//Tab bar +@tabbarSize: 48px; +@tabbarLabelsSize: 72px; +@tabbarLinksColor: rgba(255,255,255,0.7); +@tabbarActiveLinksColor: rgba(255,255,255,1); + +// Toolbars animations +@toolbarDuration: 300ms; + +.navbar-inner, .toolbar-inner { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + box-sizing: border-box; + overflow: hidden; + .flexbox(); + .align-items(center); +} +.navbar-inner { + .justify-content(flex-start); +} +.toolbar-inner { + .justify-content(space-between); +} +.navbar-inner.cached { + display: none; +} +.navbar, .toolbar { + width: 100%; + box-sizing: border-box; + position: relative; + margin: 0; + z-index: 500; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + color: @toolbarColor; + b { + font-weight: 500; + } +} +.navbar ~ .toolbar { + z-index: 499; +} +.navbar, .toolbar, .subnavbar { + background: @toolbarBg; + a.link { + text-decoration: none; + position: relative; + color: @toolbarLinksColor; + box-sizing: border-box; + .flexbox(); + .justify-content(center); + .align-items(center); + padding: 0 16px; + min-width: 48px; + .active-highlight(); + i+span, i+i, span+i, span+span { + margin-left: 8px; + } + } + a.icon-only { + min-width: 0; + .flex-shrink(0); + } + i.icon { + display: block; + } +} +.navbar, .subnavbar { + .center { + font-size: 20px; + font-weight: 500; + text-align: center; + margin: 0 16px; + position: relative; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; + line-height: @navbarSize; + display: inline-block; + text-align: left; + } + .left, .right { + .flex-shrink(0); + .flexbox(); + .justify-content(flex-start); + .align-items(center); + .translate3d(0,0,0); + } + .right { + margin-left: auto; + } + .right:first-child { + position: absolute; + right: 16px; + height: 100%; + } +} +.navbar { + left: 0; + top: 0; + height: @navbarSize; + font-size: 20px; + a.link { + line-height: @navbarSize; + height: @navbarSize; + } + .popup & { + .translate3d(0,0,0); + } +} +.subnavbar { + height: @toolbarSize; + width: 100%; + position: absolute; + left: 0; + top: 100%; + z-index: 20; + box-sizing: border-box; + padding: 0 16px; + .flexbox(); + .justify-content(space-between); + .align-items(center); + overflow: hidden; + a.link { + line-height: @toolbarSize; + height: @toolbarSize; + } + .center { + line-height: @toolbarSize; + &:first-child { + margin-left: 56px; + } + } + .navbar.no-border & { + margin-top: 0; + } + .navbar-on-left &, .navbar-on-right &{ + pointer-events: none; + } + .navbar &, .page & { + position: absolute; + } + .page > & { + top: 0; + margin-top: 0; + } + > .buttons-row { + width: 100%; + } + .searchbar, &.searchbar { + position: absolute; + } + &.searchbar, .searchbar { + position: absolute; + } + .searchbar { + left: 0; + top: 0; + } + .center { + + } +} +.toolbar { + left: 0; + bottom: 0; + height: @toolbarSize; + font-size: 14px; + a.link { + line-height: @toolbarSize; + height: @toolbarSize; + } + a { + .flex-shrink(1); + position: relative; + white-space: nowrap; + text-overflow:ellipsis; + } +} + +// Tabbar +.tabbar { + z-index: 5001; + overflow: hidden; + bottom: auto; + top: 0; + .toolbar-inner { + padding-left: 0; + padding-right: 0; + } + a.link { + line-height: 1.4; + } + a.tab-link, a.link { + height: 100%; + width: 100%; + box-sizing: border-box; + padding-left: 0; + padding-right: 0; + .flexbox(); + .justify-content(center); + .align-items(center); + -ms-flex: 1; + -webkit-box-orient: vertical; + -moz-box-orient: vertical; + -ms-flex-direction: column; + -webkit-flex-direction: column; + flex-direction: column; + font-size: 14px; + text-transform: uppercase; + } + i.icon { + height: 24px; + } + a.tab-link { + .transition(300ms); + overflow: hidden; + color: @tabbarLinksColor; + position: relative; + &.active, html:not(.watch-active-state) &:active, &.active-state { + color: @tabbarActiveLinksColor; + } + } + .tab-link-highlight { + position: absolute; + left: 0; + bottom: 0; + height: 3px; + background: darken(@themeColor, 15%); + background: rgba(255,255,255,0.5); + .transition(300ms); + } +} +.tabbar-labels { + height: @tabbarLabelsSize; + a.tab-link, a.link { + padding-top: 12px; + padding-bottom: 12px; + height: 100%; + .justify-content(space-between); + } + span.tabbar-label { + line-height: 1; + display: block; + margin: 0; + margin-top: 10px; + position: relative; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + max-width: 100%; + } + &.toolbar-bottom { + span.tabbar-label { + text-transform: none; + } + } +} +.tabbar-scrollable { + .toolbar-inner { + .justify-content(flex-start); + .no-scrollbar(); + overflow: auto; + } + a.tab-link, a.link { + width: auto; + .flex-shrink(0); + -ms-flex: 0; + padding: 0 16px; + } +} +.toolbar-bottom { + bottom: 0; + top: auto; + .tab-link-highlight { + bottom: auto; + top: 0; + } +} +.subnavbar, .navbar { + input[type="text"], input[type="password"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"] { + .bars-input(); + } +} diff --git a/bower_components/framework7/src/less/material/views.less b/bower_components/framework7/src/less/material/views.less new file mode 100644 index 00000000..56ec2b4b --- /dev/null +++ b/bower_components/framework7/src/less/material/views.less @@ -0,0 +1,14 @@ +/* === Views === */ +.views, .view { + position: relative; + height: 100%; + z-index: 5000; +} +.views { + .scrollable(); +} +.view { + width: 100%; + overflow: hidden; + box-sizing: border-box; +} diff --git a/submissions/createyourdirectoryhere b/bower_components/framework7/src/my-app/my-app.css similarity index 100% rename from submissions/createyourdirectoryhere rename to bower_components/framework7/src/my-app/my-app.css diff --git a/bower_components/framework7/src/my-app/my-app.js b/bower_components/framework7/src/my-app/my-app.js new file mode 100644 index 00000000..9be6a376 --- /dev/null +++ b/bower_components/framework7/src/my-app/my-app.js @@ -0,0 +1,48 @@ +// Initialize your app +var myApp = new Framework7(); + +// Export selectors engine +var $$ = Dom7; + +// Add view +var mainView = myApp.addView('.view-main', { + // Because we use fixed-through navbar we can enable dynamic navbar + dynamicNavbar: true +}); + +// Callbacks to run specific code for specific pages, for example for About page: +myApp.onPageInit('about', function (page) { + // run createContentPage func after link was clicked + $$('.create-page').on('click', function () { + createContentPage(); + }); +}); + +// Generate dynamic page +var dynamicPageIndex = 0; +function createContentPage() { + mainView.router.loadContent( + '' + + '' + + '
                                                          ' + + ' ' + + '
                                                          ' + + ' ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '

                                                          Here is a dynamic page created on ' + new Date() + ' !

                                                          ' + + '

                                                          Go back or go to Services.

                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + + '
                                                          ' + ); + return; +} \ No newline at end of file diff --git a/bower_components/framework7/src/templates/about.jade b/bower_components/framework7/src/templates/about.jade new file mode 100644 index 00000000..bf574426 --- /dev/null +++ b/bower_components/framework7/src/templates/about.jade @@ -0,0 +1,28 @@ +// We don't need full layout here, because this page will be parsed with Ajax +// Top Navbar +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding About + .right + // Right link contains only icon - additional "icon-only" class + a(href="#").link.icon-only.open-panel + i.icon.icon-bars +.pages + // Page, data-page contains page name + .page(data-page="about") + // Scrollable page content + .page-content + .content-block + .content-block-inner + p Here is About page! + p Go + a(href="#").back back + | or click + a(href="#").create-page here + | to create dynamic page. + p Mauris posuere sit amet metus id venenatis. Ut ante dolor, tempor nec commodo rutrum, varius at sem. Nullam ac nisi non neque ornare pretium. Nulla mauris mauris, consequat et elementum sit amet, egestas sed orci. In hac habitasse platea dictumst. + p Fusce eros lectus, accumsan eget mi vel, iaculis tincidunt felis. Nulla tincidunt pharetra sagittis. Fusce in felis eros. Nulla sit amet aliquam lorem, et gravida ipsum. Mauris consectetur nisl non sollicitudin tristique. Praesent vitae metus ac quam rhoncus mattis vel et nisi. Aenean aliquet, felis quis dignissim iaculis, lectus quam tincidunt ligula, et venenatis turpis risus sed lorem. Morbi eu metus elit. Ut vel diam dolor. \ No newline at end of file diff --git a/bower_components/framework7/src/templates/form.jade b/bower_components/framework7/src/templates/form.jade new file mode 100644 index 00000000..9dd1f743 --- /dev/null +++ b/bower_components/framework7/src/templates/form.jade @@ -0,0 +1,139 @@ +// We don't need full layout here, because this page will be parsed with Ajax +// Top Navbar +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Form + .right + // Right link contains only icon - additional "icon-only" class + a(href="#").link.icon-only.open-panel + i.icon.icon-bars +.pages + // Page, data-page contains page name + .page(data-page="form") + // Scrollable page content + .page-content + .content-block-title Form Example + .list-block + ul + li + .item-content + .item-inner + .item-title.label Name + .item-input + input(type="text", placeholder="Your name") + li + .item-content + .item-inner + .item-title.label E-mail + .item-input + input(type="email", placeholder="E-mail") + li + .item-content + .item-inner + .item-title.label URL + .item-input + input(type="url", placeholder="URL") + li + .item-content + .item-inner + .item-title.label Password + .item-input + input(type="password", placeholder="Password") + li + .item-content + .item-inner + .item-title.label Phone + .item-input + input(type="tel", placeholder="Phone") + li + .item-content + .item-inner + .item-title.label Gender + .item-input + select + option Male + option Female + li + .item-content + .item-inner + .item-title.label Birth date + .item-input + input(type="date", placeholder="Birth day", value="2014-04-30") + li + .item-content + .item-inner + .item-title.label Switch + .item-input + label.label-switch + input(type="checkbox") + .checkbox + li + .item-content + .item-inner + .item-title.label Slider + .item-input + .range-slider + input(type="range", min="0", max="100", value="50", step="0.1") + li.align-top + .item-content + .item-inner + .item-title.label Textarea + .item-input + textarea + .content-block + .row + .col-50 + a(href="#").button.button-big.button-fill.color-red Cancel + .col-50 + input(type="submit", value="Submit").button.button-big.button-fill.color-green + + .content-block-title Checkbox group + .list-block + ul + li + label.label-checkbox.item-content + input(type="checkbox", name="ks-checkbox", value="Books", checked=true) + .item-inner + .item-title Books + li + label.label-checkbox.item-content + input(type="checkbox", name="ks-checkbox", value="Movies") + .item-inner + .item-title Movies + li + label.label-checkbox.item-content + input(type="checkbox", name="ks-checkbox", value="Food") + .item-inner + .item-title Food + li + label.label-checkbox.item-content + input(type="checkbox", name="ks-checkbox", value="Drinks") + .item-inner + .item-title Drinks + .content-block-title Radio buttons group + .list-block + ul + li + label.label-radio.item-content + input(type="radio", name="ks-radio", value="Books", checked=true) + .item-inner + .item-title Books + li + label.label-radio.item-content + input(type="radio", name="ks-radio", value="Movies") + .item-inner + .item-title Movies + li + label.label-radio.item-content + input(type="radio", name="ks-radio", value="Food") + .item-inner + .item-title Food + li + label.label-radio.item-content + input(type="radio", name="ks-radio", value="Drinks") + .item-inner + .item-title Drinks diff --git a/bower_components/framework7/src/templates/index.jade b/bower_components/framework7/src/templates/index.jade new file mode 100644 index 00000000..b077b58e --- /dev/null +++ b/bower_components/framework7/src/templates/index.jade @@ -0,0 +1,88 @@ +doctype +html + head + meta(charset="utf-8") + meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui") + meta(name='apple-mobile-web-app-capable', content='yes') + meta(name="apple-mobile-web-app-status-bar-style", content="black") + title My App + // Path to Framework7 Library CSS + link(rel="stylesheet", href="css/#{stylesheetFilename}.css") + link(rel="stylesheet", href="css/#{stylesheetColorsFilename}.css") + // Path to your custom app styles + link(rel="stylesheet", href="css/my-app.css") + body + // Status bar overlay for fullscreen mode + .statusbar-overlay + + // Panels overlay + .panel-overlay + // Left panel with reveal effect + .panel.panel-left.panel-reveal + .content-block + p Left panel content goes here + // Right panel with cover effect + .panel.panel-right.panel-cover + .content-block + p Right panel content goes here + + // Views + .views + // Your main view, should have "view-main" class + .view.view-main + // Top Navbar + .navbar + .navbar-inner + // We have home navbar without left link + .center.sliding Awesome App + .right + // Right link contains only icon - additional "icon-only" class + a(href="#").link.icon-only.open-panel + i.icon.icon-bars + // Pages, because we need fixed-through navbar and toolbar, it has additional appropriate classes + .pages.navbar-through.toolbar-through + // Page, data-page contains page name + .page(data-page="index") + // Scrollable page content + .page-content + .content-block-title Welcome To My Awesome App + .content-block + .content-block-inner + p Couple of worlds here because my app is so awesome! + p Duis sed erat ac eros ultrices pharetra id ut tellus. Praesent rhoncus enim ornare ipsum aliquet ultricies. Pellentesque sodales erat quis elementum sagittis. + + .content-block-title What about simple navigation? + .list-block + ul + li + a(href="about.html").item-link + .item-content + .item-inner + .item-title About + li + a(href="services.html").item-link + .item-content + .item-inner + .item-title Services + li + a(href="form.html").item-link + .item-content + .item-inner + .item-title Form + .content-block-title Side panels + .content-block + .row + .col-50 + a(href="#", data-panel="left").button.open-panel Left Panel + .col-50 + a(href="#", data-panel="right").button.open-panel Right Panel + // Bottom Toolbar + .toolbar + .toolbar-inner + a(href="#").link Link 1 + a(href="#").link Link 2 + + // Path to Framework7 Library JS + script(type="text/javascript", src="js/#{scriptFilename}.js") + // Path to your app js + script(type="text/javascript", src="js/my-app.js") diff --git a/bower_components/framework7/src/templates/services.jade b/bower_components/framework7/src/templates/services.jade new file mode 100644 index 00000000..fdc8ebef --- /dev/null +++ b/bower_components/framework7/src/templates/services.jade @@ -0,0 +1,28 @@ +// We don't need full layout here, because this page will be parsed with Ajax +// Top Navbar +.navbar + .navbar-inner + .left + a(href="#").back.link + i.icon.icon-back + span Back + .center.sliding Services + .right + // Right link contains only icon - additional "icon-only" class + a(href="#").link.icon-only.open-panel + i.icon.icon-bars +.pages + // Page, data-page contains page name + .page(data-page="services") + // Scrollable page content + .page-content + .content-block + .content-block-inner + p Here is Services page! + p Go + a(href="#").back back + | or go to + a(href="about.html") About + | page. + p Mauris posuere sit amet metus id venenatis. Ut ante dolor, tempor nec commodo rutrum, varius at sem. Nullam ac nisi non neque ornare pretium. Nulla mauris mauris, consequat et elementum sit amet, egestas sed orci. In hac habitasse platea dictumst. + p Fusce eros lectus, accumsan eget mi vel, iaculis tincidunt felis. Nulla tincidunt pharetra sagittis. Fusce in felis eros. Nulla sit amet aliquam lorem, et gravida ipsum. Mauris consectetur nisl non sollicitudin tristique. Praesent vitae metus ac quam rhoncus mattis vel et nisi. Aenean aliquet, felis quis dignissim iaculis, lectus quam tincidunt ligula, et venenatis turpis risus sed lorem. Morbi eu metus elit. Ut vel diam dolor. \ No newline at end of file diff --git a/bower_components/web3/.bower.json b/bower_components/web3/.bower.json new file mode 100644 index 00000000..59401e16 --- /dev/null +++ b/bower_components/web3/.bower.json @@ -0,0 +1,72 @@ +{ + "name": "web3", + "namespace": "ethereum", + "version": "0.19.0", + "description": "Ethereum Compatible JavaScript API", + "main": [ + "./dist/web3.js", + "./dist/web3.min.js" + ], + "dependencies": { + "bignumber.js": ">=2.0.0", + "crypto-js": "~3.1.4" + }, + "repository": { + "type": "git", + "url": "https://github.com/ethereum/web3.js.git" + }, + "homepage": "https://github.com/ethereum/web3.js", + "bugs": { + "url": "https://github.com/ethereum/web3.js/issues" + }, + "keywords": [ + "ethereum", + "javascript", + "API" + ], + "authors": [ + { + "name": "Marek Kotewicz", + "email": "marek@ethdev.com", + "homepage": "https://github.com/debris" + }, + { + "name": "Marian Oancea", + "email": "marian@ethdev.com", + "homepage": "https://github.com/cubedro" + }, + { + "name": "Fabian Vogelsteller", + "email": "fabian@ethdev.com", + "homepage": "https://github.com/frozeman" + } + ], + "license": "LGPL-3.0", + "ignore": [ + "example", + "lib", + "node_modules", + "package.json", + "package.js", + ".versions", + ".bowerrc", + ".editorconfig", + ".gitignore", + ".jshintrc", + ".npmignore", + ".travis.yml", + "gulpfile.js", + "index.js", + "**/*.txt" + ], + "_release": "0.19.0", + "_resolution": { + "type": "version", + "tag": "0.19.0", + "commit": "89b9cb9e046edf22ecac706f5d5983c6d764f84d" + }, + "_source": "https://github.com/ethereum/ethereum.js.git", + "_target": "^0.19.0", + "_originalSource": "web3", + "_direct": true +} \ No newline at end of file diff --git a/bower_components/web3/LICENSE b/bower_components/web3/LICENSE new file mode 100644 index 00000000..29a99abb --- /dev/null +++ b/bower_components/web3/LICENSE @@ -0,0 +1,14 @@ +This file is part of web3.js. + +web3.js is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +web3.js is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with web3.js. If not, see . diff --git a/bower_components/web3/README.md b/bower_components/web3/README.md new file mode 100644 index 00000000..5fc81c33 --- /dev/null +++ b/bower_components/web3/README.md @@ -0,0 +1,119 @@ +# Migration 0.13.0 -> 0.14.0 + +web3.js version 0.14.0 supports [multiple instances of web3](https://github.com/ethereum/web3.js/issues/297) object. +To migrate to this version, please follow the guide: + +```diff +-var web3 = require('web3'); ++var Web3 = require('web3'); ++var web3 = new Web3(); +``` + + +# Ethereum JavaScript API + +[![Join the chat at https://gitter.im/ethereum/web3.js](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/web3.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +This is the Ethereum compatible [JavaScript API](https://github.com/ethereum/wiki/wiki/JavaScript-API) +which implements the [Generic JSON RPC](https://github.com/ethereum/wiki/wiki/JSON-RPC) spec. It's available on npm as a node module, for bower and component as an embeddable js and as a meteor.js package. + +[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] [![dev dependency status][dep-dev-image]][dep-dev-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Stories in Ready][waffle-image]][waffle-url] + + + +You need to run a local Ethereum node to use this library. + +[Documentation](https://github.com/ethereum/wiki/wiki/JavaScript-API) + +## Installation + +### Node.js + +```bash +npm install web3 +``` + +### Meteor.js + +```bash +meteor add ethereum:web3 +``` + +### As Browser module +Bower + +```bash +bower install web3 +``` + +Component + +```bash +component install ethereum/web3.js +``` + +* Include `web3.min.js` in your html file. (not required for the meteor package) + +## Usage +Use the `web3` object directly from global namespace: + +```js +console.log(web3); // {eth: .., shh: ...} // it's here! +``` + +Set a provider (HttpProvider) + +```js +web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545')); +``` + +There you go, now you can use it: + +```js +var coinbase = web3.eth.coinbase; +var balance = web3.eth.getBalance(coinbase); +``` + +You can find more examples in [`example`](https://github.com/ethereum/web3.js/tree/master/example) directory. + + +## Contribute! + +### Requirements + +* Node.js +* npm + +```bash +sudo apt-get update +sudo apt-get install nodejs +sudo apt-get install npm +sudo apt-get install nodejs-legacy +``` + +### Building (gulp) + +```bash +npm run-script build +``` + + +### Testing (mocha) + +```bash +npm test +``` + +[npm-image]: https://badge.fury.io/js/web3.png +[npm-url]: https://npmjs.org/package/web3 +[travis-image]: https://travis-ci.org/ethereum/web3.js.svg +[travis-url]: https://travis-ci.org/ethereum/web3.js +[dep-image]: https://david-dm.org/ethereum/web3.js.svg +[dep-url]: https://david-dm.org/ethereum/web3.js +[dep-dev-image]: https://david-dm.org/ethereum/web3.js/dev-status.svg +[dep-dev-url]: https://david-dm.org/ethereum/web3.js#info=devDependencies +[coveralls-image]: https://coveralls.io/repos/ethereum/web3.js/badge.svg?branch=master +[coveralls-url]: https://coveralls.io/r/ethereum/web3.js?branch=master +[waffle-image]: https://badge.waffle.io/ethereum/web3.js.svg?label=ready&title=Ready +[waffle-url]: http://waffle.io/ethereum/web3.js + diff --git a/bower_components/web3/bower.json b/bower_components/web3/bower.json new file mode 100644 index 00000000..cc5c7472 --- /dev/null +++ b/bower_components/web3/bower.json @@ -0,0 +1,62 @@ +{ + "name": "web3", + "namespace": "ethereum", + "version": "0.17.0-alpha", + "description": "Ethereum Compatible JavaScript API", + "main": [ + "./dist/web3.js", + "./dist/web3.min.js" + ], + "dependencies": { + "bignumber.js": ">=2.0.0", + "crypto-js": "~3.1.4" + }, + "repository": { + "type": "git", + "url": "https://github.com/ethereum/web3.js.git" + }, + "homepage": "https://github.com/ethereum/web3.js", + "bugs": { + "url": "https://github.com/ethereum/web3.js/issues" + }, + "keywords": [ + "ethereum", + "javascript", + "API" + ], + "authors": [ + { + "name": "Marek Kotewicz", + "email": "marek@ethdev.com", + "homepage": "https://github.com/debris" + }, + { + "name": "Marian Oancea", + "email": "marian@ethdev.com", + "homepage": "https://github.com/cubedro" + }, + { + "name": "Fabian Vogelsteller", + "email": "fabian@ethdev.com", + "homepage": "https://github.com/frozeman" + } + ], + "license": "LGPL-3.0", + "ignore": [ + "example", + "lib", + "node_modules", + "package.json", + "package.js", + ".versions", + ".bowerrc", + ".editorconfig", + ".gitignore", + ".jshintrc", + ".npmignore", + ".travis.yml", + "gulpfile.js", + "index.js", + "**/*.txt" + ] +} diff --git a/bower_components/web3/circle.yml b/bower_components/web3/circle.yml new file mode 100644 index 00000000..71cb47f3 --- /dev/null +++ b/bower_components/web3/circle.yml @@ -0,0 +1,3 @@ +test: + override: + - npm run test && npm run lint \ No newline at end of file diff --git a/bower_components/web3/dist/web3-light.js b/bower_components/web3/dist/web3-light.js new file mode 100644 index 00000000..ca1f7649 --- /dev/null +++ b/bower_components/web3/dist/web3-light.js @@ -0,0 +1,13557 @@ +require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o. +*/ +/** + * @file coder.js + * @author Marek Kotewicz + * @date 2015 + */ + +var f = require('./formatters'); + +var SolidityTypeAddress = require('./address'); +var SolidityTypeBool = require('./bool'); +var SolidityTypeInt = require('./int'); +var SolidityTypeUInt = require('./uint'); +var SolidityTypeDynamicBytes = require('./dynamicbytes'); +var SolidityTypeString = require('./string'); +var SolidityTypeReal = require('./real'); +var SolidityTypeUReal = require('./ureal'); +var SolidityTypeBytes = require('./bytes'); + +var isDynamic = function (solidityType, type) { + return solidityType.isDynamicType(type) || + solidityType.isDynamicArray(type); +}; + +/** + * SolidityCoder prototype should be used to encode/decode solidity params of any type + */ +var SolidityCoder = function (types) { + this._types = types; +}; + +/** + * This method should be used to transform type to SolidityType + * + * @method _requireType + * @param {String} type + * @returns {SolidityType} + * @throws {Error} throws if no matching type is found + */ +SolidityCoder.prototype._requireType = function (type) { + var solidityType = this._types.filter(function (t) { + return t.isType(type); + })[0]; + + if (!solidityType) { + throw Error('invalid solidity type!: ' + type); + } + + return solidityType; +}; + +/** + * Should be used to encode plain param + * + * @method encodeParam + * @param {String} type + * @param {Object} plain param + * @return {String} encoded plain param + */ +SolidityCoder.prototype.encodeParam = function (type, param) { + return this.encodeParams([type], [param]); +}; + +/** + * Should be used to encode list of params + * + * @method encodeParams + * @param {Array} types + * @param {Array} params + * @return {String} encoded list of params + */ +SolidityCoder.prototype.encodeParams = function (types, params) { + var solidityTypes = this.getSolidityTypes(types); + + var encodeds = solidityTypes.map(function (solidityType, index) { + return solidityType.encode(params[index], types[index]); + }); + + var dynamicOffset = solidityTypes.reduce(function (acc, solidityType, index) { + var staticPartLength = solidityType.staticPartLength(types[index]); + var roundedStaticPartLength = Math.floor((staticPartLength + 31) / 32) * 32; + + return acc + (isDynamic(solidityTypes[index], types[index]) ? + 32 : + roundedStaticPartLength); + }, 0); + + var result = this.encodeMultiWithOffset(types, solidityTypes, encodeds, dynamicOffset); + + return result; +}; + +SolidityCoder.prototype.encodeMultiWithOffset = function (types, solidityTypes, encodeds, dynamicOffset) { + var result = ""; + var self = this; + + types.forEach(function (type, i) { + if (isDynamic(solidityTypes[i], types[i])) { + result += f.formatInputInt(dynamicOffset).encode(); + var e = self.encodeWithOffset(types[i], solidityTypes[i], encodeds[i], dynamicOffset); + dynamicOffset += e.length / 2; + } else { + // don't add length to dynamicOffset. it's already counted + result += self.encodeWithOffset(types[i], solidityTypes[i], encodeds[i], dynamicOffset); + } + + // TODO: figure out nested arrays + }); + + types.forEach(function (type, i) { + if (isDynamic(solidityTypes[i], types[i])) { + var e = self.encodeWithOffset(types[i], solidityTypes[i], encodeds[i], dynamicOffset); + dynamicOffset += e.length / 2; + result += e; + } + }); + return result; +}; + +// TODO: refactor whole encoding! +SolidityCoder.prototype.encodeWithOffset = function (type, solidityType, encoded, offset) { + var self = this; + if (solidityType.isDynamicArray(type)) { + return (function () { + // offset was already set + var nestedName = solidityType.nestedName(type); + var nestedStaticPartLength = solidityType.staticPartLength(nestedName); + var result = encoded[0]; + + (function () { + var previousLength = 2; // in int + if (solidityType.isDynamicArray(nestedName)) { + for (var i = 1; i < encoded.length; i++) { + previousLength += +(encoded[i - 1])[0] || 0; + result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode(); + } + } + })(); + + // first element is length, skip it + (function () { + for (var i = 0; i < encoded.length - 1; i++) { + var additionalOffset = result / 2; + result += self.encodeWithOffset(nestedName, solidityType, encoded[i + 1], offset + additionalOffset); + } + })(); + + return result; + })(); + + } else if (solidityType.isStaticArray(type)) { + return (function () { + var nestedName = solidityType.nestedName(type); + var nestedStaticPartLength = solidityType.staticPartLength(nestedName); + var result = ""; + + + if (solidityType.isDynamicArray(nestedName)) { + (function () { + var previousLength = 0; // in int + for (var i = 0; i < encoded.length; i++) { + // calculate length of previous item + previousLength += +(encoded[i - 1] || [])[0] || 0; + result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode(); + } + })(); + } + + (function () { + for (var i = 0; i < encoded.length; i++) { + var additionalOffset = result / 2; + result += self.encodeWithOffset(nestedName, solidityType, encoded[i], offset + additionalOffset); + } + })(); + + return result; + })(); + } + + return encoded; +}; + +/** + * Should be used to decode bytes to plain param + * + * @method decodeParam + * @param {String} type + * @param {String} bytes + * @return {Object} plain param + */ +SolidityCoder.prototype.decodeParam = function (type, bytes) { + return this.decodeParams([type], bytes)[0]; +}; + +/** + * Should be used to decode list of params + * + * @method decodeParam + * @param {Array} types + * @param {String} bytes + * @return {Array} array of plain params + */ +SolidityCoder.prototype.decodeParams = function (types, bytes) { + var solidityTypes = this.getSolidityTypes(types); + var offsets = this.getOffsets(types, solidityTypes); + + return solidityTypes.map(function (solidityType, index) { + return solidityType.decode(bytes, offsets[index], types[index], index); + }); +}; + +SolidityCoder.prototype.getOffsets = function (types, solidityTypes) { + var lengths = solidityTypes.map(function (solidityType, index) { + return solidityType.staticPartLength(types[index]); + }); + + for (var i = 1; i < lengths.length; i++) { + // sum with length of previous element + lengths[i] += lengths[i - 1]; + } + + return lengths.map(function (length, index) { + // remove the current length, so the length is sum of previous elements + var staticPartLength = solidityTypes[index].staticPartLength(types[index]); + return length - staticPartLength; + }); +}; + +SolidityCoder.prototype.getSolidityTypes = function (types) { + var self = this; + return types.map(function (type) { + return self._requireType(type); + }); +}; + +var coder = new SolidityCoder([ + new SolidityTypeAddress(), + new SolidityTypeBool(), + new SolidityTypeInt(), + new SolidityTypeUInt(), + new SolidityTypeDynamicBytes(), + new SolidityTypeBytes(), + new SolidityTypeString(), + new SolidityTypeReal(), + new SolidityTypeUReal() +]); + +module.exports = coder; + +},{"./address":4,"./bool":5,"./bytes":6,"./dynamicbytes":8,"./formatters":9,"./int":10,"./real":12,"./string":13,"./uint":15,"./ureal":16}],8:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +var SolidityTypeDynamicBytes = function () { + this._inputFormatter = f.formatInputDynamicBytes; + this._outputFormatter = f.formatOutputDynamicBytes; +}; + +SolidityTypeDynamicBytes.prototype = new SolidityType({}); +SolidityTypeDynamicBytes.prototype.constructor = SolidityTypeDynamicBytes; + +SolidityTypeDynamicBytes.prototype.isType = function (name) { + return !!name.match(/^bytes(\[([0-9]*)\])*$/); +}; + +SolidityTypeDynamicBytes.prototype.isDynamicType = function () { + return true; +}; + +module.exports = SolidityTypeDynamicBytes; + +},{"./formatters":9,"./type":14}],9:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file formatters.js + * @author Marek Kotewicz + * @date 2015 + */ + +var BigNumber = require('bignumber.js'); +var utils = require('../utils/utils'); +var c = require('../utils/config'); +var SolidityParam = require('./param'); + + +/** + * Formats input value to byte representation of int + * If value is negative, return it's two's complement + * If the value is floating point, round it down + * + * @method formatInputInt + * @param {String|Number|BigNumber} value that needs to be formatted + * @returns {SolidityParam} + */ +var formatInputInt = function (value) { + BigNumber.config(c.ETH_BIGNUMBER_ROUNDING_MODE); + var result = utils.padLeft(utils.toTwosComplement(value).toString(16), 64); + return new SolidityParam(result); +}; + +/** + * Formats input bytes + * + * @method formatInputBytes + * @param {String} + * @returns {SolidityParam} + */ +var formatInputBytes = function (value) { + var result = utils.toHex(value).substr(2); + var l = Math.floor((result.length + 63) / 64); + result = utils.padRight(result, l * 64); + return new SolidityParam(result); +}; + +/** + * Formats input bytes + * + * @method formatDynamicInputBytes + * @param {String} + * @returns {SolidityParam} + */ +var formatInputDynamicBytes = function (value) { + var result = utils.toHex(value).substr(2); + var length = result.length / 2; + var l = Math.floor((result.length + 63) / 64); + result = utils.padRight(result, l * 64); + return new SolidityParam(formatInputInt(length).value + result); +}; + +/** + * Formats input value to byte representation of string + * + * @method formatInputString + * @param {String} + * @returns {SolidityParam} + */ +var formatInputString = function (value) { + var result = utils.fromUtf8(value).substr(2); + var length = result.length / 2; + var l = Math.floor((result.length + 63) / 64); + result = utils.padRight(result, l * 64); + return new SolidityParam(formatInputInt(length).value + result); +}; + +/** + * Formats input value to byte representation of bool + * + * @method formatInputBool + * @param {Boolean} + * @returns {SolidityParam} + */ +var formatInputBool = function (value) { + var result = '000000000000000000000000000000000000000000000000000000000000000' + (value ? '1' : '0'); + return new SolidityParam(result); +}; + +/** + * Formats input value to byte representation of real + * Values are multiplied by 2^m and encoded as integers + * + * @method formatInputReal + * @param {String|Number|BigNumber} + * @returns {SolidityParam} + */ +var formatInputReal = function (value) { + return formatInputInt(new BigNumber(value).times(new BigNumber(2).pow(128))); +}; + +/** + * Check if input value is negative + * + * @method signedIsNegative + * @param {String} value is hex format + * @returns {Boolean} true if it is negative, otherwise false + */ +var signedIsNegative = function (value) { + return (new BigNumber(value.substr(0, 1), 16).toString(2).substr(0, 1)) === '1'; +}; + +/** + * Formats right-aligned output bytes to int + * + * @method formatOutputInt + * @param {SolidityParam} param + * @returns {BigNumber} right-aligned output bytes formatted to big number + */ +var formatOutputInt = function (param) { + var value = param.staticPart() || "0"; + + // check if it's negative number + // it it is, return two's complement + if (signedIsNegative(value)) { + return new BigNumber(value, 16).minus(new BigNumber('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16)).minus(1); + } + return new BigNumber(value, 16); +}; + +/** + * Formats right-aligned output bytes to uint + * + * @method formatOutputUInt + * @param {SolidityParam} + * @returns {BigNumeber} right-aligned output bytes formatted to uint + */ +var formatOutputUInt = function (param) { + var value = param.staticPart() || "0"; + return new BigNumber(value, 16); +}; + +/** + * Formats right-aligned output bytes to real + * + * @method formatOutputReal + * @param {SolidityParam} + * @returns {BigNumber} input bytes formatted to real + */ +var formatOutputReal = function (param) { + return formatOutputInt(param).dividedBy(new BigNumber(2).pow(128)); +}; + +/** + * Formats right-aligned output bytes to ureal + * + * @method formatOutputUReal + * @param {SolidityParam} + * @returns {BigNumber} input bytes formatted to ureal + */ +var formatOutputUReal = function (param) { + return formatOutputUInt(param).dividedBy(new BigNumber(2).pow(128)); +}; + +/** + * Should be used to format output bool + * + * @method formatOutputBool + * @param {SolidityParam} + * @returns {Boolean} right-aligned input bytes formatted to bool + */ +var formatOutputBool = function (param) { + return param.staticPart() === '0000000000000000000000000000000000000000000000000000000000000001' ? true : false; +}; + +/** + * Should be used to format output bytes + * + * @method formatOutputBytes + * @param {SolidityParam} left-aligned hex representation of string + * @param {String} name type name + * @returns {String} hex string + */ +var formatOutputBytes = function (param, name) { + var matches = name.match(/^bytes([0-9]*)/); + var size = parseInt(matches[1]); + return '0x' + param.staticPart().slice(0, 2 * size); +}; + +/** + * Should be used to format output bytes + * + * @method formatOutputDynamicBytes + * @param {SolidityParam} left-aligned hex representation of string + * @returns {String} hex string + */ +var formatOutputDynamicBytes = function (param) { + var length = (new BigNumber(param.dynamicPart().slice(0, 64), 16)).toNumber() * 2; + return '0x' + param.dynamicPart().substr(64, length); +}; + +/** + * Should be used to format output string + * + * @method formatOutputString + * @param {SolidityParam} left-aligned hex representation of string + * @returns {String} ascii string + */ +var formatOutputString = function (param) { + var length = (new BigNumber(param.dynamicPart().slice(0, 64), 16)).toNumber() * 2; + return utils.toUtf8(param.dynamicPart().substr(64, length)); +}; + +/** + * Should be used to format output address + * + * @method formatOutputAddress + * @param {SolidityParam} right-aligned input bytes + * @returns {String} address + */ +var formatOutputAddress = function (param) { + var value = param.staticPart(); + return "0x" + value.slice(value.length - 40, value.length); +}; + +module.exports = { + formatInputInt: formatInputInt, + formatInputBytes: formatInputBytes, + formatInputDynamicBytes: formatInputDynamicBytes, + formatInputString: formatInputString, + formatInputBool: formatInputBool, + formatInputReal: formatInputReal, + formatOutputInt: formatOutputInt, + formatOutputUInt: formatOutputUInt, + formatOutputReal: formatOutputReal, + formatOutputUReal: formatOutputUReal, + formatOutputBool: formatOutputBool, + formatOutputBytes: formatOutputBytes, + formatOutputDynamicBytes: formatOutputDynamicBytes, + formatOutputString: formatOutputString, + formatOutputAddress: formatOutputAddress +}; + +},{"../utils/config":18,"../utils/utils":20,"./param":11,"bignumber.js":"bignumber.js"}],10:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +/** + * SolidityTypeInt is a prootype that represents int type + * It matches: + * int + * int[] + * int[4] + * int[][] + * int[3][] + * int[][6][], ... + * int32 + * int64[] + * int8[4] + * int256[][] + * int[3][] + * int64[][6][], ... + */ +var SolidityTypeInt = function () { + this._inputFormatter = f.formatInputInt; + this._outputFormatter = f.formatOutputInt; +}; + +SolidityTypeInt.prototype = new SolidityType({}); +SolidityTypeInt.prototype.constructor = SolidityTypeInt; + +SolidityTypeInt.prototype.isType = function (name) { + return !!name.match(/^int([0-9]*)?(\[([0-9]*)\])*$/); +}; + +module.exports = SolidityTypeInt; + +},{"./formatters":9,"./type":14}],11:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file param.js + * @author Marek Kotewicz + * @date 2015 + */ + +var utils = require('../utils/utils'); + +/** + * SolidityParam object prototype. + * Should be used when encoding, decoding solidity bytes + */ +var SolidityParam = function (value, offset) { + this.value = value || ''; + this.offset = offset; // offset in bytes +}; + +/** + * This method should be used to get length of params's dynamic part + * + * @method dynamicPartLength + * @returns {Number} length of dynamic part (in bytes) + */ +SolidityParam.prototype.dynamicPartLength = function () { + return this.dynamicPart().length / 2; +}; + +/** + * This method should be used to create copy of solidity param with different offset + * + * @method withOffset + * @param {Number} offset length in bytes + * @returns {SolidityParam} new solidity param with applied offset + */ +SolidityParam.prototype.withOffset = function (offset) { + return new SolidityParam(this.value, offset); +}; + +/** + * This method should be used to combine solidity params together + * eg. when appending an array + * + * @method combine + * @param {SolidityParam} param with which we should combine + * @param {SolidityParam} result of combination + */ +SolidityParam.prototype.combine = function (param) { + return new SolidityParam(this.value + param.value); +}; + +/** + * This method should be called to check if param has dynamic size. + * If it has, it returns true, otherwise false + * + * @method isDynamic + * @returns {Boolean} + */ +SolidityParam.prototype.isDynamic = function () { + return this.offset !== undefined; +}; + +/** + * This method should be called to transform offset to bytes + * + * @method offsetAsBytes + * @returns {String} bytes representation of offset + */ +SolidityParam.prototype.offsetAsBytes = function () { + return !this.isDynamic() ? '' : utils.padLeft(utils.toTwosComplement(this.offset).toString(16), 64); +}; + +/** + * This method should be called to get static part of param + * + * @method staticPart + * @returns {String} offset if it is a dynamic param, otherwise value + */ +SolidityParam.prototype.staticPart = function () { + if (!this.isDynamic()) { + return this.value; + } + return this.offsetAsBytes(); +}; + +/** + * This method should be called to get dynamic part of param + * + * @method dynamicPart + * @returns {String} returns a value if it is a dynamic param, otherwise empty string + */ +SolidityParam.prototype.dynamicPart = function () { + return this.isDynamic() ? this.value : ''; +}; + +/** + * This method should be called to encode param + * + * @method encode + * @returns {String} + */ +SolidityParam.prototype.encode = function () { + return this.staticPart() + this.dynamicPart(); +}; + +/** + * This method should be called to encode array of params + * + * @method encodeList + * @param {Array[SolidityParam]} params + * @returns {String} + */ +SolidityParam.encodeList = function (params) { + + // updating offsets + var totalOffset = params.length * 32; + var offsetParams = params.map(function (param) { + if (!param.isDynamic()) { + return param; + } + var offset = totalOffset; + totalOffset += param.dynamicPartLength(); + return param.withOffset(offset); + }); + + // encode everything! + return offsetParams.reduce(function (result, param) { + return result + param.dynamicPart(); + }, offsetParams.reduce(function (result, param) { + return result + param.staticPart(); + }, '')); +}; + + + +module.exports = SolidityParam; + + +},{"../utils/utils":20}],12:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +/** + * SolidityTypeReal is a prootype that represents real type + * It matches: + * real + * real[] + * real[4] + * real[][] + * real[3][] + * real[][6][], ... + * real32 + * real64[] + * real8[4] + * real256[][] + * real[3][] + * real64[][6][], ... + */ +var SolidityTypeReal = function () { + this._inputFormatter = f.formatInputReal; + this._outputFormatter = f.formatOutputReal; +}; + +SolidityTypeReal.prototype = new SolidityType({}); +SolidityTypeReal.prototype.constructor = SolidityTypeReal; + +SolidityTypeReal.prototype.isType = function (name) { + return !!name.match(/real([0-9]*)?(\[([0-9]*)\])?/); +}; + +module.exports = SolidityTypeReal; + +},{"./formatters":9,"./type":14}],13:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +var SolidityTypeString = function () { + this._inputFormatter = f.formatInputString; + this._outputFormatter = f.formatOutputString; +}; + +SolidityTypeString.prototype = new SolidityType({}); +SolidityTypeString.prototype.constructor = SolidityTypeString; + +SolidityTypeString.prototype.isType = function (name) { + return !!name.match(/^string(\[([0-9]*)\])*$/); +}; + +SolidityTypeString.prototype.isDynamicType = function () { + return true; +}; + +module.exports = SolidityTypeString; + +},{"./formatters":9,"./type":14}],14:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityParam = require('./param'); + +/** + * SolidityType prototype is used to encode/decode solidity params of certain type + */ +var SolidityType = function (config) { + this._inputFormatter = config.inputFormatter; + this._outputFormatter = config.outputFormatter; +}; + +/** + * Should be used to determine if this SolidityType do match given name + * + * @method isType + * @param {String} name + * @return {Bool} true if type match this SolidityType, otherwise false + */ +SolidityType.prototype.isType = function (name) { + throw "this method should be overrwritten for type " + name; +}; + +/** + * Should be used to determine what is the length of static part in given type + * + * @method staticPartLength + * @param {String} name + * @return {Number} length of static part in bytes + */ +SolidityType.prototype.staticPartLength = function (name) { + // If name isn't an array then treat it like a single element array. + return (this.nestedTypes(name) || ['[1]']) + .map(function (type) { + // the length of the nested array + return parseInt(type.slice(1, -1), 10) || 1; + }) + .reduce(function (previous, current) { + return previous * current; + // all basic types are 32 bytes long + }, 32); +}; + +/** + * Should be used to determine if type is dynamic array + * eg: + * "type[]" => true + * "type[4]" => false + * + * @method isDynamicArray + * @param {String} name + * @return {Bool} true if the type is dynamic array + */ +SolidityType.prototype.isDynamicArray = function (name) { + var nestedTypes = this.nestedTypes(name); + return !!nestedTypes && !nestedTypes[nestedTypes.length - 1].match(/[0-9]{1,}/g); +}; + +/** + * Should be used to determine if type is static array + * eg: + * "type[]" => false + * "type[4]" => true + * + * @method isStaticArray + * @param {String} name + * @return {Bool} true if the type is static array + */ +SolidityType.prototype.isStaticArray = function (name) { + var nestedTypes = this.nestedTypes(name); + return !!nestedTypes && !!nestedTypes[nestedTypes.length - 1].match(/[0-9]{1,}/g); +}; + +/** + * Should return length of static array + * eg. + * "int[32]" => 32 + * "int256[14]" => 14 + * "int[2][3]" => 3 + * "int" => 1 + * "int[1]" => 1 + * "int[]" => 1 + * + * @method staticArrayLength + * @param {String} name + * @return {Number} static array length + */ +SolidityType.prototype.staticArrayLength = function (name) { + var nestedTypes = this.nestedTypes(name); + if (nestedTypes) { + return parseInt(nestedTypes[nestedTypes.length - 1].match(/[0-9]{1,}/g) || 1); + } + return 1; +}; + +/** + * Should return nested type + * eg. + * "int[32]" => "int" + * "int256[14]" => "int256" + * "int[2][3]" => "int[2]" + * "int" => "int" + * "int[]" => "int" + * + * @method nestedName + * @param {String} name + * @return {String} nested name + */ +SolidityType.prototype.nestedName = function (name) { + // remove last [] in name + var nestedTypes = this.nestedTypes(name); + if (!nestedTypes) { + return name; + } + + return name.substr(0, name.length - nestedTypes[nestedTypes.length - 1].length); +}; + +/** + * Should return true if type has dynamic size by default + * such types are "string", "bytes" + * + * @method isDynamicType + * @param {String} name + * @return {Bool} true if is dynamic, otherwise false + */ +SolidityType.prototype.isDynamicType = function () { + return false; +}; + +/** + * Should return array of nested types + * eg. + * "int[2][3][]" => ["[2]", "[3]", "[]"] + * "int[] => ["[]"] + * "int" => null + * + * @method nestedTypes + * @param {String} name + * @return {Array} array of nested types + */ +SolidityType.prototype.nestedTypes = function (name) { + // return list of strings eg. "[]", "[3]", "[]", "[2]" + return name.match(/(\[[0-9]*\])/g); +}; + +/** + * Should be used to encode the value + * + * @method encode + * @param {Object} value + * @param {String} name + * @return {String} encoded value + */ +SolidityType.prototype.encode = function (value, name) { + var self = this; + if (this.isDynamicArray(name)) { + + return (function () { + var length = value.length; // in int + var nestedName = self.nestedName(name); + + var result = []; + result.push(f.formatInputInt(length).encode()); + + value.forEach(function (v) { + result.push(self.encode(v, nestedName)); + }); + + return result; + })(); + + } else if (this.isStaticArray(name)) { + + return (function () { + var length = self.staticArrayLength(name); // in int + var nestedName = self.nestedName(name); + + var result = []; + for (var i = 0; i < length; i++) { + result.push(self.encode(value[i], nestedName)); + } + + return result; + })(); + + } + + return this._inputFormatter(value, name).encode(); +}; + +/** + * Should be used to decode value from bytes + * + * @method decode + * @param {String} bytes + * @param {Number} offset in bytes + * @param {String} name type name + * @returns {Object} decoded value + */ +SolidityType.prototype.decode = function (bytes, offset, name) { + var self = this; + + if (this.isDynamicArray(name)) { + + return (function () { + var arrayOffset = parseInt('0x' + bytes.substr(offset * 2, 64)); // in bytes + var length = parseInt('0x' + bytes.substr(arrayOffset * 2, 64)); // in int + var arrayStart = arrayOffset + 32; // array starts after length; // in bytes + + var nestedName = self.nestedName(name); + var nestedStaticPartLength = self.staticPartLength(nestedName); // in bytes + var roundedNestedStaticPartLength = Math.floor((nestedStaticPartLength + 31) / 32) * 32; + var result = []; + + for (var i = 0; i < length * roundedNestedStaticPartLength; i += roundedNestedStaticPartLength) { + result.push(self.decode(bytes, arrayStart + i, nestedName)); + } + + return result; + })(); + + } else if (this.isStaticArray(name)) { + + return (function () { + var length = self.staticArrayLength(name); // in int + var arrayStart = offset; // in bytes + + var nestedName = self.nestedName(name); + var nestedStaticPartLength = self.staticPartLength(nestedName); // in bytes + var roundedNestedStaticPartLength = Math.floor((nestedStaticPartLength + 31) / 32) * 32; + var result = []; + + for (var i = 0; i < length * roundedNestedStaticPartLength; i += roundedNestedStaticPartLength) { + result.push(self.decode(bytes, arrayStart + i, nestedName)); + } + + return result; + })(); + } else if (this.isDynamicType(name)) { + + return (function () { + var dynamicOffset = parseInt('0x' + bytes.substr(offset * 2, 64)); // in bytes + var length = parseInt('0x' + bytes.substr(dynamicOffset * 2, 64)); // in bytes + var roundedLength = Math.floor((length + 31) / 32); // in int + var param = new SolidityParam(bytes.substr(dynamicOffset * 2, ( 1 + roundedLength) * 64), 0); + return self._outputFormatter(param, name); + })(); + } + + var length = this.staticPartLength(name); + var param = new SolidityParam(bytes.substr(offset * 2, length * 2)); + return this._outputFormatter(param, name); +}; + +module.exports = SolidityType; + +},{"./formatters":9,"./param":11}],15:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +/** + * SolidityTypeUInt is a prootype that represents uint type + * It matches: + * uint + * uint[] + * uint[4] + * uint[][] + * uint[3][] + * uint[][6][], ... + * uint32 + * uint64[] + * uint8[4] + * uint256[][] + * uint[3][] + * uint64[][6][], ... + */ +var SolidityTypeUInt = function () { + this._inputFormatter = f.formatInputInt; + this._outputFormatter = f.formatOutputUInt; +}; + +SolidityTypeUInt.prototype = new SolidityType({}); +SolidityTypeUInt.prototype.constructor = SolidityTypeUInt; + +SolidityTypeUInt.prototype.isType = function (name) { + return !!name.match(/^uint([0-9]*)?(\[([0-9]*)\])*$/); +}; + +module.exports = SolidityTypeUInt; + +},{"./formatters":9,"./type":14}],16:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +/** + * SolidityTypeUReal is a prootype that represents ureal type + * It matches: + * ureal + * ureal[] + * ureal[4] + * ureal[][] + * ureal[3][] + * ureal[][6][], ... + * ureal32 + * ureal64[] + * ureal8[4] + * ureal256[][] + * ureal[3][] + * ureal64[][6][], ... + */ +var SolidityTypeUReal = function () { + this._inputFormatter = f.formatInputReal; + this._outputFormatter = f.formatOutputUReal; +}; + +SolidityTypeUReal.prototype = new SolidityType({}); +SolidityTypeUReal.prototype.constructor = SolidityTypeUReal; + +SolidityTypeUReal.prototype.isType = function (name) { + return !!name.match(/^ureal([0-9]*)?(\[([0-9]*)\])*$/); +}; + +module.exports = SolidityTypeUReal; + +},{"./formatters":9,"./type":14}],17:[function(require,module,exports){ +'use strict'; + +// go env doesn't have and need XMLHttpRequest +if (typeof XMLHttpRequest === 'undefined') { + exports.XMLHttpRequest = {}; +} else { + exports.XMLHttpRequest = XMLHttpRequest; // jshint ignore:line +} + + +},{}],18:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file config.js + * @authors: + * Marek Kotewicz + * @date 2015 + */ + +/** + * Utils + * + * @module utils + */ + +/** + * Utility functions + * + * @class [utils] config + * @constructor + */ + + +/// required to define ETH_BIGNUMBER_ROUNDING_MODE +var BigNumber = require('bignumber.js'); + +var ETH_UNITS = [ + 'wei', + 'kwei', + 'Mwei', + 'Gwei', + 'szabo', + 'finney', + 'femtoether', + 'picoether', + 'nanoether', + 'microether', + 'milliether', + 'nano', + 'micro', + 'milli', + 'ether', + 'grand', + 'Mether', + 'Gether', + 'Tether', + 'Pether', + 'Eether', + 'Zether', + 'Yether', + 'Nether', + 'Dether', + 'Vether', + 'Uether' +]; + +module.exports = { + ETH_PADDING: 32, + ETH_SIGNATURE_LENGTH: 4, + ETH_UNITS: ETH_UNITS, + ETH_BIGNUMBER_ROUNDING_MODE: { ROUNDING_MODE: BigNumber.ROUND_DOWN }, + ETH_POLLING_TIMEOUT: 1000/2, + defaultBlock: 'latest', + defaultAccount: undefined +}; + + +},{"bignumber.js":"bignumber.js"}],19:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file sha3.js + * @author Marek Kotewicz + * @date 2015 + */ + +var CryptoJS = require('crypto-js'); +var sha3 = require('crypto-js/sha3'); + +module.exports = function (value, options) { + if (options && options.encoding === 'hex') { + if (value.length > 2 && value.substr(0, 2) === '0x') { + value = value.substr(2); + } + value = CryptoJS.enc.Hex.parse(value); + } + + return sha3(value, { + outputLength: 256 + }).toString(); +}; + + +},{"crypto-js":59,"crypto-js/sha3":80}],20:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file utils.js + * @author Marek Kotewicz + * @date 2015 + */ + +/** + * Utils + * + * @module utils + */ + +/** + * Utility functions + * + * @class [utils] utils + * @constructor + */ + + +var BigNumber = require('bignumber.js'); +var sha3 = require('./sha3.js'); +var utf8 = require('utf8'); + +var unitMap = { + 'noether': '0', + 'wei': '1', + 'kwei': '1000', + 'Kwei': '1000', + 'babbage': '1000', + 'femtoether': '1000', + 'mwei': '1000000', + 'Mwei': '1000000', + 'lovelace': '1000000', + 'picoether': '1000000', + 'gwei': '1000000000', + 'Gwei': '1000000000', + 'shannon': '1000000000', + 'nanoether': '1000000000', + 'nano': '1000000000', + 'szabo': '1000000000000', + 'microether': '1000000000000', + 'micro': '1000000000000', + 'finney': '1000000000000000', + 'milliether': '1000000000000000', + 'milli': '1000000000000000', + 'ether': '1000000000000000000', + 'kether': '1000000000000000000000', + 'grand': '1000000000000000000000', + 'mether': '1000000000000000000000000', + 'gether': '1000000000000000000000000000', + 'tether': '1000000000000000000000000000000' +}; + +/** + * Should be called to pad string to expected length + * + * @method padLeft + * @param {String} string to be padded + * @param {Number} characters that result string should have + * @param {String} sign, by default 0 + * @returns {String} right aligned string + */ +var padLeft = function (string, chars, sign) { + return new Array(chars - string.length + 1).join(sign ? sign : "0") + string; +}; + +/** + * Should be called to pad string to expected length + * + * @method padRight + * @param {String} string to be padded + * @param {Number} characters that result string should have + * @param {String} sign, by default 0 + * @returns {String} right aligned string + */ +var padRight = function (string, chars, sign) { + return string + (new Array(chars - string.length + 1).join(sign ? sign : "0")); +}; + +/** + * Should be called to get utf8 from it's hex representation + * + * @method toUtf8 + * @param {String} string in hex + * @returns {String} ascii string representation of hex value + */ +var toUtf8 = function(hex) { +// Find termination + var str = ""; + var i = 0, l = hex.length; + if (hex.substring(0, 2) === '0x') { + i = 2; + } + for (; i < l; i+=2) { + var code = parseInt(hex.substr(i, 2), 16); + if (code === 0) + break; + str += String.fromCharCode(code); + } + + return utf8.decode(str); +}; + +/** + * Should be called to get ascii from it's hex representation + * + * @method toAscii + * @param {String} string in hex + * @returns {String} ascii string representation of hex value + */ +var toAscii = function(hex) { +// Find termination + var str = ""; + var i = 0, l = hex.length; + if (hex.substring(0, 2) === '0x') { + i = 2; + } + for (; i < l; i+=2) { + var code = parseInt(hex.substr(i, 2), 16); + str += String.fromCharCode(code); + } + + return str; +}; + +/** + * Should be called to get hex representation (prefixed by 0x) of utf8 string + * + * @method fromUtf8 + * @param {String} string + * @param {Number} optional padding + * @returns {String} hex representation of input string + */ +var fromUtf8 = function(str) { + str = utf8.encode(str); + var hex = ""; + for(var i = 0; i < str.length; i++) { + var code = str.charCodeAt(i); + if (code === 0) + break; + var n = code.toString(16); + hex += n.length < 2 ? '0' + n : n; + } + + return "0x" + hex; +}; + +/** + * Should be called to get hex representation (prefixed by 0x) of ascii string + * + * @method fromAscii + * @param {String} string + * @param {Number} optional padding + * @returns {String} hex representation of input string + */ +var fromAscii = function(str) { + var hex = ""; + for(var i = 0; i < str.length; i++) { + var code = str.charCodeAt(i); + var n = code.toString(16); + hex += n.length < 2 ? '0' + n : n; + } + + return "0x" + hex; +}; + +/** + * Should be used to create full function/event name from json abi + * + * @method transformToFullName + * @param {Object} json-abi + * @return {String} full fnction/event name + */ +var transformToFullName = function (json) { + if (json.name.indexOf('(') !== -1) { + return json.name; + } + + var typeName = json.inputs.map(function(i){return i.type; }).join(); + return json.name + '(' + typeName + ')'; +}; + +/** + * Should be called to get display name of contract function + * + * @method extractDisplayName + * @param {String} name of function/event + * @returns {String} display name for function/event eg. multiply(uint256) -> multiply + */ +var extractDisplayName = function (name) { + var length = name.indexOf('('); + return length !== -1 ? name.substr(0, length) : name; +}; + +/// @returns overloaded part of function/event name +var extractTypeName = function (name) { + /// TODO: make it invulnerable + var length = name.indexOf('('); + return length !== -1 ? name.substr(length + 1, name.length - 1 - (length + 1)).replace(' ', '') : ""; +}; + +/** + * Converts value to it's decimal representation in string + * + * @method toDecimal + * @param {String|Number|BigNumber} + * @return {String} + */ +var toDecimal = function (value) { + return toBigNumber(value).toNumber(); +}; + +/** + * Converts value to it's hex representation + * + * @method fromDecimal + * @param {String|Number|BigNumber} + * @return {String} + */ +var fromDecimal = function (value) { + var number = toBigNumber(value); + var result = number.toString(16); + + return number.lessThan(0) ? '-0x' + result.substr(1) : '0x' + result; +}; + +/** + * Auto converts any given value into it's hex representation. + * + * And even stringifys objects before. + * + * @method toHex + * @param {String|Number|BigNumber|Object} + * @return {String} + */ +var toHex = function (val) { + /*jshint maxcomplexity: 8 */ + + if (isBoolean(val)) + return fromDecimal(+val); + + if (isBigNumber(val)) + return fromDecimal(val); + + if (typeof val === 'object') + return fromUtf8(JSON.stringify(val)); + + // if its a negative number, pass it through fromDecimal + if (isString(val)) { + if (val.indexOf('-0x') === 0) + return fromDecimal(val); + else if(val.indexOf('0x') === 0) + return val; + else if (!isFinite(val)) + return fromAscii(val); + } + + return fromDecimal(val); +}; + +/** + * Returns value of unit in Wei + * + * @method getValueOfUnit + * @param {String} unit the unit to convert to, default ether + * @returns {BigNumber} value of the unit (in Wei) + * @throws error if the unit is not correct:w + */ +var getValueOfUnit = function (unit) { + unit = unit ? unit.toLowerCase() : 'ether'; + var unitValue = unitMap[unit]; + if (unitValue === undefined) { + throw new Error('This unit doesn\'t exists, please use the one of the following units' + JSON.stringify(unitMap, null, 2)); + } + return new BigNumber(unitValue, 10); +}; + +/** + * Takes a number of wei and converts it to any other ether unit. + * + * Possible units are: + * SI Short SI Full Effigy Other + * - kwei femtoether babbage + * - mwei picoether lovelace + * - gwei nanoether shannon nano + * - -- microether szabo micro + * - -- milliether finney milli + * - ether -- -- + * - kether -- grand + * - mether + * - gether + * - tether + * + * @method fromWei + * @param {Number|String} number can be a number, number string or a HEX of a decimal + * @param {String} unit the unit to convert to, default ether + * @return {String|Object} When given a BigNumber object it returns one as well, otherwise a number +*/ +var fromWei = function(number, unit) { + var returnValue = toBigNumber(number).dividedBy(getValueOfUnit(unit)); + + return isBigNumber(number) ? returnValue : returnValue.toString(10); +}; + +/** + * Takes a number of a unit and converts it to wei. + * + * Possible units are: + * SI Short SI Full Effigy Other + * - kwei femtoether babbage + * - mwei picoether lovelace + * - gwei nanoether shannon nano + * - -- microether szabo micro + * - -- microether szabo micro + * - -- milliether finney milli + * - ether -- -- + * - kether -- grand + * - mether + * - gether + * - tether + * + * @method toWei + * @param {Number|String|BigNumber} number can be a number, number string or a HEX of a decimal + * @param {String} unit the unit to convert from, default ether + * @return {String|Object} When given a BigNumber object it returns one as well, otherwise a number +*/ +var toWei = function(number, unit) { + var returnValue = toBigNumber(number).times(getValueOfUnit(unit)); + + return isBigNumber(number) ? returnValue : returnValue.toString(10); +}; + +/** + * Takes an input and transforms it into an bignumber + * + * @method toBigNumber + * @param {Number|String|BigNumber} a number, string, HEX string or BigNumber + * @return {BigNumber} BigNumber +*/ +var toBigNumber = function(number) { + /*jshint maxcomplexity:5 */ + number = number || 0; + if (isBigNumber(number)) + return number; + + if (isString(number) && (number.indexOf('0x') === 0 || number.indexOf('-0x') === 0)) { + return new BigNumber(number.replace('0x',''), 16); + } + + return new BigNumber(number.toString(10), 10); +}; + +/** + * Takes and input transforms it into bignumber and if it is negative value, into two's complement + * + * @method toTwosComplement + * @param {Number|String|BigNumber} + * @return {BigNumber} + */ +var toTwosComplement = function (number) { + var bigNumber = toBigNumber(number).round(); + if (bigNumber.lessThan(0)) { + return new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16).plus(bigNumber).plus(1); + } + return bigNumber; +}; + +/** + * Checks if the given string is strictly an address + * + * @method isStrictAddress + * @param {String} address the given HEX adress + * @return {Boolean} +*/ +var isStrictAddress = function (address) { + return /^0x[0-9a-f]{40}$/i.test(address); +}; + +/** + * Checks if the given string is an address + * + * @method isAddress + * @param {String} address the given HEX adress + * @return {Boolean} +*/ +var isAddress = function (address) { + if (!/^(0x)?[0-9a-f]{40}$/i.test(address)) { + // check if it has the basic requirements of an address + return false; + } else if (/^(0x)?[0-9a-f]{40}$/.test(address) || /^(0x)?[0-9A-F]{40}$/.test(address)) { + // If it's all small caps or all all caps, return true + return true; + } else { + // Otherwise check each case + return isChecksumAddress(address); + } +}; + +/** + * Checks if the given string is a checksummed address + * + * @method isChecksumAddress + * @param {String} address the given HEX adress + * @return {Boolean} +*/ +var isChecksumAddress = function (address) { + // Check each case + address = address.replace('0x',''); + var addressHash = sha3(address.toLowerCase()); + + for (var i = 0; i < 40; i++ ) { + // the nth letter should be uppercase if the nth digit of casemap is 1 + if ((parseInt(addressHash[i], 16) > 7 && address[i].toUpperCase() !== address[i]) || (parseInt(addressHash[i], 16) <= 7 && address[i].toLowerCase() !== address[i])) { + return false; + } + } + return true; +}; + + + +/** + * Makes a checksum address + * + * @method toChecksumAddress + * @param {String} address the given HEX adress + * @return {String} +*/ +var toChecksumAddress = function (address) { + if (typeof address === 'undefined') return ''; + + address = address.toLowerCase().replace('0x',''); + var addressHash = sha3(address); + var checksumAddress = '0x'; + + for (var i = 0; i < address.length; i++ ) { + // If ith character is 9 to f then make it uppercase + if (parseInt(addressHash[i], 16) > 7) { + checksumAddress += address[i].toUpperCase(); + } else { + checksumAddress += address[i]; + } + } + return checksumAddress; +}; + +/** + * Transforms given string to valid 20 bytes-length addres with 0x prefix + * + * @method toAddress + * @param {String} address + * @return {String} formatted address + */ +var toAddress = function (address) { + if (isStrictAddress(address)) { + return address; + } + + if (/^[0-9a-f]{40}$/.test(address)) { + return '0x' + address; + } + + return '0x' + padLeft(toHex(address).substr(2), 40); +}; + +/** + * Returns true if object is BigNumber, otherwise false + * + * @method isBigNumber + * @param {Object} + * @return {Boolean} + */ +var isBigNumber = function (object) { + return object instanceof BigNumber || + (object && object.constructor && object.constructor.name === 'BigNumber'); +}; + +/** + * Returns true if object is string, otherwise false + * + * @method isString + * @param {Object} + * @return {Boolean} + */ +var isString = function (object) { + return typeof object === 'string' || + (object && object.constructor && object.constructor.name === 'String'); +}; + +/** + * Returns true if object is function, otherwise false + * + * @method isFunction + * @param {Object} + * @return {Boolean} + */ +var isFunction = function (object) { + return typeof object === 'function'; +}; + +/** + * Returns true if object is Objet, otherwise false + * + * @method isObject + * @param {Object} + * @return {Boolean} + */ +var isObject = function (object) { + return object !== null && !(object instanceof Array) && typeof object === 'object'; +}; + +/** + * Returns true if object is boolean, otherwise false + * + * @method isBoolean + * @param {Object} + * @return {Boolean} + */ +var isBoolean = function (object) { + return typeof object === 'boolean'; +}; + +/** + * Returns true if object is array, otherwise false + * + * @method isArray + * @param {Object} + * @return {Boolean} + */ +var isArray = function (object) { + return object instanceof Array; +}; + +/** + * Returns true if given string is valid json object + * + * @method isJson + * @param {String} + * @return {Boolean} + */ +var isJson = function (str) { + try { + return !!JSON.parse(str); + } catch (e) { + return false; + } +}; + +/** + * Returns true if given string is a valid Ethereum block header bloom. + * + * @method isBloom + * @param {String} hex encoded bloom filter + * @return {Boolean} + */ +var isBloom = function (bloom) { + if (!/^(0x)?[0-9a-f]{512}$/i.test(bloom)) { + return false; + } else if (/^(0x)?[0-9a-f]{512}$/.test(bloom) || /^(0x)?[0-9A-F]{512}$/.test(bloom)) { + return true; + } + return false; +}; + +/** + * Returns true if given string is a valid log topic. + * + * @method isTopic + * @param {String} hex encoded topic + * @return {Boolean} + */ +var isTopic = function (topic) { + if (!/^(0x)?[0-9a-f]{64}$/i.test(topic)) { + return false; + } else if (/^(0x)?[0-9a-f]{64}$/.test(topic) || /^(0x)?[0-9A-F]{64}$/.test(topic)) { + return true; + } + return false; +}; + +module.exports = { + padLeft: padLeft, + padRight: padRight, + toHex: toHex, + toDecimal: toDecimal, + fromDecimal: fromDecimal, + toUtf8: toUtf8, + toAscii: toAscii, + fromUtf8: fromUtf8, + fromAscii: fromAscii, + transformToFullName: transformToFullName, + extractDisplayName: extractDisplayName, + extractTypeName: extractTypeName, + toWei: toWei, + fromWei: fromWei, + toBigNumber: toBigNumber, + toTwosComplement: toTwosComplement, + toAddress: toAddress, + isBigNumber: isBigNumber, + isStrictAddress: isStrictAddress, + isAddress: isAddress, + isChecksumAddress: isChecksumAddress, + toChecksumAddress: toChecksumAddress, + isFunction: isFunction, + isString: isString, + isObject: isObject, + isBoolean: isBoolean, + isArray: isArray, + isJson: isJson, + isBloom: isBloom, + isTopic: isTopic, +}; + +},{"./sha3.js":19,"bignumber.js":"bignumber.js","utf8":85}],21:[function(require,module,exports){ +module.exports={ + "version": "0.19.0" +} + +},{}],22:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file web3.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * Fabian Vogelsteller + * Gav Wood + * @date 2014 + */ + +var RequestManager = require('./web3/requestmanager'); +var Iban = require('./web3/iban'); +var Eth = require('./web3/methods/eth'); +var DB = require('./web3/methods/db'); +var Shh = require('./web3/methods/shh'); +var Net = require('./web3/methods/net'); +var Personal = require('./web3/methods/personal'); +var Swarm = require('./web3/methods/swarm'); +var Settings = require('./web3/settings'); +var version = require('./version.json'); +var utils = require('./utils/utils'); +var sha3 = require('./utils/sha3'); +var extend = require('./web3/extend'); +var Batch = require('./web3/batch'); +var Property = require('./web3/property'); +var HttpProvider = require('./web3/httpprovider'); +var IpcProvider = require('./web3/ipcprovider'); +var BigNumber = require('bignumber.js'); + + + +function Web3 (provider) { + this._requestManager = new RequestManager(provider); + this.currentProvider = provider; + this.eth = new Eth(this); + this.db = new DB(this); + this.shh = new Shh(this); + this.net = new Net(this); + this.personal = new Personal(this); + this.bzz = new Swarm(this); + this.settings = new Settings(); + this.version = { + api: version.version + }; + this.providers = { + HttpProvider: HttpProvider, + IpcProvider: IpcProvider + }; + this._extend = extend(this); + this._extend({ + properties: properties() + }); +} + +// expose providers on the class +Web3.providers = { + HttpProvider: HttpProvider, + IpcProvider: IpcProvider +}; + +Web3.prototype.setProvider = function (provider) { + this._requestManager.setProvider(provider); + this.currentProvider = provider; +}; + +Web3.prototype.reset = function (keepIsSyncing) { + this._requestManager.reset(keepIsSyncing); + this.settings = new Settings(); +}; + +Web3.prototype.BigNumber = BigNumber; +Web3.prototype.toHex = utils.toHex; +Web3.prototype.toAscii = utils.toAscii; +Web3.prototype.toUtf8 = utils.toUtf8; +Web3.prototype.fromAscii = utils.fromAscii; +Web3.prototype.fromUtf8 = utils.fromUtf8; +Web3.prototype.toDecimal = utils.toDecimal; +Web3.prototype.fromDecimal = utils.fromDecimal; +Web3.prototype.toBigNumber = utils.toBigNumber; +Web3.prototype.toWei = utils.toWei; +Web3.prototype.fromWei = utils.fromWei; +Web3.prototype.isAddress = utils.isAddress; +Web3.prototype.isChecksumAddress = utils.isChecksumAddress; +Web3.prototype.toChecksumAddress = utils.toChecksumAddress; +Web3.prototype.isIBAN = utils.isIBAN; +Web3.prototype.padLeft = utils.padLeft; +Web3.prototype.padRight = utils.padRight; + + +Web3.prototype.sha3 = function(string, options) { + return '0x' + sha3(string, options); +}; + +/** + * Transforms direct icap to address + */ +Web3.prototype.fromICAP = function (icap) { + var iban = new Iban(icap); + return iban.address(); +}; + +var properties = function () { + return [ + new Property({ + name: 'version.node', + getter: 'web3_clientVersion' + }), + new Property({ + name: 'version.network', + getter: 'net_version', + inputFormatter: utils.toDecimal + }), + new Property({ + name: 'version.ethereum', + getter: 'eth_protocolVersion', + inputFormatter: utils.toDecimal + }), + new Property({ + name: 'version.whisper', + getter: 'shh_version', + inputFormatter: utils.toDecimal + }) + ]; +}; + +Web3.prototype.isConnected = function(){ + return (this.currentProvider && this.currentProvider.isConnected()); +}; + +Web3.prototype.createBatch = function () { + return new Batch(this); +}; + +module.exports = Web3; + + +},{"./utils/sha3":19,"./utils/utils":20,"./version.json":21,"./web3/batch":24,"./web3/extend":28,"./web3/httpprovider":32,"./web3/iban":33,"./web3/ipcprovider":34,"./web3/methods/db":37,"./web3/methods/eth":38,"./web3/methods/net":39,"./web3/methods/personal":40,"./web3/methods/shh":41,"./web3/methods/swarm":42,"./web3/property":45,"./web3/requestmanager":46,"./web3/settings":47,"bignumber.js":"bignumber.js"}],23:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file allevents.js + * @author Marek Kotewicz + * @date 2014 + */ + +var sha3 = require('../utils/sha3'); +var SolidityEvent = require('./event'); +var formatters = require('./formatters'); +var utils = require('../utils/utils'); +var Filter = require('./filter'); +var watches = require('./methods/watches'); + +var AllSolidityEvents = function (requestManager, json, address) { + this._requestManager = requestManager; + this._json = json; + this._address = address; +}; + +AllSolidityEvents.prototype.encode = function (options) { + options = options || {}; + var result = {}; + + ['fromBlock', 'toBlock'].filter(function (f) { + return options[f] !== undefined; + }).forEach(function (f) { + result[f] = formatters.inputBlockNumberFormatter(options[f]); + }); + + result.address = this._address; + + return result; +}; + +AllSolidityEvents.prototype.decode = function (data) { + data.data = data.data || ''; + data.topics = data.topics || []; + + var eventTopic = data.topics[0].slice(2); + var match = this._json.filter(function (j) { + return eventTopic === sha3(utils.transformToFullName(j)); + })[0]; + + if (!match) { // cannot find matching event? + console.warn('cannot find event for log'); + return data; + } + + var event = new SolidityEvent(this._requestManager, match, this._address); + return event.decode(data); +}; + +AllSolidityEvents.prototype.execute = function (options, callback) { + + if (utils.isFunction(arguments[arguments.length - 1])) { + callback = arguments[arguments.length - 1]; + if(arguments.length === 1) + options = null; + } + + var o = this.encode(options); + var formatter = this.decode.bind(this); + return new Filter(this._requestManager, o, watches.eth(), formatter, callback); +}; + +AllSolidityEvents.prototype.attachToContract = function (contract) { + var execute = this.execute.bind(this); + contract.allEvents = execute; +}; + +module.exports = AllSolidityEvents; + + +},{"../utils/sha3":19,"../utils/utils":20,"./event":27,"./filter":29,"./formatters":30,"./methods/watches":43}],24:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file batch.js + * @author Marek Kotewicz + * @date 2015 + */ + +var Jsonrpc = require('./jsonrpc'); +var errors = require('./errors'); + +var Batch = function (web3) { + this.requestManager = web3._requestManager; + this.requests = []; +}; + +/** + * Should be called to add create new request to batch request + * + * @method add + * @param {Object} jsonrpc requet object + */ +Batch.prototype.add = function (request) { + this.requests.push(request); +}; + +/** + * Should be called to execute batch request + * + * @method execute + */ +Batch.prototype.execute = function () { + var requests = this.requests; + this.requestManager.sendBatch(requests, function (err, results) { + results = results || []; + requests.map(function (request, index) { + return results[index] || {}; + }).forEach(function (result, index) { + if (requests[index].callback) { + + if (!Jsonrpc.isValidResponse(result)) { + return requests[index].callback(errors.InvalidResponse(result)); + } + + requests[index].callback(null, (requests[index].format ? requests[index].format(result.result) : result.result)); + } + }); + }); +}; + +module.exports = Batch; + + +},{"./errors":26,"./jsonrpc":35}],25:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file contract.js + * @author Marek Kotewicz + * @date 2014 + */ + +var utils = require('../utils/utils'); +var coder = require('../solidity/coder'); +var SolidityEvent = require('./event'); +var SolidityFunction = require('./function'); +var AllEvents = require('./allevents'); + +/** + * Should be called to encode constructor params + * + * @method encodeConstructorParams + * @param {Array} abi + * @param {Array} constructor params + */ +var encodeConstructorParams = function (abi, params) { + return abi.filter(function (json) { + return json.type === 'constructor' && json.inputs.length === params.length; + }).map(function (json) { + return json.inputs.map(function (input) { + return input.type; + }); + }).map(function (types) { + return coder.encodeParams(types, params); + })[0] || ''; +}; + +/** + * Should be called to add functions to contract object + * + * @method addFunctionsToContract + * @param {Contract} contract + * @param {Array} abi + */ +var addFunctionsToContract = function (contract) { + contract.abi.filter(function (json) { + return json.type === 'function'; + }).map(function (json) { + return new SolidityFunction(contract._eth, json, contract.address); + }).forEach(function (f) { + f.attachToContract(contract); + }); +}; + +/** + * Should be called to add events to contract object + * + * @method addEventsToContract + * @param {Contract} contract + * @param {Array} abi + */ +var addEventsToContract = function (contract) { + var events = contract.abi.filter(function (json) { + return json.type === 'event'; + }); + + var All = new AllEvents(contract._eth._requestManager, events, contract.address); + All.attachToContract(contract); + + events.map(function (json) { + return new SolidityEvent(contract._eth._requestManager, json, contract.address); + }).forEach(function (e) { + e.attachToContract(contract); + }); +}; + + +/** + * Should be called to check if the contract gets properly deployed on the blockchain. + * + * @method checkForContractAddress + * @param {Object} contract + * @param {Function} callback + * @returns {Undefined} + */ +var checkForContractAddress = function(contract, callback){ + var count = 0, + callbackFired = false; + + // wait for receipt + var filter = contract._eth.filter('latest', function(e){ + if (!e && !callbackFired) { + count++; + + // stop watching after 50 blocks (timeout) + if (count > 50) { + + filter.stopWatching(function() {}); + callbackFired = true; + + if (callback) + callback(new Error('Contract transaction couldn\'t be found after 50 blocks')); + else + throw new Error('Contract transaction couldn\'t be found after 50 blocks'); + + + } else { + + contract._eth.getTransactionReceipt(contract.transactionHash, function(e, receipt){ + if(receipt && !callbackFired) { + + contract._eth.getCode(receipt.contractAddress, function(e, code){ + /*jshint maxcomplexity: 6 */ + + if(callbackFired || !code) + return; + + filter.stopWatching(function() {}); + callbackFired = true; + + if(code.length > 3) { + + // console.log('Contract code deployed!'); + + contract.address = receipt.contractAddress; + + // attach events and methods again after we have + addFunctionsToContract(contract); + addEventsToContract(contract); + + // call callback for the second time + if(callback) + callback(null, contract); + + } else { + if(callback) + callback(new Error('The contract code couldn\'t be stored, please check your gas amount.')); + else + throw new Error('The contract code couldn\'t be stored, please check your gas amount.'); + } + }); + } + }); + } + } + }); +}; + +/** + * Should be called to create new ContractFactory instance + * + * @method ContractFactory + * @param {Array} abi + */ +var ContractFactory = function (eth, abi) { + this.eth = eth; + this.abi = abi; + + /** + * Should be called to create new contract on a blockchain + * + * @method new + * @param {Any} contract constructor param1 (optional) + * @param {Any} contract constructor param2 (optional) + * @param {Object} contract transaction object (required) + * @param {Function} callback + * @returns {Contract} returns contract instance + */ + this.new = function () { + /*jshint maxcomplexity: 7 */ + + var contract = new Contract(this.eth, this.abi); + + // parse arguments + var options = {}; // required! + var callback; + + var args = Array.prototype.slice.call(arguments); + if (utils.isFunction(args[args.length - 1])) { + callback = args.pop(); + } + + var last = args[args.length - 1]; + if (utils.isObject(last) && !utils.isArray(last)) { + options = args.pop(); + } + + if (options.value > 0) { + var constructorAbi = abi.filter(function (json) { + return json.type === 'constructor' && json.inputs.length === args.length; + })[0] || {}; + + if (!constructorAbi.payable) { + throw new Error('Cannot send value to non-payable constructor'); + } + } + + var bytes = encodeConstructorParams(this.abi, args); + options.data += bytes; + + if (callback) { + + // wait for the contract address adn check if the code was deployed + this.eth.sendTransaction(options, function (err, hash) { + if (err) { + callback(err); + } else { + // add the transaction hash + contract.transactionHash = hash; + + // call callback for the first time + callback(null, contract); + + checkForContractAddress(contract, callback); + } + }); + } else { + var hash = this.eth.sendTransaction(options); + // add the transaction hash + contract.transactionHash = hash; + checkForContractAddress(contract); + } + + return contract; + }; + + this.new.getData = this.getData.bind(this); +}; + +/** + * Should be called to create new ContractFactory + * + * @method contract + * @param {Array} abi + * @returns {ContractFactory} new contract factory + */ +//var contract = function (abi) { + //return new ContractFactory(abi); +//}; + + + +/** + * Should be called to get access to existing contract on a blockchain + * + * @method at + * @param {Address} contract address (required) + * @param {Function} callback {optional) + * @returns {Contract} returns contract if no callback was passed, + * otherwise calls callback function (err, contract) + */ +ContractFactory.prototype.at = function (address, callback) { + var contract = new Contract(this.eth, this.abi, address); + + // this functions are not part of prototype, + // because we dont want to spoil the interface + addFunctionsToContract(contract); + addEventsToContract(contract); + + if (callback) { + callback(null, contract); + } + return contract; +}; + +/** + * Gets the data, which is data to deploy plus constructor params + * + * @method getData + */ +ContractFactory.prototype.getData = function () { + var options = {}; // required! + var args = Array.prototype.slice.call(arguments); + + var last = args[args.length - 1]; + if (utils.isObject(last) && !utils.isArray(last)) { + options = args.pop(); + } + + var bytes = encodeConstructorParams(this.abi, args); + options.data += bytes; + + return options.data; +}; + +/** + * Should be called to create new contract instance + * + * @method Contract + * @param {Array} abi + * @param {Address} contract address + */ +var Contract = function (eth, abi, address) { + this._eth = eth; + this.transactionHash = null; + this.address = address; + this.abi = abi; +}; + +module.exports = ContractFactory; + +},{"../solidity/coder":7,"../utils/utils":20,"./allevents":23,"./event":27,"./function":31}],26:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file errors.js + * @author Marek Kotewicz + * @date 2015 + */ + +module.exports = { + InvalidNumberOfSolidityArgs: function () { + return new Error('Invalid number of arguments to Solidity function'); + }, + InvalidNumberOfRPCParams: function () { + return new Error('Invalid number of input parameters to RPC method'); + }, + InvalidConnection: function (host){ + return new Error('CONNECTION ERROR: Couldn\'t connect to node '+ host +'.'); + }, + InvalidProvider: function () { + return new Error('Provider not set or invalid'); + }, + InvalidResponse: function (result){ + var message = !!result && !!result.error && !!result.error.message ? result.error.message : 'Invalid JSON RPC response: ' + JSON.stringify(result); + return new Error(message); + }, + ConnectionTimeout: function (ms){ + return new Error('CONNECTION TIMEOUT: timeout of ' + ms + ' ms achived'); + } +}; + +},{}],27:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file event.js + * @author Marek Kotewicz + * @date 2014 + */ + +var utils = require('../utils/utils'); +var coder = require('../solidity/coder'); +var formatters = require('./formatters'); +var sha3 = require('../utils/sha3'); +var Filter = require('./filter'); +var watches = require('./methods/watches'); + +/** + * This prototype should be used to create event filters + */ +var SolidityEvent = function (requestManager, json, address) { + this._requestManager = requestManager; + this._params = json.inputs; + this._name = utils.transformToFullName(json); + this._address = address; + this._anonymous = json.anonymous; +}; + +/** + * Should be used to get filtered param types + * + * @method types + * @param {Bool} decide if returned typed should be indexed + * @return {Array} array of types + */ +SolidityEvent.prototype.types = function (indexed) { + return this._params.filter(function (i) { + return i.indexed === indexed; + }).map(function (i) { + return i.type; + }); +}; + +/** + * Should be used to get event display name + * + * @method displayName + * @return {String} event display name + */ +SolidityEvent.prototype.displayName = function () { + return utils.extractDisplayName(this._name); +}; + +/** + * Should be used to get event type name + * + * @method typeName + * @return {String} event type name + */ +SolidityEvent.prototype.typeName = function () { + return utils.extractTypeName(this._name); +}; + +/** + * Should be used to get event signature + * + * @method signature + * @return {String} event signature + */ +SolidityEvent.prototype.signature = function () { + return sha3(this._name); +}; + +/** + * Should be used to encode indexed params and options to one final object + * + * @method encode + * @param {Object} indexed + * @param {Object} options + * @return {Object} everything combined together and encoded + */ +SolidityEvent.prototype.encode = function (indexed, options) { + indexed = indexed || {}; + options = options || {}; + var result = {}; + + ['fromBlock', 'toBlock'].filter(function (f) { + return options[f] !== undefined; + }).forEach(function (f) { + result[f] = formatters.inputBlockNumberFormatter(options[f]); + }); + + result.topics = []; + + result.address = this._address; + if (!this._anonymous) { + result.topics.push('0x' + this.signature()); + } + + var indexedTopics = this._params.filter(function (i) { + return i.indexed === true; + }).map(function (i) { + var value = indexed[i.name]; + if (value === undefined || value === null) { + return null; + } + + if (utils.isArray(value)) { + return value.map(function (v) { + return '0x' + coder.encodeParam(i.type, v); + }); + } + return '0x' + coder.encodeParam(i.type, value); + }); + + result.topics = result.topics.concat(indexedTopics); + + return result; +}; + +/** + * Should be used to decode indexed params and options + * + * @method decode + * @param {Object} data + * @return {Object} result object with decoded indexed && not indexed params + */ +SolidityEvent.prototype.decode = function (data) { + + data.data = data.data || ''; + data.topics = data.topics || []; + + var argTopics = this._anonymous ? data.topics : data.topics.slice(1); + var indexedData = argTopics.map(function (topics) { return topics.slice(2); }).join(""); + var indexedParams = coder.decodeParams(this.types(true), indexedData); + + var notIndexedData = data.data.slice(2); + var notIndexedParams = coder.decodeParams(this.types(false), notIndexedData); + + var result = formatters.outputLogFormatter(data); + result.event = this.displayName(); + result.address = data.address; + + result.args = this._params.reduce(function (acc, current) { + acc[current.name] = current.indexed ? indexedParams.shift() : notIndexedParams.shift(); + return acc; + }, {}); + + delete result.data; + delete result.topics; + + return result; +}; + +/** + * Should be used to create new filter object from event + * + * @method execute + * @param {Object} indexed + * @param {Object} options + * @return {Object} filter object + */ +SolidityEvent.prototype.execute = function (indexed, options, callback) { + + if (utils.isFunction(arguments[arguments.length - 1])) { + callback = arguments[arguments.length - 1]; + if(arguments.length === 2) + options = null; + if(arguments.length === 1) { + options = null; + indexed = {}; + } + } + + var o = this.encode(indexed, options); + var formatter = this.decode.bind(this); + return new Filter(this._requestManager, o, watches.eth(), formatter, callback); +}; + +/** + * Should be used to attach event to contract object + * + * @method attachToContract + * @param {Contract} + */ +SolidityEvent.prototype.attachToContract = function (contract) { + var execute = this.execute.bind(this); + var displayName = this.displayName(); + if (!contract[displayName]) { + contract[displayName] = execute; + } + contract[displayName][this.typeName()] = this.execute.bind(this, contract); +}; + +module.exports = SolidityEvent; + + +},{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"./filter":29,"./formatters":30,"./methods/watches":43}],28:[function(require,module,exports){ +var formatters = require('./formatters'); +var utils = require('./../utils/utils'); +var Method = require('./method'); +var Property = require('./property'); + +// TODO: refactor, so the input params are not altered. +// it's necessary to make same 'extension' work with multiple providers +var extend = function (web3) { + /* jshint maxcomplexity:5 */ + var ex = function (extension) { + + var extendedObject; + if (extension.property) { + if (!web3[extension.property]) { + web3[extension.property] = {}; + } + extendedObject = web3[extension.property]; + } else { + extendedObject = web3; + } + + if (extension.methods) { + extension.methods.forEach(function (method) { + method.attachToObject(extendedObject); + method.setRequestManager(web3._requestManager); + }); + } + + if (extension.properties) { + extension.properties.forEach(function (property) { + property.attachToObject(extendedObject); + property.setRequestManager(web3._requestManager); + }); + } + }; + + ex.formatters = formatters; + ex.utils = utils; + ex.Method = Method; + ex.Property = Property; + + return ex; +}; + + + +module.exports = extend; + + +},{"./../utils/utils":20,"./formatters":30,"./method":36,"./property":45}],29:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file filter.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * Fabian Vogelsteller + * Gav Wood + * @date 2014 + */ + +var formatters = require('./formatters'); +var utils = require('../utils/utils'); + +/** +* Converts a given topic to a hex string, but also allows null values. +* +* @param {Mixed} value +* @return {String} +*/ +var toTopic = function(value){ + + if(value === null || typeof value === 'undefined') + return null; + + value = String(value); + + if(value.indexOf('0x') === 0) + return value; + else + return utils.fromUtf8(value); +}; + +/// This method should be called on options object, to verify deprecated properties && lazy load dynamic ones +/// @param should be string or object +/// @returns options string or object +var getOptions = function (options) { + + if (utils.isString(options)) { + return options; + } + + options = options || {}; + + // make sure topics, get converted to hex + options.topics = options.topics || []; + options.topics = options.topics.map(function(topic){ + return (utils.isArray(topic)) ? topic.map(toTopic) : toTopic(topic); + }); + + return { + topics: options.topics, + from: options.from, + to: options.to, + address: options.address, + fromBlock: formatters.inputBlockNumberFormatter(options.fromBlock), + toBlock: formatters.inputBlockNumberFormatter(options.toBlock) + }; +}; + +/** +Adds the callback and sets up the methods, to iterate over the results. + +@method getLogsAtStart +@param {Object} self +@param {funciton} +*/ +var getLogsAtStart = function(self, callback){ + // call getFilterLogs for the first watch callback start + if (!utils.isString(self.options)) { + self.get(function (err, messages) { + // don't send all the responses to all the watches again... just to self one + if (err) { + callback(err); + } + + if(utils.isArray(messages)) { + messages.forEach(function (message) { + callback(null, message); + }); + } + }); + } +}; + +/** +Adds the callback and sets up the methods, to iterate over the results. + +@method pollFilter +@param {Object} self +*/ +var pollFilter = function(self) { + + var onMessage = function (error, messages) { + if (error) { + return self.callbacks.forEach(function (callback) { + callback(error); + }); + } + + if(utils.isArray(messages)) { + messages.forEach(function (message) { + message = self.formatter ? self.formatter(message) : message; + self.callbacks.forEach(function (callback) { + callback(null, message); + }); + }); + } + }; + + self.requestManager.startPolling({ + method: self.implementation.poll.call, + params: [self.filterId], + }, self.filterId, onMessage, self.stopWatching.bind(self)); + +}; + +var Filter = function (requestManager, options, methods, formatter, callback, filterCreationErrorCallback) { + var self = this; + var implementation = {}; + methods.forEach(function (method) { + method.setRequestManager(requestManager); + method.attachToObject(implementation); + }); + this.requestManager = requestManager; + this.options = getOptions(options); + this.implementation = implementation; + this.filterId = null; + this.callbacks = []; + this.getLogsCallbacks = []; + this.pollFilters = []; + this.formatter = formatter; + this.implementation.newFilter(this.options, function(error, id){ + if(error) { + self.callbacks.forEach(function(cb){ + cb(error); + }); + if (typeof filterCreationErrorCallback === 'function') { + filterCreationErrorCallback(error); + } + } else { + self.filterId = id; + + // check if there are get pending callbacks as a consequence + // of calling get() with filterId unassigned. + self.getLogsCallbacks.forEach(function (cb){ + self.get(cb); + }); + self.getLogsCallbacks = []; + + // get filter logs for the already existing watch calls + self.callbacks.forEach(function(cb){ + getLogsAtStart(self, cb); + }); + if(self.callbacks.length > 0) + pollFilter(self); + + // start to watch immediately + if(typeof callback === 'function') { + return self.watch(callback); + } + } + }); + + return this; +}; + +Filter.prototype.watch = function (callback) { + this.callbacks.push(callback); + + if(this.filterId) { + getLogsAtStart(this, callback); + pollFilter(this); + } + + return this; +}; + +Filter.prototype.stopWatching = function (callback) { + this.requestManager.stopPolling(this.filterId); + this.callbacks = []; + // remove filter async + if (callback) { + this.implementation.uninstallFilter(this.filterId, callback); + } else { + return this.implementation.uninstallFilter(this.filterId); + } +}; + +Filter.prototype.get = function (callback) { + var self = this; + if (utils.isFunction(callback)) { + if (this.filterId === null) { + // If filterId is not set yet, call it back + // when newFilter() assigns it. + this.getLogsCallbacks.push(callback); + } else { + this.implementation.getLogs(this.filterId, function(err, res){ + if (err) { + callback(err); + } else { + callback(null, res.map(function (log) { + return self.formatter ? self.formatter(log) : log; + })); + } + }); + } + } else { + if (this.filterId === null) { + throw new Error('Filter ID Error: filter().get() can\'t be chained synchronous, please provide a callback for the get() method.'); + } + var logs = this.implementation.getLogs(this.filterId); + return logs.map(function (log) { + return self.formatter ? self.formatter(log) : log; + }); + } + + return this; +}; + +module.exports = Filter; + + +},{"../utils/utils":20,"./formatters":30}],30:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file formatters.js + * @author Marek Kotewicz + * @author Fabian Vogelsteller + * @date 2015 + */ + +var utils = require('../utils/utils'); +var config = require('../utils/config'); +var Iban = require('./iban'); + +/** + * Should the format output to a big number + * + * @method outputBigNumberFormatter + * @param {String|Number|BigNumber} + * @returns {BigNumber} object + */ +var outputBigNumberFormatter = function (number) { + return utils.toBigNumber(number); +}; + +var isPredefinedBlockNumber = function (blockNumber) { + return blockNumber === 'latest' || blockNumber === 'pending' || blockNumber === 'earliest'; +}; + +var inputDefaultBlockNumberFormatter = function (blockNumber) { + if (blockNumber === undefined) { + return config.defaultBlock; + } + return inputBlockNumberFormatter(blockNumber); +}; + +var inputBlockNumberFormatter = function (blockNumber) { + if (blockNumber === undefined) { + return undefined; + } else if (isPredefinedBlockNumber(blockNumber)) { + return blockNumber; + } + return utils.toHex(blockNumber); +}; + +/** + * Formats the input of a transaction and converts all values to HEX + * + * @method inputCallFormatter + * @param {Object} transaction options + * @returns object +*/ +var inputCallFormatter = function (options){ + + options.from = options.from || config.defaultAccount; + + if (options.from) { + options.from = inputAddressFormatter(options.from); + } + + if (options.to) { // it might be contract creation + options.to = inputAddressFormatter(options.to); + } + + ['gasPrice', 'gas', 'value', 'nonce'].filter(function (key) { + return options[key] !== undefined; + }).forEach(function(key){ + options[key] = utils.fromDecimal(options[key]); + }); + + return options; +}; + +/** + * Formats the input of a transaction and converts all values to HEX + * + * @method inputTransactionFormatter + * @param {Object} transaction options + * @returns object +*/ +var inputTransactionFormatter = function (options){ + + options.from = options.from || config.defaultAccount; + options.from = inputAddressFormatter(options.from); + + if (options.to) { // it might be contract creation + options.to = inputAddressFormatter(options.to); + } + + ['gasPrice', 'gas', 'value', 'nonce'].filter(function (key) { + return options[key] !== undefined; + }).forEach(function(key){ + options[key] = utils.fromDecimal(options[key]); + }); + + return options; +}; + +/** + * Formats the output of a transaction to its proper values + * + * @method outputTransactionFormatter + * @param {Object} tx + * @returns {Object} +*/ +var outputTransactionFormatter = function (tx){ + if(tx.blockNumber !== null) + tx.blockNumber = utils.toDecimal(tx.blockNumber); + if(tx.transactionIndex !== null) + tx.transactionIndex = utils.toDecimal(tx.transactionIndex); + tx.nonce = utils.toDecimal(tx.nonce); + tx.gas = utils.toDecimal(tx.gas); + tx.gasPrice = utils.toBigNumber(tx.gasPrice); + tx.value = utils.toBigNumber(tx.value); + return tx; +}; + +/** + * Formats the output of a transaction receipt to its proper values + * + * @method outputTransactionReceiptFormatter + * @param {Object} receipt + * @returns {Object} +*/ +var outputTransactionReceiptFormatter = function (receipt){ + if(receipt.blockNumber !== null) + receipt.blockNumber = utils.toDecimal(receipt.blockNumber); + if(receipt.transactionIndex !== null) + receipt.transactionIndex = utils.toDecimal(receipt.transactionIndex); + receipt.cumulativeGasUsed = utils.toDecimal(receipt.cumulativeGasUsed); + receipt.gasUsed = utils.toDecimal(receipt.gasUsed); + + if(utils.isArray(receipt.logs)) { + receipt.logs = receipt.logs.map(function(log){ + return outputLogFormatter(log); + }); + } + + return receipt; +}; + +/** + * Formats the output of a block to its proper values + * + * @method outputBlockFormatter + * @param {Object} block + * @returns {Object} +*/ +var outputBlockFormatter = function(block) { + + // transform to number + block.gasLimit = utils.toDecimal(block.gasLimit); + block.gasUsed = utils.toDecimal(block.gasUsed); + block.size = utils.toDecimal(block.size); + block.timestamp = utils.toDecimal(block.timestamp); + if(block.number !== null) + block.number = utils.toDecimal(block.number); + + block.difficulty = utils.toBigNumber(block.difficulty); + block.totalDifficulty = utils.toBigNumber(block.totalDifficulty); + + if (utils.isArray(block.transactions)) { + block.transactions.forEach(function(item){ + if(!utils.isString(item)) + return outputTransactionFormatter(item); + }); + } + + return block; +}; + +/** + * Formats the output of a log + * + * @method outputLogFormatter + * @param {Object} log object + * @returns {Object} log +*/ +var outputLogFormatter = function(log) { + if(log.blockNumber !== null) + log.blockNumber = utils.toDecimal(log.blockNumber); + if(log.transactionIndex !== null) + log.transactionIndex = utils.toDecimal(log.transactionIndex); + if(log.logIndex !== null) + log.logIndex = utils.toDecimal(log.logIndex); + + return log; +}; + +/** + * Formats the input of a whisper post and converts all values to HEX + * + * @method inputPostFormatter + * @param {Object} transaction object + * @returns {Object} +*/ +var inputPostFormatter = function(post) { + + // post.payload = utils.toHex(post.payload); + post.ttl = utils.fromDecimal(post.ttl); + post.workToProve = utils.fromDecimal(post.workToProve); + post.priority = utils.fromDecimal(post.priority); + + // fallback + if (!utils.isArray(post.topics)) { + post.topics = post.topics ? [post.topics] : []; + } + + // format the following options + post.topics = post.topics.map(function(topic){ + // convert only if not hex + return (topic.indexOf('0x') === 0) ? topic : utils.fromUtf8(topic); + }); + + return post; +}; + +/** + * Formats the output of a received post message + * + * @method outputPostFormatter + * @param {Object} + * @returns {Object} + */ +var outputPostFormatter = function(post){ + + post.expiry = utils.toDecimal(post.expiry); + post.sent = utils.toDecimal(post.sent); + post.ttl = utils.toDecimal(post.ttl); + post.workProved = utils.toDecimal(post.workProved); + // post.payloadRaw = post.payload; + // post.payload = utils.toAscii(post.payload); + + // if (utils.isJson(post.payload)) { + // post.payload = JSON.parse(post.payload); + // } + + // format the following options + if (!post.topics) { + post.topics = []; + } + post.topics = post.topics.map(function(topic){ + return utils.toAscii(topic); + }); + + return post; +}; + +var inputAddressFormatter = function (address) { + var iban = new Iban(address); + if (iban.isValid() && iban.isDirect()) { + return '0x' + iban.address(); + } else if (utils.isStrictAddress(address)) { + return address; + } else if (utils.isAddress(address)) { + return '0x' + address; + } + throw new Error('invalid address'); +}; + + +var outputSyncingFormatter = function(result) { + + result.startingBlock = utils.toDecimal(result.startingBlock); + result.currentBlock = utils.toDecimal(result.currentBlock); + result.highestBlock = utils.toDecimal(result.highestBlock); + if (result.knownStates) { + result.knownStates = utils.toDecimal(result.knownStates); + result.pulledStates = utils.toDecimal(result.pulledStates); + } + + return result; +}; + +module.exports = { + inputDefaultBlockNumberFormatter: inputDefaultBlockNumberFormatter, + inputBlockNumberFormatter: inputBlockNumberFormatter, + inputCallFormatter: inputCallFormatter, + inputTransactionFormatter: inputTransactionFormatter, + inputAddressFormatter: inputAddressFormatter, + inputPostFormatter: inputPostFormatter, + outputBigNumberFormatter: outputBigNumberFormatter, + outputTransactionFormatter: outputTransactionFormatter, + outputTransactionReceiptFormatter: outputTransactionReceiptFormatter, + outputBlockFormatter: outputBlockFormatter, + outputLogFormatter: outputLogFormatter, + outputPostFormatter: outputPostFormatter, + outputSyncingFormatter: outputSyncingFormatter +}; + + +},{"../utils/config":18,"../utils/utils":20,"./iban":33}],31:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file function.js + * @author Marek Kotewicz + * @date 2015 + */ + +var coder = require('../solidity/coder'); +var utils = require('../utils/utils'); +var errors = require('./errors'); +var formatters = require('./formatters'); +var sha3 = require('../utils/sha3'); + +/** + * This prototype should be used to call/sendTransaction to solidity functions + */ +var SolidityFunction = function (eth, json, address) { + this._eth = eth; + this._inputTypes = json.inputs.map(function (i) { + return i.type; + }); + this._outputTypes = json.outputs.map(function (i) { + return i.type; + }); + this._constant = json.constant; + this._payable = json.payable; + this._name = utils.transformToFullName(json); + this._address = address; +}; + +SolidityFunction.prototype.extractCallback = function (args) { + if (utils.isFunction(args[args.length - 1])) { + return args.pop(); // modify the args array! + } +}; + +SolidityFunction.prototype.extractDefaultBlock = function (args) { + if (args.length > this._inputTypes.length && !utils.isObject(args[args.length -1])) { + return formatters.inputDefaultBlockNumberFormatter(args.pop()); // modify the args array! + } +}; + +/** + * Should be called to check if the number of arguments is correct + * + * @method validateArgs + * @param {Array} arguments + * @throws {Error} if it is not + */ +SolidityFunction.prototype.validateArgs = function (args) { + var inputArgs = args.filter(function (a) { + // filter the options object but not arguments that are arrays + return !(utils.isObject(a) === true && utils.isArray(a) === false); + }); + if (inputArgs.length !== this._inputTypes.length) { + throw errors.InvalidNumberOfSolidityArgs(); + } +}; + +/** + * Should be used to create payload from arguments + * + * @method toPayload + * @param {Array} solidity function params + * @param {Object} optional payload options + */ +SolidityFunction.prototype.toPayload = function (args) { + var options = {}; + if (args.length > this._inputTypes.length && utils.isObject(args[args.length -1])) { + options = args[args.length - 1]; + } + this.validateArgs(args); + options.to = this._address; + options.data = '0x' + this.signature() + coder.encodeParams(this._inputTypes, args); + return options; +}; + +/** + * Should be used to get function signature + * + * @method signature + * @return {String} function signature + */ +SolidityFunction.prototype.signature = function () { + return sha3(this._name).slice(0, 8); +}; + + +SolidityFunction.prototype.unpackOutput = function (output) { + if (!output) { + return; + } + + output = output.length >= 2 ? output.slice(2) : output; + var result = coder.decodeParams(this._outputTypes, output); + return result.length === 1 ? result[0] : result; +}; + +/** + * Calls a contract function. + * + * @method call + * @param {...Object} Contract function arguments + * @param {function} If the last argument is a function, the contract function + * call will be asynchronous, and the callback will be passed the + * error and result. + * @return {String} output bytes + */ +SolidityFunction.prototype.call = function () { + var args = Array.prototype.slice.call(arguments).filter(function (a) {return a !== undefined; }); + var callback = this.extractCallback(args); + var defaultBlock = this.extractDefaultBlock(args); + var payload = this.toPayload(args); + + + if (!callback) { + var output = this._eth.call(payload, defaultBlock); + return this.unpackOutput(output); + } + + var self = this; + this._eth.call(payload, defaultBlock, function (error, output) { + if (error) return callback(error, null); + + var unpacked = null; + try { + unpacked = self.unpackOutput(output); + } + catch (e) { + error = e; + } + + callback(error, unpacked); + }); +}; + +/** + * Should be used to sendTransaction to solidity function + * + * @method sendTransaction + */ +SolidityFunction.prototype.sendTransaction = function () { + var args = Array.prototype.slice.call(arguments).filter(function (a) {return a !== undefined; }); + var callback = this.extractCallback(args); + var payload = this.toPayload(args); + + if (payload.value > 0 && !this._payable) { + throw new Error('Cannot send value to non-payable function'); + } + + if (!callback) { + return this._eth.sendTransaction(payload); + } + + this._eth.sendTransaction(payload, callback); +}; + +/** + * Should be used to estimateGas of solidity function + * + * @method estimateGas + */ +SolidityFunction.prototype.estimateGas = function () { + var args = Array.prototype.slice.call(arguments); + var callback = this.extractCallback(args); + var payload = this.toPayload(args); + + if (!callback) { + return this._eth.estimateGas(payload); + } + + this._eth.estimateGas(payload, callback); +}; + +/** + * Return the encoded data of the call + * + * @method getData + * @return {String} the encoded data + */ +SolidityFunction.prototype.getData = function () { + var args = Array.prototype.slice.call(arguments); + var payload = this.toPayload(args); + + return payload.data; +}; + +/** + * Should be used to get function display name + * + * @method displayName + * @return {String} display name of the function + */ +SolidityFunction.prototype.displayName = function () { + return utils.extractDisplayName(this._name); +}; + +/** + * Should be used to get function type name + * + * @method typeName + * @return {String} type name of the function + */ +SolidityFunction.prototype.typeName = function () { + return utils.extractTypeName(this._name); +}; + +/** + * Should be called to get rpc requests from solidity function + * + * @method request + * @returns {Object} + */ +SolidityFunction.prototype.request = function () { + var args = Array.prototype.slice.call(arguments); + var callback = this.extractCallback(args); + var payload = this.toPayload(args); + var format = this.unpackOutput.bind(this); + + return { + method: this._constant ? 'eth_call' : 'eth_sendTransaction', + callback: callback, + params: [payload], + format: format + }; +}; + +/** + * Should be called to execute function + * + * @method execute + */ +SolidityFunction.prototype.execute = function () { + var transaction = !this._constant; + + // send transaction + if (transaction) { + return this.sendTransaction.apply(this, Array.prototype.slice.call(arguments)); + } + + // call + return this.call.apply(this, Array.prototype.slice.call(arguments)); +}; + +/** + * Should be called to attach function to contract + * + * @method attachToContract + * @param {Contract} + */ +SolidityFunction.prototype.attachToContract = function (contract) { + var execute = this.execute.bind(this); + execute.request = this.request.bind(this); + execute.call = this.call.bind(this); + execute.sendTransaction = this.sendTransaction.bind(this); + execute.estimateGas = this.estimateGas.bind(this); + execute.getData = this.getData.bind(this); + var displayName = this.displayName(); + if (!contract[displayName]) { + contract[displayName] = execute; + } + contract[displayName][this.typeName()] = execute; // circular!!!! +}; + +module.exports = SolidityFunction; + +},{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"./errors":26,"./formatters":30}],32:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file httpprovider.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * Fabian Vogelsteller + * @date 2015 + */ + + +var errors = require('./errors'); + +// workaround to use httpprovider in different envs + +// browser +if (typeof window !== 'undefined' && window.XMLHttpRequest) { + XMLHttpRequest = window.XMLHttpRequest; // jshint ignore: line +// node +} else { + XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore: line +} + +var XHR2 = require('xhr2'); // jshint ignore: line + +/** + * HttpProvider should be used to send rpc calls over http + */ +var HttpProvider = function (host, timeout) { + this.host = host || 'http://localhost:8545'; + this.timeout = timeout || 0; +}; + +/** + * Should be called to prepare new XMLHttpRequest + * + * @method prepareRequest + * @param {Boolean} true if request should be async + * @return {XMLHttpRequest} object + */ +HttpProvider.prototype.prepareRequest = function (async) { + var request; + + if (async) { + request = new XHR2(); + request.timeout = this.timeout; + }else { + request = new XMLHttpRequest(); + } + + request.open('POST', this.host, async); + request.setRequestHeader('Content-Type','application/json'); + return request; +}; + +/** + * Should be called to make sync request + * + * @method send + * @param {Object} payload + * @return {Object} result + */ +HttpProvider.prototype.send = function (payload) { + var request = this.prepareRequest(false); + + try { + request.send(JSON.stringify(payload)); + } catch(error) { + throw errors.InvalidConnection(this.host); + } + + var result = request.responseText; + + try { + result = JSON.parse(result); + } catch(e) { + throw errors.InvalidResponse(request.responseText); + } + + return result; +}; + +/** + * Should be used to make async request + * + * @method sendAsync + * @param {Object} payload + * @param {Function} callback triggered on end with (err, result) + */ +HttpProvider.prototype.sendAsync = function (payload, callback) { + var request = this.prepareRequest(true); + + request.onreadystatechange = function() { + if (request.readyState === 4 && request.timeout !== 1) { + var result = request.responseText; + var error = null; + + try { + result = JSON.parse(result); + } catch(e) { + error = errors.InvalidResponse(request.responseText); + } + + callback(error, result); + } + }; + + request.ontimeout = function() { + callback(errors.ConnectionTimeout(this.timeout)); + }; + + try { + request.send(JSON.stringify(payload)); + } catch(error) { + callback(errors.InvalidConnection(this.host)); + } +}; + +/** + * Synchronously tries to make Http request + * + * @method isConnected + * @return {Boolean} returns true if request haven't failed. Otherwise false + */ +HttpProvider.prototype.isConnected = function() { + try { + this.send({ + id: 9999999999, + jsonrpc: '2.0', + method: 'net_listening', + params: [] + }); + return true; + } catch(e) { + return false; + } +}; + +module.exports = HttpProvider; + +},{"./errors":26,"xhr2":86,"xmlhttprequest":17}],33:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file iban.js + * @author Marek Kotewicz + * @date 2015 + */ + +var BigNumber = require('bignumber.js'); + +var padLeft = function (string, bytes) { + var result = string; + while (result.length < bytes * 2) { + result = '0' + result; + } + return result; +}; + +/** + * Prepare an IBAN for mod 97 computation by moving the first 4 chars to the end and transforming the letters to + * numbers (A = 10, B = 11, ..., Z = 35), as specified in ISO13616. + * + * @method iso13616Prepare + * @param {String} iban the IBAN + * @returns {String} the prepared IBAN + */ +var iso13616Prepare = function (iban) { + var A = 'A'.charCodeAt(0); + var Z = 'Z'.charCodeAt(0); + + iban = iban.toUpperCase(); + iban = iban.substr(4) + iban.substr(0,4); + + return iban.split('').map(function(n){ + var code = n.charCodeAt(0); + if (code >= A && code <= Z){ + // A = 10, B = 11, ... Z = 35 + return code - A + 10; + } else { + return n; + } + }).join(''); +}; + +/** + * Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064. + * + * @method mod9710 + * @param {String} iban + * @returns {Number} + */ +var mod9710 = function (iban) { + var remainder = iban, + block; + + while (remainder.length > 2){ + block = remainder.slice(0, 9); + remainder = parseInt(block, 10) % 97 + remainder.slice(block.length); + } + + return parseInt(remainder, 10) % 97; +}; + +/** + * This prototype should be used to create iban object from iban correct string + * + * @param {String} iban + */ +var Iban = function (iban) { + this._iban = iban; +}; + +/** + * This method should be used to create iban object from ethereum address + * + * @method fromAddress + * @param {String} address + * @return {Iban} the IBAN object + */ +Iban.fromAddress = function (address) { + var asBn = new BigNumber(address, 16); + var base36 = asBn.toString(36); + var padded = padLeft(base36, 15); + return Iban.fromBban(padded.toUpperCase()); +}; + +/** + * Convert the passed BBAN to an IBAN for this country specification. + * Please note that "generation of the IBAN shall be the exclusive responsibility of the bank/branch servicing the account". + * This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits + * + * @method fromBban + * @param {String} bban the BBAN to convert to IBAN + * @returns {Iban} the IBAN object + */ +Iban.fromBban = function (bban) { + var countryCode = 'XE'; + + var remainder = mod9710(iso13616Prepare(countryCode + '00' + bban)); + var checkDigit = ('0' + (98 - remainder)).slice(-2); + + return new Iban(countryCode + checkDigit + bban); +}; + +/** + * Should be used to create IBAN object for given institution and identifier + * + * @method createIndirect + * @param {Object} options, required options are "institution" and "identifier" + * @return {Iban} the IBAN object + */ +Iban.createIndirect = function (options) { + return Iban.fromBban('ETH' + options.institution + options.identifier); +}; + +/** + * Thos method should be used to check if given string is valid iban object + * + * @method isValid + * @param {String} iban string + * @return {Boolean} true if it is valid IBAN + */ +Iban.isValid = function (iban) { + var i = new Iban(iban); + return i.isValid(); +}; + +/** + * Should be called to check if iban is correct + * + * @method isValid + * @returns {Boolean} true if it is, otherwise false + */ +Iban.prototype.isValid = function () { + return /^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban) && + mod9710(iso13616Prepare(this._iban)) === 1; +}; + +/** + * Should be called to check if iban number is direct + * + * @method isDirect + * @returns {Boolean} true if it is, otherwise false + */ +Iban.prototype.isDirect = function () { + return this._iban.length === 34 || this._iban.length === 35; +}; + +/** + * Should be called to check if iban number if indirect + * + * @method isIndirect + * @returns {Boolean} true if it is, otherwise false + */ +Iban.prototype.isIndirect = function () { + return this._iban.length === 20; +}; + +/** + * Should be called to get iban checksum + * Uses the mod-97-10 checksumming protocol (ISO/IEC 7064:2003) + * + * @method checksum + * @returns {String} checksum + */ +Iban.prototype.checksum = function () { + return this._iban.substr(2, 2); +}; + +/** + * Should be called to get institution identifier + * eg. XREG + * + * @method institution + * @returns {String} institution identifier + */ +Iban.prototype.institution = function () { + return this.isIndirect() ? this._iban.substr(7, 4) : ''; +}; + +/** + * Should be called to get client identifier within institution + * eg. GAVOFYORK + * + * @method client + * @returns {String} client identifier + */ +Iban.prototype.client = function () { + return this.isIndirect() ? this._iban.substr(11) : ''; +}; + +/** + * Should be called to get client direct address + * + * @method address + * @returns {String} client direct address + */ +Iban.prototype.address = function () { + if (this.isDirect()) { + var base36 = this._iban.substr(4); + var asBn = new BigNumber(base36, 36); + return padLeft(asBn.toString(16), 20); + } + + return ''; +}; + +Iban.prototype.toString = function () { + return this._iban; +}; + +module.exports = Iban; + + +},{"bignumber.js":"bignumber.js"}],34:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file ipcprovider.js + * @authors: + * Fabian Vogelsteller + * @date 2015 + */ + +"use strict"; + +var utils = require('../utils/utils'); +var errors = require('./errors'); + + +var IpcProvider = function (path, net) { + var _this = this; + this.responseCallbacks = {}; + this.path = path; + + this.connection = net.connect({path: this.path}); + + this.connection.on('error', function(e){ + console.error('IPC Connection Error', e); + _this._timeout(); + }); + + this.connection.on('end', function(){ + _this._timeout(); + }); + + + // LISTEN FOR CONNECTION RESPONSES + this.connection.on('data', function(data) { + /*jshint maxcomplexity: 6 */ + + _this._parseResponse(data.toString()).forEach(function(result){ + + var id = null; + + // get the id which matches the returned id + if(utils.isArray(result)) { + result.forEach(function(load){ + if(_this.responseCallbacks[load.id]) + id = load.id; + }); + } else { + id = result.id; + } + + // fire the callback + if(_this.responseCallbacks[id]) { + _this.responseCallbacks[id](null, result); + delete _this.responseCallbacks[id]; + } + }); + }); +}; + +/** +Will parse the response and make an array out of it. + +@method _parseResponse +@param {String} data +*/ +IpcProvider.prototype._parseResponse = function(data) { + var _this = this, + returnValues = []; + + // DE-CHUNKER + var dechunkedData = data + .replace(/\}[\n\r]?\{/g,'}|--|{') // }{ + .replace(/\}\][\n\r]?\[\{/g,'}]|--|[{') // }][{ + .replace(/\}[\n\r]?\[\{/g,'}|--|[{') // }[{ + .replace(/\}\][\n\r]?\{/g,'}]|--|{') // }]{ + .split('|--|'); + + dechunkedData.forEach(function(data){ + + // prepend the last chunk + if(_this.lastChunk) + data = _this.lastChunk + data; + + var result = null; + + try { + result = JSON.parse(data); + + } catch(e) { + + _this.lastChunk = data; + + // start timeout to cancel all requests + clearTimeout(_this.lastChunkTimeout); + _this.lastChunkTimeout = setTimeout(function(){ + _this._timeout(); + throw errors.InvalidResponse(data); + }, 1000 * 15); + + return; + } + + // cancel timeout and set chunk to null + clearTimeout(_this.lastChunkTimeout); + _this.lastChunk = null; + + if(result) + returnValues.push(result); + }); + + return returnValues; +}; + + +/** +Get the adds a callback to the responseCallbacks object, +which will be called if a response matching the response Id will arrive. + +@method _addResponseCallback +*/ +IpcProvider.prototype._addResponseCallback = function(payload, callback) { + var id = payload.id || payload[0].id; + var method = payload.method || payload[0].method; + + this.responseCallbacks[id] = callback; + this.responseCallbacks[id].method = method; +}; + +/** +Timeout all requests when the end/error event is fired + +@method _timeout +*/ +IpcProvider.prototype._timeout = function() { + for(var key in this.responseCallbacks) { + if(this.responseCallbacks.hasOwnProperty(key)){ + this.responseCallbacks[key](errors.InvalidConnection('on IPC')); + delete this.responseCallbacks[key]; + } + } +}; + + +/** +Check if the current connection is still valid. + +@method isConnected +*/ +IpcProvider.prototype.isConnected = function() { + var _this = this; + + // try reconnect, when connection is gone + if(!_this.connection.writable) + _this.connection.connect({path: _this.path}); + + return !!this.connection.writable; +}; + +IpcProvider.prototype.send = function (payload) { + + if(this.connection.writeSync) { + var result; + + // try reconnect, when connection is gone + if(!this.connection.writable) + this.connection.connect({path: this.path}); + + var data = this.connection.writeSync(JSON.stringify(payload)); + + try { + result = JSON.parse(data); + } catch(e) { + throw errors.InvalidResponse(data); + } + + return result; + + } else { + throw new Error('You tried to send "'+ payload.method +'" synchronously. Synchronous requests are not supported by the IPC provider.'); + } +}; + +IpcProvider.prototype.sendAsync = function (payload, callback) { + // try reconnect, when connection is gone + if(!this.connection.writable) + this.connection.connect({path: this.path}); + + + this.connection.write(JSON.stringify(payload)); + this._addResponseCallback(payload, callback); +}; + +module.exports = IpcProvider; + + +},{"../utils/utils":20,"./errors":26}],35:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file jsonrpc.js + * @authors: + * Marek Kotewicz + * Aaron Kumavis + * @date 2015 + */ + +// Initialize Jsonrpc as a simple object with utility functions. +var Jsonrpc = { + messageId: 0 +}; + +/** + * Should be called to valid json create payload object + * + * @method toPayload + * @param {Function} method of jsonrpc call, required + * @param {Array} params, an array of method params, optional + * @returns {Object} valid jsonrpc payload object + */ +Jsonrpc.toPayload = function (method, params) { + if (!method) + console.error('jsonrpc method should be specified!'); + + // advance message ID + Jsonrpc.messageId++; + + return { + jsonrpc: '2.0', + id: Jsonrpc.messageId, + method: method, + params: params || [] + }; +}; + +/** + * Should be called to check if jsonrpc response is valid + * + * @method isValidResponse + * @param {Object} + * @returns {Boolean} true if response is valid, otherwise false + */ +Jsonrpc.isValidResponse = function (response) { + return Array.isArray(response) ? response.every(validateSingleMessage) : validateSingleMessage(response); + + function validateSingleMessage(message){ + return !!message && + !message.error && + message.jsonrpc === '2.0' && + typeof message.id === 'number' && + message.result !== undefined; // only undefined is not valid json object + } +}; + +/** + * Should be called to create batch payload object + * + * @method toBatchPayload + * @param {Array} messages, an array of objects with method (required) and params (optional) fields + * @returns {Array} batch payload + */ +Jsonrpc.toBatchPayload = function (messages) { + return messages.map(function (message) { + return Jsonrpc.toPayload(message.method, message.params); + }); +}; + +module.exports = Jsonrpc; + + +},{}],36:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file method.js + * @author Marek Kotewicz + * @date 2015 + */ + +var utils = require('../utils/utils'); +var errors = require('./errors'); + +var Method = function (options) { + this.name = options.name; + this.call = options.call; + this.params = options.params || 0; + this.inputFormatter = options.inputFormatter; + this.outputFormatter = options.outputFormatter; + this.requestManager = null; +}; + +Method.prototype.setRequestManager = function (rm) { + this.requestManager = rm; +}; + +/** + * Should be used to determine name of the jsonrpc method based on arguments + * + * @method getCall + * @param {Array} arguments + * @return {String} name of jsonrpc method + */ +Method.prototype.getCall = function (args) { + return utils.isFunction(this.call) ? this.call(args) : this.call; +}; + +/** + * Should be used to extract callback from array of arguments. Modifies input param + * + * @method extractCallback + * @param {Array} arguments + * @return {Function|Null} callback, if exists + */ +Method.prototype.extractCallback = function (args) { + if (utils.isFunction(args[args.length - 1])) { + return args.pop(); // modify the args array! + } +}; + +/** + * Should be called to check if the number of arguments is correct + * + * @method validateArgs + * @param {Array} arguments + * @throws {Error} if it is not + */ +Method.prototype.validateArgs = function (args) { + if (args.length !== this.params) { + throw errors.InvalidNumberOfRPCParams(); + } +}; + +/** + * Should be called to format input args of method + * + * @method formatInput + * @param {Array} + * @return {Array} + */ +Method.prototype.formatInput = function (args) { + if (!this.inputFormatter) { + return args; + } + + return this.inputFormatter.map(function (formatter, index) { + return formatter ? formatter(args[index]) : args[index]; + }); +}; + +/** + * Should be called to format output(result) of method + * + * @method formatOutput + * @param {Object} + * @return {Object} + */ +Method.prototype.formatOutput = function (result) { + return this.outputFormatter && result ? this.outputFormatter(result) : result; +}; + +/** + * Should create payload from given input args + * + * @method toPayload + * @param {Array} args + * @return {Object} + */ +Method.prototype.toPayload = function (args) { + var call = this.getCall(args); + var callback = this.extractCallback(args); + var params = this.formatInput(args); + this.validateArgs(params); + + return { + method: call, + params: params, + callback: callback + }; +}; + +Method.prototype.attachToObject = function (obj) { + var func = this.buildCall(); + func.call = this.call; // TODO!!! that's ugly. filter.js uses it + var name = this.name.split('.'); + if (name.length > 1) { + obj[name[0]] = obj[name[0]] || {}; + obj[name[0]][name[1]] = func; + } else { + obj[name[0]] = func; + } +}; + +Method.prototype.buildCall = function() { + var method = this; + var send = function () { + var payload = method.toPayload(Array.prototype.slice.call(arguments)); + if (payload.callback) { + return method.requestManager.sendAsync(payload, function (err, result) { + payload.callback(err, method.formatOutput(result)); + }); + } + return method.formatOutput(method.requestManager.send(payload)); + }; + send.request = this.request.bind(this); + return send; +}; + +/** + * Should be called to create pure JSONRPC request which can be used in batch request + * + * @method request + * @param {...} params + * @return {Object} jsonrpc request + */ +Method.prototype.request = function () { + var payload = this.toPayload(Array.prototype.slice.call(arguments)); + payload.format = this.formatOutput.bind(this); + return payload; +}; + +module.exports = Method; + +},{"../utils/utils":20,"./errors":26}],37:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file db.js + * @authors: + * Marek Kotewicz + * @date 2015 + */ + +var Method = require('../method'); + +var DB = function (web3) { + this._requestManager = web3._requestManager; + + var self = this; + + methods().forEach(function(method) { + method.attachToObject(self); + method.setRequestManager(web3._requestManager); + }); +}; + +var methods = function () { + var putString = new Method({ + name: 'putString', + call: 'db_putString', + params: 3 + }); + + var getString = new Method({ + name: 'getString', + call: 'db_getString', + params: 2 + }); + + var putHex = new Method({ + name: 'putHex', + call: 'db_putHex', + params: 3 + }); + + var getHex = new Method({ + name: 'getHex', + call: 'db_getHex', + params: 2 + }); + + return [ + putString, getString, putHex, getHex + ]; +}; + +module.exports = DB; + +},{"../method":36}],38:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file eth.js + * @author Marek Kotewicz + * @author Fabian Vogelsteller + * @date 2015 + */ + +"use strict"; + +var formatters = require('../formatters'); +var utils = require('../../utils/utils'); +var Method = require('../method'); +var Property = require('../property'); +var c = require('../../utils/config'); +var Contract = require('../contract'); +var watches = require('./watches'); +var Filter = require('../filter'); +var IsSyncing = require('../syncing'); +var namereg = require('../namereg'); +var Iban = require('../iban'); +var transfer = require('../transfer'); + +var blockCall = function (args) { + return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? "eth_getBlockByHash" : "eth_getBlockByNumber"; +}; + +var transactionFromBlockCall = function (args) { + return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getTransactionByBlockHashAndIndex' : 'eth_getTransactionByBlockNumberAndIndex'; +}; + +var uncleCall = function (args) { + return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getUncleByBlockHashAndIndex' : 'eth_getUncleByBlockNumberAndIndex'; +}; + +var getBlockTransactionCountCall = function (args) { + return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getBlockTransactionCountByHash' : 'eth_getBlockTransactionCountByNumber'; +}; + +var uncleCountCall = function (args) { + return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getUncleCountByBlockHash' : 'eth_getUncleCountByBlockNumber'; +}; + +function Eth(web3) { + this._requestManager = web3._requestManager; + + var self = this; + + methods().forEach(function(method) { + method.attachToObject(self); + method.setRequestManager(self._requestManager); + }); + + properties().forEach(function(p) { + p.attachToObject(self); + p.setRequestManager(self._requestManager); + }); + + + this.iban = Iban; + this.sendIBANTransaction = transfer.bind(null, this); +} + +Object.defineProperty(Eth.prototype, 'defaultBlock', { + get: function () { + return c.defaultBlock; + }, + set: function (val) { + c.defaultBlock = val; + return val; + } +}); + +Object.defineProperty(Eth.prototype, 'defaultAccount', { + get: function () { + return c.defaultAccount; + }, + set: function (val) { + c.defaultAccount = val; + return val; + } +}); + +var methods = function () { + var getBalance = new Method({ + name: 'getBalance', + call: 'eth_getBalance', + params: 2, + inputFormatter: [formatters.inputAddressFormatter, formatters.inputDefaultBlockNumberFormatter], + outputFormatter: formatters.outputBigNumberFormatter + }); + + var getStorageAt = new Method({ + name: 'getStorageAt', + call: 'eth_getStorageAt', + params: 3, + inputFormatter: [null, utils.toHex, formatters.inputDefaultBlockNumberFormatter] + }); + + var getCode = new Method({ + name: 'getCode', + call: 'eth_getCode', + params: 2, + inputFormatter: [formatters.inputAddressFormatter, formatters.inputDefaultBlockNumberFormatter] + }); + + var getBlock = new Method({ + name: 'getBlock', + call: blockCall, + params: 2, + inputFormatter: [formatters.inputBlockNumberFormatter, function (val) { return !!val; }], + outputFormatter: formatters.outputBlockFormatter + }); + + var getUncle = new Method({ + name: 'getUncle', + call: uncleCall, + params: 2, + inputFormatter: [formatters.inputBlockNumberFormatter, utils.toHex], + outputFormatter: formatters.outputBlockFormatter, + + }); + + var getCompilers = new Method({ + name: 'getCompilers', + call: 'eth_getCompilers', + params: 0 + }); + + var getBlockTransactionCount = new Method({ + name: 'getBlockTransactionCount', + call: getBlockTransactionCountCall, + params: 1, + inputFormatter: [formatters.inputBlockNumberFormatter], + outputFormatter: utils.toDecimal + }); + + var getBlockUncleCount = new Method({ + name: 'getBlockUncleCount', + call: uncleCountCall, + params: 1, + inputFormatter: [formatters.inputBlockNumberFormatter], + outputFormatter: utils.toDecimal + }); + + var getTransaction = new Method({ + name: 'getTransaction', + call: 'eth_getTransactionByHash', + params: 1, + outputFormatter: formatters.outputTransactionFormatter + }); + + var getTransactionFromBlock = new Method({ + name: 'getTransactionFromBlock', + call: transactionFromBlockCall, + params: 2, + inputFormatter: [formatters.inputBlockNumberFormatter, utils.toHex], + outputFormatter: formatters.outputTransactionFormatter + }); + + var getTransactionReceipt = new Method({ + name: 'getTransactionReceipt', + call: 'eth_getTransactionReceipt', + params: 1, + outputFormatter: formatters.outputTransactionReceiptFormatter + }); + + var getTransactionCount = new Method({ + name: 'getTransactionCount', + call: 'eth_getTransactionCount', + params: 2, + inputFormatter: [null, formatters.inputDefaultBlockNumberFormatter], + outputFormatter: utils.toDecimal + }); + + var sendRawTransaction = new Method({ + name: 'sendRawTransaction', + call: 'eth_sendRawTransaction', + params: 1, + inputFormatter: [null] + }); + + var sendTransaction = new Method({ + name: 'sendTransaction', + call: 'eth_sendTransaction', + params: 1, + inputFormatter: [formatters.inputTransactionFormatter] + }); + + var signTransaction = new Method({ + name: 'signTransaction', + call: 'eth_signTransaction', + params: 1, + inputFormatter: [formatters.inputTransactionFormatter] + }); + + var sign = new Method({ + name: 'sign', + call: 'eth_sign', + params: 2, + inputFormatter: [formatters.inputAddressFormatter, null] + }); + + var call = new Method({ + name: 'call', + call: 'eth_call', + params: 2, + inputFormatter: [formatters.inputCallFormatter, formatters.inputDefaultBlockNumberFormatter] + }); + + var estimateGas = new Method({ + name: 'estimateGas', + call: 'eth_estimateGas', + params: 1, + inputFormatter: [formatters.inputCallFormatter], + outputFormatter: utils.toDecimal + }); + + var compileSolidity = new Method({ + name: 'compile.solidity', + call: 'eth_compileSolidity', + params: 1 + }); + + var compileLLL = new Method({ + name: 'compile.lll', + call: 'eth_compileLLL', + params: 1 + }); + + var compileSerpent = new Method({ + name: 'compile.serpent', + call: 'eth_compileSerpent', + params: 1 + }); + + var submitWork = new Method({ + name: 'submitWork', + call: 'eth_submitWork', + params: 3 + }); + + var getWork = new Method({ + name: 'getWork', + call: 'eth_getWork', + params: 0 + }); + + return [ + getBalance, + getStorageAt, + getCode, + getBlock, + getUncle, + getCompilers, + getBlockTransactionCount, + getBlockUncleCount, + getTransaction, + getTransactionFromBlock, + getTransactionReceipt, + getTransactionCount, + call, + estimateGas, + sendRawTransaction, + signTransaction, + sendTransaction, + sign, + compileSolidity, + compileLLL, + compileSerpent, + submitWork, + getWork + ]; +}; + + +var properties = function () { + return [ + new Property({ + name: 'coinbase', + getter: 'eth_coinbase' + }), + new Property({ + name: 'mining', + getter: 'eth_mining' + }), + new Property({ + name: 'hashrate', + getter: 'eth_hashrate', + outputFormatter: utils.toDecimal + }), + new Property({ + name: 'syncing', + getter: 'eth_syncing', + outputFormatter: formatters.outputSyncingFormatter + }), + new Property({ + name: 'gasPrice', + getter: 'eth_gasPrice', + outputFormatter: formatters.outputBigNumberFormatter + }), + new Property({ + name: 'accounts', + getter: 'eth_accounts' + }), + new Property({ + name: 'blockNumber', + getter: 'eth_blockNumber', + outputFormatter: utils.toDecimal + }), + new Property({ + name: 'protocolVersion', + getter: 'eth_protocolVersion' + }) + ]; +}; + +Eth.prototype.contract = function (abi) { + var factory = new Contract(this, abi); + return factory; +}; + +Eth.prototype.filter = function (fil, callback, filterCreationErrorCallback) { + return new Filter(this._requestManager, fil, watches.eth(), formatters.outputLogFormatter, callback, filterCreationErrorCallback); +}; + +Eth.prototype.namereg = function () { + return this.contract(namereg.global.abi).at(namereg.global.address); +}; + +Eth.prototype.icapNamereg = function () { + return this.contract(namereg.icap.abi).at(namereg.icap.address); +}; + +Eth.prototype.isSyncing = function (callback) { + return new IsSyncing(this._requestManager, callback); +}; + +module.exports = Eth; + +},{"../../utils/config":18,"../../utils/utils":20,"../contract":25,"../filter":29,"../formatters":30,"../iban":33,"../method":36,"../namereg":44,"../property":45,"../syncing":48,"../transfer":49,"./watches":43}],39:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file eth.js + * @authors: + * Marek Kotewicz + * @date 2015 + */ + +var utils = require('../../utils/utils'); +var Property = require('../property'); + +var Net = function (web3) { + this._requestManager = web3._requestManager; + + var self = this; + + properties().forEach(function(p) { + p.attachToObject(self); + p.setRequestManager(web3._requestManager); + }); +}; + +/// @returns an array of objects describing web3.eth api properties +var properties = function () { + return [ + new Property({ + name: 'listening', + getter: 'net_listening' + }), + new Property({ + name: 'peerCount', + getter: 'net_peerCount', + outputFormatter: utils.toDecimal + }) + ]; +}; + +module.exports = Net; + +},{"../../utils/utils":20,"../property":45}],40:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file eth.js + * @author Marek Kotewicz + * @author Fabian Vogelsteller + * @date 2015 + */ + +"use strict"; + +var Method = require('../method'); +var Property = require('../property'); +var formatters = require('../formatters'); + +function Personal(web3) { + this._requestManager = web3._requestManager; + + var self = this; + + methods().forEach(function(method) { + method.attachToObject(self); + method.setRequestManager(self._requestManager); + }); + + properties().forEach(function(p) { + p.attachToObject(self); + p.setRequestManager(self._requestManager); + }); +} + +var methods = function () { + var newAccount = new Method({ + name: 'newAccount', + call: 'personal_newAccount', + params: 1, + inputFormatter: [null] + }); + + var importRawKey = new Method({ + name: 'importRawKey', + call: 'personal_importRawKey', + params: 2 + }); + + var sign = new Method({ + name: 'sign', + call: 'personal_sign', + params: 3, + inputFormatter: [null, formatters.inputAddressFormatter, null] + }); + + var ecRecover = new Method({ + name: 'ecRecover', + call: 'personal_ecRecover', + params: 2 + }); + + var unlockAccount = new Method({ + name: 'unlockAccount', + call: 'personal_unlockAccount', + params: 3, + inputFormatter: [formatters.inputAddressFormatter, null, null] + }); + + var sendTransaction = new Method({ + name: 'sendTransaction', + call: 'personal_sendTransaction', + params: 2, + inputFormatter: [formatters.inputTransactionFormatter, null] + }); + + var lockAccount = new Method({ + name: 'lockAccount', + call: 'personal_lockAccount', + params: 1, + inputFormatter: [formatters.inputAddressFormatter] + }); + + return [ + newAccount, + importRawKey, + unlockAccount, + ecRecover, + sign, + sendTransaction, + lockAccount + ]; +}; + +var properties = function () { + return [ + new Property({ + name: 'listAccounts', + getter: 'personal_listAccounts' + }) + ]; +}; + + +module.exports = Personal; + +},{"../formatters":30,"../method":36,"../property":45}],41:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file shh.js + * @authors: + * Marek Kotewicz + * @date 2015 + */ + +var Method = require('../method'); +var formatters = require('../formatters'); +var Filter = require('../filter'); +var watches = require('./watches'); + +var Shh = function (web3) { + this._requestManager = web3._requestManager; + + var self = this; + + methods().forEach(function(method) { + method.attachToObject(self); + method.setRequestManager(self._requestManager); + }); +}; + +Shh.prototype.filter = function (fil, callback) { + return new Filter(this._requestManager, fil, watches.shh(), formatters.outputPostFormatter, callback); +}; + +var methods = function () { + + var post = new Method({ + name: 'post', + call: 'shh_post', + params: 1, + inputFormatter: [formatters.inputPostFormatter] + }); + + var newIdentity = new Method({ + name: 'newIdentity', + call: 'shh_newIdentity', + params: 0 + }); + + var hasIdentity = new Method({ + name: 'hasIdentity', + call: 'shh_hasIdentity', + params: 1 + }); + + var newGroup = new Method({ + name: 'newGroup', + call: 'shh_newGroup', + params: 0 + }); + + var addToGroup = new Method({ + name: 'addToGroup', + call: 'shh_addToGroup', + params: 0 + }); + + return [ + post, + newIdentity, + hasIdentity, + newGroup, + addToGroup + ]; +}; + +module.exports = Shh; + + +},{"../filter":29,"../formatters":30,"../method":36,"./watches":43}],42:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file bzz.js + * @author Alex Beregszaszi + * @date 2016 + * + * Reference: https://github.com/ethereum/go-ethereum/blob/swarm/internal/web3ext/web3ext.go#L33 + */ + +"use strict"; + +var Method = require('../method'); +var Property = require('../property'); + +function Swarm(web3) { + this._requestManager = web3._requestManager; + + var self = this; + + methods().forEach(function(method) { + method.attachToObject(self); + method.setRequestManager(self._requestManager); + }); + + properties().forEach(function(p) { + p.attachToObject(self); + p.setRequestManager(self._requestManager); + }); +} + +var methods = function () { + var blockNetworkRead = new Method({ + name: 'blockNetworkRead', + call: 'bzz_blockNetworkRead', + params: 1, + inputFormatter: [null] + }); + + var syncEnabled = new Method({ + name: 'syncEnabled', + call: 'bzz_syncEnabled', + params: 1, + inputFormatter: [null] + }); + + var swapEnabled = new Method({ + name: 'swapEnabled', + call: 'bzz_swapEnabled', + params: 1, + inputFormatter: [null] + }); + + var download = new Method({ + name: 'download', + call: 'bzz_download', + params: 2, + inputFormatter: [null, null] + }); + + var upload = new Method({ + name: 'upload', + call: 'bzz_upload', + params: 2, + inputFormatter: [null, null] + }); + + var retrieve = new Method({ + name: 'retrieve', + call: 'bzz_retrieve', + params: 1, + inputFormatter: [null] + }); + + var store = new Method({ + name: 'store', + call: 'bzz_store', + params: 2, + inputFormatter: [null, null] + }); + + var get = new Method({ + name: 'get', + call: 'bzz_get', + params: 1, + inputFormatter: [null] + }); + + var put = new Method({ + name: 'put', + call: 'bzz_put', + params: 2, + inputFormatter: [null, null] + }); + + var modify = new Method({ + name: 'modify', + call: 'bzz_modify', + params: 4, + inputFormatter: [null, null, null, null] + }); + + return [ + blockNetworkRead, + syncEnabled, + swapEnabled, + download, + upload, + retrieve, + store, + get, + put, + modify + ]; +}; + +var properties = function () { + return [ + new Property({ + name: 'hive', + getter: 'bzz_hive' + }), + new Property({ + name: 'info', + getter: 'bzz_info' + }) + ]; +}; + + +module.exports = Swarm; + +},{"../method":36,"../property":45}],43:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file watches.js + * @authors: + * Marek Kotewicz + * @date 2015 + */ + +var Method = require('../method'); + +/// @returns an array of objects describing web3.eth.filter api methods +var eth = function () { + var newFilterCall = function (args) { + var type = args[0]; + + switch(type) { + case 'latest': + args.shift(); + this.params = 0; + return 'eth_newBlockFilter'; + case 'pending': + args.shift(); + this.params = 0; + return 'eth_newPendingTransactionFilter'; + default: + return 'eth_newFilter'; + } + }; + + var newFilter = new Method({ + name: 'newFilter', + call: newFilterCall, + params: 1 + }); + + var uninstallFilter = new Method({ + name: 'uninstallFilter', + call: 'eth_uninstallFilter', + params: 1 + }); + + var getLogs = new Method({ + name: 'getLogs', + call: 'eth_getFilterLogs', + params: 1 + }); + + var poll = new Method({ + name: 'poll', + call: 'eth_getFilterChanges', + params: 1 + }); + + return [ + newFilter, + uninstallFilter, + getLogs, + poll + ]; +}; + +/// @returns an array of objects describing web3.shh.watch api methods +var shh = function () { + var newFilter = new Method({ + name: 'newFilter', + call: 'shh_newFilter', + params: 1 + }); + + var uninstallFilter = new Method({ + name: 'uninstallFilter', + call: 'shh_uninstallFilter', + params: 1 + }); + + var getLogs = new Method({ + name: 'getLogs', + call: 'shh_getMessages', + params: 1 + }); + + var poll = new Method({ + name: 'poll', + call: 'shh_getFilterChanges', + params: 1 + }); + + return [ + newFilter, + uninstallFilter, + getLogs, + poll + ]; +}; + +module.exports = { + eth: eth, + shh: shh +}; + + +},{"../method":36}],44:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file namereg.js + * @author Marek Kotewicz + * @date 2015 + */ + +var globalRegistrarAbi = require('../contracts/GlobalRegistrar.json'); +var icapRegistrarAbi= require('../contracts/ICAPRegistrar.json'); + +var globalNameregAddress = '0xc6d9d2cd449a754c494264e1809c50e34d64562b'; +var icapNameregAddress = '0xa1a111bc074c9cfa781f0c38e63bd51c91b8af00'; + +module.exports = { + global: { + abi: globalRegistrarAbi, + address: globalNameregAddress + }, + icap: { + abi: icapRegistrarAbi, + address: icapNameregAddress + } +}; + + +},{"../contracts/GlobalRegistrar.json":1,"../contracts/ICAPRegistrar.json":2}],45:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file property.js + * @author Fabian Vogelsteller + * @author Marek Kotewicz + * @date 2015 + */ + +var utils = require('../utils/utils'); + +var Property = function (options) { + this.name = options.name; + this.getter = options.getter; + this.setter = options.setter; + this.outputFormatter = options.outputFormatter; + this.inputFormatter = options.inputFormatter; + this.requestManager = null; +}; + +Property.prototype.setRequestManager = function (rm) { + this.requestManager = rm; +}; + +/** + * Should be called to format input args of method + * + * @method formatInput + * @param {Array} + * @return {Array} + */ +Property.prototype.formatInput = function (arg) { + return this.inputFormatter ? this.inputFormatter(arg) : arg; +}; + +/** + * Should be called to format output(result) of method + * + * @method formatOutput + * @param {Object} + * @return {Object} + */ +Property.prototype.formatOutput = function (result) { + return this.outputFormatter && result !== null && result !== undefined ? this.outputFormatter(result) : result; +}; + +/** + * Should be used to extract callback from array of arguments. Modifies input param + * + * @method extractCallback + * @param {Array} arguments + * @return {Function|Null} callback, if exists + */ +Property.prototype.extractCallback = function (args) { + if (utils.isFunction(args[args.length - 1])) { + return args.pop(); // modify the args array! + } +}; + + +/** + * Should attach function to method + * + * @method attachToObject + * @param {Object} + * @param {Function} + */ +Property.prototype.attachToObject = function (obj) { + var proto = { + get: this.buildGet(), + enumerable: true + }; + + var names = this.name.split('.'); + var name = names[0]; + if (names.length > 1) { + obj[names[0]] = obj[names[0]] || {}; + obj = obj[names[0]]; + name = names[1]; + } + + Object.defineProperty(obj, name, proto); + obj[asyncGetterName(name)] = this.buildAsyncGet(); +}; + +var asyncGetterName = function (name) { + return 'get' + name.charAt(0).toUpperCase() + name.slice(1); +}; + +Property.prototype.buildGet = function () { + var property = this; + return function get() { + return property.formatOutput(property.requestManager.send({ + method: property.getter + })); + }; +}; + +Property.prototype.buildAsyncGet = function () { + var property = this; + var get = function (callback) { + property.requestManager.sendAsync({ + method: property.getter + }, function (err, result) { + callback(err, property.formatOutput(result)); + }); + }; + get.request = this.request.bind(this); + return get; +}; + +/** + * Should be called to create pure JSONRPC request which can be used in batch request + * + * @method request + * @param {...} params + * @return {Object} jsonrpc request + */ +Property.prototype.request = function () { + var payload = { + method: this.getter, + params: [], + callback: this.extractCallback(Array.prototype.slice.call(arguments)) + }; + payload.format = this.formatOutput.bind(this); + return payload; +}; + +module.exports = Property; + + +},{"../utils/utils":20}],46:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file requestmanager.js + * @author Jeffrey Wilcke + * @author Marek Kotewicz + * @author Marian Oancea + * @author Fabian Vogelsteller + * @author Gav Wood + * @date 2014 + */ + +var Jsonrpc = require('./jsonrpc'); +var utils = require('../utils/utils'); +var c = require('../utils/config'); +var errors = require('./errors'); + +/** + * It's responsible for passing messages to providers + * It's also responsible for polling the ethereum node for incoming messages + * Default poll timeout is 1 second + * Singleton + */ +var RequestManager = function (provider) { + this.provider = provider; + this.polls = {}; + this.timeout = null; +}; + +/** + * Should be used to synchronously send request + * + * @method send + * @param {Object} data + * @return {Object} + */ +RequestManager.prototype.send = function (data) { + if (!this.provider) { + console.error(errors.InvalidProvider()); + return null; + } + + var payload = Jsonrpc.toPayload(data.method, data.params); + var result = this.provider.send(payload); + + if (!Jsonrpc.isValidResponse(result)) { + throw errors.InvalidResponse(result); + } + + return result.result; +}; + +/** + * Should be used to asynchronously send request + * + * @method sendAsync + * @param {Object} data + * @param {Function} callback + */ +RequestManager.prototype.sendAsync = function (data, callback) { + if (!this.provider) { + return callback(errors.InvalidProvider()); + } + + var payload = Jsonrpc.toPayload(data.method, data.params); + this.provider.sendAsync(payload, function (err, result) { + if (err) { + return callback(err); + } + + if (!Jsonrpc.isValidResponse(result)) { + return callback(errors.InvalidResponse(result)); + } + + callback(null, result.result); + }); +}; + +/** + * Should be called to asynchronously send batch request + * + * @method sendBatch + * @param {Array} batch data + * @param {Function} callback + */ +RequestManager.prototype.sendBatch = function (data, callback) { + if (!this.provider) { + return callback(errors.InvalidProvider()); + } + + var payload = Jsonrpc.toBatchPayload(data); + + this.provider.sendAsync(payload, function (err, results) { + if (err) { + return callback(err); + } + + if (!utils.isArray(results)) { + return callback(errors.InvalidResponse(results)); + } + + callback(err, results); + }); +}; + +/** + * Should be used to set provider of request manager + * + * @method setProvider + * @param {Object} + */ +RequestManager.prototype.setProvider = function (p) { + this.provider = p; +}; + +/** + * Should be used to start polling + * + * @method startPolling + * @param {Object} data + * @param {Number} pollId + * @param {Function} callback + * @param {Function} uninstall + * + * @todo cleanup number of params + */ +RequestManager.prototype.startPolling = function (data, pollId, callback, uninstall) { + this.polls[pollId] = {data: data, id: pollId, callback: callback, uninstall: uninstall}; + + + // start polling + if (!this.timeout) { + this.poll(); + } +}; + +/** + * Should be used to stop polling for filter with given id + * + * @method stopPolling + * @param {Number} pollId + */ +RequestManager.prototype.stopPolling = function (pollId) { + delete this.polls[pollId]; + + // stop polling + if(Object.keys(this.polls).length === 0 && this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } +}; + +/** + * Should be called to reset the polling mechanism of the request manager + * + * @method reset + */ +RequestManager.prototype.reset = function (keepIsSyncing) { + /*jshint maxcomplexity:5 */ + + for (var key in this.polls) { + // remove all polls, except sync polls, + // they need to be removed manually by calling syncing.stopWatching() + if(!keepIsSyncing || key.indexOf('syncPoll_') === -1) { + this.polls[key].uninstall(); + delete this.polls[key]; + } + } + + // stop polling + if(Object.keys(this.polls).length === 0 && this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } +}; + +/** + * Should be called to poll for changes on filter with given id + * + * @method poll + */ +RequestManager.prototype.poll = function () { + /*jshint maxcomplexity: 6 */ + this.timeout = setTimeout(this.poll.bind(this), c.ETH_POLLING_TIMEOUT); + + if (Object.keys(this.polls).length === 0) { + return; + } + + if (!this.provider) { + console.error(errors.InvalidProvider()); + return; + } + + var pollsData = []; + var pollsIds = []; + for (var key in this.polls) { + pollsData.push(this.polls[key].data); + pollsIds.push(key); + } + + if (pollsData.length === 0) { + return; + } + + var payload = Jsonrpc.toBatchPayload(pollsData); + + // map the request id to they poll id + var pollsIdMap = {}; + payload.forEach(function(load, index){ + pollsIdMap[load.id] = pollsIds[index]; + }); + + + var self = this; + this.provider.sendAsync(payload, function (error, results) { + + + // TODO: console log? + if (error) { + return; + } + + if (!utils.isArray(results)) { + throw errors.InvalidResponse(results); + } + results.map(function (result) { + var id = pollsIdMap[result.id]; + + // make sure the filter is still installed after arrival of the request + if (self.polls[id]) { + result.callback = self.polls[id].callback; + return result; + } else + return false; + }).filter(function (result) { + return !!result; + }).filter(function (result) { + var valid = Jsonrpc.isValidResponse(result); + if (!valid) { + result.callback(errors.InvalidResponse(result)); + } + return valid; + }).forEach(function (result) { + result.callback(null, result.result); + }); + }); +}; + +module.exports = RequestManager; + + +},{"../utils/config":18,"../utils/utils":20,"./errors":26,"./jsonrpc":35}],47:[function(require,module,exports){ + + +var Settings = function () { + this.defaultBlock = 'latest'; + this.defaultAccount = undefined; +}; + +module.exports = Settings; + + +},{}],48:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file syncing.js + * @authors: + * Fabian Vogelsteller + * @date 2015 + */ + +var formatters = require('./formatters'); +var utils = require('../utils/utils'); + +var count = 1; + +/** +Adds the callback and sets up the methods, to iterate over the results. + +@method pollSyncing +@param {Object} self +*/ +var pollSyncing = function(self) { + + var onMessage = function (error, sync) { + if (error) { + return self.callbacks.forEach(function (callback) { + callback(error); + }); + } + + if(utils.isObject(sync) && sync.startingBlock) + sync = formatters.outputSyncingFormatter(sync); + + self.callbacks.forEach(function (callback) { + if (self.lastSyncState !== sync) { + + // call the callback with true first so the app can stop anything, before receiving the sync data + if(!self.lastSyncState && utils.isObject(sync)) + callback(null, true); + + // call on the next CPU cycle, so the actions of the sync stop can be processes first + setTimeout(function() { + callback(null, sync); + }, 0); + + self.lastSyncState = sync; + } + }); + }; + + self.requestManager.startPolling({ + method: 'eth_syncing', + params: [], + }, self.pollId, onMessage, self.stopWatching.bind(self)); + +}; + +var IsSyncing = function (requestManager, callback) { + this.requestManager = requestManager; + this.pollId = 'syncPoll_'+ count++; + this.callbacks = []; + this.addCallback(callback); + this.lastSyncState = false; + pollSyncing(this); + + return this; +}; + +IsSyncing.prototype.addCallback = function (callback) { + if(callback) + this.callbacks.push(callback); + return this; +}; + +IsSyncing.prototype.stopWatching = function () { + this.requestManager.stopPolling(this.pollId); + this.callbacks = []; +}; + +module.exports = IsSyncing; + + +},{"../utils/utils":20,"./formatters":30}],49:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file transfer.js + * @author Marek Kotewicz + * @date 2015 + */ + +var Iban = require('./iban'); +var exchangeAbi = require('../contracts/SmartExchange.json'); + +/** + * Should be used to make Iban transfer + * + * @method transfer + * @param {String} from + * @param {String} to iban + * @param {Value} value to be tranfered + * @param {Function} callback, callback + */ +var transfer = function (eth, from, to, value, callback) { + var iban = new Iban(to); + if (!iban.isValid()) { + throw new Error('invalid iban address'); + } + + if (iban.isDirect()) { + return transferToAddress(eth, from, iban.address(), value, callback); + } + + if (!callback) { + var address = eth.icapNamereg().addr(iban.institution()); + return deposit(eth, from, address, value, iban.client()); + } + + eth.icapNamereg().addr(iban.institution(), function (err, address) { + return deposit(eth, from, address, value, iban.client(), callback); + }); + +}; + +/** + * Should be used to transfer funds to certain address + * + * @method transferToAddress + * @param {String} from + * @param {String} to + * @param {Value} value to be tranfered + * @param {Function} callback, callback + */ +var transferToAddress = function (eth, from, to, value, callback) { + return eth.sendTransaction({ + address: to, + from: from, + value: value + }, callback); +}; + +/** + * Should be used to deposit funds to generic Exchange contract (must implement deposit(bytes32) method!) + * + * @method deposit + * @param {String} from + * @param {String} to + * @param {Value} value to be transfered + * @param {String} client unique identifier + * @param {Function} callback, callback + */ +var deposit = function (eth, from, to, value, client, callback) { + var abi = exchangeAbi; + return eth.contract(abi).at(to).deposit(client, { + from: from, + value: value + }, callback); +}; + +module.exports = transfer; + + +},{"../contracts/SmartExchange.json":3,"./iban":33}],50:[function(require,module,exports){ + +},{}],51:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + var t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); + }()); + + + return CryptoJS.AES; + +})); +},{"./cipher-core":52,"./core":53,"./enc-base64":54,"./evpkdf":56,"./md5":61}],52:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher core components. + */ + CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + var block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + var modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + var modeCreator = mode.createDecryptor; + + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + this._mode = modeCreator.call(mode, this, iv && iv.words); + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + var wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + var salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); + }()); + + +})); +},{"./core":53}],53:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(); + } + else if (typeof define === "function" && define.amd) { + // AMD + define([], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(); + } +}(this, function () { + + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + /* + * Local polyfil of Object.create + */ + var create = Object.create || (function () { + function F() {}; + + return function (obj) { + var subtype; + + F.prototype = obj; + + subtype = new F(); + + F.prototype = null; + + return subtype; + }; + }()) + + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + var r = (function (m_w) { + var m_w = m_w; + var m_z = 0x3ade68b1; + var mask = 0xffffffff; + + return function () { + m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; + m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; + var result = ((m_z << 0x10) + m_w) & mask; + result /= 0x100000000; + result += 0.5; + return result * (Math.random() > .5 ? 1 : -1); + } + }); + + for (var i = 0, rcache; i < nBytes; i += 4) { + var _r = r((rcache || Math.random()) * 0x100000000); + + rcache = _r() * 0x3ade67b7; + words.push((_r() * 0x100000000) | 0); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + var processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; + }(Math)); + + + return CryptoJS; + +})); +},{}],54:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + return CryptoJS.enc.Base64; + +})); +},{"./core":53}],55:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } + }()); + + + return CryptoJS.enc.Utf16; + +})); +},{"./core":53}],56:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var MD5 = C_algo.MD5; + + /** + * This key derivation function is meant to conform with EVP_BytesToKey. + * www.openssl.org/docs/crypto/EVP_BytesToKey.html + */ + var EvpKDF = C_algo.EvpKDF = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hash algorithm to use. Default: MD5 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: MD5, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.EvpKDF.create(); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init hasher + var hasher = cfg.hasher.create(); + + // Initial values + var derivedKey = WordArray.create(); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + if (block) { + hasher.update(block); + } + var block = hasher.update(password).finalize(salt); + hasher.reset(); + + // Iterations + for (var i = 1; i < iterations; i++) { + block = hasher.finalize(block); + hasher.reset(); + } + + derivedKey.concat(block); + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.EvpKDF(password, salt); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.EvpKDF = function (password, salt, cfg) { + return EvpKDF.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.EvpKDF; + +})); +},{"./core":53,"./hmac":58,"./sha1":77}],57:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var CipherParams = C_lib.CipherParams; + var C_enc = C.enc; + var Hex = C_enc.Hex; + var C_format = C.format; + + var HexFormatter = C_format.Hex = { + /** + * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The hexadecimally encoded string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.format.Hex.stringify(cipherParams); + */ + stringify: function (cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, + + /** + * Converts a hexadecimally encoded ciphertext string to a cipher params object. + * + * @param {string} input The hexadecimally encoded string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.Hex.parse(hexString); + */ + parse: function (input) { + var ciphertext = Hex.parse(input); + return CipherParams.create({ ciphertext: ciphertext }); + } + }; + }()); + + + return CryptoJS.format.Hex; + +})); +},{"./cipher-core":52,"./core":53}],58:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; + + /** + * HMAC algorithm. + */ + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function (hasher, key) { + // Init hasher + hasher = this._hasher = new hasher.init(); + + // Convert string to WordArray, else assume WordArray already + if (typeof key == 'string') { + key = Utf8.parse(key); + } + + // Shortcuts + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + + // Allow arbitrary length keys + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); + }()); + + +})); +},{"./core":53}],59:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./lib-typedarrays"), require("./enc-utf16"), require("./enc-base64"), require("./md5"), require("./sha1"), require("./sha256"), require("./sha224"), require("./sha512"), require("./sha384"), require("./sha3"), require("./ripemd160"), require("./hmac"), require("./pbkdf2"), require("./evpkdf"), require("./cipher-core"), require("./mode-cfb"), require("./mode-ctr"), require("./mode-ctr-gladman"), require("./mode-ofb"), require("./mode-ecb"), require("./pad-ansix923"), require("./pad-iso10126"), require("./pad-iso97971"), require("./pad-zeropadding"), require("./pad-nopadding"), require("./format-hex"), require("./aes"), require("./tripledes"), require("./rc4"), require("./rabbit"), require("./rabbit-legacy")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy"], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS; + +})); +},{"./aes":51,"./cipher-core":52,"./core":53,"./enc-base64":54,"./enc-utf16":55,"./evpkdf":56,"./format-hex":57,"./hmac":58,"./lib-typedarrays":60,"./md5":61,"./mode-cfb":62,"./mode-ctr":64,"./mode-ctr-gladman":63,"./mode-ecb":65,"./mode-ofb":66,"./pad-ansix923":67,"./pad-iso10126":68,"./pad-iso97971":69,"./pad-nopadding":70,"./pad-zeropadding":71,"./pbkdf2":72,"./rabbit":74,"./rabbit-legacy":73,"./rc4":75,"./ripemd160":76,"./sha1":77,"./sha224":78,"./sha256":79,"./sha3":80,"./sha384":81,"./sha512":82,"./tripledes":83,"./x64-core":84}],60:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } + + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + + // Reference original init + var superInit = WordArray.init; + + // Augment WordArray.init to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; + + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } + + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal init + superInit.apply(this, arguments); + } + }; + + subInit.prototype = WordArray; + }()); + + + return CryptoJS.lib.WordArray; + +})); +},{"./core":53}],61:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); + }(Math)); + + + return CryptoJS.MD5; + +})); +},{"./core":53}],62:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher Feedback block mode. + */ + CryptoJS.mode.CFB = (function () { + var CFB = CryptoJS.lib.BlockCipherMode.extend(); + + CFB.Encryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + CFB.Decryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { + // Shortcut + var iv = this._iv; + + // Generate keystream + if (iv) { + var keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var keystream = this._prevBlock; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + + return CFB; + }()); + + + return CryptoJS.mode.CFB; + +})); +},{"./cipher-core":52,"./core":53}],63:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + CryptoJS.mode.CTRGladman = (function () { + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); + + function incWord(word) + { + if (((word >> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; + + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } + + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } + + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } + + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + + incCounter(counter); + + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTRGladman.Decryptor = Encryptor; + + return CTRGladman; + }()); + + + + + return CryptoJS.mode.CTRGladman; + +})); +},{"./cipher-core":52,"./core":53}],64:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Counter block mode. + */ + CryptoJS.mode.CTR = (function () { + var CTR = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = CTR.Encryptor = CTR.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Increment counter + counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTR.Decryptor = Encryptor; + + return CTR; + }()); + + + return CryptoJS.mode.CTR; + +})); +},{"./cipher-core":52,"./core":53}],65:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Electronic Codebook block mode. + */ + CryptoJS.mode.ECB = (function () { + var ECB = CryptoJS.lib.BlockCipherMode.extend(); + + ECB.Encryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.encryptBlock(words, offset); + } + }); + + ECB.Decryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.decryptBlock(words, offset); + } + }); + + return ECB; + }()); + + + return CryptoJS.mode.ECB; + +})); +},{"./cipher-core":52,"./core":53}],66:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Output Feedback block mode. + */ + CryptoJS.mode.OFB = (function () { + var OFB = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = OFB.Encryptor = OFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var keystream = this._keystream; + + // Generate keystream + if (iv) { + keystream = this._keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + OFB.Decryptor = Encryptor; + + return OFB; + }()); + + + return CryptoJS.mode.OFB; + +})); +},{"./cipher-core":52,"./core":53}],67:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ANSI X.923 padding strategy. + */ + CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Ansix923; + +})); +},{"./cipher-core":52,"./core":53}],68:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO 10126 padding strategy. + */ + CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Iso10126; + +})); +},{"./cipher-core":52,"./core":53}],69:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO/IEC 9797-1 Padding Method 2. + */ + CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); + + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } + }; + + + return CryptoJS.pad.Iso97971; + +})); +},{"./cipher-core":52,"./core":53}],70:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * A noop padding strategy. + */ + CryptoJS.pad.NoPadding = { + pad: function () { + }, + + unpad: function () { + } + }; + + + return CryptoJS.pad.NoPadding; + +})); +},{"./cipher-core":52,"./core":53}],71:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Zero padding strategy. + */ + CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, + + unpad: function (data) { + // Shortcut + var dataWords = data.words; + + // Unpad + var i = data.sigBytes - 1; + while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + i--; + } + data.sigBytes = i + 1; + } + }; + + + return CryptoJS.pad.ZeroPadding; + +})); +},{"./cipher-core":52,"./core":53}],72:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA1 = C_algo.SHA1; + var HMAC = C_algo.HMAC; + + /** + * Password-Based Key Derivation Function 2 algorithm. + */ + var PBKDF2 = C_algo.PBKDF2 = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hasher to use. Default: SHA1 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: SHA1, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.PBKDF2.create(); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init HMAC + var hmac = HMAC.create(cfg.hasher, password); + + // Initial values + var derivedKey = WordArray.create(); + var blockIndex = WordArray.create([0x00000001]); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var blockIndexWords = blockIndex.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + var block = hmac.update(salt).finalize(blockIndex); + hmac.reset(); + + // Shortcuts + var blockWords = block.words; + var blockWordsLength = blockWords.length; + + // Iterations + var intermediate = block; + for (var i = 1; i < iterations; i++) { + intermediate = hmac.finalize(intermediate); + hmac.reset(); + + // Shortcut + var intermediateWords = intermediate.words; + + // XOR intermediate with block + for (var j = 0; j < blockWordsLength; j++) { + blockWords[j] ^= intermediateWords[j]; + } + } + + derivedKey.concat(block); + blockIndexWords[0]++; + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.PBKDF2(password, salt); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.PBKDF2 = function (password, salt, cfg) { + return PBKDF2.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.PBKDF2; + +})); +},{"./core":53,"./hmac":58,"./sha1":77}],73:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. + */ + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); + }()); + + + return CryptoJS.RabbitLegacy; + +})); +},{"./cipher-core":52,"./core":53,"./enc-base64":54,"./evpkdf":56,"./md5":61}],74:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + */ + C.Rabbit = StreamCipher._createHelper(Rabbit); + }()); + + + return CryptoJS.Rabbit; + +})); +},{"./cipher-core":52,"./core":53,"./enc-base64":54,"./evpkdf":56,"./md5":61}],75:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + /** + * RC4 stream cipher algorithm. + */ + var RC4 = C_algo.RC4 = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySigBytes = key.sigBytes; + + // Init sbox + var S = this._S = []; + for (var i = 0; i < 256; i++) { + S[i] = i; + } + + // Key setup + for (var i = 0, j = 0; i < 256; i++) { + var keyByteIndex = i % keySigBytes; + var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + + j = (j + S[i] + keyByte) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } + + // Counters + this._i = this._j = 0; + }, + + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, + + keySize: 256/32, + + ivSize: 0 + }); + + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; + + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } + + // Update counters + this._i = i; + this._j = j; + + return keystreamWord; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); + */ + C.RC4 = StreamCipher._createHelper(RC4); + + /** + * Modified RC4 stream cipher algorithm. + */ + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } + } + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); + */ + C.RC4Drop = StreamCipher._createHelper(RC4Drop); + }()); + + + return CryptoJS.RC4; + +})); +},{"./cipher-core":52,"./core":53,"./enc-base64":54,"./evpkdf":56,"./md5":61}],76:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + + /** + * RIPEMD160 hash algorithm. + */ + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, + + _doProcessBlock: function (M, offset) { + + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<>>(32-n)); + } + + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); + */ + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); + }(Math)); + + + return CryptoJS.RIPEMD160; + +})); +},{"./core":53}],77:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; + + /** + * SHA-1 hash algorithm. + */ + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); + } + + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; + } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); + }()); + + + return CryptoJS.SHA1; + +})); +},{"./core":53}],78:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + + /** + * SHA-224 hash algorithm. + */ + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, + + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); + + hash.sigBytes -= 4; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); + */ + C.SHA224 = SHA256._createHelper(SHA224); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); + }()); + + + return CryptoJS.SHA224; + +})); +},{"./core":53,"./sha256":79}],79:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); + + + return CryptoJS.SHA256; + +})); +},{"./core":53}],80:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } + + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } + + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } + + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); + + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); + + /** + * SHA-3 hash algorithm. + */ + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + + // Rotate lanes + if (rhoOffset < 32) { + var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } + + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low;; + } + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); + }, + + clone: function () { + var clone = Hasher.clone.call(this); + + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + }(Math)); + + + return CryptoJS.SHA3; + +})); +},{"./core":53,"./x64-core":84}],81:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, + + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); + + hash.sigBytes -= 16; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); + }()); + + + return CryptoJS.SHA384; + +})); +},{"./core":53,"./sha512":82,"./x64-core":84}],82:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; + (function () { + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); + } + }()); + + /** + * SHA-512 hash algorithm. + */ + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var H = this._hash.words; + + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + + // Rounds + for (var i = 0; i < 80; i++) { + // Shortcut + var Wi = W[i]; + + // Extend message + if (i < 16) { + var Wih = Wi.high = M[offset + i * 2] | 0; + var Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + var Wil = gamma0l + Wi7l; + var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + var Wil = Wil + gamma1l; + var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + var Wil = Wil + Wi16l; + var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } + + // Intermediate hash value + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + }, + + blockSize: 1024/32 + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); + */ + C.SHA512 = Hasher._createHelper(SHA512); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA512(message, key); + */ + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); + }()); + + + return CryptoJS.SHA512; + +})); +},{"./core":53,"./x64-core":84}],83:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; + + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 + }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; + + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } + + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; + + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; + + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + } + + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + } + + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, + + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, + + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; + + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); + + // Rounds + for (var round = 0; round < 16; round++) { + // Shortcuts + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); + + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; + }, + + keySize: 64/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } + + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); + */ + C.DES = BlockCipher._createHelper(DES); + + /** + * Triple-DES block cipher algorithm. + */ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); + this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); + this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); + }, + + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); + }, + + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, + + keySize: 192/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); + */ + C.TripleDES = BlockCipher._createHelper(TripleDES); + }()); + + + return CryptoJS.TripleDES; + +})); +},{"./cipher-core":52,"./core":53,"./enc-base64":54,"./evpkdf":56,"./md5":61}],84:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var X32WordArray = C_lib.WordArray; + + /** + * x64 namespace. + */ + var C_x64 = C.x64 = {}; + + /** + * A 64-bit word. + */ + var X64Word = C_x64.Word = Base.extend({ + /** + * Initializes a newly created 64-bit word. + * + * @param {number} high The high 32 bits. + * @param {number} low The low 32 bits. + * + * @example + * + * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); + */ + init: function (high, low) { + this.high = high; + this.low = low; + } + + /** + * Bitwise NOTs this word. + * + * @return {X64Word} A new x64-Word object after negating. + * + * @example + * + * var negated = x64Word.not(); + */ + // not: function () { + // var high = ~this.high; + // var low = ~this.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ANDs this word with the passed word. + * + * @param {X64Word} word The x64-Word to AND with this word. + * + * @return {X64Word} A new x64-Word object after ANDing. + * + * @example + * + * var anded = x64Word.and(anotherX64Word); + */ + // and: function (word) { + // var high = this.high & word.high; + // var low = this.low & word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to OR with this word. + * + * @return {X64Word} A new x64-Word object after ORing. + * + * @example + * + * var ored = x64Word.or(anotherX64Word); + */ + // or: function (word) { + // var high = this.high | word.high; + // var low = this.low | word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise XORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to XOR with this word. + * + * @return {X64Word} A new x64-Word object after XORing. + * + * @example + * + * var xored = x64Word.xor(anotherX64Word); + */ + // xor: function (word) { + // var high = this.high ^ word.high; + // var low = this.low ^ word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the left. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftL(25); + */ + // shiftL: function (n) { + // if (n < 32) { + // var high = (this.high << n) | (this.low >>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + + // return X64Word.create(high, low); + // } + }); + + /** + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { + // Shortcuts + var x64Words = this.words; + var x64WordsLength = x64Words.length; + + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + + return X32WordArray.create(x32Words, this.sigBytes); + }, + + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } + + return clone; + } + }); + }()); + + + return CryptoJS; + +})); +},{"./core":53}],85:[function(require,module,exports){ +/*! https://mths.be/utf8js v2.1.2 by @mathias */ +;(function(root) { + + // Detect free variables `exports` + var freeExports = typeof exports == 'object' && exports; + + // Detect free variable `module` + var freeModule = typeof module == 'object' && module && + module.exports == freeExports && module; + + // Detect free variable `global`, from Node.js or Browserified code, + // and use it as `root` + var freeGlobal = typeof global == 'object' && global; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + var stringFromCharCode = String.fromCharCode; + + // Taken from https://mths.be/punycode + function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + var value; + var extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + // Taken from https://mths.be/punycode + function ucs2encode(array) { + var length = array.length; + var index = -1; + var value; + var output = ''; + while (++index < length) { + value = array[index]; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + } + return output; + } + + function checkScalarValue(codePoint) { + if (codePoint >= 0xD800 && codePoint <= 0xDFFF) { + throw Error( + 'Lone surrogate U+' + codePoint.toString(16).toUpperCase() + + ' is not a scalar value' + ); + } + } + /*--------------------------------------------------------------------------*/ + + function createByte(codePoint, shift) { + return stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80); + } + + function encodeCodePoint(codePoint) { + if ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence + return stringFromCharCode(codePoint); + } + var symbol = ''; + if ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence + symbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0); + } + else if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence + checkScalarValue(codePoint); + symbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0); + symbol += createByte(codePoint, 6); + } + else if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence + symbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0); + symbol += createByte(codePoint, 12); + symbol += createByte(codePoint, 6); + } + symbol += stringFromCharCode((codePoint & 0x3F) | 0x80); + return symbol; + } + + function utf8encode(string) { + var codePoints = ucs2decode(string); + var length = codePoints.length; + var index = -1; + var codePoint; + var byteString = ''; + while (++index < length) { + codePoint = codePoints[index]; + byteString += encodeCodePoint(codePoint); + } + return byteString; + } + + /*--------------------------------------------------------------------------*/ + + function readContinuationByte() { + if (byteIndex >= byteCount) { + throw Error('Invalid byte index'); + } + + var continuationByte = byteArray[byteIndex] & 0xFF; + byteIndex++; + + if ((continuationByte & 0xC0) == 0x80) { + return continuationByte & 0x3F; + } + + // If we end up here, it’s not a continuation byte + throw Error('Invalid continuation byte'); + } + + function decodeSymbol() { + var byte1; + var byte2; + var byte3; + var byte4; + var codePoint; + + if (byteIndex > byteCount) { + throw Error('Invalid byte index'); + } + + if (byteIndex == byteCount) { + return false; + } + + // Read first byte + byte1 = byteArray[byteIndex] & 0xFF; + byteIndex++; + + // 1-byte sequence (no continuation bytes) + if ((byte1 & 0x80) == 0) { + return byte1; + } + + // 2-byte sequence + if ((byte1 & 0xE0) == 0xC0) { + byte2 = readContinuationByte(); + codePoint = ((byte1 & 0x1F) << 6) | byte2; + if (codePoint >= 0x80) { + return codePoint; + } else { + throw Error('Invalid continuation byte'); + } + } + + // 3-byte sequence (may include unpaired surrogates) + if ((byte1 & 0xF0) == 0xE0) { + byte2 = readContinuationByte(); + byte3 = readContinuationByte(); + codePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3; + if (codePoint >= 0x0800) { + checkScalarValue(codePoint); + return codePoint; + } else { + throw Error('Invalid continuation byte'); + } + } + + // 4-byte sequence + if ((byte1 & 0xF8) == 0xF0) { + byte2 = readContinuationByte(); + byte3 = readContinuationByte(); + byte4 = readContinuationByte(); + codePoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0C) | + (byte3 << 0x06) | byte4; + if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) { + return codePoint; + } + } + + throw Error('Invalid UTF-8 detected'); + } + + var byteArray; + var byteCount; + var byteIndex; + function utf8decode(byteString) { + byteArray = ucs2decode(byteString); + byteCount = byteArray.length; + byteIndex = 0; + var codePoints = []; + var tmp; + while ((tmp = decodeSymbol()) !== false) { + codePoints.push(tmp); + } + return ucs2encode(codePoints); + } + + /*--------------------------------------------------------------------------*/ + + var utf8 = { + 'version': '2.1.2', + 'encode': utf8encode, + 'decode': utf8decode + }; + + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define(function() { + return utf8; + }); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js or RingoJS v0.8.0+ + freeModule.exports = utf8; + } else { // in Narwhal or RingoJS v0.7.0- + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + for (var key in utf8) { + hasOwnProperty.call(utf8, key) && (freeExports[key] = utf8[key]); + } + } + } else { // in Rhino or a web browser + root.utf8 = utf8; + } + +}(this)); + +},{}],86:[function(require,module,exports){ +module.exports = XMLHttpRequest; + +},{}],"bignumber.js":[function(require,module,exports){ +'use strict'; + +module.exports = BigNumber; // jshint ignore:line + + +},{}],"web3":[function(require,module,exports){ +var Web3 = require('./lib/web3'); + +// dont override global variable +if (typeof window !== 'undefined' && typeof window.Web3 === 'undefined') { + window.Web3 = Web3; +} + +module.exports = Web3; + +},{"./lib/web3":22}]},{},["web3"]) +//# sourceMappingURL=web3-light.js.map diff --git a/bower_components/web3/dist/web3-light.min.js b/bower_components/web3/dist/web3-light.min.js new file mode 100644 index 00000000..b1431746 --- /dev/null +++ b/bower_components/web3/dist/web3-light.min.js @@ -0,0 +1,4 @@ +require=function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var f=n[a]={exports:{}};e[a][0].call(f.exports,function(t){var n=e[a][1][t];return o(n?n:t)},f,f.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a2&&"0x"===t.substr(0,2)&&(t=t.substr(2)),t=r.enc.Hex.parse(t)),o(t,{outputLength:256}).toString()}},{"crypto-js":59,"crypto-js/sha3":80}],20:[function(t,e,n){var r=t("bignumber.js"),o=t("./sha3.js"),i=t("utf8"),a={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"},s=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},c=function(t,e,n){return t+new Array(e-t.length+1).join(n?n:"0")},u=function(t){var e="",n=0,r=t.length;for("0x"===t.substring(0,2)&&(n=2);n7&&t[n].toUpperCase()!==t[n]||parseInt(e[n],16)<=7&&t[n].toLowerCase()!==t[n])return!1;return!0},A=function(t){if("undefined"==typeof t)return"";t=t.toLowerCase().replace("0x","");for(var e=o(t),n="0x",r=0;r7?t[r].toUpperCase():t[r];return n},F=function(t){return B(t)?t:/^[0-9a-f]{40}$/.test(t)?"0x"+t:"0x"+s(g(t).substr(2),40)},I=function(t){return t instanceof r||t&&t.constructor&&"BigNumber"===t.constructor.name},T=function(t){return"string"==typeof t||t&&t.constructor&&"String"===t.constructor.name},D=function(t){return"function"==typeof t},P=function(t){return null!==t&&!(t instanceof Array)&&"object"==typeof t},O=function(t){return"boolean"==typeof t},E=function(t){return t instanceof Array},R=function(t){try{return!!JSON.parse(t)}catch(t){return!1}},M=function(t){return!!/^(0x)?[0-9a-f]{512}$/i.test(t)&&!(!/^(0x)?[0-9a-f]{512}$/.test(t)&&!/^(0x)?[0-9A-F]{512}$/.test(t))},N=function(t){return!!/^(0x)?[0-9a-f]{64}$/i.test(t)&&!(!/^(0x)?[0-9a-f]{64}$/.test(t)&&!/^(0x)?[0-9A-F]{64}$/.test(t))};e.exports={padLeft:s,padRight:c,toHex:g,toDecimal:y,fromDecimal:v,toUtf8:u,toAscii:f,fromUtf8:p,fromAscii:l,transformToFullName:h,extractDisplayName:d,extractTypeName:m,toWei:w,fromWei:_,toBigNumber:x,toTwosComplement:k,toAddress:F,isBigNumber:I,isStrictAddress:B,isAddress:S,isChecksumAddress:C,toChecksumAddress:A,isFunction:D,isString:T,isObject:P,isBoolean:O,isArray:E,isJson:R,isBloom:M,isTopic:N}},{"./sha3.js":19,"bignumber.js":"bignumber.js",utf8:85}],21:[function(t,e,n){e.exports={version:"0.19.0"}},{}],22:[function(t,e,n){function r(t){this._requestManager=new o(t),this.currentProvider=t,this.eth=new a(this),this.db=new s(this),this.shh=new c(this),this.net=new u(this),this.personal=new f(this),this.bzz=new p(this),this.settings=new l,this.version={api:h.version},this.providers={HttpProvider:b,IpcProvider:_},this._extend=y(this),this._extend({properties:x()})}var o=t("./web3/requestmanager"),i=t("./web3/iban"),a=t("./web3/methods/eth"),s=t("./web3/methods/db"),c=t("./web3/methods/shh"),u=t("./web3/methods/net"),f=t("./web3/methods/personal"),p=t("./web3/methods/swarm"),l=t("./web3/settings"),h=t("./version.json"),d=t("./utils/utils"),m=t("./utils/sha3"),y=t("./web3/extend"),v=t("./web3/batch"),g=t("./web3/property"),b=t("./web3/httpprovider"),_=t("./web3/ipcprovider"),w=t("bignumber.js");r.providers={HttpProvider:b,IpcProvider:_},r.prototype.setProvider=function(t){this._requestManager.setProvider(t),this.currentProvider=t},r.prototype.reset=function(t){this._requestManager.reset(t),this.settings=new l},r.prototype.BigNumber=w,r.prototype.toHex=d.toHex,r.prototype.toAscii=d.toAscii,r.prototype.toUtf8=d.toUtf8,r.prototype.fromAscii=d.fromAscii,r.prototype.fromUtf8=d.fromUtf8,r.prototype.toDecimal=d.toDecimal,r.prototype.fromDecimal=d.fromDecimal,r.prototype.toBigNumber=d.toBigNumber,r.prototype.toWei=d.toWei,r.prototype.fromWei=d.fromWei,r.prototype.isAddress=d.isAddress,r.prototype.isChecksumAddress=d.isChecksumAddress,r.prototype.toChecksumAddress=d.toChecksumAddress,r.prototype.isIBAN=d.isIBAN,r.prototype.padLeft=d.padLeft,r.prototype.padRight=d.padRight,r.prototype.sha3=function(t,e){return"0x"+m(t,e)},r.prototype.fromICAP=function(t){var e=new i(t);return e.address()};var x=function(){return[new g({name:"version.node",getter:"web3_clientVersion"}),new g({name:"version.network",getter:"net_version",inputFormatter:d.toDecimal}),new g({name:"version.ethereum",getter:"eth_protocolVersion",inputFormatter:d.toDecimal}),new g({name:"version.whisper",getter:"shh_version",inputFormatter:d.toDecimal})]};r.prototype.isConnected=function(){return this.currentProvider&&this.currentProvider.isConnected()},r.prototype.createBatch=function(){return new v(this)},e.exports=r},{"./utils/sha3":19,"./utils/utils":20,"./version.json":21,"./web3/batch":24,"./web3/extend":28,"./web3/httpprovider":32,"./web3/iban":33,"./web3/ipcprovider":34,"./web3/methods/db":37,"./web3/methods/eth":38,"./web3/methods/net":39,"./web3/methods/personal":40,"./web3/methods/shh":41,"./web3/methods/swarm":42,"./web3/property":45,"./web3/requestmanager":46,"./web3/settings":47,"bignumber.js":"bignumber.js"}],23:[function(t,e,n){var r=t("../utils/sha3"),o=t("./event"),i=t("./formatters"),a=t("../utils/utils"),s=t("./filter"),c=t("./methods/watches"),u=function(t,e,n){this._requestManager=t,this._json=e,this._address=n};u.prototype.encode=function(t){t=t||{};var e={};return["fromBlock","toBlock"].filter(function(e){return void 0!==t[e]}).forEach(function(n){e[n]=i.inputBlockNumberFormatter(t[n])}),e.address=this._address,e},u.prototype.decode=function(t){t.data=t.data||"",t.topics=t.topics||[];var e=t.topics[0].slice(2),n=this._json.filter(function(t){return e===r(a.transformToFullName(t))})[0];if(!n)return console.warn("cannot find event for log"),t;var i=new o(this._requestManager,n,this._address);return i.decode(t)},u.prototype.execute=function(t,e){a.isFunction(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],1===arguments.length&&(t=null));var n=this.encode(t),r=this.decode.bind(this);return new s(this._requestManager,n,c.eth(),r,e)},u.prototype.attachToContract=function(t){var e=this.execute.bind(this);t.allEvents=e},e.exports=u},{"../utils/sha3":19,"../utils/utils":20,"./event":27,"./filter":29,"./formatters":30,"./methods/watches":43}],24:[function(t,e,n){var r=t("./jsonrpc"),o=t("./errors"),i=function(t){this.requestManager=t._requestManager,this.requests=[]};i.prototype.add=function(t){this.requests.push(t)},i.prototype.execute=function(){var t=this.requests;this.requestManager.sendBatch(t,function(e,n){n=n||[],t.map(function(t,e){return n[e]||{}}).forEach(function(e,n){if(t[n].callback){if(!r.isValidResponse(e))return t[n].callback(o.InvalidResponse(e));t[n].callback(null,t[n].format?t[n].format(e.result):e.result)}})})},e.exports=i},{"./errors":26,"./jsonrpc":35}],25:[function(t,e,n){var r=t("../utils/utils"),o=t("../solidity/coder"),i=t("./event"),a=t("./function"),s=t("./allevents"),c=function(t,e){return t.filter(function(t){return"constructor"===t.type&&t.inputs.length===e.length}).map(function(t){return t.inputs.map(function(t){return t.type})}).map(function(t){return o.encodeParams(t,e)})[0]||""},u=function(t){t.abi.filter(function(t){return"function"===t.type}).map(function(e){return new a(t._eth,e,t.address)}).forEach(function(e){e.attachToContract(t)})},f=function(t){var e=t.abi.filter(function(t){return"event"===t.type}),n=new s(t._eth._requestManager,e,t.address);n.attachToContract(t),e.map(function(e){return new i(t._eth._requestManager,e,t.address)}).forEach(function(e){e.attachToContract(t)})},p=function(t,e){var n=0,r=!1,o=t._eth.filter("latest",function(i){if(!i&&!r)if(n++,n>50){if(o.stopWatching(function(){}),r=!0,!e)throw new Error("Contract transaction couldn't be found after 50 blocks");e(new Error("Contract transaction couldn't be found after 50 blocks"))}else t._eth.getTransactionReceipt(t.transactionHash,function(n,i){i&&!r&&t._eth.getCode(i.contractAddress,function(n,a){if(!r&&a)if(o.stopWatching(function(){}),r=!0,a.length>3)t.address=i.contractAddress,u(t),f(t),e&&e(null,t);else{if(!e)throw new Error("The contract code couldn't be stored, please check your gas amount.");e(new Error("The contract code couldn't be stored, please check your gas amount."))}})})})},l=function(t,e){this.eth=t,this.abi=e,this.new=function(){var t,n=new h(this.eth,this.abi),o={},i=Array.prototype.slice.call(arguments);r.isFunction(i[i.length-1])&&(t=i.pop());var a=i[i.length-1];if(r.isObject(a)&&!r.isArray(a)&&(o=i.pop()),o.value>0){var s=e.filter(function(t){return"constructor"===t.type&&t.inputs.length===i.length})[0]||{};if(!s.payable)throw new Error("Cannot send value to non-payable constructor")}var u=c(this.abi,i);if(o.data+=u,t)this.eth.sendTransaction(o,function(e,r){e?t(e):(n.transactionHash=r,t(null,n),p(n,t))});else{var f=this.eth.sendTransaction(o);n.transactionHash=f,p(n)}return n},this.new.getData=this.getData.bind(this)};l.prototype.at=function(t,e){var n=new h(this.eth,this.abi,t);return u(n),f(n),e&&e(null,n),n},l.prototype.getData=function(){var t={},e=Array.prototype.slice.call(arguments),n=e[e.length-1];r.isObject(n)&&!r.isArray(n)&&(t=e.pop());var o=c(this.abi,e);return t.data+=o,t.data};var h=function(t,e,n){this._eth=t,this.transactionHash=null,this.address=n,this.abi=e};e.exports=l},{"../solidity/coder":7,"../utils/utils":20,"./allevents":23,"./event":27,"./function":31}],26:[function(t,e,n){e.exports={InvalidNumberOfSolidityArgs:function(){return new Error("Invalid number of arguments to Solidity function")},InvalidNumberOfRPCParams:function(){return new Error("Invalid number of input parameters to RPC method")},InvalidConnection:function(t){return new Error("CONNECTION ERROR: Couldn't connect to node "+t+".")},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:"Invalid JSON RPC response: "+JSON.stringify(t);return new Error(e)},ConnectionTimeout:function(t){return new Error("CONNECTION TIMEOUT: timeout of "+t+" ms achived")}}},{}],27:[function(t,e,n){var r=t("../utils/utils"),o=t("../solidity/coder"),i=t("./formatters"),a=t("../utils/sha3"),s=t("./filter"),c=t("./methods/watches"),u=function(t,e,n){this._requestManager=t,this._params=e.inputs,this._name=r.transformToFullName(e),this._address=n,this._anonymous=e.anonymous};u.prototype.types=function(t){return this._params.filter(function(e){return e.indexed===t}).map(function(t){return t.type})},u.prototype.displayName=function(){return r.extractDisplayName(this._name)},u.prototype.typeName=function(){return r.extractTypeName(this._name)},u.prototype.signature=function(){return a(this._name)},u.prototype.encode=function(t,e){t=t||{},e=e||{};var n={};["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(t){n[t]=i.inputBlockNumberFormatter(e[t])}),n.topics=[],n.address=this._address,this._anonymous||n.topics.push("0x"+this.signature());var a=this._params.filter(function(t){return t.indexed===!0}).map(function(e){var n=t[e.name];return void 0===n||null===n?null:r.isArray(n)?n.map(function(t){return"0x"+o.encodeParam(e.type,t)}):"0x"+o.encodeParam(e.type,n)});return n.topics=n.topics.concat(a),n},u.prototype.decode=function(t){t.data=t.data||"",t.topics=t.topics||[];var e=this._anonymous?t.topics:t.topics.slice(1),n=e.map(function(t){return t.slice(2)}).join(""),r=o.decodeParams(this.types(!0),n),a=t.data.slice(2),s=o.decodeParams(this.types(!1),a),c=i.outputLogFormatter(t);return c.event=this.displayName(),c.address=t.address,c.args=this._params.reduce(function(t,e){return t[e.name]=e.indexed?r.shift():s.shift(),t},{}),delete c.data,delete c.topics,c},u.prototype.execute=function(t,e,n){r.isFunction(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],2===arguments.length&&(e=null),1===arguments.length&&(e=null,t={}));var o=this.encode(t,e),i=this.decode.bind(this);return new s(this._requestManager,o,c.eth(),i,n)},u.prototype.attachToContract=function(t){var e=this.execute.bind(this),n=this.displayName();t[n]||(t[n]=e),t[n][this.typeName()]=this.execute.bind(this,t)},e.exports=u},{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"./filter":29,"./formatters":30,"./methods/watches":43}],28:[function(t,e,n){var r=t("./formatters"),o=t("./../utils/utils"),i=t("./method"),a=t("./property"),s=function(t){var e=function(e){var n;e.property?(t[e.property]||(t[e.property]={}),n=t[e.property]):n=t,e.methods&&e.methods.forEach(function(e){e.attachToObject(n),e.setRequestManager(t._requestManager)}),e.properties&&e.properties.forEach(function(e){e.attachToObject(n),e.setRequestManager(t._requestManager)})};return e.formatters=r,e.utils=o,e.Method=i,e.Property=a,e};e.exports=s},{"./../utils/utils":20,"./formatters":30,"./method":36,"./property":45}],29:[function(t,e,n){var r=t("./formatters"),o=t("../utils/utils"),i=function(t){return null===t||"undefined"==typeof t?null:(t=String(t),0===t.indexOf("0x")?t:o.fromUtf8(t))},a=function(t){return o.isString(t)?t:(t=t||{},t.topics=t.topics||[],t.topics=t.topics.map(function(t){return o.isArray(t)?t.map(i):i(t)}),{topics:t.topics,from:t.from,to:t.to,address:t.address,fromBlock:r.inputBlockNumberFormatter(t.fromBlock),toBlock:r.inputBlockNumberFormatter(t.toBlock)})},s=function(t,e){o.isString(t.options)||t.get(function(t,n){t&&e(t),o.isArray(n)&&n.forEach(function(t){e(null,t)})})},c=function(t){var e=function(e,n){return e?t.callbacks.forEach(function(t){t(e)}):void(o.isArray(n)&&n.forEach(function(e){e=t.formatter?t.formatter(e):e, +t.callbacks.forEach(function(t){t(null,e)})}))};t.requestManager.startPolling({method:t.implementation.poll.call,params:[t.filterId]},t.filterId,e,t.stopWatching.bind(t))},u=function(t,e,n,r,o,i){var u=this,f={};return n.forEach(function(e){e.setRequestManager(t),e.attachToObject(f)}),this.requestManager=t,this.options=a(e),this.implementation=f,this.filterId=null,this.callbacks=[],this.getLogsCallbacks=[],this.pollFilters=[],this.formatter=r,this.implementation.newFilter(this.options,function(t,e){if(t)u.callbacks.forEach(function(e){e(t)}),"function"==typeof i&&i(t);else if(u.filterId=e,u.getLogsCallbacks.forEach(function(t){u.get(t)}),u.getLogsCallbacks=[],u.callbacks.forEach(function(t){s(u,t)}),u.callbacks.length>0&&c(u),"function"==typeof o)return u.watch(o)}),this};u.prototype.watch=function(t){return this.callbacks.push(t),this.filterId&&(s(this,t),c(this)),this},u.prototype.stopWatching=function(t){return this.requestManager.stopPolling(this.filterId),this.callbacks=[],t?void this.implementation.uninstallFilter(this.filterId,t):this.implementation.uninstallFilter(this.filterId)},u.prototype.get=function(t){var e=this;if(!o.isFunction(t)){if(null===this.filterId)throw new Error("Filter ID Error: filter().get() can't be chained synchronous, please provide a callback for the get() method.");var n=this.implementation.getLogs(this.filterId);return n.map(function(t){return e.formatter?e.formatter(t):t})}return null===this.filterId?this.getLogsCallbacks.push(t):this.implementation.getLogs(this.filterId,function(n,r){n?t(n):t(null,r.map(function(t){return e.formatter?e.formatter(t):t}))}),this},e.exports=u},{"../utils/utils":20,"./formatters":30}],30:[function(t,e,n){var r=t("../utils/utils"),o=t("../utils/config"),i=t("./iban"),a=function(t){return r.toBigNumber(t)},s=function(t){return"latest"===t||"pending"===t||"earliest"===t},c=function(t){return void 0===t?o.defaultBlock:u(t)},u=function(t){if(void 0!==t)return s(t)?t:r.toHex(t)},f=function(t){return t.from=t.from||o.defaultAccount,t.from&&(t.from=g(t.from)),t.to&&(t.to=g(t.to)),["gasPrice","gas","value","nonce"].filter(function(e){return void 0!==t[e]}).forEach(function(e){t[e]=r.fromDecimal(t[e])}),t},p=function(t){return t.from=t.from||o.defaultAccount,t.from=g(t.from),t.to&&(t.to=g(t.to)),["gasPrice","gas","value","nonce"].filter(function(e){return void 0!==t[e]}).forEach(function(e){t[e]=r.fromDecimal(t[e])}),t},l=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),t.nonce=r.toDecimal(t.nonce),t.gas=r.toDecimal(t.gas),t.gasPrice=r.toBigNumber(t.gasPrice),t.value=r.toBigNumber(t.value),t},h=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),t.cumulativeGasUsed=r.toDecimal(t.cumulativeGasUsed),t.gasUsed=r.toDecimal(t.gasUsed),r.isArray(t.logs)&&(t.logs=t.logs.map(function(t){return m(t)})),t},d=function(t){return t.gasLimit=r.toDecimal(t.gasLimit),t.gasUsed=r.toDecimal(t.gasUsed),t.size=r.toDecimal(t.size),t.timestamp=r.toDecimal(t.timestamp),null!==t.number&&(t.number=r.toDecimal(t.number)),t.difficulty=r.toBigNumber(t.difficulty),t.totalDifficulty=r.toBigNumber(t.totalDifficulty),r.isArray(t.transactions)&&t.transactions.forEach(function(t){if(!r.isString(t))return l(t)}),t},m=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),null!==t.logIndex&&(t.logIndex=r.toDecimal(t.logIndex)),t},y=function(t){return t.ttl=r.fromDecimal(t.ttl),t.workToProve=r.fromDecimal(t.workToProve),t.priority=r.fromDecimal(t.priority),r.isArray(t.topics)||(t.topics=t.topics?[t.topics]:[]),t.topics=t.topics.map(function(t){return 0===t.indexOf("0x")?t:r.fromUtf8(t)}),t},v=function(t){return t.expiry=r.toDecimal(t.expiry),t.sent=r.toDecimal(t.sent),t.ttl=r.toDecimal(t.ttl),t.workProved=r.toDecimal(t.workProved),t.topics||(t.topics=[]),t.topics=t.topics.map(function(t){return r.toAscii(t)}),t},g=function(t){var e=new i(t);if(e.isValid()&&e.isDirect())return"0x"+e.address();if(r.isStrictAddress(t))return t;if(r.isAddress(t))return"0x"+t;throw new Error("invalid address")},b=function(t){return t.startingBlock=r.toDecimal(t.startingBlock),t.currentBlock=r.toDecimal(t.currentBlock),t.highestBlock=r.toDecimal(t.highestBlock),t.knownStates&&(t.knownStates=r.toDecimal(t.knownStates),t.pulledStates=r.toDecimal(t.pulledStates)),t};e.exports={inputDefaultBlockNumberFormatter:c,inputBlockNumberFormatter:u,inputCallFormatter:f,inputTransactionFormatter:p,inputAddressFormatter:g,inputPostFormatter:y,outputBigNumberFormatter:a,outputTransactionFormatter:l,outputTransactionReceiptFormatter:h,outputBlockFormatter:d,outputLogFormatter:m,outputPostFormatter:v,outputSyncingFormatter:b}},{"../utils/config":18,"../utils/utils":20,"./iban":33}],31:[function(t,e,n){var r=t("../solidity/coder"),o=t("../utils/utils"),i=t("./errors"),a=t("./formatters"),s=t("../utils/sha3"),c=function(t,e,n){this._eth=t,this._inputTypes=e.inputs.map(function(t){return t.type}),this._outputTypes=e.outputs.map(function(t){return t.type}),this._constant=e.constant,this._payable=e.payable,this._name=o.transformToFullName(e),this._address=n};c.prototype.extractCallback=function(t){if(o.isFunction(t[t.length-1]))return t.pop()},c.prototype.extractDefaultBlock=function(t){if(t.length>this._inputTypes.length&&!o.isObject(t[t.length-1]))return a.inputDefaultBlockNumberFormatter(t.pop())},c.prototype.validateArgs=function(t){var e=t.filter(function(t){return!(o.isObject(t)===!0&&o.isArray(t)===!1)});if(e.length!==this._inputTypes.length)throw i.InvalidNumberOfSolidityArgs()},c.prototype.toPayload=function(t){var e={};return t.length>this._inputTypes.length&&o.isObject(t[t.length-1])&&(e=t[t.length-1]),this.validateArgs(t),e.to=this._address,e.data="0x"+this.signature()+r.encodeParams(this._inputTypes,t),e},c.prototype.signature=function(){return s(this._name).slice(0,8)},c.prototype.unpackOutput=function(t){if(t){t=t.length>=2?t.slice(2):t;var e=r.decodeParams(this._outputTypes,t);return 1===e.length?e[0]:e}},c.prototype.call=function(){var t=Array.prototype.slice.call(arguments).filter(function(t){return void 0!==t}),e=this.extractCallback(t),n=this.extractDefaultBlock(t),r=this.toPayload(t);if(!e){var o=this._eth.call(r,n);return this.unpackOutput(o)}var i=this;this._eth.call(r,n,function(t,n){if(t)return e(t,null);var r=null;try{r=i.unpackOutput(n)}catch(e){t=e}e(t,r)})},c.prototype.sendTransaction=function(){var t=Array.prototype.slice.call(arguments).filter(function(t){return void 0!==t}),e=this.extractCallback(t),n=this.toPayload(t);if(n.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");return e?void this._eth.sendTransaction(n,e):this._eth.sendTransaction(n)},c.prototype.estimateGas=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),n=this.toPayload(t);return e?void this._eth.estimateGas(n,e):this._eth.estimateGas(n)},c.prototype.getData=function(){var t=Array.prototype.slice.call(arguments),e=this.toPayload(t);return e.data},c.prototype.displayName=function(){return o.extractDisplayName(this._name)},c.prototype.typeName=function(){return o.extractTypeName(this._name)},c.prototype.request=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),n=this.toPayload(t),r=this.unpackOutput.bind(this);return{method:this._constant?"eth_call":"eth_sendTransaction",callback:e,params:[n],format:r}},c.prototype.execute=function(){var t=!this._constant;return t?this.sendTransaction.apply(this,Array.prototype.slice.call(arguments)):this.call.apply(this,Array.prototype.slice.call(arguments))},c.prototype.attachToContract=function(t){var e=this.execute.bind(this);e.request=this.request.bind(this),e.call=this.call.bind(this),e.sendTransaction=this.sendTransaction.bind(this),e.estimateGas=this.estimateGas.bind(this),e.getData=this.getData.bind(this);var n=this.displayName();t[n]||(t[n]=e),t[n][this.typeName()]=e},e.exports=c},{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"./errors":26,"./formatters":30}],32:[function(t,e,n){var r=t("./errors");"undefined"!=typeof window&&window.XMLHttpRequest?XMLHttpRequest=window.XMLHttpRequest:XMLHttpRequest=t("xmlhttprequest").XMLHttpRequest;var o=t("xhr2"),i=function(t,e){this.host=t||"http://localhost:8545",this.timeout=e||0};i.prototype.prepareRequest=function(t){var e;return t?(e=new o,e.timeout=this.timeout):e=new XMLHttpRequest,e.open("POST",this.host,t),e.setRequestHeader("Content-Type","application/json"),e},i.prototype.send=function(t){var e=this.prepareRequest(!1);try{e.send(JSON.stringify(t))}catch(t){throw r.InvalidConnection(this.host)}var n=e.responseText;try{n=JSON.parse(n)}catch(t){throw r.InvalidResponse(e.responseText)}return n},i.prototype.sendAsync=function(t,e){var n=this.prepareRequest(!0);n.onreadystatechange=function(){if(4===n.readyState&&1!==n.timeout){var t=n.responseText,o=null;try{t=JSON.parse(t)}catch(t){o=r.InvalidResponse(n.responseText)}e(o,t)}},n.ontimeout=function(){e(r.ConnectionTimeout(this.timeout))};try{n.send(JSON.stringify(t))}catch(t){e(r.InvalidConnection(this.host))}},i.prototype.isConnected=function(){try{return this.send({id:9999999999,jsonrpc:"2.0",method:"net_listening",params:[]}),!0}catch(t){return!1}},e.exports=i},{"./errors":26,xhr2:86,xmlhttprequest:17}],33:[function(t,e,n){var r=t("bignumber.js"),o=function(t,e){for(var n=t;n.length<2*e;)n="0"+n;return n},i=function(t){var e="A".charCodeAt(0),n="Z".charCodeAt(0);return t=t.toUpperCase(),t=t.substr(4)+t.substr(0,4),t.split("").map(function(t){var r=t.charCodeAt(0);return r>=e&&r<=n?r-e+10:t}).join("")},a=function(t){for(var e,n=t;n.length>2;)e=n.slice(0,9),n=parseInt(e,10)%97+n.slice(e.length);return parseInt(n,10)%97},s=function(t){this._iban=t};s.fromAddress=function(t){var e=new r(t,16),n=e.toString(36),i=o(n,15);return s.fromBban(i.toUpperCase())},s.fromBban=function(t){var e="XE",n=a(i(e+"00"+t)),r=("0"+(98-n)).slice(-2);return new s(e+r+t)},s.createIndirect=function(t){return s.fromBban("ETH"+t.institution+t.identifier)},s.isValid=function(t){var e=new s(t);return e.isValid()},s.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===a(i(this._iban))},s.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},s.prototype.isIndirect=function(){return 20===this._iban.length},s.prototype.checksum=function(){return this._iban.substr(2,2)},s.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},s.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},s.prototype.address=function(){if(this.isDirect()){var t=this._iban.substr(4),e=new r(t,36);return o(e.toString(16),20)}return""},s.prototype.toString=function(){return this._iban},e.exports=s},{"bignumber.js":"bignumber.js"}],34:[function(t,e,n){"use strict";var r=t("../utils/utils"),o=t("./errors"),i=function(t,e){var n=this;this.responseCallbacks={},this.path=t,this.connection=e.connect({path:this.path}),this.connection.on("error",function(t){console.error("IPC Connection Error",t),n._timeout()}),this.connection.on("end",function(){n._timeout()}),this.connection.on("data",function(t){n._parseResponse(t.toString()).forEach(function(t){var e=null;r.isArray(t)?t.forEach(function(t){n.responseCallbacks[t.id]&&(e=t.id)}):e=t.id,n.responseCallbacks[e]&&(n.responseCallbacks[e](null,t),delete n.responseCallbacks[e])})})};i.prototype._parseResponse=function(t){var e=this,n=[],r=t.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|");return r.forEach(function(t){e.lastChunk&&(t=e.lastChunk+t);var r=null;try{r=JSON.parse(t)}catch(n){return e.lastChunk=t,clearTimeout(e.lastChunkTimeout),void(e.lastChunkTimeout=setTimeout(function(){throw e._timeout(),o.InvalidResponse(t)},15e3))}clearTimeout(e.lastChunkTimeout),e.lastChunk=null,r&&n.push(r)}),n},i.prototype._addResponseCallback=function(t,e){var n=t.id||t[0].id,r=t.method||t[0].method;this.responseCallbacks[n]=e,this.responseCallbacks[n].method=r},i.prototype._timeout=function(){for(var t in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(t)&&(this.responseCallbacks[t](o.InvalidConnection("on IPC")),delete this.responseCallbacks[t])},i.prototype.isConnected=function(){var t=this;return t.connection.writable||t.connection.connect({path:t.path}),!!this.connection.writable},i.prototype.send=function(t){if(this.connection.writeSync){var e;this.connection.writable||this.connection.connect({path:this.path});var n=this.connection.writeSync(JSON.stringify(t));try{e=JSON.parse(n)}catch(t){throw o.InvalidResponse(n)}return e}throw new Error('You tried to send "'+t.method+'" synchronously. Synchronous requests are not supported by the IPC provider.')},i.prototype.sendAsync=function(t,e){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(t)),this._addResponseCallback(t,e)},e.exports=i},{"../utils/utils":20,"./errors":26}],35:[function(t,e,n){var r={messageId:0};r.toPayload=function(t,e){return t||console.error("jsonrpc method should be specified!"),r.messageId++,{jsonrpc:"2.0",id:r.messageId,method:t,params:e||[]}},r.isValidResponse=function(t){function e(t){return!!t&&!t.error&&"2.0"===t.jsonrpc&&"number"==typeof t.id&&void 0!==t.result}return Array.isArray(t)?t.every(e):e(t)},r.toBatchPayload=function(t){return t.map(function(t){return r.toPayload(t.method,t.params)})},e.exports=r},{}],36:[function(t,e,n){var r=t("../utils/utils"),o=t("./errors"),i=function(t){this.name=t.name,this.call=t.call,this.params=t.params||0,this.inputFormatter=t.inputFormatter,this.outputFormatter=t.outputFormatter,this.requestManager=null};i.prototype.setRequestManager=function(t){this.requestManager=t},i.prototype.getCall=function(t){return r.isFunction(this.call)?this.call(t):this.call},i.prototype.extractCallback=function(t){if(r.isFunction(t[t.length-1]))return t.pop()},i.prototype.validateArgs=function(t){if(t.length!==this.params)throw o.InvalidNumberOfRPCParams()},i.prototype.formatInput=function(t){return this.inputFormatter?this.inputFormatter.map(function(e,n){return e?e(t[n]):t[n]}):t},i.prototype.formatOutput=function(t){return this.outputFormatter&&t?this.outputFormatter(t):t},i.prototype.toPayload=function(t){var e=this.getCall(t),n=this.extractCallback(t),r=this.formatInput(t);return this.validateArgs(r),{method:e,params:r,callback:n}},i.prototype.attachToObject=function(t){var e=this.buildCall();e.call=this.call;var n=this.name.split(".");n.length>1?(t[n[0]]=t[n[0]]||{},t[n[0]][n[1]]=e):t[n[0]]=e},i.prototype.buildCall=function(){var t=this,e=function(){var e=t.toPayload(Array.prototype.slice.call(arguments));return e.callback?t.requestManager.sendAsync(e,function(n,r){e.callback(n,t.formatOutput(r))}):t.formatOutput(t.requestManager.send(e))};return e.request=this.request.bind(this),e},i.prototype.request=function(){var t=this.toPayload(Array.prototype.slice.call(arguments));return t.format=this.formatOutput.bind(this),t},e.exports=i},{"../utils/utils":20,"./errors":26}],37:[function(t,e,n){var r=t("../method"),o=function(t){this._requestManager=t._requestManager;var e=this;i().forEach(function(n){n.attachToObject(e),n.setRequestManager(t._requestManager)})},i=function(){var t=new r({name:"putString",call:"db_putString",params:3}),e=new r({name:"getString",call:"db_getString",params:2}),n=new r({name:"putHex",call:"db_putHex",params:3}),o=new r({name:"getHex",call:"db_getHex",params:2});return[t,e,n,o]};e.exports=o},{"../method":36}],38:[function(t,e,n){"use strict";function r(t){this._requestManager=t._requestManager;var e=this;w().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}),x().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}),this.iban=d,this.sendIBANTransaction=m.bind(null,this)}var o=t("../formatters"),i=t("../../utils/utils"),a=t("../method"),s=t("../property"),c=t("../../utils/config"),u=t("../contract"),f=t("./watches"),p=t("../filter"),l=t("../syncing"),h=t("../namereg"),d=t("../iban"),m=t("../transfer"),y=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},v=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},g=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},b=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},_=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"};Object.defineProperty(r.prototype,"defaultBlock",{get:function(){return c.defaultBlock},set:function(t){return c.defaultBlock=t,t}}),Object.defineProperty(r.prototype,"defaultAccount",{get:function(){return c.defaultAccount},set:function(t){return c.defaultAccount=t,t}});var w=function(){var t=new a({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter],outputFormatter:o.outputBigNumberFormatter}),e=new a({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[null,i.toHex,o.inputDefaultBlockNumberFormatter]}),n=new a({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter]}),r=new a({name:"getBlock",call:y,params:2,inputFormatter:[o.inputBlockNumberFormatter,function(t){return!!t}],outputFormatter:o.outputBlockFormatter}),s=new a({name:"getUncle",call:g,params:2,inputFormatter:[o.inputBlockNumberFormatter,i.toHex],outputFormatter:o.outputBlockFormatter}),c=new a({name:"getCompilers",call:"eth_getCompilers",params:0}),u=new a({name:"getBlockTransactionCount",call:b,params:1,inputFormatter:[o.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),f=new a({name:"getBlockUncleCount",call:_,params:1,inputFormatter:[o.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),p=new a({name:"getTransaction",call:"eth_getTransactionByHash",params:1,outputFormatter:o.outputTransactionFormatter}),l=new a({name:"getTransactionFromBlock",call:v,params:2,inputFormatter:[o.inputBlockNumberFormatter,i.toHex],outputFormatter:o.outputTransactionFormatter}),h=new a({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,outputFormatter:o.outputTransactionReceiptFormatter}),d=new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[null,o.inputDefaultBlockNumberFormatter],outputFormatter:i.toDecimal}),m=new a({name:"sendRawTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),w=new a({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[o.inputTransactionFormatter]}),x=new a({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[o.inputTransactionFormatter]}),k=new a({name:"sign",call:"eth_sign",params:2,inputFormatter:[o.inputAddressFormatter,null]}),B=new a({name:"call",call:"eth_call",params:2,inputFormatter:[o.inputCallFormatter,o.inputDefaultBlockNumberFormatter]}),S=new a({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[o.inputCallFormatter],outputFormatter:i.toDecimal}),C=new a({name:"compile.solidity",call:"eth_compileSolidity",params:1}),A=new a({name:"compile.lll",call:"eth_compileLLL",params:1}),F=new a({name:"compile.serpent",call:"eth_compileSerpent",params:1}),I=new a({name:"submitWork",call:"eth_submitWork",params:3}),T=new a({name:"getWork",call:"eth_getWork",params:0});return[t,e,n,r,s,c,u,f,p,l,h,d,B,S,m,x,w,k,C,A,F,I,T]},x=function(){return[new s({name:"coinbase",getter:"eth_coinbase"}),new s({name:"mining",getter:"eth_mining"}),new s({name:"hashrate",getter:"eth_hashrate",outputFormatter:i.toDecimal}),new s({name:"syncing",getter:"eth_syncing",outputFormatter:o.outputSyncingFormatter}),new s({name:"gasPrice",getter:"eth_gasPrice",outputFormatter:o.outputBigNumberFormatter}),new s({name:"accounts",getter:"eth_accounts"}),new s({name:"blockNumber",getter:"eth_blockNumber",outputFormatter:i.toDecimal}),new s({name:"protocolVersion",getter:"eth_protocolVersion"})]};r.prototype.contract=function(t){var e=new u(this,t);return e},r.prototype.filter=function(t,e,n){return new p(this._requestManager,t,f.eth(),o.outputLogFormatter,e,n)},r.prototype.namereg=function(){return this.contract(h.global.abi).at(h.global.address)},r.prototype.icapNamereg=function(){return this.contract(h.icap.abi).at(h.icap.address)},r.prototype.isSyncing=function(t){return new l(this._requestManager,t)},e.exports=r},{"../../utils/config":18,"../../utils/utils":20,"../contract":25,"../filter":29,"../formatters":30,"../iban":33,"../method":36,"../namereg":44,"../property":45,"../syncing":48,"../transfer":49,"./watches":43}],39:[function(t,e,n){var r=t("../../utils/utils"),o=t("../property"),i=function(t){this._requestManager=t._requestManager;var e=this;a().forEach(function(n){n.attachToObject(e),n.setRequestManager(t._requestManager)})},a=function(){return[new o({name:"listening",getter:"net_listening"}),new o({name:"peerCount",getter:"net_peerCount",outputFormatter:r.toDecimal})]};e.exports=i},{"../../utils/utils":20,"../property":45}],40:[function(t,e,n){"use strict";function r(t){this._requestManager=t._requestManager;var e=this;s().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}),c().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})}var o=t("../method"),i=t("../property"),a=t("../formatters"),s=function(){var t=new o({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null]}),e=new o({name:"importRawKey",call:"personal_importRawKey",params:2}),n=new o({name:"sign",call:"personal_sign",params:3,inputFormatter:[null,a.inputAddressFormatter,null]}),r=new o({name:"ecRecover",call:"personal_ecRecover",params:2}),i=new o({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[a.inputAddressFormatter,null,null]}),s=new o({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[a.inputTransactionFormatter,null]}),c=new o({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[a.inputAddressFormatter]});return[t,e,i,r,n,s,c]},c=function(){return[new i({name:"listAccounts",getter:"personal_listAccounts"})]};e.exports=r},{"../formatters":30,"../method":36,"../property":45}],41:[function(t,e,n){var r=t("../method"),o=t("../formatters"),i=t("../filter"),a=t("./watches"),s=function(t){this._requestManager=t._requestManager;var e=this;c().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})};s.prototype.filter=function(t,e){return new i(this._requestManager,t,a.shh(),o.outputPostFormatter,e)};var c=function(){var t=new r({name:"post",call:"shh_post",params:1,inputFormatter:[o.inputPostFormatter]}),e=new r({name:"newIdentity",call:"shh_newIdentity",params:0}),n=new r({name:"hasIdentity",call:"shh_hasIdentity",params:1}),i=new r({name:"newGroup",call:"shh_newGroup",params:0}),a=new r({name:"addToGroup",call:"shh_addToGroup",params:0});return[t,e,n,i,a]};e.exports=s},{"../filter":29,"../formatters":30,"../method":36,"./watches":43}],42:[function(t,e,n){"use strict";function r(t){this._requestManager=t._requestManager;var e=this;a().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}),s().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})}var o=t("../method"),i=t("../property"),a=function(){var t=new o({name:"blockNetworkRead",call:"bzz_blockNetworkRead",params:1,inputFormatter:[null]}),e=new o({name:"syncEnabled",call:"bzz_syncEnabled",params:1,inputFormatter:[null]}),n=new o({name:"swapEnabled",call:"bzz_swapEnabled",params:1,inputFormatter:[null]}),r=new o({name:"download",call:"bzz_download",params:2,inputFormatter:[null,null]}),i=new o({name:"upload",call:"bzz_upload",params:2,inputFormatter:[null,null]}),a=new o({name:"retrieve",call:"bzz_retrieve",params:1,inputFormatter:[null]}),s=new o({name:"store",call:"bzz_store",params:2,inputFormatter:[null,null]}),c=new o({name:"get",call:"bzz_get",params:1,inputFormatter:[null]}),u=new o({name:"put",call:"bzz_put",params:2,inputFormatter:[null,null]}),f=new o({name:"modify",call:"bzz_modify",params:4,inputFormatter:[null,null,null,null]});return[t,e,n,r,i,a,s,c,u,f]},s=function(){return[new i({name:"hive",getter:"bzz_hive"}),new i({name:"info",getter:"bzz_info"})]};e.exports=r},{"../method":36,"../property":45}],43:[function(t,e,n){var r=t("../method"),o=function(){var t=function(t){var e=t[0];switch(e){case"latest":return t.shift(),this.params=0,"eth_newBlockFilter";case"pending":return t.shift(),this.params=0,"eth_newPendingTransactionFilter";default:return"eth_newFilter"}},e=new r({name:"newFilter",call:t,params:1}),n=new r({name:"uninstallFilter",call:"eth_uninstallFilter",params:1}),o=new r({name:"getLogs",call:"eth_getFilterLogs",params:1}),i=new r({name:"poll",call:"eth_getFilterChanges",params:1});return[e,n,o,i]},i=function(){var t=new r({name:"newFilter",call:"shh_newFilter",params:1}),e=new r({name:"uninstallFilter",call:"shh_uninstallFilter",params:1}),n=new r({name:"getLogs",call:"shh_getMessages",params:1}),o=new r({name:"poll",call:"shh_getFilterChanges",params:1});return[t,e,n,o]};e.exports={eth:o,shh:i}},{"../method":36}],44:[function(t,e,n){var r=t("../contracts/GlobalRegistrar.json"),o=t("../contracts/ICAPRegistrar.json"),i="0xc6d9d2cd449a754c494264e1809c50e34d64562b",a="0xa1a111bc074c9cfa781f0c38e63bd51c91b8af00";e.exports={global:{abi:r,address:i},icap:{abi:o,address:a}}},{"../contracts/GlobalRegistrar.json":1,"../contracts/ICAPRegistrar.json":2}],45:[function(t,e,n){var r=t("../utils/utils"),o=function(t){this.name=t.name,this.getter=t.getter,this.setter=t.setter,this.outputFormatter=t.outputFormatter,this.inputFormatter=t.inputFormatter,this.requestManager=null};o.prototype.setRequestManager=function(t){this.requestManager=t},o.prototype.formatInput=function(t){return this.inputFormatter?this.inputFormatter(t):t},o.prototype.formatOutput=function(t){return this.outputFormatter&&null!==t&&void 0!==t?this.outputFormatter(t):t},o.prototype.extractCallback=function(t){if(r.isFunction(t[t.length-1]))return t.pop()},o.prototype.attachToObject=function(t){var e={get:this.buildGet(),enumerable:!0},n=this.name.split("."),r=n[0];n.length>1&&(t[n[0]]=t[n[0]]||{},t=t[n[0]],r=n[1]),Object.defineProperty(t,r,e),t[i(r)]=this.buildAsyncGet()};var i=function(t){return"get"+t.charAt(0).toUpperCase()+t.slice(1)};o.prototype.buildGet=function(){var t=this;return function(){return t.formatOutput(t.requestManager.send({method:t.getter}))}},o.prototype.buildAsyncGet=function(){var t=this,e=function(e){t.requestManager.sendAsync({method:t.getter},function(n,r){e(n,t.formatOutput(r))})};return e.request=this.request.bind(this),e},o.prototype.request=function(){var t={method:this.getter,params:[],callback:this.extractCallback(Array.prototype.slice.call(arguments))};return t.format=this.formatOutput.bind(this),t},e.exports=o},{"../utils/utils":20}],46:[function(t,e,n){var r=t("./jsonrpc"),o=t("../utils/utils"),i=t("../utils/config"),a=t("./errors"),s=function(t){this.provider=t,this.polls={},this.timeout=null};s.prototype.send=function(t){if(!this.provider)return console.error(a.InvalidProvider()),null;var e=r.toPayload(t.method,t.params),n=this.provider.send(e);if(!r.isValidResponse(n))throw a.InvalidResponse(n);return n.result},s.prototype.sendAsync=function(t,e){if(!this.provider)return e(a.InvalidProvider());var n=r.toPayload(t.method,t.params);this.provider.sendAsync(n,function(t,n){return t?e(t):r.isValidResponse(n)?void e(null,n.result):e(a.InvalidResponse(n))})},s.prototype.sendBatch=function(t,e){if(!this.provider)return e(a.InvalidProvider());var n=r.toBatchPayload(t);this.provider.sendAsync(n,function(t,n){return t?e(t):o.isArray(n)?void e(t,n):e(a.InvalidResponse(n))})},s.prototype.setProvider=function(t){this.provider=t},s.prototype.startPolling=function(t,e,n,r){this.polls[e]={data:t,id:e,callback:n,uninstall:r},this.timeout||this.poll()},s.prototype.stopPolling=function(t){delete this.polls[t],0===Object.keys(this.polls).length&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.reset=function(t){for(var e in this.polls)t&&e.indexOf("syncPoll_")!==-1||(this.polls[e].uninstall(),delete this.polls[e]);0===Object.keys(this.polls).length&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.poll=function(){if(this.timeout=setTimeout(this.poll.bind(this),i.ETH_POLLING_TIMEOUT),0!==Object.keys(this.polls).length){if(!this.provider)return void console.error(a.InvalidProvider());var t=[],e=[];for(var n in this.polls)t.push(this.polls[n].data),e.push(n);if(0!==t.length){var s=r.toBatchPayload(t),c={};s.forEach(function(t,n){c[t.id]=e[n]});var u=this;this.provider.sendAsync(s,function(t,e){if(!t){if(!o.isArray(e))throw a.InvalidResponse(e);e.map(function(t){var e=c[t.id];return!!u.polls[e]&&(t.callback=u.polls[e].callback,t)}).filter(function(t){return!!t}).filter(function(t){var e=r.isValidResponse(t);return e||t.callback(a.InvalidResponse(t)),e}).forEach(function(t){t.callback(null,t.result)})}})}}},e.exports=s},{"../utils/config":18,"../utils/utils":20,"./errors":26,"./jsonrpc":35}],47:[function(t,e,n){var r=function(){this.defaultBlock="latest",this.defaultAccount=void 0};e.exports=r},{}],48:[function(t,e,n){var r=t("./formatters"),o=t("../utils/utils"),i=1,a=function(t){var e=function(e,n){return e?t.callbacks.forEach(function(t){t(e)}):(o.isObject(n)&&n.startingBlock&&(n=r.outputSyncingFormatter(n)),void t.callbacks.forEach(function(e){t.lastSyncState!==n&&(!t.lastSyncState&&o.isObject(n)&&e(null,!0),setTimeout(function(){e(null,n)},0),t.lastSyncState=n)}))};t.requestManager.startPolling({method:"eth_syncing",params:[]},t.pollId,e,t.stopWatching.bind(t))},s=function(t,e){return this.requestManager=t,this.pollId="syncPoll_"+i++,this.callbacks=[],this.addCallback(e),this.lastSyncState=!1,a(this),this};s.prototype.addCallback=function(t){return t&&this.callbacks.push(t),this},s.prototype.stopWatching=function(){this.requestManager.stopPolling(this.pollId),this.callbacks=[]},e.exports=s},{"../utils/utils":20,"./formatters":30}],49:[function(t,e,n){var r=t("./iban"),o=t("../contracts/SmartExchange.json"),i=function(t,e,n,o,i){var c=new r(n);if(!c.isValid())throw new Error("invalid iban address");if(c.isDirect())return a(t,e,c.address(),o,i);if(!i){var u=t.icapNamereg().addr(c.institution());return s(t,e,u,o,c.client())}t.icapNamereg().addr(c.institution(),function(n,r){return s(t,e,r,o,c.client(),i)})},a=function(t,e,n,r,o){return t.sendTransaction({address:n,from:e,value:r},o)},s=function(t,e,n,r,i,a){var s=o;return t.contract(s).at(n).deposit(i,{from:e,value:r},a)};e.exports=i},{"../contracts/SmartExchange.json":3,"./iban":33}],50:[function(t,e,n){},{}],51:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./enc-base64"),t("./md5"),t("./evpkdf"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.lib,r=n.BlockCipher,o=e.algo,i=[],a=[],s=[],c=[],u=[],f=[],p=[],l=[],h=[],d=[];!function(){for(var t=[],e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var n=0,r=0,e=0;e<256;e++){var o=r^r<<1^r<<2^r<<3^r<<4;o=o>>>8^255&o^99,i[n]=o,a[o]=n;var m=t[n],y=t[m],v=t[y],g=257*t[o]^16843008*o;s[n]=g<<24|g>>>8,c[n]=g<<16|g>>>16,u[n]=g<<8|g>>>24,f[n]=g;var g=16843009*v^65537*y^257*m^16843008*n; +p[o]=g<<24|g>>>8,l[o]=g<<16|g>>>16,h[o]=g<<8|g>>>24,d[o]=g,n?(n=m^t[t[t[v^m]]],r^=t[t[r]]):n=r=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],y=o.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=this._nRounds=n+6,o=4*(r+1),a=this._keySchedule=[],s=0;s6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=c<<8|c>>>24,c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=m[s/n|0]<<24),a[s]=a[s-n]^c}for(var u=this._invKeySchedule=[],f=0;f>>24]]^l[i[c>>>16&255]]^h[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,c,u,f,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,p,l,h,d,a);var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,o,i,a,s){for(var c=this._nRounds,u=t[e]^n[0],f=t[e+1]^n[1],p=t[e+2]^n[2],l=t[e+3]^n[3],h=4,d=1;d>>24]^o[f>>>16&255]^i[p>>>8&255]^a[255&l]^n[h++],y=r[f>>>24]^o[p>>>16&255]^i[l>>>8&255]^a[255&u]^n[h++],v=r[p>>>24]^o[l>>>16&255]^i[u>>>8&255]^a[255&f]^n[h++],g=r[l>>>24]^o[u>>>16&255]^i[f>>>8&255]^a[255&p]^n[h++];u=m,f=y,p=v,l=g}var m=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[p>>>8&255]<<8|s[255&l])^n[h++],y=(s[f>>>24]<<24|s[p>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[h++],v=(s[p>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[h++],g=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&p])^n[h++];t[e]=m,t[e+1]=y,t[e+2]=v,t[e+3]=g},keySize:8});e.AES=r._createHelper(y)}(),t.AES})},{"./cipher-core":52,"./core":53,"./enc-base64":54,"./evpkdf":56,"./md5":61}],52:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){t.lib.Cipher||function(e){var n=t,r=n.lib,o=r.Base,i=r.WordArray,a=r.BufferedBlockAlgorithm,s=n.enc,c=(s.Utf8,s.Base64),u=n.algo,f=u.EvpKDF,p=r.Cipher=a.extend({cfg:o.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?k:_}return function(e){return{encrypt:function(n,r,o){return t(r).encrypt(e,n,r,o)},decrypt:function(n,r,o){return t(r).decrypt(e,n,r,o)}}}}()}),l=(r.StreamCipher=p.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),n.mode={}),h=r.BlockCipherMode=o.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),d=l.CBC=function(){function t(t,n,r){var o=this._iv;if(o){var i=o;this._iv=e}else var i=this._prevBlock;for(var a=0;a>>2];t.sigBytes-=e}},v=(r.BlockCipher=p.extend({cfg:p.cfg.extend({mode:d,padding:y}),reset:function(){p.reset.call(this);var t=this.cfg,e=t.iv,n=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else{var r=n.createDecryptor;this._minBufferSize=1}this._mode=r.call(n,this,e&&e.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else{var e=this._process(!0);t.unpad(e)}return e},blockSize:4}),r.CipherParams=o.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),g=n.format={},b=g.OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;if(n)var r=i.create([1398893684,1701076831]).concat(n).concat(e);else var r=e;return r.toString(c)},parse:function(t){var e=c.parse(t),n=e.words;if(1398893684==n[0]&&1701076831==n[1]){var r=i.create(n.slice(2,4));n.splice(0,4),e.sigBytes-=16}return v.create({ciphertext:e,salt:r})}},_=r.SerializableCipher=o.extend({cfg:o.extend({format:b}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var o=t.createEncryptor(n,r),i=o.finalize(e),a=o.cfg;return v.create({ciphertext:i,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var o=t.createDecryptor(n,r).finalize(e.ciphertext);return o},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),w=n.kdf={},x=w.OpenSSL={execute:function(t,e,n,r){r||(r=i.random(8));var o=f.create({keySize:e+n}).compute(t,r),a=i.create(o.words.slice(e),4*n);return o.sigBytes=4*e,v.create({key:o,iv:a,salt:r})}},k=r.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:x}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var o=r.kdf.execute(n,t.keySize,t.ivSize);r.iv=o.iv;var i=_.encrypt.call(this,t,e,o.key,r);return i.mixIn(o),i},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var o=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);r.iv=o.iv;var i=_.decrypt.call(this,t,e,o.key,r);return i}})}()})},{"./core":53}],53:[function(t,e,n){!function(t,r){"object"==typeof n?e.exports=n=r():"function"==typeof define&&define.amd?define([],r):t.CryptoJS=r()}(this,function(){var t=t||function(t,e){var n=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),r={},o=r.lib={},i=o.Base=function(){return{extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=o.WordArray=i.extend({init:function(t,n){t=this.words=t||[],n!=e?this.sigBytes=n:this.sigBytes=4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,o=t.sigBytes;if(this.clamp(),r%4)for(var i=0;i>>2]>>>24-i%4*8&255;e[r+i>>>2]|=a<<24-(r+i)%4*8}else for(var i=0;i>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],o=function(e){var e=e,n=987654321,r=4294967295;return function(){n=36969*(65535&n)+(n>>16)&r,e=18e3*(65535&e)+(e>>16)&r;var o=(n<<16)+e&r;return o/=4294967296,o+=.5,o*(t.random()>.5?1:-1)}},i=0;i>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new a.init(n,e/2)}},u=s.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new a.init(n,e)}},f=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},p=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,s=4*i,c=o/s;c=e?t.ceil(c):t.max((0|c)-this._minBufferSize,0);var u=c*i,f=t.min(4*u,o);if(u){for(var p=0;p>>6-a%4*2;r[i>>>2]|=(s|c)<<24-i%4*8,i++}return o.create(r,i)}var n=t,r=n.lib,o=r.WordArray,i=n.enc;i.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var o=[],i=0;i>>2]>>>24-i%4*8&255,s=e[i+1>>>2]>>>24-(i+1)%4*8&255,c=e[i+2>>>2]>>>24-(i+2)%4*8&255,u=a<<16|s<<8|c,f=0;f<4&&i+.75*f>>6*(3-f)&63));var p=r.charAt(64);if(p)for(;o.length%4;)o.push(p);return o.join("")},parse:function(t){var n=t.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i>>8&16711935}var n=t,r=n.lib,o=r.WordArray,i=n.enc;i.Utf16=i.Utf16BE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o>>2]>>>16-o%4*8&65535;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>1]|=t.charCodeAt(r)<<16-r%2*16;return o.create(n,2*e)}};i.Utf16LE={stringify:function(t){for(var n=t.words,r=t.sigBytes,o=[],i=0;i>>2]>>>16-i%4*8&65535);o.push(String.fromCharCode(a))}return o.join("")},parse:function(t){for(var n=t.length,r=[],i=0;i>>1]|=e(t.charCodeAt(i)<<16-i%2*16);return o.create(r,2*n)}}}(),t.enc.Utf16})},{"./core":53}],56:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./sha1"),t("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.lib,r=n.Base,o=n.WordArray,i=e.algo,a=i.MD5,s=i.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=n.hasher.create(),i=o.create(),a=i.words,s=n.keySize,c=n.iterations;a.lengthr&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),a=this._iKey=e.clone(),s=o.words,c=a.words,u=0;u>>2]|=t[r]<<24-r%4*8;o.call(this,n,e)}else o.apply(this,arguments)};i.prototype=r}}(),t.lib.WordArray})},{"./core":53}],61:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){return function(e){function n(t,e,n,r,o,i,a){var s=t+(e&n|~e&r)+o+a;return(s<>>32-i)+e}function r(t,e,n,r,o,i,a){var s=t+(e&r|n&~r)+o+a;return(s<>>32-i)+e}function o(t,e,n,r,o,i,a){var s=t+(e^n^r)+o+a;return(s<>>32-i)+e}function i(t,e,n,r,o,i,a){var s=t+(n^(e|~r))+o+a;return(s<>>32-i)+e}var a=t,s=a.lib,c=s.WordArray,u=s.Hasher,f=a.algo,p=[];!function(){for(var t=0;t<64;t++)p[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=f.MD5=u.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var a=0;a<16;a++){var s=e+a,c=t[s];t[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var u=this._hash.words,f=t[e+0],l=t[e+1],h=t[e+2],d=t[e+3],m=t[e+4],y=t[e+5],v=t[e+6],g=t[e+7],b=t[e+8],_=t[e+9],w=t[e+10],x=t[e+11],k=t[e+12],B=t[e+13],S=t[e+14],C=t[e+15],A=u[0],F=u[1],I=u[2],T=u[3];A=n(A,F,I,T,f,7,p[0]),T=n(T,A,F,I,l,12,p[1]),I=n(I,T,A,F,h,17,p[2]),F=n(F,I,T,A,d,22,p[3]),A=n(A,F,I,T,m,7,p[4]),T=n(T,A,F,I,y,12,p[5]),I=n(I,T,A,F,v,17,p[6]),F=n(F,I,T,A,g,22,p[7]),A=n(A,F,I,T,b,7,p[8]),T=n(T,A,F,I,_,12,p[9]),I=n(I,T,A,F,w,17,p[10]),F=n(F,I,T,A,x,22,p[11]),A=n(A,F,I,T,k,7,p[12]),T=n(T,A,F,I,B,12,p[13]),I=n(I,T,A,F,S,17,p[14]),F=n(F,I,T,A,C,22,p[15]),A=r(A,F,I,T,l,5,p[16]),T=r(T,A,F,I,v,9,p[17]),I=r(I,T,A,F,x,14,p[18]),F=r(F,I,T,A,f,20,p[19]),A=r(A,F,I,T,y,5,p[20]),T=r(T,A,F,I,w,9,p[21]),I=r(I,T,A,F,C,14,p[22]),F=r(F,I,T,A,m,20,p[23]),A=r(A,F,I,T,_,5,p[24]),T=r(T,A,F,I,S,9,p[25]),I=r(I,T,A,F,d,14,p[26]),F=r(F,I,T,A,b,20,p[27]),A=r(A,F,I,T,B,5,p[28]),T=r(T,A,F,I,h,9,p[29]),I=r(I,T,A,F,g,14,p[30]),F=r(F,I,T,A,k,20,p[31]),A=o(A,F,I,T,y,4,p[32]),T=o(T,A,F,I,b,11,p[33]),I=o(I,T,A,F,x,16,p[34]),F=o(F,I,T,A,S,23,p[35]),A=o(A,F,I,T,l,4,p[36]),T=o(T,A,F,I,m,11,p[37]),I=o(I,T,A,F,g,16,p[38]),F=o(F,I,T,A,w,23,p[39]),A=o(A,F,I,T,B,4,p[40]),T=o(T,A,F,I,f,11,p[41]),I=o(I,T,A,F,d,16,p[42]),F=o(F,I,T,A,v,23,p[43]),A=o(A,F,I,T,_,4,p[44]),T=o(T,A,F,I,k,11,p[45]),I=o(I,T,A,F,C,16,p[46]),F=o(F,I,T,A,h,23,p[47]),A=i(A,F,I,T,f,6,p[48]),T=i(T,A,F,I,g,10,p[49]),I=i(I,T,A,F,S,15,p[50]),F=i(F,I,T,A,y,21,p[51]),A=i(A,F,I,T,k,6,p[52]),T=i(T,A,F,I,d,10,p[53]),I=i(I,T,A,F,w,15,p[54]),F=i(F,I,T,A,l,21,p[55]),A=i(A,F,I,T,b,6,p[56]),T=i(T,A,F,I,C,10,p[57]),I=i(I,T,A,F,v,15,p[58]),F=i(F,I,T,A,B,21,p[59]),A=i(A,F,I,T,m,6,p[60]),T=i(T,A,F,I,x,10,p[61]),I=i(I,T,A,F,h,15,p[62]),F=i(F,I,T,A,_,21,p[63]),u[0]=u[0]+A|0,u[1]=u[1]+F|0,u[2]=u[2]+I|0,u[3]=u[3]+T|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var i=e.floor(r/4294967296),a=r;n[(o+64>>>9<<4)+15]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),n[(o+64>>>9<<4)+14]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var f=c[u];c[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return s},clone:function(){var t=u.clone.call(this);return t._hash=this._hash.clone(),t}});a.MD5=u._createHelper(l),a.HmacMD5=u._createHmacHelper(l)}(Math),t.MD5})},{"./core":53}],62:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return t.mode.CFB=function(){function e(t,e,n,r){var o=this._iv;if(o){var i=o.slice(0);this._iv=void 0}else var i=this._prevBlock;r.encryptBlock(i,0);for(var a=0;a>24&255)){var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}function n(t){return 0===(t[0]=e(t[0]))&&(t[1]=e(t[1])),t}var r=t.lib.BlockCipherMode.extend(),o=r.Encryptor=r.extend({processBlock:function(t,e){var r=this._cipher,o=r.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0),n(a);var s=a.slice(0);r.encryptBlock(s,0);for(var c=0;c>>2]|=o<<24-i%4*8,t.sigBytes+=o},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Ansix923})},{"./cipher-core":52,"./core":53}],68:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return t.pad.Iso10126={pad:function(e,n){var r=4*n,o=r-e.sigBytes%r;e.concat(t.lib.WordArray.random(o-1)).concat(t.lib.WordArray.create([o<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Iso10126})},{"./cipher-core":52,"./core":53}],69:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return t.pad.Iso97971={pad:function(e,n){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,n)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971})},{"./cipher-core":52,"./core":53}],70:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})},{"./cipher-core":52,"./core":53}],71:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return t.pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){for(var e=t.words,n=t.sigBytes-1;!(e[n>>>2]>>>24-n%4*8&255);)n--;t.sigBytes=n+1}},t.pad.ZeroPadding})},{"./cipher-core":52,"./core":53}],72:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./sha1"),t("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.lib,r=n.Base,o=n.WordArray,i=e.algo,a=i.SHA1,s=i.HMAC,c=i.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=s.create(n.hasher,t),i=o.create(),a=o.create([1]),c=i.words,u=a.words,f=n.keySize,p=n.iterations;c.length>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(var n=0;n<8;n++){var r=t[n]+e[n],o=65535&r,i=r>>>16,a=((o*o>>>17)+o*i>>>15)+i*i,u=((4294901760&r)*r|0)+((65535&r)*r|0);c[n]=a^u}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var n=t,r=n.lib,o=r.StreamCipher,i=n.algo,a=[],s=[],c=[],u=i.RabbitLegacy=o.extend({_doReset:function(){var t=this._key.words,n=this.cfg.iv,r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],o=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)e.call(this);for(var i=0;i<8;i++)o[i]^=r[i+4&7];if(n){var a=n.words,s=a[0],c=a[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),p=u>>>16|4294901760&f,l=f<<16|65535&u;o[0]^=u,o[1]^=p,o[2]^=f,o[3]^=l,o[4]^=u,o[5]^=p,o[6]^=f,o[7]^=l;for(var i=0;i<4;i++)e.call(this)}},_doProcessBlock:function(t,n){var r=this._X;e.call(this),a[0]=r[0]^r[5]>>>16^r[3]<<16,a[1]=r[2]^r[7]>>>16^r[5]<<16,a[2]=r[4]^r[1]>>>16^r[7]<<16,a[3]=r[6]^r[3]>>>16^r[1]<<16;for(var o=0;o<4;o++)a[o]=16711935&(a[o]<<8|a[o]>>>24)|4278255360&(a[o]<<24|a[o]>>>8),t[n+o]^=a[o]},blockSize:4,ivSize:2});n.RabbitLegacy=o._createHelper(u)}(),t.RabbitLegacy})},{"./cipher-core":52,"./core":53,"./enc-base64":54,"./evpkdf":56,"./md5":61}],74:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./enc-base64"),t("./md5"),t("./evpkdf"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return function(){function e(){for(var t=this._X,e=this._C,n=0;n<8;n++)s[n]=e[n];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(var n=0;n<8;n++){var r=t[n]+e[n],o=65535&r,i=r>>>16,a=((o*o>>>17)+o*i>>>15)+i*i,u=((4294901760&r)*r|0)+((65535&r)*r|0);c[n]=a^u}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var n=t,r=n.lib,o=r.StreamCipher,i=n.algo,a=[],s=[],c=[],u=i.Rabbit=o.extend({_doReset:function(){for(var t=this._key.words,n=this.cfg.iv,r=0;r<4;r++)t[r]=16711935&(t[r]<<8|t[r]>>>24)|4278255360&(t[r]<<24|t[r]>>>8);var o=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var r=0;r<4;r++)e.call(this);for(var r=0;r<8;r++)i[r]^=o[r+4&7];if(n){var a=n.words,s=a[0],c=a[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),p=u>>>16|4294901760&f,l=f<<16|65535&u;i[0]^=u,i[1]^=p,i[2]^=f,i[3]^=l,i[4]^=u,i[5]^=p,i[6]^=f,i[7]^=l;for(var r=0;r<4;r++)e.call(this)}},_doProcessBlock:function(t,n){var r=this._X;e.call(this),a[0]=r[0]^r[5]>>>16^r[3]<<16,a[1]=r[2]^r[7]>>>16^r[5]<<16,a[2]=r[4]^r[1]>>>16^r[7]<<16,a[3]=r[6]^r[3]>>>16^r[1]<<16;for(var o=0;o<4;o++)a[o]=16711935&(a[o]<<8|a[o]>>>24)|4278255360&(a[o]<<24|a[o]>>>8),t[n+o]^=a[o]},blockSize:4,ivSize:2});n.Rabbit=o._createHelper(u)}(),t.Rabbit})},{"./cipher-core":52,"./core":53,"./enc-base64":54,"./evpkdf":56,"./md5":61}],75:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./enc-base64"),t("./md5"),t("./evpkdf"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return function(){function e(){for(var t=this._S,e=this._i,n=this._j,r=0,o=0;o<4;o++){e=(e+1)%256,n=(n+t[e])%256;var i=t[e];t[e]=t[n],t[n]=i,r|=t[(t[e]+t[n])%256]<<24-8*o}return this._i=e,this._j=n,r}var n=t,r=n.lib,o=r.StreamCipher,i=n.algo,a=i.RC4=o.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],o=0;o<256;o++)r[o]=o;for(var o=0,i=0;o<256;o++){var a=o%n,s=e[a>>>2]>>>24-a%4*8&255;i=(i+r[o]+s)%256;var c=r[o];r[o]=r[i],r[i]=c}this._i=this._j=0},_doProcessBlock:function(t,n){t[n]^=e.call(this)},keySize:8,ivSize:0});n.RC4=o._createHelper(a);var s=i.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)e.call(this)}});n.RC4Drop=o._createHelper(s)}(),t.RC4})},{"./cipher-core":52,"./core":53,"./enc-base64":54,"./evpkdf":56,"./md5":61}],76:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS); +}(this,function(t){return function(e){function n(t,e,n){return t^e^n}function r(t,e,n){return t&e|~t&n}function o(t,e,n){return(t|~e)^n}function i(t,e,n){return t&n|e&~n}function a(t,e,n){return t^(e|~n)}function s(t,e){return t<>>32-e}var c=t,u=c.lib,f=u.WordArray,p=u.Hasher,l=c.algo,h=f.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),d=f.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),m=f.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),y=f.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),v=f.create([0,1518500249,1859775393,2400959708,2840853838]),g=f.create([1352829926,1548603684,1836072691,2053994217,0]),b=l.RIPEMD160=p.extend({_doReset:function(){this._hash=f.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var c=0;c<16;c++){var u=e+c,f=t[u];t[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}var p,l,b,_,w,x,k,B,S,C,A=this._hash.words,F=v.words,I=g.words,T=h.words,D=d.words,P=m.words,O=y.words;x=p=A[0],k=l=A[1],B=b=A[2],S=_=A[3],C=w=A[4];for(var E,c=0;c<80;c+=1)E=p+t[e+T[c]]|0,E+=c<16?n(l,b,_)+F[0]:c<32?r(l,b,_)+F[1]:c<48?o(l,b,_)+F[2]:c<64?i(l,b,_)+F[3]:a(l,b,_)+F[4],E|=0,E=s(E,P[c]),E=E+w|0,p=w,w=_,_=s(b,10),b=l,l=E,E=x+t[e+D[c]]|0,E+=c<16?a(k,B,S)+I[0]:c<32?i(k,B,S)+I[1]:c<48?o(k,B,S)+I[2]:c<64?r(k,B,S)+I[3]:n(k,B,S)+I[4],E|=0,E=s(E,O[c]),E=E+C|0,x=C,C=S,S=s(B,10),B=k,k=E;E=A[1]+b+S|0,A[1]=A[2]+_+C|0,A[2]=A[3]+w+x|0,A[3]=A[4]+p+k|0,A[4]=A[0]+l+B|0,A[0]=E},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[(r+64>>>9<<4)+14]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var t=p.clone.call(this);return t._hash=this._hash.clone(),t}});c.RIPEMD160=p._createHelper(b),c.HmacRIPEMD160=p._createHmacHelper(b)}(Math),t.RIPEMD160})},{"./core":53}],77:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.lib,r=n.WordArray,o=n.Hasher,i=e.algo,a=[],s=i.SHA1=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],s=n[3],c=n[4],u=0;u<80;u++){if(u<16)a[u]=0|t[e+u];else{var f=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=f<<1|f>>>31}var p=(r<<5|r>>>27)+c+a[u];p+=u<20?(o&i|~o&s)+1518500249:u<40?(o^i^s)+1859775393:u<60?(o&i|o&s|i&s)-1894007588:(o^i^s)-899497514,c=s,s=i,i=o<<30|o>>>2,o=r,r=p}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),e[(r+64>>>9<<4)+15]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA1=o._createHelper(s),e.HmacSHA1=o._createHmacHelper(s)}(),t.SHA1})},{"./core":53}],78:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./sha256")):"function"==typeof define&&define.amd?define(["./core","./sha256"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.lib,r=n.WordArray,o=e.algo,i=o.SHA256,a=o.SHA224=i.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=i._doFinalize.call(this);return t.sigBytes-=4,t}});e.SHA224=i._createHelper(a),e.HmacSHA224=i._createHmacHelper(a)}(),t.SHA224})},{"./core":53,"./sha256":79}],79:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){return function(e){var n=t,r=n.lib,o=r.WordArray,i=r.Hasher,a=n.algo,s=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,o=0;o<64;)t(r)&&(o<8&&(s[o]=n(e.pow(r,.5))),c[o]=n(e.pow(r,1/3)),o++),r++}();var u=[],f=a.SHA256=i.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],f=n[5],p=n[6],l=n[7],h=0;h<64;h++){if(h<16)u[h]=0|t[e+h];else{var d=u[h-15],m=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,y=u[h-2],v=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;u[h]=m+u[h-7]+v+u[h-16]}var g=s&f^~s&p,b=r&o^r&i^o&i,_=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),x=l+w+g+c[h]+u[h],k=_+b;l=p,p=f,f=s,s=a+x|0,a=i,i=o,o=r,r=x+k|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+f|0,n[6]=n[6]+p|0,n[7]=n[7]+l|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[(o+64>>>9<<4)+14]=e.floor(r/4294967296),n[(o+64>>>9<<4)+15]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});n.SHA256=i._createHelper(f),n.HmacSHA256=i._createHmacHelper(f)}(Math),t.SHA256})},{"./core":53}],80:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],o):o(r.CryptoJS)}(this,function(t){return function(e){var n=t,r=n.lib,o=r.WordArray,i=r.Hasher,a=n.x64,s=a.Word,c=n.algo,u=[],f=[],p=[];!function(){for(var t=1,e=0,n=0;n<24;n++){u[t+5*e]=(n+1)*(n+2)/2%64;var r=e%5,o=(2*t+3*e)%5;t=r,e=o}for(var t=0;t<5;t++)for(var e=0;e<5;e++)f[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,a=0;a<24;a++){for(var c=0,l=0,h=0;h<7;h++){if(1&i){var d=(1<>>24)|4278255360&(i<<24|i>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8);var s=n[o];s.high^=a,s.low^=i}for(var c=0;c<24;c++){for(var h=0;h<5;h++){for(var d=0,m=0,y=0;y<5;y++){var s=n[h+5*y];d^=s.high,m^=s.low}var v=l[h];v.high=d,v.low=m}for(var h=0;h<5;h++)for(var g=l[(h+4)%5],b=l[(h+1)%5],_=b.high,w=b.low,d=g.high^(_<<1|w>>>31),m=g.low^(w<<1|_>>>31),y=0;y<5;y++){var s=n[h+5*y];s.high^=d,s.low^=m}for(var x=1;x<25;x++){var s=n[x],k=s.high,B=s.low,S=u[x];if(S<32)var d=k<>>32-S,m=B<>>32-S;else var d=B<>>64-S,m=k<>>64-S;var C=l[f[x]];C.high=d,C.low=m}var A=l[0],F=n[0];A.high=F.high,A.low=F.low;for(var h=0;h<5;h++)for(var y=0;y<5;y++){var x=h+5*y,s=n[x],I=l[x],T=l[(h+1)%5+5*y],D=l[(h+2)%5+5*y];s.high=I.high^~T.high&D.high,s.low=I.low^~T.low&D.low}var s=n[0],P=p[c];s.high^=P.high,s.low^=P.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(8*this._nDataBytes,8*t.sigBytes),i=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/i)*i>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,c=s/8,u=[],f=0;f>>24)|4278255360&(l<<24|l>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),u.push(h),u.push(l)}return new o.init(u,s)},clone:function(){for(var t=i.clone.call(this),e=t._state=this._state.slice(0),n=0;n<25;n++)e[n]=e[n].clone();return t}});n.SHA3=i._createHelper(h),n.HmacSHA3=i._createHmacHelper(h)}(Math),t.SHA3})},{"./core":53,"./x64-core":84}],81:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./x64-core"),t("./sha512")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./sha512"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.x64,r=n.Word,o=n.WordArray,i=e.algo,a=i.SHA512,s=i.SHA384=a.extend({_doReset:function(){this._hash=new o.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=16,t}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)}(),t.SHA384})},{"./core":53,"./sha512":82,"./x64-core":84}],82:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],o):o(r.CryptoJS)}(this,function(t){return function(){function e(){return a.create.apply(a,arguments)}var n=t,r=n.lib,o=r.Hasher,i=n.x64,a=i.Word,s=i.WordArray,c=n.algo,u=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],f=[];!function(){for(var t=0;t<80;t++)f[t]=e()}();var p=c.SHA512=o.extend({_doReset:function(){this._hash=new s.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],c=n[5],p=n[6],l=n[7],h=r.high,d=r.low,m=o.high,y=o.low,v=i.high,g=i.low,b=a.high,_=a.low,w=s.high,x=s.low,k=c.high,B=c.low,S=p.high,C=p.low,A=l.high,F=l.low,I=h,T=d,D=m,P=y,O=v,E=g,R=b,M=_,N=w,H=x,j=k,z=B,q=S,L=C,U=A,W=F,J=0;J<80;J++){var G=f[J];if(J<16)var X=G.high=0|t[e+2*J],K=G.low=0|t[e+2*J+1];else{var $=f[J-15],V=$.high,Z=$.low,Y=(V>>>1|Z<<31)^(V>>>8|Z<<24)^V>>>7,Q=(Z>>>1|V<<31)^(Z>>>8|V<<24)^(Z>>>7|V<<25),tt=f[J-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,ot=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),it=f[J-7],at=it.high,st=it.low,ct=f[J-16],ut=ct.high,ft=ct.low,K=Q+st,X=Y+at+(K>>>0>>0?1:0),K=K+ot,X=X+rt+(K>>>0>>0?1:0),K=K+ft,X=X+ut+(K>>>0>>0?1:0);G.high=X,G.low=K}var pt=N&j^~N&q,lt=H&z^~H&L,ht=I&D^I&O^D&O,dt=T&P^T&E^P&E,mt=(I>>>28|T<<4)^(I<<30|T>>>2)^(I<<25|T>>>7),yt=(T>>>28|I<<4)^(T<<30|I>>>2)^(T<<25|I>>>7),vt=(N>>>14|H<<18)^(N>>>18|H<<14)^(N<<23|H>>>9),gt=(H>>>14|N<<18)^(H>>>18|N<<14)^(H<<23|N>>>9),bt=u[J],_t=bt.high,wt=bt.low,xt=W+gt,kt=U+vt+(xt>>>0>>0?1:0),xt=xt+lt,kt=kt+pt+(xt>>>0>>0?1:0),xt=xt+wt,kt=kt+_t+(xt>>>0>>0?1:0),xt=xt+K,kt=kt+X+(xt>>>0>>0?1:0),Bt=yt+dt,St=mt+ht+(Bt>>>0>>0?1:0);U=q,W=L,q=j,L=z,j=N,z=H,H=M+xt|0,N=R+kt+(H>>>0>>0?1:0)|0,R=O,M=E,O=D,E=P,D=I,P=T,T=xt+Bt|0,I=kt+St+(T>>>0>>0?1:0)|0}d=r.low=d+T,r.high=h+I+(d>>>0>>0?1:0),y=o.low=y+P,o.high=m+D+(y>>>0

                                                          >>0?1:0),g=i.low=g+E,i.high=v+O+(g>>>0>>0?1:0),_=a.low=_+M,a.high=b+R+(_>>>0>>0?1:0),x=s.low=x+H,s.high=w+N+(x>>>0>>0?1:0),B=c.low=B+z,c.high=k+j+(B>>>0>>0?1:0),C=p.low=C+L,p.high=S+q+(C>>>0>>0?1:0),F=l.low=F+W,l.high=A+U+(F>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[(r+128>>>10<<5)+30]=Math.floor(n/4294967296),e[(r+128>>>10<<5)+31]=n,t.sigBytes=4*e.length,this._process();var o=this._hash.toX32();return o},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});n.SHA512=o._createHelper(p),n.HmacSHA512=o._createHmacHelper(p)}(),t.SHA512})},{"./core":53,"./x64-core":84}],83:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./enc-base64"),t("./md5"),t("./evpkdf"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return function(){function e(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<>>5]>>>31-o%32&1}for(var i=this._subKeys=[],a=0;a<16;a++){for(var s=i[a]=[],p=f[a],r=0;r<24;r++)s[r/6|0]|=n[(u[r]-1+p)%28]<<31-r%6,s[4+(r/6|0)]|=n[28+(u[r+24]-1+p)%28]<<31-r%6;s[0]=s[0]<<1|s[0]>>>31;for(var r=1;r<7;r++)s[r]=s[r]>>>4*(r-1)+3;s[7]=s[7]<<5|s[7]>>>27}for(var l=this._invSubKeys=[],r=0;r<16;r++)l[r]=i[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,r,o){this._lBlock=t[r],this._rBlock=t[r+1],e.call(this,4,252645135),e.call(this,16,65535),n.call(this,2,858993459),n.call(this,8,16711935),e.call(this,1,1431655765);for(var i=0;i<16;i++){for(var a=o[i],s=this._lBlock,c=this._rBlock,u=0,f=0;f<8;f++)u|=p[f][((c^a[f])&l[f])>>>0];this._lBlock=c,this._rBlock=s^u}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,e.call(this,1,1431655765),n.call(this,8,16711935),n.call(this,2,858993459),e.call(this,16,65535),e.call(this,4,252645135),t[r]=this._lBlock,t[r+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});r.DES=a._createHelper(h);var d=s.TripleDES=a.extend({_doReset:function(){var t=this._key,e=t.words;this._des1=h.createEncryptor(i.create(e.slice(0,2))),this._des2=h.createEncryptor(i.create(e.slice(2,4))),this._des3=h.createEncryptor(i.create(e.slice(4,6)))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});r.TripleDES=a._createHelper(d)}(),t.TripleDES})},{"./cipher-core":52,"./core":53,"./enc-base64":54,"./evpkdf":56,"./md5":61}],84:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){return function(e){var n=t,r=n.lib,o=r.Base,i=r.WordArray,a=n.x64={};a.Word=o.extend({init:function(t,e){this.high=t,this.low=e}}),a.WordArray=o.extend({init:function(t,n){t=this.words=t||[],n!=e?this.sigBytes=n:this.sigBytes=8*t.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;r=55296&&e<=56319&&o65535&&(e-=65536,o+=g(e>>>10&1023|55296),e=56320|1023&e),o+=g(e);return o}function i(t){if(t>=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function a(t,e){return g(t>>e&63|128)}function s(t){if(0==(4294967168&t))return g(t);var e="";return 0==(4294965248&t)?e=g(t>>6&31|192):0==(4294901760&t)?(i(t),e=g(t>>12&15|224),e+=a(t,6)):0==(4292870144&t)&&(e=g(t>>18&7|240),e+=a(t,12),e+=a(t,6)),e+=g(63&t|128)}function c(t){for(var e,n=r(t),o=n.length,i=-1,a="";++i=y)throw Error("Invalid byte index");var t=255&m[v];if(v++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function f(){var t,e,n,r,o;if(v>y)throw Error("Invalid byte index");if(v==y)return!1;if(t=255&m[v],v++,0==(128&t))return t;if(192==(224&t)){if(e=u(),o=(31&t)<<6|e,o>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){if(e=u(),n=u(),o=(15&t)<<12|e<<6|n,o>=2048)return i(o),o;throw Error("Invalid continuation byte")}if(240==(248&t)&&(e=u(),n=u(),r=u(),o=(7&t)<<18|e<<12|n<<6|r,o>=65536&&o<=1114111))return o;throw Error("Invalid UTF-8 detected")}function p(t){m=r(t),y=m.length,v=0;for(var e,n=[];(e=f())!==!1;)n.push(e);return o(n)}var l="object"==typeof n&&n,h="object"==typeof e&&e&&e.exports==l&&e,d="object"==typeof global&&global;d.global!==d&&d.window!==d||(t=d);var m,y,v,g=String.fromCharCode,b={version:"2.1.2",encode:c,decode:p};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return b});else if(l&&!l.nodeType)if(h)h.exports=b;else{var _={},w=_.hasOwnProperty;for(var x in b)w.call(b,x)&&(l[x]=b[x])}else t.utf8=b}(this)},{}],86:[function(t,e,n){e.exports=XMLHttpRequest},{}],"bignumber.js":[function(t,e,n){"use strict";e.exports=BigNumber},{}],web3:[function(t,e,n){var r=t("./lib/web3");"undefined"!=typeof window&&"undefined"==typeof window.Web3&&(window.Web3=r),e.exports=r},{"./lib/web3":22}]},{},["web3"]); \ No newline at end of file diff --git a/bower_components/web3/dist/web3.js b/bower_components/web3/dist/web3.js new file mode 100644 index 00000000..416e7971 --- /dev/null +++ b/bower_components/web3/dist/web3.js @@ -0,0 +1,16285 @@ +require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o. +*/ +/** + * @file coder.js + * @author Marek Kotewicz + * @date 2015 + */ + +var f = require('./formatters'); + +var SolidityTypeAddress = require('./address'); +var SolidityTypeBool = require('./bool'); +var SolidityTypeInt = require('./int'); +var SolidityTypeUInt = require('./uint'); +var SolidityTypeDynamicBytes = require('./dynamicbytes'); +var SolidityTypeString = require('./string'); +var SolidityTypeReal = require('./real'); +var SolidityTypeUReal = require('./ureal'); +var SolidityTypeBytes = require('./bytes'); + +var isDynamic = function (solidityType, type) { + return solidityType.isDynamicType(type) || + solidityType.isDynamicArray(type); +}; + +/** + * SolidityCoder prototype should be used to encode/decode solidity params of any type + */ +var SolidityCoder = function (types) { + this._types = types; +}; + +/** + * This method should be used to transform type to SolidityType + * + * @method _requireType + * @param {String} type + * @returns {SolidityType} + * @throws {Error} throws if no matching type is found + */ +SolidityCoder.prototype._requireType = function (type) { + var solidityType = this._types.filter(function (t) { + return t.isType(type); + })[0]; + + if (!solidityType) { + throw Error('invalid solidity type!: ' + type); + } + + return solidityType; +}; + +/** + * Should be used to encode plain param + * + * @method encodeParam + * @param {String} type + * @param {Object} plain param + * @return {String} encoded plain param + */ +SolidityCoder.prototype.encodeParam = function (type, param) { + return this.encodeParams([type], [param]); +}; + +/** + * Should be used to encode list of params + * + * @method encodeParams + * @param {Array} types + * @param {Array} params + * @return {String} encoded list of params + */ +SolidityCoder.prototype.encodeParams = function (types, params) { + var solidityTypes = this.getSolidityTypes(types); + + var encodeds = solidityTypes.map(function (solidityType, index) { + return solidityType.encode(params[index], types[index]); + }); + + var dynamicOffset = solidityTypes.reduce(function (acc, solidityType, index) { + var staticPartLength = solidityType.staticPartLength(types[index]); + var roundedStaticPartLength = Math.floor((staticPartLength + 31) / 32) * 32; + + return acc + (isDynamic(solidityTypes[index], types[index]) ? + 32 : + roundedStaticPartLength); + }, 0); + + var result = this.encodeMultiWithOffset(types, solidityTypes, encodeds, dynamicOffset); + + return result; +}; + +SolidityCoder.prototype.encodeMultiWithOffset = function (types, solidityTypes, encodeds, dynamicOffset) { + var result = ""; + var self = this; + + types.forEach(function (type, i) { + if (isDynamic(solidityTypes[i], types[i])) { + result += f.formatInputInt(dynamicOffset).encode(); + var e = self.encodeWithOffset(types[i], solidityTypes[i], encodeds[i], dynamicOffset); + dynamicOffset += e.length / 2; + } else { + // don't add length to dynamicOffset. it's already counted + result += self.encodeWithOffset(types[i], solidityTypes[i], encodeds[i], dynamicOffset); + } + + // TODO: figure out nested arrays + }); + + types.forEach(function (type, i) { + if (isDynamic(solidityTypes[i], types[i])) { + var e = self.encodeWithOffset(types[i], solidityTypes[i], encodeds[i], dynamicOffset); + dynamicOffset += e.length / 2; + result += e; + } + }); + return result; +}; + +// TODO: refactor whole encoding! +SolidityCoder.prototype.encodeWithOffset = function (type, solidityType, encoded, offset) { + var self = this; + if (solidityType.isDynamicArray(type)) { + return (function () { + // offset was already set + var nestedName = solidityType.nestedName(type); + var nestedStaticPartLength = solidityType.staticPartLength(nestedName); + var result = encoded[0]; + + (function () { + var previousLength = 2; // in int + if (solidityType.isDynamicArray(nestedName)) { + for (var i = 1; i < encoded.length; i++) { + previousLength += +(encoded[i - 1])[0] || 0; + result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode(); + } + } + })(); + + // first element is length, skip it + (function () { + for (var i = 0; i < encoded.length - 1; i++) { + var additionalOffset = result / 2; + result += self.encodeWithOffset(nestedName, solidityType, encoded[i + 1], offset + additionalOffset); + } + })(); + + return result; + })(); + + } else if (solidityType.isStaticArray(type)) { + return (function () { + var nestedName = solidityType.nestedName(type); + var nestedStaticPartLength = solidityType.staticPartLength(nestedName); + var result = ""; + + + if (solidityType.isDynamicArray(nestedName)) { + (function () { + var previousLength = 0; // in int + for (var i = 0; i < encoded.length; i++) { + // calculate length of previous item + previousLength += +(encoded[i - 1] || [])[0] || 0; + result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode(); + } + })(); + } + + (function () { + for (var i = 0; i < encoded.length; i++) { + var additionalOffset = result / 2; + result += self.encodeWithOffset(nestedName, solidityType, encoded[i], offset + additionalOffset); + } + })(); + + return result; + })(); + } + + return encoded; +}; + +/** + * Should be used to decode bytes to plain param + * + * @method decodeParam + * @param {String} type + * @param {String} bytes + * @return {Object} plain param + */ +SolidityCoder.prototype.decodeParam = function (type, bytes) { + return this.decodeParams([type], bytes)[0]; +}; + +/** + * Should be used to decode list of params + * + * @method decodeParam + * @param {Array} types + * @param {String} bytes + * @return {Array} array of plain params + */ +SolidityCoder.prototype.decodeParams = function (types, bytes) { + var solidityTypes = this.getSolidityTypes(types); + var offsets = this.getOffsets(types, solidityTypes); + + return solidityTypes.map(function (solidityType, index) { + return solidityType.decode(bytes, offsets[index], types[index], index); + }); +}; + +SolidityCoder.prototype.getOffsets = function (types, solidityTypes) { + var lengths = solidityTypes.map(function (solidityType, index) { + return solidityType.staticPartLength(types[index]); + }); + + for (var i = 1; i < lengths.length; i++) { + // sum with length of previous element + lengths[i] += lengths[i - 1]; + } + + return lengths.map(function (length, index) { + // remove the current length, so the length is sum of previous elements + var staticPartLength = solidityTypes[index].staticPartLength(types[index]); + return length - staticPartLength; + }); +}; + +SolidityCoder.prototype.getSolidityTypes = function (types) { + var self = this; + return types.map(function (type) { + return self._requireType(type); + }); +}; + +var coder = new SolidityCoder([ + new SolidityTypeAddress(), + new SolidityTypeBool(), + new SolidityTypeInt(), + new SolidityTypeUInt(), + new SolidityTypeDynamicBytes(), + new SolidityTypeBytes(), + new SolidityTypeString(), + new SolidityTypeReal(), + new SolidityTypeUReal() +]); + +module.exports = coder; + +},{"./address":4,"./bool":5,"./bytes":6,"./dynamicbytes":8,"./formatters":9,"./int":10,"./real":12,"./string":13,"./uint":15,"./ureal":16}],8:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +var SolidityTypeDynamicBytes = function () { + this._inputFormatter = f.formatInputDynamicBytes; + this._outputFormatter = f.formatOutputDynamicBytes; +}; + +SolidityTypeDynamicBytes.prototype = new SolidityType({}); +SolidityTypeDynamicBytes.prototype.constructor = SolidityTypeDynamicBytes; + +SolidityTypeDynamicBytes.prototype.isType = function (name) { + return !!name.match(/^bytes(\[([0-9]*)\])*$/); +}; + +SolidityTypeDynamicBytes.prototype.isDynamicType = function () { + return true; +}; + +module.exports = SolidityTypeDynamicBytes; + +},{"./formatters":9,"./type":14}],9:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file formatters.js + * @author Marek Kotewicz + * @date 2015 + */ + +var BigNumber = require('bignumber.js'); +var utils = require('../utils/utils'); +var c = require('../utils/config'); +var SolidityParam = require('./param'); + + +/** + * Formats input value to byte representation of int + * If value is negative, return it's two's complement + * If the value is floating point, round it down + * + * @method formatInputInt + * @param {String|Number|BigNumber} value that needs to be formatted + * @returns {SolidityParam} + */ +var formatInputInt = function (value) { + BigNumber.config(c.ETH_BIGNUMBER_ROUNDING_MODE); + var result = utils.padLeft(utils.toTwosComplement(value).toString(16), 64); + return new SolidityParam(result); +}; + +/** + * Formats input bytes + * + * @method formatInputBytes + * @param {String} + * @returns {SolidityParam} + */ +var formatInputBytes = function (value) { + var result = utils.toHex(value).substr(2); + var l = Math.floor((result.length + 63) / 64); + result = utils.padRight(result, l * 64); + return new SolidityParam(result); +}; + +/** + * Formats input bytes + * + * @method formatDynamicInputBytes + * @param {String} + * @returns {SolidityParam} + */ +var formatInputDynamicBytes = function (value) { + var result = utils.toHex(value).substr(2); + var length = result.length / 2; + var l = Math.floor((result.length + 63) / 64); + result = utils.padRight(result, l * 64); + return new SolidityParam(formatInputInt(length).value + result); +}; + +/** + * Formats input value to byte representation of string + * + * @method formatInputString + * @param {String} + * @returns {SolidityParam} + */ +var formatInputString = function (value) { + var result = utils.fromUtf8(value).substr(2); + var length = result.length / 2; + var l = Math.floor((result.length + 63) / 64); + result = utils.padRight(result, l * 64); + return new SolidityParam(formatInputInt(length).value + result); +}; + +/** + * Formats input value to byte representation of bool + * + * @method formatInputBool + * @param {Boolean} + * @returns {SolidityParam} + */ +var formatInputBool = function (value) { + var result = '000000000000000000000000000000000000000000000000000000000000000' + (value ? '1' : '0'); + return new SolidityParam(result); +}; + +/** + * Formats input value to byte representation of real + * Values are multiplied by 2^m and encoded as integers + * + * @method formatInputReal + * @param {String|Number|BigNumber} + * @returns {SolidityParam} + */ +var formatInputReal = function (value) { + return formatInputInt(new BigNumber(value).times(new BigNumber(2).pow(128))); +}; + +/** + * Check if input value is negative + * + * @method signedIsNegative + * @param {String} value is hex format + * @returns {Boolean} true if it is negative, otherwise false + */ +var signedIsNegative = function (value) { + return (new BigNumber(value.substr(0, 1), 16).toString(2).substr(0, 1)) === '1'; +}; + +/** + * Formats right-aligned output bytes to int + * + * @method formatOutputInt + * @param {SolidityParam} param + * @returns {BigNumber} right-aligned output bytes formatted to big number + */ +var formatOutputInt = function (param) { + var value = param.staticPart() || "0"; + + // check if it's negative number + // it it is, return two's complement + if (signedIsNegative(value)) { + return new BigNumber(value, 16).minus(new BigNumber('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16)).minus(1); + } + return new BigNumber(value, 16); +}; + +/** + * Formats right-aligned output bytes to uint + * + * @method formatOutputUInt + * @param {SolidityParam} + * @returns {BigNumeber} right-aligned output bytes formatted to uint + */ +var formatOutputUInt = function (param) { + var value = param.staticPart() || "0"; + return new BigNumber(value, 16); +}; + +/** + * Formats right-aligned output bytes to real + * + * @method formatOutputReal + * @param {SolidityParam} + * @returns {BigNumber} input bytes formatted to real + */ +var formatOutputReal = function (param) { + return formatOutputInt(param).dividedBy(new BigNumber(2).pow(128)); +}; + +/** + * Formats right-aligned output bytes to ureal + * + * @method formatOutputUReal + * @param {SolidityParam} + * @returns {BigNumber} input bytes formatted to ureal + */ +var formatOutputUReal = function (param) { + return formatOutputUInt(param).dividedBy(new BigNumber(2).pow(128)); +}; + +/** + * Should be used to format output bool + * + * @method formatOutputBool + * @param {SolidityParam} + * @returns {Boolean} right-aligned input bytes formatted to bool + */ +var formatOutputBool = function (param) { + return param.staticPart() === '0000000000000000000000000000000000000000000000000000000000000001' ? true : false; +}; + +/** + * Should be used to format output bytes + * + * @method formatOutputBytes + * @param {SolidityParam} left-aligned hex representation of string + * @param {String} name type name + * @returns {String} hex string + */ +var formatOutputBytes = function (param, name) { + var matches = name.match(/^bytes([0-9]*)/); + var size = parseInt(matches[1]); + return '0x' + param.staticPart().slice(0, 2 * size); +}; + +/** + * Should be used to format output bytes + * + * @method formatOutputDynamicBytes + * @param {SolidityParam} left-aligned hex representation of string + * @returns {String} hex string + */ +var formatOutputDynamicBytes = function (param) { + var length = (new BigNumber(param.dynamicPart().slice(0, 64), 16)).toNumber() * 2; + return '0x' + param.dynamicPart().substr(64, length); +}; + +/** + * Should be used to format output string + * + * @method formatOutputString + * @param {SolidityParam} left-aligned hex representation of string + * @returns {String} ascii string + */ +var formatOutputString = function (param) { + var length = (new BigNumber(param.dynamicPart().slice(0, 64), 16)).toNumber() * 2; + return utils.toUtf8(param.dynamicPart().substr(64, length)); +}; + +/** + * Should be used to format output address + * + * @method formatOutputAddress + * @param {SolidityParam} right-aligned input bytes + * @returns {String} address + */ +var formatOutputAddress = function (param) { + var value = param.staticPart(); + return "0x" + value.slice(value.length - 40, value.length); +}; + +module.exports = { + formatInputInt: formatInputInt, + formatInputBytes: formatInputBytes, + formatInputDynamicBytes: formatInputDynamicBytes, + formatInputString: formatInputString, + formatInputBool: formatInputBool, + formatInputReal: formatInputReal, + formatOutputInt: formatOutputInt, + formatOutputUInt: formatOutputUInt, + formatOutputReal: formatOutputReal, + formatOutputUReal: formatOutputUReal, + formatOutputBool: formatOutputBool, + formatOutputBytes: formatOutputBytes, + formatOutputDynamicBytes: formatOutputDynamicBytes, + formatOutputString: formatOutputString, + formatOutputAddress: formatOutputAddress +}; + +},{"../utils/config":18,"../utils/utils":20,"./param":11,"bignumber.js":"bignumber.js"}],10:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +/** + * SolidityTypeInt is a prootype that represents int type + * It matches: + * int + * int[] + * int[4] + * int[][] + * int[3][] + * int[][6][], ... + * int32 + * int64[] + * int8[4] + * int256[][] + * int[3][] + * int64[][6][], ... + */ +var SolidityTypeInt = function () { + this._inputFormatter = f.formatInputInt; + this._outputFormatter = f.formatOutputInt; +}; + +SolidityTypeInt.prototype = new SolidityType({}); +SolidityTypeInt.prototype.constructor = SolidityTypeInt; + +SolidityTypeInt.prototype.isType = function (name) { + return !!name.match(/^int([0-9]*)?(\[([0-9]*)\])*$/); +}; + +module.exports = SolidityTypeInt; + +},{"./formatters":9,"./type":14}],11:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file param.js + * @author Marek Kotewicz + * @date 2015 + */ + +var utils = require('../utils/utils'); + +/** + * SolidityParam object prototype. + * Should be used when encoding, decoding solidity bytes + */ +var SolidityParam = function (value, offset) { + this.value = value || ''; + this.offset = offset; // offset in bytes +}; + +/** + * This method should be used to get length of params's dynamic part + * + * @method dynamicPartLength + * @returns {Number} length of dynamic part (in bytes) + */ +SolidityParam.prototype.dynamicPartLength = function () { + return this.dynamicPart().length / 2; +}; + +/** + * This method should be used to create copy of solidity param with different offset + * + * @method withOffset + * @param {Number} offset length in bytes + * @returns {SolidityParam} new solidity param with applied offset + */ +SolidityParam.prototype.withOffset = function (offset) { + return new SolidityParam(this.value, offset); +}; + +/** + * This method should be used to combine solidity params together + * eg. when appending an array + * + * @method combine + * @param {SolidityParam} param with which we should combine + * @param {SolidityParam} result of combination + */ +SolidityParam.prototype.combine = function (param) { + return new SolidityParam(this.value + param.value); +}; + +/** + * This method should be called to check if param has dynamic size. + * If it has, it returns true, otherwise false + * + * @method isDynamic + * @returns {Boolean} + */ +SolidityParam.prototype.isDynamic = function () { + return this.offset !== undefined; +}; + +/** + * This method should be called to transform offset to bytes + * + * @method offsetAsBytes + * @returns {String} bytes representation of offset + */ +SolidityParam.prototype.offsetAsBytes = function () { + return !this.isDynamic() ? '' : utils.padLeft(utils.toTwosComplement(this.offset).toString(16), 64); +}; + +/** + * This method should be called to get static part of param + * + * @method staticPart + * @returns {String} offset if it is a dynamic param, otherwise value + */ +SolidityParam.prototype.staticPart = function () { + if (!this.isDynamic()) { + return this.value; + } + return this.offsetAsBytes(); +}; + +/** + * This method should be called to get dynamic part of param + * + * @method dynamicPart + * @returns {String} returns a value if it is a dynamic param, otherwise empty string + */ +SolidityParam.prototype.dynamicPart = function () { + return this.isDynamic() ? this.value : ''; +}; + +/** + * This method should be called to encode param + * + * @method encode + * @returns {String} + */ +SolidityParam.prototype.encode = function () { + return this.staticPart() + this.dynamicPart(); +}; + +/** + * This method should be called to encode array of params + * + * @method encodeList + * @param {Array[SolidityParam]} params + * @returns {String} + */ +SolidityParam.encodeList = function (params) { + + // updating offsets + var totalOffset = params.length * 32; + var offsetParams = params.map(function (param) { + if (!param.isDynamic()) { + return param; + } + var offset = totalOffset; + totalOffset += param.dynamicPartLength(); + return param.withOffset(offset); + }); + + // encode everything! + return offsetParams.reduce(function (result, param) { + return result + param.dynamicPart(); + }, offsetParams.reduce(function (result, param) { + return result + param.staticPart(); + }, '')); +}; + + + +module.exports = SolidityParam; + + +},{"../utils/utils":20}],12:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +/** + * SolidityTypeReal is a prootype that represents real type + * It matches: + * real + * real[] + * real[4] + * real[][] + * real[3][] + * real[][6][], ... + * real32 + * real64[] + * real8[4] + * real256[][] + * real[3][] + * real64[][6][], ... + */ +var SolidityTypeReal = function () { + this._inputFormatter = f.formatInputReal; + this._outputFormatter = f.formatOutputReal; +}; + +SolidityTypeReal.prototype = new SolidityType({}); +SolidityTypeReal.prototype.constructor = SolidityTypeReal; + +SolidityTypeReal.prototype.isType = function (name) { + return !!name.match(/real([0-9]*)?(\[([0-9]*)\])?/); +}; + +module.exports = SolidityTypeReal; + +},{"./formatters":9,"./type":14}],13:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +var SolidityTypeString = function () { + this._inputFormatter = f.formatInputString; + this._outputFormatter = f.formatOutputString; +}; + +SolidityTypeString.prototype = new SolidityType({}); +SolidityTypeString.prototype.constructor = SolidityTypeString; + +SolidityTypeString.prototype.isType = function (name) { + return !!name.match(/^string(\[([0-9]*)\])*$/); +}; + +SolidityTypeString.prototype.isDynamicType = function () { + return true; +}; + +module.exports = SolidityTypeString; + +},{"./formatters":9,"./type":14}],14:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityParam = require('./param'); + +/** + * SolidityType prototype is used to encode/decode solidity params of certain type + */ +var SolidityType = function (config) { + this._inputFormatter = config.inputFormatter; + this._outputFormatter = config.outputFormatter; +}; + +/** + * Should be used to determine if this SolidityType do match given name + * + * @method isType + * @param {String} name + * @return {Bool} true if type match this SolidityType, otherwise false + */ +SolidityType.prototype.isType = function (name) { + throw "this method should be overrwritten for type " + name; +}; + +/** + * Should be used to determine what is the length of static part in given type + * + * @method staticPartLength + * @param {String} name + * @return {Number} length of static part in bytes + */ +SolidityType.prototype.staticPartLength = function (name) { + // If name isn't an array then treat it like a single element array. + return (this.nestedTypes(name) || ['[1]']) + .map(function (type) { + // the length of the nested array + return parseInt(type.slice(1, -1), 10) || 1; + }) + .reduce(function (previous, current) { + return previous * current; + // all basic types are 32 bytes long + }, 32); +}; + +/** + * Should be used to determine if type is dynamic array + * eg: + * "type[]" => true + * "type[4]" => false + * + * @method isDynamicArray + * @param {String} name + * @return {Bool} true if the type is dynamic array + */ +SolidityType.prototype.isDynamicArray = function (name) { + var nestedTypes = this.nestedTypes(name); + return !!nestedTypes && !nestedTypes[nestedTypes.length - 1].match(/[0-9]{1,}/g); +}; + +/** + * Should be used to determine if type is static array + * eg: + * "type[]" => false + * "type[4]" => true + * + * @method isStaticArray + * @param {String} name + * @return {Bool} true if the type is static array + */ +SolidityType.prototype.isStaticArray = function (name) { + var nestedTypes = this.nestedTypes(name); + return !!nestedTypes && !!nestedTypes[nestedTypes.length - 1].match(/[0-9]{1,}/g); +}; + +/** + * Should return length of static array + * eg. + * "int[32]" => 32 + * "int256[14]" => 14 + * "int[2][3]" => 3 + * "int" => 1 + * "int[1]" => 1 + * "int[]" => 1 + * + * @method staticArrayLength + * @param {String} name + * @return {Number} static array length + */ +SolidityType.prototype.staticArrayLength = function (name) { + var nestedTypes = this.nestedTypes(name); + if (nestedTypes) { + return parseInt(nestedTypes[nestedTypes.length - 1].match(/[0-9]{1,}/g) || 1); + } + return 1; +}; + +/** + * Should return nested type + * eg. + * "int[32]" => "int" + * "int256[14]" => "int256" + * "int[2][3]" => "int[2]" + * "int" => "int" + * "int[]" => "int" + * + * @method nestedName + * @param {String} name + * @return {String} nested name + */ +SolidityType.prototype.nestedName = function (name) { + // remove last [] in name + var nestedTypes = this.nestedTypes(name); + if (!nestedTypes) { + return name; + } + + return name.substr(0, name.length - nestedTypes[nestedTypes.length - 1].length); +}; + +/** + * Should return true if type has dynamic size by default + * such types are "string", "bytes" + * + * @method isDynamicType + * @param {String} name + * @return {Bool} true if is dynamic, otherwise false + */ +SolidityType.prototype.isDynamicType = function () { + return false; +}; + +/** + * Should return array of nested types + * eg. + * "int[2][3][]" => ["[2]", "[3]", "[]"] + * "int[] => ["[]"] + * "int" => null + * + * @method nestedTypes + * @param {String} name + * @return {Array} array of nested types + */ +SolidityType.prototype.nestedTypes = function (name) { + // return list of strings eg. "[]", "[3]", "[]", "[2]" + return name.match(/(\[[0-9]*\])/g); +}; + +/** + * Should be used to encode the value + * + * @method encode + * @param {Object} value + * @param {String} name + * @return {String} encoded value + */ +SolidityType.prototype.encode = function (value, name) { + var self = this; + if (this.isDynamicArray(name)) { + + return (function () { + var length = value.length; // in int + var nestedName = self.nestedName(name); + + var result = []; + result.push(f.formatInputInt(length).encode()); + + value.forEach(function (v) { + result.push(self.encode(v, nestedName)); + }); + + return result; + })(); + + } else if (this.isStaticArray(name)) { + + return (function () { + var length = self.staticArrayLength(name); // in int + var nestedName = self.nestedName(name); + + var result = []; + for (var i = 0; i < length; i++) { + result.push(self.encode(value[i], nestedName)); + } + + return result; + })(); + + } + + return this._inputFormatter(value, name).encode(); +}; + +/** + * Should be used to decode value from bytes + * + * @method decode + * @param {String} bytes + * @param {Number} offset in bytes + * @param {String} name type name + * @returns {Object} decoded value + */ +SolidityType.prototype.decode = function (bytes, offset, name) { + var self = this; + + if (this.isDynamicArray(name)) { + + return (function () { + var arrayOffset = parseInt('0x' + bytes.substr(offset * 2, 64)); // in bytes + var length = parseInt('0x' + bytes.substr(arrayOffset * 2, 64)); // in int + var arrayStart = arrayOffset + 32; // array starts after length; // in bytes + + var nestedName = self.nestedName(name); + var nestedStaticPartLength = self.staticPartLength(nestedName); // in bytes + var roundedNestedStaticPartLength = Math.floor((nestedStaticPartLength + 31) / 32) * 32; + var result = []; + + for (var i = 0; i < length * roundedNestedStaticPartLength; i += roundedNestedStaticPartLength) { + result.push(self.decode(bytes, arrayStart + i, nestedName)); + } + + return result; + })(); + + } else if (this.isStaticArray(name)) { + + return (function () { + var length = self.staticArrayLength(name); // in int + var arrayStart = offset; // in bytes + + var nestedName = self.nestedName(name); + var nestedStaticPartLength = self.staticPartLength(nestedName); // in bytes + var roundedNestedStaticPartLength = Math.floor((nestedStaticPartLength + 31) / 32) * 32; + var result = []; + + for (var i = 0; i < length * roundedNestedStaticPartLength; i += roundedNestedStaticPartLength) { + result.push(self.decode(bytes, arrayStart + i, nestedName)); + } + + return result; + })(); + } else if (this.isDynamicType(name)) { + + return (function () { + var dynamicOffset = parseInt('0x' + bytes.substr(offset * 2, 64)); // in bytes + var length = parseInt('0x' + bytes.substr(dynamicOffset * 2, 64)); // in bytes + var roundedLength = Math.floor((length + 31) / 32); // in int + var param = new SolidityParam(bytes.substr(dynamicOffset * 2, ( 1 + roundedLength) * 64), 0); + return self._outputFormatter(param, name); + })(); + } + + var length = this.staticPartLength(name); + var param = new SolidityParam(bytes.substr(offset * 2, length * 2)); + return this._outputFormatter(param, name); +}; + +module.exports = SolidityType; + +},{"./formatters":9,"./param":11}],15:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +/** + * SolidityTypeUInt is a prootype that represents uint type + * It matches: + * uint + * uint[] + * uint[4] + * uint[][] + * uint[3][] + * uint[][6][], ... + * uint32 + * uint64[] + * uint8[4] + * uint256[][] + * uint[3][] + * uint64[][6][], ... + */ +var SolidityTypeUInt = function () { + this._inputFormatter = f.formatInputInt; + this._outputFormatter = f.formatOutputUInt; +}; + +SolidityTypeUInt.prototype = new SolidityType({}); +SolidityTypeUInt.prototype.constructor = SolidityTypeUInt; + +SolidityTypeUInt.prototype.isType = function (name) { + return !!name.match(/^uint([0-9]*)?(\[([0-9]*)\])*$/); +}; + +module.exports = SolidityTypeUInt; + +},{"./formatters":9,"./type":14}],16:[function(require,module,exports){ +var f = require('./formatters'); +var SolidityType = require('./type'); + +/** + * SolidityTypeUReal is a prootype that represents ureal type + * It matches: + * ureal + * ureal[] + * ureal[4] + * ureal[][] + * ureal[3][] + * ureal[][6][], ... + * ureal32 + * ureal64[] + * ureal8[4] + * ureal256[][] + * ureal[3][] + * ureal64[][6][], ... + */ +var SolidityTypeUReal = function () { + this._inputFormatter = f.formatInputReal; + this._outputFormatter = f.formatOutputUReal; +}; + +SolidityTypeUReal.prototype = new SolidityType({}); +SolidityTypeUReal.prototype.constructor = SolidityTypeUReal; + +SolidityTypeUReal.prototype.isType = function (name) { + return !!name.match(/^ureal([0-9]*)?(\[([0-9]*)\])*$/); +}; + +module.exports = SolidityTypeUReal; + +},{"./formatters":9,"./type":14}],17:[function(require,module,exports){ +'use strict'; + +// go env doesn't have and need XMLHttpRequest +if (typeof XMLHttpRequest === 'undefined') { + exports.XMLHttpRequest = {}; +} else { + exports.XMLHttpRequest = XMLHttpRequest; // jshint ignore:line +} + + +},{}],18:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file config.js + * @authors: + * Marek Kotewicz + * @date 2015 + */ + +/** + * Utils + * + * @module utils + */ + +/** + * Utility functions + * + * @class [utils] config + * @constructor + */ + + +/// required to define ETH_BIGNUMBER_ROUNDING_MODE +var BigNumber = require('bignumber.js'); + +var ETH_UNITS = [ + 'wei', + 'kwei', + 'Mwei', + 'Gwei', + 'szabo', + 'finney', + 'femtoether', + 'picoether', + 'nanoether', + 'microether', + 'milliether', + 'nano', + 'micro', + 'milli', + 'ether', + 'grand', + 'Mether', + 'Gether', + 'Tether', + 'Pether', + 'Eether', + 'Zether', + 'Yether', + 'Nether', + 'Dether', + 'Vether', + 'Uether' +]; + +module.exports = { + ETH_PADDING: 32, + ETH_SIGNATURE_LENGTH: 4, + ETH_UNITS: ETH_UNITS, + ETH_BIGNUMBER_ROUNDING_MODE: { ROUNDING_MODE: BigNumber.ROUND_DOWN }, + ETH_POLLING_TIMEOUT: 1000/2, + defaultBlock: 'latest', + defaultAccount: undefined +}; + + +},{"bignumber.js":"bignumber.js"}],19:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file sha3.js + * @author Marek Kotewicz + * @date 2015 + */ + +var CryptoJS = require('crypto-js'); +var sha3 = require('crypto-js/sha3'); + +module.exports = function (value, options) { + if (options && options.encoding === 'hex') { + if (value.length > 2 && value.substr(0, 2) === '0x') { + value = value.substr(2); + } + value = CryptoJS.enc.Hex.parse(value); + } + + return sha3(value, { + outputLength: 256 + }).toString(); +}; + + +},{"crypto-js":58,"crypto-js/sha3":79}],20:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file utils.js + * @author Marek Kotewicz + * @date 2015 + */ + +/** + * Utils + * + * @module utils + */ + +/** + * Utility functions + * + * @class [utils] utils + * @constructor + */ + + +var BigNumber = require('bignumber.js'); +var sha3 = require('./sha3.js'); +var utf8 = require('utf8'); + +var unitMap = { + 'noether': '0', + 'wei': '1', + 'kwei': '1000', + 'Kwei': '1000', + 'babbage': '1000', + 'femtoether': '1000', + 'mwei': '1000000', + 'Mwei': '1000000', + 'lovelace': '1000000', + 'picoether': '1000000', + 'gwei': '1000000000', + 'Gwei': '1000000000', + 'shannon': '1000000000', + 'nanoether': '1000000000', + 'nano': '1000000000', + 'szabo': '1000000000000', + 'microether': '1000000000000', + 'micro': '1000000000000', + 'finney': '1000000000000000', + 'milliether': '1000000000000000', + 'milli': '1000000000000000', + 'ether': '1000000000000000000', + 'kether': '1000000000000000000000', + 'grand': '1000000000000000000000', + 'mether': '1000000000000000000000000', + 'gether': '1000000000000000000000000000', + 'tether': '1000000000000000000000000000000' +}; + +/** + * Should be called to pad string to expected length + * + * @method padLeft + * @param {String} string to be padded + * @param {Number} characters that result string should have + * @param {String} sign, by default 0 + * @returns {String} right aligned string + */ +var padLeft = function (string, chars, sign) { + return new Array(chars - string.length + 1).join(sign ? sign : "0") + string; +}; + +/** + * Should be called to pad string to expected length + * + * @method padRight + * @param {String} string to be padded + * @param {Number} characters that result string should have + * @param {String} sign, by default 0 + * @returns {String} right aligned string + */ +var padRight = function (string, chars, sign) { + return string + (new Array(chars - string.length + 1).join(sign ? sign : "0")); +}; + +/** + * Should be called to get utf8 from it's hex representation + * + * @method toUtf8 + * @param {String} string in hex + * @returns {String} ascii string representation of hex value + */ +var toUtf8 = function(hex) { +// Find termination + var str = ""; + var i = 0, l = hex.length; + if (hex.substring(0, 2) === '0x') { + i = 2; + } + for (; i < l; i+=2) { + var code = parseInt(hex.substr(i, 2), 16); + if (code === 0) + break; + str += String.fromCharCode(code); + } + + return utf8.decode(str); +}; + +/** + * Should be called to get ascii from it's hex representation + * + * @method toAscii + * @param {String} string in hex + * @returns {String} ascii string representation of hex value + */ +var toAscii = function(hex) { +// Find termination + var str = ""; + var i = 0, l = hex.length; + if (hex.substring(0, 2) === '0x') { + i = 2; + } + for (; i < l; i+=2) { + var code = parseInt(hex.substr(i, 2), 16); + str += String.fromCharCode(code); + } + + return str; +}; + +/** + * Should be called to get hex representation (prefixed by 0x) of utf8 string + * + * @method fromUtf8 + * @param {String} string + * @param {Number} optional padding + * @returns {String} hex representation of input string + */ +var fromUtf8 = function(str) { + str = utf8.encode(str); + var hex = ""; + for(var i = 0; i < str.length; i++) { + var code = str.charCodeAt(i); + if (code === 0) + break; + var n = code.toString(16); + hex += n.length < 2 ? '0' + n : n; + } + + return "0x" + hex; +}; + +/** + * Should be called to get hex representation (prefixed by 0x) of ascii string + * + * @method fromAscii + * @param {String} string + * @param {Number} optional padding + * @returns {String} hex representation of input string + */ +var fromAscii = function(str) { + var hex = ""; + for(var i = 0; i < str.length; i++) { + var code = str.charCodeAt(i); + var n = code.toString(16); + hex += n.length < 2 ? '0' + n : n; + } + + return "0x" + hex; +}; + +/** + * Should be used to create full function/event name from json abi + * + * @method transformToFullName + * @param {Object} json-abi + * @return {String} full fnction/event name + */ +var transformToFullName = function (json) { + if (json.name.indexOf('(') !== -1) { + return json.name; + } + + var typeName = json.inputs.map(function(i){return i.type; }).join(); + return json.name + '(' + typeName + ')'; +}; + +/** + * Should be called to get display name of contract function + * + * @method extractDisplayName + * @param {String} name of function/event + * @returns {String} display name for function/event eg. multiply(uint256) -> multiply + */ +var extractDisplayName = function (name) { + var length = name.indexOf('('); + return length !== -1 ? name.substr(0, length) : name; +}; + +/// @returns overloaded part of function/event name +var extractTypeName = function (name) { + /// TODO: make it invulnerable + var length = name.indexOf('('); + return length !== -1 ? name.substr(length + 1, name.length - 1 - (length + 1)).replace(' ', '') : ""; +}; + +/** + * Converts value to it's decimal representation in string + * + * @method toDecimal + * @param {String|Number|BigNumber} + * @return {String} + */ +var toDecimal = function (value) { + return toBigNumber(value).toNumber(); +}; + +/** + * Converts value to it's hex representation + * + * @method fromDecimal + * @param {String|Number|BigNumber} + * @return {String} + */ +var fromDecimal = function (value) { + var number = toBigNumber(value); + var result = number.toString(16); + + return number.lessThan(0) ? '-0x' + result.substr(1) : '0x' + result; +}; + +/** + * Auto converts any given value into it's hex representation. + * + * And even stringifys objects before. + * + * @method toHex + * @param {String|Number|BigNumber|Object} + * @return {String} + */ +var toHex = function (val) { + /*jshint maxcomplexity: 8 */ + + if (isBoolean(val)) + return fromDecimal(+val); + + if (isBigNumber(val)) + return fromDecimal(val); + + if (typeof val === 'object') + return fromUtf8(JSON.stringify(val)); + + // if its a negative number, pass it through fromDecimal + if (isString(val)) { + if (val.indexOf('-0x') === 0) + return fromDecimal(val); + else if(val.indexOf('0x') === 0) + return val; + else if (!isFinite(val)) + return fromAscii(val); + } + + return fromDecimal(val); +}; + +/** + * Returns value of unit in Wei + * + * @method getValueOfUnit + * @param {String} unit the unit to convert to, default ether + * @returns {BigNumber} value of the unit (in Wei) + * @throws error if the unit is not correct:w + */ +var getValueOfUnit = function (unit) { + unit = unit ? unit.toLowerCase() : 'ether'; + var unitValue = unitMap[unit]; + if (unitValue === undefined) { + throw new Error('This unit doesn\'t exists, please use the one of the following units' + JSON.stringify(unitMap, null, 2)); + } + return new BigNumber(unitValue, 10); +}; + +/** + * Takes a number of wei and converts it to any other ether unit. + * + * Possible units are: + * SI Short SI Full Effigy Other + * - kwei femtoether babbage + * - mwei picoether lovelace + * - gwei nanoether shannon nano + * - -- microether szabo micro + * - -- milliether finney milli + * - ether -- -- + * - kether -- grand + * - mether + * - gether + * - tether + * + * @method fromWei + * @param {Number|String} number can be a number, number string or a HEX of a decimal + * @param {String} unit the unit to convert to, default ether + * @return {String|Object} When given a BigNumber object it returns one as well, otherwise a number +*/ +var fromWei = function(number, unit) { + var returnValue = toBigNumber(number).dividedBy(getValueOfUnit(unit)); + + return isBigNumber(number) ? returnValue : returnValue.toString(10); +}; + +/** + * Takes a number of a unit and converts it to wei. + * + * Possible units are: + * SI Short SI Full Effigy Other + * - kwei femtoether babbage + * - mwei picoether lovelace + * - gwei nanoether shannon nano + * - -- microether szabo micro + * - -- microether szabo micro + * - -- milliether finney milli + * - ether -- -- + * - kether -- grand + * - mether + * - gether + * - tether + * + * @method toWei + * @param {Number|String|BigNumber} number can be a number, number string or a HEX of a decimal + * @param {String} unit the unit to convert from, default ether + * @return {String|Object} When given a BigNumber object it returns one as well, otherwise a number +*/ +var toWei = function(number, unit) { + var returnValue = toBigNumber(number).times(getValueOfUnit(unit)); + + return isBigNumber(number) ? returnValue : returnValue.toString(10); +}; + +/** + * Takes an input and transforms it into an bignumber + * + * @method toBigNumber + * @param {Number|String|BigNumber} a number, string, HEX string or BigNumber + * @return {BigNumber} BigNumber +*/ +var toBigNumber = function(number) { + /*jshint maxcomplexity:5 */ + number = number || 0; + if (isBigNumber(number)) + return number; + + if (isString(number) && (number.indexOf('0x') === 0 || number.indexOf('-0x') === 0)) { + return new BigNumber(number.replace('0x',''), 16); + } + + return new BigNumber(number.toString(10), 10); +}; + +/** + * Takes and input transforms it into bignumber and if it is negative value, into two's complement + * + * @method toTwosComplement + * @param {Number|String|BigNumber} + * @return {BigNumber} + */ +var toTwosComplement = function (number) { + var bigNumber = toBigNumber(number).round(); + if (bigNumber.lessThan(0)) { + return new BigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", 16).plus(bigNumber).plus(1); + } + return bigNumber; +}; + +/** + * Checks if the given string is strictly an address + * + * @method isStrictAddress + * @param {String} address the given HEX adress + * @return {Boolean} +*/ +var isStrictAddress = function (address) { + return /^0x[0-9a-f]{40}$/i.test(address); +}; + +/** + * Checks if the given string is an address + * + * @method isAddress + * @param {String} address the given HEX adress + * @return {Boolean} +*/ +var isAddress = function (address) { + if (!/^(0x)?[0-9a-f]{40}$/i.test(address)) { + // check if it has the basic requirements of an address + return false; + } else if (/^(0x)?[0-9a-f]{40}$/.test(address) || /^(0x)?[0-9A-F]{40}$/.test(address)) { + // If it's all small caps or all all caps, return true + return true; + } else { + // Otherwise check each case + return isChecksumAddress(address); + } +}; + +/** + * Checks if the given string is a checksummed address + * + * @method isChecksumAddress + * @param {String} address the given HEX adress + * @return {Boolean} +*/ +var isChecksumAddress = function (address) { + // Check each case + address = address.replace('0x',''); + var addressHash = sha3(address.toLowerCase()); + + for (var i = 0; i < 40; i++ ) { + // the nth letter should be uppercase if the nth digit of casemap is 1 + if ((parseInt(addressHash[i], 16) > 7 && address[i].toUpperCase() !== address[i]) || (parseInt(addressHash[i], 16) <= 7 && address[i].toLowerCase() !== address[i])) { + return false; + } + } + return true; +}; + + + +/** + * Makes a checksum address + * + * @method toChecksumAddress + * @param {String} address the given HEX adress + * @return {String} +*/ +var toChecksumAddress = function (address) { + if (typeof address === 'undefined') return ''; + + address = address.toLowerCase().replace('0x',''); + var addressHash = sha3(address); + var checksumAddress = '0x'; + + for (var i = 0; i < address.length; i++ ) { + // If ith character is 9 to f then make it uppercase + if (parseInt(addressHash[i], 16) > 7) { + checksumAddress += address[i].toUpperCase(); + } else { + checksumAddress += address[i]; + } + } + return checksumAddress; +}; + +/** + * Transforms given string to valid 20 bytes-length addres with 0x prefix + * + * @method toAddress + * @param {String} address + * @return {String} formatted address + */ +var toAddress = function (address) { + if (isStrictAddress(address)) { + return address; + } + + if (/^[0-9a-f]{40}$/.test(address)) { + return '0x' + address; + } + + return '0x' + padLeft(toHex(address).substr(2), 40); +}; + +/** + * Returns true if object is BigNumber, otherwise false + * + * @method isBigNumber + * @param {Object} + * @return {Boolean} + */ +var isBigNumber = function (object) { + return object instanceof BigNumber || + (object && object.constructor && object.constructor.name === 'BigNumber'); +}; + +/** + * Returns true if object is string, otherwise false + * + * @method isString + * @param {Object} + * @return {Boolean} + */ +var isString = function (object) { + return typeof object === 'string' || + (object && object.constructor && object.constructor.name === 'String'); +}; + +/** + * Returns true if object is function, otherwise false + * + * @method isFunction + * @param {Object} + * @return {Boolean} + */ +var isFunction = function (object) { + return typeof object === 'function'; +}; + +/** + * Returns true if object is Objet, otherwise false + * + * @method isObject + * @param {Object} + * @return {Boolean} + */ +var isObject = function (object) { + return object !== null && !(object instanceof Array) && typeof object === 'object'; +}; + +/** + * Returns true if object is boolean, otherwise false + * + * @method isBoolean + * @param {Object} + * @return {Boolean} + */ +var isBoolean = function (object) { + return typeof object === 'boolean'; +}; + +/** + * Returns true if object is array, otherwise false + * + * @method isArray + * @param {Object} + * @return {Boolean} + */ +var isArray = function (object) { + return object instanceof Array; +}; + +/** + * Returns true if given string is valid json object + * + * @method isJson + * @param {String} + * @return {Boolean} + */ +var isJson = function (str) { + try { + return !!JSON.parse(str); + } catch (e) { + return false; + } +}; + +/** + * Returns true if given string is a valid Ethereum block header bloom. + * + * @method isBloom + * @param {String} hex encoded bloom filter + * @return {Boolean} + */ +var isBloom = function (bloom) { + if (!/^(0x)?[0-9a-f]{512}$/i.test(bloom)) { + return false; + } else if (/^(0x)?[0-9a-f]{512}$/.test(bloom) || /^(0x)?[0-9A-F]{512}$/.test(bloom)) { + return true; + } + return false; +}; + +/** + * Returns true if given string is a valid log topic. + * + * @method isTopic + * @param {String} hex encoded topic + * @return {Boolean} + */ +var isTopic = function (topic) { + if (!/^(0x)?[0-9a-f]{64}$/i.test(topic)) { + return false; + } else if (/^(0x)?[0-9a-f]{64}$/.test(topic) || /^(0x)?[0-9A-F]{64}$/.test(topic)) { + return true; + } + return false; +}; + +module.exports = { + padLeft: padLeft, + padRight: padRight, + toHex: toHex, + toDecimal: toDecimal, + fromDecimal: fromDecimal, + toUtf8: toUtf8, + toAscii: toAscii, + fromUtf8: fromUtf8, + fromAscii: fromAscii, + transformToFullName: transformToFullName, + extractDisplayName: extractDisplayName, + extractTypeName: extractTypeName, + toWei: toWei, + fromWei: fromWei, + toBigNumber: toBigNumber, + toTwosComplement: toTwosComplement, + toAddress: toAddress, + isBigNumber: isBigNumber, + isStrictAddress: isStrictAddress, + isAddress: isAddress, + isChecksumAddress: isChecksumAddress, + toChecksumAddress: toChecksumAddress, + isFunction: isFunction, + isString: isString, + isObject: isObject, + isBoolean: isBoolean, + isArray: isArray, + isJson: isJson, + isBloom: isBloom, + isTopic: isTopic, +}; + +},{"./sha3.js":19,"bignumber.js":"bignumber.js","utf8":84}],21:[function(require,module,exports){ +module.exports={ + "version": "0.19.0" +} + +},{}],22:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file web3.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * Fabian Vogelsteller + * Gav Wood + * @date 2014 + */ + +var RequestManager = require('./web3/requestmanager'); +var Iban = require('./web3/iban'); +var Eth = require('./web3/methods/eth'); +var DB = require('./web3/methods/db'); +var Shh = require('./web3/methods/shh'); +var Net = require('./web3/methods/net'); +var Personal = require('./web3/methods/personal'); +var Swarm = require('./web3/methods/swarm'); +var Settings = require('./web3/settings'); +var version = require('./version.json'); +var utils = require('./utils/utils'); +var sha3 = require('./utils/sha3'); +var extend = require('./web3/extend'); +var Batch = require('./web3/batch'); +var Property = require('./web3/property'); +var HttpProvider = require('./web3/httpprovider'); +var IpcProvider = require('./web3/ipcprovider'); +var BigNumber = require('bignumber.js'); + + + +function Web3 (provider) { + this._requestManager = new RequestManager(provider); + this.currentProvider = provider; + this.eth = new Eth(this); + this.db = new DB(this); + this.shh = new Shh(this); + this.net = new Net(this); + this.personal = new Personal(this); + this.bzz = new Swarm(this); + this.settings = new Settings(); + this.version = { + api: version.version + }; + this.providers = { + HttpProvider: HttpProvider, + IpcProvider: IpcProvider + }; + this._extend = extend(this); + this._extend({ + properties: properties() + }); +} + +// expose providers on the class +Web3.providers = { + HttpProvider: HttpProvider, + IpcProvider: IpcProvider +}; + +Web3.prototype.setProvider = function (provider) { + this._requestManager.setProvider(provider); + this.currentProvider = provider; +}; + +Web3.prototype.reset = function (keepIsSyncing) { + this._requestManager.reset(keepIsSyncing); + this.settings = new Settings(); +}; + +Web3.prototype.BigNumber = BigNumber; +Web3.prototype.toHex = utils.toHex; +Web3.prototype.toAscii = utils.toAscii; +Web3.prototype.toUtf8 = utils.toUtf8; +Web3.prototype.fromAscii = utils.fromAscii; +Web3.prototype.fromUtf8 = utils.fromUtf8; +Web3.prototype.toDecimal = utils.toDecimal; +Web3.prototype.fromDecimal = utils.fromDecimal; +Web3.prototype.toBigNumber = utils.toBigNumber; +Web3.prototype.toWei = utils.toWei; +Web3.prototype.fromWei = utils.fromWei; +Web3.prototype.isAddress = utils.isAddress; +Web3.prototype.isChecksumAddress = utils.isChecksumAddress; +Web3.prototype.toChecksumAddress = utils.toChecksumAddress; +Web3.prototype.isIBAN = utils.isIBAN; +Web3.prototype.padLeft = utils.padLeft; +Web3.prototype.padRight = utils.padRight; + + +Web3.prototype.sha3 = function(string, options) { + return '0x' + sha3(string, options); +}; + +/** + * Transforms direct icap to address + */ +Web3.prototype.fromICAP = function (icap) { + var iban = new Iban(icap); + return iban.address(); +}; + +var properties = function () { + return [ + new Property({ + name: 'version.node', + getter: 'web3_clientVersion' + }), + new Property({ + name: 'version.network', + getter: 'net_version', + inputFormatter: utils.toDecimal + }), + new Property({ + name: 'version.ethereum', + getter: 'eth_protocolVersion', + inputFormatter: utils.toDecimal + }), + new Property({ + name: 'version.whisper', + getter: 'shh_version', + inputFormatter: utils.toDecimal + }) + ]; +}; + +Web3.prototype.isConnected = function(){ + return (this.currentProvider && this.currentProvider.isConnected()); +}; + +Web3.prototype.createBatch = function () { + return new Batch(this); +}; + +module.exports = Web3; + + +},{"./utils/sha3":19,"./utils/utils":20,"./version.json":21,"./web3/batch":24,"./web3/extend":28,"./web3/httpprovider":32,"./web3/iban":33,"./web3/ipcprovider":34,"./web3/methods/db":37,"./web3/methods/eth":38,"./web3/methods/net":39,"./web3/methods/personal":40,"./web3/methods/shh":41,"./web3/methods/swarm":42,"./web3/property":45,"./web3/requestmanager":46,"./web3/settings":47,"bignumber.js":"bignumber.js"}],23:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file allevents.js + * @author Marek Kotewicz + * @date 2014 + */ + +var sha3 = require('../utils/sha3'); +var SolidityEvent = require('./event'); +var formatters = require('./formatters'); +var utils = require('../utils/utils'); +var Filter = require('./filter'); +var watches = require('./methods/watches'); + +var AllSolidityEvents = function (requestManager, json, address) { + this._requestManager = requestManager; + this._json = json; + this._address = address; +}; + +AllSolidityEvents.prototype.encode = function (options) { + options = options || {}; + var result = {}; + + ['fromBlock', 'toBlock'].filter(function (f) { + return options[f] !== undefined; + }).forEach(function (f) { + result[f] = formatters.inputBlockNumberFormatter(options[f]); + }); + + result.address = this._address; + + return result; +}; + +AllSolidityEvents.prototype.decode = function (data) { + data.data = data.data || ''; + data.topics = data.topics || []; + + var eventTopic = data.topics[0].slice(2); + var match = this._json.filter(function (j) { + return eventTopic === sha3(utils.transformToFullName(j)); + })[0]; + + if (!match) { // cannot find matching event? + console.warn('cannot find event for log'); + return data; + } + + var event = new SolidityEvent(this._requestManager, match, this._address); + return event.decode(data); +}; + +AllSolidityEvents.prototype.execute = function (options, callback) { + + if (utils.isFunction(arguments[arguments.length - 1])) { + callback = arguments[arguments.length - 1]; + if(arguments.length === 1) + options = null; + } + + var o = this.encode(options); + var formatter = this.decode.bind(this); + return new Filter(this._requestManager, o, watches.eth(), formatter, callback); +}; + +AllSolidityEvents.prototype.attachToContract = function (contract) { + var execute = this.execute.bind(this); + contract.allEvents = execute; +}; + +module.exports = AllSolidityEvents; + + +},{"../utils/sha3":19,"../utils/utils":20,"./event":27,"./filter":29,"./formatters":30,"./methods/watches":43}],24:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file batch.js + * @author Marek Kotewicz + * @date 2015 + */ + +var Jsonrpc = require('./jsonrpc'); +var errors = require('./errors'); + +var Batch = function (web3) { + this.requestManager = web3._requestManager; + this.requests = []; +}; + +/** + * Should be called to add create new request to batch request + * + * @method add + * @param {Object} jsonrpc requet object + */ +Batch.prototype.add = function (request) { + this.requests.push(request); +}; + +/** + * Should be called to execute batch request + * + * @method execute + */ +Batch.prototype.execute = function () { + var requests = this.requests; + this.requestManager.sendBatch(requests, function (err, results) { + results = results || []; + requests.map(function (request, index) { + return results[index] || {}; + }).forEach(function (result, index) { + if (requests[index].callback) { + + if (!Jsonrpc.isValidResponse(result)) { + return requests[index].callback(errors.InvalidResponse(result)); + } + + requests[index].callback(null, (requests[index].format ? requests[index].format(result.result) : result.result)); + } + }); + }); +}; + +module.exports = Batch; + + +},{"./errors":26,"./jsonrpc":35}],25:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file contract.js + * @author Marek Kotewicz + * @date 2014 + */ + +var utils = require('../utils/utils'); +var coder = require('../solidity/coder'); +var SolidityEvent = require('./event'); +var SolidityFunction = require('./function'); +var AllEvents = require('./allevents'); + +/** + * Should be called to encode constructor params + * + * @method encodeConstructorParams + * @param {Array} abi + * @param {Array} constructor params + */ +var encodeConstructorParams = function (abi, params) { + return abi.filter(function (json) { + return json.type === 'constructor' && json.inputs.length === params.length; + }).map(function (json) { + return json.inputs.map(function (input) { + return input.type; + }); + }).map(function (types) { + return coder.encodeParams(types, params); + })[0] || ''; +}; + +/** + * Should be called to add functions to contract object + * + * @method addFunctionsToContract + * @param {Contract} contract + * @param {Array} abi + */ +var addFunctionsToContract = function (contract) { + contract.abi.filter(function (json) { + return json.type === 'function'; + }).map(function (json) { + return new SolidityFunction(contract._eth, json, contract.address); + }).forEach(function (f) { + f.attachToContract(contract); + }); +}; + +/** + * Should be called to add events to contract object + * + * @method addEventsToContract + * @param {Contract} contract + * @param {Array} abi + */ +var addEventsToContract = function (contract) { + var events = contract.abi.filter(function (json) { + return json.type === 'event'; + }); + + var All = new AllEvents(contract._eth._requestManager, events, contract.address); + All.attachToContract(contract); + + events.map(function (json) { + return new SolidityEvent(contract._eth._requestManager, json, contract.address); + }).forEach(function (e) { + e.attachToContract(contract); + }); +}; + + +/** + * Should be called to check if the contract gets properly deployed on the blockchain. + * + * @method checkForContractAddress + * @param {Object} contract + * @param {Function} callback + * @returns {Undefined} + */ +var checkForContractAddress = function(contract, callback){ + var count = 0, + callbackFired = false; + + // wait for receipt + var filter = contract._eth.filter('latest', function(e){ + if (!e && !callbackFired) { + count++; + + // stop watching after 50 blocks (timeout) + if (count > 50) { + + filter.stopWatching(function() {}); + callbackFired = true; + + if (callback) + callback(new Error('Contract transaction couldn\'t be found after 50 blocks')); + else + throw new Error('Contract transaction couldn\'t be found after 50 blocks'); + + + } else { + + contract._eth.getTransactionReceipt(contract.transactionHash, function(e, receipt){ + if(receipt && !callbackFired) { + + contract._eth.getCode(receipt.contractAddress, function(e, code){ + /*jshint maxcomplexity: 6 */ + + if(callbackFired || !code) + return; + + filter.stopWatching(function() {}); + callbackFired = true; + + if(code.length > 3) { + + // console.log('Contract code deployed!'); + + contract.address = receipt.contractAddress; + + // attach events and methods again after we have + addFunctionsToContract(contract); + addEventsToContract(contract); + + // call callback for the second time + if(callback) + callback(null, contract); + + } else { + if(callback) + callback(new Error('The contract code couldn\'t be stored, please check your gas amount.')); + else + throw new Error('The contract code couldn\'t be stored, please check your gas amount.'); + } + }); + } + }); + } + } + }); +}; + +/** + * Should be called to create new ContractFactory instance + * + * @method ContractFactory + * @param {Array} abi + */ +var ContractFactory = function (eth, abi) { + this.eth = eth; + this.abi = abi; + + /** + * Should be called to create new contract on a blockchain + * + * @method new + * @param {Any} contract constructor param1 (optional) + * @param {Any} contract constructor param2 (optional) + * @param {Object} contract transaction object (required) + * @param {Function} callback + * @returns {Contract} returns contract instance + */ + this.new = function () { + /*jshint maxcomplexity: 7 */ + + var contract = new Contract(this.eth, this.abi); + + // parse arguments + var options = {}; // required! + var callback; + + var args = Array.prototype.slice.call(arguments); + if (utils.isFunction(args[args.length - 1])) { + callback = args.pop(); + } + + var last = args[args.length - 1]; + if (utils.isObject(last) && !utils.isArray(last)) { + options = args.pop(); + } + + if (options.value > 0) { + var constructorAbi = abi.filter(function (json) { + return json.type === 'constructor' && json.inputs.length === args.length; + })[0] || {}; + + if (!constructorAbi.payable) { + throw new Error('Cannot send value to non-payable constructor'); + } + } + + var bytes = encodeConstructorParams(this.abi, args); + options.data += bytes; + + if (callback) { + + // wait for the contract address adn check if the code was deployed + this.eth.sendTransaction(options, function (err, hash) { + if (err) { + callback(err); + } else { + // add the transaction hash + contract.transactionHash = hash; + + // call callback for the first time + callback(null, contract); + + checkForContractAddress(contract, callback); + } + }); + } else { + var hash = this.eth.sendTransaction(options); + // add the transaction hash + contract.transactionHash = hash; + checkForContractAddress(contract); + } + + return contract; + }; + + this.new.getData = this.getData.bind(this); +}; + +/** + * Should be called to create new ContractFactory + * + * @method contract + * @param {Array} abi + * @returns {ContractFactory} new contract factory + */ +//var contract = function (abi) { + //return new ContractFactory(abi); +//}; + + + +/** + * Should be called to get access to existing contract on a blockchain + * + * @method at + * @param {Address} contract address (required) + * @param {Function} callback {optional) + * @returns {Contract} returns contract if no callback was passed, + * otherwise calls callback function (err, contract) + */ +ContractFactory.prototype.at = function (address, callback) { + var contract = new Contract(this.eth, this.abi, address); + + // this functions are not part of prototype, + // because we dont want to spoil the interface + addFunctionsToContract(contract); + addEventsToContract(contract); + + if (callback) { + callback(null, contract); + } + return contract; +}; + +/** + * Gets the data, which is data to deploy plus constructor params + * + * @method getData + */ +ContractFactory.prototype.getData = function () { + var options = {}; // required! + var args = Array.prototype.slice.call(arguments); + + var last = args[args.length - 1]; + if (utils.isObject(last) && !utils.isArray(last)) { + options = args.pop(); + } + + var bytes = encodeConstructorParams(this.abi, args); + options.data += bytes; + + return options.data; +}; + +/** + * Should be called to create new contract instance + * + * @method Contract + * @param {Array} abi + * @param {Address} contract address + */ +var Contract = function (eth, abi, address) { + this._eth = eth; + this.transactionHash = null; + this.address = address; + this.abi = abi; +}; + +module.exports = ContractFactory; + +},{"../solidity/coder":7,"../utils/utils":20,"./allevents":23,"./event":27,"./function":31}],26:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file errors.js + * @author Marek Kotewicz + * @date 2015 + */ + +module.exports = { + InvalidNumberOfSolidityArgs: function () { + return new Error('Invalid number of arguments to Solidity function'); + }, + InvalidNumberOfRPCParams: function () { + return new Error('Invalid number of input parameters to RPC method'); + }, + InvalidConnection: function (host){ + return new Error('CONNECTION ERROR: Couldn\'t connect to node '+ host +'.'); + }, + InvalidProvider: function () { + return new Error('Provider not set or invalid'); + }, + InvalidResponse: function (result){ + var message = !!result && !!result.error && !!result.error.message ? result.error.message : 'Invalid JSON RPC response: ' + JSON.stringify(result); + return new Error(message); + }, + ConnectionTimeout: function (ms){ + return new Error('CONNECTION TIMEOUT: timeout of ' + ms + ' ms achived'); + } +}; + +},{}],27:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file event.js + * @author Marek Kotewicz + * @date 2014 + */ + +var utils = require('../utils/utils'); +var coder = require('../solidity/coder'); +var formatters = require('./formatters'); +var sha3 = require('../utils/sha3'); +var Filter = require('./filter'); +var watches = require('./methods/watches'); + +/** + * This prototype should be used to create event filters + */ +var SolidityEvent = function (requestManager, json, address) { + this._requestManager = requestManager; + this._params = json.inputs; + this._name = utils.transformToFullName(json); + this._address = address; + this._anonymous = json.anonymous; +}; + +/** + * Should be used to get filtered param types + * + * @method types + * @param {Bool} decide if returned typed should be indexed + * @return {Array} array of types + */ +SolidityEvent.prototype.types = function (indexed) { + return this._params.filter(function (i) { + return i.indexed === indexed; + }).map(function (i) { + return i.type; + }); +}; + +/** + * Should be used to get event display name + * + * @method displayName + * @return {String} event display name + */ +SolidityEvent.prototype.displayName = function () { + return utils.extractDisplayName(this._name); +}; + +/** + * Should be used to get event type name + * + * @method typeName + * @return {String} event type name + */ +SolidityEvent.prototype.typeName = function () { + return utils.extractTypeName(this._name); +}; + +/** + * Should be used to get event signature + * + * @method signature + * @return {String} event signature + */ +SolidityEvent.prototype.signature = function () { + return sha3(this._name); +}; + +/** + * Should be used to encode indexed params and options to one final object + * + * @method encode + * @param {Object} indexed + * @param {Object} options + * @return {Object} everything combined together and encoded + */ +SolidityEvent.prototype.encode = function (indexed, options) { + indexed = indexed || {}; + options = options || {}; + var result = {}; + + ['fromBlock', 'toBlock'].filter(function (f) { + return options[f] !== undefined; + }).forEach(function (f) { + result[f] = formatters.inputBlockNumberFormatter(options[f]); + }); + + result.topics = []; + + result.address = this._address; + if (!this._anonymous) { + result.topics.push('0x' + this.signature()); + } + + var indexedTopics = this._params.filter(function (i) { + return i.indexed === true; + }).map(function (i) { + var value = indexed[i.name]; + if (value === undefined || value === null) { + return null; + } + + if (utils.isArray(value)) { + return value.map(function (v) { + return '0x' + coder.encodeParam(i.type, v); + }); + } + return '0x' + coder.encodeParam(i.type, value); + }); + + result.topics = result.topics.concat(indexedTopics); + + return result; +}; + +/** + * Should be used to decode indexed params and options + * + * @method decode + * @param {Object} data + * @return {Object} result object with decoded indexed && not indexed params + */ +SolidityEvent.prototype.decode = function (data) { + + data.data = data.data || ''; + data.topics = data.topics || []; + + var argTopics = this._anonymous ? data.topics : data.topics.slice(1); + var indexedData = argTopics.map(function (topics) { return topics.slice(2); }).join(""); + var indexedParams = coder.decodeParams(this.types(true), indexedData); + + var notIndexedData = data.data.slice(2); + var notIndexedParams = coder.decodeParams(this.types(false), notIndexedData); + + var result = formatters.outputLogFormatter(data); + result.event = this.displayName(); + result.address = data.address; + + result.args = this._params.reduce(function (acc, current) { + acc[current.name] = current.indexed ? indexedParams.shift() : notIndexedParams.shift(); + return acc; + }, {}); + + delete result.data; + delete result.topics; + + return result; +}; + +/** + * Should be used to create new filter object from event + * + * @method execute + * @param {Object} indexed + * @param {Object} options + * @return {Object} filter object + */ +SolidityEvent.prototype.execute = function (indexed, options, callback) { + + if (utils.isFunction(arguments[arguments.length - 1])) { + callback = arguments[arguments.length - 1]; + if(arguments.length === 2) + options = null; + if(arguments.length === 1) { + options = null; + indexed = {}; + } + } + + var o = this.encode(indexed, options); + var formatter = this.decode.bind(this); + return new Filter(this._requestManager, o, watches.eth(), formatter, callback); +}; + +/** + * Should be used to attach event to contract object + * + * @method attachToContract + * @param {Contract} + */ +SolidityEvent.prototype.attachToContract = function (contract) { + var execute = this.execute.bind(this); + var displayName = this.displayName(); + if (!contract[displayName]) { + contract[displayName] = execute; + } + contract[displayName][this.typeName()] = this.execute.bind(this, contract); +}; + +module.exports = SolidityEvent; + + +},{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"./filter":29,"./formatters":30,"./methods/watches":43}],28:[function(require,module,exports){ +var formatters = require('./formatters'); +var utils = require('./../utils/utils'); +var Method = require('./method'); +var Property = require('./property'); + +// TODO: refactor, so the input params are not altered. +// it's necessary to make same 'extension' work with multiple providers +var extend = function (web3) { + /* jshint maxcomplexity:5 */ + var ex = function (extension) { + + var extendedObject; + if (extension.property) { + if (!web3[extension.property]) { + web3[extension.property] = {}; + } + extendedObject = web3[extension.property]; + } else { + extendedObject = web3; + } + + if (extension.methods) { + extension.methods.forEach(function (method) { + method.attachToObject(extendedObject); + method.setRequestManager(web3._requestManager); + }); + } + + if (extension.properties) { + extension.properties.forEach(function (property) { + property.attachToObject(extendedObject); + property.setRequestManager(web3._requestManager); + }); + } + }; + + ex.formatters = formatters; + ex.utils = utils; + ex.Method = Method; + ex.Property = Property; + + return ex; +}; + + + +module.exports = extend; + + +},{"./../utils/utils":20,"./formatters":30,"./method":36,"./property":45}],29:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file filter.js + * @authors: + * Jeffrey Wilcke + * Marek Kotewicz + * Marian Oancea + * Fabian Vogelsteller + * Gav Wood + * @date 2014 + */ + +var formatters = require('./formatters'); +var utils = require('../utils/utils'); + +/** +* Converts a given topic to a hex string, but also allows null values. +* +* @param {Mixed} value +* @return {String} +*/ +var toTopic = function(value){ + + if(value === null || typeof value === 'undefined') + return null; + + value = String(value); + + if(value.indexOf('0x') === 0) + return value; + else + return utils.fromUtf8(value); +}; + +/// This method should be called on options object, to verify deprecated properties && lazy load dynamic ones +/// @param should be string or object +/// @returns options string or object +var getOptions = function (options) { + + if (utils.isString(options)) { + return options; + } + + options = options || {}; + + // make sure topics, get converted to hex + options.topics = options.topics || []; + options.topics = options.topics.map(function(topic){ + return (utils.isArray(topic)) ? topic.map(toTopic) : toTopic(topic); + }); + + return { + topics: options.topics, + from: options.from, + to: options.to, + address: options.address, + fromBlock: formatters.inputBlockNumberFormatter(options.fromBlock), + toBlock: formatters.inputBlockNumberFormatter(options.toBlock) + }; +}; + +/** +Adds the callback and sets up the methods, to iterate over the results. + +@method getLogsAtStart +@param {Object} self +@param {funciton} +*/ +var getLogsAtStart = function(self, callback){ + // call getFilterLogs for the first watch callback start + if (!utils.isString(self.options)) { + self.get(function (err, messages) { + // don't send all the responses to all the watches again... just to self one + if (err) { + callback(err); + } + + if(utils.isArray(messages)) { + messages.forEach(function (message) { + callback(null, message); + }); + } + }); + } +}; + +/** +Adds the callback and sets up the methods, to iterate over the results. + +@method pollFilter +@param {Object} self +*/ +var pollFilter = function(self) { + + var onMessage = function (error, messages) { + if (error) { + return self.callbacks.forEach(function (callback) { + callback(error); + }); + } + + if(utils.isArray(messages)) { + messages.forEach(function (message) { + message = self.formatter ? self.formatter(message) : message; + self.callbacks.forEach(function (callback) { + callback(null, message); + }); + }); + } + }; + + self.requestManager.startPolling({ + method: self.implementation.poll.call, + params: [self.filterId], + }, self.filterId, onMessage, self.stopWatching.bind(self)); + +}; + +var Filter = function (requestManager, options, methods, formatter, callback, filterCreationErrorCallback) { + var self = this; + var implementation = {}; + methods.forEach(function (method) { + method.setRequestManager(requestManager); + method.attachToObject(implementation); + }); + this.requestManager = requestManager; + this.options = getOptions(options); + this.implementation = implementation; + this.filterId = null; + this.callbacks = []; + this.getLogsCallbacks = []; + this.pollFilters = []; + this.formatter = formatter; + this.implementation.newFilter(this.options, function(error, id){ + if(error) { + self.callbacks.forEach(function(cb){ + cb(error); + }); + if (typeof filterCreationErrorCallback === 'function') { + filterCreationErrorCallback(error); + } + } else { + self.filterId = id; + + // check if there are get pending callbacks as a consequence + // of calling get() with filterId unassigned. + self.getLogsCallbacks.forEach(function (cb){ + self.get(cb); + }); + self.getLogsCallbacks = []; + + // get filter logs for the already existing watch calls + self.callbacks.forEach(function(cb){ + getLogsAtStart(self, cb); + }); + if(self.callbacks.length > 0) + pollFilter(self); + + // start to watch immediately + if(typeof callback === 'function') { + return self.watch(callback); + } + } + }); + + return this; +}; + +Filter.prototype.watch = function (callback) { + this.callbacks.push(callback); + + if(this.filterId) { + getLogsAtStart(this, callback); + pollFilter(this); + } + + return this; +}; + +Filter.prototype.stopWatching = function (callback) { + this.requestManager.stopPolling(this.filterId); + this.callbacks = []; + // remove filter async + if (callback) { + this.implementation.uninstallFilter(this.filterId, callback); + } else { + return this.implementation.uninstallFilter(this.filterId); + } +}; + +Filter.prototype.get = function (callback) { + var self = this; + if (utils.isFunction(callback)) { + if (this.filterId === null) { + // If filterId is not set yet, call it back + // when newFilter() assigns it. + this.getLogsCallbacks.push(callback); + } else { + this.implementation.getLogs(this.filterId, function(err, res){ + if (err) { + callback(err); + } else { + callback(null, res.map(function (log) { + return self.formatter ? self.formatter(log) : log; + })); + } + }); + } + } else { + if (this.filterId === null) { + throw new Error('Filter ID Error: filter().get() can\'t be chained synchronous, please provide a callback for the get() method.'); + } + var logs = this.implementation.getLogs(this.filterId); + return logs.map(function (log) { + return self.formatter ? self.formatter(log) : log; + }); + } + + return this; +}; + +module.exports = Filter; + + +},{"../utils/utils":20,"./formatters":30}],30:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file formatters.js + * @author Marek Kotewicz + * @author Fabian Vogelsteller + * @date 2015 + */ + +var utils = require('../utils/utils'); +var config = require('../utils/config'); +var Iban = require('./iban'); + +/** + * Should the format output to a big number + * + * @method outputBigNumberFormatter + * @param {String|Number|BigNumber} + * @returns {BigNumber} object + */ +var outputBigNumberFormatter = function (number) { + return utils.toBigNumber(number); +}; + +var isPredefinedBlockNumber = function (blockNumber) { + return blockNumber === 'latest' || blockNumber === 'pending' || blockNumber === 'earliest'; +}; + +var inputDefaultBlockNumberFormatter = function (blockNumber) { + if (blockNumber === undefined) { + return config.defaultBlock; + } + return inputBlockNumberFormatter(blockNumber); +}; + +var inputBlockNumberFormatter = function (blockNumber) { + if (blockNumber === undefined) { + return undefined; + } else if (isPredefinedBlockNumber(blockNumber)) { + return blockNumber; + } + return utils.toHex(blockNumber); +}; + +/** + * Formats the input of a transaction and converts all values to HEX + * + * @method inputCallFormatter + * @param {Object} transaction options + * @returns object +*/ +var inputCallFormatter = function (options){ + + options.from = options.from || config.defaultAccount; + + if (options.from) { + options.from = inputAddressFormatter(options.from); + } + + if (options.to) { // it might be contract creation + options.to = inputAddressFormatter(options.to); + } + + ['gasPrice', 'gas', 'value', 'nonce'].filter(function (key) { + return options[key] !== undefined; + }).forEach(function(key){ + options[key] = utils.fromDecimal(options[key]); + }); + + return options; +}; + +/** + * Formats the input of a transaction and converts all values to HEX + * + * @method inputTransactionFormatter + * @param {Object} transaction options + * @returns object +*/ +var inputTransactionFormatter = function (options){ + + options.from = options.from || config.defaultAccount; + options.from = inputAddressFormatter(options.from); + + if (options.to) { // it might be contract creation + options.to = inputAddressFormatter(options.to); + } + + ['gasPrice', 'gas', 'value', 'nonce'].filter(function (key) { + return options[key] !== undefined; + }).forEach(function(key){ + options[key] = utils.fromDecimal(options[key]); + }); + + return options; +}; + +/** + * Formats the output of a transaction to its proper values + * + * @method outputTransactionFormatter + * @param {Object} tx + * @returns {Object} +*/ +var outputTransactionFormatter = function (tx){ + if(tx.blockNumber !== null) + tx.blockNumber = utils.toDecimal(tx.blockNumber); + if(tx.transactionIndex !== null) + tx.transactionIndex = utils.toDecimal(tx.transactionIndex); + tx.nonce = utils.toDecimal(tx.nonce); + tx.gas = utils.toDecimal(tx.gas); + tx.gasPrice = utils.toBigNumber(tx.gasPrice); + tx.value = utils.toBigNumber(tx.value); + return tx; +}; + +/** + * Formats the output of a transaction receipt to its proper values + * + * @method outputTransactionReceiptFormatter + * @param {Object} receipt + * @returns {Object} +*/ +var outputTransactionReceiptFormatter = function (receipt){ + if(receipt.blockNumber !== null) + receipt.blockNumber = utils.toDecimal(receipt.blockNumber); + if(receipt.transactionIndex !== null) + receipt.transactionIndex = utils.toDecimal(receipt.transactionIndex); + receipt.cumulativeGasUsed = utils.toDecimal(receipt.cumulativeGasUsed); + receipt.gasUsed = utils.toDecimal(receipt.gasUsed); + + if(utils.isArray(receipt.logs)) { + receipt.logs = receipt.logs.map(function(log){ + return outputLogFormatter(log); + }); + } + + return receipt; +}; + +/** + * Formats the output of a block to its proper values + * + * @method outputBlockFormatter + * @param {Object} block + * @returns {Object} +*/ +var outputBlockFormatter = function(block) { + + // transform to number + block.gasLimit = utils.toDecimal(block.gasLimit); + block.gasUsed = utils.toDecimal(block.gasUsed); + block.size = utils.toDecimal(block.size); + block.timestamp = utils.toDecimal(block.timestamp); + if(block.number !== null) + block.number = utils.toDecimal(block.number); + + block.difficulty = utils.toBigNumber(block.difficulty); + block.totalDifficulty = utils.toBigNumber(block.totalDifficulty); + + if (utils.isArray(block.transactions)) { + block.transactions.forEach(function(item){ + if(!utils.isString(item)) + return outputTransactionFormatter(item); + }); + } + + return block; +}; + +/** + * Formats the output of a log + * + * @method outputLogFormatter + * @param {Object} log object + * @returns {Object} log +*/ +var outputLogFormatter = function(log) { + if(log.blockNumber !== null) + log.blockNumber = utils.toDecimal(log.blockNumber); + if(log.transactionIndex !== null) + log.transactionIndex = utils.toDecimal(log.transactionIndex); + if(log.logIndex !== null) + log.logIndex = utils.toDecimal(log.logIndex); + + return log; +}; + +/** + * Formats the input of a whisper post and converts all values to HEX + * + * @method inputPostFormatter + * @param {Object} transaction object + * @returns {Object} +*/ +var inputPostFormatter = function(post) { + + // post.payload = utils.toHex(post.payload); + post.ttl = utils.fromDecimal(post.ttl); + post.workToProve = utils.fromDecimal(post.workToProve); + post.priority = utils.fromDecimal(post.priority); + + // fallback + if (!utils.isArray(post.topics)) { + post.topics = post.topics ? [post.topics] : []; + } + + // format the following options + post.topics = post.topics.map(function(topic){ + // convert only if not hex + return (topic.indexOf('0x') === 0) ? topic : utils.fromUtf8(topic); + }); + + return post; +}; + +/** + * Formats the output of a received post message + * + * @method outputPostFormatter + * @param {Object} + * @returns {Object} + */ +var outputPostFormatter = function(post){ + + post.expiry = utils.toDecimal(post.expiry); + post.sent = utils.toDecimal(post.sent); + post.ttl = utils.toDecimal(post.ttl); + post.workProved = utils.toDecimal(post.workProved); + // post.payloadRaw = post.payload; + // post.payload = utils.toAscii(post.payload); + + // if (utils.isJson(post.payload)) { + // post.payload = JSON.parse(post.payload); + // } + + // format the following options + if (!post.topics) { + post.topics = []; + } + post.topics = post.topics.map(function(topic){ + return utils.toAscii(topic); + }); + + return post; +}; + +var inputAddressFormatter = function (address) { + var iban = new Iban(address); + if (iban.isValid() && iban.isDirect()) { + return '0x' + iban.address(); + } else if (utils.isStrictAddress(address)) { + return address; + } else if (utils.isAddress(address)) { + return '0x' + address; + } + throw new Error('invalid address'); +}; + + +var outputSyncingFormatter = function(result) { + + result.startingBlock = utils.toDecimal(result.startingBlock); + result.currentBlock = utils.toDecimal(result.currentBlock); + result.highestBlock = utils.toDecimal(result.highestBlock); + if (result.knownStates) { + result.knownStates = utils.toDecimal(result.knownStates); + result.pulledStates = utils.toDecimal(result.pulledStates); + } + + return result; +}; + +module.exports = { + inputDefaultBlockNumberFormatter: inputDefaultBlockNumberFormatter, + inputBlockNumberFormatter: inputBlockNumberFormatter, + inputCallFormatter: inputCallFormatter, + inputTransactionFormatter: inputTransactionFormatter, + inputAddressFormatter: inputAddressFormatter, + inputPostFormatter: inputPostFormatter, + outputBigNumberFormatter: outputBigNumberFormatter, + outputTransactionFormatter: outputTransactionFormatter, + outputTransactionReceiptFormatter: outputTransactionReceiptFormatter, + outputBlockFormatter: outputBlockFormatter, + outputLogFormatter: outputLogFormatter, + outputPostFormatter: outputPostFormatter, + outputSyncingFormatter: outputSyncingFormatter +}; + + +},{"../utils/config":18,"../utils/utils":20,"./iban":33}],31:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file function.js + * @author Marek Kotewicz + * @date 2015 + */ + +var coder = require('../solidity/coder'); +var utils = require('../utils/utils'); +var errors = require('./errors'); +var formatters = require('./formatters'); +var sha3 = require('../utils/sha3'); + +/** + * This prototype should be used to call/sendTransaction to solidity functions + */ +var SolidityFunction = function (eth, json, address) { + this._eth = eth; + this._inputTypes = json.inputs.map(function (i) { + return i.type; + }); + this._outputTypes = json.outputs.map(function (i) { + return i.type; + }); + this._constant = json.constant; + this._payable = json.payable; + this._name = utils.transformToFullName(json); + this._address = address; +}; + +SolidityFunction.prototype.extractCallback = function (args) { + if (utils.isFunction(args[args.length - 1])) { + return args.pop(); // modify the args array! + } +}; + +SolidityFunction.prototype.extractDefaultBlock = function (args) { + if (args.length > this._inputTypes.length && !utils.isObject(args[args.length -1])) { + return formatters.inputDefaultBlockNumberFormatter(args.pop()); // modify the args array! + } +}; + +/** + * Should be called to check if the number of arguments is correct + * + * @method validateArgs + * @param {Array} arguments + * @throws {Error} if it is not + */ +SolidityFunction.prototype.validateArgs = function (args) { + var inputArgs = args.filter(function (a) { + // filter the options object but not arguments that are arrays + return !(utils.isObject(a) === true && utils.isArray(a) === false); + }); + if (inputArgs.length !== this._inputTypes.length) { + throw errors.InvalidNumberOfSolidityArgs(); + } +}; + +/** + * Should be used to create payload from arguments + * + * @method toPayload + * @param {Array} solidity function params + * @param {Object} optional payload options + */ +SolidityFunction.prototype.toPayload = function (args) { + var options = {}; + if (args.length > this._inputTypes.length && utils.isObject(args[args.length -1])) { + options = args[args.length - 1]; + } + this.validateArgs(args); + options.to = this._address; + options.data = '0x' + this.signature() + coder.encodeParams(this._inputTypes, args); + return options; +}; + +/** + * Should be used to get function signature + * + * @method signature + * @return {String} function signature + */ +SolidityFunction.prototype.signature = function () { + return sha3(this._name).slice(0, 8); +}; + + +SolidityFunction.prototype.unpackOutput = function (output) { + if (!output) { + return; + } + + output = output.length >= 2 ? output.slice(2) : output; + var result = coder.decodeParams(this._outputTypes, output); + return result.length === 1 ? result[0] : result; +}; + +/** + * Calls a contract function. + * + * @method call + * @param {...Object} Contract function arguments + * @param {function} If the last argument is a function, the contract function + * call will be asynchronous, and the callback will be passed the + * error and result. + * @return {String} output bytes + */ +SolidityFunction.prototype.call = function () { + var args = Array.prototype.slice.call(arguments).filter(function (a) {return a !== undefined; }); + var callback = this.extractCallback(args); + var defaultBlock = this.extractDefaultBlock(args); + var payload = this.toPayload(args); + + + if (!callback) { + var output = this._eth.call(payload, defaultBlock); + return this.unpackOutput(output); + } + + var self = this; + this._eth.call(payload, defaultBlock, function (error, output) { + if (error) return callback(error, null); + + var unpacked = null; + try { + unpacked = self.unpackOutput(output); + } + catch (e) { + error = e; + } + + callback(error, unpacked); + }); +}; + +/** + * Should be used to sendTransaction to solidity function + * + * @method sendTransaction + */ +SolidityFunction.prototype.sendTransaction = function () { + var args = Array.prototype.slice.call(arguments).filter(function (a) {return a !== undefined; }); + var callback = this.extractCallback(args); + var payload = this.toPayload(args); + + if (payload.value > 0 && !this._payable) { + throw new Error('Cannot send value to non-payable function'); + } + + if (!callback) { + return this._eth.sendTransaction(payload); + } + + this._eth.sendTransaction(payload, callback); +}; + +/** + * Should be used to estimateGas of solidity function + * + * @method estimateGas + */ +SolidityFunction.prototype.estimateGas = function () { + var args = Array.prototype.slice.call(arguments); + var callback = this.extractCallback(args); + var payload = this.toPayload(args); + + if (!callback) { + return this._eth.estimateGas(payload); + } + + this._eth.estimateGas(payload, callback); +}; + +/** + * Return the encoded data of the call + * + * @method getData + * @return {String} the encoded data + */ +SolidityFunction.prototype.getData = function () { + var args = Array.prototype.slice.call(arguments); + var payload = this.toPayload(args); + + return payload.data; +}; + +/** + * Should be used to get function display name + * + * @method displayName + * @return {String} display name of the function + */ +SolidityFunction.prototype.displayName = function () { + return utils.extractDisplayName(this._name); +}; + +/** + * Should be used to get function type name + * + * @method typeName + * @return {String} type name of the function + */ +SolidityFunction.prototype.typeName = function () { + return utils.extractTypeName(this._name); +}; + +/** + * Should be called to get rpc requests from solidity function + * + * @method request + * @returns {Object} + */ +SolidityFunction.prototype.request = function () { + var args = Array.prototype.slice.call(arguments); + var callback = this.extractCallback(args); + var payload = this.toPayload(args); + var format = this.unpackOutput.bind(this); + + return { + method: this._constant ? 'eth_call' : 'eth_sendTransaction', + callback: callback, + params: [payload], + format: format + }; +}; + +/** + * Should be called to execute function + * + * @method execute + */ +SolidityFunction.prototype.execute = function () { + var transaction = !this._constant; + + // send transaction + if (transaction) { + return this.sendTransaction.apply(this, Array.prototype.slice.call(arguments)); + } + + // call + return this.call.apply(this, Array.prototype.slice.call(arguments)); +}; + +/** + * Should be called to attach function to contract + * + * @method attachToContract + * @param {Contract} + */ +SolidityFunction.prototype.attachToContract = function (contract) { + var execute = this.execute.bind(this); + execute.request = this.request.bind(this); + execute.call = this.call.bind(this); + execute.sendTransaction = this.sendTransaction.bind(this); + execute.estimateGas = this.estimateGas.bind(this); + execute.getData = this.getData.bind(this); + var displayName = this.displayName(); + if (!contract[displayName]) { + contract[displayName] = execute; + } + contract[displayName][this.typeName()] = execute; // circular!!!! +}; + +module.exports = SolidityFunction; + +},{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"./errors":26,"./formatters":30}],32:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file httpprovider.js + * @authors: + * Marek Kotewicz + * Marian Oancea + * Fabian Vogelsteller + * @date 2015 + */ + + +var errors = require('./errors'); + +// workaround to use httpprovider in different envs + +// browser +if (typeof window !== 'undefined' && window.XMLHttpRequest) { + XMLHttpRequest = window.XMLHttpRequest; // jshint ignore: line +// node +} else { + XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore: line +} + +var XHR2 = require('xhr2'); // jshint ignore: line + +/** + * HttpProvider should be used to send rpc calls over http + */ +var HttpProvider = function (host, timeout) { + this.host = host || 'http://localhost:8545'; + this.timeout = timeout || 0; +}; + +/** + * Should be called to prepare new XMLHttpRequest + * + * @method prepareRequest + * @param {Boolean} true if request should be async + * @return {XMLHttpRequest} object + */ +HttpProvider.prototype.prepareRequest = function (async) { + var request; + + if (async) { + request = new XHR2(); + request.timeout = this.timeout; + }else { + request = new XMLHttpRequest(); + } + + request.open('POST', this.host, async); + request.setRequestHeader('Content-Type','application/json'); + return request; +}; + +/** + * Should be called to make sync request + * + * @method send + * @param {Object} payload + * @return {Object} result + */ +HttpProvider.prototype.send = function (payload) { + var request = this.prepareRequest(false); + + try { + request.send(JSON.stringify(payload)); + } catch(error) { + throw errors.InvalidConnection(this.host); + } + + var result = request.responseText; + + try { + result = JSON.parse(result); + } catch(e) { + throw errors.InvalidResponse(request.responseText); + } + + return result; +}; + +/** + * Should be used to make async request + * + * @method sendAsync + * @param {Object} payload + * @param {Function} callback triggered on end with (err, result) + */ +HttpProvider.prototype.sendAsync = function (payload, callback) { + var request = this.prepareRequest(true); + + request.onreadystatechange = function() { + if (request.readyState === 4 && request.timeout !== 1) { + var result = request.responseText; + var error = null; + + try { + result = JSON.parse(result); + } catch(e) { + error = errors.InvalidResponse(request.responseText); + } + + callback(error, result); + } + }; + + request.ontimeout = function() { + callback(errors.ConnectionTimeout(this.timeout)); + }; + + try { + request.send(JSON.stringify(payload)); + } catch(error) { + callback(errors.InvalidConnection(this.host)); + } +}; + +/** + * Synchronously tries to make Http request + * + * @method isConnected + * @return {Boolean} returns true if request haven't failed. Otherwise false + */ +HttpProvider.prototype.isConnected = function() { + try { + this.send({ + id: 9999999999, + jsonrpc: '2.0', + method: 'net_listening', + params: [] + }); + return true; + } catch(e) { + return false; + } +}; + +module.exports = HttpProvider; + +},{"./errors":26,"xhr2":85,"xmlhttprequest":17}],33:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file iban.js + * @author Marek Kotewicz + * @date 2015 + */ + +var BigNumber = require('bignumber.js'); + +var padLeft = function (string, bytes) { + var result = string; + while (result.length < bytes * 2) { + result = '0' + result; + } + return result; +}; + +/** + * Prepare an IBAN for mod 97 computation by moving the first 4 chars to the end and transforming the letters to + * numbers (A = 10, B = 11, ..., Z = 35), as specified in ISO13616. + * + * @method iso13616Prepare + * @param {String} iban the IBAN + * @returns {String} the prepared IBAN + */ +var iso13616Prepare = function (iban) { + var A = 'A'.charCodeAt(0); + var Z = 'Z'.charCodeAt(0); + + iban = iban.toUpperCase(); + iban = iban.substr(4) + iban.substr(0,4); + + return iban.split('').map(function(n){ + var code = n.charCodeAt(0); + if (code >= A && code <= Z){ + // A = 10, B = 11, ... Z = 35 + return code - A + 10; + } else { + return n; + } + }).join(''); +}; + +/** + * Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064. + * + * @method mod9710 + * @param {String} iban + * @returns {Number} + */ +var mod9710 = function (iban) { + var remainder = iban, + block; + + while (remainder.length > 2){ + block = remainder.slice(0, 9); + remainder = parseInt(block, 10) % 97 + remainder.slice(block.length); + } + + return parseInt(remainder, 10) % 97; +}; + +/** + * This prototype should be used to create iban object from iban correct string + * + * @param {String} iban + */ +var Iban = function (iban) { + this._iban = iban; +}; + +/** + * This method should be used to create iban object from ethereum address + * + * @method fromAddress + * @param {String} address + * @return {Iban} the IBAN object + */ +Iban.fromAddress = function (address) { + var asBn = new BigNumber(address, 16); + var base36 = asBn.toString(36); + var padded = padLeft(base36, 15); + return Iban.fromBban(padded.toUpperCase()); +}; + +/** + * Convert the passed BBAN to an IBAN for this country specification. + * Please note that "generation of the IBAN shall be the exclusive responsibility of the bank/branch servicing the account". + * This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits + * + * @method fromBban + * @param {String} bban the BBAN to convert to IBAN + * @returns {Iban} the IBAN object + */ +Iban.fromBban = function (bban) { + var countryCode = 'XE'; + + var remainder = mod9710(iso13616Prepare(countryCode + '00' + bban)); + var checkDigit = ('0' + (98 - remainder)).slice(-2); + + return new Iban(countryCode + checkDigit + bban); +}; + +/** + * Should be used to create IBAN object for given institution and identifier + * + * @method createIndirect + * @param {Object} options, required options are "institution" and "identifier" + * @return {Iban} the IBAN object + */ +Iban.createIndirect = function (options) { + return Iban.fromBban('ETH' + options.institution + options.identifier); +}; + +/** + * Thos method should be used to check if given string is valid iban object + * + * @method isValid + * @param {String} iban string + * @return {Boolean} true if it is valid IBAN + */ +Iban.isValid = function (iban) { + var i = new Iban(iban); + return i.isValid(); +}; + +/** + * Should be called to check if iban is correct + * + * @method isValid + * @returns {Boolean} true if it is, otherwise false + */ +Iban.prototype.isValid = function () { + return /^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban) && + mod9710(iso13616Prepare(this._iban)) === 1; +}; + +/** + * Should be called to check if iban number is direct + * + * @method isDirect + * @returns {Boolean} true if it is, otherwise false + */ +Iban.prototype.isDirect = function () { + return this._iban.length === 34 || this._iban.length === 35; +}; + +/** + * Should be called to check if iban number if indirect + * + * @method isIndirect + * @returns {Boolean} true if it is, otherwise false + */ +Iban.prototype.isIndirect = function () { + return this._iban.length === 20; +}; + +/** + * Should be called to get iban checksum + * Uses the mod-97-10 checksumming protocol (ISO/IEC 7064:2003) + * + * @method checksum + * @returns {String} checksum + */ +Iban.prototype.checksum = function () { + return this._iban.substr(2, 2); +}; + +/** + * Should be called to get institution identifier + * eg. XREG + * + * @method institution + * @returns {String} institution identifier + */ +Iban.prototype.institution = function () { + return this.isIndirect() ? this._iban.substr(7, 4) : ''; +}; + +/** + * Should be called to get client identifier within institution + * eg. GAVOFYORK + * + * @method client + * @returns {String} client identifier + */ +Iban.prototype.client = function () { + return this.isIndirect() ? this._iban.substr(11) : ''; +}; + +/** + * Should be called to get client direct address + * + * @method address + * @returns {String} client direct address + */ +Iban.prototype.address = function () { + if (this.isDirect()) { + var base36 = this._iban.substr(4); + var asBn = new BigNumber(base36, 36); + return padLeft(asBn.toString(16), 20); + } + + return ''; +}; + +Iban.prototype.toString = function () { + return this._iban; +}; + +module.exports = Iban; + + +},{"bignumber.js":"bignumber.js"}],34:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file ipcprovider.js + * @authors: + * Fabian Vogelsteller + * @date 2015 + */ + +"use strict"; + +var utils = require('../utils/utils'); +var errors = require('./errors'); + + +var IpcProvider = function (path, net) { + var _this = this; + this.responseCallbacks = {}; + this.path = path; + + this.connection = net.connect({path: this.path}); + + this.connection.on('error', function(e){ + console.error('IPC Connection Error', e); + _this._timeout(); + }); + + this.connection.on('end', function(){ + _this._timeout(); + }); + + + // LISTEN FOR CONNECTION RESPONSES + this.connection.on('data', function(data) { + /*jshint maxcomplexity: 6 */ + + _this._parseResponse(data.toString()).forEach(function(result){ + + var id = null; + + // get the id which matches the returned id + if(utils.isArray(result)) { + result.forEach(function(load){ + if(_this.responseCallbacks[load.id]) + id = load.id; + }); + } else { + id = result.id; + } + + // fire the callback + if(_this.responseCallbacks[id]) { + _this.responseCallbacks[id](null, result); + delete _this.responseCallbacks[id]; + } + }); + }); +}; + +/** +Will parse the response and make an array out of it. + +@method _parseResponse +@param {String} data +*/ +IpcProvider.prototype._parseResponse = function(data) { + var _this = this, + returnValues = []; + + // DE-CHUNKER + var dechunkedData = data + .replace(/\}[\n\r]?\{/g,'}|--|{') // }{ + .replace(/\}\][\n\r]?\[\{/g,'}]|--|[{') // }][{ + .replace(/\}[\n\r]?\[\{/g,'}|--|[{') // }[{ + .replace(/\}\][\n\r]?\{/g,'}]|--|{') // }]{ + .split('|--|'); + + dechunkedData.forEach(function(data){ + + // prepend the last chunk + if(_this.lastChunk) + data = _this.lastChunk + data; + + var result = null; + + try { + result = JSON.parse(data); + + } catch(e) { + + _this.lastChunk = data; + + // start timeout to cancel all requests + clearTimeout(_this.lastChunkTimeout); + _this.lastChunkTimeout = setTimeout(function(){ + _this._timeout(); + throw errors.InvalidResponse(data); + }, 1000 * 15); + + return; + } + + // cancel timeout and set chunk to null + clearTimeout(_this.lastChunkTimeout); + _this.lastChunk = null; + + if(result) + returnValues.push(result); + }); + + return returnValues; +}; + + +/** +Get the adds a callback to the responseCallbacks object, +which will be called if a response matching the response Id will arrive. + +@method _addResponseCallback +*/ +IpcProvider.prototype._addResponseCallback = function(payload, callback) { + var id = payload.id || payload[0].id; + var method = payload.method || payload[0].method; + + this.responseCallbacks[id] = callback; + this.responseCallbacks[id].method = method; +}; + +/** +Timeout all requests when the end/error event is fired + +@method _timeout +*/ +IpcProvider.prototype._timeout = function() { + for(var key in this.responseCallbacks) { + if(this.responseCallbacks.hasOwnProperty(key)){ + this.responseCallbacks[key](errors.InvalidConnection('on IPC')); + delete this.responseCallbacks[key]; + } + } +}; + + +/** +Check if the current connection is still valid. + +@method isConnected +*/ +IpcProvider.prototype.isConnected = function() { + var _this = this; + + // try reconnect, when connection is gone + if(!_this.connection.writable) + _this.connection.connect({path: _this.path}); + + return !!this.connection.writable; +}; + +IpcProvider.prototype.send = function (payload) { + + if(this.connection.writeSync) { + var result; + + // try reconnect, when connection is gone + if(!this.connection.writable) + this.connection.connect({path: this.path}); + + var data = this.connection.writeSync(JSON.stringify(payload)); + + try { + result = JSON.parse(data); + } catch(e) { + throw errors.InvalidResponse(data); + } + + return result; + + } else { + throw new Error('You tried to send "'+ payload.method +'" synchronously. Synchronous requests are not supported by the IPC provider.'); + } +}; + +IpcProvider.prototype.sendAsync = function (payload, callback) { + // try reconnect, when connection is gone + if(!this.connection.writable) + this.connection.connect({path: this.path}); + + + this.connection.write(JSON.stringify(payload)); + this._addResponseCallback(payload, callback); +}; + +module.exports = IpcProvider; + + +},{"../utils/utils":20,"./errors":26}],35:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file jsonrpc.js + * @authors: + * Marek Kotewicz + * Aaron Kumavis + * @date 2015 + */ + +// Initialize Jsonrpc as a simple object with utility functions. +var Jsonrpc = { + messageId: 0 +}; + +/** + * Should be called to valid json create payload object + * + * @method toPayload + * @param {Function} method of jsonrpc call, required + * @param {Array} params, an array of method params, optional + * @returns {Object} valid jsonrpc payload object + */ +Jsonrpc.toPayload = function (method, params) { + if (!method) + console.error('jsonrpc method should be specified!'); + + // advance message ID + Jsonrpc.messageId++; + + return { + jsonrpc: '2.0', + id: Jsonrpc.messageId, + method: method, + params: params || [] + }; +}; + +/** + * Should be called to check if jsonrpc response is valid + * + * @method isValidResponse + * @param {Object} + * @returns {Boolean} true if response is valid, otherwise false + */ +Jsonrpc.isValidResponse = function (response) { + return Array.isArray(response) ? response.every(validateSingleMessage) : validateSingleMessage(response); + + function validateSingleMessage(message){ + return !!message && + !message.error && + message.jsonrpc === '2.0' && + typeof message.id === 'number' && + message.result !== undefined; // only undefined is not valid json object + } +}; + +/** + * Should be called to create batch payload object + * + * @method toBatchPayload + * @param {Array} messages, an array of objects with method (required) and params (optional) fields + * @returns {Array} batch payload + */ +Jsonrpc.toBatchPayload = function (messages) { + return messages.map(function (message) { + return Jsonrpc.toPayload(message.method, message.params); + }); +}; + +module.exports = Jsonrpc; + + +},{}],36:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file method.js + * @author Marek Kotewicz + * @date 2015 + */ + +var utils = require('../utils/utils'); +var errors = require('./errors'); + +var Method = function (options) { + this.name = options.name; + this.call = options.call; + this.params = options.params || 0; + this.inputFormatter = options.inputFormatter; + this.outputFormatter = options.outputFormatter; + this.requestManager = null; +}; + +Method.prototype.setRequestManager = function (rm) { + this.requestManager = rm; +}; + +/** + * Should be used to determine name of the jsonrpc method based on arguments + * + * @method getCall + * @param {Array} arguments + * @return {String} name of jsonrpc method + */ +Method.prototype.getCall = function (args) { + return utils.isFunction(this.call) ? this.call(args) : this.call; +}; + +/** + * Should be used to extract callback from array of arguments. Modifies input param + * + * @method extractCallback + * @param {Array} arguments + * @return {Function|Null} callback, if exists + */ +Method.prototype.extractCallback = function (args) { + if (utils.isFunction(args[args.length - 1])) { + return args.pop(); // modify the args array! + } +}; + +/** + * Should be called to check if the number of arguments is correct + * + * @method validateArgs + * @param {Array} arguments + * @throws {Error} if it is not + */ +Method.prototype.validateArgs = function (args) { + if (args.length !== this.params) { + throw errors.InvalidNumberOfRPCParams(); + } +}; + +/** + * Should be called to format input args of method + * + * @method formatInput + * @param {Array} + * @return {Array} + */ +Method.prototype.formatInput = function (args) { + if (!this.inputFormatter) { + return args; + } + + return this.inputFormatter.map(function (formatter, index) { + return formatter ? formatter(args[index]) : args[index]; + }); +}; + +/** + * Should be called to format output(result) of method + * + * @method formatOutput + * @param {Object} + * @return {Object} + */ +Method.prototype.formatOutput = function (result) { + return this.outputFormatter && result ? this.outputFormatter(result) : result; +}; + +/** + * Should create payload from given input args + * + * @method toPayload + * @param {Array} args + * @return {Object} + */ +Method.prototype.toPayload = function (args) { + var call = this.getCall(args); + var callback = this.extractCallback(args); + var params = this.formatInput(args); + this.validateArgs(params); + + return { + method: call, + params: params, + callback: callback + }; +}; + +Method.prototype.attachToObject = function (obj) { + var func = this.buildCall(); + func.call = this.call; // TODO!!! that's ugly. filter.js uses it + var name = this.name.split('.'); + if (name.length > 1) { + obj[name[0]] = obj[name[0]] || {}; + obj[name[0]][name[1]] = func; + } else { + obj[name[0]] = func; + } +}; + +Method.prototype.buildCall = function() { + var method = this; + var send = function () { + var payload = method.toPayload(Array.prototype.slice.call(arguments)); + if (payload.callback) { + return method.requestManager.sendAsync(payload, function (err, result) { + payload.callback(err, method.formatOutput(result)); + }); + } + return method.formatOutput(method.requestManager.send(payload)); + }; + send.request = this.request.bind(this); + return send; +}; + +/** + * Should be called to create pure JSONRPC request which can be used in batch request + * + * @method request + * @param {...} params + * @return {Object} jsonrpc request + */ +Method.prototype.request = function () { + var payload = this.toPayload(Array.prototype.slice.call(arguments)); + payload.format = this.formatOutput.bind(this); + return payload; +}; + +module.exports = Method; + +},{"../utils/utils":20,"./errors":26}],37:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file db.js + * @authors: + * Marek Kotewicz + * @date 2015 + */ + +var Method = require('../method'); + +var DB = function (web3) { + this._requestManager = web3._requestManager; + + var self = this; + + methods().forEach(function(method) { + method.attachToObject(self); + method.setRequestManager(web3._requestManager); + }); +}; + +var methods = function () { + var putString = new Method({ + name: 'putString', + call: 'db_putString', + params: 3 + }); + + var getString = new Method({ + name: 'getString', + call: 'db_getString', + params: 2 + }); + + var putHex = new Method({ + name: 'putHex', + call: 'db_putHex', + params: 3 + }); + + var getHex = new Method({ + name: 'getHex', + call: 'db_getHex', + params: 2 + }); + + return [ + putString, getString, putHex, getHex + ]; +}; + +module.exports = DB; + +},{"../method":36}],38:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file eth.js + * @author Marek Kotewicz + * @author Fabian Vogelsteller + * @date 2015 + */ + +"use strict"; + +var formatters = require('../formatters'); +var utils = require('../../utils/utils'); +var Method = require('../method'); +var Property = require('../property'); +var c = require('../../utils/config'); +var Contract = require('../contract'); +var watches = require('./watches'); +var Filter = require('../filter'); +var IsSyncing = require('../syncing'); +var namereg = require('../namereg'); +var Iban = require('../iban'); +var transfer = require('../transfer'); + +var blockCall = function (args) { + return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? "eth_getBlockByHash" : "eth_getBlockByNumber"; +}; + +var transactionFromBlockCall = function (args) { + return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getTransactionByBlockHashAndIndex' : 'eth_getTransactionByBlockNumberAndIndex'; +}; + +var uncleCall = function (args) { + return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getUncleByBlockHashAndIndex' : 'eth_getUncleByBlockNumberAndIndex'; +}; + +var getBlockTransactionCountCall = function (args) { + return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getBlockTransactionCountByHash' : 'eth_getBlockTransactionCountByNumber'; +}; + +var uncleCountCall = function (args) { + return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getUncleCountByBlockHash' : 'eth_getUncleCountByBlockNumber'; +}; + +function Eth(web3) { + this._requestManager = web3._requestManager; + + var self = this; + + methods().forEach(function(method) { + method.attachToObject(self); + method.setRequestManager(self._requestManager); + }); + + properties().forEach(function(p) { + p.attachToObject(self); + p.setRequestManager(self._requestManager); + }); + + + this.iban = Iban; + this.sendIBANTransaction = transfer.bind(null, this); +} + +Object.defineProperty(Eth.prototype, 'defaultBlock', { + get: function () { + return c.defaultBlock; + }, + set: function (val) { + c.defaultBlock = val; + return val; + } +}); + +Object.defineProperty(Eth.prototype, 'defaultAccount', { + get: function () { + return c.defaultAccount; + }, + set: function (val) { + c.defaultAccount = val; + return val; + } +}); + +var methods = function () { + var getBalance = new Method({ + name: 'getBalance', + call: 'eth_getBalance', + params: 2, + inputFormatter: [formatters.inputAddressFormatter, formatters.inputDefaultBlockNumberFormatter], + outputFormatter: formatters.outputBigNumberFormatter + }); + + var getStorageAt = new Method({ + name: 'getStorageAt', + call: 'eth_getStorageAt', + params: 3, + inputFormatter: [null, utils.toHex, formatters.inputDefaultBlockNumberFormatter] + }); + + var getCode = new Method({ + name: 'getCode', + call: 'eth_getCode', + params: 2, + inputFormatter: [formatters.inputAddressFormatter, formatters.inputDefaultBlockNumberFormatter] + }); + + var getBlock = new Method({ + name: 'getBlock', + call: blockCall, + params: 2, + inputFormatter: [formatters.inputBlockNumberFormatter, function (val) { return !!val; }], + outputFormatter: formatters.outputBlockFormatter + }); + + var getUncle = new Method({ + name: 'getUncle', + call: uncleCall, + params: 2, + inputFormatter: [formatters.inputBlockNumberFormatter, utils.toHex], + outputFormatter: formatters.outputBlockFormatter, + + }); + + var getCompilers = new Method({ + name: 'getCompilers', + call: 'eth_getCompilers', + params: 0 + }); + + var getBlockTransactionCount = new Method({ + name: 'getBlockTransactionCount', + call: getBlockTransactionCountCall, + params: 1, + inputFormatter: [formatters.inputBlockNumberFormatter], + outputFormatter: utils.toDecimal + }); + + var getBlockUncleCount = new Method({ + name: 'getBlockUncleCount', + call: uncleCountCall, + params: 1, + inputFormatter: [formatters.inputBlockNumberFormatter], + outputFormatter: utils.toDecimal + }); + + var getTransaction = new Method({ + name: 'getTransaction', + call: 'eth_getTransactionByHash', + params: 1, + outputFormatter: formatters.outputTransactionFormatter + }); + + var getTransactionFromBlock = new Method({ + name: 'getTransactionFromBlock', + call: transactionFromBlockCall, + params: 2, + inputFormatter: [formatters.inputBlockNumberFormatter, utils.toHex], + outputFormatter: formatters.outputTransactionFormatter + }); + + var getTransactionReceipt = new Method({ + name: 'getTransactionReceipt', + call: 'eth_getTransactionReceipt', + params: 1, + outputFormatter: formatters.outputTransactionReceiptFormatter + }); + + var getTransactionCount = new Method({ + name: 'getTransactionCount', + call: 'eth_getTransactionCount', + params: 2, + inputFormatter: [null, formatters.inputDefaultBlockNumberFormatter], + outputFormatter: utils.toDecimal + }); + + var sendRawTransaction = new Method({ + name: 'sendRawTransaction', + call: 'eth_sendRawTransaction', + params: 1, + inputFormatter: [null] + }); + + var sendTransaction = new Method({ + name: 'sendTransaction', + call: 'eth_sendTransaction', + params: 1, + inputFormatter: [formatters.inputTransactionFormatter] + }); + + var signTransaction = new Method({ + name: 'signTransaction', + call: 'eth_signTransaction', + params: 1, + inputFormatter: [formatters.inputTransactionFormatter] + }); + + var sign = new Method({ + name: 'sign', + call: 'eth_sign', + params: 2, + inputFormatter: [formatters.inputAddressFormatter, null] + }); + + var call = new Method({ + name: 'call', + call: 'eth_call', + params: 2, + inputFormatter: [formatters.inputCallFormatter, formatters.inputDefaultBlockNumberFormatter] + }); + + var estimateGas = new Method({ + name: 'estimateGas', + call: 'eth_estimateGas', + params: 1, + inputFormatter: [formatters.inputCallFormatter], + outputFormatter: utils.toDecimal + }); + + var compileSolidity = new Method({ + name: 'compile.solidity', + call: 'eth_compileSolidity', + params: 1 + }); + + var compileLLL = new Method({ + name: 'compile.lll', + call: 'eth_compileLLL', + params: 1 + }); + + var compileSerpent = new Method({ + name: 'compile.serpent', + call: 'eth_compileSerpent', + params: 1 + }); + + var submitWork = new Method({ + name: 'submitWork', + call: 'eth_submitWork', + params: 3 + }); + + var getWork = new Method({ + name: 'getWork', + call: 'eth_getWork', + params: 0 + }); + + return [ + getBalance, + getStorageAt, + getCode, + getBlock, + getUncle, + getCompilers, + getBlockTransactionCount, + getBlockUncleCount, + getTransaction, + getTransactionFromBlock, + getTransactionReceipt, + getTransactionCount, + call, + estimateGas, + sendRawTransaction, + signTransaction, + sendTransaction, + sign, + compileSolidity, + compileLLL, + compileSerpent, + submitWork, + getWork + ]; +}; + + +var properties = function () { + return [ + new Property({ + name: 'coinbase', + getter: 'eth_coinbase' + }), + new Property({ + name: 'mining', + getter: 'eth_mining' + }), + new Property({ + name: 'hashrate', + getter: 'eth_hashrate', + outputFormatter: utils.toDecimal + }), + new Property({ + name: 'syncing', + getter: 'eth_syncing', + outputFormatter: formatters.outputSyncingFormatter + }), + new Property({ + name: 'gasPrice', + getter: 'eth_gasPrice', + outputFormatter: formatters.outputBigNumberFormatter + }), + new Property({ + name: 'accounts', + getter: 'eth_accounts' + }), + new Property({ + name: 'blockNumber', + getter: 'eth_blockNumber', + outputFormatter: utils.toDecimal + }), + new Property({ + name: 'protocolVersion', + getter: 'eth_protocolVersion' + }) + ]; +}; + +Eth.prototype.contract = function (abi) { + var factory = new Contract(this, abi); + return factory; +}; + +Eth.prototype.filter = function (fil, callback, filterCreationErrorCallback) { + return new Filter(this._requestManager, fil, watches.eth(), formatters.outputLogFormatter, callback, filterCreationErrorCallback); +}; + +Eth.prototype.namereg = function () { + return this.contract(namereg.global.abi).at(namereg.global.address); +}; + +Eth.prototype.icapNamereg = function () { + return this.contract(namereg.icap.abi).at(namereg.icap.address); +}; + +Eth.prototype.isSyncing = function (callback) { + return new IsSyncing(this._requestManager, callback); +}; + +module.exports = Eth; + +},{"../../utils/config":18,"../../utils/utils":20,"../contract":25,"../filter":29,"../formatters":30,"../iban":33,"../method":36,"../namereg":44,"../property":45,"../syncing":48,"../transfer":49,"./watches":43}],39:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file eth.js + * @authors: + * Marek Kotewicz + * @date 2015 + */ + +var utils = require('../../utils/utils'); +var Property = require('../property'); + +var Net = function (web3) { + this._requestManager = web3._requestManager; + + var self = this; + + properties().forEach(function(p) { + p.attachToObject(self); + p.setRequestManager(web3._requestManager); + }); +}; + +/// @returns an array of objects describing web3.eth api properties +var properties = function () { + return [ + new Property({ + name: 'listening', + getter: 'net_listening' + }), + new Property({ + name: 'peerCount', + getter: 'net_peerCount', + outputFormatter: utils.toDecimal + }) + ]; +}; + +module.exports = Net; + +},{"../../utils/utils":20,"../property":45}],40:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file eth.js + * @author Marek Kotewicz + * @author Fabian Vogelsteller + * @date 2015 + */ + +"use strict"; + +var Method = require('../method'); +var Property = require('../property'); +var formatters = require('../formatters'); + +function Personal(web3) { + this._requestManager = web3._requestManager; + + var self = this; + + methods().forEach(function(method) { + method.attachToObject(self); + method.setRequestManager(self._requestManager); + }); + + properties().forEach(function(p) { + p.attachToObject(self); + p.setRequestManager(self._requestManager); + }); +} + +var methods = function () { + var newAccount = new Method({ + name: 'newAccount', + call: 'personal_newAccount', + params: 1, + inputFormatter: [null] + }); + + var importRawKey = new Method({ + name: 'importRawKey', + call: 'personal_importRawKey', + params: 2 + }); + + var sign = new Method({ + name: 'sign', + call: 'personal_sign', + params: 3, + inputFormatter: [null, formatters.inputAddressFormatter, null] + }); + + var ecRecover = new Method({ + name: 'ecRecover', + call: 'personal_ecRecover', + params: 2 + }); + + var unlockAccount = new Method({ + name: 'unlockAccount', + call: 'personal_unlockAccount', + params: 3, + inputFormatter: [formatters.inputAddressFormatter, null, null] + }); + + var sendTransaction = new Method({ + name: 'sendTransaction', + call: 'personal_sendTransaction', + params: 2, + inputFormatter: [formatters.inputTransactionFormatter, null] + }); + + var lockAccount = new Method({ + name: 'lockAccount', + call: 'personal_lockAccount', + params: 1, + inputFormatter: [formatters.inputAddressFormatter] + }); + + return [ + newAccount, + importRawKey, + unlockAccount, + ecRecover, + sign, + sendTransaction, + lockAccount + ]; +}; + +var properties = function () { + return [ + new Property({ + name: 'listAccounts', + getter: 'personal_listAccounts' + }) + ]; +}; + + +module.exports = Personal; + +},{"../formatters":30,"../method":36,"../property":45}],41:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file shh.js + * @authors: + * Marek Kotewicz + * @date 2015 + */ + +var Method = require('../method'); +var formatters = require('../formatters'); +var Filter = require('../filter'); +var watches = require('./watches'); + +var Shh = function (web3) { + this._requestManager = web3._requestManager; + + var self = this; + + methods().forEach(function(method) { + method.attachToObject(self); + method.setRequestManager(self._requestManager); + }); +}; + +Shh.prototype.filter = function (fil, callback) { + return new Filter(this._requestManager, fil, watches.shh(), formatters.outputPostFormatter, callback); +}; + +var methods = function () { + + var post = new Method({ + name: 'post', + call: 'shh_post', + params: 1, + inputFormatter: [formatters.inputPostFormatter] + }); + + var newIdentity = new Method({ + name: 'newIdentity', + call: 'shh_newIdentity', + params: 0 + }); + + var hasIdentity = new Method({ + name: 'hasIdentity', + call: 'shh_hasIdentity', + params: 1 + }); + + var newGroup = new Method({ + name: 'newGroup', + call: 'shh_newGroup', + params: 0 + }); + + var addToGroup = new Method({ + name: 'addToGroup', + call: 'shh_addToGroup', + params: 0 + }); + + return [ + post, + newIdentity, + hasIdentity, + newGroup, + addToGroup + ]; +}; + +module.exports = Shh; + + +},{"../filter":29,"../formatters":30,"../method":36,"./watches":43}],42:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file bzz.js + * @author Alex Beregszaszi + * @date 2016 + * + * Reference: https://github.com/ethereum/go-ethereum/blob/swarm/internal/web3ext/web3ext.go#L33 + */ + +"use strict"; + +var Method = require('../method'); +var Property = require('../property'); + +function Swarm(web3) { + this._requestManager = web3._requestManager; + + var self = this; + + methods().forEach(function(method) { + method.attachToObject(self); + method.setRequestManager(self._requestManager); + }); + + properties().forEach(function(p) { + p.attachToObject(self); + p.setRequestManager(self._requestManager); + }); +} + +var methods = function () { + var blockNetworkRead = new Method({ + name: 'blockNetworkRead', + call: 'bzz_blockNetworkRead', + params: 1, + inputFormatter: [null] + }); + + var syncEnabled = new Method({ + name: 'syncEnabled', + call: 'bzz_syncEnabled', + params: 1, + inputFormatter: [null] + }); + + var swapEnabled = new Method({ + name: 'swapEnabled', + call: 'bzz_swapEnabled', + params: 1, + inputFormatter: [null] + }); + + var download = new Method({ + name: 'download', + call: 'bzz_download', + params: 2, + inputFormatter: [null, null] + }); + + var upload = new Method({ + name: 'upload', + call: 'bzz_upload', + params: 2, + inputFormatter: [null, null] + }); + + var retrieve = new Method({ + name: 'retrieve', + call: 'bzz_retrieve', + params: 1, + inputFormatter: [null] + }); + + var store = new Method({ + name: 'store', + call: 'bzz_store', + params: 2, + inputFormatter: [null, null] + }); + + var get = new Method({ + name: 'get', + call: 'bzz_get', + params: 1, + inputFormatter: [null] + }); + + var put = new Method({ + name: 'put', + call: 'bzz_put', + params: 2, + inputFormatter: [null, null] + }); + + var modify = new Method({ + name: 'modify', + call: 'bzz_modify', + params: 4, + inputFormatter: [null, null, null, null] + }); + + return [ + blockNetworkRead, + syncEnabled, + swapEnabled, + download, + upload, + retrieve, + store, + get, + put, + modify + ]; +}; + +var properties = function () { + return [ + new Property({ + name: 'hive', + getter: 'bzz_hive' + }), + new Property({ + name: 'info', + getter: 'bzz_info' + }) + ]; +}; + + +module.exports = Swarm; + +},{"../method":36,"../property":45}],43:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file watches.js + * @authors: + * Marek Kotewicz + * @date 2015 + */ + +var Method = require('../method'); + +/// @returns an array of objects describing web3.eth.filter api methods +var eth = function () { + var newFilterCall = function (args) { + var type = args[0]; + + switch(type) { + case 'latest': + args.shift(); + this.params = 0; + return 'eth_newBlockFilter'; + case 'pending': + args.shift(); + this.params = 0; + return 'eth_newPendingTransactionFilter'; + default: + return 'eth_newFilter'; + } + }; + + var newFilter = new Method({ + name: 'newFilter', + call: newFilterCall, + params: 1 + }); + + var uninstallFilter = new Method({ + name: 'uninstallFilter', + call: 'eth_uninstallFilter', + params: 1 + }); + + var getLogs = new Method({ + name: 'getLogs', + call: 'eth_getFilterLogs', + params: 1 + }); + + var poll = new Method({ + name: 'poll', + call: 'eth_getFilterChanges', + params: 1 + }); + + return [ + newFilter, + uninstallFilter, + getLogs, + poll + ]; +}; + +/// @returns an array of objects describing web3.shh.watch api methods +var shh = function () { + var newFilter = new Method({ + name: 'newFilter', + call: 'shh_newFilter', + params: 1 + }); + + var uninstallFilter = new Method({ + name: 'uninstallFilter', + call: 'shh_uninstallFilter', + params: 1 + }); + + var getLogs = new Method({ + name: 'getLogs', + call: 'shh_getMessages', + params: 1 + }); + + var poll = new Method({ + name: 'poll', + call: 'shh_getFilterChanges', + params: 1 + }); + + return [ + newFilter, + uninstallFilter, + getLogs, + poll + ]; +}; + +module.exports = { + eth: eth, + shh: shh +}; + + +},{"../method":36}],44:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file namereg.js + * @author Marek Kotewicz + * @date 2015 + */ + +var globalRegistrarAbi = require('../contracts/GlobalRegistrar.json'); +var icapRegistrarAbi= require('../contracts/ICAPRegistrar.json'); + +var globalNameregAddress = '0xc6d9d2cd449a754c494264e1809c50e34d64562b'; +var icapNameregAddress = '0xa1a111bc074c9cfa781f0c38e63bd51c91b8af00'; + +module.exports = { + global: { + abi: globalRegistrarAbi, + address: globalNameregAddress + }, + icap: { + abi: icapRegistrarAbi, + address: icapNameregAddress + } +}; + + +},{"../contracts/GlobalRegistrar.json":1,"../contracts/ICAPRegistrar.json":2}],45:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file property.js + * @author Fabian Vogelsteller + * @author Marek Kotewicz + * @date 2015 + */ + +var utils = require('../utils/utils'); + +var Property = function (options) { + this.name = options.name; + this.getter = options.getter; + this.setter = options.setter; + this.outputFormatter = options.outputFormatter; + this.inputFormatter = options.inputFormatter; + this.requestManager = null; +}; + +Property.prototype.setRequestManager = function (rm) { + this.requestManager = rm; +}; + +/** + * Should be called to format input args of method + * + * @method formatInput + * @param {Array} + * @return {Array} + */ +Property.prototype.formatInput = function (arg) { + return this.inputFormatter ? this.inputFormatter(arg) : arg; +}; + +/** + * Should be called to format output(result) of method + * + * @method formatOutput + * @param {Object} + * @return {Object} + */ +Property.prototype.formatOutput = function (result) { + return this.outputFormatter && result !== null && result !== undefined ? this.outputFormatter(result) : result; +}; + +/** + * Should be used to extract callback from array of arguments. Modifies input param + * + * @method extractCallback + * @param {Array} arguments + * @return {Function|Null} callback, if exists + */ +Property.prototype.extractCallback = function (args) { + if (utils.isFunction(args[args.length - 1])) { + return args.pop(); // modify the args array! + } +}; + + +/** + * Should attach function to method + * + * @method attachToObject + * @param {Object} + * @param {Function} + */ +Property.prototype.attachToObject = function (obj) { + var proto = { + get: this.buildGet(), + enumerable: true + }; + + var names = this.name.split('.'); + var name = names[0]; + if (names.length > 1) { + obj[names[0]] = obj[names[0]] || {}; + obj = obj[names[0]]; + name = names[1]; + } + + Object.defineProperty(obj, name, proto); + obj[asyncGetterName(name)] = this.buildAsyncGet(); +}; + +var asyncGetterName = function (name) { + return 'get' + name.charAt(0).toUpperCase() + name.slice(1); +}; + +Property.prototype.buildGet = function () { + var property = this; + return function get() { + return property.formatOutput(property.requestManager.send({ + method: property.getter + })); + }; +}; + +Property.prototype.buildAsyncGet = function () { + var property = this; + var get = function (callback) { + property.requestManager.sendAsync({ + method: property.getter + }, function (err, result) { + callback(err, property.formatOutput(result)); + }); + }; + get.request = this.request.bind(this); + return get; +}; + +/** + * Should be called to create pure JSONRPC request which can be used in batch request + * + * @method request + * @param {...} params + * @return {Object} jsonrpc request + */ +Property.prototype.request = function () { + var payload = { + method: this.getter, + params: [], + callback: this.extractCallback(Array.prototype.slice.call(arguments)) + }; + payload.format = this.formatOutput.bind(this); + return payload; +}; + +module.exports = Property; + + +},{"../utils/utils":20}],46:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file requestmanager.js + * @author Jeffrey Wilcke + * @author Marek Kotewicz + * @author Marian Oancea + * @author Fabian Vogelsteller + * @author Gav Wood + * @date 2014 + */ + +var Jsonrpc = require('./jsonrpc'); +var utils = require('../utils/utils'); +var c = require('../utils/config'); +var errors = require('./errors'); + +/** + * It's responsible for passing messages to providers + * It's also responsible for polling the ethereum node for incoming messages + * Default poll timeout is 1 second + * Singleton + */ +var RequestManager = function (provider) { + this.provider = provider; + this.polls = {}; + this.timeout = null; +}; + +/** + * Should be used to synchronously send request + * + * @method send + * @param {Object} data + * @return {Object} + */ +RequestManager.prototype.send = function (data) { + if (!this.provider) { + console.error(errors.InvalidProvider()); + return null; + } + + var payload = Jsonrpc.toPayload(data.method, data.params); + var result = this.provider.send(payload); + + if (!Jsonrpc.isValidResponse(result)) { + throw errors.InvalidResponse(result); + } + + return result.result; +}; + +/** + * Should be used to asynchronously send request + * + * @method sendAsync + * @param {Object} data + * @param {Function} callback + */ +RequestManager.prototype.sendAsync = function (data, callback) { + if (!this.provider) { + return callback(errors.InvalidProvider()); + } + + var payload = Jsonrpc.toPayload(data.method, data.params); + this.provider.sendAsync(payload, function (err, result) { + if (err) { + return callback(err); + } + + if (!Jsonrpc.isValidResponse(result)) { + return callback(errors.InvalidResponse(result)); + } + + callback(null, result.result); + }); +}; + +/** + * Should be called to asynchronously send batch request + * + * @method sendBatch + * @param {Array} batch data + * @param {Function} callback + */ +RequestManager.prototype.sendBatch = function (data, callback) { + if (!this.provider) { + return callback(errors.InvalidProvider()); + } + + var payload = Jsonrpc.toBatchPayload(data); + + this.provider.sendAsync(payload, function (err, results) { + if (err) { + return callback(err); + } + + if (!utils.isArray(results)) { + return callback(errors.InvalidResponse(results)); + } + + callback(err, results); + }); +}; + +/** + * Should be used to set provider of request manager + * + * @method setProvider + * @param {Object} + */ +RequestManager.prototype.setProvider = function (p) { + this.provider = p; +}; + +/** + * Should be used to start polling + * + * @method startPolling + * @param {Object} data + * @param {Number} pollId + * @param {Function} callback + * @param {Function} uninstall + * + * @todo cleanup number of params + */ +RequestManager.prototype.startPolling = function (data, pollId, callback, uninstall) { + this.polls[pollId] = {data: data, id: pollId, callback: callback, uninstall: uninstall}; + + + // start polling + if (!this.timeout) { + this.poll(); + } +}; + +/** + * Should be used to stop polling for filter with given id + * + * @method stopPolling + * @param {Number} pollId + */ +RequestManager.prototype.stopPolling = function (pollId) { + delete this.polls[pollId]; + + // stop polling + if(Object.keys(this.polls).length === 0 && this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } +}; + +/** + * Should be called to reset the polling mechanism of the request manager + * + * @method reset + */ +RequestManager.prototype.reset = function (keepIsSyncing) { + /*jshint maxcomplexity:5 */ + + for (var key in this.polls) { + // remove all polls, except sync polls, + // they need to be removed manually by calling syncing.stopWatching() + if(!keepIsSyncing || key.indexOf('syncPoll_') === -1) { + this.polls[key].uninstall(); + delete this.polls[key]; + } + } + + // stop polling + if(Object.keys(this.polls).length === 0 && this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } +}; + +/** + * Should be called to poll for changes on filter with given id + * + * @method poll + */ +RequestManager.prototype.poll = function () { + /*jshint maxcomplexity: 6 */ + this.timeout = setTimeout(this.poll.bind(this), c.ETH_POLLING_TIMEOUT); + + if (Object.keys(this.polls).length === 0) { + return; + } + + if (!this.provider) { + console.error(errors.InvalidProvider()); + return; + } + + var pollsData = []; + var pollsIds = []; + for (var key in this.polls) { + pollsData.push(this.polls[key].data); + pollsIds.push(key); + } + + if (pollsData.length === 0) { + return; + } + + var payload = Jsonrpc.toBatchPayload(pollsData); + + // map the request id to they poll id + var pollsIdMap = {}; + payload.forEach(function(load, index){ + pollsIdMap[load.id] = pollsIds[index]; + }); + + + var self = this; + this.provider.sendAsync(payload, function (error, results) { + + + // TODO: console log? + if (error) { + return; + } + + if (!utils.isArray(results)) { + throw errors.InvalidResponse(results); + } + results.map(function (result) { + var id = pollsIdMap[result.id]; + + // make sure the filter is still installed after arrival of the request + if (self.polls[id]) { + result.callback = self.polls[id].callback; + return result; + } else + return false; + }).filter(function (result) { + return !!result; + }).filter(function (result) { + var valid = Jsonrpc.isValidResponse(result); + if (!valid) { + result.callback(errors.InvalidResponse(result)); + } + return valid; + }).forEach(function (result) { + result.callback(null, result.result); + }); + }); +}; + +module.exports = RequestManager; + + +},{"../utils/config":18,"../utils/utils":20,"./errors":26,"./jsonrpc":35}],47:[function(require,module,exports){ + + +var Settings = function () { + this.defaultBlock = 'latest'; + this.defaultAccount = undefined; +}; + +module.exports = Settings; + + +},{}],48:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** @file syncing.js + * @authors: + * Fabian Vogelsteller + * @date 2015 + */ + +var formatters = require('./formatters'); +var utils = require('../utils/utils'); + +var count = 1; + +/** +Adds the callback and sets up the methods, to iterate over the results. + +@method pollSyncing +@param {Object} self +*/ +var pollSyncing = function(self) { + + var onMessage = function (error, sync) { + if (error) { + return self.callbacks.forEach(function (callback) { + callback(error); + }); + } + + if(utils.isObject(sync) && sync.startingBlock) + sync = formatters.outputSyncingFormatter(sync); + + self.callbacks.forEach(function (callback) { + if (self.lastSyncState !== sync) { + + // call the callback with true first so the app can stop anything, before receiving the sync data + if(!self.lastSyncState && utils.isObject(sync)) + callback(null, true); + + // call on the next CPU cycle, so the actions of the sync stop can be processes first + setTimeout(function() { + callback(null, sync); + }, 0); + + self.lastSyncState = sync; + } + }); + }; + + self.requestManager.startPolling({ + method: 'eth_syncing', + params: [], + }, self.pollId, onMessage, self.stopWatching.bind(self)); + +}; + +var IsSyncing = function (requestManager, callback) { + this.requestManager = requestManager; + this.pollId = 'syncPoll_'+ count++; + this.callbacks = []; + this.addCallback(callback); + this.lastSyncState = false; + pollSyncing(this); + + return this; +}; + +IsSyncing.prototype.addCallback = function (callback) { + if(callback) + this.callbacks.push(callback); + return this; +}; + +IsSyncing.prototype.stopWatching = function () { + this.requestManager.stopPolling(this.pollId); + this.callbacks = []; +}; + +module.exports = IsSyncing; + + +},{"../utils/utils":20,"./formatters":30}],49:[function(require,module,exports){ +/* + This file is part of web3.js. + + web3.js is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + web3.js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with web3.js. If not, see . +*/ +/** + * @file transfer.js + * @author Marek Kotewicz + * @date 2015 + */ + +var Iban = require('./iban'); +var exchangeAbi = require('../contracts/SmartExchange.json'); + +/** + * Should be used to make Iban transfer + * + * @method transfer + * @param {String} from + * @param {String} to iban + * @param {Value} value to be tranfered + * @param {Function} callback, callback + */ +var transfer = function (eth, from, to, value, callback) { + var iban = new Iban(to); + if (!iban.isValid()) { + throw new Error('invalid iban address'); + } + + if (iban.isDirect()) { + return transferToAddress(eth, from, iban.address(), value, callback); + } + + if (!callback) { + var address = eth.icapNamereg().addr(iban.institution()); + return deposit(eth, from, address, value, iban.client()); + } + + eth.icapNamereg().addr(iban.institution(), function (err, address) { + return deposit(eth, from, address, value, iban.client(), callback); + }); + +}; + +/** + * Should be used to transfer funds to certain address + * + * @method transferToAddress + * @param {String} from + * @param {String} to + * @param {Value} value to be tranfered + * @param {Function} callback, callback + */ +var transferToAddress = function (eth, from, to, value, callback) { + return eth.sendTransaction({ + address: to, + from: from, + value: value + }, callback); +}; + +/** + * Should be used to deposit funds to generic Exchange contract (must implement deposit(bytes32) method!) + * + * @method deposit + * @param {String} from + * @param {String} to + * @param {Value} value to be transfered + * @param {String} client unique identifier + * @param {Function} callback, callback + */ +var deposit = function (eth, from, to, value, client, callback) { + var abi = exchangeAbi; + return eth.contract(abi).at(to).deposit(client, { + from: from, + value: value + }, callback); +}; + +module.exports = transfer; + + +},{"../contracts/SmartExchange.json":3,"./iban":33}],50:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + var t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); + }()); + + + return CryptoJS.AES; + +})); +},{"./cipher-core":51,"./core":52,"./enc-base64":53,"./evpkdf":55,"./md5":60}],51:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher core components. + */ + CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + var block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + var modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + var modeCreator = mode.createDecryptor; + + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + this._mode = modeCreator.call(mode, this, iv && iv.words); + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + var finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + var wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + var salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); + }()); + + +})); +},{"./core":52}],52:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(); + } + else if (typeof define === "function" && define.amd) { + // AMD + define([], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(); + } +}(this, function () { + + /** + * CryptoJS core components. + */ + var CryptoJS = CryptoJS || (function (Math, undefined) { + /* + * Local polyfil of Object.create + */ + var create = Object.create || (function () { + function F() {}; + + return function (obj) { + var subtype; + + F.prototype = obj; + + subtype = new F(); + + F.prototype = null; + + return subtype; + }; + }()) + + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + var r = (function (m_w) { + var m_w = m_w; + var m_z = 0x3ade68b1; + var mask = 0xffffffff; + + return function () { + m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; + m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; + var result = ((m_z << 0x10) + m_w) & mask; + result /= 0x100000000; + result += 0.5; + return result * (Math.random() > .5 ? 1 : -1); + } + }); + + for (var i = 0, rcache; i < nBytes; i += 4) { + var _r = r((rcache || Math.random()) * 0x100000000); + + rcache = _r() * 0x3ade67b7; + words.push((_r() * 0x100000000) | 0); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + var processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; + }(Math)); + + + return CryptoJS; + +})); +},{}],53:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } + }()); + + + return CryptoJS.enc.Base64; + +})); +},{"./core":52}],54:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * UTF-16 BE encoding strategy. + */ + var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { + /** + * Converts a word array to a UTF-16 BE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 BE string. + * + * @static + * + * @example + * + * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff; + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 BE string to a word array. + * + * @param {string} utf16Str The UTF-16 BE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + /** + * UTF-16 LE encoding strategy. + */ + C_enc.Utf16LE = { + /** + * Converts a word array to a UTF-16 LE string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-16 LE string. + * + * @static + * + * @example + * + * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var utf16Chars = []; + for (var i = 0; i < sigBytes; i += 2) { + var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff); + utf16Chars.push(String.fromCharCode(codePoint)); + } + + return utf16Chars.join(''); + }, + + /** + * Converts a UTF-16 LE string to a word array. + * + * @param {string} utf16Str The UTF-16 LE string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); + */ + parse: function (utf16Str) { + // Shortcut + var utf16StrLength = utf16Str.length; + + // Convert + var words = []; + for (var i = 0; i < utf16StrLength; i++) { + words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16)); + } + + return WordArray.create(words, utf16StrLength * 2); + } + }; + + function swapEndian(word) { + return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff); + } + }()); + + + return CryptoJS.enc.Utf16; + +})); +},{"./core":52}],55:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var MD5 = C_algo.MD5; + + /** + * This key derivation function is meant to conform with EVP_BytesToKey. + * www.openssl.org/docs/crypto/EVP_BytesToKey.html + */ + var EvpKDF = C_algo.EvpKDF = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hash algorithm to use. Default: MD5 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: MD5, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.EvpKDF.create(); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init hasher + var hasher = cfg.hasher.create(); + + // Initial values + var derivedKey = WordArray.create(); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + if (block) { + hasher.update(block); + } + var block = hasher.update(password).finalize(salt); + hasher.reset(); + + // Iterations + for (var i = 1; i < iterations; i++) { + block = hasher.finalize(block); + hasher.reset(); + } + + derivedKey.concat(block); + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Derives a key from a password. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.EvpKDF(password, salt); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); + * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.EvpKDF = function (password, salt, cfg) { + return EvpKDF.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.EvpKDF; + +})); +},{"./core":52,"./hmac":57,"./sha1":76}],56:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var CipherParams = C_lib.CipherParams; + var C_enc = C.enc; + var Hex = C_enc.Hex; + var C_format = C.format; + + var HexFormatter = C_format.Hex = { + /** + * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The hexadecimally encoded string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.format.Hex.stringify(cipherParams); + */ + stringify: function (cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, + + /** + * Converts a hexadecimally encoded ciphertext string to a cipher params object. + * + * @param {string} input The hexadecimally encoded string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.Hex.parse(hexString); + */ + parse: function (input) { + var ciphertext = Hex.parse(input); + return CipherParams.create({ ciphertext: ciphertext }); + } + }; + }()); + + + return CryptoJS.format.Hex; + +})); +},{"./cipher-core":51,"./core":52}],57:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var C_algo = C.algo; + + /** + * HMAC algorithm. + */ + var HMAC = C_algo.HMAC = Base.extend({ + /** + * Initializes a newly created HMAC. + * + * @param {Hasher} hasher The hash algorithm to use. + * @param {WordArray|string} key The secret key. + * + * @example + * + * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); + */ + init: function (hasher, key) { + // Init hasher + hasher = this._hasher = new hasher.init(); + + // Convert string to WordArray, else assume WordArray already + if (typeof key == 'string') { + key = Utf8.parse(key); + } + + // Shortcuts + var hasherBlockSize = hasher.blockSize; + var hasherBlockSizeBytes = hasherBlockSize * 4; + + // Allow arbitrary length keys + if (key.sigBytes > hasherBlockSizeBytes) { + key = hasher.finalize(key); + } + + // Clamp excess bits + key.clamp(); + + // Clone key for inner and outer pads + var oKey = this._oKey = key.clone(); + var iKey = this._iKey = key.clone(); + + // Shortcuts + var oKeyWords = oKey.words; + var iKeyWords = iKey.words; + + // XOR keys with pad constants + for (var i = 0; i < hasherBlockSize; i++) { + oKeyWords[i] ^= 0x5c5c5c5c; + iKeyWords[i] ^= 0x36363636; + } + oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; + + // Set initial values + this.reset(); + }, + + /** + * Resets this HMAC to its initial state. + * + * @example + * + * hmacHasher.reset(); + */ + reset: function () { + // Shortcut + var hasher = this._hasher; + + // Reset + hasher.reset(); + hasher.update(this._iKey); + }, + + /** + * Updates this HMAC with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {HMAC} This HMAC instance. + * + * @example + * + * hmacHasher.update('message'); + * hmacHasher.update(wordArray); + */ + update: function (messageUpdate) { + this._hasher.update(messageUpdate); + + // Chainable + return this; + }, + + /** + * Finalizes the HMAC computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The HMAC. + * + * @example + * + * var hmac = hmacHasher.finalize(); + * var hmac = hmacHasher.finalize('message'); + * var hmac = hmacHasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Shortcut + var hasher = this._hasher; + + // Compute HMAC + var innerHash = hasher.finalize(messageUpdate); + hasher.reset(); + var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); + + return hmac; + } + }); + }()); + + +})); +},{"./core":52}],58:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./lib-typedarrays"), require("./enc-utf16"), require("./enc-base64"), require("./md5"), require("./sha1"), require("./sha256"), require("./sha224"), require("./sha512"), require("./sha384"), require("./sha3"), require("./ripemd160"), require("./hmac"), require("./pbkdf2"), require("./evpkdf"), require("./cipher-core"), require("./mode-cfb"), require("./mode-ctr"), require("./mode-ctr-gladman"), require("./mode-ofb"), require("./mode-ecb"), require("./pad-ansix923"), require("./pad-iso10126"), require("./pad-iso97971"), require("./pad-zeropadding"), require("./pad-nopadding"), require("./format-hex"), require("./aes"), require("./tripledes"), require("./rc4"), require("./rabbit"), require("./rabbit-legacy")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy"], factory); + } + else { + // Global (browser) + root.CryptoJS = factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + return CryptoJS; + +})); +},{"./aes":50,"./cipher-core":51,"./core":52,"./enc-base64":53,"./enc-utf16":54,"./evpkdf":55,"./format-hex":56,"./hmac":57,"./lib-typedarrays":59,"./md5":60,"./mode-cfb":61,"./mode-ctr":63,"./mode-ctr-gladman":62,"./mode-ecb":64,"./mode-ofb":65,"./pad-ansix923":66,"./pad-iso10126":67,"./pad-iso97971":68,"./pad-nopadding":69,"./pad-zeropadding":70,"./pbkdf2":71,"./rabbit":73,"./rabbit-legacy":72,"./rc4":74,"./ripemd160":75,"./sha1":76,"./sha224":77,"./sha256":78,"./sha3":79,"./sha384":80,"./sha512":81,"./tripledes":82,"./x64-core":83}],59:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Check if typed arrays are supported + if (typeof ArrayBuffer != 'function') { + return; + } + + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + + // Reference original init + var superInit = WordArray.init; + + // Augment WordArray.init to handle typed arrays + var subInit = WordArray.init = function (typedArray) { + // Convert buffers to uint8 + if (typedArray instanceof ArrayBuffer) { + typedArray = new Uint8Array(typedArray); + } + + // Convert other array views to uint8 + if ( + typedArray instanceof Int8Array || + (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || + typedArray instanceof Int16Array || + typedArray instanceof Uint16Array || + typedArray instanceof Int32Array || + typedArray instanceof Uint32Array || + typedArray instanceof Float32Array || + typedArray instanceof Float64Array + ) { + typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); + } + + // Handle Uint8Array + if (typedArray instanceof Uint8Array) { + // Shortcut + var typedArrayByteLength = typedArray.byteLength; + + // Extract bytes + var words = []; + for (var i = 0; i < typedArrayByteLength; i++) { + words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8); + } + + // Initialize this word array + superInit.call(this, words, typedArrayByteLength); + } else { + // Else call normal init + superInit.apply(this, arguments); + } + }; + + subInit.prototype = WordArray; + }()); + + + return CryptoJS.lib.WordArray; + +})); +},{"./core":52}],60:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); + }(Math)); + + + return CryptoJS.MD5; + +})); +},{"./core":52}],61:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Cipher Feedback block mode. + */ + CryptoJS.mode.CFB = (function () { + var CFB = CryptoJS.lib.BlockCipherMode.extend(); + + CFB.Encryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + CFB.Decryptor = CFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { + // Shortcut + var iv = this._iv; + + // Generate keystream + if (iv) { + var keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + var keystream = this._prevBlock; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + + return CFB; + }()); + + + return CryptoJS.mode.CFB; + +})); +},{"./cipher-core":51,"./core":52}],62:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + * Counter block mode compatible with Dr Brian Gladman fileenc.c + * derived from CryptoJS.mode.CTR + * Jan Hruby jhruby.web@gmail.com + */ + CryptoJS.mode.CTRGladman = (function () { + var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); + + function incWord(word) + { + if (((word >> 24) & 0xff) === 0xff) { //overflow + var b1 = (word >> 16)&0xff; + var b2 = (word >> 8)&0xff; + var b3 = word & 0xff; + + if (b1 === 0xff) // overflow b1 + { + b1 = 0; + if (b2 === 0xff) + { + b2 = 0; + if (b3 === 0xff) + { + b3 = 0; + } + else + { + ++b3; + } + } + else + { + ++b2; + } + } + else + { + ++b1; + } + + word = 0; + word += (b1 << 16); + word += (b2 << 8); + word += b3; + } + else + { + word += (0x01 << 24); + } + return word; + } + + function incCounter(counter) + { + if ((counter[0] = incWord(counter[0])) === 0) + { + // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 + counter[1] = incWord(counter[1]); + } + return counter; + } + + var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + + incCounter(counter); + + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTRGladman.Decryptor = Encryptor; + + return CTRGladman; + }()); + + + + + return CryptoJS.mode.CTRGladman; + +})); +},{"./cipher-core":51,"./core":52}],63:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Counter block mode. + */ + CryptoJS.mode.CTR = (function () { + var CTR = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = CTR.Encryptor = CTR.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var counter = this._counter; + + // Generate keystream + if (iv) { + counter = this._counter = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + var keystream = counter.slice(0); + cipher.encryptBlock(keystream, 0); + + // Increment counter + counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0 + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + CTR.Decryptor = Encryptor; + + return CTR; + }()); + + + return CryptoJS.mode.CTR; + +})); +},{"./cipher-core":51,"./core":52}],64:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Electronic Codebook block mode. + */ + CryptoJS.mode.ECB = (function () { + var ECB = CryptoJS.lib.BlockCipherMode.extend(); + + ECB.Encryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.encryptBlock(words, offset); + } + }); + + ECB.Decryptor = ECB.extend({ + processBlock: function (words, offset) { + this._cipher.decryptBlock(words, offset); + } + }); + + return ECB; + }()); + + + return CryptoJS.mode.ECB; + +})); +},{"./cipher-core":51,"./core":52}],65:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Output Feedback block mode. + */ + CryptoJS.mode.OFB = (function () { + var OFB = CryptoJS.lib.BlockCipherMode.extend(); + + var Encryptor = OFB.Encryptor = OFB.extend({ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher + var blockSize = cipher.blockSize; + var iv = this._iv; + var keystream = this._keystream; + + // Generate keystream + if (iv) { + keystream = this._keystream = iv.slice(0); + + // Remove IV for subsequent blocks + this._iv = undefined; + } + cipher.encryptBlock(keystream, 0); + + // Encrypt + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= keystream[i]; + } + } + }); + + OFB.Decryptor = Encryptor; + + return OFB; + }()); + + + return CryptoJS.mode.OFB; + +})); +},{"./cipher-core":51,"./core":52}],66:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ANSI X.923 padding strategy. + */ + CryptoJS.pad.AnsiX923 = { + pad: function (data, blockSize) { + // Shortcuts + var dataSigBytes = data.sigBytes; + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; + + // Compute last byte position + var lastBytePos = dataSigBytes + nPaddingBytes - 1; + + // Pad + data.clamp(); + data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8); + data.sigBytes += nPaddingBytes; + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Ansix923; + +})); +},{"./cipher-core":51,"./core":52}],67:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO 10126 padding strategy. + */ + CryptoJS.pad.Iso10126 = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Pad + data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)). + concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); + }, + + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + + return CryptoJS.pad.Iso10126; + +})); +},{"./cipher-core":51,"./core":52}],68:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * ISO/IEC 9797-1 Padding Method 2. + */ + CryptoJS.pad.Iso97971 = { + pad: function (data, blockSize) { + // Add 0x80 byte + data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); + + // Zero pad the rest + CryptoJS.pad.ZeroPadding.pad(data, blockSize); + }, + + unpad: function (data) { + // Remove zero padding + CryptoJS.pad.ZeroPadding.unpad(data); + + // Remove one more byte -- the 0x80 byte + data.sigBytes--; + } + }; + + + return CryptoJS.pad.Iso97971; + +})); +},{"./cipher-core":51,"./core":52}],69:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * A noop padding strategy. + */ + CryptoJS.pad.NoPadding = { + pad: function () { + }, + + unpad: function () { + } + }; + + + return CryptoJS.pad.NoPadding; + +})); +},{"./cipher-core":51,"./core":52}],70:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** + * Zero padding strategy. + */ + CryptoJS.pad.ZeroPadding = { + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Pad + data.clamp(); + data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes); + }, + + unpad: function (data) { + // Shortcut + var dataWords = data.words; + + // Unpad + var i = data.sigBytes - 1; + while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) { + i--; + } + data.sigBytes = i + 1; + } + }; + + + return CryptoJS.pad.ZeroPadding; + +})); +},{"./cipher-core":51,"./core":52}],71:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha1"), require("./hmac")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha1", "./hmac"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA1 = C_algo.SHA1; + var HMAC = C_algo.HMAC; + + /** + * Password-Based Key Derivation Function 2 algorithm. + */ + var PBKDF2 = C_algo.PBKDF2 = Base.extend({ + /** + * Configuration options. + * + * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) + * @property {Hasher} hasher The hasher to use. Default: SHA1 + * @property {number} iterations The number of iterations to perform. Default: 1 + */ + cfg: Base.extend({ + keySize: 128/32, + hasher: SHA1, + iterations: 1 + }), + + /** + * Initializes a newly created key derivation function. + * + * @param {Object} cfg (Optional) The configuration options to use for the derivation. + * + * @example + * + * var kdf = CryptoJS.algo.PBKDF2.create(); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); + * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); + */ + init: function (cfg) { + this.cfg = this.cfg.extend(cfg); + }, + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * + * @return {WordArray} The derived key. + * + * @example + * + * var key = kdf.compute(password, salt); + */ + compute: function (password, salt) { + // Shortcut + var cfg = this.cfg; + + // Init HMAC + var hmac = HMAC.create(cfg.hasher, password); + + // Initial values + var derivedKey = WordArray.create(); + var blockIndex = WordArray.create([0x00000001]); + + // Shortcuts + var derivedKeyWords = derivedKey.words; + var blockIndexWords = blockIndex.words; + var keySize = cfg.keySize; + var iterations = cfg.iterations; + + // Generate key + while (derivedKeyWords.length < keySize) { + var block = hmac.update(salt).finalize(blockIndex); + hmac.reset(); + + // Shortcuts + var blockWords = block.words; + var blockWordsLength = blockWords.length; + + // Iterations + var intermediate = block; + for (var i = 1; i < iterations; i++) { + intermediate = hmac.finalize(intermediate); + hmac.reset(); + + // Shortcut + var intermediateWords = intermediate.words; + + // XOR intermediate with block + for (var j = 0; j < blockWordsLength; j++) { + blockWords[j] ^= intermediateWords[j]; + } + } + + derivedKey.concat(block); + blockIndexWords[0]++; + } + derivedKey.sigBytes = keySize * 4; + + return derivedKey; + } + }); + + /** + * Computes the Password-Based Key Derivation Function 2. + * + * @param {WordArray|string} password The password. + * @param {WordArray|string} salt A salt. + * @param {Object} cfg (Optional) The configuration options to use for this computation. + * + * @return {WordArray} The derived key. + * + * @static + * + * @example + * + * var key = CryptoJS.PBKDF2(password, salt); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); + * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); + */ + C.PBKDF2 = function (password, salt, cfg) { + return PBKDF2.create(cfg).compute(password, salt); + }; + }()); + + + return CryptoJS.PBKDF2; + +})); +},{"./core":52,"./hmac":57,"./sha1":76}],72:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm. + * + * This is a legacy version that neglected to convert the key to little-endian. + * This error doesn't affect the cipher's security, + * but it does affect its compatibility with other implementations. + */ + var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); + */ + C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); + }()); + + + return CryptoJS.RabbitLegacy; + +})); +},{"./cipher-core":51,"./core":52,"./enc-base64":53,"./evpkdf":55,"./md5":60}],73:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + // Reusable objects + var S = []; + var C_ = []; + var G = []; + + /** + * Rabbit stream cipher algorithm + */ + var Rabbit = C_algo.Rabbit = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var K = this._key.words; + var iv = this.cfg.iv; + + // Swap endian + for (var i = 0; i < 4; i++) { + K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | + (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); + } + + // Generate initial state values + var X = this._X = [ + K[0], (K[3] << 16) | (K[2] >>> 16), + K[1], (K[0] << 16) | (K[3] >>> 16), + K[2], (K[1] << 16) | (K[0] >>> 16), + K[3], (K[2] << 16) | (K[1] >>> 16) + ]; + + // Generate initial counter values + var C = this._C = [ + (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), + (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), + (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), + (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff) + ]; + + // Carry bit + this._b = 0; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + + // Modify the counters + for (var i = 0; i < 8; i++) { + C[i] ^= X[(i + 4) & 7]; + } + + // IV setup + if (iv) { + // Shortcuts + var IV = iv.words; + var IV_0 = IV[0]; + var IV_1 = IV[1]; + + // Generate four subvectors + var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00); + var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00); + var i1 = (i0 >>> 16) | (i2 & 0xffff0000); + var i3 = (i2 << 16) | (i0 & 0x0000ffff); + + // Modify counter values + C[0] ^= i0; + C[1] ^= i1; + C[2] ^= i2; + C[3] ^= i3; + C[4] ^= i0; + C[5] ^= i1; + C[6] ^= i2; + C[7] ^= i3; + + // Iterate the system four times + for (var i = 0; i < 4; i++) { + nextState.call(this); + } + } + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var X = this._X; + + // Iterate the system + nextState.call(this); + + // Generate four keystream words + S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16); + S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16); + S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16); + S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16); + + for (var i = 0; i < 4; i++) { + // Swap endian + S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | + (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); + + // Encrypt + M[offset + i] ^= S[i]; + } + }, + + blockSize: 128/32, + + ivSize: 64/32 + }); + + function nextState() { + // Shortcuts + var X = this._X; + var C = this._C; + + // Save old counter values + for (var i = 0; i < 8; i++) { + C_[i] = C[i]; + } + + // Calculate new counter values + C[0] = (C[0] + 0x4d34d34d + this._b) | 0; + C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0; + C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0; + C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0; + C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0; + C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0; + C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0; + C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0; + this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0; + + // Calculate the g-values + for (var i = 0; i < 8; i++) { + var gx = X[i] + C[i]; + + // Construct high and low argument for squaring + var ga = gx & 0xffff; + var gb = gx >>> 16; + + // Calculate high and low result of squaring + var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb; + var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0); + + // High XOR low + G[i] = gh ^ gl; + } + + // Calculate new state values + X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0; + X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0; + X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0; + X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0; + X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0; + X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0; + X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0; + X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); + * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); + */ + C.Rabbit = StreamCipher._createHelper(Rabbit); + }()); + + + return CryptoJS.Rabbit; + +})); +},{"./cipher-core":51,"./core":52,"./enc-base64":53,"./evpkdf":55,"./md5":60}],74:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var StreamCipher = C_lib.StreamCipher; + var C_algo = C.algo; + + /** + * RC4 stream cipher algorithm. + */ + var RC4 = C_algo.RC4 = StreamCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + var keySigBytes = key.sigBytes; + + // Init sbox + var S = this._S = []; + for (var i = 0; i < 256; i++) { + S[i] = i; + } + + // Key setup + for (var i = 0, j = 0; i < 256; i++) { + var keyByteIndex = i % keySigBytes; + var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff; + + j = (j + S[i] + keyByte) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + } + + // Counters + this._i = this._j = 0; + }, + + _doProcessBlock: function (M, offset) { + M[offset] ^= generateKeystreamWord.call(this); + }, + + keySize: 256/32, + + ivSize: 0 + }); + + function generateKeystreamWord() { + // Shortcuts + var S = this._S; + var i = this._i; + var j = this._j; + + // Generate keystream word + var keystreamWord = 0; + for (var n = 0; n < 4; n++) { + i = (i + 1) % 256; + j = (j + S[i]) % 256; + + // Swap + var t = S[i]; + S[i] = S[j]; + S[j] = t; + + keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8); + } + + // Update counters + this._i = i; + this._j = j; + + return keystreamWord; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); + */ + C.RC4 = StreamCipher._createHelper(RC4); + + /** + * Modified RC4 stream cipher algorithm. + */ + var RC4Drop = C_algo.RC4Drop = RC4.extend({ + /** + * Configuration options. + * + * @property {number} drop The number of keystream words to drop. Default 192 + */ + cfg: RC4.cfg.extend({ + drop: 192 + }), + + _doReset: function () { + RC4._doReset.call(this); + + // Drop + for (var i = this.cfg.drop; i > 0; i--) { + generateKeystreamWord.call(this); + } + } + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); + * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); + */ + C.RC4Drop = StreamCipher._createHelper(RC4Drop); + }()); + + + return CryptoJS.RC4; + +})); +},{"./cipher-core":51,"./core":52,"./enc-base64":53,"./evpkdf":55,"./md5":60}],75:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + /** @preserve + (c) 2012 by Cédric Mesnil. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var _zl = WordArray.create([ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, + 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, + 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, + 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); + var _zr = WordArray.create([ + 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, + 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, + 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, + 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, + 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); + var _sl = WordArray.create([ + 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, + 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, + 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, + 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, + 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]); + var _sr = WordArray.create([ + 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, + 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, + 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, + 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, + 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]); + + var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); + var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); + + /** + * RIPEMD160 hash algorithm. + */ + var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ + _doReset: function () { + this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); + }, + + _doProcessBlock: function (M, offset) { + + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + // Swap + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + // Shortcut + var H = this._hash.words; + var hl = _hl.words; + var hr = _hr.words; + var zl = _zl.words; + var zr = _zr.words; + var sl = _sl.words; + var sr = _sr.words; + + // Working variables + var al, bl, cl, dl, el; + var ar, br, cr, dr, er; + + ar = al = H[0]; + br = bl = H[1]; + cr = cl = H[2]; + dr = dl = H[3]; + er = el = H[4]; + // Computation + var t; + for (var i = 0; i < 80; i += 1) { + t = (al + M[offset+zl[i]])|0; + if (i<16){ + t += f1(bl,cl,dl) + hl[0]; + } else if (i<32) { + t += f2(bl,cl,dl) + hl[1]; + } else if (i<48) { + t += f3(bl,cl,dl) + hl[2]; + } else if (i<64) { + t += f4(bl,cl,dl) + hl[3]; + } else {// if (i<80) { + t += f5(bl,cl,dl) + hl[4]; + } + t = t|0; + t = rotl(t,sl[i]); + t = (t+el)|0; + al = el; + el = dl; + dl = rotl(cl, 10); + cl = bl; + bl = t; + + t = (ar + M[offset+zr[i]])|0; + if (i<16){ + t += f5(br,cr,dr) + hr[0]; + } else if (i<32) { + t += f4(br,cr,dr) + hr[1]; + } else if (i<48) { + t += f3(br,cr,dr) + hr[2]; + } else if (i<64) { + t += f2(br,cr,dr) + hr[3]; + } else {// if (i<80) { + t += f1(br,cr,dr) + hr[4]; + } + t = t|0; + t = rotl(t,sr[i]) ; + t = (t+er)|0; + ar = er; + er = dr; + dr = rotl(cr, 10); + cr = br; + br = t; + } + // Intermediate hash value + t = (H[1] + cl + dr)|0; + H[1] = (H[2] + dl + er)|0; + H[2] = (H[3] + el + ar)|0; + H[3] = (H[4] + al + br)|0; + H[4] = (H[0] + bl + cr)|0; + H[0] = t; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | + (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00) + ); + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 5; i++) { + // Shortcut + var H_i = H[i]; + + // Swap + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + + function f1(x, y, z) { + return ((x) ^ (y) ^ (z)); + + } + + function f2(x, y, z) { + return (((x)&(y)) | ((~x)&(z))); + } + + function f3(x, y, z) { + return (((x) | (~(y))) ^ (z)); + } + + function f4(x, y, z) { + return (((x) & (z)) | ((y)&(~(z)))); + } + + function f5(x, y, z) { + return ((x) ^ ((y) |(~(z)))); + + } + + function rotl(x,n) { + return (x<>>(32-n)); + } + + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.RIPEMD160('message'); + * var hash = CryptoJS.RIPEMD160(wordArray); + */ + C.RIPEMD160 = Hasher._createHelper(RIPEMD160); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacRIPEMD160(message, key); + */ + C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); + }(Math)); + + + return CryptoJS.RIPEMD160; + +})); +},{"./core":52}],76:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Reusable object + var W = []; + + /** + * SHA-1 hash algorithm. + */ + var SHA1 = C_algo.SHA1 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476, + 0xc3d2e1f0 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + // Computation + for (var i = 0; i < 80; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; + W[i] = (n << 1) | (n >>> 31); + } + + var t = ((a << 5) | (a >>> 27)) + e + W[i]; + if (i < 20) { + t += ((b & c) | (~b & d)) + 0x5a827999; + } else if (i < 40) { + t += (b ^ c ^ d) + 0x6ed9eba1; + } else if (i < 60) { + t += ((b & c) | (b & d) | (c & d)) - 0x70e44324; + } else /* if (i < 80) */ { + t += (b ^ c ^ d) - 0x359d3e2a; + } + + e = d; + d = c; + c = (b << 30) | (b >>> 2); + b = a; + a = t; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA1('message'); + * var hash = CryptoJS.SHA1(wordArray); + */ + C.SHA1 = Hasher._createHelper(SHA1); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA1(message, key); + */ + C.HmacSHA1 = Hasher._createHmacHelper(SHA1); + }()); + + + return CryptoJS.SHA1; + +})); +},{"./core":52}],77:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./sha256")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./sha256"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_algo = C.algo; + var SHA256 = C_algo.SHA256; + + /** + * SHA-224 hash algorithm. + */ + var SHA224 = C_algo.SHA224 = SHA256.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, + 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 + ]); + }, + + _doFinalize: function () { + var hash = SHA256._doFinalize.call(this); + + hash.sigBytes -= 4; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA224('message'); + * var hash = CryptoJS.SHA224(wordArray); + */ + C.SHA224 = SHA256._createHelper(SHA224); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA224(message, key); + */ + C.HmacSHA224 = SHA256._createHmacHelper(SHA224); + }()); + + + return CryptoJS.SHA224; + +})); +},{"./core":52,"./sha256":78}],78:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Initialization and round constants tables + var H = []; + var K = []; + + // Compute constants + (function () { + function isPrime(n) { + var sqrtN = Math.sqrt(n); + for (var factor = 2; factor <= sqrtN; factor++) { + if (!(n % factor)) { + return false; + } + } + + return true; + } + + function getFractionalBits(n) { + return ((n - (n | 0)) * 0x100000000) | 0; + } + + var n = 2; + var nPrime = 0; + while (nPrime < 64) { + if (isPrime(n)) { + if (nPrime < 8) { + H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); + } + K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); + + nPrime++; + } + + n++; + } + }()); + + // Reusable object + var W = []; + + /** + * SHA-256 hash algorithm. + */ + var SHA256 = C_algo.SHA256 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init(H.slice(0)); + }, + + _doProcessBlock: function (M, offset) { + // Shortcut + var H = this._hash.words; + + // Working variables + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + var f = H[5]; + var g = H[6]; + var h = H[7]; + + // Computation + for (var i = 0; i < 64; i++) { + if (i < 16) { + W[i] = M[offset + i] | 0; + } else { + var gamma0x = W[i - 15]; + var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ + ((gamma0x << 14) | (gamma0x >>> 18)) ^ + (gamma0x >>> 3); + + var gamma1x = W[i - 2]; + var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ + ((gamma1x << 13) | (gamma1x >>> 19)) ^ + (gamma1x >>> 10); + + W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; + } + + var ch = (e & f) ^ (~e & g); + var maj = (a & b) ^ (a & c) ^ (b & c); + + var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22)); + var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25)); + + var t1 = h + sigma1 + ch + K[i] + W[i]; + var t2 = sigma0 + maj; + + h = g; + g = f; + f = e; + e = (d + t1) | 0; + d = c; + c = b; + b = a; + a = (t1 + t2) | 0; + } + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + H[4] = (H[4] + e) | 0; + H[5] = (H[5] + f) | 0; + H[6] = (H[6] + g) | 0; + H[7] = (H[7] + h) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Return final computed hash + return this._hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA256('message'); + * var hash = CryptoJS.SHA256(wordArray); + */ + C.SHA256 = Hasher._createHelper(SHA256); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA256(message, key); + */ + C.HmacSHA256 = Hasher._createHmacHelper(SHA256); + }(Math)); + + + return CryptoJS.SHA256; + +})); +},{"./core":52}],79:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var C_algo = C.algo; + + // Constants tables + var RHO_OFFSETS = []; + var PI_INDEXES = []; + var ROUND_CONSTANTS = []; + + // Compute Constants + (function () { + // Compute rho offset constants + var x = 1, y = 0; + for (var t = 0; t < 24; t++) { + RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64; + + var newX = y % 5; + var newY = (2 * x + 3 * y) % 5; + x = newX; + y = newY; + } + + // Compute pi index constants + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5; + } + } + + // Compute round constants + var LFSR = 0x01; + for (var i = 0; i < 24; i++) { + var roundConstantMsw = 0; + var roundConstantLsw = 0; + + for (var j = 0; j < 7; j++) { + if (LFSR & 0x01) { + var bitPosition = (1 << j) - 1; + if (bitPosition < 32) { + roundConstantLsw ^= 1 << bitPosition; + } else /* if (bitPosition >= 32) */ { + roundConstantMsw ^= 1 << (bitPosition - 32); + } + } + + // Compute next LFSR + if (LFSR & 0x80) { + // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 + LFSR = (LFSR << 1) ^ 0x71; + } else { + LFSR <<= 1; + } + } + + ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); + } + }()); + + // Reusable objects for temporary values + var T = []; + (function () { + for (var i = 0; i < 25; i++) { + T[i] = X64Word.create(); + } + }()); + + /** + * SHA-3 hash algorithm. + */ + var SHA3 = C_algo.SHA3 = Hasher.extend({ + /** + * Configuration options. + * + * @property {number} outputLength + * The desired number of bits in the output hash. + * Only values permitted are: 224, 256, 384, 512. + * Default: 512 + */ + cfg: Hasher.cfg.extend({ + outputLength: 512 + }), + + _doReset: function () { + var state = this._state = [] + for (var i = 0; i < 25; i++) { + state[i] = new X64Word.init(); + } + + this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var state = this._state; + var nBlockSizeLanes = this.blockSize / 2; + + // Absorb + for (var i = 0; i < nBlockSizeLanes; i++) { + // Shortcuts + var M2i = M[offset + 2 * i]; + var M2i1 = M[offset + 2 * i + 1]; + + // Swap endian + M2i = ( + (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | + (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00) + ); + M2i1 = ( + (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | + (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00) + ); + + // Absorb message into state + var lane = state[i]; + lane.high ^= M2i1; + lane.low ^= M2i; + } + + // Rounds + for (var round = 0; round < 24; round++) { + // Theta + for (var x = 0; x < 5; x++) { + // Mix column lanes + var tMsw = 0, tLsw = 0; + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + tMsw ^= lane.high; + tLsw ^= lane.low; + } + + // Temporary values + var Tx = T[x]; + Tx.high = tMsw; + Tx.low = tLsw; + } + for (var x = 0; x < 5; x++) { + // Shortcuts + var Tx4 = T[(x + 4) % 5]; + var Tx1 = T[(x + 1) % 5]; + var Tx1Msw = Tx1.high; + var Tx1Lsw = Tx1.low; + + // Mix surrounding columns + var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31)); + var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31)); + for (var y = 0; y < 5; y++) { + var lane = state[x + 5 * y]; + lane.high ^= tMsw; + lane.low ^= tLsw; + } + } + + // Rho Pi + for (var laneIndex = 1; laneIndex < 25; laneIndex++) { + // Shortcuts + var lane = state[laneIndex]; + var laneMsw = lane.high; + var laneLsw = lane.low; + var rhoOffset = RHO_OFFSETS[laneIndex]; + + // Rotate lanes + if (rhoOffset < 32) { + var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset)); + var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset)); + } else /* if (rhoOffset >= 32) */ { + var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset)); + var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset)); + } + + // Transpose lanes + var TPiLane = T[PI_INDEXES[laneIndex]]; + TPiLane.high = tMsw; + TPiLane.low = tLsw; + } + + // Rho pi at x = y = 0 + var T0 = T[0]; + var state0 = state[0]; + T0.high = state0.high; + T0.low = state0.low; + + // Chi + for (var x = 0; x < 5; x++) { + for (var y = 0; y < 5; y++) { + // Shortcuts + var laneIndex = x + 5 * y; + var lane = state[laneIndex]; + var TLane = T[laneIndex]; + var Tx1Lane = T[((x + 1) % 5) + 5 * y]; + var Tx2Lane = T[((x + 2) % 5) + 5 * y]; + + // Mix rows + lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high); + lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low); + } + } + + // Iota + var lane = state[0]; + var roundConstant = ROUND_CONSTANTS[round]; + lane.high ^= roundConstant.high; + lane.low ^= roundConstant.low;; + } + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + var blockSizeBits = this.blockSize * 32; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32); + dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var state = this._state; + var outputLengthBytes = this.cfg.outputLength / 8; + var outputLengthLanes = outputLengthBytes / 8; + + // Squeeze + var hashWords = []; + for (var i = 0; i < outputLengthLanes; i++) { + // Shortcuts + var lane = state[i]; + var laneMsw = lane.high; + var laneLsw = lane.low; + + // Swap endian + laneMsw = ( + (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | + (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00) + ); + laneLsw = ( + (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | + (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00) + ); + + // Squeeze state to retrieve hash + hashWords.push(laneLsw); + hashWords.push(laneMsw); + } + + // Return final computed hash + return new WordArray.init(hashWords, outputLengthBytes); + }, + + clone: function () { + var clone = Hasher.clone.call(this); + + var state = clone._state = this._state.slice(0); + for (var i = 0; i < 25; i++) { + state[i] = state[i].clone(); + } + + return clone; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA3('message'); + * var hash = CryptoJS.SHA3(wordArray); + */ + C.SHA3 = Hasher._createHelper(SHA3); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA3(message, key); + */ + C.HmacSHA3 = Hasher._createHmacHelper(SHA3); + }(Math)); + + + return CryptoJS.SHA3; + +})); +},{"./core":52,"./x64-core":83}],80:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core"), require("./sha512")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core", "./sha512"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + var SHA512 = C_algo.SHA512; + + /** + * SHA-384 hash algorithm. + */ + var SHA384 = C_algo.SHA384 = SHA512.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), + new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), + new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), + new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4) + ]); + }, + + _doFinalize: function () { + var hash = SHA512._doFinalize.call(this); + + hash.sigBytes -= 16; + + return hash; + } + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA384('message'); + * var hash = CryptoJS.SHA384(wordArray); + */ + C.SHA384 = SHA512._createHelper(SHA384); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA384(message, key); + */ + C.HmacSHA384 = SHA512._createHmacHelper(SHA384); + }()); + + + return CryptoJS.SHA384; + +})); +},{"./core":52,"./sha512":81,"./x64-core":83}],81:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./x64-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./x64-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Hasher = C_lib.Hasher; + var C_x64 = C.x64; + var X64Word = C_x64.Word; + var X64WordArray = C_x64.WordArray; + var C_algo = C.algo; + + function X64Word_create() { + return X64Word.create.apply(X64Word, arguments); + } + + // Constants + var K = [ + X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), + X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), + X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), + X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), + X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), + X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), + X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), + X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), + X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), + X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), + X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), + X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), + X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), + X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), + X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), + X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), + X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), + X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), + X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), + X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), + X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), + X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), + X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), + X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), + X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), + X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), + X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), + X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), + X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), + X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), + X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), + X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), + X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), + X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), + X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), + X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), + X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), + X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), + X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), + X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817) + ]; + + // Reusable objects + var W = []; + (function () { + for (var i = 0; i < 80; i++) { + W[i] = X64Word_create(); + } + }()); + + /** + * SHA-512 hash algorithm. + */ + var SHA512 = C_algo.SHA512 = Hasher.extend({ + _doReset: function () { + this._hash = new X64WordArray.init([ + new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), + new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), + new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), + new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179) + ]); + }, + + _doProcessBlock: function (M, offset) { + // Shortcuts + var H = this._hash.words; + + var H0 = H[0]; + var H1 = H[1]; + var H2 = H[2]; + var H3 = H[3]; + var H4 = H[4]; + var H5 = H[5]; + var H6 = H[6]; + var H7 = H[7]; + + var H0h = H0.high; + var H0l = H0.low; + var H1h = H1.high; + var H1l = H1.low; + var H2h = H2.high; + var H2l = H2.low; + var H3h = H3.high; + var H3l = H3.low; + var H4h = H4.high; + var H4l = H4.low; + var H5h = H5.high; + var H5l = H5.low; + var H6h = H6.high; + var H6l = H6.low; + var H7h = H7.high; + var H7l = H7.low; + + // Working variables + var ah = H0h; + var al = H0l; + var bh = H1h; + var bl = H1l; + var ch = H2h; + var cl = H2l; + var dh = H3h; + var dl = H3l; + var eh = H4h; + var el = H4l; + var fh = H5h; + var fl = H5l; + var gh = H6h; + var gl = H6l; + var hh = H7h; + var hl = H7l; + + // Rounds + for (var i = 0; i < 80; i++) { + // Shortcut + var Wi = W[i]; + + // Extend message + if (i < 16) { + var Wih = Wi.high = M[offset + i * 2] | 0; + var Wil = Wi.low = M[offset + i * 2 + 1] | 0; + } else { + // Gamma0 + var gamma0x = W[i - 15]; + var gamma0xh = gamma0x.high; + var gamma0xl = gamma0x.low; + var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7); + var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25)); + + // Gamma1 + var gamma1x = W[i - 2]; + var gamma1xh = gamma1x.high; + var gamma1xl = gamma1x.low; + var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6); + var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26)); + + // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] + var Wi7 = W[i - 7]; + var Wi7h = Wi7.high; + var Wi7l = Wi7.low; + + var Wi16 = W[i - 16]; + var Wi16h = Wi16.high; + var Wi16l = Wi16.low; + + var Wil = gamma0l + Wi7l; + var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0); + var Wil = Wil + gamma1l; + var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0); + var Wil = Wil + Wi16l; + var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0); + + Wi.high = Wih; + Wi.low = Wil; + } + + var chh = (eh & fh) ^ (~eh & gh); + var chl = (el & fl) ^ (~el & gl); + var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch); + var majl = (al & bl) ^ (al & cl) ^ (bl & cl); + + var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7)); + var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7)); + var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9)); + var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9)); + + // t1 = h + sigma1 + ch + K[i] + W[i] + var Ki = K[i]; + var Kih = Ki.high; + var Kil = Ki.low; + + var t1l = hl + sigma1l; + var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0); + var t1l = t1l + chl; + var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0); + var t1l = t1l + Kil; + var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0); + var t1l = t1l + Wil; + var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0); + + // t2 = sigma0 + maj + var t2l = sigma0l + majl; + var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0); + + // Update working variables + hh = gh; + hl = gl; + gh = fh; + gl = fl; + fh = eh; + fl = el; + el = (dl + t1l) | 0; + eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0; + dh = ch; + dl = cl; + ch = bh; + cl = bl; + bh = ah; + bl = al; + al = (t1l + t2l) | 0; + ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0; + } + + // Intermediate hash value + H0l = H0.low = (H0l + al); + H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0)); + H1l = H1.low = (H1l + bl); + H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0)); + H2l = H2.low = (H2l + cl); + H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0)); + H3l = H3.low = (H3l + dl); + H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0)); + H4l = H4.low = (H4l + el); + H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0)); + H5l = H5.low = (H5l + fl); + H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0)); + H6l = H6.low = (H6l + gl); + H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0)); + H7l = H7.low = (H7l + hl); + H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0)); + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); + dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal; + data.sigBytes = dataWords.length * 4; + + // Hash final blocks + this._process(); + + // Convert hash to 32-bit word array before returning + var hash = this._hash.toX32(); + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + }, + + blockSize: 1024/32 + }); + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.SHA512('message'); + * var hash = CryptoJS.SHA512(wordArray); + */ + C.SHA512 = Hasher._createHelper(SHA512); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacSHA512(message, key); + */ + C.HmacSHA512 = Hasher._createHmacHelper(SHA512); + }()); + + + return CryptoJS.SHA512; + +})); +},{"./core":52,"./x64-core":83}],82:[function(require,module,exports){ +;(function (root, factory, undef) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Permuted Choice 1 constants + var PC1 = [ + 57, 49, 41, 33, 25, 17, 9, 1, + 58, 50, 42, 34, 26, 18, 10, 2, + 59, 51, 43, 35, 27, 19, 11, 3, + 60, 52, 44, 36, 63, 55, 47, 39, + 31, 23, 15, 7, 62, 54, 46, 38, + 30, 22, 14, 6, 61, 53, 45, 37, + 29, 21, 13, 5, 28, 20, 12, 4 + ]; + + // Permuted Choice 2 constants + var PC2 = [ + 14, 17, 11, 24, 1, 5, + 3, 28, 15, 6, 21, 10, + 23, 19, 12, 4, 26, 8, + 16, 7, 27, 20, 13, 2, + 41, 52, 31, 37, 47, 55, + 30, 40, 51, 45, 33, 48, + 44, 49, 39, 56, 34, 53, + 46, 42, 50, 36, 29, 32 + ]; + + // Cumulative bit shift constants + var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; + + // SBOXes and round permutation constants + var SBOX_P = [ + { + 0x0: 0x808200, + 0x10000000: 0x8000, + 0x20000000: 0x808002, + 0x30000000: 0x2, + 0x40000000: 0x200, + 0x50000000: 0x808202, + 0x60000000: 0x800202, + 0x70000000: 0x800000, + 0x80000000: 0x202, + 0x90000000: 0x800200, + 0xa0000000: 0x8200, + 0xb0000000: 0x808000, + 0xc0000000: 0x8002, + 0xd0000000: 0x800002, + 0xe0000000: 0x0, + 0xf0000000: 0x8202, + 0x8000000: 0x0, + 0x18000000: 0x808202, + 0x28000000: 0x8202, + 0x38000000: 0x8000, + 0x48000000: 0x808200, + 0x58000000: 0x200, + 0x68000000: 0x808002, + 0x78000000: 0x2, + 0x88000000: 0x800200, + 0x98000000: 0x8200, + 0xa8000000: 0x808000, + 0xb8000000: 0x800202, + 0xc8000000: 0x800002, + 0xd8000000: 0x8002, + 0xe8000000: 0x202, + 0xf8000000: 0x800000, + 0x1: 0x8000, + 0x10000001: 0x2, + 0x20000001: 0x808200, + 0x30000001: 0x800000, + 0x40000001: 0x808002, + 0x50000001: 0x8200, + 0x60000001: 0x200, + 0x70000001: 0x800202, + 0x80000001: 0x808202, + 0x90000001: 0x808000, + 0xa0000001: 0x800002, + 0xb0000001: 0x8202, + 0xc0000001: 0x202, + 0xd0000001: 0x800200, + 0xe0000001: 0x8002, + 0xf0000001: 0x0, + 0x8000001: 0x808202, + 0x18000001: 0x808000, + 0x28000001: 0x800000, + 0x38000001: 0x200, + 0x48000001: 0x8000, + 0x58000001: 0x800002, + 0x68000001: 0x2, + 0x78000001: 0x8202, + 0x88000001: 0x8002, + 0x98000001: 0x800202, + 0xa8000001: 0x202, + 0xb8000001: 0x808200, + 0xc8000001: 0x800200, + 0xd8000001: 0x0, + 0xe8000001: 0x8200, + 0xf8000001: 0x808002 + }, + { + 0x0: 0x40084010, + 0x1000000: 0x4000, + 0x2000000: 0x80000, + 0x3000000: 0x40080010, + 0x4000000: 0x40000010, + 0x5000000: 0x40084000, + 0x6000000: 0x40004000, + 0x7000000: 0x10, + 0x8000000: 0x84000, + 0x9000000: 0x40004010, + 0xa000000: 0x40000000, + 0xb000000: 0x84010, + 0xc000000: 0x80010, + 0xd000000: 0x0, + 0xe000000: 0x4010, + 0xf000000: 0x40080000, + 0x800000: 0x40004000, + 0x1800000: 0x84010, + 0x2800000: 0x10, + 0x3800000: 0x40004010, + 0x4800000: 0x40084010, + 0x5800000: 0x40000000, + 0x6800000: 0x80000, + 0x7800000: 0x40080010, + 0x8800000: 0x80010, + 0x9800000: 0x0, + 0xa800000: 0x4000, + 0xb800000: 0x40080000, + 0xc800000: 0x40000010, + 0xd800000: 0x84000, + 0xe800000: 0x40084000, + 0xf800000: 0x4010, + 0x10000000: 0x0, + 0x11000000: 0x40080010, + 0x12000000: 0x40004010, + 0x13000000: 0x40084000, + 0x14000000: 0x40080000, + 0x15000000: 0x10, + 0x16000000: 0x84010, + 0x17000000: 0x4000, + 0x18000000: 0x4010, + 0x19000000: 0x80000, + 0x1a000000: 0x80010, + 0x1b000000: 0x40000010, + 0x1c000000: 0x84000, + 0x1d000000: 0x40004000, + 0x1e000000: 0x40000000, + 0x1f000000: 0x40084010, + 0x10800000: 0x84010, + 0x11800000: 0x80000, + 0x12800000: 0x40080000, + 0x13800000: 0x4000, + 0x14800000: 0x40004000, + 0x15800000: 0x40084010, + 0x16800000: 0x10, + 0x17800000: 0x40000000, + 0x18800000: 0x40084000, + 0x19800000: 0x40000010, + 0x1a800000: 0x40004010, + 0x1b800000: 0x80010, + 0x1c800000: 0x0, + 0x1d800000: 0x4010, + 0x1e800000: 0x40080010, + 0x1f800000: 0x84000 + }, + { + 0x0: 0x104, + 0x100000: 0x0, + 0x200000: 0x4000100, + 0x300000: 0x10104, + 0x400000: 0x10004, + 0x500000: 0x4000004, + 0x600000: 0x4010104, + 0x700000: 0x4010000, + 0x800000: 0x4000000, + 0x900000: 0x4010100, + 0xa00000: 0x10100, + 0xb00000: 0x4010004, + 0xc00000: 0x4000104, + 0xd00000: 0x10000, + 0xe00000: 0x4, + 0xf00000: 0x100, + 0x80000: 0x4010100, + 0x180000: 0x4010004, + 0x280000: 0x0, + 0x380000: 0x4000100, + 0x480000: 0x4000004, + 0x580000: 0x10000, + 0x680000: 0x10004, + 0x780000: 0x104, + 0x880000: 0x4, + 0x980000: 0x100, + 0xa80000: 0x4010000, + 0xb80000: 0x10104, + 0xc80000: 0x10100, + 0xd80000: 0x4000104, + 0xe80000: 0x4010104, + 0xf80000: 0x4000000, + 0x1000000: 0x4010100, + 0x1100000: 0x10004, + 0x1200000: 0x10000, + 0x1300000: 0x4000100, + 0x1400000: 0x100, + 0x1500000: 0x4010104, + 0x1600000: 0x4000004, + 0x1700000: 0x0, + 0x1800000: 0x4000104, + 0x1900000: 0x4000000, + 0x1a00000: 0x4, + 0x1b00000: 0x10100, + 0x1c00000: 0x4010000, + 0x1d00000: 0x104, + 0x1e00000: 0x10104, + 0x1f00000: 0x4010004, + 0x1080000: 0x4000000, + 0x1180000: 0x104, + 0x1280000: 0x4010100, + 0x1380000: 0x0, + 0x1480000: 0x10004, + 0x1580000: 0x4000100, + 0x1680000: 0x100, + 0x1780000: 0x4010004, + 0x1880000: 0x10000, + 0x1980000: 0x4010104, + 0x1a80000: 0x10104, + 0x1b80000: 0x4000004, + 0x1c80000: 0x4000104, + 0x1d80000: 0x4010000, + 0x1e80000: 0x4, + 0x1f80000: 0x10100 + }, + { + 0x0: 0x80401000, + 0x10000: 0x80001040, + 0x20000: 0x401040, + 0x30000: 0x80400000, + 0x40000: 0x0, + 0x50000: 0x401000, + 0x60000: 0x80000040, + 0x70000: 0x400040, + 0x80000: 0x80000000, + 0x90000: 0x400000, + 0xa0000: 0x40, + 0xb0000: 0x80001000, + 0xc0000: 0x80400040, + 0xd0000: 0x1040, + 0xe0000: 0x1000, + 0xf0000: 0x80401040, + 0x8000: 0x80001040, + 0x18000: 0x40, + 0x28000: 0x80400040, + 0x38000: 0x80001000, + 0x48000: 0x401000, + 0x58000: 0x80401040, + 0x68000: 0x0, + 0x78000: 0x80400000, + 0x88000: 0x1000, + 0x98000: 0x80401000, + 0xa8000: 0x400000, + 0xb8000: 0x1040, + 0xc8000: 0x80000000, + 0xd8000: 0x400040, + 0xe8000: 0x401040, + 0xf8000: 0x80000040, + 0x100000: 0x400040, + 0x110000: 0x401000, + 0x120000: 0x80000040, + 0x130000: 0x0, + 0x140000: 0x1040, + 0x150000: 0x80400040, + 0x160000: 0x80401000, + 0x170000: 0x80001040, + 0x180000: 0x80401040, + 0x190000: 0x80000000, + 0x1a0000: 0x80400000, + 0x1b0000: 0x401040, + 0x1c0000: 0x80001000, + 0x1d0000: 0x400000, + 0x1e0000: 0x40, + 0x1f0000: 0x1000, + 0x108000: 0x80400000, + 0x118000: 0x80401040, + 0x128000: 0x0, + 0x138000: 0x401000, + 0x148000: 0x400040, + 0x158000: 0x80000000, + 0x168000: 0x80001040, + 0x178000: 0x40, + 0x188000: 0x80000040, + 0x198000: 0x1000, + 0x1a8000: 0x80001000, + 0x1b8000: 0x80400040, + 0x1c8000: 0x1040, + 0x1d8000: 0x80401000, + 0x1e8000: 0x400000, + 0x1f8000: 0x401040 + }, + { + 0x0: 0x80, + 0x1000: 0x1040000, + 0x2000: 0x40000, + 0x3000: 0x20000000, + 0x4000: 0x20040080, + 0x5000: 0x1000080, + 0x6000: 0x21000080, + 0x7000: 0x40080, + 0x8000: 0x1000000, + 0x9000: 0x20040000, + 0xa000: 0x20000080, + 0xb000: 0x21040080, + 0xc000: 0x21040000, + 0xd000: 0x0, + 0xe000: 0x1040080, + 0xf000: 0x21000000, + 0x800: 0x1040080, + 0x1800: 0x21000080, + 0x2800: 0x80, + 0x3800: 0x1040000, + 0x4800: 0x40000, + 0x5800: 0x20040080, + 0x6800: 0x21040000, + 0x7800: 0x20000000, + 0x8800: 0x20040000, + 0x9800: 0x0, + 0xa800: 0x21040080, + 0xb800: 0x1000080, + 0xc800: 0x20000080, + 0xd800: 0x21000000, + 0xe800: 0x1000000, + 0xf800: 0x40080, + 0x10000: 0x40000, + 0x11000: 0x80, + 0x12000: 0x20000000, + 0x13000: 0x21000080, + 0x14000: 0x1000080, + 0x15000: 0x21040000, + 0x16000: 0x20040080, + 0x17000: 0x1000000, + 0x18000: 0x21040080, + 0x19000: 0x21000000, + 0x1a000: 0x1040000, + 0x1b000: 0x20040000, + 0x1c000: 0x40080, + 0x1d000: 0x20000080, + 0x1e000: 0x0, + 0x1f000: 0x1040080, + 0x10800: 0x21000080, + 0x11800: 0x1000000, + 0x12800: 0x1040000, + 0x13800: 0x20040080, + 0x14800: 0x20000000, + 0x15800: 0x1040080, + 0x16800: 0x80, + 0x17800: 0x21040000, + 0x18800: 0x40080, + 0x19800: 0x21040080, + 0x1a800: 0x0, + 0x1b800: 0x21000000, + 0x1c800: 0x1000080, + 0x1d800: 0x40000, + 0x1e800: 0x20040000, + 0x1f800: 0x20000080 + }, + { + 0x0: 0x10000008, + 0x100: 0x2000, + 0x200: 0x10200000, + 0x300: 0x10202008, + 0x400: 0x10002000, + 0x500: 0x200000, + 0x600: 0x200008, + 0x700: 0x10000000, + 0x800: 0x0, + 0x900: 0x10002008, + 0xa00: 0x202000, + 0xb00: 0x8, + 0xc00: 0x10200008, + 0xd00: 0x202008, + 0xe00: 0x2008, + 0xf00: 0x10202000, + 0x80: 0x10200000, + 0x180: 0x10202008, + 0x280: 0x8, + 0x380: 0x200000, + 0x480: 0x202008, + 0x580: 0x10000008, + 0x680: 0x10002000, + 0x780: 0x2008, + 0x880: 0x200008, + 0x980: 0x2000, + 0xa80: 0x10002008, + 0xb80: 0x10200008, + 0xc80: 0x0, + 0xd80: 0x10202000, + 0xe80: 0x202000, + 0xf80: 0x10000000, + 0x1000: 0x10002000, + 0x1100: 0x10200008, + 0x1200: 0x10202008, + 0x1300: 0x2008, + 0x1400: 0x200000, + 0x1500: 0x10000000, + 0x1600: 0x10000008, + 0x1700: 0x202000, + 0x1800: 0x202008, + 0x1900: 0x0, + 0x1a00: 0x8, + 0x1b00: 0x10200000, + 0x1c00: 0x2000, + 0x1d00: 0x10002008, + 0x1e00: 0x10202000, + 0x1f00: 0x200008, + 0x1080: 0x8, + 0x1180: 0x202000, + 0x1280: 0x200000, + 0x1380: 0x10000008, + 0x1480: 0x10002000, + 0x1580: 0x2008, + 0x1680: 0x10202008, + 0x1780: 0x10200000, + 0x1880: 0x10202000, + 0x1980: 0x10200008, + 0x1a80: 0x2000, + 0x1b80: 0x202008, + 0x1c80: 0x200008, + 0x1d80: 0x0, + 0x1e80: 0x10000000, + 0x1f80: 0x10002008 + }, + { + 0x0: 0x100000, + 0x10: 0x2000401, + 0x20: 0x400, + 0x30: 0x100401, + 0x40: 0x2100401, + 0x50: 0x0, + 0x60: 0x1, + 0x70: 0x2100001, + 0x80: 0x2000400, + 0x90: 0x100001, + 0xa0: 0x2000001, + 0xb0: 0x2100400, + 0xc0: 0x2100000, + 0xd0: 0x401, + 0xe0: 0x100400, + 0xf0: 0x2000000, + 0x8: 0x2100001, + 0x18: 0x0, + 0x28: 0x2000401, + 0x38: 0x2100400, + 0x48: 0x100000, + 0x58: 0x2000001, + 0x68: 0x2000000, + 0x78: 0x401, + 0x88: 0x100401, + 0x98: 0x2000400, + 0xa8: 0x2100000, + 0xb8: 0x100001, + 0xc8: 0x400, + 0xd8: 0x2100401, + 0xe8: 0x1, + 0xf8: 0x100400, + 0x100: 0x2000000, + 0x110: 0x100000, + 0x120: 0x2000401, + 0x130: 0x2100001, + 0x140: 0x100001, + 0x150: 0x2000400, + 0x160: 0x2100400, + 0x170: 0x100401, + 0x180: 0x401, + 0x190: 0x2100401, + 0x1a0: 0x100400, + 0x1b0: 0x1, + 0x1c0: 0x0, + 0x1d0: 0x2100000, + 0x1e0: 0x2000001, + 0x1f0: 0x400, + 0x108: 0x100400, + 0x118: 0x2000401, + 0x128: 0x2100001, + 0x138: 0x1, + 0x148: 0x2000000, + 0x158: 0x100000, + 0x168: 0x401, + 0x178: 0x2100400, + 0x188: 0x2000001, + 0x198: 0x2100000, + 0x1a8: 0x0, + 0x1b8: 0x2100401, + 0x1c8: 0x100401, + 0x1d8: 0x400, + 0x1e8: 0x2000400, + 0x1f8: 0x100001 + }, + { + 0x0: 0x8000820, + 0x1: 0x20000, + 0x2: 0x8000000, + 0x3: 0x20, + 0x4: 0x20020, + 0x5: 0x8020820, + 0x6: 0x8020800, + 0x7: 0x800, + 0x8: 0x8020000, + 0x9: 0x8000800, + 0xa: 0x20800, + 0xb: 0x8020020, + 0xc: 0x820, + 0xd: 0x0, + 0xe: 0x8000020, + 0xf: 0x20820, + 0x80000000: 0x800, + 0x80000001: 0x8020820, + 0x80000002: 0x8000820, + 0x80000003: 0x8000000, + 0x80000004: 0x8020000, + 0x80000005: 0x20800, + 0x80000006: 0x20820, + 0x80000007: 0x20, + 0x80000008: 0x8000020, + 0x80000009: 0x820, + 0x8000000a: 0x20020, + 0x8000000b: 0x8020800, + 0x8000000c: 0x0, + 0x8000000d: 0x8020020, + 0x8000000e: 0x8000800, + 0x8000000f: 0x20000, + 0x10: 0x20820, + 0x11: 0x8020800, + 0x12: 0x20, + 0x13: 0x800, + 0x14: 0x8000800, + 0x15: 0x8000020, + 0x16: 0x8020020, + 0x17: 0x20000, + 0x18: 0x0, + 0x19: 0x20020, + 0x1a: 0x8020000, + 0x1b: 0x8000820, + 0x1c: 0x8020820, + 0x1d: 0x20800, + 0x1e: 0x820, + 0x1f: 0x8000000, + 0x80000010: 0x20000, + 0x80000011: 0x800, + 0x80000012: 0x8020020, + 0x80000013: 0x20820, + 0x80000014: 0x20, + 0x80000015: 0x8020000, + 0x80000016: 0x8000000, + 0x80000017: 0x8000820, + 0x80000018: 0x8020820, + 0x80000019: 0x8000020, + 0x8000001a: 0x8000800, + 0x8000001b: 0x0, + 0x8000001c: 0x20800, + 0x8000001d: 0x820, + 0x8000001e: 0x20020, + 0x8000001f: 0x8020800 + } + ]; + + // Masks that select the SBOX input + var SBOX_MASK = [ + 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, + 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f + ]; + + /** + * DES block cipher algorithm. + */ + var DES = C_algo.DES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Select 56 bits according to PC1 + var keyBits = []; + for (var i = 0; i < 56; i++) { + var keyBitPos = PC1[i] - 1; + keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1; + } + + // Assemble 16 subkeys + var subKeys = this._subKeys = []; + for (var nSubKey = 0; nSubKey < 16; nSubKey++) { + // Create subkey + var subKey = subKeys[nSubKey] = []; + + // Shortcut + var bitShift = BIT_SHIFTS[nSubKey]; + + // Select 48 bits according to PC2 + for (var i = 0; i < 24; i++) { + // Select from the left 28 key bits + subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6); + + // Select from the right 28 key bits + subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6); + } + + // Since each subkey is applied to an expanded 32-bit input, + // the subkey can be broken into 8 values scaled to 32-bits, + // which allows the key to be used without expansion + subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31); + for (var i = 1; i < 7; i++) { + subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3); + } + subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27); + } + + // Compute inverse subkeys + var invSubKeys = this._invSubKeys = []; + for (var i = 0; i < 16; i++) { + invSubKeys[i] = subKeys[15 - i]; + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._subKeys); + }, + + decryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._invSubKeys); + }, + + _doCryptBlock: function (M, offset, subKeys) { + // Get input + this._lBlock = M[offset]; + this._rBlock = M[offset + 1]; + + // Initial permutation + exchangeLR.call(this, 4, 0x0f0f0f0f); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeRL.call(this, 2, 0x33333333); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeLR.call(this, 1, 0x55555555); + + // Rounds + for (var round = 0; round < 16; round++) { + // Shortcuts + var subKey = subKeys[round]; + var lBlock = this._lBlock; + var rBlock = this._rBlock; + + // Feistel function + var f = 0; + for (var i = 0; i < 8; i++) { + f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; + } + this._lBlock = rBlock; + this._rBlock = lBlock ^ f; + } + + // Undo swap from last round + var t = this._lBlock; + this._lBlock = this._rBlock; + this._rBlock = t; + + // Final permutation + exchangeLR.call(this, 1, 0x55555555); + exchangeRL.call(this, 8, 0x00ff00ff); + exchangeRL.call(this, 2, 0x33333333); + exchangeLR.call(this, 16, 0x0000ffff); + exchangeLR.call(this, 4, 0x0f0f0f0f); + + // Set output + M[offset] = this._lBlock; + M[offset + 1] = this._rBlock; + }, + + keySize: 64/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + // Swap bits across the left and right words + function exchangeLR(offset, mask) { + var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask; + this._rBlock ^= t; + this._lBlock ^= t << offset; + } + + function exchangeRL(offset, mask) { + var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask; + this._lBlock ^= t; + this._rBlock ^= t << offset; + } + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); + */ + C.DES = BlockCipher._createHelper(DES); + + /** + * Triple-DES block cipher algorithm. + */ + var TripleDES = C_algo.TripleDES = BlockCipher.extend({ + _doReset: function () { + // Shortcuts + var key = this._key; + var keyWords = key.words; + + // Create DES instances + this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2))); + this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4))); + this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6))); + }, + + encryptBlock: function (M, offset) { + this._des1.encryptBlock(M, offset); + this._des2.decryptBlock(M, offset); + this._des3.encryptBlock(M, offset); + }, + + decryptBlock: function (M, offset) { + this._des3.decryptBlock(M, offset); + this._des2.encryptBlock(M, offset); + this._des1.decryptBlock(M, offset); + }, + + keySize: 192/32, + + ivSize: 64/32, + + blockSize: 64/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); + */ + C.TripleDES = BlockCipher._createHelper(TripleDES); + }()); + + + return CryptoJS.TripleDES; + +})); +},{"./cipher-core":51,"./core":52,"./enc-base64":53,"./evpkdf":55,"./md5":60}],83:[function(require,module,exports){ +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = exports = factory(require("./core")); + } + else if (typeof define === "function" && define.amd) { + // AMD + define(["./core"], factory); + } + else { + // Global (browser) + factory(root.CryptoJS); + } +}(this, function (CryptoJS) { + + (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var X32WordArray = C_lib.WordArray; + + /** + * x64 namespace. + */ + var C_x64 = C.x64 = {}; + + /** + * A 64-bit word. + */ + var X64Word = C_x64.Word = Base.extend({ + /** + * Initializes a newly created 64-bit word. + * + * @param {number} high The high 32 bits. + * @param {number} low The low 32 bits. + * + * @example + * + * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); + */ + init: function (high, low) { + this.high = high; + this.low = low; + } + + /** + * Bitwise NOTs this word. + * + * @return {X64Word} A new x64-Word object after negating. + * + * @example + * + * var negated = x64Word.not(); + */ + // not: function () { + // var high = ~this.high; + // var low = ~this.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ANDs this word with the passed word. + * + * @param {X64Word} word The x64-Word to AND with this word. + * + * @return {X64Word} A new x64-Word object after ANDing. + * + * @example + * + * var anded = x64Word.and(anotherX64Word); + */ + // and: function (word) { + // var high = this.high & word.high; + // var low = this.low & word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise ORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to OR with this word. + * + * @return {X64Word} A new x64-Word object after ORing. + * + * @example + * + * var ored = x64Word.or(anotherX64Word); + */ + // or: function (word) { + // var high = this.high | word.high; + // var low = this.low | word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Bitwise XORs this word with the passed word. + * + * @param {X64Word} word The x64-Word to XOR with this word. + * + * @return {X64Word} A new x64-Word object after XORing. + * + * @example + * + * var xored = x64Word.xor(anotherX64Word); + */ + // xor: function (word) { + // var high = this.high ^ word.high; + // var low = this.low ^ word.low; + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the left. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftL(25); + */ + // shiftL: function (n) { + // if (n < 32) { + // var high = (this.high << n) | (this.low >>> (32 - n)); + // var low = this.low << n; + // } else { + // var high = this.low << (n - 32); + // var low = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Shifts this word n bits to the right. + * + * @param {number} n The number of bits to shift. + * + * @return {X64Word} A new x64-Word object after shifting. + * + * @example + * + * var shifted = x64Word.shiftR(7); + */ + // shiftR: function (n) { + // if (n < 32) { + // var low = (this.low >>> n) | (this.high << (32 - n)); + // var high = this.high >>> n; + // } else { + // var low = this.high >>> (n - 32); + // var high = 0; + // } + + // return X64Word.create(high, low); + // }, + + /** + * Rotates this word n bits to the left. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotL(25); + */ + // rotL: function (n) { + // return this.shiftL(n).or(this.shiftR(64 - n)); + // }, + + /** + * Rotates this word n bits to the right. + * + * @param {number} n The number of bits to rotate. + * + * @return {X64Word} A new x64-Word object after rotating. + * + * @example + * + * var rotated = x64Word.rotR(7); + */ + // rotR: function (n) { + // return this.shiftR(n).or(this.shiftL(64 - n)); + // }, + + /** + * Adds this word with the passed word. + * + * @param {X64Word} word The x64-Word to add with this word. + * + * @return {X64Word} A new x64-Word object after adding. + * + * @example + * + * var added = x64Word.add(anotherX64Word); + */ + // add: function (word) { + // var low = (this.low + word.low) | 0; + // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; + // var high = (this.high + word.high + carry) | 0; + + // return X64Word.create(high, low); + // } + }); + + /** + * An array of 64-bit words. + * + * @property {Array} words The array of CryptoJS.x64.Word objects. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var X64WordArray = C_x64.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.x64.WordArray.create(); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ]); + * + * var wordArray = CryptoJS.x64.WordArray.create([ + * CryptoJS.x64.Word.create(0x00010203, 0x04050607), + * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) + * ], 10); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 8; + } + }, + + /** + * Converts this 64-bit word array to a 32-bit word array. + * + * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. + * + * @example + * + * var x32WordArray = x64WordArray.toX32(); + */ + toX32: function () { + // Shortcuts + var x64Words = this.words; + var x64WordsLength = x64Words.length; + + // Convert + var x32Words = []; + for (var i = 0; i < x64WordsLength; i++) { + var x64Word = x64Words[i]; + x32Words.push(x64Word.high); + x32Words.push(x64Word.low); + } + + return X32WordArray.create(x32Words, this.sigBytes); + }, + + /** + * Creates a copy of this word array. + * + * @return {X64WordArray} The clone. + * + * @example + * + * var clone = x64WordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + + // Clone "words" array + var words = clone.words = this.words.slice(0); + + // Clone each X64Word object + var wordsLength = words.length; + for (var i = 0; i < wordsLength; i++) { + words[i] = words[i].clone(); + } + + return clone; + } + }); + }()); + + + return CryptoJS; + +})); +},{"./core":52}],84:[function(require,module,exports){ +/*! https://mths.be/utf8js v2.1.2 by @mathias */ +;(function(root) { + + // Detect free variables `exports` + var freeExports = typeof exports == 'object' && exports; + + // Detect free variable `module` + var freeModule = typeof module == 'object' && module && + module.exports == freeExports && module; + + // Detect free variable `global`, from Node.js or Browserified code, + // and use it as `root` + var freeGlobal = typeof global == 'object' && global; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { + root = freeGlobal; + } + + /*--------------------------------------------------------------------------*/ + + var stringFromCharCode = String.fromCharCode; + + // Taken from https://mths.be/punycode + function ucs2decode(string) { + var output = []; + var counter = 0; + var length = string.length; + var value; + var extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + // Taken from https://mths.be/punycode + function ucs2encode(array) { + var length = array.length; + var index = -1; + var value; + var output = ''; + while (++index < length) { + value = array[index]; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + } + return output; + } + + function checkScalarValue(codePoint) { + if (codePoint >= 0xD800 && codePoint <= 0xDFFF) { + throw Error( + 'Lone surrogate U+' + codePoint.toString(16).toUpperCase() + + ' is not a scalar value' + ); + } + } + /*--------------------------------------------------------------------------*/ + + function createByte(codePoint, shift) { + return stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80); + } + + function encodeCodePoint(codePoint) { + if ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence + return stringFromCharCode(codePoint); + } + var symbol = ''; + if ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence + symbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0); + } + else if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence + checkScalarValue(codePoint); + symbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0); + symbol += createByte(codePoint, 6); + } + else if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence + symbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0); + symbol += createByte(codePoint, 12); + symbol += createByte(codePoint, 6); + } + symbol += stringFromCharCode((codePoint & 0x3F) | 0x80); + return symbol; + } + + function utf8encode(string) { + var codePoints = ucs2decode(string); + var length = codePoints.length; + var index = -1; + var codePoint; + var byteString = ''; + while (++index < length) { + codePoint = codePoints[index]; + byteString += encodeCodePoint(codePoint); + } + return byteString; + } + + /*--------------------------------------------------------------------------*/ + + function readContinuationByte() { + if (byteIndex >= byteCount) { + throw Error('Invalid byte index'); + } + + var continuationByte = byteArray[byteIndex] & 0xFF; + byteIndex++; + + if ((continuationByte & 0xC0) == 0x80) { + return continuationByte & 0x3F; + } + + // If we end up here, it’s not a continuation byte + throw Error('Invalid continuation byte'); + } + + function decodeSymbol() { + var byte1; + var byte2; + var byte3; + var byte4; + var codePoint; + + if (byteIndex > byteCount) { + throw Error('Invalid byte index'); + } + + if (byteIndex == byteCount) { + return false; + } + + // Read first byte + byte1 = byteArray[byteIndex] & 0xFF; + byteIndex++; + + // 1-byte sequence (no continuation bytes) + if ((byte1 & 0x80) == 0) { + return byte1; + } + + // 2-byte sequence + if ((byte1 & 0xE0) == 0xC0) { + byte2 = readContinuationByte(); + codePoint = ((byte1 & 0x1F) << 6) | byte2; + if (codePoint >= 0x80) { + return codePoint; + } else { + throw Error('Invalid continuation byte'); + } + } + + // 3-byte sequence (may include unpaired surrogates) + if ((byte1 & 0xF0) == 0xE0) { + byte2 = readContinuationByte(); + byte3 = readContinuationByte(); + codePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3; + if (codePoint >= 0x0800) { + checkScalarValue(codePoint); + return codePoint; + } else { + throw Error('Invalid continuation byte'); + } + } + + // 4-byte sequence + if ((byte1 & 0xF8) == 0xF0) { + byte2 = readContinuationByte(); + byte3 = readContinuationByte(); + byte4 = readContinuationByte(); + codePoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0C) | + (byte3 << 0x06) | byte4; + if (codePoint >= 0x010000 && codePoint <= 0x10FFFF) { + return codePoint; + } + } + + throw Error('Invalid UTF-8 detected'); + } + + var byteArray; + var byteCount; + var byteIndex; + function utf8decode(byteString) { + byteArray = ucs2decode(byteString); + byteCount = byteArray.length; + byteIndex = 0; + var codePoints = []; + var tmp; + while ((tmp = decodeSymbol()) !== false) { + codePoints.push(tmp); + } + return ucs2encode(codePoints); + } + + /*--------------------------------------------------------------------------*/ + + var utf8 = { + 'version': '2.1.2', + 'encode': utf8encode, + 'decode': utf8decode + }; + + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define(function() { + return utf8; + }); + } else if (freeExports && !freeExports.nodeType) { + if (freeModule) { // in Node.js or RingoJS v0.8.0+ + freeModule.exports = utf8; + } else { // in Narwhal or RingoJS v0.7.0- + var object = {}; + var hasOwnProperty = object.hasOwnProperty; + for (var key in utf8) { + hasOwnProperty.call(utf8, key) && (freeExports[key] = utf8[key]); + } + } + } else { // in Rhino or a web browser + root.utf8 = utf8; + } + +}(this)); + +},{}],85:[function(require,module,exports){ +module.exports = XMLHttpRequest; + +},{}],"bignumber.js":[function(require,module,exports){ +/*! bignumber.js v4.0.2 https://github.com/MikeMcl/bignumber.js/LICENCE */ + +;(function (globalObj) { + 'use strict'; + + /* + bignumber.js v4.0.2 + A JavaScript library for arbitrary-precision arithmetic. + https://github.com/MikeMcl/bignumber.js + Copyright (c) 2017 Michael Mclaughlin + MIT Expat Licence + */ + + + var BigNumber, + isNumeric = /^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, + mathceil = Math.ceil, + mathfloor = Math.floor, + notBool = ' not a boolean or binary digit', + roundingMode = 'rounding mode', + tooManyDigits = 'number type has more than 15 significant digits', + ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_', + BASE = 1e14, + LOG_BASE = 14, + MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1 + // MAX_INT32 = 0x7fffffff, // 2^31 - 1 + POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], + SQRT_BASE = 1e7, + + /* + * The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and + * the arguments to toExponential, toFixed, toFormat, and toPrecision, beyond which an + * exception is thrown (if ERRORS is true). + */ + MAX = 1E9; // 0 to MAX_INT32 + + + /* + * Create and return a BigNumber constructor. + */ + function constructorFactory(config) { + var div, parseNumeric, + + // id tracks the caller function, so its name can be included in error messages. + id = 0, + P = BigNumber.prototype, + ONE = new BigNumber(1), + + + /********************************* EDITABLE DEFAULTS **********************************/ + + + /* + * The default values below must be integers within the inclusive ranges stated. + * The values can also be changed at run-time using BigNumber.config. + */ + + // The maximum number of decimal places for operations involving division. + DECIMAL_PLACES = 20, // 0 to MAX + + /* + * The rounding mode used when rounding to the above decimal places, and when using + * toExponential, toFixed, toFormat and toPrecision, and round (default value). + * UP 0 Away from zero. + * DOWN 1 Towards zero. + * CEIL 2 Towards +Infinity. + * FLOOR 3 Towards -Infinity. + * HALF_UP 4 Towards nearest neighbour. If equidistant, up. + * HALF_DOWN 5 Towards nearest neighbour. If equidistant, down. + * HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour. + * HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity. + * HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity. + */ + ROUNDING_MODE = 4, // 0 to 8 + + // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS] + + // The exponent value at and beneath which toString returns exponential notation. + // Number type: -7 + TO_EXP_NEG = -7, // 0 to -MAX + + // The exponent value at and above which toString returns exponential notation. + // Number type: 21 + TO_EXP_POS = 21, // 0 to MAX + + // RANGE : [MIN_EXP, MAX_EXP] + + // The minimum exponent value, beneath which underflow to zero occurs. + // Number type: -324 (5e-324) + MIN_EXP = -1e7, // -1 to -MAX + + // The maximum exponent value, above which overflow to Infinity occurs. + // Number type: 308 (1.7976931348623157e+308) + // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow. + MAX_EXP = 1e7, // 1 to MAX + + // Whether BigNumber Errors are ever thrown. + ERRORS = true, // true or false + + // Change to intValidatorNoErrors if ERRORS is false. + isValidInt = intValidatorWithErrors, // intValidatorWithErrors/intValidatorNoErrors + + // Whether to use cryptographically-secure random number generation, if available. + CRYPTO = false, // true or false + + /* + * The modulo mode used when calculating the modulus: a mod n. + * The quotient (q = a / n) is calculated according to the corresponding rounding mode. + * The remainder (r) is calculated as: r = a - n * q. + * + * UP 0 The remainder is positive if the dividend is negative, else is negative. + * DOWN 1 The remainder has the same sign as the dividend. + * This modulo mode is commonly known as 'truncated division' and is + * equivalent to (a % n) in JavaScript. + * FLOOR 3 The remainder has the same sign as the divisor (Python %). + * HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function. + * EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). + * The remainder is always positive. + * + * The truncated division, floored division, Euclidian division and IEEE 754 remainder + * modes are commonly used for the modulus operation. + * Although the other rounding modes can also be used, they may not give useful results. + */ + MODULO_MODE = 1, // 0 to 9 + + // The maximum number of significant digits of the result of the toPower operation. + // If POW_PRECISION is 0, there will be unlimited significant digits. + POW_PRECISION = 0, // 0 to MAX + + // The format specification used by the BigNumber.prototype.toFormat method. + FORMAT = { + decimalSeparator: '.', + groupSeparator: ',', + groupSize: 3, + secondaryGroupSize: 0, + fractionGroupSeparator: '\xA0', // non-breaking space + fractionGroupSize: 0 + }; + + + /******************************************************************************************/ + + + // CONSTRUCTOR + + + /* + * The BigNumber constructor and exported function. + * Create and return a new instance of a BigNumber object. + * + * n {number|string|BigNumber} A numeric value. + * [b] {number} The base of n. Integer, 2 to 64 inclusive. + */ + function BigNumber( n, b ) { + var c, e, i, num, len, str, + x = this; + + // Enable constructor usage without new. + if ( !( x instanceof BigNumber ) ) { + + // 'BigNumber() constructor call without new: {n}' + if (ERRORS) raise( 26, 'constructor call without new', n ); + return new BigNumber( n, b ); + } + + // 'new BigNumber() base not an integer: {b}' + // 'new BigNumber() base out of range: {b}' + if ( b == null || !isValidInt( b, 2, 64, id, 'base' ) ) { + + // Duplicate. + if ( n instanceof BigNumber ) { + x.s = n.s; + x.e = n.e; + x.c = ( n = n.c ) ? n.slice() : n; + id = 0; + return; + } + + if ( ( num = typeof n == 'number' ) && n * 0 == 0 ) { + x.s = 1 / n < 0 ? ( n = -n, -1 ) : 1; + + // Fast path for integers. + if ( n === ~~n ) { + for ( e = 0, i = n; i >= 10; i /= 10, e++ ); + x.e = e; + x.c = [n]; + id = 0; + return; + } + + str = n + ''; + } else { + if ( !isNumeric.test( str = n + '' ) ) return parseNumeric( x, str, num ); + x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1; + } + } else { + b = b | 0; + str = n + ''; + + // Ensure return value is rounded to DECIMAL_PLACES as with other bases. + // Allow exponential notation to be used with base 10 argument. + if ( b == 10 ) { + x = new BigNumber( n instanceof BigNumber ? n : str ); + return round( x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE ); + } + + // Avoid potential interpretation of Infinity and NaN as base 44+ values. + // Any number in exponential form will fail due to the [Ee][+-]. + if ( ( num = typeof n == 'number' ) && n * 0 != 0 || + !( new RegExp( '^-?' + ( c = '[' + ALPHABET.slice( 0, b ) + ']+' ) + + '(?:\\.' + c + ')?$',b < 37 ? 'i' : '' ) ).test(str) ) { + return parseNumeric( x, str, num, b ); + } + + if (num) { + x.s = 1 / n < 0 ? ( str = str.slice(1), -1 ) : 1; + + if ( ERRORS && str.replace( /^0\.0*|\./, '' ).length > 15 ) { + + // 'new BigNumber() number type has more than 15 significant digits: {n}' + raise( id, tooManyDigits, n ); + } + + // Prevent later check for length on converted number. + num = false; + } else { + x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1; + } + + str = convertBase( str, 10, b, x.s ); + } + + // Decimal point? + if ( ( e = str.indexOf('.') ) > -1 ) str = str.replace( '.', '' ); + + // Exponential form? + if ( ( i = str.search( /e/i ) ) > 0 ) { + + // Determine exponent. + if ( e < 0 ) e = i; + e += +str.slice( i + 1 ); + str = str.substring( 0, i ); + } else if ( e < 0 ) { + + // Integer. + e = str.length; + } + + // Determine leading zeros. + for ( i = 0; str.charCodeAt(i) === 48; i++ ); + + // Determine trailing zeros. + for ( len = str.length; str.charCodeAt(--len) === 48; ); + str = str.slice( i, len + 1 ); + + if (str) { + len = str.length; + + // Disallow numbers with over 15 significant digits if number type. + // 'new BigNumber() number type has more than 15 significant digits: {n}' + if ( num && ERRORS && len > 15 && ( n > MAX_SAFE_INTEGER || n !== mathfloor(n) ) ) { + raise( id, tooManyDigits, x.s * n ); + } + + e = e - i - 1; + + // Overflow? + if ( e > MAX_EXP ) { + + // Infinity. + x.c = x.e = null; + + // Underflow? + } else if ( e < MIN_EXP ) { + + // Zero. + x.c = [ x.e = 0 ]; + } else { + x.e = e; + x.c = []; + + // Transform base + + // e is the base 10 exponent. + // i is where to slice str to get the first element of the coefficient array. + i = ( e + 1 ) % LOG_BASE; + if ( e < 0 ) i += LOG_BASE; + + if ( i < len ) { + if (i) x.c.push( +str.slice( 0, i ) ); + + for ( len -= LOG_BASE; i < len; ) { + x.c.push( +str.slice( i, i += LOG_BASE ) ); + } + + str = str.slice(i); + i = LOG_BASE - str.length; + } else { + i -= len; + } + + for ( ; i--; str += '0' ); + x.c.push( +str ); + } + } else { + + // Zero. + x.c = [ x.e = 0 ]; + } + + id = 0; + } + + + // CONSTRUCTOR PROPERTIES + + + BigNumber.another = constructorFactory; + + BigNumber.ROUND_UP = 0; + BigNumber.ROUND_DOWN = 1; + BigNumber.ROUND_CEIL = 2; + BigNumber.ROUND_FLOOR = 3; + BigNumber.ROUND_HALF_UP = 4; + BigNumber.ROUND_HALF_DOWN = 5; + BigNumber.ROUND_HALF_EVEN = 6; + BigNumber.ROUND_HALF_CEIL = 7; + BigNumber.ROUND_HALF_FLOOR = 8; + BigNumber.EUCLID = 9; + + + /* + * Configure infrequently-changing library-wide settings. + * + * Accept an object or an argument list, with one or many of the following properties or + * parameters respectively: + * + * DECIMAL_PLACES {number} Integer, 0 to MAX inclusive + * ROUNDING_MODE {number} Integer, 0 to 8 inclusive + * EXPONENTIAL_AT {number|number[]} Integer, -MAX to MAX inclusive or + * [integer -MAX to 0 incl., 0 to MAX incl.] + * RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or + * [integer -MAX to -1 incl., integer 1 to MAX incl.] + * ERRORS {boolean|number} true, false, 1 or 0 + * CRYPTO {boolean|number} true, false, 1 or 0 + * MODULO_MODE {number} 0 to 9 inclusive + * POW_PRECISION {number} 0 to MAX inclusive + * FORMAT {object} See BigNumber.prototype.toFormat + * decimalSeparator {string} + * groupSeparator {string} + * groupSize {number} + * secondaryGroupSize {number} + * fractionGroupSeparator {string} + * fractionGroupSize {number} + * + * (The values assigned to the above FORMAT object properties are not checked for validity.) + * + * E.g. + * BigNumber.config(20, 4) is equivalent to + * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) + * + * Ignore properties/parameters set to null or undefined. + * Return an object with the properties current values. + */ + BigNumber.config = BigNumber.set = function () { + var v, p, + i = 0, + r = {}, + a = arguments, + o = a[0], + has = o && typeof o == 'object' + ? function () { if ( o.hasOwnProperty(p) ) return ( v = o[p] ) != null; } + : function () { if ( a.length > i ) return ( v = a[i++] ) != null; }; + + // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive. + // 'config() DECIMAL_PLACES not an integer: {v}' + // 'config() DECIMAL_PLACES out of range: {v}' + if ( has( p = 'DECIMAL_PLACES' ) && isValidInt( v, 0, MAX, 2, p ) ) { + DECIMAL_PLACES = v | 0; + } + r[p] = DECIMAL_PLACES; + + // ROUNDING_MODE {number} Integer, 0 to 8 inclusive. + // 'config() ROUNDING_MODE not an integer: {v}' + // 'config() ROUNDING_MODE out of range: {v}' + if ( has( p = 'ROUNDING_MODE' ) && isValidInt( v, 0, 8, 2, p ) ) { + ROUNDING_MODE = v | 0; + } + r[p] = ROUNDING_MODE; + + // EXPONENTIAL_AT {number|number[]} + // Integer, -MAX to MAX inclusive or [integer -MAX to 0 inclusive, 0 to MAX inclusive]. + // 'config() EXPONENTIAL_AT not an integer: {v}' + // 'config() EXPONENTIAL_AT out of range: {v}' + if ( has( p = 'EXPONENTIAL_AT' ) ) { + + if ( isArray(v) ) { + if ( isValidInt( v[0], -MAX, 0, 2, p ) && isValidInt( v[1], 0, MAX, 2, p ) ) { + TO_EXP_NEG = v[0] | 0; + TO_EXP_POS = v[1] | 0; + } + } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) { + TO_EXP_NEG = -( TO_EXP_POS = ( v < 0 ? -v : v ) | 0 ); + } + } + r[p] = [ TO_EXP_NEG, TO_EXP_POS ]; + + // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or + // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive]. + // 'config() RANGE not an integer: {v}' + // 'config() RANGE cannot be zero: {v}' + // 'config() RANGE out of range: {v}' + if ( has( p = 'RANGE' ) ) { + + if ( isArray(v) ) { + if ( isValidInt( v[0], -MAX, -1, 2, p ) && isValidInt( v[1], 1, MAX, 2, p ) ) { + MIN_EXP = v[0] | 0; + MAX_EXP = v[1] | 0; + } + } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) { + if ( v | 0 ) MIN_EXP = -( MAX_EXP = ( v < 0 ? -v : v ) | 0 ); + else if (ERRORS) raise( 2, p + ' cannot be zero', v ); + } + } + r[p] = [ MIN_EXP, MAX_EXP ]; + + // ERRORS {boolean|number} true, false, 1 or 0. + // 'config() ERRORS not a boolean or binary digit: {v}' + if ( has( p = 'ERRORS' ) ) { + + if ( v === !!v || v === 1 || v === 0 ) { + id = 0; + isValidInt = ( ERRORS = !!v ) ? intValidatorWithErrors : intValidatorNoErrors; + } else if (ERRORS) { + raise( 2, p + notBool, v ); + } + } + r[p] = ERRORS; + + // CRYPTO {boolean|number} true, false, 1 or 0. + // 'config() CRYPTO not a boolean or binary digit: {v}' + // 'config() crypto unavailable: {crypto}' + if ( has( p = 'CRYPTO' ) ) { + + if ( v === true || v === false || v === 1 || v === 0 ) { + if (v) { + v = typeof crypto == 'undefined'; + if ( !v && crypto && (crypto.getRandomValues || crypto.randomBytes)) { + CRYPTO = true; + } else if (ERRORS) { + raise( 2, 'crypto unavailable', v ? void 0 : crypto ); + } else { + CRYPTO = false; + } + } else { + CRYPTO = false; + } + } else if (ERRORS) { + raise( 2, p + notBool, v ); + } + } + r[p] = CRYPTO; + + // MODULO_MODE {number} Integer, 0 to 9 inclusive. + // 'config() MODULO_MODE not an integer: {v}' + // 'config() MODULO_MODE out of range: {v}' + if ( has( p = 'MODULO_MODE' ) && isValidInt( v, 0, 9, 2, p ) ) { + MODULO_MODE = v | 0; + } + r[p] = MODULO_MODE; + + // POW_PRECISION {number} Integer, 0 to MAX inclusive. + // 'config() POW_PRECISION not an integer: {v}' + // 'config() POW_PRECISION out of range: {v}' + if ( has( p = 'POW_PRECISION' ) && isValidInt( v, 0, MAX, 2, p ) ) { + POW_PRECISION = v | 0; + } + r[p] = POW_PRECISION; + + // FORMAT {object} + // 'config() FORMAT not an object: {v}' + if ( has( p = 'FORMAT' ) ) { + + if ( typeof v == 'object' ) { + FORMAT = v; + } else if (ERRORS) { + raise( 2, p + ' not an object', v ); + } + } + r[p] = FORMAT; + + return r; + }; + + + /* + * Return a new BigNumber whose value is the maximum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.max = function () { return maxOrMin( arguments, P.lt ); }; + + + /* + * Return a new BigNumber whose value is the minimum of the arguments. + * + * arguments {number|string|BigNumber} + */ + BigNumber.min = function () { return maxOrMin( arguments, P.gt ); }; + + + /* + * Return a new BigNumber with a random value equal to or greater than 0 and less than 1, + * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing + * zeros are produced). + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * + * 'random() decimal places not an integer: {dp}' + * 'random() decimal places out of range: {dp}' + * 'random() crypto unavailable: {crypto}' + */ + BigNumber.random = (function () { + var pow2_53 = 0x20000000000000; + + // Return a 53 bit integer n, where 0 <= n < 9007199254740992. + // Check if Math.random() produces more than 32 bits of randomness. + // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits. + // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1. + var random53bitInt = (Math.random() * pow2_53) & 0x1fffff + ? function () { return mathfloor( Math.random() * pow2_53 ); } + : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) + + (Math.random() * 0x800000 | 0); }; + + return function (dp) { + var a, b, e, k, v, + i = 0, + c = [], + rand = new BigNumber(ONE); + + dp = dp == null || !isValidInt( dp, 0, MAX, 14 ) ? DECIMAL_PLACES : dp | 0; + k = mathceil( dp / LOG_BASE ); + + if (CRYPTO) { + + // Browsers supporting crypto.getRandomValues. + if (crypto.getRandomValues) { + + a = crypto.getRandomValues( new Uint32Array( k *= 2 ) ); + + for ( ; i < k; ) { + + // 53 bits: + // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2) + // 11111 11111111 11111111 11111111 11100000 00000000 00000000 + // ((Math.pow(2, 32) - 1) >>> 11).toString(2) + // 11111 11111111 11111111 + // 0x20000 is 2^21. + v = a[i] * 0x20000 + (a[i + 1] >>> 11); + + // Rejection sampling: + // 0 <= v < 9007199254740992 + // Probability that v >= 9e15, is + // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251 + if ( v >= 9e15 ) { + b = crypto.getRandomValues( new Uint32Array(2) ); + a[i] = b[0]; + a[i + 1] = b[1]; + } else { + + // 0 <= v <= 8999999999999999 + // 0 <= (v % 1e14) <= 99999999999999 + c.push( v % 1e14 ); + i += 2; + } + } + i = k / 2; + + // Node.js supporting crypto.randomBytes. + } else if (crypto.randomBytes) { + + // buffer + a = crypto.randomBytes( k *= 7 ); + + for ( ; i < k; ) { + + // 0x1000000000000 is 2^48, 0x10000000000 is 2^40 + // 0x100000000 is 2^32, 0x1000000 is 2^24 + // 11111 11111111 11111111 11111111 11111111 11111111 11111111 + // 0 <= v < 9007199254740992 + v = ( ( a[i] & 31 ) * 0x1000000000000 ) + ( a[i + 1] * 0x10000000000 ) + + ( a[i + 2] * 0x100000000 ) + ( a[i + 3] * 0x1000000 ) + + ( a[i + 4] << 16 ) + ( a[i + 5] << 8 ) + a[i + 6]; + + if ( v >= 9e15 ) { + crypto.randomBytes(7).copy( a, i ); + } else { + + // 0 <= (v % 1e14) <= 99999999999999 + c.push( v % 1e14 ); + i += 7; + } + } + i = k / 7; + } else { + CRYPTO = false; + if (ERRORS) raise( 14, 'crypto unavailable', crypto ); + } + } + + // Use Math.random. + if (!CRYPTO) { + + for ( ; i < k; ) { + v = random53bitInt(); + if ( v < 9e15 ) c[i++] = v % 1e14; + } + } + + k = c[--i]; + dp %= LOG_BASE; + + // Convert trailing digits to zeros according to dp. + if ( k && dp ) { + v = POWS_TEN[LOG_BASE - dp]; + c[i] = mathfloor( k / v ) * v; + } + + // Remove trailing elements which are zero. + for ( ; c[i] === 0; c.pop(), i-- ); + + // Zero? + if ( i < 0 ) { + c = [ e = 0 ]; + } else { + + // Remove leading elements which are zero and adjust exponent accordingly. + for ( e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE); + + // Count the digits of the first element of c to determine leading zeros, and... + for ( i = 1, v = c[0]; v >= 10; v /= 10, i++); + + // adjust the exponent accordingly. + if ( i < LOG_BASE ) e -= LOG_BASE - i; + } + + rand.e = e; + rand.c = c; + return rand; + }; + })(); + + + // PRIVATE FUNCTIONS + + + // Convert a numeric string of baseIn to a numeric string of baseOut. + function convertBase( str, baseOut, baseIn, sign ) { + var d, e, k, r, x, xc, y, + i = str.indexOf( '.' ), + dp = DECIMAL_PLACES, + rm = ROUNDING_MODE; + + if ( baseIn < 37 ) str = str.toLowerCase(); + + // Non-integer. + if ( i >= 0 ) { + k = POW_PRECISION; + + // Unlimited precision. + POW_PRECISION = 0; + str = str.replace( '.', '' ); + y = new BigNumber(baseIn); + x = y.pow( str.length - i ); + POW_PRECISION = k; + + // Convert str as if an integer, then restore the fraction part by dividing the + // result by its base raised to a power. + y.c = toBaseOut( toFixedPoint( coeffToString( x.c ), x.e ), 10, baseOut ); + y.e = y.c.length; + } + + // Convert the number as integer. + xc = toBaseOut( str, baseIn, baseOut ); + e = k = xc.length; + + // Remove trailing zeros. + for ( ; xc[--k] == 0; xc.pop() ); + if ( !xc[0] ) return '0'; + + if ( i < 0 ) { + --e; + } else { + x.c = xc; + x.e = e; + + // sign is needed for correct rounding. + x.s = sign; + x = div( x, y, dp, rm, baseOut ); + xc = x.c; + r = x.r; + e = x.e; + } + + d = e + dp + 1; + + // The rounding digit, i.e. the digit to the right of the digit that may be rounded up. + i = xc[d]; + k = baseOut / 2; + r = r || d < 0 || xc[d + 1] != null; + + r = rm < 4 ? ( i != null || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) ) + : i > k || i == k &&( rm == 4 || r || rm == 6 && xc[d - 1] & 1 || + rm == ( x.s < 0 ? 8 : 7 ) ); + + if ( d < 1 || !xc[0] ) { + + // 1^-dp or 0. + str = r ? toFixedPoint( '1', -dp ) : '0'; + } else { + xc.length = d; + + if (r) { + + // Rounding up may mean the previous digit has to be rounded up and so on. + for ( --baseOut; ++xc[--d] > baseOut; ) { + xc[d] = 0; + + if ( !d ) { + ++e; + xc = [1].concat(xc); + } + } + } + + // Determine trailing zeros. + for ( k = xc.length; !xc[--k]; ); + + // E.g. [4, 11, 15] becomes 4bf. + for ( i = 0, str = ''; i <= k; str += ALPHABET.charAt( xc[i++] ) ); + str = toFixedPoint( str, e ); + } + + // The caller will add the sign. + return str; + } + + + // Perform division in the specified base. Called by div and convertBase. + div = (function () { + + // Assume non-zero x and k. + function multiply( x, k, base ) { + var m, temp, xlo, xhi, + carry = 0, + i = x.length, + klo = k % SQRT_BASE, + khi = k / SQRT_BASE | 0; + + for ( x = x.slice(); i--; ) { + xlo = x[i] % SQRT_BASE; + xhi = x[i] / SQRT_BASE | 0; + m = khi * xlo + xhi * klo; + temp = klo * xlo + ( ( m % SQRT_BASE ) * SQRT_BASE ) + carry; + carry = ( temp / base | 0 ) + ( m / SQRT_BASE | 0 ) + khi * xhi; + x[i] = temp % base; + } + + if (carry) x = [carry].concat(x); + + return x; + } + + function compare( a, b, aL, bL ) { + var i, cmp; + + if ( aL != bL ) { + cmp = aL > bL ? 1 : -1; + } else { + + for ( i = cmp = 0; i < aL; i++ ) { + + if ( a[i] != b[i] ) { + cmp = a[i] > b[i] ? 1 : -1; + break; + } + } + } + return cmp; + } + + function subtract( a, b, aL, base ) { + var i = 0; + + // Subtract b from a. + for ( ; aL--; ) { + a[aL] -= i; + i = a[aL] < b[aL] ? 1 : 0; + a[aL] = i * base + a[aL] - b[aL]; + } + + // Remove leading zeros. + for ( ; !a[0] && a.length > 1; a.splice(0, 1) ); + } + + // x: dividend, y: divisor. + return function ( x, y, dp, rm, base ) { + var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, + yL, yz, + s = x.s == y.s ? 1 : -1, + xc = x.c, + yc = y.c; + + // Either NaN, Infinity or 0? + if ( !xc || !xc[0] || !yc || !yc[0] ) { + + return new BigNumber( + + // Return NaN if either NaN, or both Infinity or 0. + !x.s || !y.s || ( xc ? yc && xc[0] == yc[0] : !yc ) ? NaN : + + // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0. + xc && xc[0] == 0 || !yc ? s * 0 : s / 0 + ); + } + + q = new BigNumber(s); + qc = q.c = []; + e = x.e - y.e; + s = dp + e + 1; + + if ( !base ) { + base = BASE; + e = bitFloor( x.e / LOG_BASE ) - bitFloor( y.e / LOG_BASE ); + s = s / LOG_BASE | 0; + } + + // Result exponent may be one less then the current value of e. + // The coefficients of the BigNumbers from convertBase may have trailing zeros. + for ( i = 0; yc[i] == ( xc[i] || 0 ); i++ ); + if ( yc[i] > ( xc[i] || 0 ) ) e--; + + if ( s < 0 ) { + qc.push(1); + more = true; + } else { + xL = xc.length; + yL = yc.length; + i = 0; + s += 2; + + // Normalise xc and yc so highest order digit of yc is >= base / 2. + + n = mathfloor( base / ( yc[0] + 1 ) ); + + // Not necessary, but to handle odd bases where yc[0] == ( base / 2 ) - 1. + // if ( n > 1 || n++ == 1 && yc[0] < base / 2 ) { + if ( n > 1 ) { + yc = multiply( yc, n, base ); + xc = multiply( xc, n, base ); + yL = yc.length; + xL = xc.length; + } + + xi = yL; + rem = xc.slice( 0, yL ); + remL = rem.length; + + // Add zeros to make remainder as long as divisor. + for ( ; remL < yL; rem[remL++] = 0 ); + yz = yc.slice(); + yz = [0].concat(yz); + yc0 = yc[0]; + if ( yc[1] >= base / 2 ) yc0++; + // Not necessary, but to prevent trial digit n > base, when using base 3. + // else if ( base == 3 && yc0 == 1 ) yc0 = 1 + 1e-15; + + do { + n = 0; + + // Compare divisor and remainder. + cmp = compare( yc, rem, yL, remL ); + + // If divisor < remainder. + if ( cmp < 0 ) { + + // Calculate trial digit, n. + + rem0 = rem[0]; + if ( yL != remL ) rem0 = rem0 * base + ( rem[1] || 0 ); + + // n is how many times the divisor goes into the current remainder. + n = mathfloor( rem0 / yc0 ); + + // Algorithm: + // 1. product = divisor * trial digit (n) + // 2. if product > remainder: product -= divisor, n-- + // 3. remainder -= product + // 4. if product was < remainder at 2: + // 5. compare new remainder and divisor + // 6. If remainder > divisor: remainder -= divisor, n++ + + if ( n > 1 ) { + + // n may be > base only when base is 3. + if (n >= base) n = base - 1; + + // product = divisor * trial digit. + prod = multiply( yc, n, base ); + prodL = prod.length; + remL = rem.length; + + // Compare product and remainder. + // If product > remainder. + // Trial digit n too high. + // n is 1 too high about 5% of the time, and is not known to have + // ever been more than 1 too high. + while ( compare( prod, rem, prodL, remL ) == 1 ) { + n--; + + // Subtract divisor from product. + subtract( prod, yL < prodL ? yz : yc, prodL, base ); + prodL = prod.length; + cmp = 1; + } + } else { + + // n is 0 or 1, cmp is -1. + // If n is 0, there is no need to compare yc and rem again below, + // so change cmp to 1 to avoid it. + // If n is 1, leave cmp as -1, so yc and rem are compared again. + if ( n == 0 ) { + + // divisor < remainder, so n must be at least 1. + cmp = n = 1; + } + + // product = divisor + prod = yc.slice(); + prodL = prod.length; + } + + if ( prodL < remL ) prod = [0].concat(prod); + + // Subtract product from remainder. + subtract( rem, prod, remL, base ); + remL = rem.length; + + // If product was < remainder. + if ( cmp == -1 ) { + + // Compare divisor and new remainder. + // If divisor < new remainder, subtract divisor from remainder. + // Trial digit n too low. + // n is 1 too low about 5% of the time, and very rarely 2 too low. + while ( compare( yc, rem, yL, remL ) < 1 ) { + n++; + + // Subtract divisor from remainder. + subtract( rem, yL < remL ? yz : yc, remL, base ); + remL = rem.length; + } + } + } else if ( cmp === 0 ) { + n++; + rem = [0]; + } // else cmp === 1 and n will be 0 + + // Add the next digit, n, to the result array. + qc[i++] = n; + + // Update the remainder. + if ( rem[0] ) { + rem[remL++] = xc[xi] || 0; + } else { + rem = [ xc[xi] ]; + remL = 1; + } + } while ( ( xi++ < xL || rem[0] != null ) && s-- ); + + more = rem[0] != null; + + // Leading zero? + if ( !qc[0] ) qc.splice(0, 1); + } + + if ( base == BASE ) { + + // To calculate q.e, first get the number of digits of qc[0]. + for ( i = 1, s = qc[0]; s >= 10; s /= 10, i++ ); + round( q, dp + ( q.e = i + e * LOG_BASE - 1 ) + 1, rm, more ); + + // Caller is convertBase. + } else { + q.e = e; + q.r = +more; + } + + return q; + }; + })(); + + + /* + * Return a string representing the value of BigNumber n in fixed-point or exponential + * notation rounded to the specified decimal places or significant digits. + * + * n is a BigNumber. + * i is the index of the last digit required (i.e. the digit that may be rounded up). + * rm is the rounding mode. + * caller is caller id: toExponential 19, toFixed 20, toFormat 21, toPrecision 24. + */ + function format( n, i, rm, caller ) { + var c0, e, ne, len, str; + + rm = rm != null && isValidInt( rm, 0, 8, caller, roundingMode ) + ? rm | 0 : ROUNDING_MODE; + + if ( !n.c ) return n.toString(); + c0 = n.c[0]; + ne = n.e; + + if ( i == null ) { + str = coeffToString( n.c ); + str = caller == 19 || caller == 24 && ne <= TO_EXP_NEG + ? toExponential( str, ne ) + : toFixedPoint( str, ne ); + } else { + n = round( new BigNumber(n), i, rm ); + + // n.e may have changed if the value was rounded up. + e = n.e; + + str = coeffToString( n.c ); + len = str.length; + + // toPrecision returns exponential notation if the number of significant digits + // specified is less than the number of digits necessary to represent the integer + // part of the value in fixed-point notation. + + // Exponential notation. + if ( caller == 19 || caller == 24 && ( i <= e || e <= TO_EXP_NEG ) ) { + + // Append zeros? + for ( ; len < i; str += '0', len++ ); + str = toExponential( str, e ); + + // Fixed-point notation. + } else { + i -= ne; + str = toFixedPoint( str, e ); + + // Append zeros? + if ( e + 1 > len ) { + if ( --i > 0 ) for ( str += '.'; i--; str += '0' ); + } else { + i += e - len; + if ( i > 0 ) { + if ( e + 1 == len ) str += '.'; + for ( ; i--; str += '0' ); + } + } + } + } + + return n.s < 0 && c0 ? '-' + str : str; + } + + + // Handle BigNumber.max and BigNumber.min. + function maxOrMin( args, method ) { + var m, n, + i = 0; + + if ( isArray( args[0] ) ) args = args[0]; + m = new BigNumber( args[0] ); + + for ( ; ++i < args.length; ) { + n = new BigNumber( args[i] ); + + // If any number is NaN, return NaN. + if ( !n.s ) { + m = n; + break; + } else if ( method.call( m, n ) ) { + m = n; + } + } + + return m; + } + + + /* + * Return true if n is an integer in range, otherwise throw. + * Use for argument validation when ERRORS is true. + */ + function intValidatorWithErrors( n, min, max, caller, name ) { + if ( n < min || n > max || n != truncate(n) ) { + raise( caller, ( name || 'decimal places' ) + + ( n < min || n > max ? ' out of range' : ' not an integer' ), n ); + } + + return true; + } + + + /* + * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP. + * Called by minus, plus and times. + */ + function normalise( n, c, e ) { + var i = 1, + j = c.length; + + // Remove trailing zeros. + for ( ; !c[--j]; c.pop() ); + + // Calculate the base 10 exponent. First get the number of digits of c[0]. + for ( j = c[0]; j >= 10; j /= 10, i++ ); + + // Overflow? + if ( ( e = i + e * LOG_BASE - 1 ) > MAX_EXP ) { + + // Infinity. + n.c = n.e = null; + + // Underflow? + } else if ( e < MIN_EXP ) { + + // Zero. + n.c = [ n.e = 0 ]; + } else { + n.e = e; + n.c = c; + } + + return n; + } + + + // Handle values that fail the validity test in BigNumber. + parseNumeric = (function () { + var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, + dotAfter = /^([^.]+)\.$/, + dotBefore = /^\.([^.]+)$/, + isInfinityOrNaN = /^-?(Infinity|NaN)$/, + whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g; + + return function ( x, str, num, b ) { + var base, + s = num ? str : str.replace( whitespaceOrPlus, '' ); + + // No exception on ±Infinity or NaN. + if ( isInfinityOrNaN.test(s) ) { + x.s = isNaN(s) ? null : s < 0 ? -1 : 1; + } else { + if ( !num ) { + + // basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i + s = s.replace( basePrefix, function ( m, p1, p2 ) { + base = ( p2 = p2.toLowerCase() ) == 'x' ? 16 : p2 == 'b' ? 2 : 8; + return !b || b == base ? p1 : m; + }); + + if (b) { + base = b; + + // E.g. '1.' to '1', '.1' to '0.1' + s = s.replace( dotAfter, '$1' ).replace( dotBefore, '0.$1' ); + } + + if ( str != s ) return new BigNumber( s, base ); + } + + // 'new BigNumber() not a number: {n}' + // 'new BigNumber() not a base {b} number: {n}' + if (ERRORS) raise( id, 'not a' + ( b ? ' base ' + b : '' ) + ' number', str ); + x.s = null; + } + + x.c = x.e = null; + id = 0; + } + })(); + + + // Throw a BigNumber Error. + function raise( caller, msg, val ) { + var error = new Error( [ + 'new BigNumber', // 0 + 'cmp', // 1 + 'config', // 2 + 'div', // 3 + 'divToInt', // 4 + 'eq', // 5 + 'gt', // 6 + 'gte', // 7 + 'lt', // 8 + 'lte', // 9 + 'minus', // 10 + 'mod', // 11 + 'plus', // 12 + 'precision', // 13 + 'random', // 14 + 'round', // 15 + 'shift', // 16 + 'times', // 17 + 'toDigits', // 18 + 'toExponential', // 19 + 'toFixed', // 20 + 'toFormat', // 21 + 'toFraction', // 22 + 'pow', // 23 + 'toPrecision', // 24 + 'toString', // 25 + 'BigNumber' // 26 + ][caller] + '() ' + msg + ': ' + val ); + + error.name = 'BigNumber Error'; + id = 0; + throw error; + } + + + /* + * Round x to sd significant digits using rounding mode rm. Check for over/under-flow. + * If r is truthy, it is known that there are more digits after the rounding digit. + */ + function round( x, sd, rm, r ) { + var d, i, j, k, n, ni, rd, + xc = x.c, + pows10 = POWS_TEN; + + // if x is not Infinity or NaN... + if (xc) { + + // rd is the rounding digit, i.e. the digit after the digit that may be rounded up. + // n is a base 1e14 number, the value of the element of array x.c containing rd. + // ni is the index of n within x.c. + // d is the number of digits of n. + // i is the index of rd within n including leading zeros. + // j is the actual index of rd within n (if < 0, rd is a leading zero). + out: { + + // Get the number of digits of the first element of xc. + for ( d = 1, k = xc[0]; k >= 10; k /= 10, d++ ); + i = sd - d; + + // If the rounding digit is in the first element of xc... + if ( i < 0 ) { + i += LOG_BASE; + j = sd; + n = xc[ ni = 0 ]; + + // Get the rounding digit at index j of n. + rd = n / pows10[ d - j - 1 ] % 10 | 0; + } else { + ni = mathceil( ( i + 1 ) / LOG_BASE ); + + if ( ni >= xc.length ) { + + if (r) { + + // Needed by sqrt. + for ( ; xc.length <= ni; xc.push(0) ); + n = rd = 0; + d = 1; + i %= LOG_BASE; + j = i - LOG_BASE + 1; + } else { + break out; + } + } else { + n = k = xc[ni]; + + // Get the number of digits of n. + for ( d = 1; k >= 10; k /= 10, d++ ); + + // Get the index of rd within n. + i %= LOG_BASE; + + // Get the index of rd within n, adjusted for leading zeros. + // The number of leading zeros of n is given by LOG_BASE - d. + j = i - LOG_BASE + d; + + // Get the rounding digit at index j of n. + rd = j < 0 ? 0 : n / pows10[ d - j - 1 ] % 10 | 0; + } + } + + r = r || sd < 0 || + + // Are there any non-zero digits after the rounding digit? + // The expression n % pows10[ d - j - 1 ] returns all digits of n to the right + // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714. + xc[ni + 1] != null || ( j < 0 ? n : n % pows10[ d - j - 1 ] ); + + r = rm < 4 + ? ( rd || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) ) + : rd > 5 || rd == 5 && ( rm == 4 || r || rm == 6 && + + // Check whether the digit to the left of the rounding digit is odd. + ( ( i > 0 ? j > 0 ? n / pows10[ d - j ] : 0 : xc[ni - 1] ) % 10 ) & 1 || + rm == ( x.s < 0 ? 8 : 7 ) ); + + if ( sd < 1 || !xc[0] ) { + xc.length = 0; + + if (r) { + + // Convert sd to decimal places. + sd -= x.e + 1; + + // 1, 0.1, 0.01, 0.001, 0.0001 etc. + xc[0] = pows10[ ( LOG_BASE - sd % LOG_BASE ) % LOG_BASE ]; + x.e = -sd || 0; + } else { + + // Zero. + xc[0] = x.e = 0; + } + + return x; + } + + // Remove excess digits. + if ( i == 0 ) { + xc.length = ni; + k = 1; + ni--; + } else { + xc.length = ni + 1; + k = pows10[ LOG_BASE - i ]; + + // E.g. 56700 becomes 56000 if 7 is the rounding digit. + // j > 0 means i > number of leading zeros of n. + xc[ni] = j > 0 ? mathfloor( n / pows10[ d - j ] % pows10[j] ) * k : 0; + } + + // Round up? + if (r) { + + for ( ; ; ) { + + // If the digit to be rounded up is in the first element of xc... + if ( ni == 0 ) { + + // i will be the length of xc[0] before k is added. + for ( i = 1, j = xc[0]; j >= 10; j /= 10, i++ ); + j = xc[0] += k; + for ( k = 1; j >= 10; j /= 10, k++ ); + + // if i != k the length has increased. + if ( i != k ) { + x.e++; + if ( xc[0] == BASE ) xc[0] = 1; + } + + break; + } else { + xc[ni] += k; + if ( xc[ni] != BASE ) break; + xc[ni--] = 0; + k = 1; + } + } + } + + // Remove trailing zeros. + for ( i = xc.length; xc[--i] === 0; xc.pop() ); + } + + // Overflow? Infinity. + if ( x.e > MAX_EXP ) { + x.c = x.e = null; + + // Underflow? Zero. + } else if ( x.e < MIN_EXP ) { + x.c = [ x.e = 0 ]; + } + } + + return x; + } + + + // PROTOTYPE/INSTANCE METHODS + + + /* + * Return a new BigNumber whose value is the absolute value of this BigNumber. + */ + P.absoluteValue = P.abs = function () { + var x = new BigNumber(this); + if ( x.s < 0 ) x.s = 1; + return x; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole + * number in the direction of Infinity. + */ + P.ceil = function () { + return round( new BigNumber(this), this.e + 1, 2 ); + }; + + + /* + * Return + * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b), + * -1 if the value of this BigNumber is less than the value of BigNumber(y, b), + * 0 if they have the same value, + * or null if the value of either is NaN. + */ + P.comparedTo = P.cmp = function ( y, b ) { + id = 1; + return compare( this, new BigNumber( y, b ) ); + }; + + + /* + * Return the number of decimal places of the value of this BigNumber, or null if the value + * of this BigNumber is ±Infinity or NaN. + */ + P.decimalPlaces = P.dp = function () { + var n, v, + c = this.c; + + if ( !c ) return null; + n = ( ( v = c.length - 1 ) - bitFloor( this.e / LOG_BASE ) ) * LOG_BASE; + + // Subtract the number of trailing zeros of the last number. + if ( v = c[v] ) for ( ; v % 10 == 0; v /= 10, n-- ); + if ( n < 0 ) n = 0; + + return n; + }; + + + /* + * n / 0 = I + * n / N = N + * n / I = 0 + * 0 / n = 0 + * 0 / 0 = N + * 0 / N = N + * 0 / I = 0 + * N / n = N + * N / 0 = N + * N / N = N + * N / I = N + * I / n = I + * I / 0 = I + * I / N = N + * I / I = N + * + * Return a new BigNumber whose value is the value of this BigNumber divided by the value of + * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE. + */ + P.dividedBy = P.div = function ( y, b ) { + id = 3; + return div( this, new BigNumber( y, b ), DECIMAL_PLACES, ROUNDING_MODE ); + }; + + + /* + * Return a new BigNumber whose value is the integer part of dividing the value of this + * BigNumber by the value of BigNumber(y, b). + */ + P.dividedToIntegerBy = P.divToInt = function ( y, b ) { + id = 4; + return div( this, new BigNumber( y, b ), 0, 1 ); + }; + + + /* + * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b), + * otherwise returns false. + */ + P.equals = P.eq = function ( y, b ) { + id = 5; + return compare( this, new BigNumber( y, b ) ) === 0; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole + * number in the direction of -Infinity. + */ + P.floor = function () { + return round( new BigNumber(this), this.e + 1, 3 ); + }; + + + /* + * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b), + * otherwise returns false. + */ + P.greaterThan = P.gt = function ( y, b ) { + id = 6; + return compare( this, new BigNumber( y, b ) ) > 0; + }; + + + /* + * Return true if the value of this BigNumber is greater than or equal to the value of + * BigNumber(y, b), otherwise returns false. + */ + P.greaterThanOrEqualTo = P.gte = function ( y, b ) { + id = 7; + return ( b = compare( this, new BigNumber( y, b ) ) ) === 1 || b === 0; + + }; + + + /* + * Return true if the value of this BigNumber is a finite number, otherwise returns false. + */ + P.isFinite = function () { + return !!this.c; + }; + + + /* + * Return true if the value of this BigNumber is an integer, otherwise return false. + */ + P.isInteger = P.isInt = function () { + return !!this.c && bitFloor( this.e / LOG_BASE ) > this.c.length - 2; + }; + + + /* + * Return true if the value of this BigNumber is NaN, otherwise returns false. + */ + P.isNaN = function () { + return !this.s; + }; + + + /* + * Return true if the value of this BigNumber is negative, otherwise returns false. + */ + P.isNegative = P.isNeg = function () { + return this.s < 0; + }; + + + /* + * Return true if the value of this BigNumber is 0 or -0, otherwise returns false. + */ + P.isZero = function () { + return !!this.c && this.c[0] == 0; + }; + + + /* + * Return true if the value of this BigNumber is less than the value of BigNumber(y, b), + * otherwise returns false. + */ + P.lessThan = P.lt = function ( y, b ) { + id = 8; + return compare( this, new BigNumber( y, b ) ) < 0; + }; + + + /* + * Return true if the value of this BigNumber is less than or equal to the value of + * BigNumber(y, b), otherwise returns false. + */ + P.lessThanOrEqualTo = P.lte = function ( y, b ) { + id = 9; + return ( b = compare( this, new BigNumber( y, b ) ) ) === -1 || b === 0; + }; + + + /* + * n - 0 = n + * n - N = N + * n - I = -I + * 0 - n = -n + * 0 - 0 = 0 + * 0 - N = N + * 0 - I = -I + * N - n = N + * N - 0 = N + * N - N = N + * N - I = N + * I - n = I + * I - 0 = I + * I - N = N + * I - I = N + * + * Return a new BigNumber whose value is the value of this BigNumber minus the value of + * BigNumber(y, b). + */ + P.minus = P.sub = function ( y, b ) { + var i, j, t, xLTy, + x = this, + a = x.s; + + id = 10; + y = new BigNumber( y, b ); + b = y.s; + + // Either NaN? + if ( !a || !b ) return new BigNumber(NaN); + + // Signs differ? + if ( a != b ) { + y.s = -b; + return x.plus(y); + } + + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; + + if ( !xe || !ye ) { + + // Either Infinity? + if ( !xc || !yc ) return xc ? ( y.s = -b, y ) : new BigNumber( yc ? x : NaN ); + + // Either zero? + if ( !xc[0] || !yc[0] ) { + + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + return yc[0] ? ( y.s = -b, y ) : new BigNumber( xc[0] ? x : + + // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity + ROUNDING_MODE == 3 ? -0 : 0 ); + } + } + + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); + + // Determine which is the bigger number. + if ( a = xe - ye ) { + + if ( xLTy = a < 0 ) { + a = -a; + t = xc; + } else { + ye = xe; + t = yc; + } + + t.reverse(); + + // Prepend zeros to equalise exponents. + for ( b = a; b--; t.push(0) ); + t.reverse(); + } else { + + // Exponents equal. Check digit by digit. + j = ( xLTy = ( a = xc.length ) < ( b = yc.length ) ) ? a : b; + + for ( a = b = 0; b < j; b++ ) { + + if ( xc[b] != yc[b] ) { + xLTy = xc[b] < yc[b]; + break; + } + } + } + + // x < y? Point xc to the array of the bigger number. + if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s; + + b = ( j = yc.length ) - ( i = xc.length ); + + // Append zeros to xc if shorter. + // No need to add zeros to yc if shorter as subtract only needs to start at yc.length. + if ( b > 0 ) for ( ; b--; xc[i++] = 0 ); + b = BASE - 1; + + // Subtract yc from xc. + for ( ; j > a; ) { + + if ( xc[--j] < yc[j] ) { + for ( i = j; i && !xc[--i]; xc[i] = b ); + --xc[i]; + xc[j] += BASE; + } + + xc[j] -= yc[j]; + } + + // Remove leading zeros and adjust exponent accordingly. + for ( ; xc[0] == 0; xc.splice(0, 1), --ye ); + + // Zero? + if ( !xc[0] ) { + + // Following IEEE 754 (2008) 6.3, + // n - n = +0 but n - n = -0 when rounding towards -Infinity. + y.s = ROUNDING_MODE == 3 ? -1 : 1; + y.c = [ y.e = 0 ]; + return y; + } + + // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity + // for finite x and y. + return normalise( y, xc, ye ); + }; + + + /* + * n % 0 = N + * n % N = N + * n % I = n + * 0 % n = 0 + * -0 % n = -0 + * 0 % 0 = N + * 0 % N = N + * 0 % I = 0 + * N % n = N + * N % 0 = N + * N % N = N + * N % I = N + * I % n = N + * I % 0 = N + * I % N = N + * I % I = N + * + * Return a new BigNumber whose value is the value of this BigNumber modulo the value of + * BigNumber(y, b). The result depends on the value of MODULO_MODE. + */ + P.modulo = P.mod = function ( y, b ) { + var q, s, + x = this; + + id = 11; + y = new BigNumber( y, b ); + + // Return NaN if x is Infinity or NaN, or y is NaN or zero. + if ( !x.c || !y.s || y.c && !y.c[0] ) { + return new BigNumber(NaN); + + // Return x if y is Infinity or x is zero. + } else if ( !y.c || x.c && !x.c[0] ) { + return new BigNumber(x); + } + + if ( MODULO_MODE == 9 ) { + + // Euclidian division: q = sign(y) * floor(x / abs(y)) + // r = x - qy where 0 <= r < abs(y) + s = y.s; + y.s = 1; + q = div( x, y, 0, 3 ); + y.s = s; + q.s *= s; + } else { + q = div( x, y, 0, MODULO_MODE ); + } + + return x.minus( q.times(y) ); + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber negated, + * i.e. multiplied by -1. + */ + P.negated = P.neg = function () { + var x = new BigNumber(this); + x.s = -x.s || null; + return x; + }; + + + /* + * n + 0 = n + * n + N = N + * n + I = I + * 0 + n = n + * 0 + 0 = 0 + * 0 + N = N + * 0 + I = I + * N + n = N + * N + 0 = N + * N + N = N + * N + I = N + * I + n = I + * I + 0 = I + * I + N = N + * I + I = I + * + * Return a new BigNumber whose value is the value of this BigNumber plus the value of + * BigNumber(y, b). + */ + P.plus = P.add = function ( y, b ) { + var t, + x = this, + a = x.s; + + id = 12; + y = new BigNumber( y, b ); + b = y.s; + + // Either NaN? + if ( !a || !b ) return new BigNumber(NaN); + + // Signs differ? + if ( a != b ) { + y.s = -b; + return x.minus(y); + } + + var xe = x.e / LOG_BASE, + ye = y.e / LOG_BASE, + xc = x.c, + yc = y.c; + + if ( !xe || !ye ) { + + // Return ±Infinity if either ±Infinity. + if ( !xc || !yc ) return new BigNumber( a / 0 ); + + // Either zero? + // Return y if y is non-zero, x if x is non-zero, or zero if both are zero. + if ( !xc[0] || !yc[0] ) return yc[0] ? y : new BigNumber( xc[0] ? x : a * 0 ); + } + + xe = bitFloor(xe); + ye = bitFloor(ye); + xc = xc.slice(); + + // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts. + if ( a = xe - ye ) { + if ( a > 0 ) { + ye = xe; + t = yc; + } else { + a = -a; + t = xc; + } + + t.reverse(); + for ( ; a--; t.push(0) ); + t.reverse(); + } + + a = xc.length; + b = yc.length; + + // Point xc to the longer array, and b to the shorter length. + if ( a - b < 0 ) t = yc, yc = xc, xc = t, b = a; + + // Only start adding at yc.length - 1 as the further digits of xc can be ignored. + for ( a = 0; b; ) { + a = ( xc[--b] = xc[b] + yc[b] + a ) / BASE | 0; + xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE; + } + + if (a) { + xc = [a].concat(xc); + ++ye; + } + + // No need to check for zero, as +x + +y != 0 && -x + -y != 0 + // ye = MAX_EXP + 1 possible + return normalise( y, xc, ye ); + }; + + + /* + * Return the number of significant digits of the value of this BigNumber. + * + * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0. + */ + P.precision = P.sd = function (z) { + var n, v, + x = this, + c = x.c; + + // 'precision() argument not a boolean or binary digit: {z}' + if ( z != null && z !== !!z && z !== 1 && z !== 0 ) { + if (ERRORS) raise( 13, 'argument' + notBool, z ); + if ( z != !!z ) z = null; + } + + if ( !c ) return null; + v = c.length - 1; + n = v * LOG_BASE + 1; + + if ( v = c[v] ) { + + // Subtract the number of trailing zeros of the last element. + for ( ; v % 10 == 0; v /= 10, n-- ); + + // Add the number of digits of the first element. + for ( v = c[0]; v >= 10; v /= 10, n++ ); + } + + if ( z && x.e + 1 > n ) n = x.e + 1; + + return n; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of + * dp decimal places using rounding mode rm, or to 0 and ROUNDING_MODE respectively if + * omitted. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'round() decimal places out of range: {dp}' + * 'round() decimal places not an integer: {dp}' + * 'round() rounding mode not an integer: {rm}' + * 'round() rounding mode out of range: {rm}' + */ + P.round = function ( dp, rm ) { + var n = new BigNumber(this); + + if ( dp == null || isValidInt( dp, 0, MAX, 15 ) ) { + round( n, ~~dp + this.e + 1, rm == null || + !isValidInt( rm, 0, 8, 15, roundingMode ) ? ROUNDING_MODE : rm | 0 ); + } + + return n; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber shifted by k places + * (powers of 10). Shift to the right if n > 0, and to the left if n < 0. + * + * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * + * If k is out of range and ERRORS is false, the result will be ±0 if k < 0, or ±Infinity + * otherwise. + * + * 'shift() argument not an integer: {k}' + * 'shift() argument out of range: {k}' + */ + P.shift = function (k) { + var n = this; + return isValidInt( k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 16, 'argument' ) + + // k < 1e+21, or truncate(k) will produce exponential notation. + ? n.times( '1e' + truncate(k) ) + : new BigNumber( n.c && n.c[0] && ( k < -MAX_SAFE_INTEGER || k > MAX_SAFE_INTEGER ) + ? n.s * ( k < 0 ? 0 : 1 / 0 ) + : n ); + }; + + + /* + * sqrt(-n) = N + * sqrt( N) = N + * sqrt(-I) = N + * sqrt( I) = I + * sqrt( 0) = 0 + * sqrt(-0) = -0 + * + * Return a new BigNumber whose value is the square root of the value of this BigNumber, + * rounded according to DECIMAL_PLACES and ROUNDING_MODE. + */ + P.squareRoot = P.sqrt = function () { + var m, n, r, rep, t, + x = this, + c = x.c, + s = x.s, + e = x.e, + dp = DECIMAL_PLACES + 4, + half = new BigNumber('0.5'); + + // Negative/NaN/Infinity/zero? + if ( s !== 1 || !c || !c[0] ) { + return new BigNumber( !s || s < 0 && ( !c || c[0] ) ? NaN : c ? x : 1 / 0 ); + } + + // Initial estimate. + s = Math.sqrt( +x ); + + // Math.sqrt underflow/overflow? + // Pass x to Math.sqrt as integer, then adjust the exponent of the result. + if ( s == 0 || s == 1 / 0 ) { + n = coeffToString(c); + if ( ( n.length + e ) % 2 == 0 ) n += '0'; + s = Math.sqrt(n); + e = bitFloor( ( e + 1 ) / 2 ) - ( e < 0 || e % 2 ); + + if ( s == 1 / 0 ) { + n = '1e' + e; + } else { + n = s.toExponential(); + n = n.slice( 0, n.indexOf('e') + 1 ) + e; + } + + r = new BigNumber(n); + } else { + r = new BigNumber( s + '' ); + } + + // Check for zero. + // r could be zero if MIN_EXP is changed after the this value was created. + // This would cause a division by zero (x/t) and hence Infinity below, which would cause + // coeffToString to throw. + if ( r.c[0] ) { + e = r.e; + s = e + dp; + if ( s < 3 ) s = 0; + + // Newton-Raphson iteration. + for ( ; ; ) { + t = r; + r = half.times( t.plus( div( x, t, dp, 1 ) ) ); + + if ( coeffToString( t.c ).slice( 0, s ) === ( n = + coeffToString( r.c ) ).slice( 0, s ) ) { + + // The exponent of r may here be one less than the final result exponent, + // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits + // are indexed correctly. + if ( r.e < e ) --s; + n = n.slice( s - 3, s + 1 ); + + // The 4th rounding digit may be in error by -1 so if the 4 rounding digits + // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the + // iteration. + if ( n == '9999' || !rep && n == '4999' ) { + + // On the first iteration only, check to see if rounding up gives the + // exact result as the nines may infinitely repeat. + if ( !rep ) { + round( t, t.e + DECIMAL_PLACES + 2, 0 ); + + if ( t.times(t).eq(x) ) { + r = t; + break; + } + } + + dp += 4; + s += 4; + rep = 1; + } else { + + // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact + // result. If not, then there are further digits and m will be truthy. + if ( !+n || !+n.slice(1) && n.charAt(0) == '5' ) { + + // Truncate to the first rounding digit. + round( r, r.e + DECIMAL_PLACES + 2, 1 ); + m = !r.times(r).eq(x); + } + + break; + } + } + } + } + + return round( r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m ); + }; + + + /* + * n * 0 = 0 + * n * N = N + * n * I = I + * 0 * n = 0 + * 0 * 0 = 0 + * 0 * N = N + * 0 * I = N + * N * n = N + * N * 0 = N + * N * N = N + * N * I = N + * I * n = I + * I * 0 = N + * I * N = N + * I * I = I + * + * Return a new BigNumber whose value is the value of this BigNumber times the value of + * BigNumber(y, b). + */ + P.times = P.mul = function ( y, b ) { + var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, + base, sqrtBase, + x = this, + xc = x.c, + yc = ( id = 17, y = new BigNumber( y, b ) ).c; + + // Either NaN, ±Infinity or ±0? + if ( !xc || !yc || !xc[0] || !yc[0] ) { + + // Return NaN if either is NaN, or one is 0 and the other is Infinity. + if ( !x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc ) { + y.c = y.e = y.s = null; + } else { + y.s *= x.s; + + // Return ±Infinity if either is ±Infinity. + if ( !xc || !yc ) { + y.c = y.e = null; + + // Return ±0 if either is ±0. + } else { + y.c = [0]; + y.e = 0; + } + } + + return y; + } + + e = bitFloor( x.e / LOG_BASE ) + bitFloor( y.e / LOG_BASE ); + y.s *= x.s; + xcL = xc.length; + ycL = yc.length; + + // Ensure xc points to longer array and xcL to its length. + if ( xcL < ycL ) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i; + + // Initialise the result array with zeros. + for ( i = xcL + ycL, zc = []; i--; zc.push(0) ); + + base = BASE; + sqrtBase = SQRT_BASE; + + for ( i = ycL; --i >= 0; ) { + c = 0; + ylo = yc[i] % sqrtBase; + yhi = yc[i] / sqrtBase | 0; + + for ( k = xcL, j = i + k; j > i; ) { + xlo = xc[--k] % sqrtBase; + xhi = xc[k] / sqrtBase | 0; + m = yhi * xlo + xhi * ylo; + xlo = ylo * xlo + ( ( m % sqrtBase ) * sqrtBase ) + zc[j] + c; + c = ( xlo / base | 0 ) + ( m / sqrtBase | 0 ) + yhi * xhi; + zc[j--] = xlo % base; + } + + zc[j] = c; + } + + if (c) { + ++e; + } else { + zc.splice(0, 1); + } + + return normalise( y, zc, e ); + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of + * sd significant digits using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toDigits() precision out of range: {sd}' + * 'toDigits() precision not an integer: {sd}' + * 'toDigits() rounding mode not an integer: {rm}' + * 'toDigits() rounding mode out of range: {rm}' + */ + P.toDigits = function ( sd, rm ) { + var n = new BigNumber(this); + sd = sd == null || !isValidInt( sd, 1, MAX, 18, 'precision' ) ? null : sd | 0; + rm = rm == null || !isValidInt( rm, 0, 8, 18, roundingMode ) ? ROUNDING_MODE : rm | 0; + return sd ? round( n, sd, rm ) : n; + }; + + + /* + * Return a string representing the value of this BigNumber in exponential notation and + * rounded using ROUNDING_MODE to dp fixed decimal places. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toExponential() decimal places not an integer: {dp}' + * 'toExponential() decimal places out of range: {dp}' + * 'toExponential() rounding mode not an integer: {rm}' + * 'toExponential() rounding mode out of range: {rm}' + */ + P.toExponential = function ( dp, rm ) { + return format( this, + dp != null && isValidInt( dp, 0, MAX, 19 ) ? ~~dp + 1 : null, rm, 19 ); + }; + + + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounding + * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted. + * + * Note: as with JavaScript's number type, (-0).toFixed(0) is '0', + * but e.g. (-0.00001).toFixed(0) is '-0'. + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toFixed() decimal places not an integer: {dp}' + * 'toFixed() decimal places out of range: {dp}' + * 'toFixed() rounding mode not an integer: {rm}' + * 'toFixed() rounding mode out of range: {rm}' + */ + P.toFixed = function ( dp, rm ) { + return format( this, dp != null && isValidInt( dp, 0, MAX, 20 ) + ? ~~dp + this.e + 1 : null, rm, 20 ); + }; + + + /* + * Return a string representing the value of this BigNumber in fixed-point notation rounded + * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties + * of the FORMAT object (see BigNumber.config). + * + * FORMAT = { + * decimalSeparator : '.', + * groupSeparator : ',', + * groupSize : 3, + * secondaryGroupSize : 0, + * fractionGroupSeparator : '\xA0', // non-breaking space + * fractionGroupSize : 0 + * }; + * + * [dp] {number} Decimal places. Integer, 0 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toFormat() decimal places not an integer: {dp}' + * 'toFormat() decimal places out of range: {dp}' + * 'toFormat() rounding mode not an integer: {rm}' + * 'toFormat() rounding mode out of range: {rm}' + */ + P.toFormat = function ( dp, rm ) { + var str = format( this, dp != null && isValidInt( dp, 0, MAX, 21 ) + ? ~~dp + this.e + 1 : null, rm, 21 ); + + if ( this.c ) { + var i, + arr = str.split('.'), + g1 = +FORMAT.groupSize, + g2 = +FORMAT.secondaryGroupSize, + groupSeparator = FORMAT.groupSeparator, + intPart = arr[0], + fractionPart = arr[1], + isNeg = this.s < 0, + intDigits = isNeg ? intPart.slice(1) : intPart, + len = intDigits.length; + + if (g2) i = g1, g1 = g2, g2 = i, len -= i; + + if ( g1 > 0 && len > 0 ) { + i = len % g1 || g1; + intPart = intDigits.substr( 0, i ); + + for ( ; i < len; i += g1 ) { + intPart += groupSeparator + intDigits.substr( i, g1 ); + } + + if ( g2 > 0 ) intPart += groupSeparator + intDigits.slice(i); + if (isNeg) intPart = '-' + intPart; + } + + str = fractionPart + ? intPart + FORMAT.decimalSeparator + ( ( g2 = +FORMAT.fractionGroupSize ) + ? fractionPart.replace( new RegExp( '\\d{' + g2 + '}\\B', 'g' ), + '$&' + FORMAT.fractionGroupSeparator ) + : fractionPart ) + : intPart; + } + + return str; + }; + + + /* + * Return a string array representing the value of this BigNumber as a simple fraction with + * an integer numerator and an integer denominator. The denominator will be a positive + * non-zero value less than or equal to the specified maximum denominator. If a maximum + * denominator is not specified, the denominator will be the lowest value necessary to + * represent the number exactly. + * + * [md] {number|string|BigNumber} Integer >= 1 and < Infinity. The maximum denominator. + * + * 'toFraction() max denominator not an integer: {md}' + * 'toFraction() max denominator out of range: {md}' + */ + P.toFraction = function (md) { + var arr, d0, d2, e, exp, n, n0, q, s, + k = ERRORS, + x = this, + xc = x.c, + d = new BigNumber(ONE), + n1 = d0 = new BigNumber(ONE), + d1 = n0 = new BigNumber(ONE); + + if ( md != null ) { + ERRORS = false; + n = new BigNumber(md); + ERRORS = k; + + if ( !( k = n.isInt() ) || n.lt(ONE) ) { + + if (ERRORS) { + raise( 22, + 'max denominator ' + ( k ? 'out of range' : 'not an integer' ), md ); + } + + // ERRORS is false: + // If md is a finite non-integer >= 1, round it to an integer and use it. + md = !k && n.c && round( n, n.e + 1, 1 ).gte(ONE) ? n : null; + } + } + + if ( !xc ) return x.toString(); + s = coeffToString(xc); + + // Determine initial denominator. + // d is a power of 10 and the minimum max denominator that specifies the value exactly. + e = d.e = s.length - x.e - 1; + d.c[0] = POWS_TEN[ ( exp = e % LOG_BASE ) < 0 ? LOG_BASE + exp : exp ]; + md = !md || n.cmp(d) > 0 ? ( e > 0 ? d : n1 ) : n; + + exp = MAX_EXP; + MAX_EXP = 1 / 0; + n = new BigNumber(s); + + // n0 = d1 = 0 + n0.c[0] = 0; + + for ( ; ; ) { + q = div( n, d, 0, 1 ); + d2 = d0.plus( q.times(d1) ); + if ( d2.cmp(md) == 1 ) break; + d0 = d1; + d1 = d2; + n1 = n0.plus( q.times( d2 = n1 ) ); + n0 = d2; + d = n.minus( q.times( d2 = d ) ); + n = d2; + } + + d2 = div( md.minus(d0), d1, 0, 1 ); + n0 = n0.plus( d2.times(n1) ); + d0 = d0.plus( d2.times(d1) ); + n0.s = n1.s = x.s; + e *= 2; + + // Determine which fraction is closer to x, n0/d0 or n1/d1 + arr = div( n1, d1, e, ROUNDING_MODE ).minus(x).abs().cmp( + div( n0, d0, e, ROUNDING_MODE ).minus(x).abs() ) < 1 + ? [ n1.toString(), d1.toString() ] + : [ n0.toString(), d0.toString() ]; + + MAX_EXP = exp; + return arr; + }; + + + /* + * Return the value of this BigNumber converted to a number primitive. + */ + P.toNumber = function () { + return +this; + }; + + + /* + * Return a BigNumber whose value is the value of this BigNumber raised to the power n. + * If m is present, return the result modulo m. + * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. + * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using + * ROUNDING_MODE. + * + * The modular power operation works efficiently when x, n, and m are positive integers, + * otherwise it is equivalent to calculating x.toPower(n).modulo(m) (with POW_PRECISION 0). + * + * n {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * [m] {number|string|BigNumber} The modulus. + * + * 'pow() exponent not an integer: {n}' + * 'pow() exponent out of range: {n}' + * + * Performs 54 loop iterations for n of 9007199254740991. + */ + P.toPower = P.pow = function ( n, m ) { + var k, y, z, + i = mathfloor( n < 0 ? -n : +n ), + x = this; + + if ( m != null ) { + id = 23; + m = new BigNumber(m); + } + + // Pass ±Infinity to Math.pow if exponent is out of range. + if ( !isValidInt( n, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 23, 'exponent' ) && + ( !isFinite(n) || i > MAX_SAFE_INTEGER && ( n /= 0 ) || + parseFloat(n) != n && !( n = NaN ) ) || n == 0 ) { + k = Math.pow( +x, n ); + return new BigNumber( m ? k % m : k ); + } + + if (m) { + if ( n > 1 && x.gt(ONE) && x.isInt() && m.gt(ONE) && m.isInt() ) { + x = x.mod(m); + } else { + z = m; + + // Nullify m so only a single mod operation is performed at the end. + m = null; + } + } else if (POW_PRECISION) { + + // Truncating each coefficient array to a length of k after each multiplication + // equates to truncating significant digits to POW_PRECISION + [28, 41], + // i.e. there will be a minimum of 28 guard digits retained. + // (Using + 1.5 would give [9, 21] guard digits.) + k = mathceil( POW_PRECISION / LOG_BASE + 2 ); + } + + y = new BigNumber(ONE); + + for ( ; ; ) { + if ( i % 2 ) { + y = y.times(x); + if ( !y.c ) break; + if (k) { + if ( y.c.length > k ) y.c.length = k; + } else if (m) { + y = y.mod(m); + } + } + + i = mathfloor( i / 2 ); + if ( !i ) break; + x = x.times(x); + if (k) { + if ( x.c && x.c.length > k ) x.c.length = k; + } else if (m) { + x = x.mod(m); + } + } + + if (m) return y; + if ( n < 0 ) y = ONE.div(y); + + return z ? y.mod(z) : k ? round( y, POW_PRECISION, ROUNDING_MODE ) : y; + }; + + + /* + * Return a string representing the value of this BigNumber rounded to sd significant digits + * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits + * necessary to represent the integer part of the value in fixed-point notation, then use + * exponential notation. + * + * [sd] {number} Significant digits. Integer, 1 to MAX inclusive. + * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive. + * + * 'toPrecision() precision not an integer: {sd}' + * 'toPrecision() precision out of range: {sd}' + * 'toPrecision() rounding mode not an integer: {rm}' + * 'toPrecision() rounding mode out of range: {rm}' + */ + P.toPrecision = function ( sd, rm ) { + return format( this, sd != null && isValidInt( sd, 1, MAX, 24, 'precision' ) + ? sd | 0 : null, rm, 24 ); + }; + + + /* + * Return a string representing the value of this BigNumber in base b, or base 10 if b is + * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and + * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent + * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than + * TO_EXP_NEG, return exponential notation. + * + * [b] {number} Integer, 2 to 64 inclusive. + * + * 'toString() base not an integer: {b}' + * 'toString() base out of range: {b}' + */ + P.toString = function (b) { + var str, + n = this, + s = n.s, + e = n.e; + + // Infinity or NaN? + if ( e === null ) { + + if (s) { + str = 'Infinity'; + if ( s < 0 ) str = '-' + str; + } else { + str = 'NaN'; + } + } else { + str = coeffToString( n.c ); + + if ( b == null || !isValidInt( b, 2, 64, 25, 'base' ) ) { + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential( str, e ) + : toFixedPoint( str, e ); + } else { + str = convertBase( toFixedPoint( str, e ), b | 0, 10, s ); + } + + if ( s < 0 && n.c[0] ) str = '-' + str; + } + + return str; + }; + + + /* + * Return a new BigNumber whose value is the value of this BigNumber truncated to a whole + * number. + */ + P.truncated = P.trunc = function () { + return round( new BigNumber(this), this.e + 1, 1 ); + }; + + + /* + * Return as toString, but do not accept a base argument, and include the minus sign for + * negative zero. + */ + P.valueOf = P.toJSON = function () { + var str, + n = this, + e = n.e; + + if ( e === null ) return n.toString(); + + str = coeffToString( n.c ); + + str = e <= TO_EXP_NEG || e >= TO_EXP_POS + ? toExponential( str, e ) + : toFixedPoint( str, e ); + + return n.s < 0 ? '-' + str : str; + }; + + + P.isBigNumber = true; + + if ( config != null ) BigNumber.config(config); + + return BigNumber; + } + + + // PRIVATE HELPER FUNCTIONS + + + function bitFloor(n) { + var i = n | 0; + return n > 0 || n === i ? i : i - 1; + } + + + // Return a coefficient array as a string of base 10 digits. + function coeffToString(a) { + var s, z, + i = 1, + j = a.length, + r = a[0] + ''; + + for ( ; i < j; ) { + s = a[i++] + ''; + z = LOG_BASE - s.length; + for ( ; z--; s = '0' + s ); + r += s; + } + + // Determine trailing zeros. + for ( j = r.length; r.charCodeAt(--j) === 48; ); + return r.slice( 0, j + 1 || 1 ); + } + + + // Compare the value of BigNumbers x and y. + function compare( x, y ) { + var a, b, + xc = x.c, + yc = y.c, + i = x.s, + j = y.s, + k = x.e, + l = y.e; + + // Either NaN? + if ( !i || !j ) return null; + + a = xc && !xc[0]; + b = yc && !yc[0]; + + // Either zero? + if ( a || b ) return a ? b ? 0 : -j : i; + + // Signs differ? + if ( i != j ) return i; + + a = i < 0; + b = k == l; + + // Either Infinity? + if ( !xc || !yc ) return b ? 0 : !xc ^ a ? 1 : -1; + + // Compare exponents. + if ( !b ) return k > l ^ a ? 1 : -1; + + j = ( k = xc.length ) < ( l = yc.length ) ? k : l; + + // Compare digit by digit. + for ( i = 0; i < j; i++ ) if ( xc[i] != yc[i] ) return xc[i] > yc[i] ^ a ? 1 : -1; + + // Compare lengths. + return k == l ? 0 : k > l ^ a ? 1 : -1; + } + + + /* + * Return true if n is a valid number in range, otherwise false. + * Use for argument validation when ERRORS is false. + * Note: parseInt('1e+1') == 1 but parseFloat('1e+1') == 10. + */ + function intValidatorNoErrors( n, min, max ) { + return ( n = truncate(n) ) >= min && n <= max; + } + + + function isArray(obj) { + return Object.prototype.toString.call(obj) == '[object Array]'; + } + + + /* + * Convert string of baseIn to an array of numbers of baseOut. + * Eg. convertBase('255', 10, 16) returns [15, 15]. + * Eg. convertBase('ff', 16, 10) returns [2, 5, 5]. + */ + function toBaseOut( str, baseIn, baseOut ) { + var j, + arr = [0], + arrL, + i = 0, + len = str.length; + + for ( ; i < len; ) { + for ( arrL = arr.length; arrL--; arr[arrL] *= baseIn ); + arr[ j = 0 ] += ALPHABET.indexOf( str.charAt( i++ ) ); + + for ( ; j < arr.length; j++ ) { + + if ( arr[j] > baseOut - 1 ) { + if ( arr[j + 1] == null ) arr[j + 1] = 0; + arr[j + 1] += arr[j] / baseOut | 0; + arr[j] %= baseOut; + } + } + } + + return arr.reverse(); + } + + + function toExponential( str, e ) { + return ( str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str ) + + ( e < 0 ? 'e' : 'e+' ) + e; + } + + + function toFixedPoint( str, e ) { + var len, z; + + // Negative exponent? + if ( e < 0 ) { + + // Prepend zeros. + for ( z = '0.'; ++e; z += '0' ); + str = z + str; + + // Positive exponent + } else { + len = str.length; + + // Append zeros. + if ( ++e > len ) { + for ( z = '0', e -= len; --e; z += '0' ); + str += z; + } else if ( e < len ) { + str = str.slice( 0, e ) + '.' + str.slice(e); + } + } + + return str; + } + + + function truncate(n) { + n = parseFloat(n); + return n < 0 ? mathceil(n) : mathfloor(n); + } + + + // EXPORT + + + BigNumber = constructorFactory(); + BigNumber['default'] = BigNumber.BigNumber = BigNumber; + + + // AMD. + if ( typeof define == 'function' && define.amd ) { + define( function () { return BigNumber; } ); + + // Node.js and other environments that support module.exports. + } else if ( typeof module != 'undefined' && module.exports ) { + module.exports = BigNumber; + + // Browser. + } else { + if ( !globalObj ) globalObj = typeof self != 'undefined' ? self : Function('return this')(); + globalObj.BigNumber = BigNumber; + } +})(this); + +},{}],"web3":[function(require,module,exports){ +var Web3 = require('./lib/web3'); + +// dont override global variable +if (typeof window !== 'undefined' && typeof window.Web3 === 'undefined') { + window.Web3 = Web3; +} + +module.exports = Web3; + +},{"./lib/web3":22}]},{},["web3"]) +//# sourceMappingURL=web3.js.map diff --git a/bower_components/web3/dist/web3.js.map b/bower_components/web3/dist/web3.js.map new file mode 100644 index 00000000..47ec949c --- /dev/null +++ b/bower_components/web3/dist/web3.js.map @@ -0,0 +1,187 @@ +{ + "version": 3, + "sources": [ + "node_modules/browser-pack/_prelude.js", + "lib/contracts/GlobalRegistrar.json", + "lib/contracts/ICAPRegistrar.json", + "lib/contracts/SmartExchange.json", + "lib/solidity/address.js", + "lib/solidity/bool.js", + "lib/solidity/bytes.js", + "lib/solidity/coder.js", + "lib/solidity/dynamicbytes.js", + "lib/solidity/formatters.js", + "lib/solidity/int.js", + "lib/solidity/param.js", + "lib/solidity/real.js", + "lib/solidity/string.js", + "lib/solidity/type.js", + "lib/solidity/uint.js", + "lib/solidity/ureal.js", + "lib/utils/browser-xhr.js", + "lib/utils/config.js", + "lib/utils/sha3.js", + "lib/utils/utils.js", + "lib/version.json", + "lib/web3.js", + "lib/web3/allevents.js", + "lib/web3/batch.js", + "lib/web3/contract.js", + "lib/web3/errors.js", + "lib/web3/event.js", + "lib/web3/extend.js", + "lib/web3/filter.js", + "lib/web3/formatters.js", + "lib/web3/function.js", + "lib/web3/httpprovider.js", + "lib/web3/iban.js", + "lib/web3/ipcprovider.js", + "lib/web3/jsonrpc.js", + "lib/web3/method.js", + "lib/web3/methods/db.js", + "lib/web3/methods/eth.js", + "lib/web3/methods/net.js", + "lib/web3/methods/personal.js", + "lib/web3/methods/shh.js", + "lib/web3/methods/swarm.js", + "lib/web3/methods/watches.js", + "lib/web3/namereg.js", + "lib/web3/property.js", + "lib/web3/requestmanager.js", + "lib/web3/settings.js", + "lib/web3/syncing.js", + "lib/web3/transfer.js", + "node_modules/crypto-js/aes.js", + "node_modules/crypto-js/cipher-core.js", + "node_modules/crypto-js/core.js", + "node_modules/crypto-js/enc-base64.js", + "node_modules/crypto-js/enc-utf16.js", + "node_modules/crypto-js/evpkdf.js", + "node_modules/crypto-js/format-hex.js", + "node_modules/crypto-js/hmac.js", + "node_modules/crypto-js/index.js", + "node_modules/crypto-js/lib-typedarrays.js", + "node_modules/crypto-js/md5.js", + "node_modules/crypto-js/mode-cfb.js", + "node_modules/crypto-js/mode-ctr-gladman.js", + "node_modules/crypto-js/mode-ctr.js", + "node_modules/crypto-js/mode-ecb.js", + "node_modules/crypto-js/mode-ofb.js", + "node_modules/crypto-js/pad-ansix923.js", + "node_modules/crypto-js/pad-iso10126.js", + "node_modules/crypto-js/pad-iso97971.js", + "node_modules/crypto-js/pad-nopadding.js", + "node_modules/crypto-js/pad-zeropadding.js", + "node_modules/crypto-js/pbkdf2.js", + "node_modules/crypto-js/rabbit-legacy.js", + "node_modules/crypto-js/rabbit.js", + "node_modules/crypto-js/rc4.js", + "node_modules/crypto-js/ripemd160.js", + "node_modules/crypto-js/sha1.js", + "node_modules/crypto-js/sha224.js", + "node_modules/crypto-js/sha256.js", + "node_modules/crypto-js/sha3.js", + "node_modules/crypto-js/sha384.js", + "node_modules/crypto-js/sha512.js", + "node_modules/crypto-js/tripledes.js", + "node_modules/crypto-js/x64-core.js", + "node_modules/utf8/utf8.js", + "node_modules/xhr2/lib/browser.js", + "bignumber.js", + "index.js" + ], + "names": [], + "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrnBA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC12BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjwBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpPA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9qFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", + "file": "generated.js", + "sourceRoot": "", + "sourcesContent": [ + "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o.\n*/\n/**\n * @file coder.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\nvar f = require('./formatters');\n\nvar SolidityTypeAddress = require('./address');\nvar SolidityTypeBool = require('./bool');\nvar SolidityTypeInt = require('./int');\nvar SolidityTypeUInt = require('./uint');\nvar SolidityTypeDynamicBytes = require('./dynamicbytes');\nvar SolidityTypeString = require('./string');\nvar SolidityTypeReal = require('./real');\nvar SolidityTypeUReal = require('./ureal');\nvar SolidityTypeBytes = require('./bytes');\n\nvar isDynamic = function (solidityType, type) {\n return solidityType.isDynamicType(type) ||\n solidityType.isDynamicArray(type);\n};\n\n/**\n * SolidityCoder prototype should be used to encode/decode solidity params of any type\n */\nvar SolidityCoder = function (types) {\n this._types = types;\n};\n\n/**\n * This method should be used to transform type to SolidityType\n *\n * @method _requireType\n * @param {String} type\n * @returns {SolidityType}\n * @throws {Error} throws if no matching type is found\n */\nSolidityCoder.prototype._requireType = function (type) {\n var solidityType = this._types.filter(function (t) {\n return t.isType(type);\n })[0];\n\n if (!solidityType) {\n throw Error('invalid solidity type!: ' + type);\n }\n\n return solidityType;\n};\n\n/**\n * Should be used to encode plain param\n *\n * @method encodeParam\n * @param {String} type\n * @param {Object} plain param\n * @return {String} encoded plain param\n */\nSolidityCoder.prototype.encodeParam = function (type, param) {\n return this.encodeParams([type], [param]);\n};\n\n/**\n * Should be used to encode list of params\n *\n * @method encodeParams\n * @param {Array} types\n * @param {Array} params\n * @return {String} encoded list of params\n */\nSolidityCoder.prototype.encodeParams = function (types, params) {\n var solidityTypes = this.getSolidityTypes(types);\n\n var encodeds = solidityTypes.map(function (solidityType, index) {\n return solidityType.encode(params[index], types[index]);\n });\n\n var dynamicOffset = solidityTypes.reduce(function (acc, solidityType, index) {\n var staticPartLength = solidityType.staticPartLength(types[index]);\n var roundedStaticPartLength = Math.floor((staticPartLength + 31) / 32) * 32;\n\n return acc + (isDynamic(solidityTypes[index], types[index]) ?\n 32 :\n roundedStaticPartLength);\n }, 0);\n\n var result = this.encodeMultiWithOffset(types, solidityTypes, encodeds, dynamicOffset);\n\n return result;\n};\n\nSolidityCoder.prototype.encodeMultiWithOffset = function (types, solidityTypes, encodeds, dynamicOffset) {\n var result = \"\";\n var self = this;\n\n types.forEach(function (type, i) {\n if (isDynamic(solidityTypes[i], types[i])) {\n result += f.formatInputInt(dynamicOffset).encode();\n var e = self.encodeWithOffset(types[i], solidityTypes[i], encodeds[i], dynamicOffset);\n dynamicOffset += e.length / 2;\n } else {\n // don't add length to dynamicOffset. it's already counted\n result += self.encodeWithOffset(types[i], solidityTypes[i], encodeds[i], dynamicOffset);\n }\n\n // TODO: figure out nested arrays\n });\n\n types.forEach(function (type, i) {\n if (isDynamic(solidityTypes[i], types[i])) {\n var e = self.encodeWithOffset(types[i], solidityTypes[i], encodeds[i], dynamicOffset);\n dynamicOffset += e.length / 2;\n result += e;\n }\n });\n return result;\n};\n\n// TODO: refactor whole encoding!\nSolidityCoder.prototype.encodeWithOffset = function (type, solidityType, encoded, offset) {\n var self = this;\n if (solidityType.isDynamicArray(type)) {\n return (function () {\n // offset was already set\n var nestedName = solidityType.nestedName(type);\n var nestedStaticPartLength = solidityType.staticPartLength(nestedName);\n var result = encoded[0];\n\n (function () {\n var previousLength = 2; // in int\n if (solidityType.isDynamicArray(nestedName)) {\n for (var i = 1; i < encoded.length; i++) {\n previousLength += +(encoded[i - 1])[0] || 0;\n result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode();\n }\n }\n })();\n\n // first element is length, skip it\n (function () {\n for (var i = 0; i < encoded.length - 1; i++) {\n var additionalOffset = result / 2;\n result += self.encodeWithOffset(nestedName, solidityType, encoded[i + 1], offset + additionalOffset);\n }\n })();\n\n return result;\n })();\n\n } else if (solidityType.isStaticArray(type)) {\n return (function () {\n var nestedName = solidityType.nestedName(type);\n var nestedStaticPartLength = solidityType.staticPartLength(nestedName);\n var result = \"\";\n\n\n if (solidityType.isDynamicArray(nestedName)) {\n (function () {\n var previousLength = 0; // in int\n for (var i = 0; i < encoded.length; i++) {\n // calculate length of previous item\n previousLength += +(encoded[i - 1] || [])[0] || 0;\n result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode();\n }\n })();\n }\n\n (function () {\n for (var i = 0; i < encoded.length; i++) {\n var additionalOffset = result / 2;\n result += self.encodeWithOffset(nestedName, solidityType, encoded[i], offset + additionalOffset);\n }\n })();\n\n return result;\n })();\n }\n\n return encoded;\n};\n\n/**\n * Should be used to decode bytes to plain param\n *\n * @method decodeParam\n * @param {String} type\n * @param {String} bytes\n * @return {Object} plain param\n */\nSolidityCoder.prototype.decodeParam = function (type, bytes) {\n return this.decodeParams([type], bytes)[0];\n};\n\n/**\n * Should be used to decode list of params\n *\n * @method decodeParam\n * @param {Array} types\n * @param {String} bytes\n * @return {Array} array of plain params\n */\nSolidityCoder.prototype.decodeParams = function (types, bytes) {\n var solidityTypes = this.getSolidityTypes(types);\n var offsets = this.getOffsets(types, solidityTypes);\n\n return solidityTypes.map(function (solidityType, index) {\n return solidityType.decode(bytes, offsets[index], types[index], index);\n });\n};\n\nSolidityCoder.prototype.getOffsets = function (types, solidityTypes) {\n var lengths = solidityTypes.map(function (solidityType, index) {\n return solidityType.staticPartLength(types[index]);\n });\n\n for (var i = 1; i < lengths.length; i++) {\n // sum with length of previous element\n lengths[i] += lengths[i - 1];\n }\n\n return lengths.map(function (length, index) {\n // remove the current length, so the length is sum of previous elements\n var staticPartLength = solidityTypes[index].staticPartLength(types[index]);\n return length - staticPartLength;\n });\n};\n\nSolidityCoder.prototype.getSolidityTypes = function (types) {\n var self = this;\n return types.map(function (type) {\n return self._requireType(type);\n });\n};\n\nvar coder = new SolidityCoder([\n new SolidityTypeAddress(),\n new SolidityTypeBool(),\n new SolidityTypeInt(),\n new SolidityTypeUInt(),\n new SolidityTypeDynamicBytes(),\n new SolidityTypeBytes(),\n new SolidityTypeString(),\n new SolidityTypeReal(),\n new SolidityTypeUReal()\n]);\n\nmodule.exports = coder;\n", + "var f = require('./formatters');\nvar SolidityType = require('./type');\n\nvar SolidityTypeDynamicBytes = function () {\n this._inputFormatter = f.formatInputDynamicBytes;\n this._outputFormatter = f.formatOutputDynamicBytes;\n};\n\nSolidityTypeDynamicBytes.prototype = new SolidityType({});\nSolidityTypeDynamicBytes.prototype.constructor = SolidityTypeDynamicBytes;\n\nSolidityTypeDynamicBytes.prototype.isType = function (name) {\n return !!name.match(/^bytes(\\[([0-9]*)\\])*$/);\n};\n\nSolidityTypeDynamicBytes.prototype.isDynamicType = function () {\n return true;\n};\n\nmodule.exports = SolidityTypeDynamicBytes;\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file formatters.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\nvar BigNumber = require('bignumber.js');\nvar utils = require('../utils/utils');\nvar c = require('../utils/config');\nvar SolidityParam = require('./param');\n\n\n/**\n * Formats input value to byte representation of int\n * If value is negative, return it's two's complement\n * If the value is floating point, round it down\n *\n * @method formatInputInt\n * @param {String|Number|BigNumber} value that needs to be formatted\n * @returns {SolidityParam}\n */\nvar formatInputInt = function (value) {\n BigNumber.config(c.ETH_BIGNUMBER_ROUNDING_MODE);\n var result = utils.padLeft(utils.toTwosComplement(value).toString(16), 64);\n return new SolidityParam(result);\n};\n\n/**\n * Formats input bytes\n *\n * @method formatInputBytes\n * @param {String}\n * @returns {SolidityParam}\n */\nvar formatInputBytes = function (value) {\n var result = utils.toHex(value).substr(2);\n var l = Math.floor((result.length + 63) / 64);\n result = utils.padRight(result, l * 64);\n return new SolidityParam(result);\n};\n\n/**\n * Formats input bytes\n *\n * @method formatDynamicInputBytes\n * @param {String}\n * @returns {SolidityParam}\n */\nvar formatInputDynamicBytes = function (value) {\n var result = utils.toHex(value).substr(2);\n var length = result.length / 2;\n var l = Math.floor((result.length + 63) / 64);\n result = utils.padRight(result, l * 64);\n return new SolidityParam(formatInputInt(length).value + result);\n};\n\n/**\n * Formats input value to byte representation of string\n *\n * @method formatInputString\n * @param {String}\n * @returns {SolidityParam}\n */\nvar formatInputString = function (value) {\n var result = utils.fromUtf8(value).substr(2);\n var length = result.length / 2;\n var l = Math.floor((result.length + 63) / 64);\n result = utils.padRight(result, l * 64);\n return new SolidityParam(formatInputInt(length).value + result);\n};\n\n/**\n * Formats input value to byte representation of bool\n *\n * @method formatInputBool\n * @param {Boolean}\n * @returns {SolidityParam}\n */\nvar formatInputBool = function (value) {\n var result = '000000000000000000000000000000000000000000000000000000000000000' + (value ? '1' : '0');\n return new SolidityParam(result);\n};\n\n/**\n * Formats input value to byte representation of real\n * Values are multiplied by 2^m and encoded as integers\n *\n * @method formatInputReal\n * @param {String|Number|BigNumber}\n * @returns {SolidityParam}\n */\nvar formatInputReal = function (value) {\n return formatInputInt(new BigNumber(value).times(new BigNumber(2).pow(128)));\n};\n\n/**\n * Check if input value is negative\n *\n * @method signedIsNegative\n * @param {String} value is hex format\n * @returns {Boolean} true if it is negative, otherwise false\n */\nvar signedIsNegative = function (value) {\n return (new BigNumber(value.substr(0, 1), 16).toString(2).substr(0, 1)) === '1';\n};\n\n/**\n * Formats right-aligned output bytes to int\n *\n * @method formatOutputInt\n * @param {SolidityParam} param\n * @returns {BigNumber} right-aligned output bytes formatted to big number\n */\nvar formatOutputInt = function (param) {\n var value = param.staticPart() || \"0\";\n\n // check if it's negative number\n // it it is, return two's complement\n if (signedIsNegative(value)) {\n return new BigNumber(value, 16).minus(new BigNumber('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 16)).minus(1);\n }\n return new BigNumber(value, 16);\n};\n\n/**\n * Formats right-aligned output bytes to uint\n *\n * @method formatOutputUInt\n * @param {SolidityParam}\n * @returns {BigNumeber} right-aligned output bytes formatted to uint\n */\nvar formatOutputUInt = function (param) {\n var value = param.staticPart() || \"0\";\n return new BigNumber(value, 16);\n};\n\n/**\n * Formats right-aligned output bytes to real\n *\n * @method formatOutputReal\n * @param {SolidityParam}\n * @returns {BigNumber} input bytes formatted to real\n */\nvar formatOutputReal = function (param) {\n return formatOutputInt(param).dividedBy(new BigNumber(2).pow(128));\n};\n\n/**\n * Formats right-aligned output bytes to ureal\n *\n * @method formatOutputUReal\n * @param {SolidityParam}\n * @returns {BigNumber} input bytes formatted to ureal\n */\nvar formatOutputUReal = function (param) {\n return formatOutputUInt(param).dividedBy(new BigNumber(2).pow(128));\n};\n\n/**\n * Should be used to format output bool\n *\n * @method formatOutputBool\n * @param {SolidityParam}\n * @returns {Boolean} right-aligned input bytes formatted to bool\n */\nvar formatOutputBool = function (param) {\n return param.staticPart() === '0000000000000000000000000000000000000000000000000000000000000001' ? true : false;\n};\n\n/**\n * Should be used to format output bytes\n *\n * @method formatOutputBytes\n * @param {SolidityParam} left-aligned hex representation of string\n * @param {String} name type name\n * @returns {String} hex string\n */\nvar formatOutputBytes = function (param, name) {\n var matches = name.match(/^bytes([0-9]*)/);\n var size = parseInt(matches[1]);\n return '0x' + param.staticPart().slice(0, 2 * size);\n};\n\n/**\n * Should be used to format output bytes\n *\n * @method formatOutputDynamicBytes\n * @param {SolidityParam} left-aligned hex representation of string\n * @returns {String} hex string\n */\nvar formatOutputDynamicBytes = function (param) {\n var length = (new BigNumber(param.dynamicPart().slice(0, 64), 16)).toNumber() * 2;\n return '0x' + param.dynamicPart().substr(64, length);\n};\n\n/**\n * Should be used to format output string\n *\n * @method formatOutputString\n * @param {SolidityParam} left-aligned hex representation of string\n * @returns {String} ascii string\n */\nvar formatOutputString = function (param) {\n var length = (new BigNumber(param.dynamicPart().slice(0, 64), 16)).toNumber() * 2;\n return utils.toUtf8(param.dynamicPart().substr(64, length));\n};\n\n/**\n * Should be used to format output address\n *\n * @method formatOutputAddress\n * @param {SolidityParam} right-aligned input bytes\n * @returns {String} address\n */\nvar formatOutputAddress = function (param) {\n var value = param.staticPart();\n return \"0x\" + value.slice(value.length - 40, value.length);\n};\n\nmodule.exports = {\n formatInputInt: formatInputInt,\n formatInputBytes: formatInputBytes,\n formatInputDynamicBytes: formatInputDynamicBytes,\n formatInputString: formatInputString,\n formatInputBool: formatInputBool,\n formatInputReal: formatInputReal,\n formatOutputInt: formatOutputInt,\n formatOutputUInt: formatOutputUInt,\n formatOutputReal: formatOutputReal,\n formatOutputUReal: formatOutputUReal,\n formatOutputBool: formatOutputBool,\n formatOutputBytes: formatOutputBytes,\n formatOutputDynamicBytes: formatOutputDynamicBytes,\n formatOutputString: formatOutputString,\n formatOutputAddress: formatOutputAddress\n};\n", + "var f = require('./formatters');\nvar SolidityType = require('./type');\n\n/**\n * SolidityTypeInt is a prootype that represents int type\n * It matches:\n * int\n * int[]\n * int[4]\n * int[][]\n * int[3][]\n * int[][6][], ...\n * int32\n * int64[]\n * int8[4]\n * int256[][]\n * int[3][]\n * int64[][6][], ...\n */\nvar SolidityTypeInt = function () {\n this._inputFormatter = f.formatInputInt;\n this._outputFormatter = f.formatOutputInt;\n};\n\nSolidityTypeInt.prototype = new SolidityType({});\nSolidityTypeInt.prototype.constructor = SolidityTypeInt;\n\nSolidityTypeInt.prototype.isType = function (name) {\n return !!name.match(/^int([0-9]*)?(\\[([0-9]*)\\])*$/);\n};\n\nmodule.exports = SolidityTypeInt;\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** \n * @file param.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\nvar utils = require('../utils/utils');\n\n/**\n * SolidityParam object prototype.\n * Should be used when encoding, decoding solidity bytes\n */\nvar SolidityParam = function (value, offset) {\n this.value = value || '';\n this.offset = offset; // offset in bytes\n};\n\n/**\n * This method should be used to get length of params's dynamic part\n * \n * @method dynamicPartLength\n * @returns {Number} length of dynamic part (in bytes)\n */\nSolidityParam.prototype.dynamicPartLength = function () {\n return this.dynamicPart().length / 2;\n};\n\n/**\n * This method should be used to create copy of solidity param with different offset\n *\n * @method withOffset\n * @param {Number} offset length in bytes\n * @returns {SolidityParam} new solidity param with applied offset\n */\nSolidityParam.prototype.withOffset = function (offset) {\n return new SolidityParam(this.value, offset);\n};\n\n/**\n * This method should be used to combine solidity params together\n * eg. when appending an array\n *\n * @method combine\n * @param {SolidityParam} param with which we should combine\n * @param {SolidityParam} result of combination\n */\nSolidityParam.prototype.combine = function (param) {\n return new SolidityParam(this.value + param.value); \n};\n\n/**\n * This method should be called to check if param has dynamic size.\n * If it has, it returns true, otherwise false\n *\n * @method isDynamic\n * @returns {Boolean}\n */\nSolidityParam.prototype.isDynamic = function () {\n return this.offset !== undefined;\n};\n\n/**\n * This method should be called to transform offset to bytes\n *\n * @method offsetAsBytes\n * @returns {String} bytes representation of offset\n */\nSolidityParam.prototype.offsetAsBytes = function () {\n return !this.isDynamic() ? '' : utils.padLeft(utils.toTwosComplement(this.offset).toString(16), 64);\n};\n\n/**\n * This method should be called to get static part of param\n *\n * @method staticPart\n * @returns {String} offset if it is a dynamic param, otherwise value\n */\nSolidityParam.prototype.staticPart = function () {\n if (!this.isDynamic()) {\n return this.value; \n } \n return this.offsetAsBytes();\n};\n\n/**\n * This method should be called to get dynamic part of param\n *\n * @method dynamicPart\n * @returns {String} returns a value if it is a dynamic param, otherwise empty string\n */\nSolidityParam.prototype.dynamicPart = function () {\n return this.isDynamic() ? this.value : '';\n};\n\n/**\n * This method should be called to encode param\n *\n * @method encode\n * @returns {String}\n */\nSolidityParam.prototype.encode = function () {\n return this.staticPart() + this.dynamicPart();\n};\n\n/**\n * This method should be called to encode array of params\n *\n * @method encodeList\n * @param {Array[SolidityParam]} params\n * @returns {String}\n */\nSolidityParam.encodeList = function (params) {\n \n // updating offsets\n var totalOffset = params.length * 32;\n var offsetParams = params.map(function (param) {\n if (!param.isDynamic()) {\n return param;\n }\n var offset = totalOffset;\n totalOffset += param.dynamicPartLength();\n return param.withOffset(offset);\n });\n\n // encode everything!\n return offsetParams.reduce(function (result, param) {\n return result + param.dynamicPart();\n }, offsetParams.reduce(function (result, param) {\n return result + param.staticPart();\n }, ''));\n};\n\n\n\nmodule.exports = SolidityParam;\n\n", + "var f = require('./formatters');\nvar SolidityType = require('./type');\n\n/**\n * SolidityTypeReal is a prootype that represents real type\n * It matches:\n * real\n * real[]\n * real[4]\n * real[][]\n * real[3][]\n * real[][6][], ...\n * real32\n * real64[]\n * real8[4]\n * real256[][]\n * real[3][]\n * real64[][6][], ...\n */\nvar SolidityTypeReal = function () {\n this._inputFormatter = f.formatInputReal;\n this._outputFormatter = f.formatOutputReal;\n};\n\nSolidityTypeReal.prototype = new SolidityType({});\nSolidityTypeReal.prototype.constructor = SolidityTypeReal;\n\nSolidityTypeReal.prototype.isType = function (name) {\n return !!name.match(/real([0-9]*)?(\\[([0-9]*)\\])?/);\n};\n\nmodule.exports = SolidityTypeReal;\n", + "var f = require('./formatters');\nvar SolidityType = require('./type');\n\nvar SolidityTypeString = function () {\n this._inputFormatter = f.formatInputString;\n this._outputFormatter = f.formatOutputString;\n};\n\nSolidityTypeString.prototype = new SolidityType({});\nSolidityTypeString.prototype.constructor = SolidityTypeString;\n\nSolidityTypeString.prototype.isType = function (name) {\n return !!name.match(/^string(\\[([0-9]*)\\])*$/);\n};\n\nSolidityTypeString.prototype.isDynamicType = function () {\n return true;\n};\n\nmodule.exports = SolidityTypeString;\n", + "var f = require('./formatters');\nvar SolidityParam = require('./param');\n\n/**\n * SolidityType prototype is used to encode/decode solidity params of certain type\n */\nvar SolidityType = function (config) {\n this._inputFormatter = config.inputFormatter;\n this._outputFormatter = config.outputFormatter;\n};\n\n/**\n * Should be used to determine if this SolidityType do match given name\n *\n * @method isType\n * @param {String} name\n * @return {Bool} true if type match this SolidityType, otherwise false\n */\nSolidityType.prototype.isType = function (name) {\n throw \"this method should be overrwritten for type \" + name;\n};\n\n/**\n * Should be used to determine what is the length of static part in given type\n *\n * @method staticPartLength\n * @param {String} name\n * @return {Number} length of static part in bytes\n */\nSolidityType.prototype.staticPartLength = function (name) {\n // If name isn't an array then treat it like a single element array.\n return (this.nestedTypes(name) || ['[1]'])\n .map(function (type) {\n // the length of the nested array\n return parseInt(type.slice(1, -1), 10) || 1;\n })\n .reduce(function (previous, current) {\n return previous * current;\n // all basic types are 32 bytes long\n }, 32);\n};\n\n/**\n * Should be used to determine if type is dynamic array\n * eg:\n * \"type[]\" => true\n * \"type[4]\" => false\n *\n * @method isDynamicArray\n * @param {String} name\n * @return {Bool} true if the type is dynamic array\n */\nSolidityType.prototype.isDynamicArray = function (name) {\n var nestedTypes = this.nestedTypes(name);\n return !!nestedTypes && !nestedTypes[nestedTypes.length - 1].match(/[0-9]{1,}/g);\n};\n\n/**\n * Should be used to determine if type is static array\n * eg:\n * \"type[]\" => false\n * \"type[4]\" => true\n *\n * @method isStaticArray\n * @param {String} name\n * @return {Bool} true if the type is static array\n */\nSolidityType.prototype.isStaticArray = function (name) {\n var nestedTypes = this.nestedTypes(name);\n return !!nestedTypes && !!nestedTypes[nestedTypes.length - 1].match(/[0-9]{1,}/g);\n};\n\n/**\n * Should return length of static array\n * eg.\n * \"int[32]\" => 32\n * \"int256[14]\" => 14\n * \"int[2][3]\" => 3\n * \"int\" => 1\n * \"int[1]\" => 1\n * \"int[]\" => 1\n *\n * @method staticArrayLength\n * @param {String} name\n * @return {Number} static array length\n */\nSolidityType.prototype.staticArrayLength = function (name) {\n var nestedTypes = this.nestedTypes(name);\n if (nestedTypes) {\n return parseInt(nestedTypes[nestedTypes.length - 1].match(/[0-9]{1,}/g) || 1);\n }\n return 1;\n};\n\n/**\n * Should return nested type\n * eg.\n * \"int[32]\" => \"int\"\n * \"int256[14]\" => \"int256\"\n * \"int[2][3]\" => \"int[2]\"\n * \"int\" => \"int\"\n * \"int[]\" => \"int\"\n *\n * @method nestedName\n * @param {String} name\n * @return {String} nested name\n */\nSolidityType.prototype.nestedName = function (name) {\n // remove last [] in name\n var nestedTypes = this.nestedTypes(name);\n if (!nestedTypes) {\n return name;\n }\n\n return name.substr(0, name.length - nestedTypes[nestedTypes.length - 1].length);\n};\n\n/**\n * Should return true if type has dynamic size by default\n * such types are \"string\", \"bytes\"\n *\n * @method isDynamicType\n * @param {String} name\n * @return {Bool} true if is dynamic, otherwise false\n */\nSolidityType.prototype.isDynamicType = function () {\n return false;\n};\n\n/**\n * Should return array of nested types\n * eg.\n * \"int[2][3][]\" => [\"[2]\", \"[3]\", \"[]\"]\n * \"int[] => [\"[]\"]\n * \"int\" => null\n *\n * @method nestedTypes\n * @param {String} name\n * @return {Array} array of nested types\n */\nSolidityType.prototype.nestedTypes = function (name) {\n // return list of strings eg. \"[]\", \"[3]\", \"[]\", \"[2]\"\n return name.match(/(\\[[0-9]*\\])/g);\n};\n\n/**\n * Should be used to encode the value\n *\n * @method encode\n * @param {Object} value\n * @param {String} name\n * @return {String} encoded value\n */\nSolidityType.prototype.encode = function (value, name) {\n var self = this;\n if (this.isDynamicArray(name)) {\n\n return (function () {\n var length = value.length; // in int\n var nestedName = self.nestedName(name);\n\n var result = [];\n result.push(f.formatInputInt(length).encode());\n\n value.forEach(function (v) {\n result.push(self.encode(v, nestedName));\n });\n\n return result;\n })();\n\n } else if (this.isStaticArray(name)) {\n\n return (function () {\n var length = self.staticArrayLength(name); // in int\n var nestedName = self.nestedName(name);\n\n var result = [];\n for (var i = 0; i < length; i++) {\n result.push(self.encode(value[i], nestedName));\n }\n\n return result;\n })();\n\n }\n\n return this._inputFormatter(value, name).encode();\n};\n\n/**\n * Should be used to decode value from bytes\n *\n * @method decode\n * @param {String} bytes\n * @param {Number} offset in bytes\n * @param {String} name type name\n * @returns {Object} decoded value\n */\nSolidityType.prototype.decode = function (bytes, offset, name) {\n var self = this;\n\n if (this.isDynamicArray(name)) {\n\n return (function () {\n var arrayOffset = parseInt('0x' + bytes.substr(offset * 2, 64)); // in bytes\n var length = parseInt('0x' + bytes.substr(arrayOffset * 2, 64)); // in int\n var arrayStart = arrayOffset + 32; // array starts after length; // in bytes\n\n var nestedName = self.nestedName(name);\n var nestedStaticPartLength = self.staticPartLength(nestedName); // in bytes\n var roundedNestedStaticPartLength = Math.floor((nestedStaticPartLength + 31) / 32) * 32;\n var result = [];\n\n for (var i = 0; i < length * roundedNestedStaticPartLength; i += roundedNestedStaticPartLength) {\n result.push(self.decode(bytes, arrayStart + i, nestedName));\n }\n\n return result;\n })();\n\n } else if (this.isStaticArray(name)) {\n\n return (function () {\n var length = self.staticArrayLength(name); // in int\n var arrayStart = offset; // in bytes\n\n var nestedName = self.nestedName(name);\n var nestedStaticPartLength = self.staticPartLength(nestedName); // in bytes\n var roundedNestedStaticPartLength = Math.floor((nestedStaticPartLength + 31) / 32) * 32;\n var result = [];\n\n for (var i = 0; i < length * roundedNestedStaticPartLength; i += roundedNestedStaticPartLength) {\n result.push(self.decode(bytes, arrayStart + i, nestedName));\n }\n\n return result;\n })();\n } else if (this.isDynamicType(name)) {\n\n return (function () {\n var dynamicOffset = parseInt('0x' + bytes.substr(offset * 2, 64)); // in bytes\n var length = parseInt('0x' + bytes.substr(dynamicOffset * 2, 64)); // in bytes\n var roundedLength = Math.floor((length + 31) / 32); // in int\n var param = new SolidityParam(bytes.substr(dynamicOffset * 2, ( 1 + roundedLength) * 64), 0);\n return self._outputFormatter(param, name);\n })();\n }\n\n var length = this.staticPartLength(name);\n var param = new SolidityParam(bytes.substr(offset * 2, length * 2));\n return this._outputFormatter(param, name);\n};\n\nmodule.exports = SolidityType;\n", + "var f = require('./formatters');\nvar SolidityType = require('./type');\n\n/**\n * SolidityTypeUInt is a prootype that represents uint type\n * It matches:\n * uint\n * uint[]\n * uint[4]\n * uint[][]\n * uint[3][]\n * uint[][6][], ...\n * uint32\n * uint64[]\n * uint8[4]\n * uint256[][]\n * uint[3][]\n * uint64[][6][], ...\n */\nvar SolidityTypeUInt = function () {\n this._inputFormatter = f.formatInputInt;\n this._outputFormatter = f.formatOutputUInt;\n};\n\nSolidityTypeUInt.prototype = new SolidityType({});\nSolidityTypeUInt.prototype.constructor = SolidityTypeUInt;\n\nSolidityTypeUInt.prototype.isType = function (name) {\n return !!name.match(/^uint([0-9]*)?(\\[([0-9]*)\\])*$/);\n};\n\nmodule.exports = SolidityTypeUInt;\n", + "var f = require('./formatters');\nvar SolidityType = require('./type');\n\n/**\n * SolidityTypeUReal is a prootype that represents ureal type\n * It matches:\n * ureal\n * ureal[]\n * ureal[4]\n * ureal[][]\n * ureal[3][]\n * ureal[][6][], ...\n * ureal32\n * ureal64[]\n * ureal8[4]\n * ureal256[][]\n * ureal[3][]\n * ureal64[][6][], ...\n */\nvar SolidityTypeUReal = function () {\n this._inputFormatter = f.formatInputReal;\n this._outputFormatter = f.formatOutputUReal;\n};\n\nSolidityTypeUReal.prototype = new SolidityType({});\nSolidityTypeUReal.prototype.constructor = SolidityTypeUReal;\n\nSolidityTypeUReal.prototype.isType = function (name) {\n return !!name.match(/^ureal([0-9]*)?(\\[([0-9]*)\\])*$/);\n};\n\nmodule.exports = SolidityTypeUReal;\n", + "'use strict';\n\n// go env doesn't have and need XMLHttpRequest\nif (typeof XMLHttpRequest === 'undefined') {\n exports.XMLHttpRequest = {};\n} else {\n exports.XMLHttpRequest = XMLHttpRequest; // jshint ignore:line\n}\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** @file config.js\n * @authors:\n * Marek Kotewicz \n * @date 2015\n */\n\n/**\n * Utils\n * \n * @module utils\n */\n\n/**\n * Utility functions\n * \n * @class [utils] config\n * @constructor\n */\n\n\n/// required to define ETH_BIGNUMBER_ROUNDING_MODE\nvar BigNumber = require('bignumber.js');\n\nvar ETH_UNITS = [\n 'wei',\n 'kwei',\n 'Mwei',\n 'Gwei',\n 'szabo',\n 'finney',\n 'femtoether',\n 'picoether',\n 'nanoether',\n 'microether',\n 'milliether',\n 'nano',\n 'micro',\n 'milli',\n 'ether',\n 'grand',\n 'Mether',\n 'Gether',\n 'Tether',\n 'Pether',\n 'Eether',\n 'Zether',\n 'Yether',\n 'Nether',\n 'Dether',\n 'Vether',\n 'Uether'\n];\n\nmodule.exports = {\n ETH_PADDING: 32,\n ETH_SIGNATURE_LENGTH: 4,\n ETH_UNITS: ETH_UNITS,\n ETH_BIGNUMBER_ROUNDING_MODE: { ROUNDING_MODE: BigNumber.ROUND_DOWN },\n ETH_POLLING_TIMEOUT: 1000/2,\n defaultBlock: 'latest',\n defaultAccount: undefined\n};\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** \n * @file sha3.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\nvar CryptoJS = require('crypto-js');\nvar sha3 = require('crypto-js/sha3');\n\nmodule.exports = function (value, options) {\n if (options && options.encoding === 'hex') {\n if (value.length > 2 && value.substr(0, 2) === '0x') {\n value = value.substr(2);\n }\n value = CryptoJS.enc.Hex.parse(value);\n }\n\n return sha3(value, {\n outputLength: 256\n }).toString();\n};\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file utils.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\n/**\n * Utils\n *\n * @module utils\n */\n\n/**\n * Utility functions\n *\n * @class [utils] utils\n * @constructor\n */\n\n\nvar BigNumber = require('bignumber.js');\nvar sha3 = require('./sha3.js');\nvar utf8 = require('utf8');\n\nvar unitMap = {\n 'noether': '0',\n 'wei': '1',\n 'kwei': '1000',\n 'Kwei': '1000',\n 'babbage': '1000',\n 'femtoether': '1000',\n 'mwei': '1000000',\n 'Mwei': '1000000',\n 'lovelace': '1000000',\n 'picoether': '1000000',\n 'gwei': '1000000000',\n 'Gwei': '1000000000',\n 'shannon': '1000000000',\n 'nanoether': '1000000000',\n 'nano': '1000000000',\n 'szabo': '1000000000000',\n 'microether': '1000000000000',\n 'micro': '1000000000000',\n 'finney': '1000000000000000',\n 'milliether': '1000000000000000',\n 'milli': '1000000000000000',\n 'ether': '1000000000000000000',\n 'kether': '1000000000000000000000',\n 'grand': '1000000000000000000000',\n 'mether': '1000000000000000000000000',\n 'gether': '1000000000000000000000000000',\n 'tether': '1000000000000000000000000000000'\n};\n\n/**\n * Should be called to pad string to expected length\n *\n * @method padLeft\n * @param {String} string to be padded\n * @param {Number} characters that result string should have\n * @param {String} sign, by default 0\n * @returns {String} right aligned string\n */\nvar padLeft = function (string, chars, sign) {\n return new Array(chars - string.length + 1).join(sign ? sign : \"0\") + string;\n};\n\n/**\n * Should be called to pad string to expected length\n *\n * @method padRight\n * @param {String} string to be padded\n * @param {Number} characters that result string should have\n * @param {String} sign, by default 0\n * @returns {String} right aligned string\n */\nvar padRight = function (string, chars, sign) {\n return string + (new Array(chars - string.length + 1).join(sign ? sign : \"0\"));\n};\n\n/**\n * Should be called to get utf8 from it's hex representation\n *\n * @method toUtf8\n * @param {String} string in hex\n * @returns {String} ascii string representation of hex value\n */\nvar toUtf8 = function(hex) {\n// Find termination\n var str = \"\";\n var i = 0, l = hex.length;\n if (hex.substring(0, 2) === '0x') {\n i = 2;\n }\n for (; i < l; i+=2) {\n var code = parseInt(hex.substr(i, 2), 16);\n if (code === 0)\n break;\n str += String.fromCharCode(code);\n }\n\n return utf8.decode(str);\n};\n\n/**\n * Should be called to get ascii from it's hex representation\n *\n * @method toAscii\n * @param {String} string in hex\n * @returns {String} ascii string representation of hex value\n */\nvar toAscii = function(hex) {\n// Find termination\n var str = \"\";\n var i = 0, l = hex.length;\n if (hex.substring(0, 2) === '0x') {\n i = 2;\n }\n for (; i < l; i+=2) {\n var code = parseInt(hex.substr(i, 2), 16);\n str += String.fromCharCode(code);\n }\n\n return str;\n};\n\n/**\n * Should be called to get hex representation (prefixed by 0x) of utf8 string\n *\n * @method fromUtf8\n * @param {String} string\n * @param {Number} optional padding\n * @returns {String} hex representation of input string\n */\nvar fromUtf8 = function(str) {\n str = utf8.encode(str);\n var hex = \"\";\n for(var i = 0; i < str.length; i++) {\n var code = str.charCodeAt(i);\n if (code === 0)\n break;\n var n = code.toString(16);\n hex += n.length < 2 ? '0' + n : n;\n }\n\n return \"0x\" + hex;\n};\n\n/**\n * Should be called to get hex representation (prefixed by 0x) of ascii string\n *\n * @method fromAscii\n * @param {String} string\n * @param {Number} optional padding\n * @returns {String} hex representation of input string\n */\nvar fromAscii = function(str) {\n var hex = \"\";\n for(var i = 0; i < str.length; i++) {\n var code = str.charCodeAt(i);\n var n = code.toString(16);\n hex += n.length < 2 ? '0' + n : n;\n }\n\n return \"0x\" + hex;\n};\n\n/**\n * Should be used to create full function/event name from json abi\n *\n * @method transformToFullName\n * @param {Object} json-abi\n * @return {String} full fnction/event name\n */\nvar transformToFullName = function (json) {\n if (json.name.indexOf('(') !== -1) {\n return json.name;\n }\n\n var typeName = json.inputs.map(function(i){return i.type; }).join();\n return json.name + '(' + typeName + ')';\n};\n\n/**\n * Should be called to get display name of contract function\n *\n * @method extractDisplayName\n * @param {String} name of function/event\n * @returns {String} display name for function/event eg. multiply(uint256) -> multiply\n */\nvar extractDisplayName = function (name) {\n var length = name.indexOf('(');\n return length !== -1 ? name.substr(0, length) : name;\n};\n\n/// @returns overloaded part of function/event name\nvar extractTypeName = function (name) {\n /// TODO: make it invulnerable\n var length = name.indexOf('(');\n return length !== -1 ? name.substr(length + 1, name.length - 1 - (length + 1)).replace(' ', '') : \"\";\n};\n\n/**\n * Converts value to it's decimal representation in string\n *\n * @method toDecimal\n * @param {String|Number|BigNumber}\n * @return {String}\n */\nvar toDecimal = function (value) {\n return toBigNumber(value).toNumber();\n};\n\n/**\n * Converts value to it's hex representation\n *\n * @method fromDecimal\n * @param {String|Number|BigNumber}\n * @return {String}\n */\nvar fromDecimal = function (value) {\n var number = toBigNumber(value);\n var result = number.toString(16);\n\n return number.lessThan(0) ? '-0x' + result.substr(1) : '0x' + result;\n};\n\n/**\n * Auto converts any given value into it's hex representation.\n *\n * And even stringifys objects before.\n *\n * @method toHex\n * @param {String|Number|BigNumber|Object}\n * @return {String}\n */\nvar toHex = function (val) {\n /*jshint maxcomplexity: 8 */\n\n if (isBoolean(val))\n return fromDecimal(+val);\n\n if (isBigNumber(val))\n return fromDecimal(val);\n\n if (typeof val === 'object')\n return fromUtf8(JSON.stringify(val));\n\n // if its a negative number, pass it through fromDecimal\n if (isString(val)) {\n if (val.indexOf('-0x') === 0)\n return fromDecimal(val);\n else if(val.indexOf('0x') === 0)\n return val;\n else if (!isFinite(val))\n return fromAscii(val);\n }\n\n return fromDecimal(val);\n};\n\n/**\n * Returns value of unit in Wei\n *\n * @method getValueOfUnit\n * @param {String} unit the unit to convert to, default ether\n * @returns {BigNumber} value of the unit (in Wei)\n * @throws error if the unit is not correct:w\n */\nvar getValueOfUnit = function (unit) {\n unit = unit ? unit.toLowerCase() : 'ether';\n var unitValue = unitMap[unit];\n if (unitValue === undefined) {\n throw new Error('This unit doesn\\'t exists, please use the one of the following units' + JSON.stringify(unitMap, null, 2));\n }\n return new BigNumber(unitValue, 10);\n};\n\n/**\n * Takes a number of wei and converts it to any other ether unit.\n *\n * Possible units are:\n * SI Short SI Full Effigy Other\n * - kwei femtoether babbage\n * - mwei picoether lovelace\n * - gwei nanoether shannon nano\n * - -- microether szabo micro\n * - -- milliether finney milli\n * - ether -- --\n * - kether -- grand\n * - mether\n * - gether\n * - tether\n *\n * @method fromWei\n * @param {Number|String} number can be a number, number string or a HEX of a decimal\n * @param {String} unit the unit to convert to, default ether\n * @return {String|Object} When given a BigNumber object it returns one as well, otherwise a number\n*/\nvar fromWei = function(number, unit) {\n var returnValue = toBigNumber(number).dividedBy(getValueOfUnit(unit));\n\n return isBigNumber(number) ? returnValue : returnValue.toString(10);\n};\n\n/**\n * Takes a number of a unit and converts it to wei.\n *\n * Possible units are:\n * SI Short SI Full Effigy Other\n * - kwei femtoether babbage\n * - mwei picoether lovelace\n * - gwei nanoether shannon nano\n * - -- microether szabo micro\n * - -- microether szabo micro\n * - -- milliether finney milli\n * - ether -- --\n * - kether -- grand\n * - mether\n * - gether\n * - tether\n *\n * @method toWei\n * @param {Number|String|BigNumber} number can be a number, number string or a HEX of a decimal\n * @param {String} unit the unit to convert from, default ether\n * @return {String|Object} When given a BigNumber object it returns one as well, otherwise a number\n*/\nvar toWei = function(number, unit) {\n var returnValue = toBigNumber(number).times(getValueOfUnit(unit));\n\n return isBigNumber(number) ? returnValue : returnValue.toString(10);\n};\n\n/**\n * Takes an input and transforms it into an bignumber\n *\n * @method toBigNumber\n * @param {Number|String|BigNumber} a number, string, HEX string or BigNumber\n * @return {BigNumber} BigNumber\n*/\nvar toBigNumber = function(number) {\n /*jshint maxcomplexity:5 */\n number = number || 0;\n if (isBigNumber(number))\n return number;\n\n if (isString(number) && (number.indexOf('0x') === 0 || number.indexOf('-0x') === 0)) {\n return new BigNumber(number.replace('0x',''), 16);\n }\n\n return new BigNumber(number.toString(10), 10);\n};\n\n/**\n * Takes and input transforms it into bignumber and if it is negative value, into two's complement\n *\n * @method toTwosComplement\n * @param {Number|String|BigNumber}\n * @return {BigNumber}\n */\nvar toTwosComplement = function (number) {\n var bigNumber = toBigNumber(number).round();\n if (bigNumber.lessThan(0)) {\n return new BigNumber(\"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\", 16).plus(bigNumber).plus(1);\n }\n return bigNumber;\n};\n\n/**\n * Checks if the given string is strictly an address\n *\n * @method isStrictAddress\n * @param {String} address the given HEX adress\n * @return {Boolean}\n*/\nvar isStrictAddress = function (address) {\n return /^0x[0-9a-f]{40}$/i.test(address);\n};\n\n/**\n * Checks if the given string is an address\n *\n * @method isAddress\n * @param {String} address the given HEX adress\n * @return {Boolean}\n*/\nvar isAddress = function (address) {\n if (!/^(0x)?[0-9a-f]{40}$/i.test(address)) {\n // check if it has the basic requirements of an address\n return false;\n } else if (/^(0x)?[0-9a-f]{40}$/.test(address) || /^(0x)?[0-9A-F]{40}$/.test(address)) {\n // If it's all small caps or all all caps, return true\n return true;\n } else {\n // Otherwise check each case\n return isChecksumAddress(address);\n }\n};\n\n/**\n * Checks if the given string is a checksummed address\n *\n * @method isChecksumAddress\n * @param {String} address the given HEX adress\n * @return {Boolean}\n*/\nvar isChecksumAddress = function (address) {\n // Check each case\n address = address.replace('0x','');\n var addressHash = sha3(address.toLowerCase());\n\n for (var i = 0; i < 40; i++ ) {\n // the nth letter should be uppercase if the nth digit of casemap is 1\n if ((parseInt(addressHash[i], 16) > 7 && address[i].toUpperCase() !== address[i]) || (parseInt(addressHash[i], 16) <= 7 && address[i].toLowerCase() !== address[i])) {\n return false;\n }\n }\n return true;\n};\n\n\n\n/**\n * Makes a checksum address\n *\n * @method toChecksumAddress\n * @param {String} address the given HEX adress\n * @return {String}\n*/\nvar toChecksumAddress = function (address) {\n if (typeof address === 'undefined') return '';\n\n address = address.toLowerCase().replace('0x','');\n var addressHash = sha3(address);\n var checksumAddress = '0x';\n\n for (var i = 0; i < address.length; i++ ) {\n // If ith character is 9 to f then make it uppercase\n if (parseInt(addressHash[i], 16) > 7) {\n checksumAddress += address[i].toUpperCase();\n } else {\n checksumAddress += address[i];\n }\n }\n return checksumAddress;\n};\n\n/**\n * Transforms given string to valid 20 bytes-length addres with 0x prefix\n *\n * @method toAddress\n * @param {String} address\n * @return {String} formatted address\n */\nvar toAddress = function (address) {\n if (isStrictAddress(address)) {\n return address;\n }\n\n if (/^[0-9a-f]{40}$/.test(address)) {\n return '0x' + address;\n }\n\n return '0x' + padLeft(toHex(address).substr(2), 40);\n};\n\n/**\n * Returns true if object is BigNumber, otherwise false\n *\n * @method isBigNumber\n * @param {Object}\n * @return {Boolean}\n */\nvar isBigNumber = function (object) {\n return object instanceof BigNumber ||\n (object && object.constructor && object.constructor.name === 'BigNumber');\n};\n\n/**\n * Returns true if object is string, otherwise false\n *\n * @method isString\n * @param {Object}\n * @return {Boolean}\n */\nvar isString = function (object) {\n return typeof object === 'string' ||\n (object && object.constructor && object.constructor.name === 'String');\n};\n\n/**\n * Returns true if object is function, otherwise false\n *\n * @method isFunction\n * @param {Object}\n * @return {Boolean}\n */\nvar isFunction = function (object) {\n return typeof object === 'function';\n};\n\n/**\n * Returns true if object is Objet, otherwise false\n *\n * @method isObject\n * @param {Object}\n * @return {Boolean}\n */\nvar isObject = function (object) {\n return object !== null && !(object instanceof Array) && typeof object === 'object';\n};\n\n/**\n * Returns true if object is boolean, otherwise false\n *\n * @method isBoolean\n * @param {Object}\n * @return {Boolean}\n */\nvar isBoolean = function (object) {\n return typeof object === 'boolean';\n};\n\n/**\n * Returns true if object is array, otherwise false\n *\n * @method isArray\n * @param {Object}\n * @return {Boolean}\n */\nvar isArray = function (object) {\n return object instanceof Array;\n};\n\n/**\n * Returns true if given string is valid json object\n *\n * @method isJson\n * @param {String}\n * @return {Boolean}\n */\nvar isJson = function (str) {\n try {\n return !!JSON.parse(str);\n } catch (e) {\n return false;\n }\n};\n\n/**\n * Returns true if given string is a valid Ethereum block header bloom.\n *\n * @method isBloom\n * @param {String} hex encoded bloom filter\n * @return {Boolean}\n */\nvar isBloom = function (bloom) {\n if (!/^(0x)?[0-9a-f]{512}$/i.test(bloom)) {\n return false;\n } else if (/^(0x)?[0-9a-f]{512}$/.test(bloom) || /^(0x)?[0-9A-F]{512}$/.test(bloom)) {\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if given string is a valid log topic.\n *\n * @method isTopic\n * @param {String} hex encoded topic\n * @return {Boolean}\n */\nvar isTopic = function (topic) {\n if (!/^(0x)?[0-9a-f]{64}$/i.test(topic)) {\n return false;\n } else if (/^(0x)?[0-9a-f]{64}$/.test(topic) || /^(0x)?[0-9A-F]{64}$/.test(topic)) {\n return true;\n }\n return false;\n};\n\nmodule.exports = {\n padLeft: padLeft,\n padRight: padRight,\n toHex: toHex,\n toDecimal: toDecimal,\n fromDecimal: fromDecimal,\n toUtf8: toUtf8,\n toAscii: toAscii,\n fromUtf8: fromUtf8,\n fromAscii: fromAscii,\n transformToFullName: transformToFullName,\n extractDisplayName: extractDisplayName,\n extractTypeName: extractTypeName,\n toWei: toWei,\n fromWei: fromWei,\n toBigNumber: toBigNumber,\n toTwosComplement: toTwosComplement,\n toAddress: toAddress,\n isBigNumber: isBigNumber,\n isStrictAddress: isStrictAddress,\n isAddress: isAddress,\n isChecksumAddress: isChecksumAddress,\n toChecksumAddress: toChecksumAddress,\n isFunction: isFunction,\n isString: isString,\n isObject: isObject,\n isBoolean: isBoolean,\n isArray: isArray,\n isJson: isJson,\n isBloom: isBloom,\n isTopic: isTopic,\n};\n", + "module.exports={\n \"version\": \"0.19.0\"\n}\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file web3.js\n * @authors:\n * Jeffrey Wilcke \n * Marek Kotewicz \n * Marian Oancea \n * Fabian Vogelsteller \n * Gav Wood \n * @date 2014\n */\n\nvar RequestManager = require('./web3/requestmanager');\nvar Iban = require('./web3/iban');\nvar Eth = require('./web3/methods/eth');\nvar DB = require('./web3/methods/db');\nvar Shh = require('./web3/methods/shh');\nvar Net = require('./web3/methods/net');\nvar Personal = require('./web3/methods/personal');\nvar Swarm = require('./web3/methods/swarm');\nvar Settings = require('./web3/settings');\nvar version = require('./version.json');\nvar utils = require('./utils/utils');\nvar sha3 = require('./utils/sha3');\nvar extend = require('./web3/extend');\nvar Batch = require('./web3/batch');\nvar Property = require('./web3/property');\nvar HttpProvider = require('./web3/httpprovider');\nvar IpcProvider = require('./web3/ipcprovider');\nvar BigNumber = require('bignumber.js');\n\n\n\nfunction Web3 (provider) {\n this._requestManager = new RequestManager(provider);\n this.currentProvider = provider;\n this.eth = new Eth(this);\n this.db = new DB(this);\n this.shh = new Shh(this);\n this.net = new Net(this);\n this.personal = new Personal(this);\n this.bzz = new Swarm(this);\n this.settings = new Settings();\n this.version = {\n api: version.version\n };\n this.providers = {\n HttpProvider: HttpProvider,\n IpcProvider: IpcProvider\n };\n this._extend = extend(this);\n this._extend({\n properties: properties()\n });\n}\n\n// expose providers on the class\nWeb3.providers = {\n HttpProvider: HttpProvider,\n IpcProvider: IpcProvider\n};\n\nWeb3.prototype.setProvider = function (provider) {\n this._requestManager.setProvider(provider);\n this.currentProvider = provider;\n};\n\nWeb3.prototype.reset = function (keepIsSyncing) {\n this._requestManager.reset(keepIsSyncing);\n this.settings = new Settings();\n};\n\nWeb3.prototype.BigNumber = BigNumber;\nWeb3.prototype.toHex = utils.toHex;\nWeb3.prototype.toAscii = utils.toAscii;\nWeb3.prototype.toUtf8 = utils.toUtf8;\nWeb3.prototype.fromAscii = utils.fromAscii;\nWeb3.prototype.fromUtf8 = utils.fromUtf8;\nWeb3.prototype.toDecimal = utils.toDecimal;\nWeb3.prototype.fromDecimal = utils.fromDecimal;\nWeb3.prototype.toBigNumber = utils.toBigNumber;\nWeb3.prototype.toWei = utils.toWei;\nWeb3.prototype.fromWei = utils.fromWei;\nWeb3.prototype.isAddress = utils.isAddress;\nWeb3.prototype.isChecksumAddress = utils.isChecksumAddress;\nWeb3.prototype.toChecksumAddress = utils.toChecksumAddress;\nWeb3.prototype.isIBAN = utils.isIBAN;\nWeb3.prototype.padLeft = utils.padLeft;\nWeb3.prototype.padRight = utils.padRight;\n\n\nWeb3.prototype.sha3 = function(string, options) {\n return '0x' + sha3(string, options);\n};\n\n/**\n * Transforms direct icap to address\n */\nWeb3.prototype.fromICAP = function (icap) {\n var iban = new Iban(icap);\n return iban.address();\n};\n\nvar properties = function () {\n return [\n new Property({\n name: 'version.node',\n getter: 'web3_clientVersion'\n }),\n new Property({\n name: 'version.network',\n getter: 'net_version',\n inputFormatter: utils.toDecimal\n }),\n new Property({\n name: 'version.ethereum',\n getter: 'eth_protocolVersion',\n inputFormatter: utils.toDecimal\n }),\n new Property({\n name: 'version.whisper',\n getter: 'shh_version',\n inputFormatter: utils.toDecimal\n })\n ];\n};\n\nWeb3.prototype.isConnected = function(){\n return (this.currentProvider && this.currentProvider.isConnected());\n};\n\nWeb3.prototype.createBatch = function () {\n return new Batch(this);\n};\n\nmodule.exports = Web3;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** \n * @file allevents.js\n * @author Marek Kotewicz \n * @date 2014\n */\n\nvar sha3 = require('../utils/sha3');\nvar SolidityEvent = require('./event');\nvar formatters = require('./formatters');\nvar utils = require('../utils/utils');\nvar Filter = require('./filter');\nvar watches = require('./methods/watches');\n\nvar AllSolidityEvents = function (requestManager, json, address) {\n this._requestManager = requestManager;\n this._json = json;\n this._address = address;\n};\n\nAllSolidityEvents.prototype.encode = function (options) {\n options = options || {};\n var result = {};\n\n ['fromBlock', 'toBlock'].filter(function (f) {\n return options[f] !== undefined;\n }).forEach(function (f) {\n result[f] = formatters.inputBlockNumberFormatter(options[f]);\n });\n\n result.address = this._address;\n\n return result;\n};\n\nAllSolidityEvents.prototype.decode = function (data) {\n data.data = data.data || '';\n data.topics = data.topics || [];\n\n var eventTopic = data.topics[0].slice(2);\n var match = this._json.filter(function (j) {\n return eventTopic === sha3(utils.transformToFullName(j));\n })[0];\n\n if (!match) { // cannot find matching event?\n console.warn('cannot find event for log');\n return data;\n }\n\n var event = new SolidityEvent(this._requestManager, match, this._address);\n return event.decode(data);\n};\n\nAllSolidityEvents.prototype.execute = function (options, callback) {\n\n if (utils.isFunction(arguments[arguments.length - 1])) {\n callback = arguments[arguments.length - 1];\n if(arguments.length === 1)\n options = null;\n }\n\n var o = this.encode(options);\n var formatter = this.decode.bind(this);\n return new Filter(this._requestManager, o, watches.eth(), formatter, callback);\n};\n\nAllSolidityEvents.prototype.attachToContract = function (contract) {\n var execute = this.execute.bind(this);\n contract.allEvents = execute;\n};\n\nmodule.exports = AllSolidityEvents;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** \n * @file batch.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\nvar Jsonrpc = require('./jsonrpc');\nvar errors = require('./errors');\n\nvar Batch = function (web3) {\n this.requestManager = web3._requestManager;\n this.requests = [];\n};\n\n/**\n * Should be called to add create new request to batch request\n *\n * @method add\n * @param {Object} jsonrpc requet object\n */\nBatch.prototype.add = function (request) {\n this.requests.push(request);\n};\n\n/**\n * Should be called to execute batch request\n *\n * @method execute\n */\nBatch.prototype.execute = function () {\n var requests = this.requests;\n this.requestManager.sendBatch(requests, function (err, results) {\n results = results || [];\n requests.map(function (request, index) {\n return results[index] || {};\n }).forEach(function (result, index) {\n if (requests[index].callback) {\n\n if (!Jsonrpc.isValidResponse(result)) {\n return requests[index].callback(errors.InvalidResponse(result));\n }\n\n requests[index].callback(null, (requests[index].format ? requests[index].format(result.result) : result.result));\n }\n });\n }); \n};\n\nmodule.exports = Batch;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file contract.js\n * @author Marek Kotewicz \n * @date 2014\n */\n\nvar utils = require('../utils/utils');\nvar coder = require('../solidity/coder');\nvar SolidityEvent = require('./event');\nvar SolidityFunction = require('./function');\nvar AllEvents = require('./allevents');\n\n/**\n * Should be called to encode constructor params\n *\n * @method encodeConstructorParams\n * @param {Array} abi\n * @param {Array} constructor params\n */\nvar encodeConstructorParams = function (abi, params) {\n return abi.filter(function (json) {\n return json.type === 'constructor' && json.inputs.length === params.length;\n }).map(function (json) {\n return json.inputs.map(function (input) {\n return input.type;\n });\n }).map(function (types) {\n return coder.encodeParams(types, params);\n })[0] || '';\n};\n\n/**\n * Should be called to add functions to contract object\n *\n * @method addFunctionsToContract\n * @param {Contract} contract\n * @param {Array} abi\n */\nvar addFunctionsToContract = function (contract) {\n contract.abi.filter(function (json) {\n return json.type === 'function';\n }).map(function (json) {\n return new SolidityFunction(contract._eth, json, contract.address);\n }).forEach(function (f) {\n f.attachToContract(contract);\n });\n};\n\n/**\n * Should be called to add events to contract object\n *\n * @method addEventsToContract\n * @param {Contract} contract\n * @param {Array} abi\n */\nvar addEventsToContract = function (contract) {\n var events = contract.abi.filter(function (json) {\n return json.type === 'event';\n });\n\n var All = new AllEvents(contract._eth._requestManager, events, contract.address);\n All.attachToContract(contract);\n\n events.map(function (json) {\n return new SolidityEvent(contract._eth._requestManager, json, contract.address);\n }).forEach(function (e) {\n e.attachToContract(contract);\n });\n};\n\n\n/**\n * Should be called to check if the contract gets properly deployed on the blockchain.\n *\n * @method checkForContractAddress\n * @param {Object} contract\n * @param {Function} callback\n * @returns {Undefined}\n */\nvar checkForContractAddress = function(contract, callback){\n var count = 0,\n callbackFired = false;\n\n // wait for receipt\n var filter = contract._eth.filter('latest', function(e){\n if (!e && !callbackFired) {\n count++;\n\n // stop watching after 50 blocks (timeout)\n if (count > 50) {\n\n filter.stopWatching(function() {});\n callbackFired = true;\n\n if (callback)\n callback(new Error('Contract transaction couldn\\'t be found after 50 blocks'));\n else\n throw new Error('Contract transaction couldn\\'t be found after 50 blocks');\n\n\n } else {\n\n contract._eth.getTransactionReceipt(contract.transactionHash, function(e, receipt){\n if(receipt && !callbackFired) {\n\n contract._eth.getCode(receipt.contractAddress, function(e, code){\n /*jshint maxcomplexity: 6 */\n\n if(callbackFired || !code)\n return;\n\n filter.stopWatching(function() {});\n callbackFired = true;\n\n if(code.length > 3) {\n\n // console.log('Contract code deployed!');\n\n contract.address = receipt.contractAddress;\n\n // attach events and methods again after we have\n addFunctionsToContract(contract);\n addEventsToContract(contract);\n\n // call callback for the second time\n if(callback)\n callback(null, contract);\n\n } else {\n if(callback)\n callback(new Error('The contract code couldn\\'t be stored, please check your gas amount.'));\n else\n throw new Error('The contract code couldn\\'t be stored, please check your gas amount.');\n }\n });\n }\n });\n }\n }\n });\n};\n\n/**\n * Should be called to create new ContractFactory instance\n *\n * @method ContractFactory\n * @param {Array} abi\n */\nvar ContractFactory = function (eth, abi) {\n this.eth = eth;\n this.abi = abi;\n\n /**\n * Should be called to create new contract on a blockchain\n *\n * @method new\n * @param {Any} contract constructor param1 (optional)\n * @param {Any} contract constructor param2 (optional)\n * @param {Object} contract transaction object (required)\n * @param {Function} callback\n * @returns {Contract} returns contract instance\n */\n this.new = function () {\n /*jshint maxcomplexity: 7 */\n \n var contract = new Contract(this.eth, this.abi);\n\n // parse arguments\n var options = {}; // required!\n var callback;\n\n var args = Array.prototype.slice.call(arguments);\n if (utils.isFunction(args[args.length - 1])) {\n callback = args.pop();\n }\n\n var last = args[args.length - 1];\n if (utils.isObject(last) && !utils.isArray(last)) {\n options = args.pop();\n }\n\n if (options.value > 0) {\n var constructorAbi = abi.filter(function (json) {\n return json.type === 'constructor' && json.inputs.length === args.length;\n })[0] || {};\n\n if (!constructorAbi.payable) {\n throw new Error('Cannot send value to non-payable constructor');\n }\n }\n\n var bytes = encodeConstructorParams(this.abi, args);\n options.data += bytes;\n\n if (callback) {\n\n // wait for the contract address adn check if the code was deployed\n this.eth.sendTransaction(options, function (err, hash) {\n if (err) {\n callback(err);\n } else {\n // add the transaction hash\n contract.transactionHash = hash;\n\n // call callback for the first time\n callback(null, contract);\n\n checkForContractAddress(contract, callback);\n }\n });\n } else {\n var hash = this.eth.sendTransaction(options);\n // add the transaction hash\n contract.transactionHash = hash;\n checkForContractAddress(contract);\n }\n\n return contract;\n };\n\n this.new.getData = this.getData.bind(this);\n};\n\n/**\n * Should be called to create new ContractFactory\n *\n * @method contract\n * @param {Array} abi\n * @returns {ContractFactory} new contract factory\n */\n//var contract = function (abi) {\n //return new ContractFactory(abi);\n//};\n\n\n\n/**\n * Should be called to get access to existing contract on a blockchain\n *\n * @method at\n * @param {Address} contract address (required)\n * @param {Function} callback {optional)\n * @returns {Contract} returns contract if no callback was passed,\n * otherwise calls callback function (err, contract)\n */\nContractFactory.prototype.at = function (address, callback) {\n var contract = new Contract(this.eth, this.abi, address);\n\n // this functions are not part of prototype,\n // because we dont want to spoil the interface\n addFunctionsToContract(contract);\n addEventsToContract(contract);\n\n if (callback) {\n callback(null, contract);\n }\n return contract;\n};\n\n/**\n * Gets the data, which is data to deploy plus constructor params\n *\n * @method getData\n */\nContractFactory.prototype.getData = function () {\n var options = {}; // required!\n var args = Array.prototype.slice.call(arguments);\n\n var last = args[args.length - 1];\n if (utils.isObject(last) && !utils.isArray(last)) {\n options = args.pop();\n }\n\n var bytes = encodeConstructorParams(this.abi, args);\n options.data += bytes;\n\n return options.data;\n};\n\n/**\n * Should be called to create new contract instance\n *\n * @method Contract\n * @param {Array} abi\n * @param {Address} contract address\n */\nvar Contract = function (eth, abi, address) {\n this._eth = eth;\n this.transactionHash = null;\n this.address = address;\n this.abi = abi;\n};\n\nmodule.exports = ContractFactory;\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** \n * @file errors.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\nmodule.exports = {\n InvalidNumberOfSolidityArgs: function () {\n return new Error('Invalid number of arguments to Solidity function');\n },\n InvalidNumberOfRPCParams: function () {\n return new Error('Invalid number of input parameters to RPC method');\n },\n InvalidConnection: function (host){\n return new Error('CONNECTION ERROR: Couldn\\'t connect to node '+ host +'.');\n },\n InvalidProvider: function () {\n return new Error('Provider not set or invalid');\n },\n InvalidResponse: function (result){\n var message = !!result && !!result.error && !!result.error.message ? result.error.message : 'Invalid JSON RPC response: ' + JSON.stringify(result);\n return new Error(message);\n },\n ConnectionTimeout: function (ms){\n return new Error('CONNECTION TIMEOUT: timeout of ' + ms + ' ms achived');\n }\n};\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** \n * @file event.js\n * @author Marek Kotewicz \n * @date 2014\n */\n\nvar utils = require('../utils/utils');\nvar coder = require('../solidity/coder');\nvar formatters = require('./formatters');\nvar sha3 = require('../utils/sha3');\nvar Filter = require('./filter');\nvar watches = require('./methods/watches');\n\n/**\n * This prototype should be used to create event filters\n */\nvar SolidityEvent = function (requestManager, json, address) {\n this._requestManager = requestManager;\n this._params = json.inputs;\n this._name = utils.transformToFullName(json);\n this._address = address;\n this._anonymous = json.anonymous;\n};\n\n/**\n * Should be used to get filtered param types\n *\n * @method types\n * @param {Bool} decide if returned typed should be indexed\n * @return {Array} array of types\n */\nSolidityEvent.prototype.types = function (indexed) {\n return this._params.filter(function (i) {\n return i.indexed === indexed;\n }).map(function (i) {\n return i.type;\n });\n};\n\n/**\n * Should be used to get event display name\n *\n * @method displayName\n * @return {String} event display name\n */\nSolidityEvent.prototype.displayName = function () {\n return utils.extractDisplayName(this._name);\n};\n\n/**\n * Should be used to get event type name\n *\n * @method typeName\n * @return {String} event type name\n */\nSolidityEvent.prototype.typeName = function () {\n return utils.extractTypeName(this._name);\n};\n\n/**\n * Should be used to get event signature\n *\n * @method signature\n * @return {String} event signature\n */\nSolidityEvent.prototype.signature = function () {\n return sha3(this._name);\n};\n\n/**\n * Should be used to encode indexed params and options to one final object\n * \n * @method encode\n * @param {Object} indexed\n * @param {Object} options\n * @return {Object} everything combined together and encoded\n */\nSolidityEvent.prototype.encode = function (indexed, options) {\n indexed = indexed || {};\n options = options || {};\n var result = {};\n\n ['fromBlock', 'toBlock'].filter(function (f) {\n return options[f] !== undefined;\n }).forEach(function (f) {\n result[f] = formatters.inputBlockNumberFormatter(options[f]);\n });\n\n result.topics = [];\n\n result.address = this._address;\n if (!this._anonymous) {\n result.topics.push('0x' + this.signature());\n }\n\n var indexedTopics = this._params.filter(function (i) {\n return i.indexed === true;\n }).map(function (i) {\n var value = indexed[i.name];\n if (value === undefined || value === null) {\n return null;\n }\n \n if (utils.isArray(value)) {\n return value.map(function (v) {\n return '0x' + coder.encodeParam(i.type, v);\n });\n }\n return '0x' + coder.encodeParam(i.type, value);\n });\n\n result.topics = result.topics.concat(indexedTopics);\n\n return result;\n};\n\n/**\n * Should be used to decode indexed params and options\n *\n * @method decode\n * @param {Object} data\n * @return {Object} result object with decoded indexed && not indexed params\n */\nSolidityEvent.prototype.decode = function (data) {\n \n data.data = data.data || '';\n data.topics = data.topics || [];\n\n var argTopics = this._anonymous ? data.topics : data.topics.slice(1);\n var indexedData = argTopics.map(function (topics) { return topics.slice(2); }).join(\"\");\n var indexedParams = coder.decodeParams(this.types(true), indexedData); \n\n var notIndexedData = data.data.slice(2);\n var notIndexedParams = coder.decodeParams(this.types(false), notIndexedData);\n \n var result = formatters.outputLogFormatter(data);\n result.event = this.displayName();\n result.address = data.address;\n\n result.args = this._params.reduce(function (acc, current) {\n acc[current.name] = current.indexed ? indexedParams.shift() : notIndexedParams.shift();\n return acc;\n }, {});\n\n delete result.data;\n delete result.topics;\n\n return result;\n};\n\n/**\n * Should be used to create new filter object from event\n *\n * @method execute\n * @param {Object} indexed\n * @param {Object} options\n * @return {Object} filter object\n */\nSolidityEvent.prototype.execute = function (indexed, options, callback) {\n\n if (utils.isFunction(arguments[arguments.length - 1])) {\n callback = arguments[arguments.length - 1];\n if(arguments.length === 2)\n options = null;\n if(arguments.length === 1) {\n options = null;\n indexed = {};\n }\n }\n \n var o = this.encode(indexed, options);\n var formatter = this.decode.bind(this);\n return new Filter(this._requestManager, o, watches.eth(), formatter, callback);\n};\n\n/**\n * Should be used to attach event to contract object\n *\n * @method attachToContract\n * @param {Contract}\n */\nSolidityEvent.prototype.attachToContract = function (contract) {\n var execute = this.execute.bind(this);\n var displayName = this.displayName();\n if (!contract[displayName]) {\n contract[displayName] = execute;\n }\n contract[displayName][this.typeName()] = this.execute.bind(this, contract);\n};\n\nmodule.exports = SolidityEvent;\n\n", + "var formatters = require('./formatters');\nvar utils = require('./../utils/utils');\nvar Method = require('./method');\nvar Property = require('./property');\n\n// TODO: refactor, so the input params are not altered.\n// it's necessary to make same 'extension' work with multiple providers\nvar extend = function (web3) {\n /* jshint maxcomplexity:5 */\n var ex = function (extension) {\n\n var extendedObject;\n if (extension.property) {\n if (!web3[extension.property]) {\n web3[extension.property] = {};\n }\n extendedObject = web3[extension.property];\n } else {\n extendedObject = web3;\n }\n\n if (extension.methods) {\n extension.methods.forEach(function (method) {\n method.attachToObject(extendedObject);\n method.setRequestManager(web3._requestManager);\n });\n }\n\n if (extension.properties) {\n extension.properties.forEach(function (property) {\n property.attachToObject(extendedObject);\n property.setRequestManager(web3._requestManager);\n });\n }\n };\n\n ex.formatters = formatters; \n ex.utils = utils;\n ex.Method = Method;\n ex.Property = Property;\n\n return ex;\n};\n\n\n\nmodule.exports = extend;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** @file filter.js\n * @authors:\n * Jeffrey Wilcke \n * Marek Kotewicz \n * Marian Oancea \n * Fabian Vogelsteller \n * Gav Wood \n * @date 2014\n */\n\nvar formatters = require('./formatters');\nvar utils = require('../utils/utils');\n\n/**\n* Converts a given topic to a hex string, but also allows null values.\n*\n* @param {Mixed} value\n* @return {String}\n*/\nvar toTopic = function(value){\n\n if(value === null || typeof value === 'undefined')\n return null;\n\n value = String(value);\n\n if(value.indexOf('0x') === 0)\n return value;\n else\n return utils.fromUtf8(value);\n};\n\n/// This method should be called on options object, to verify deprecated properties && lazy load dynamic ones\n/// @param should be string or object\n/// @returns options string or object\nvar getOptions = function (options) {\n\n if (utils.isString(options)) {\n return options;\n }\n\n options = options || {};\n\n // make sure topics, get converted to hex\n options.topics = options.topics || [];\n options.topics = options.topics.map(function(topic){\n return (utils.isArray(topic)) ? topic.map(toTopic) : toTopic(topic);\n });\n\n return {\n topics: options.topics,\n from: options.from,\n to: options.to,\n address: options.address,\n fromBlock: formatters.inputBlockNumberFormatter(options.fromBlock),\n toBlock: formatters.inputBlockNumberFormatter(options.toBlock)\n };\n};\n\n/**\nAdds the callback and sets up the methods, to iterate over the results.\n\n@method getLogsAtStart\n@param {Object} self\n@param {funciton}\n*/\nvar getLogsAtStart = function(self, callback){\n // call getFilterLogs for the first watch callback start\n if (!utils.isString(self.options)) {\n self.get(function (err, messages) {\n // don't send all the responses to all the watches again... just to self one\n if (err) {\n callback(err);\n }\n\n if(utils.isArray(messages)) {\n messages.forEach(function (message) {\n callback(null, message);\n });\n }\n });\n }\n};\n\n/**\nAdds the callback and sets up the methods, to iterate over the results.\n\n@method pollFilter\n@param {Object} self\n*/\nvar pollFilter = function(self) {\n\n var onMessage = function (error, messages) {\n if (error) {\n return self.callbacks.forEach(function (callback) {\n callback(error);\n });\n }\n\n if(utils.isArray(messages)) {\n messages.forEach(function (message) {\n message = self.formatter ? self.formatter(message) : message;\n self.callbacks.forEach(function (callback) {\n callback(null, message);\n });\n });\n }\n };\n\n self.requestManager.startPolling({\n method: self.implementation.poll.call,\n params: [self.filterId],\n }, self.filterId, onMessage, self.stopWatching.bind(self));\n\n};\n\nvar Filter = function (requestManager, options, methods, formatter, callback, filterCreationErrorCallback) {\n var self = this;\n var implementation = {};\n methods.forEach(function (method) {\n method.setRequestManager(requestManager);\n method.attachToObject(implementation);\n });\n this.requestManager = requestManager;\n this.options = getOptions(options);\n this.implementation = implementation;\n this.filterId = null;\n this.callbacks = [];\n this.getLogsCallbacks = [];\n this.pollFilters = [];\n this.formatter = formatter;\n this.implementation.newFilter(this.options, function(error, id){\n if(error) {\n self.callbacks.forEach(function(cb){\n cb(error);\n });\n if (typeof filterCreationErrorCallback === 'function') {\n filterCreationErrorCallback(error);\n }\n } else {\n self.filterId = id;\n\n // check if there are get pending callbacks as a consequence\n // of calling get() with filterId unassigned.\n self.getLogsCallbacks.forEach(function (cb){\n self.get(cb);\n });\n self.getLogsCallbacks = [];\n\n // get filter logs for the already existing watch calls\n self.callbacks.forEach(function(cb){\n getLogsAtStart(self, cb);\n });\n if(self.callbacks.length > 0)\n pollFilter(self);\n\n // start to watch immediately\n if(typeof callback === 'function') {\n return self.watch(callback);\n }\n }\n });\n\n return this;\n};\n\nFilter.prototype.watch = function (callback) {\n this.callbacks.push(callback);\n\n if(this.filterId) {\n getLogsAtStart(this, callback);\n pollFilter(this);\n }\n\n return this;\n};\n\nFilter.prototype.stopWatching = function (callback) {\n this.requestManager.stopPolling(this.filterId);\n this.callbacks = [];\n // remove filter async\n if (callback) {\n this.implementation.uninstallFilter(this.filterId, callback);\n } else {\n return this.implementation.uninstallFilter(this.filterId);\n }\n};\n\nFilter.prototype.get = function (callback) {\n var self = this;\n if (utils.isFunction(callback)) {\n if (this.filterId === null) {\n // If filterId is not set yet, call it back\n // when newFilter() assigns it.\n this.getLogsCallbacks.push(callback);\n } else {\n this.implementation.getLogs(this.filterId, function(err, res){\n if (err) {\n callback(err);\n } else {\n callback(null, res.map(function (log) {\n return self.formatter ? self.formatter(log) : log;\n }));\n }\n });\n }\n } else {\n if (this.filterId === null) {\n throw new Error('Filter ID Error: filter().get() can\\'t be chained synchronous, please provide a callback for the get() method.');\n }\n var logs = this.implementation.getLogs(this.filterId);\n return logs.map(function (log) {\n return self.formatter ? self.formatter(log) : log;\n });\n }\n\n return this;\n};\n\nmodule.exports = Filter;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file formatters.js\n * @author Marek Kotewicz \n * @author Fabian Vogelsteller \n * @date 2015\n */\n\nvar utils = require('../utils/utils');\nvar config = require('../utils/config');\nvar Iban = require('./iban');\n\n/**\n * Should the format output to a big number\n *\n * @method outputBigNumberFormatter\n * @param {String|Number|BigNumber}\n * @returns {BigNumber} object\n */\nvar outputBigNumberFormatter = function (number) {\n return utils.toBigNumber(number);\n};\n\nvar isPredefinedBlockNumber = function (blockNumber) {\n return blockNumber === 'latest' || blockNumber === 'pending' || blockNumber === 'earliest';\n};\n\nvar inputDefaultBlockNumberFormatter = function (blockNumber) {\n if (blockNumber === undefined) {\n return config.defaultBlock;\n }\n return inputBlockNumberFormatter(blockNumber);\n};\n\nvar inputBlockNumberFormatter = function (blockNumber) {\n if (blockNumber === undefined) {\n return undefined;\n } else if (isPredefinedBlockNumber(blockNumber)) {\n return blockNumber;\n }\n return utils.toHex(blockNumber);\n};\n\n/**\n * Formats the input of a transaction and converts all values to HEX\n *\n * @method inputCallFormatter\n * @param {Object} transaction options\n * @returns object\n*/\nvar inputCallFormatter = function (options){\n\n options.from = options.from || config.defaultAccount;\n\n if (options.from) {\n options.from = inputAddressFormatter(options.from);\n }\n\n if (options.to) { // it might be contract creation\n options.to = inputAddressFormatter(options.to);\n }\n\n ['gasPrice', 'gas', 'value', 'nonce'].filter(function (key) {\n return options[key] !== undefined;\n }).forEach(function(key){\n options[key] = utils.fromDecimal(options[key]);\n });\n\n return options;\n};\n\n/**\n * Formats the input of a transaction and converts all values to HEX\n *\n * @method inputTransactionFormatter\n * @param {Object} transaction options\n * @returns object\n*/\nvar inputTransactionFormatter = function (options){\n\n options.from = options.from || config.defaultAccount;\n options.from = inputAddressFormatter(options.from);\n\n if (options.to) { // it might be contract creation\n options.to = inputAddressFormatter(options.to);\n }\n\n ['gasPrice', 'gas', 'value', 'nonce'].filter(function (key) {\n return options[key] !== undefined;\n }).forEach(function(key){\n options[key] = utils.fromDecimal(options[key]);\n });\n\n return options;\n};\n\n/**\n * Formats the output of a transaction to its proper values\n *\n * @method outputTransactionFormatter\n * @param {Object} tx\n * @returns {Object}\n*/\nvar outputTransactionFormatter = function (tx){\n if(tx.blockNumber !== null)\n tx.blockNumber = utils.toDecimal(tx.blockNumber);\n if(tx.transactionIndex !== null)\n tx.transactionIndex = utils.toDecimal(tx.transactionIndex);\n tx.nonce = utils.toDecimal(tx.nonce);\n tx.gas = utils.toDecimal(tx.gas);\n tx.gasPrice = utils.toBigNumber(tx.gasPrice);\n tx.value = utils.toBigNumber(tx.value);\n return tx;\n};\n\n/**\n * Formats the output of a transaction receipt to its proper values\n *\n * @method outputTransactionReceiptFormatter\n * @param {Object} receipt\n * @returns {Object}\n*/\nvar outputTransactionReceiptFormatter = function (receipt){\n if(receipt.blockNumber !== null)\n receipt.blockNumber = utils.toDecimal(receipt.blockNumber);\n if(receipt.transactionIndex !== null)\n receipt.transactionIndex = utils.toDecimal(receipt.transactionIndex);\n receipt.cumulativeGasUsed = utils.toDecimal(receipt.cumulativeGasUsed);\n receipt.gasUsed = utils.toDecimal(receipt.gasUsed);\n\n if(utils.isArray(receipt.logs)) {\n receipt.logs = receipt.logs.map(function(log){\n return outputLogFormatter(log);\n });\n }\n\n return receipt;\n};\n\n/**\n * Formats the output of a block to its proper values\n *\n * @method outputBlockFormatter\n * @param {Object} block\n * @returns {Object}\n*/\nvar outputBlockFormatter = function(block) {\n\n // transform to number\n block.gasLimit = utils.toDecimal(block.gasLimit);\n block.gasUsed = utils.toDecimal(block.gasUsed);\n block.size = utils.toDecimal(block.size);\n block.timestamp = utils.toDecimal(block.timestamp);\n if(block.number !== null)\n block.number = utils.toDecimal(block.number);\n\n block.difficulty = utils.toBigNumber(block.difficulty);\n block.totalDifficulty = utils.toBigNumber(block.totalDifficulty);\n\n if (utils.isArray(block.transactions)) {\n block.transactions.forEach(function(item){\n if(!utils.isString(item))\n return outputTransactionFormatter(item);\n });\n }\n\n return block;\n};\n\n/**\n * Formats the output of a log\n *\n * @method outputLogFormatter\n * @param {Object} log object\n * @returns {Object} log\n*/\nvar outputLogFormatter = function(log) {\n if(log.blockNumber !== null)\n log.blockNumber = utils.toDecimal(log.blockNumber);\n if(log.transactionIndex !== null)\n log.transactionIndex = utils.toDecimal(log.transactionIndex);\n if(log.logIndex !== null)\n log.logIndex = utils.toDecimal(log.logIndex);\n\n return log;\n};\n\n/**\n * Formats the input of a whisper post and converts all values to HEX\n *\n * @method inputPostFormatter\n * @param {Object} transaction object\n * @returns {Object}\n*/\nvar inputPostFormatter = function(post) {\n\n // post.payload = utils.toHex(post.payload);\n post.ttl = utils.fromDecimal(post.ttl);\n post.workToProve = utils.fromDecimal(post.workToProve);\n post.priority = utils.fromDecimal(post.priority);\n\n // fallback\n if (!utils.isArray(post.topics)) {\n post.topics = post.topics ? [post.topics] : [];\n }\n\n // format the following options\n post.topics = post.topics.map(function(topic){\n // convert only if not hex\n return (topic.indexOf('0x') === 0) ? topic : utils.fromUtf8(topic);\n });\n\n return post;\n};\n\n/**\n * Formats the output of a received post message\n *\n * @method outputPostFormatter\n * @param {Object}\n * @returns {Object}\n */\nvar outputPostFormatter = function(post){\n\n post.expiry = utils.toDecimal(post.expiry);\n post.sent = utils.toDecimal(post.sent);\n post.ttl = utils.toDecimal(post.ttl);\n post.workProved = utils.toDecimal(post.workProved);\n // post.payloadRaw = post.payload;\n // post.payload = utils.toAscii(post.payload);\n\n // if (utils.isJson(post.payload)) {\n // post.payload = JSON.parse(post.payload);\n // }\n\n // format the following options\n if (!post.topics) {\n post.topics = [];\n }\n post.topics = post.topics.map(function(topic){\n return utils.toAscii(topic);\n });\n\n return post;\n};\n\nvar inputAddressFormatter = function (address) {\n var iban = new Iban(address);\n if (iban.isValid() && iban.isDirect()) {\n return '0x' + iban.address();\n } else if (utils.isStrictAddress(address)) {\n return address;\n } else if (utils.isAddress(address)) {\n return '0x' + address;\n }\n throw new Error('invalid address');\n};\n\n\nvar outputSyncingFormatter = function(result) {\n\n result.startingBlock = utils.toDecimal(result.startingBlock);\n result.currentBlock = utils.toDecimal(result.currentBlock);\n result.highestBlock = utils.toDecimal(result.highestBlock);\n if (result.knownStates) {\n result.knownStates = utils.toDecimal(result.knownStates);\n result.pulledStates = utils.toDecimal(result.pulledStates);\n }\n\n return result;\n};\n\nmodule.exports = {\n inputDefaultBlockNumberFormatter: inputDefaultBlockNumberFormatter,\n inputBlockNumberFormatter: inputBlockNumberFormatter,\n inputCallFormatter: inputCallFormatter,\n inputTransactionFormatter: inputTransactionFormatter,\n inputAddressFormatter: inputAddressFormatter,\n inputPostFormatter: inputPostFormatter,\n outputBigNumberFormatter: outputBigNumberFormatter,\n outputTransactionFormatter: outputTransactionFormatter,\n outputTransactionReceiptFormatter: outputTransactionReceiptFormatter,\n outputBlockFormatter: outputBlockFormatter,\n outputLogFormatter: outputLogFormatter,\n outputPostFormatter: outputPostFormatter,\n outputSyncingFormatter: outputSyncingFormatter\n};\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file function.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\nvar coder = require('../solidity/coder');\nvar utils = require('../utils/utils');\nvar errors = require('./errors');\nvar formatters = require('./formatters');\nvar sha3 = require('../utils/sha3');\n\n/**\n * This prototype should be used to call/sendTransaction to solidity functions\n */\nvar SolidityFunction = function (eth, json, address) {\n this._eth = eth;\n this._inputTypes = json.inputs.map(function (i) {\n return i.type;\n });\n this._outputTypes = json.outputs.map(function (i) {\n return i.type;\n });\n this._constant = json.constant;\n this._payable = json.payable;\n this._name = utils.transformToFullName(json);\n this._address = address;\n};\n\nSolidityFunction.prototype.extractCallback = function (args) {\n if (utils.isFunction(args[args.length - 1])) {\n return args.pop(); // modify the args array!\n }\n};\n\nSolidityFunction.prototype.extractDefaultBlock = function (args) {\n if (args.length > this._inputTypes.length && !utils.isObject(args[args.length -1])) {\n return formatters.inputDefaultBlockNumberFormatter(args.pop()); // modify the args array!\n }\n};\n\n/**\n * Should be called to check if the number of arguments is correct\n *\n * @method validateArgs\n * @param {Array} arguments\n * @throws {Error} if it is not\n */\nSolidityFunction.prototype.validateArgs = function (args) {\n var inputArgs = args.filter(function (a) {\n // filter the options object but not arguments that are arrays\n return !(utils.isObject(a) === true && utils.isArray(a) === false);\n });\n if (inputArgs.length !== this._inputTypes.length) {\n throw errors.InvalidNumberOfSolidityArgs();\n }\n};\n\n/**\n * Should be used to create payload from arguments\n *\n * @method toPayload\n * @param {Array} solidity function params\n * @param {Object} optional payload options\n */\nSolidityFunction.prototype.toPayload = function (args) {\n var options = {};\n if (args.length > this._inputTypes.length && utils.isObject(args[args.length -1])) {\n options = args[args.length - 1];\n }\n this.validateArgs(args);\n options.to = this._address;\n options.data = '0x' + this.signature() + coder.encodeParams(this._inputTypes, args);\n return options;\n};\n\n/**\n * Should be used to get function signature\n *\n * @method signature\n * @return {String} function signature\n */\nSolidityFunction.prototype.signature = function () {\n return sha3(this._name).slice(0, 8);\n};\n\n\nSolidityFunction.prototype.unpackOutput = function (output) {\n if (!output) {\n return;\n }\n\n output = output.length >= 2 ? output.slice(2) : output;\n var result = coder.decodeParams(this._outputTypes, output);\n return result.length === 1 ? result[0] : result;\n};\n\n/**\n * Calls a contract function.\n *\n * @method call\n * @param {...Object} Contract function arguments\n * @param {function} If the last argument is a function, the contract function\n * call will be asynchronous, and the callback will be passed the\n * error and result.\n * @return {String} output bytes\n */\nSolidityFunction.prototype.call = function () {\n var args = Array.prototype.slice.call(arguments).filter(function (a) {return a !== undefined; });\n var callback = this.extractCallback(args);\n var defaultBlock = this.extractDefaultBlock(args);\n var payload = this.toPayload(args);\n\n\n if (!callback) {\n var output = this._eth.call(payload, defaultBlock);\n return this.unpackOutput(output);\n }\n\n var self = this;\n this._eth.call(payload, defaultBlock, function (error, output) {\n if (error) return callback(error, null);\n\n var unpacked = null;\n try {\n unpacked = self.unpackOutput(output);\n }\n catch (e) {\n error = e;\n }\n\n callback(error, unpacked);\n });\n};\n\n/**\n * Should be used to sendTransaction to solidity function\n *\n * @method sendTransaction\n */\nSolidityFunction.prototype.sendTransaction = function () {\n var args = Array.prototype.slice.call(arguments).filter(function (a) {return a !== undefined; });\n var callback = this.extractCallback(args);\n var payload = this.toPayload(args);\n\n if (payload.value > 0 && !this._payable) {\n throw new Error('Cannot send value to non-payable function');\n }\n\n if (!callback) {\n return this._eth.sendTransaction(payload);\n }\n\n this._eth.sendTransaction(payload, callback);\n};\n\n/**\n * Should be used to estimateGas of solidity function\n *\n * @method estimateGas\n */\nSolidityFunction.prototype.estimateGas = function () {\n var args = Array.prototype.slice.call(arguments);\n var callback = this.extractCallback(args);\n var payload = this.toPayload(args);\n\n if (!callback) {\n return this._eth.estimateGas(payload);\n }\n\n this._eth.estimateGas(payload, callback);\n};\n\n/**\n * Return the encoded data of the call\n *\n * @method getData\n * @return {String} the encoded data\n */\nSolidityFunction.prototype.getData = function () {\n var args = Array.prototype.slice.call(arguments);\n var payload = this.toPayload(args);\n\n return payload.data;\n};\n\n/**\n * Should be used to get function display name\n *\n * @method displayName\n * @return {String} display name of the function\n */\nSolidityFunction.prototype.displayName = function () {\n return utils.extractDisplayName(this._name);\n};\n\n/**\n * Should be used to get function type name\n *\n * @method typeName\n * @return {String} type name of the function\n */\nSolidityFunction.prototype.typeName = function () {\n return utils.extractTypeName(this._name);\n};\n\n/**\n * Should be called to get rpc requests from solidity function\n *\n * @method request\n * @returns {Object}\n */\nSolidityFunction.prototype.request = function () {\n var args = Array.prototype.slice.call(arguments);\n var callback = this.extractCallback(args);\n var payload = this.toPayload(args);\n var format = this.unpackOutput.bind(this);\n\n return {\n method: this._constant ? 'eth_call' : 'eth_sendTransaction',\n callback: callback,\n params: [payload],\n format: format\n };\n};\n\n/**\n * Should be called to execute function\n *\n * @method execute\n */\nSolidityFunction.prototype.execute = function () {\n var transaction = !this._constant;\n\n // send transaction\n if (transaction) {\n return this.sendTransaction.apply(this, Array.prototype.slice.call(arguments));\n }\n\n // call\n return this.call.apply(this, Array.prototype.slice.call(arguments));\n};\n\n/**\n * Should be called to attach function to contract\n *\n * @method attachToContract\n * @param {Contract}\n */\nSolidityFunction.prototype.attachToContract = function (contract) {\n var execute = this.execute.bind(this);\n execute.request = this.request.bind(this);\n execute.call = this.call.bind(this);\n execute.sendTransaction = this.sendTransaction.bind(this);\n execute.estimateGas = this.estimateGas.bind(this);\n execute.getData = this.getData.bind(this);\n var displayName = this.displayName();\n if (!contract[displayName]) {\n contract[displayName] = execute;\n }\n contract[displayName][this.typeName()] = execute; // circular!!!!\n};\n\nmodule.exports = SolidityFunction;\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** @file httpprovider.js\n * @authors:\n * Marek Kotewicz \n * Marian Oancea \n * Fabian Vogelsteller \n * @date 2015\n */\n\n\nvar errors = require('./errors');\n\n// workaround to use httpprovider in different envs\n\n// browser\nif (typeof window !== 'undefined' && window.XMLHttpRequest) {\n XMLHttpRequest = window.XMLHttpRequest; // jshint ignore: line\n// node\n} else {\n XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // jshint ignore: line\n}\n\nvar XHR2 = require('xhr2'); // jshint ignore: line\n\n/**\n * HttpProvider should be used to send rpc calls over http\n */\nvar HttpProvider = function (host, timeout) {\n this.host = host || 'http://localhost:8545';\n this.timeout = timeout || 0;\n};\n\n/**\n * Should be called to prepare new XMLHttpRequest\n *\n * @method prepareRequest\n * @param {Boolean} true if request should be async\n * @return {XMLHttpRequest} object\n */\nHttpProvider.prototype.prepareRequest = function (async) {\n var request;\n\n if (async) {\n request = new XHR2();\n request.timeout = this.timeout;\n }else {\n request = new XMLHttpRequest();\n }\n\n request.open('POST', this.host, async);\n request.setRequestHeader('Content-Type','application/json');\n return request;\n};\n\n/**\n * Should be called to make sync request\n *\n * @method send\n * @param {Object} payload\n * @return {Object} result\n */\nHttpProvider.prototype.send = function (payload) {\n var request = this.prepareRequest(false);\n\n try {\n request.send(JSON.stringify(payload));\n } catch(error) {\n throw errors.InvalidConnection(this.host);\n }\n\n var result = request.responseText;\n\n try {\n result = JSON.parse(result);\n } catch(e) {\n throw errors.InvalidResponse(request.responseText);\n }\n\n return result;\n};\n\n/**\n * Should be used to make async request\n *\n * @method sendAsync\n * @param {Object} payload\n * @param {Function} callback triggered on end with (err, result)\n */\nHttpProvider.prototype.sendAsync = function (payload, callback) {\n var request = this.prepareRequest(true);\n\n request.onreadystatechange = function() {\n if (request.readyState === 4 && request.timeout !== 1) {\n var result = request.responseText;\n var error = null;\n\n try {\n result = JSON.parse(result);\n } catch(e) {\n error = errors.InvalidResponse(request.responseText);\n }\n\n callback(error, result);\n }\n };\n\n request.ontimeout = function() {\n callback(errors.ConnectionTimeout(this.timeout));\n };\n\n try {\n request.send(JSON.stringify(payload));\n } catch(error) {\n callback(errors.InvalidConnection(this.host));\n }\n};\n\n/**\n * Synchronously tries to make Http request\n *\n * @method isConnected\n * @return {Boolean} returns true if request haven't failed. Otherwise false\n */\nHttpProvider.prototype.isConnected = function() {\n try {\n this.send({\n id: 9999999999,\n jsonrpc: '2.0',\n method: 'net_listening',\n params: []\n });\n return true;\n } catch(e) {\n return false;\n }\n};\n\nmodule.exports = HttpProvider;\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** \n * @file iban.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\nvar BigNumber = require('bignumber.js');\n\nvar padLeft = function (string, bytes) {\n var result = string;\n while (result.length < bytes * 2) {\n result = '0' + result;\n }\n return result;\n};\n\n/**\n * Prepare an IBAN for mod 97 computation by moving the first 4 chars to the end and transforming the letters to\n * numbers (A = 10, B = 11, ..., Z = 35), as specified in ISO13616.\n *\n * @method iso13616Prepare\n * @param {String} iban the IBAN\n * @returns {String} the prepared IBAN\n */\nvar iso13616Prepare = function (iban) {\n var A = 'A'.charCodeAt(0);\n var Z = 'Z'.charCodeAt(0);\n\n iban = iban.toUpperCase();\n iban = iban.substr(4) + iban.substr(0,4);\n\n return iban.split('').map(function(n){\n var code = n.charCodeAt(0);\n if (code >= A && code <= Z){\n // A = 10, B = 11, ... Z = 35\n return code - A + 10;\n } else {\n return n;\n }\n }).join('');\n};\n\n/**\n * Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064.\n *\n * @method mod9710\n * @param {String} iban\n * @returns {Number}\n */\nvar mod9710 = function (iban) {\n var remainder = iban,\n block;\n\n while (remainder.length > 2){\n block = remainder.slice(0, 9);\n remainder = parseInt(block, 10) % 97 + remainder.slice(block.length);\n }\n\n return parseInt(remainder, 10) % 97;\n};\n\n/**\n * This prototype should be used to create iban object from iban correct string\n *\n * @param {String} iban\n */\nvar Iban = function (iban) {\n this._iban = iban;\n};\n\n/**\n * This method should be used to create iban object from ethereum address\n *\n * @method fromAddress\n * @param {String} address\n * @return {Iban} the IBAN object\n */\nIban.fromAddress = function (address) {\n var asBn = new BigNumber(address, 16);\n var base36 = asBn.toString(36);\n var padded = padLeft(base36, 15);\n return Iban.fromBban(padded.toUpperCase());\n};\n\n/**\n * Convert the passed BBAN to an IBAN for this country specification.\n * Please note that \"generation of the IBAN shall be the exclusive responsibility of the bank/branch servicing the account\".\n * This method implements the preferred algorithm described in http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_check_digits\n *\n * @method fromBban\n * @param {String} bban the BBAN to convert to IBAN\n * @returns {Iban} the IBAN object\n */\nIban.fromBban = function (bban) {\n var countryCode = 'XE';\n\n var remainder = mod9710(iso13616Prepare(countryCode + '00' + bban));\n var checkDigit = ('0' + (98 - remainder)).slice(-2);\n\n return new Iban(countryCode + checkDigit + bban);\n};\n\n/**\n * Should be used to create IBAN object for given institution and identifier\n *\n * @method createIndirect\n * @param {Object} options, required options are \"institution\" and \"identifier\"\n * @return {Iban} the IBAN object\n */\nIban.createIndirect = function (options) {\n return Iban.fromBban('ETH' + options.institution + options.identifier);\n};\n\n/**\n * Thos method should be used to check if given string is valid iban object\n *\n * @method isValid\n * @param {String} iban string\n * @return {Boolean} true if it is valid IBAN\n */\nIban.isValid = function (iban) {\n var i = new Iban(iban);\n return i.isValid();\n};\n\n/**\n * Should be called to check if iban is correct\n *\n * @method isValid\n * @returns {Boolean} true if it is, otherwise false\n */\nIban.prototype.isValid = function () {\n return /^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban) &&\n mod9710(iso13616Prepare(this._iban)) === 1;\n};\n\n/**\n * Should be called to check if iban number is direct\n *\n * @method isDirect\n * @returns {Boolean} true if it is, otherwise false\n */\nIban.prototype.isDirect = function () {\n return this._iban.length === 34 || this._iban.length === 35;\n};\n\n/**\n * Should be called to check if iban number if indirect\n *\n * @method isIndirect\n * @returns {Boolean} true if it is, otherwise false\n */\nIban.prototype.isIndirect = function () {\n return this._iban.length === 20;\n};\n\n/**\n * Should be called to get iban checksum\n * Uses the mod-97-10 checksumming protocol (ISO/IEC 7064:2003)\n *\n * @method checksum\n * @returns {String} checksum\n */\nIban.prototype.checksum = function () {\n return this._iban.substr(2, 2);\n};\n\n/**\n * Should be called to get institution identifier\n * eg. XREG\n *\n * @method institution\n * @returns {String} institution identifier\n */\nIban.prototype.institution = function () {\n return this.isIndirect() ? this._iban.substr(7, 4) : '';\n};\n\n/**\n * Should be called to get client identifier within institution\n * eg. GAVOFYORK\n *\n * @method client\n * @returns {String} client identifier\n */\nIban.prototype.client = function () {\n return this.isIndirect() ? this._iban.substr(11) : '';\n};\n\n/**\n * Should be called to get client direct address\n *\n * @method address\n * @returns {String} client direct address\n */\nIban.prototype.address = function () {\n if (this.isDirect()) {\n var base36 = this._iban.substr(4);\n var asBn = new BigNumber(base36, 36);\n return padLeft(asBn.toString(16), 20);\n } \n\n return '';\n};\n\nIban.prototype.toString = function () {\n return this._iban;\n};\n\nmodule.exports = Iban;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** @file ipcprovider.js\n * @authors:\n * Fabian Vogelsteller \n * @date 2015\n */\n\n\"use strict\";\n\nvar utils = require('../utils/utils');\nvar errors = require('./errors');\n\n\nvar IpcProvider = function (path, net) {\n var _this = this;\n this.responseCallbacks = {};\n this.path = path;\n \n this.connection = net.connect({path: this.path});\n\n this.connection.on('error', function(e){\n console.error('IPC Connection Error', e);\n _this._timeout();\n });\n\n this.connection.on('end', function(){\n _this._timeout();\n }); \n\n\n // LISTEN FOR CONNECTION RESPONSES\n this.connection.on('data', function(data) {\n /*jshint maxcomplexity: 6 */\n\n _this._parseResponse(data.toString()).forEach(function(result){\n\n var id = null;\n\n // get the id which matches the returned id\n if(utils.isArray(result)) {\n result.forEach(function(load){\n if(_this.responseCallbacks[load.id])\n id = load.id;\n });\n } else {\n id = result.id;\n }\n\n // fire the callback\n if(_this.responseCallbacks[id]) {\n _this.responseCallbacks[id](null, result);\n delete _this.responseCallbacks[id];\n }\n });\n });\n};\n\n/**\nWill parse the response and make an array out of it.\n\n@method _parseResponse\n@param {String} data\n*/\nIpcProvider.prototype._parseResponse = function(data) {\n var _this = this,\n returnValues = [];\n \n // DE-CHUNKER\n var dechunkedData = data\n .replace(/\\}[\\n\\r]?\\{/g,'}|--|{') // }{\n .replace(/\\}\\][\\n\\r]?\\[\\{/g,'}]|--|[{') // }][{\n .replace(/\\}[\\n\\r]?\\[\\{/g,'}|--|[{') // }[{\n .replace(/\\}\\][\\n\\r]?\\{/g,'}]|--|{') // }]{\n .split('|--|');\n\n dechunkedData.forEach(function(data){\n\n // prepend the last chunk\n if(_this.lastChunk)\n data = _this.lastChunk + data;\n\n var result = null;\n\n try {\n result = JSON.parse(data);\n\n } catch(e) {\n\n _this.lastChunk = data;\n\n // start timeout to cancel all requests\n clearTimeout(_this.lastChunkTimeout);\n _this.lastChunkTimeout = setTimeout(function(){\n _this._timeout();\n throw errors.InvalidResponse(data);\n }, 1000 * 15);\n\n return;\n }\n\n // cancel timeout and set chunk to null\n clearTimeout(_this.lastChunkTimeout);\n _this.lastChunk = null;\n\n if(result)\n returnValues.push(result);\n });\n\n return returnValues;\n};\n\n\n/**\nGet the adds a callback to the responseCallbacks object,\nwhich will be called if a response matching the response Id will arrive.\n\n@method _addResponseCallback\n*/\nIpcProvider.prototype._addResponseCallback = function(payload, callback) {\n var id = payload.id || payload[0].id;\n var method = payload.method || payload[0].method;\n\n this.responseCallbacks[id] = callback;\n this.responseCallbacks[id].method = method;\n};\n\n/**\nTimeout all requests when the end/error event is fired\n\n@method _timeout\n*/\nIpcProvider.prototype._timeout = function() {\n for(var key in this.responseCallbacks) {\n if(this.responseCallbacks.hasOwnProperty(key)){\n this.responseCallbacks[key](errors.InvalidConnection('on IPC'));\n delete this.responseCallbacks[key];\n }\n }\n};\n\n\n/**\nCheck if the current connection is still valid.\n\n@method isConnected\n*/\nIpcProvider.prototype.isConnected = function() {\n var _this = this;\n\n // try reconnect, when connection is gone\n if(!_this.connection.writable)\n _this.connection.connect({path: _this.path});\n\n return !!this.connection.writable;\n};\n\nIpcProvider.prototype.send = function (payload) {\n\n if(this.connection.writeSync) {\n var result;\n\n // try reconnect, when connection is gone\n if(!this.connection.writable)\n this.connection.connect({path: this.path});\n\n var data = this.connection.writeSync(JSON.stringify(payload));\n\n try {\n result = JSON.parse(data);\n } catch(e) {\n throw errors.InvalidResponse(data); \n }\n\n return result;\n\n } else {\n throw new Error('You tried to send \"'+ payload.method +'\" synchronously. Synchronous requests are not supported by the IPC provider.');\n }\n};\n\nIpcProvider.prototype.sendAsync = function (payload, callback) {\n // try reconnect, when connection is gone\n if(!this.connection.writable)\n this.connection.connect({path: this.path});\n\n\n this.connection.write(JSON.stringify(payload));\n this._addResponseCallback(payload, callback);\n};\n\nmodule.exports = IpcProvider;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** @file jsonrpc.js\n * @authors:\n * Marek Kotewicz \n * Aaron Kumavis \n * @date 2015\n */\n\n// Initialize Jsonrpc as a simple object with utility functions.\nvar Jsonrpc = {\n messageId: 0\n};\n\n/**\n * Should be called to valid json create payload object\n *\n * @method toPayload\n * @param {Function} method of jsonrpc call, required\n * @param {Array} params, an array of method params, optional\n * @returns {Object} valid jsonrpc payload object\n */\nJsonrpc.toPayload = function (method, params) {\n if (!method)\n console.error('jsonrpc method should be specified!');\n\n // advance message ID\n Jsonrpc.messageId++;\n\n return {\n jsonrpc: '2.0',\n id: Jsonrpc.messageId,\n method: method,\n params: params || []\n };\n};\n\n/**\n * Should be called to check if jsonrpc response is valid\n *\n * @method isValidResponse\n * @param {Object}\n * @returns {Boolean} true if response is valid, otherwise false\n */\nJsonrpc.isValidResponse = function (response) {\n return Array.isArray(response) ? response.every(validateSingleMessage) : validateSingleMessage(response);\n\n function validateSingleMessage(message){\n return !!message &&\n !message.error &&\n message.jsonrpc === '2.0' &&\n typeof message.id === 'number' &&\n message.result !== undefined; // only undefined is not valid json object\n }\n};\n\n/**\n * Should be called to create batch payload object\n *\n * @method toBatchPayload\n * @param {Array} messages, an array of objects with method (required) and params (optional) fields\n * @returns {Array} batch payload\n */\nJsonrpc.toBatchPayload = function (messages) {\n return messages.map(function (message) {\n return Jsonrpc.toPayload(message.method, message.params);\n });\n};\n\nmodule.exports = Jsonrpc;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file method.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\nvar utils = require('../utils/utils');\nvar errors = require('./errors');\n\nvar Method = function (options) {\n this.name = options.name;\n this.call = options.call;\n this.params = options.params || 0;\n this.inputFormatter = options.inputFormatter;\n this.outputFormatter = options.outputFormatter;\n this.requestManager = null;\n};\n\nMethod.prototype.setRequestManager = function (rm) {\n this.requestManager = rm;\n};\n\n/**\n * Should be used to determine name of the jsonrpc method based on arguments\n *\n * @method getCall\n * @param {Array} arguments\n * @return {String} name of jsonrpc method\n */\nMethod.prototype.getCall = function (args) {\n return utils.isFunction(this.call) ? this.call(args) : this.call;\n};\n\n/**\n * Should be used to extract callback from array of arguments. Modifies input param\n *\n * @method extractCallback\n * @param {Array} arguments\n * @return {Function|Null} callback, if exists\n */\nMethod.prototype.extractCallback = function (args) {\n if (utils.isFunction(args[args.length - 1])) {\n return args.pop(); // modify the args array!\n }\n};\n\n/**\n * Should be called to check if the number of arguments is correct\n * \n * @method validateArgs\n * @param {Array} arguments\n * @throws {Error} if it is not\n */\nMethod.prototype.validateArgs = function (args) {\n if (args.length !== this.params) {\n throw errors.InvalidNumberOfRPCParams();\n }\n};\n\n/**\n * Should be called to format input args of method\n * \n * @method formatInput\n * @param {Array}\n * @return {Array}\n */\nMethod.prototype.formatInput = function (args) {\n if (!this.inputFormatter) {\n return args;\n }\n\n return this.inputFormatter.map(function (formatter, index) {\n return formatter ? formatter(args[index]) : args[index];\n });\n};\n\n/**\n * Should be called to format output(result) of method\n *\n * @method formatOutput\n * @param {Object}\n * @return {Object}\n */\nMethod.prototype.formatOutput = function (result) {\n return this.outputFormatter && result ? this.outputFormatter(result) : result;\n};\n\n/**\n * Should create payload from given input args\n *\n * @method toPayload\n * @param {Array} args\n * @return {Object}\n */\nMethod.prototype.toPayload = function (args) {\n var call = this.getCall(args);\n var callback = this.extractCallback(args);\n var params = this.formatInput(args);\n this.validateArgs(params);\n\n return {\n method: call,\n params: params,\n callback: callback\n };\n};\n\nMethod.prototype.attachToObject = function (obj) {\n var func = this.buildCall();\n func.call = this.call; // TODO!!! that's ugly. filter.js uses it\n var name = this.name.split('.');\n if (name.length > 1) {\n obj[name[0]] = obj[name[0]] || {};\n obj[name[0]][name[1]] = func;\n } else {\n obj[name[0]] = func; \n }\n};\n\nMethod.prototype.buildCall = function() {\n var method = this;\n var send = function () {\n var payload = method.toPayload(Array.prototype.slice.call(arguments));\n if (payload.callback) {\n return method.requestManager.sendAsync(payload, function (err, result) {\n payload.callback(err, method.formatOutput(result));\n });\n }\n return method.formatOutput(method.requestManager.send(payload));\n };\n send.request = this.request.bind(this);\n return send;\n};\n\n/**\n * Should be called to create pure JSONRPC request which can be used in batch request\n *\n * @method request\n * @param {...} params\n * @return {Object} jsonrpc request\n */\nMethod.prototype.request = function () {\n var payload = this.toPayload(Array.prototype.slice.call(arguments));\n payload.format = this.formatOutput.bind(this);\n return payload;\n};\n\nmodule.exports = Method;\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** @file db.js\n * @authors:\n * Marek Kotewicz \n * @date 2015\n */\n\nvar Method = require('../method');\n\nvar DB = function (web3) {\n this._requestManager = web3._requestManager;\n\n var self = this;\n \n methods().forEach(function(method) { \n method.attachToObject(self);\n method.setRequestManager(web3._requestManager);\n });\n};\n\nvar methods = function () {\n var putString = new Method({\n name: 'putString',\n call: 'db_putString',\n params: 3\n });\n\n var getString = new Method({\n name: 'getString',\n call: 'db_getString',\n params: 2\n });\n\n var putHex = new Method({\n name: 'putHex',\n call: 'db_putHex',\n params: 3\n });\n\n var getHex = new Method({\n name: 'getHex',\n call: 'db_getHex',\n params: 2\n });\n\n return [\n putString, getString, putHex, getHex\n ];\n};\n\nmodule.exports = DB;\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file eth.js\n * @author Marek Kotewicz \n * @author Fabian Vogelsteller \n * @date 2015\n */\n\n\"use strict\";\n\nvar formatters = require('../formatters');\nvar utils = require('../../utils/utils');\nvar Method = require('../method');\nvar Property = require('../property');\nvar c = require('../../utils/config');\nvar Contract = require('../contract');\nvar watches = require('./watches');\nvar Filter = require('../filter');\nvar IsSyncing = require('../syncing');\nvar namereg = require('../namereg');\nvar Iban = require('../iban');\nvar transfer = require('../transfer');\n\nvar blockCall = function (args) {\n return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? \"eth_getBlockByHash\" : \"eth_getBlockByNumber\";\n};\n\nvar transactionFromBlockCall = function (args) {\n return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getTransactionByBlockHashAndIndex' : 'eth_getTransactionByBlockNumberAndIndex';\n};\n\nvar uncleCall = function (args) {\n return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getUncleByBlockHashAndIndex' : 'eth_getUncleByBlockNumberAndIndex';\n};\n\nvar getBlockTransactionCountCall = function (args) {\n return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getBlockTransactionCountByHash' : 'eth_getBlockTransactionCountByNumber';\n};\n\nvar uncleCountCall = function (args) {\n return (utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getUncleCountByBlockHash' : 'eth_getUncleCountByBlockNumber';\n};\n\nfunction Eth(web3) {\n this._requestManager = web3._requestManager;\n\n var self = this;\n\n methods().forEach(function(method) {\n method.attachToObject(self);\n method.setRequestManager(self._requestManager);\n });\n\n properties().forEach(function(p) {\n p.attachToObject(self);\n p.setRequestManager(self._requestManager);\n });\n\n\n this.iban = Iban;\n this.sendIBANTransaction = transfer.bind(null, this);\n}\n\nObject.defineProperty(Eth.prototype, 'defaultBlock', {\n get: function () {\n return c.defaultBlock;\n },\n set: function (val) {\n c.defaultBlock = val;\n return val;\n }\n});\n\nObject.defineProperty(Eth.prototype, 'defaultAccount', {\n get: function () {\n return c.defaultAccount;\n },\n set: function (val) {\n c.defaultAccount = val;\n return val;\n }\n});\n\nvar methods = function () {\n var getBalance = new Method({\n name: 'getBalance',\n call: 'eth_getBalance',\n params: 2,\n inputFormatter: [formatters.inputAddressFormatter, formatters.inputDefaultBlockNumberFormatter],\n outputFormatter: formatters.outputBigNumberFormatter\n });\n\n var getStorageAt = new Method({\n name: 'getStorageAt',\n call: 'eth_getStorageAt',\n params: 3,\n inputFormatter: [null, utils.toHex, formatters.inputDefaultBlockNumberFormatter]\n });\n\n var getCode = new Method({\n name: 'getCode',\n call: 'eth_getCode',\n params: 2,\n inputFormatter: [formatters.inputAddressFormatter, formatters.inputDefaultBlockNumberFormatter]\n });\n\n var getBlock = new Method({\n name: 'getBlock',\n call: blockCall,\n params: 2,\n inputFormatter: [formatters.inputBlockNumberFormatter, function (val) { return !!val; }],\n outputFormatter: formatters.outputBlockFormatter\n });\n\n var getUncle = new Method({\n name: 'getUncle',\n call: uncleCall,\n params: 2,\n inputFormatter: [formatters.inputBlockNumberFormatter, utils.toHex],\n outputFormatter: formatters.outputBlockFormatter,\n\n });\n\n var getCompilers = new Method({\n name: 'getCompilers',\n call: 'eth_getCompilers',\n params: 0\n });\n\n var getBlockTransactionCount = new Method({\n name: 'getBlockTransactionCount',\n call: getBlockTransactionCountCall,\n params: 1,\n inputFormatter: [formatters.inputBlockNumberFormatter],\n outputFormatter: utils.toDecimal\n });\n\n var getBlockUncleCount = new Method({\n name: 'getBlockUncleCount',\n call: uncleCountCall,\n params: 1,\n inputFormatter: [formatters.inputBlockNumberFormatter],\n outputFormatter: utils.toDecimal\n });\n\n var getTransaction = new Method({\n name: 'getTransaction',\n call: 'eth_getTransactionByHash',\n params: 1,\n outputFormatter: formatters.outputTransactionFormatter\n });\n\n var getTransactionFromBlock = new Method({\n name: 'getTransactionFromBlock',\n call: transactionFromBlockCall,\n params: 2,\n inputFormatter: [formatters.inputBlockNumberFormatter, utils.toHex],\n outputFormatter: formatters.outputTransactionFormatter\n });\n\n var getTransactionReceipt = new Method({\n name: 'getTransactionReceipt',\n call: 'eth_getTransactionReceipt',\n params: 1,\n outputFormatter: formatters.outputTransactionReceiptFormatter\n });\n\n var getTransactionCount = new Method({\n name: 'getTransactionCount',\n call: 'eth_getTransactionCount',\n params: 2,\n inputFormatter: [null, formatters.inputDefaultBlockNumberFormatter],\n outputFormatter: utils.toDecimal\n });\n\n var sendRawTransaction = new Method({\n name: 'sendRawTransaction',\n call: 'eth_sendRawTransaction',\n params: 1,\n inputFormatter: [null]\n });\n\n var sendTransaction = new Method({\n name: 'sendTransaction',\n call: 'eth_sendTransaction',\n params: 1,\n inputFormatter: [formatters.inputTransactionFormatter]\n });\n\n var signTransaction = new Method({\n name: 'signTransaction',\n call: 'eth_signTransaction',\n params: 1,\n inputFormatter: [formatters.inputTransactionFormatter]\n });\n\n var sign = new Method({\n name: 'sign',\n call: 'eth_sign',\n params: 2,\n inputFormatter: [formatters.inputAddressFormatter, null]\n });\n\n var call = new Method({\n name: 'call',\n call: 'eth_call',\n params: 2,\n inputFormatter: [formatters.inputCallFormatter, formatters.inputDefaultBlockNumberFormatter]\n });\n\n var estimateGas = new Method({\n name: 'estimateGas',\n call: 'eth_estimateGas',\n params: 1,\n inputFormatter: [formatters.inputCallFormatter],\n outputFormatter: utils.toDecimal\n });\n\n var compileSolidity = new Method({\n name: 'compile.solidity',\n call: 'eth_compileSolidity',\n params: 1\n });\n\n var compileLLL = new Method({\n name: 'compile.lll',\n call: 'eth_compileLLL',\n params: 1\n });\n\n var compileSerpent = new Method({\n name: 'compile.serpent',\n call: 'eth_compileSerpent',\n params: 1\n });\n\n var submitWork = new Method({\n name: 'submitWork',\n call: 'eth_submitWork',\n params: 3\n });\n\n var getWork = new Method({\n name: 'getWork',\n call: 'eth_getWork',\n params: 0\n });\n\n return [\n getBalance,\n getStorageAt,\n getCode,\n getBlock,\n getUncle,\n getCompilers,\n getBlockTransactionCount,\n getBlockUncleCount,\n getTransaction,\n getTransactionFromBlock,\n getTransactionReceipt,\n getTransactionCount,\n call,\n estimateGas,\n sendRawTransaction,\n signTransaction,\n sendTransaction,\n sign,\n compileSolidity,\n compileLLL,\n compileSerpent,\n submitWork,\n getWork\n ];\n};\n\n\nvar properties = function () {\n return [\n new Property({\n name: 'coinbase',\n getter: 'eth_coinbase'\n }),\n new Property({\n name: 'mining',\n getter: 'eth_mining'\n }),\n new Property({\n name: 'hashrate',\n getter: 'eth_hashrate',\n outputFormatter: utils.toDecimal\n }),\n new Property({\n name: 'syncing',\n getter: 'eth_syncing',\n outputFormatter: formatters.outputSyncingFormatter\n }),\n new Property({\n name: 'gasPrice',\n getter: 'eth_gasPrice',\n outputFormatter: formatters.outputBigNumberFormatter\n }),\n new Property({\n name: 'accounts',\n getter: 'eth_accounts'\n }),\n new Property({\n name: 'blockNumber',\n getter: 'eth_blockNumber',\n outputFormatter: utils.toDecimal\n }),\n new Property({\n name: 'protocolVersion',\n getter: 'eth_protocolVersion'\n })\n ];\n};\n\nEth.prototype.contract = function (abi) {\n var factory = new Contract(this, abi);\n return factory;\n};\n\nEth.prototype.filter = function (fil, callback, filterCreationErrorCallback) {\n return new Filter(this._requestManager, fil, watches.eth(), formatters.outputLogFormatter, callback, filterCreationErrorCallback);\n};\n\nEth.prototype.namereg = function () {\n return this.contract(namereg.global.abi).at(namereg.global.address);\n};\n\nEth.prototype.icapNamereg = function () {\n return this.contract(namereg.icap.abi).at(namereg.icap.address);\n};\n\nEth.prototype.isSyncing = function (callback) {\n return new IsSyncing(this._requestManager, callback);\n};\n\nmodule.exports = Eth;\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** @file eth.js\n * @authors:\n * Marek Kotewicz \n * @date 2015\n */\n\nvar utils = require('../../utils/utils');\nvar Property = require('../property');\n\nvar Net = function (web3) {\n this._requestManager = web3._requestManager;\n\n var self = this;\n\n properties().forEach(function(p) { \n p.attachToObject(self);\n p.setRequestManager(web3._requestManager);\n });\n};\n\n/// @returns an array of objects describing web3.eth api properties\nvar properties = function () {\n return [\n new Property({\n name: 'listening',\n getter: 'net_listening'\n }),\n new Property({\n name: 'peerCount',\n getter: 'net_peerCount',\n outputFormatter: utils.toDecimal\n })\n ];\n};\n\nmodule.exports = Net;\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file eth.js\n * @author Marek Kotewicz \n * @author Fabian Vogelsteller \n * @date 2015\n */\n\n\"use strict\";\n\nvar Method = require('../method');\nvar Property = require('../property');\nvar formatters = require('../formatters');\n\nfunction Personal(web3) {\n this._requestManager = web3._requestManager;\n\n var self = this;\n\n methods().forEach(function(method) {\n method.attachToObject(self);\n method.setRequestManager(self._requestManager);\n });\n\n properties().forEach(function(p) {\n p.attachToObject(self);\n p.setRequestManager(self._requestManager);\n });\n}\n\nvar methods = function () {\n var newAccount = new Method({\n name: 'newAccount',\n call: 'personal_newAccount',\n params: 1,\n inputFormatter: [null]\n });\n\n var importRawKey = new Method({\n name: 'importRawKey',\n\t\tcall: 'personal_importRawKey',\n\t\tparams: 2\n });\n\n var sign = new Method({\n name: 'sign',\n\t\tcall: 'personal_sign',\n\t\tparams: 3,\n\t\tinputFormatter: [null, formatters.inputAddressFormatter, null]\n });\n\n var ecRecover = new Method({\n name: 'ecRecover',\n\t\tcall: 'personal_ecRecover',\n\t\tparams: 2\n });\n\n var unlockAccount = new Method({\n name: 'unlockAccount',\n call: 'personal_unlockAccount',\n params: 3,\n inputFormatter: [formatters.inputAddressFormatter, null, null]\n });\n\n var sendTransaction = new Method({\n name: 'sendTransaction',\n call: 'personal_sendTransaction',\n params: 2,\n inputFormatter: [formatters.inputTransactionFormatter, null]\n });\n\n var lockAccount = new Method({\n name: 'lockAccount',\n call: 'personal_lockAccount',\n params: 1,\n inputFormatter: [formatters.inputAddressFormatter]\n });\n\n return [\n newAccount,\n importRawKey,\n unlockAccount,\n ecRecover,\n sign,\n sendTransaction,\n lockAccount\n ];\n};\n\nvar properties = function () {\n return [\n new Property({\n name: 'listAccounts',\n getter: 'personal_listAccounts'\n })\n ];\n};\n\n\nmodule.exports = Personal;\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** @file shh.js\n * @authors:\n * Marek Kotewicz \n * @date 2015\n */\n\nvar Method = require('../method');\nvar formatters = require('../formatters');\nvar Filter = require('../filter');\nvar watches = require('./watches');\n\nvar Shh = function (web3) {\n this._requestManager = web3._requestManager;\n\n var self = this;\n\n methods().forEach(function(method) { \n method.attachToObject(self);\n method.setRequestManager(self._requestManager);\n });\n};\n\nShh.prototype.filter = function (fil, callback) {\n return new Filter(this._requestManager, fil, watches.shh(), formatters.outputPostFormatter, callback);\n};\n\nvar methods = function () { \n\n var post = new Method({\n name: 'post', \n call: 'shh_post', \n params: 1,\n inputFormatter: [formatters.inputPostFormatter]\n });\n\n var newIdentity = new Method({\n name: 'newIdentity',\n call: 'shh_newIdentity',\n params: 0\n });\n\n var hasIdentity = new Method({\n name: 'hasIdentity',\n call: 'shh_hasIdentity',\n params: 1\n });\n\n var newGroup = new Method({\n name: 'newGroup',\n call: 'shh_newGroup',\n params: 0\n });\n\n var addToGroup = new Method({\n name: 'addToGroup',\n call: 'shh_addToGroup',\n params: 0\n });\n\n return [\n post,\n newIdentity,\n hasIdentity,\n newGroup,\n addToGroup\n ];\n};\n\nmodule.exports = Shh;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file bzz.js\n * @author Alex Beregszaszi \n * @date 2016\n *\n * Reference: https://github.com/ethereum/go-ethereum/blob/swarm/internal/web3ext/web3ext.go#L33\n */\n\n\"use strict\";\n\nvar Method = require('../method');\nvar Property = require('../property');\n\nfunction Swarm(web3) {\n this._requestManager = web3._requestManager;\n\n var self = this;\n\n methods().forEach(function(method) {\n method.attachToObject(self);\n method.setRequestManager(self._requestManager);\n });\n\n properties().forEach(function(p) {\n p.attachToObject(self);\n p.setRequestManager(self._requestManager);\n });\n}\n\nvar methods = function () {\n var blockNetworkRead = new Method({\n name: 'blockNetworkRead',\n call: 'bzz_blockNetworkRead',\n params: 1,\n inputFormatter: [null]\n });\n\n var syncEnabled = new Method({\n name: 'syncEnabled',\n call: 'bzz_syncEnabled',\n params: 1,\n inputFormatter: [null]\n });\n\n var swapEnabled = new Method({\n name: 'swapEnabled',\n call: 'bzz_swapEnabled',\n params: 1,\n inputFormatter: [null]\n });\n\n var download = new Method({\n name: 'download',\n call: 'bzz_download',\n params: 2,\n inputFormatter: [null, null]\n });\n\n var upload = new Method({\n name: 'upload',\n call: 'bzz_upload',\n params: 2,\n inputFormatter: [null, null]\n });\n\n var retrieve = new Method({\n name: 'retrieve',\n call: 'bzz_retrieve',\n params: 1,\n inputFormatter: [null]\n });\n\n var store = new Method({\n name: 'store',\n call: 'bzz_store',\n params: 2,\n inputFormatter: [null, null]\n });\n\n var get = new Method({\n name: 'get',\n call: 'bzz_get',\n params: 1,\n inputFormatter: [null]\n });\n\n var put = new Method({\n name: 'put',\n call: 'bzz_put',\n params: 2,\n inputFormatter: [null, null]\n });\n\n var modify = new Method({\n name: 'modify',\n call: 'bzz_modify',\n params: 4,\n inputFormatter: [null, null, null, null]\n });\n\n return [\n blockNetworkRead,\n syncEnabled,\n swapEnabled,\n download,\n upload,\n retrieve,\n store,\n get,\n put,\n modify\n ];\n};\n\nvar properties = function () {\n return [\n new Property({\n name: 'hive',\n getter: 'bzz_hive'\n }),\n new Property({\n name: 'info',\n getter: 'bzz_info'\n })\n ];\n};\n\n\nmodule.exports = Swarm;\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** @file watches.js\n * @authors:\n * Marek Kotewicz \n * @date 2015\n */\n\nvar Method = require('../method');\n\n/// @returns an array of objects describing web3.eth.filter api methods\nvar eth = function () {\n var newFilterCall = function (args) {\n var type = args[0];\n\n switch(type) {\n case 'latest':\n args.shift();\n this.params = 0;\n return 'eth_newBlockFilter';\n case 'pending':\n args.shift();\n this.params = 0;\n return 'eth_newPendingTransactionFilter';\n default:\n return 'eth_newFilter';\n }\n };\n\n var newFilter = new Method({\n name: 'newFilter',\n call: newFilterCall,\n params: 1\n });\n\n var uninstallFilter = new Method({\n name: 'uninstallFilter',\n call: 'eth_uninstallFilter',\n params: 1\n });\n\n var getLogs = new Method({\n name: 'getLogs',\n call: 'eth_getFilterLogs',\n params: 1\n });\n\n var poll = new Method({\n name: 'poll',\n call: 'eth_getFilterChanges',\n params: 1\n });\n\n return [\n newFilter,\n uninstallFilter,\n getLogs,\n poll\n ];\n};\n\n/// @returns an array of objects describing web3.shh.watch api methods\nvar shh = function () {\n var newFilter = new Method({\n name: 'newFilter',\n call: 'shh_newFilter',\n params: 1\n });\n\n var uninstallFilter = new Method({\n name: 'uninstallFilter',\n call: 'shh_uninstallFilter',\n params: 1\n });\n\n var getLogs = new Method({\n name: 'getLogs',\n call: 'shh_getMessages',\n params: 1\n });\n\n var poll = new Method({\n name: 'poll',\n call: 'shh_getFilterChanges',\n params: 1\n });\n\n return [\n newFilter,\n uninstallFilter,\n getLogs,\n poll\n ];\n};\n\nmodule.exports = {\n eth: eth,\n shh: shh\n};\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** \n * @file namereg.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\nvar globalRegistrarAbi = require('../contracts/GlobalRegistrar.json');\nvar icapRegistrarAbi= require('../contracts/ICAPRegistrar.json');\n\nvar globalNameregAddress = '0xc6d9d2cd449a754c494264e1809c50e34d64562b';\nvar icapNameregAddress = '0xa1a111bc074c9cfa781f0c38e63bd51c91b8af00';\n\nmodule.exports = {\n global: {\n abi: globalRegistrarAbi,\n address: globalNameregAddress\n },\n icap: {\n abi: icapRegistrarAbi,\n address: icapNameregAddress\n }\n};\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/**\n * @file property.js\n * @author Fabian Vogelsteller \n * @author Marek Kotewicz \n * @date 2015\n */\n\nvar utils = require('../utils/utils');\n\nvar Property = function (options) {\n this.name = options.name;\n this.getter = options.getter;\n this.setter = options.setter;\n this.outputFormatter = options.outputFormatter;\n this.inputFormatter = options.inputFormatter;\n this.requestManager = null;\n};\n\nProperty.prototype.setRequestManager = function (rm) {\n this.requestManager = rm;\n};\n\n/**\n * Should be called to format input args of method\n *\n * @method formatInput\n * @param {Array}\n * @return {Array}\n */\nProperty.prototype.formatInput = function (arg) {\n return this.inputFormatter ? this.inputFormatter(arg) : arg;\n};\n\n/**\n * Should be called to format output(result) of method\n *\n * @method formatOutput\n * @param {Object}\n * @return {Object}\n */\nProperty.prototype.formatOutput = function (result) {\n return this.outputFormatter && result !== null && result !== undefined ? this.outputFormatter(result) : result;\n};\n\n/**\n * Should be used to extract callback from array of arguments. Modifies input param\n *\n * @method extractCallback\n * @param {Array} arguments\n * @return {Function|Null} callback, if exists\n */\nProperty.prototype.extractCallback = function (args) {\n if (utils.isFunction(args[args.length - 1])) {\n return args.pop(); // modify the args array!\n }\n};\n\n\n/**\n * Should attach function to method\n *\n * @method attachToObject\n * @param {Object}\n * @param {Function}\n */\nProperty.prototype.attachToObject = function (obj) {\n var proto = {\n get: this.buildGet(),\n enumerable: true\n };\n\n var names = this.name.split('.');\n var name = names[0];\n if (names.length > 1) {\n obj[names[0]] = obj[names[0]] || {};\n obj = obj[names[0]];\n name = names[1];\n }\n\n Object.defineProperty(obj, name, proto);\n obj[asyncGetterName(name)] = this.buildAsyncGet();\n};\n\nvar asyncGetterName = function (name) {\n return 'get' + name.charAt(0).toUpperCase() + name.slice(1);\n};\n\nProperty.prototype.buildGet = function () {\n var property = this;\n return function get() {\n return property.formatOutput(property.requestManager.send({\n method: property.getter\n }));\n };\n};\n\nProperty.prototype.buildAsyncGet = function () {\n var property = this;\n var get = function (callback) {\n property.requestManager.sendAsync({\n method: property.getter\n }, function (err, result) {\n callback(err, property.formatOutput(result));\n });\n };\n get.request = this.request.bind(this);\n return get;\n};\n\n/**\n * Should be called to create pure JSONRPC request which can be used in batch request\n *\n * @method request\n * @param {...} params\n * @return {Object} jsonrpc request\n */\nProperty.prototype.request = function () {\n var payload = {\n method: this.getter,\n params: [],\n callback: this.extractCallback(Array.prototype.slice.call(arguments))\n };\n payload.format = this.formatOutput.bind(this);\n return payload;\n};\n\nmodule.exports = Property;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** \n * @file requestmanager.js\n * @author Jeffrey Wilcke \n * @author Marek Kotewicz \n * @author Marian Oancea \n * @author Fabian Vogelsteller \n * @author Gav Wood \n * @date 2014\n */\n\nvar Jsonrpc = require('./jsonrpc');\nvar utils = require('../utils/utils');\nvar c = require('../utils/config');\nvar errors = require('./errors');\n\n/**\n * It's responsible for passing messages to providers\n * It's also responsible for polling the ethereum node for incoming messages\n * Default poll timeout is 1 second\n * Singleton\n */\nvar RequestManager = function (provider) {\n this.provider = provider;\n this.polls = {};\n this.timeout = null;\n};\n\n/**\n * Should be used to synchronously send request\n *\n * @method send\n * @param {Object} data\n * @return {Object}\n */\nRequestManager.prototype.send = function (data) {\n if (!this.provider) {\n console.error(errors.InvalidProvider());\n return null;\n }\n\n var payload = Jsonrpc.toPayload(data.method, data.params);\n var result = this.provider.send(payload);\n\n if (!Jsonrpc.isValidResponse(result)) {\n throw errors.InvalidResponse(result);\n }\n\n return result.result;\n};\n\n/**\n * Should be used to asynchronously send request\n *\n * @method sendAsync\n * @param {Object} data\n * @param {Function} callback\n */\nRequestManager.prototype.sendAsync = function (data, callback) {\n if (!this.provider) {\n return callback(errors.InvalidProvider());\n }\n\n var payload = Jsonrpc.toPayload(data.method, data.params);\n this.provider.sendAsync(payload, function (err, result) {\n if (err) {\n return callback(err);\n }\n \n if (!Jsonrpc.isValidResponse(result)) {\n return callback(errors.InvalidResponse(result));\n }\n\n callback(null, result.result);\n });\n};\n\n/**\n * Should be called to asynchronously send batch request\n *\n * @method sendBatch\n * @param {Array} batch data\n * @param {Function} callback\n */\nRequestManager.prototype.sendBatch = function (data, callback) {\n if (!this.provider) {\n return callback(errors.InvalidProvider());\n }\n\n var payload = Jsonrpc.toBatchPayload(data);\n\n this.provider.sendAsync(payload, function (err, results) {\n if (err) {\n return callback(err);\n }\n\n if (!utils.isArray(results)) {\n return callback(errors.InvalidResponse(results));\n }\n\n callback(err, results);\n }); \n};\n\n/**\n * Should be used to set provider of request manager\n *\n * @method setProvider\n * @param {Object}\n */\nRequestManager.prototype.setProvider = function (p) {\n this.provider = p;\n};\n\n/**\n * Should be used to start polling\n *\n * @method startPolling\n * @param {Object} data\n * @param {Number} pollId\n * @param {Function} callback\n * @param {Function} uninstall\n *\n * @todo cleanup number of params\n */\nRequestManager.prototype.startPolling = function (data, pollId, callback, uninstall) {\n this.polls[pollId] = {data: data, id: pollId, callback: callback, uninstall: uninstall};\n\n\n // start polling\n if (!this.timeout) {\n this.poll();\n }\n};\n\n/**\n * Should be used to stop polling for filter with given id\n *\n * @method stopPolling\n * @param {Number} pollId\n */\nRequestManager.prototype.stopPolling = function (pollId) {\n delete this.polls[pollId];\n\n // stop polling\n if(Object.keys(this.polls).length === 0 && this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n};\n\n/**\n * Should be called to reset the polling mechanism of the request manager\n *\n * @method reset\n */\nRequestManager.prototype.reset = function (keepIsSyncing) {\n /*jshint maxcomplexity:5 */\n\n for (var key in this.polls) {\n // remove all polls, except sync polls,\n // they need to be removed manually by calling syncing.stopWatching()\n if(!keepIsSyncing || key.indexOf('syncPoll_') === -1) {\n this.polls[key].uninstall();\n delete this.polls[key];\n }\n }\n\n // stop polling\n if(Object.keys(this.polls).length === 0 && this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n};\n\n/**\n * Should be called to poll for changes on filter with given id\n *\n * @method poll\n */\nRequestManager.prototype.poll = function () {\n /*jshint maxcomplexity: 6 */\n this.timeout = setTimeout(this.poll.bind(this), c.ETH_POLLING_TIMEOUT);\n\n if (Object.keys(this.polls).length === 0) {\n return;\n }\n\n if (!this.provider) {\n console.error(errors.InvalidProvider());\n return;\n }\n\n var pollsData = [];\n var pollsIds = [];\n for (var key in this.polls) {\n pollsData.push(this.polls[key].data);\n pollsIds.push(key);\n }\n\n if (pollsData.length === 0) {\n return;\n }\n\n var payload = Jsonrpc.toBatchPayload(pollsData);\n \n // map the request id to they poll id\n var pollsIdMap = {};\n payload.forEach(function(load, index){\n pollsIdMap[load.id] = pollsIds[index];\n });\n\n\n var self = this;\n this.provider.sendAsync(payload, function (error, results) {\n\n\n // TODO: console log?\n if (error) {\n return;\n }\n\n if (!utils.isArray(results)) {\n throw errors.InvalidResponse(results);\n }\n results.map(function (result) {\n var id = pollsIdMap[result.id];\n\n // make sure the filter is still installed after arrival of the request\n if (self.polls[id]) {\n result.callback = self.polls[id].callback;\n return result;\n } else\n return false;\n }).filter(function (result) {\n return !!result; \n }).filter(function (result) {\n var valid = Jsonrpc.isValidResponse(result);\n if (!valid) {\n result.callback(errors.InvalidResponse(result));\n }\n return valid;\n }).forEach(function (result) {\n result.callback(null, result.result);\n });\n });\n};\n\nmodule.exports = RequestManager;\n\n", + "\n\nvar Settings = function () {\n this.defaultBlock = 'latest';\n this.defaultAccount = undefined;\n};\n\nmodule.exports = Settings;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** @file syncing.js\n * @authors:\n * Fabian Vogelsteller \n * @date 2015\n */\n\nvar formatters = require('./formatters');\nvar utils = require('../utils/utils');\n\nvar count = 1;\n\n/**\nAdds the callback and sets up the methods, to iterate over the results.\n\n@method pollSyncing\n@param {Object} self\n*/\nvar pollSyncing = function(self) {\n\n var onMessage = function (error, sync) {\n if (error) {\n return self.callbacks.forEach(function (callback) {\n callback(error);\n });\n }\n\n if(utils.isObject(sync) && sync.startingBlock)\n sync = formatters.outputSyncingFormatter(sync);\n\n self.callbacks.forEach(function (callback) {\n if (self.lastSyncState !== sync) {\n \n // call the callback with true first so the app can stop anything, before receiving the sync data\n if(!self.lastSyncState && utils.isObject(sync))\n callback(null, true);\n \n // call on the next CPU cycle, so the actions of the sync stop can be processes first\n setTimeout(function() {\n callback(null, sync);\n }, 0);\n \n self.lastSyncState = sync;\n }\n });\n };\n\n self.requestManager.startPolling({\n method: 'eth_syncing',\n params: [],\n }, self.pollId, onMessage, self.stopWatching.bind(self));\n\n};\n\nvar IsSyncing = function (requestManager, callback) {\n this.requestManager = requestManager;\n this.pollId = 'syncPoll_'+ count++;\n this.callbacks = [];\n this.addCallback(callback);\n this.lastSyncState = false;\n pollSyncing(this);\n\n return this;\n};\n\nIsSyncing.prototype.addCallback = function (callback) {\n if(callback)\n this.callbacks.push(callback);\n return this;\n};\n\nIsSyncing.prototype.stopWatching = function () {\n this.requestManager.stopPolling(this.pollId);\n this.callbacks = [];\n};\n\nmodule.exports = IsSyncing;\n\n", + "/*\n This file is part of web3.js.\n\n web3.js is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n web3.js is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with web3.js. If not, see .\n*/\n/** \n * @file transfer.js\n * @author Marek Kotewicz \n * @date 2015\n */\n\nvar Iban = require('./iban');\nvar exchangeAbi = require('../contracts/SmartExchange.json');\n\n/**\n * Should be used to make Iban transfer\n *\n * @method transfer\n * @param {String} from\n * @param {String} to iban\n * @param {Value} value to be tranfered\n * @param {Function} callback, callback\n */\nvar transfer = function (eth, from, to, value, callback) {\n var iban = new Iban(to); \n if (!iban.isValid()) {\n throw new Error('invalid iban address');\n }\n\n if (iban.isDirect()) {\n return transferToAddress(eth, from, iban.address(), value, callback);\n }\n \n if (!callback) {\n var address = eth.icapNamereg().addr(iban.institution());\n return deposit(eth, from, address, value, iban.client());\n }\n\n eth.icapNamereg().addr(iban.institution(), function (err, address) {\n return deposit(eth, from, address, value, iban.client(), callback);\n });\n \n};\n\n/**\n * Should be used to transfer funds to certain address\n *\n * @method transferToAddress\n * @param {String} from\n * @param {String} to\n * @param {Value} value to be tranfered\n * @param {Function} callback, callback\n */\nvar transferToAddress = function (eth, from, to, value, callback) {\n return eth.sendTransaction({\n address: to,\n from: from,\n value: value\n }, callback);\n};\n\n/**\n * Should be used to deposit funds to generic Exchange contract (must implement deposit(bytes32) method!)\n *\n * @method deposit\n * @param {String} from\n * @param {String} to\n * @param {Value} value to be transfered\n * @param {String} client unique identifier\n * @param {Function} callback, callback\n */\nvar deposit = function (eth, from, to, value, client, callback) {\n var abi = exchangeAbi;\n return eth.contract(abi).at(to).deposit(client, {\n from: from,\n value: value\n }, callback);\n};\n\nmodule.exports = transfer;\n\n", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Lookup tables\n\t var SBOX = [];\n\t var INV_SBOX = [];\n\t var SUB_MIX_0 = [];\n\t var SUB_MIX_1 = [];\n\t var SUB_MIX_2 = [];\n\t var SUB_MIX_3 = [];\n\t var INV_SUB_MIX_0 = [];\n\t var INV_SUB_MIX_1 = [];\n\t var INV_SUB_MIX_2 = [];\n\t var INV_SUB_MIX_3 = [];\n\n\t // Compute lookup tables\n\t (function () {\n\t // Compute double table\n\t var d = [];\n\t for (var i = 0; i < 256; i++) {\n\t if (i < 128) {\n\t d[i] = i << 1;\n\t } else {\n\t d[i] = (i << 1) ^ 0x11b;\n\t }\n\t }\n\n\t // Walk GF(2^8)\n\t var x = 0;\n\t var xi = 0;\n\t for (var i = 0; i < 256; i++) {\n\t // Compute sbox\n\t var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n\t sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n\t SBOX[x] = sx;\n\t INV_SBOX[sx] = x;\n\n\t // Compute multiplication\n\t var x2 = d[x];\n\t var x4 = d[x2];\n\t var x8 = d[x4];\n\n\t // Compute sub bytes, mix columns tables\n\t var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n\t SUB_MIX_0[x] = (t << 24) | (t >>> 8);\n\t SUB_MIX_1[x] = (t << 16) | (t >>> 16);\n\t SUB_MIX_2[x] = (t << 8) | (t >>> 24);\n\t SUB_MIX_3[x] = t;\n\n\t // Compute inv sub bytes, inv mix columns tables\n\t var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n\t INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\n\t INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\n\t INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\n\t INV_SUB_MIX_3[sx] = t;\n\n\t // Compute next counter\n\t if (!x) {\n\t x = xi = 1;\n\t } else {\n\t x = x2 ^ d[d[d[x8 ^ x2]]];\n\t xi ^= d[d[xi]];\n\t }\n\t }\n\t }());\n\n\t // Precomputed Rcon lookup\n\t var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n\n\t /**\n\t * AES block cipher algorithm.\n\t */\n\t var AES = C_algo.AES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Skip reset of nRounds has been set before and key did not change\n\t if (this._nRounds && this._keyPriorReset === this._key) {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var key = this._keyPriorReset = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t // Compute number of rounds\n\t var nRounds = this._nRounds = keySize + 6;\n\n\t // Compute number of key schedule rows\n\t var ksRows = (nRounds + 1) * 4;\n\n\t // Compute key schedule\n\t var keySchedule = this._keySchedule = [];\n\t for (var ksRow = 0; ksRow < ksRows; ksRow++) {\n\t if (ksRow < keySize) {\n\t keySchedule[ksRow] = keyWords[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 1];\n\n\t if (!(ksRow % keySize)) {\n\t // Rot word\n\t t = (t << 8) | (t >>> 24);\n\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\n\t // Mix Rcon\n\t t ^= RCON[(ksRow / keySize) | 0] << 24;\n\t } else if (keySize > 6 && ksRow % keySize == 4) {\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\t }\n\n\t keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\n\t }\n\t }\n\n\t // Compute inv key schedule\n\t var invKeySchedule = this._invKeySchedule = [];\n\t for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n\t var ksRow = ksRows - invKsRow;\n\n\t if (invKsRow % 4) {\n\t var t = keySchedule[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 4];\n\t }\n\n\t if (invKsRow < 4 || ksRow <= 4) {\n\t invKeySchedule[invKsRow] = t;\n\t } else {\n\t invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\n\t INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\n\t }\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t // Swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\n\t this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\n\n\t // Inv swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\t },\n\n\t _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\n\t // Shortcut\n\t var nRounds = this._nRounds;\n\n\t // Get input, add round key\n\t var s0 = M[offset] ^ keySchedule[0];\n\t var s1 = M[offset + 1] ^ keySchedule[1];\n\t var s2 = M[offset + 2] ^ keySchedule[2];\n\t var s3 = M[offset + 3] ^ keySchedule[3];\n\n\t // Key schedule row counter\n\t var ksRow = 4;\n\n\t // Rounds\n\t for (var round = 1; round < nRounds; round++) {\n\t // Shift rows, sub bytes, mix columns, add round key\n\t var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\n\t var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\n\t var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\n\t var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\n\n\t // Update state\n\t s0 = t0;\n\t s1 = t1;\n\t s2 = t2;\n\t s3 = t3;\n\t }\n\n\t // Shift rows, sub bytes, add round key\n\t var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\n\t var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\n\t var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\n\t var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\n\n\t // Set output\n\t M[offset] = t0;\n\t M[offset + 1] = t1;\n\t M[offset + 2] = t2;\n\t M[offset + 3] = t3;\n\t },\n\n\t keySize: 256/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.AES = BlockCipher._createHelper(AES);\n\t}());\n\n\n\treturn CryptoJS.AES;\n\n}));", + ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher core components.\n\t */\n\tCryptoJS.lib.Cipher || (function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var Base64 = C_enc.Base64;\n\t var C_algo = C.algo;\n\t var EvpKDF = C_algo.EvpKDF;\n\n\t /**\n\t * Abstract base cipher template.\n\t *\n\t * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\n\t * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\n\t * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\n\t * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\n\t */\n\t var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {WordArray} iv The IV to use for this operation.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Creates this cipher in encryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createEncryptor: function (key, cfg) {\n\t return this.create(this._ENC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Creates this cipher in decryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createDecryptor: function (key, cfg) {\n\t return this.create(this._DEC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Initializes a newly created cipher.\n\t *\n\t * @param {number} xformMode Either the encryption or decryption transormation mode constant.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\n\t */\n\t init: function (xformMode, key, cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Store transform mode and key\n\t this._xformMode = xformMode;\n\t this._key = key;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this cipher to its initial state.\n\t *\n\t * @example\n\t *\n\t * cipher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-cipher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Adds data to be encrypted or decrypted.\n\t *\n\t * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.process('data');\n\t * var encrypted = cipher.process(wordArray);\n\t */\n\t process: function (dataUpdate) {\n\t // Append\n\t this._append(dataUpdate);\n\n\t // Process available blocks\n\t return this._process();\n\t },\n\n\t /**\n\t * Finalizes the encryption or decryption process.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after final processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.finalize();\n\t * var encrypted = cipher.finalize('data');\n\t * var encrypted = cipher.finalize(wordArray);\n\t */\n\t finalize: function (dataUpdate) {\n\t // Final data update\n\t if (dataUpdate) {\n\t this._append(dataUpdate);\n\t }\n\n\t // Perform concrete-cipher logic\n\t var finalProcessedData = this._doFinalize();\n\n\t return finalProcessedData;\n\t },\n\n\t keySize: 128/32,\n\n\t ivSize: 128/32,\n\n\t _ENC_XFORM_MODE: 1,\n\n\t _DEC_XFORM_MODE: 2,\n\n\t /**\n\t * Creates shortcut functions to a cipher's object interface.\n\t *\n\t * @param {Cipher} cipher The cipher to create a helper for.\n\t *\n\t * @return {Object} An object with encrypt and decrypt shortcut functions.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\n\t */\n\t _createHelper: (function () {\n\t function selectCipherStrategy(key) {\n\t if (typeof key == 'string') {\n\t return PasswordBasedCipher;\n\t } else {\n\t return SerializableCipher;\n\t }\n\t }\n\n\t return function (cipher) {\n\t return {\n\t encrypt: function (message, key, cfg) {\n\t return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\n\t },\n\n\t decrypt: function (ciphertext, key, cfg) {\n\t return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\n\t }\n\t };\n\t };\n\t }())\n\t });\n\n\t /**\n\t * Abstract base stream cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\n\t */\n\t var StreamCipher = C_lib.StreamCipher = Cipher.extend({\n\t _doFinalize: function () {\n\t // Process partial blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 1\n\t });\n\n\t /**\n\t * Mode namespace.\n\t */\n\t var C_mode = C.mode = {};\n\n\t /**\n\t * Abstract base block cipher mode template.\n\t */\n\t var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\n\t /**\n\t * Creates this mode for encryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\n\t */\n\t createEncryptor: function (cipher, iv) {\n\t return this.Encryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Creates this mode for decryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\n\t */\n\t createDecryptor: function (cipher, iv) {\n\t return this.Decryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Initializes a newly created mode.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\n\t */\n\t init: function (cipher, iv) {\n\t this._cipher = cipher;\n\t this._iv = iv;\n\t }\n\t });\n\n\t /**\n\t * Cipher Block Chaining mode.\n\t */\n\t var CBC = C_mode.CBC = (function () {\n\t /**\n\t * Abstract base CBC mode.\n\t */\n\t var CBC = BlockCipherMode.extend();\n\n\t /**\n\t * CBC encryptor.\n\t */\n\t CBC.Encryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // XOR and encrypt\n\t xorBlock.call(this, words, offset, blockSize);\n\t cipher.encryptBlock(words, offset);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t /**\n\t * CBC decryptor.\n\t */\n\t CBC.Decryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t // Decrypt and XOR\n\t cipher.decryptBlock(words, offset);\n\t xorBlock.call(this, words, offset, blockSize);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function xorBlock(words, offset, blockSize) {\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Choose mixing block\n\t if (iv) {\n\t var block = iv;\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t var block = this._prevBlock;\n\t }\n\n\t // XOR blocks\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= block[i];\n\t }\n\t }\n\n\t return CBC;\n\t }());\n\n\t /**\n\t * Padding namespace.\n\t */\n\t var C_pad = C.pad = {};\n\n\t /**\n\t * PKCS #5/7 padding strategy.\n\t */\n\t var Pkcs7 = C_pad.Pkcs7 = {\n\t /**\n\t * Pads data using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to pad.\n\t * @param {number} blockSize The multiple that the data should be padded to.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\n\t */\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Create padding word\n\t var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\n\n\t // Create padding\n\t var paddingWords = [];\n\t for (var i = 0; i < nPaddingBytes; i += 4) {\n\t paddingWords.push(paddingWord);\n\t }\n\t var padding = WordArray.create(paddingWords, nPaddingBytes);\n\n\t // Add padding\n\t data.concat(padding);\n\t },\n\n\t /**\n\t * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to unpad.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.unpad(wordArray);\n\t */\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t };\n\n\t /**\n\t * Abstract base block cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\n\t */\n\t var BlockCipher = C_lib.BlockCipher = Cipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Mode} mode The block mode to use. Default: CBC\n\t * @property {Padding} padding The padding strategy to use. Default: Pkcs7\n\t */\n\t cfg: Cipher.cfg.extend({\n\t mode: CBC,\n\t padding: Pkcs7\n\t }),\n\n\t reset: function () {\n\t // Reset cipher\n\t Cipher.reset.call(this);\n\n\t // Shortcuts\n\t var cfg = this.cfg;\n\t var iv = cfg.iv;\n\t var mode = cfg.mode;\n\n\t // Reset block mode\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t var modeCreator = mode.createEncryptor;\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t var modeCreator = mode.createDecryptor;\n\n\t // Keep at least one block in the buffer for unpadding\n\t this._minBufferSize = 1;\n\t }\n\t this._mode = modeCreator.call(mode, this, iv && iv.words);\n\t },\n\n\t _doProcessBlock: function (words, offset) {\n\t this._mode.processBlock(words, offset);\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcut\n\t var padding = this.cfg.padding;\n\n\t // Finalize\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t // Pad data\n\t padding.pad(this._data, this.blockSize);\n\n\t // Process final blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t // Process final blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t // Unpad data\n\t padding.unpad(finalProcessedBlocks);\n\t }\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 128/32\n\t });\n\n\t /**\n\t * A collection of cipher parameters.\n\t *\n\t * @property {WordArray} ciphertext The raw ciphertext.\n\t * @property {WordArray} key The key to this ciphertext.\n\t * @property {WordArray} iv The IV used in the ciphering operation.\n\t * @property {WordArray} salt The salt used with a key derivation function.\n\t * @property {Cipher} algorithm The cipher algorithm.\n\t * @property {Mode} mode The block mode used in the ciphering operation.\n\t * @property {Padding} padding The padding scheme used in the ciphering operation.\n\t * @property {number} blockSize The block size of the cipher.\n\t * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\n\t */\n\t var CipherParams = C_lib.CipherParams = Base.extend({\n\t /**\n\t * Initializes a newly created cipher params object.\n\t *\n\t * @param {Object} cipherParams An object with any of the possible cipher parameters.\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.lib.CipherParams.create({\n\t * ciphertext: ciphertextWordArray,\n\t * key: keyWordArray,\n\t * iv: ivWordArray,\n\t * salt: saltWordArray,\n\t * algorithm: CryptoJS.algo.AES,\n\t * mode: CryptoJS.mode.CBC,\n\t * padding: CryptoJS.pad.PKCS7,\n\t * blockSize: 4,\n\t * formatter: CryptoJS.format.OpenSSL\n\t * });\n\t */\n\t init: function (cipherParams) {\n\t this.mixIn(cipherParams);\n\t },\n\n\t /**\n\t * Converts this cipher params object to a string.\n\t *\n\t * @param {Format} formatter (Optional) The formatting strategy to use.\n\t *\n\t * @return {string} The stringified cipher params.\n\t *\n\t * @throws Error If neither the formatter nor the default formatter is set.\n\t *\n\t * @example\n\t *\n\t * var string = cipherParams + '';\n\t * var string = cipherParams.toString();\n\t * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\n\t */\n\t toString: function (formatter) {\n\t return (formatter || this.formatter).stringify(this);\n\t }\n\t });\n\n\t /**\n\t * Format namespace.\n\t */\n\t var C_format = C.format = {};\n\n\t /**\n\t * OpenSSL formatting strategy.\n\t */\n\t var OpenSSLFormatter = C_format.OpenSSL = {\n\t /**\n\t * Converts a cipher params object to an OpenSSL-compatible string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The OpenSSL-compatible string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t // Shortcuts\n\t var ciphertext = cipherParams.ciphertext;\n\t var salt = cipherParams.salt;\n\n\t // Format\n\t if (salt) {\n\t var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\n\t } else {\n\t var wordArray = ciphertext;\n\t }\n\n\t return wordArray.toString(Base64);\n\t },\n\n\t /**\n\t * Converts an OpenSSL-compatible string to a cipher params object.\n\t *\n\t * @param {string} openSSLStr The OpenSSL-compatible string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\n\t */\n\t parse: function (openSSLStr) {\n\t // Parse base64\n\t var ciphertext = Base64.parse(openSSLStr);\n\n\t // Shortcut\n\t var ciphertextWords = ciphertext.words;\n\n\t // Test for salt\n\t if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\n\t // Extract salt\n\t var salt = WordArray.create(ciphertextWords.slice(2, 4));\n\n\t // Remove salt from ciphertext\n\t ciphertextWords.splice(0, 4);\n\t ciphertext.sigBytes -= 16;\n\t }\n\n\t return CipherParams.create({ ciphertext: ciphertext, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A cipher wrapper that returns ciphertext as a serializable cipher params object.\n\t */\n\t var SerializableCipher = C_lib.SerializableCipher = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\n\t */\n\t cfg: Base.extend({\n\t format: OpenSSLFormatter\n\t }),\n\n\t /**\n\t * Encrypts a message.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Encrypt\n\t var encryptor = cipher.createEncryptor(key, cfg);\n\t var ciphertext = encryptor.finalize(message);\n\n\t // Shortcut\n\t var cipherCfg = encryptor.cfg;\n\n\t // Create and return serializable cipher params\n\t return CipherParams.create({\n\t ciphertext: ciphertext,\n\t key: key,\n\t iv: cipherCfg.iv,\n\t algorithm: cipher,\n\t mode: cipherCfg.mode,\n\t padding: cipherCfg.padding,\n\t blockSize: cipher.blockSize,\n\t formatter: cfg.format\n\t });\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Decrypt\n\t var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\n\n\t return plaintext;\n\t },\n\n\t /**\n\t * Converts serialized ciphertext to CipherParams,\n\t * else assumed CipherParams already and returns ciphertext unchanged.\n\t *\n\t * @param {CipherParams|string} ciphertext The ciphertext.\n\t * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\n\t *\n\t * @return {CipherParams} The unserialized ciphertext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\n\t */\n\t _parse: function (ciphertext, format) {\n\t if (typeof ciphertext == 'string') {\n\t return format.parse(ciphertext, this);\n\t } else {\n\t return ciphertext;\n\t }\n\t }\n\t });\n\n\t /**\n\t * Key derivation function namespace.\n\t */\n\t var C_kdf = C.kdf = {};\n\n\t /**\n\t * OpenSSL key derivation function.\n\t */\n\t var OpenSSLKdf = C_kdf.OpenSSL = {\n\t /**\n\t * Derives a key and IV from a password.\n\t *\n\t * @param {string} password The password to derive from.\n\t * @param {number} keySize The size in words of the key to generate.\n\t * @param {number} ivSize The size in words of the IV to generate.\n\t * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\n\t *\n\t * @return {CipherParams} A cipher params object with the key, IV, and salt.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\n\t */\n\t execute: function (password, keySize, ivSize, salt) {\n\t // Generate random salt\n\t if (!salt) {\n\t salt = WordArray.random(64/8);\n\t }\n\n\t // Derive key and IV\n\t var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);\n\n\t // Separate key and IV\n\t var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\n\t key.sigBytes = keySize * 4;\n\n\t // Return params\n\t return CipherParams.create({ key: key, iv: iv, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A serializable cipher wrapper that derives the key from a password,\n\t * and returns ciphertext as a serializable cipher params object.\n\t */\n\t var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\n\t */\n\t cfg: SerializableCipher.cfg.extend({\n\t kdf: OpenSSLKdf\n\t }),\n\n\t /**\n\t * Encrypts a message using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Encrypt\n\t var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\n\n\t // Mix in derived params\n\t ciphertext.mixIn(derivedParams);\n\n\t return ciphertext;\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Decrypt\n\t var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\n\n\t return plaintext;\n\t }\n\t });\n\t}());\n\n\n}));", + ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory();\n\t}\n}(this, function () {\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\t /*\n\t * Local polyfil of Object.create\n\t */\n\t var create = Object.create || (function () {\n\t function F() {};\n\n\t return function (obj) {\n\t var subtype;\n\n\t F.prototype = obj;\n\n\t subtype = new F();\n\n\t F.prototype = null;\n\n\t return subtype;\n\t };\n\t }())\n\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t var subtype = create(this);\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var i = 0; i < thatSigBytes; i += 4) {\n\t thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t var r = (function (m_w) {\n\t var m_w = m_w;\n\t var m_z = 0x3ade68b1;\n\t var mask = 0xffffffff;\n\n\t return function () {\n\t m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t var result = ((m_z << 0x10) + m_w) & mask;\n\t result /= 0x100000000;\n\t result += 0.5;\n\t return result * (Math.random() > .5 ? 1 : -1);\n\t }\n\t });\n\n\t for (var i = 0, rcache; i < nBytes; i += 4) {\n\t var _r = r((rcache || Math.random()) * 0x100000000);\n\n\t rcache = _r() * 0x3ade67b7;\n\t words.push((_r() * 0x100000000) | 0);\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t var processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));", + ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64 encoding strategy.\n\t */\n\t var Base64 = C_enc.Base64 = {\n\t /**\n\t * Converts a word array to a Base64 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Base64 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64 string to a word array.\n\t *\n\t * @param {string} base64Str The Base64 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64.parse(base64String);\n\t */\n\t parse: function (base64Str) {\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = this._map;\n\t var reverseMap = this._reverseMap;\n\n\t if (!reverseMap) {\n\t reverseMap = this._reverseMap = [];\n\t for (var j = 0; j < map.length; j++) {\n\t reverseMap[map.charCodeAt(j)] = j;\n\t }\n\t }\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex !== -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t return parseLoop(base64Str, base64StrLength, reverseMap);\n\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n\t };\n\n\t function parseLoop(base64Str, base64StrLength, reverseMap) {\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n\t var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n\t words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\t return WordArray.create(words, nBytes);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Base64;\n\n}));", + ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * UTF-16 BE encoding strategy.\n\t */\n\t var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {\n\t /**\n\t * Converts a word array to a UTF-16 BE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 BE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 BE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 BE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t /**\n\t * UTF-16 LE encoding strategy.\n\t */\n\t C_enc.Utf16LE = {\n\t /**\n\t * Converts a word array to a UTF-16 LE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 LE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 LE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 LE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t function swapEndian(word) {\n\t return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Utf16;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha1\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha1\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var MD5 = C_algo.MD5;\n\n\t /**\n\t * This key derivation function is meant to conform with EVP_BytesToKey.\n\t * www.openssl.org/docs/crypto/EVP_BytesToKey.html\n\t */\n\t var EvpKDF = C_algo.EvpKDF = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hash algorithm to use. Default: MD5\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: MD5,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.EvpKDF.create();\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init hasher\n\t var hasher = cfg.hasher.create();\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t if (block) {\n\t hasher.update(block);\n\t }\n\t var block = hasher.update(password).finalize(salt);\n\t hasher.reset();\n\n\t // Iterations\n\t for (var i = 1; i < iterations; i++) {\n\t block = hasher.finalize(block);\n\t hasher.reset();\n\t }\n\n\t derivedKey.concat(block);\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.EvpKDF(password, salt);\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.EvpKDF = function (password, salt, cfg) {\n\t return EvpKDF.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.EvpKDF;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var CipherParams = C_lib.CipherParams;\n\t var C_enc = C.enc;\n\t var Hex = C_enc.Hex;\n\t var C_format = C.format;\n\n\t var HexFormatter = C_format.Hex = {\n\t /**\n\t * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The hexadecimally encoded string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.format.Hex.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t return cipherParams.ciphertext.toString(Hex);\n\t },\n\n\t /**\n\t * Converts a hexadecimally encoded ciphertext string to a cipher params object.\n\t *\n\t * @param {string} input The hexadecimally encoded string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.Hex.parse(hexString);\n\t */\n\t parse: function (input) {\n\t var ciphertext = Hex.parse(input);\n\t return CipherParams.create({ ciphertext: ciphertext });\n\t }\n\t };\n\t}());\n\n\n\treturn CryptoJS.format.Hex;\n\n}));", + ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var C_algo = C.algo;\n\n\t /**\n\t * HMAC algorithm.\n\t */\n\t var HMAC = C_algo.HMAC = Base.extend({\n\t /**\n\t * Initializes a newly created HMAC.\n\t *\n\t * @param {Hasher} hasher The hash algorithm to use.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @example\n\t *\n\t * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n\t */\n\t init: function (hasher, key) {\n\t // Init hasher\n\t hasher = this._hasher = new hasher.init();\n\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof key == 'string') {\n\t key = Utf8.parse(key);\n\t }\n\n\t // Shortcuts\n\t var hasherBlockSize = hasher.blockSize;\n\t var hasherBlockSizeBytes = hasherBlockSize * 4;\n\n\t // Allow arbitrary length keys\n\t if (key.sigBytes > hasherBlockSizeBytes) {\n\t key = hasher.finalize(key);\n\t }\n\n\t // Clamp excess bits\n\t key.clamp();\n\n\t // Clone key for inner and outer pads\n\t var oKey = this._oKey = key.clone();\n\t var iKey = this._iKey = key.clone();\n\n\t // Shortcuts\n\t var oKeyWords = oKey.words;\n\t var iKeyWords = iKey.words;\n\n\t // XOR keys with pad constants\n\t for (var i = 0; i < hasherBlockSize; i++) {\n\t oKeyWords[i] ^= 0x5c5c5c5c;\n\t iKeyWords[i] ^= 0x36363636;\n\t }\n\t oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this HMAC to its initial state.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.reset();\n\t */\n\t reset: function () {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Reset\n\t hasher.reset();\n\t hasher.update(this._iKey);\n\t },\n\n\t /**\n\t * Updates this HMAC with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {HMAC} This HMAC instance.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.update('message');\n\t * hmacHasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t this._hasher.update(messageUpdate);\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the HMAC computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @example\n\t *\n\t * var hmac = hmacHasher.finalize();\n\t * var hmac = hmacHasher.finalize('message');\n\t * var hmac = hmacHasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Compute HMAC\n\t var innerHash = hasher.finalize(messageUpdate);\n\t hasher.reset();\n\t var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n\n\t return hmac;\n\t }\n\t });\n\t}());\n\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"), require(\"./lib-typedarrays\"), require(\"./enc-utf16\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./sha1\"), require(\"./sha256\"), require(\"./sha224\"), require(\"./sha512\"), require(\"./sha384\"), require(\"./sha3\"), require(\"./ripemd160\"), require(\"./hmac\"), require(\"./pbkdf2\"), require(\"./evpkdf\"), require(\"./cipher-core\"), require(\"./mode-cfb\"), require(\"./mode-ctr\"), require(\"./mode-ctr-gladman\"), require(\"./mode-ofb\"), require(\"./mode-ecb\"), require(\"./pad-ansix923\"), require(\"./pad-iso10126\"), require(\"./pad-iso97971\"), require(\"./pad-zeropadding\"), require(\"./pad-nopadding\"), require(\"./format-hex\"), require(\"./aes\"), require(\"./tripledes\"), require(\"./rc4\"), require(\"./rabbit\"), require(\"./rabbit-legacy\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\", \"./lib-typedarrays\", \"./enc-utf16\", \"./enc-base64\", \"./md5\", \"./sha1\", \"./sha256\", \"./sha224\", \"./sha512\", \"./sha384\", \"./sha3\", \"./ripemd160\", \"./hmac\", \"./pbkdf2\", \"./evpkdf\", \"./cipher-core\", \"./mode-cfb\", \"./mode-ctr\", \"./mode-ctr-gladman\", \"./mode-ofb\", \"./mode-ecb\", \"./pad-ansix923\", \"./pad-iso10126\", \"./pad-iso97971\", \"./pad-zeropadding\", \"./pad-nopadding\", \"./format-hex\", \"./aes\", \"./tripledes\", \"./rc4\", \"./rabbit\", \"./rabbit-legacy\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\treturn CryptoJS;\n\n}));", + ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Check if typed arrays are supported\n\t if (typeof ArrayBuffer != 'function') {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\n\t // Reference original init\n\t var superInit = WordArray.init;\n\n\t // Augment WordArray.init to handle typed arrays\n\t var subInit = WordArray.init = function (typedArray) {\n\t // Convert buffers to uint8\n\t if (typedArray instanceof ArrayBuffer) {\n\t typedArray = new Uint8Array(typedArray);\n\t }\n\n\t // Convert other array views to uint8\n\t if (\n\t typedArray instanceof Int8Array ||\n\t (typeof Uint8ClampedArray !== \"undefined\" && typedArray instanceof Uint8ClampedArray) ||\n\t typedArray instanceof Int16Array ||\n\t typedArray instanceof Uint16Array ||\n\t typedArray instanceof Int32Array ||\n\t typedArray instanceof Uint32Array ||\n\t typedArray instanceof Float32Array ||\n\t typedArray instanceof Float64Array\n\t ) {\n\t typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);\n\t }\n\n\t // Handle Uint8Array\n\t if (typedArray instanceof Uint8Array) {\n\t // Shortcut\n\t var typedArrayByteLength = typedArray.byteLength;\n\n\t // Extract bytes\n\t var words = [];\n\t for (var i = 0; i < typedArrayByteLength; i++) {\n\t words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);\n\t }\n\n\t // Initialize this word array\n\t superInit.call(this, words, typedArrayByteLength);\n\t } else {\n\t // Else call normal init\n\t superInit.apply(this, arguments);\n\t }\n\t };\n\n\t subInit.prototype = WordArray;\n\t}());\n\n\n\treturn CryptoJS.lib.WordArray;\n\n}));", + ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var T = [];\n\n\t // Compute constants\n\t (function () {\n\t for (var i = 0; i < 64; i++) {\n\t T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\n\t }\n\t }());\n\n\t /**\n\t * MD5 hash algorithm.\n\t */\n\t var MD5 = C_algo.MD5 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var M_offset_0 = M[offset + 0];\n\t var M_offset_1 = M[offset + 1];\n\t var M_offset_2 = M[offset + 2];\n\t var M_offset_3 = M[offset + 3];\n\t var M_offset_4 = M[offset + 4];\n\t var M_offset_5 = M[offset + 5];\n\t var M_offset_6 = M[offset + 6];\n\t var M_offset_7 = M[offset + 7];\n\t var M_offset_8 = M[offset + 8];\n\t var M_offset_9 = M[offset + 9];\n\t var M_offset_10 = M[offset + 10];\n\t var M_offset_11 = M[offset + 11];\n\t var M_offset_12 = M[offset + 12];\n\t var M_offset_13 = M[offset + 13];\n\t var M_offset_14 = M[offset + 14];\n\t var M_offset_15 = M[offset + 15];\n\n\t // Working varialbes\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\n\t // Computation\n\t a = FF(a, b, c, d, M_offset_0, 7, T[0]);\n\t d = FF(d, a, b, c, M_offset_1, 12, T[1]);\n\t c = FF(c, d, a, b, M_offset_2, 17, T[2]);\n\t b = FF(b, c, d, a, M_offset_3, 22, T[3]);\n\t a = FF(a, b, c, d, M_offset_4, 7, T[4]);\n\t d = FF(d, a, b, c, M_offset_5, 12, T[5]);\n\t c = FF(c, d, a, b, M_offset_6, 17, T[6]);\n\t b = FF(b, c, d, a, M_offset_7, 22, T[7]);\n\t a = FF(a, b, c, d, M_offset_8, 7, T[8]);\n\t d = FF(d, a, b, c, M_offset_9, 12, T[9]);\n\t c = FF(c, d, a, b, M_offset_10, 17, T[10]);\n\t b = FF(b, c, d, a, M_offset_11, 22, T[11]);\n\t a = FF(a, b, c, d, M_offset_12, 7, T[12]);\n\t d = FF(d, a, b, c, M_offset_13, 12, T[13]);\n\t c = FF(c, d, a, b, M_offset_14, 17, T[14]);\n\t b = FF(b, c, d, a, M_offset_15, 22, T[15]);\n\n\t a = GG(a, b, c, d, M_offset_1, 5, T[16]);\n\t d = GG(d, a, b, c, M_offset_6, 9, T[17]);\n\t c = GG(c, d, a, b, M_offset_11, 14, T[18]);\n\t b = GG(b, c, d, a, M_offset_0, 20, T[19]);\n\t a = GG(a, b, c, d, M_offset_5, 5, T[20]);\n\t d = GG(d, a, b, c, M_offset_10, 9, T[21]);\n\t c = GG(c, d, a, b, M_offset_15, 14, T[22]);\n\t b = GG(b, c, d, a, M_offset_4, 20, T[23]);\n\t a = GG(a, b, c, d, M_offset_9, 5, T[24]);\n\t d = GG(d, a, b, c, M_offset_14, 9, T[25]);\n\t c = GG(c, d, a, b, M_offset_3, 14, T[26]);\n\t b = GG(b, c, d, a, M_offset_8, 20, T[27]);\n\t a = GG(a, b, c, d, M_offset_13, 5, T[28]);\n\t d = GG(d, a, b, c, M_offset_2, 9, T[29]);\n\t c = GG(c, d, a, b, M_offset_7, 14, T[30]);\n\t b = GG(b, c, d, a, M_offset_12, 20, T[31]);\n\n\t a = HH(a, b, c, d, M_offset_5, 4, T[32]);\n\t d = HH(d, a, b, c, M_offset_8, 11, T[33]);\n\t c = HH(c, d, a, b, M_offset_11, 16, T[34]);\n\t b = HH(b, c, d, a, M_offset_14, 23, T[35]);\n\t a = HH(a, b, c, d, M_offset_1, 4, T[36]);\n\t d = HH(d, a, b, c, M_offset_4, 11, T[37]);\n\t c = HH(c, d, a, b, M_offset_7, 16, T[38]);\n\t b = HH(b, c, d, a, M_offset_10, 23, T[39]);\n\t a = HH(a, b, c, d, M_offset_13, 4, T[40]);\n\t d = HH(d, a, b, c, M_offset_0, 11, T[41]);\n\t c = HH(c, d, a, b, M_offset_3, 16, T[42]);\n\t b = HH(b, c, d, a, M_offset_6, 23, T[43]);\n\t a = HH(a, b, c, d, M_offset_9, 4, T[44]);\n\t d = HH(d, a, b, c, M_offset_12, 11, T[45]);\n\t c = HH(c, d, a, b, M_offset_15, 16, T[46]);\n\t b = HH(b, c, d, a, M_offset_2, 23, T[47]);\n\n\t a = II(a, b, c, d, M_offset_0, 6, T[48]);\n\t d = II(d, a, b, c, M_offset_7, 10, T[49]);\n\t c = II(c, d, a, b, M_offset_14, 15, T[50]);\n\t b = II(b, c, d, a, M_offset_5, 21, T[51]);\n\t a = II(a, b, c, d, M_offset_12, 6, T[52]);\n\t d = II(d, a, b, c, M_offset_3, 10, T[53]);\n\t c = II(c, d, a, b, M_offset_10, 15, T[54]);\n\t b = II(b, c, d, a, M_offset_1, 21, T[55]);\n\t a = II(a, b, c, d, M_offset_8, 6, T[56]);\n\t d = II(d, a, b, c, M_offset_15, 10, T[57]);\n\t c = II(c, d, a, b, M_offset_6, 15, T[58]);\n\t b = II(b, c, d, a, M_offset_13, 21, T[59]);\n\t a = II(a, b, c, d, M_offset_4, 6, T[60]);\n\t d = II(d, a, b, c, M_offset_11, 10, T[61]);\n\t c = II(c, d, a, b, M_offset_2, 15, T[62]);\n\t b = II(b, c, d, a, M_offset_9, 21, T[63]);\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\n\t var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\n\t var nBitsTotalL = nBitsTotal;\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\n\t (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\n\t );\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\n\t );\n\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t function FF(a, b, c, d, x, s, t) {\n\t var n = a + ((b & c) | (~b & d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function GG(a, b, c, d, x, s, t) {\n\t var n = a + ((b & d) | (c & ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function HH(a, b, c, d, x, s, t) {\n\t var n = a + (b ^ c ^ d) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function II(a, b, c, d, x, s, t) {\n\t var n = a + (c ^ (b | ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.MD5('message');\n\t * var hash = CryptoJS.MD5(wordArray);\n\t */\n\t C.MD5 = Hasher._createHelper(MD5);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacMD5(message, key);\n\t */\n\t C.HmacMD5 = Hasher._createHmacHelper(MD5);\n\t}(Math));\n\n\n\treturn CryptoJS.MD5;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher Feedback block mode.\n\t */\n\tCryptoJS.mode.CFB = (function () {\n\t var CFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t CFB.Encryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t CFB.Decryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Generate keystream\n\t if (iv) {\n\t var keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t var keystream = this._prevBlock;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\n\t return CFB;\n\t}());\n\n\n\treturn CryptoJS.mode.CFB;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t * Counter block mode compatible with Dr Brian Gladman fileenc.c\n\t * derived from CryptoJS.mode.CTR\n\t * Jan Hruby jhruby.web@gmail.com\n\t */\n\tCryptoJS.mode.CTRGladman = (function () {\n\t var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();\n\n\t\tfunction incWord(word)\n\t\t{\n\t\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tvar b1 = (word >> 16)&0xff;\n\t\t\tvar b2 = (word >> 8)&0xff;\n\t\t\tvar b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) // overflow b1\n\t\t\t{\n\t\t\tb1 = 0;\n\t\t\tif (b2 === 0xff)\n\t\t\t{\n\t\t\t\tb2 = 0;\n\t\t\t\tif (b3 === 0xff)\n\t\t\t\t{\n\t\t\t\t\tb3 = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++b3;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t++b2;\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tword += (0x01 << 24);\n\t\t\t}\n\t\t\treturn word;\n\t\t}\n\n\t\tfunction incCounter(counter)\n\t\t{\n\t\t\tif ((counter[0] = incWord(counter[0])) === 0)\n\t\t\t{\n\t\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\t\tcounter[1] = incWord(counter[1]);\n\t\t\t}\n\t\t\treturn counter;\n\t\t}\n\n\t var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\n\t\t\t\tincCounter(counter);\n\n\t\t\t\tvar keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTRGladman.Decryptor = Encryptor;\n\n\t return CTRGladman;\n\t}());\n\n\n\n\n\treturn CryptoJS.mode.CTRGladman;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Counter block mode.\n\t */\n\tCryptoJS.mode.CTR = (function () {\n\t var CTR = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = CTR.Encryptor = CTR.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t var keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Increment counter\n\t counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTR.Decryptor = Encryptor;\n\n\t return CTR;\n\t}());\n\n\n\treturn CryptoJS.mode.CTR;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Electronic Codebook block mode.\n\t */\n\tCryptoJS.mode.ECB = (function () {\n\t var ECB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t ECB.Encryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.encryptBlock(words, offset);\n\t }\n\t });\n\n\t ECB.Decryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.decryptBlock(words, offset);\n\t }\n\t });\n\n\t return ECB;\n\t}());\n\n\n\treturn CryptoJS.mode.ECB;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Output Feedback block mode.\n\t */\n\tCryptoJS.mode.OFB = (function () {\n\t var OFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = OFB.Encryptor = OFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var keystream = this._keystream;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = this._keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t OFB.Decryptor = Encryptor;\n\n\t return OFB;\n\t}());\n\n\n\treturn CryptoJS.mode.OFB;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ANSI X.923 padding strategy.\n\t */\n\tCryptoJS.pad.AnsiX923 = {\n\t pad: function (data, blockSize) {\n\t // Shortcuts\n\t var dataSigBytes = data.sigBytes;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;\n\n\t // Compute last byte position\n\t var lastBytePos = dataSigBytes + nPaddingBytes - 1;\n\n\t // Pad\n\t data.clamp();\n\t data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);\n\t data.sigBytes += nPaddingBytes;\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Ansix923;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO 10126 padding strategy.\n\t */\n\tCryptoJS.pad.Iso10126 = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Pad\n\t data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).\n\t concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso10126;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO/IEC 9797-1 Padding Method 2.\n\t */\n\tCryptoJS.pad.Iso97971 = {\n\t pad: function (data, blockSize) {\n\t // Add 0x80 byte\n\t data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));\n\n\t // Zero pad the rest\n\t CryptoJS.pad.ZeroPadding.pad(data, blockSize);\n\t },\n\n\t unpad: function (data) {\n\t // Remove zero padding\n\t CryptoJS.pad.ZeroPadding.unpad(data);\n\n\t // Remove one more byte -- the 0x80 byte\n\t data.sigBytes--;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso97971;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * A noop padding strategy.\n\t */\n\tCryptoJS.pad.NoPadding = {\n\t pad: function () {\n\t },\n\n\t unpad: function () {\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.NoPadding;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Zero padding strategy.\n\t */\n\tCryptoJS.pad.ZeroPadding = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Pad\n\t data.clamp();\n\t data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);\n\t },\n\n\t unpad: function (data) {\n\t // Shortcut\n\t var dataWords = data.words;\n\n\t // Unpad\n\t var i = data.sigBytes - 1;\n\t while (!((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {\n\t i--;\n\t }\n\t data.sigBytes = i + 1;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.ZeroPadding;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha1\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha1\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA1 = C_algo.SHA1;\n\t var HMAC = C_algo.HMAC;\n\n\t /**\n\t * Password-Based Key Derivation Function 2 algorithm.\n\t */\n\t var PBKDF2 = C_algo.PBKDF2 = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hasher to use. Default: SHA1\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: SHA1,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.PBKDF2.create();\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init HMAC\n\t var hmac = HMAC.create(cfg.hasher, password);\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\t var blockIndex = WordArray.create([0x00000001]);\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var blockIndexWords = blockIndex.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t var block = hmac.update(salt).finalize(blockIndex);\n\t hmac.reset();\n\n\t // Shortcuts\n\t var blockWords = block.words;\n\t var blockWordsLength = blockWords.length;\n\n\t // Iterations\n\t var intermediate = block;\n\t for (var i = 1; i < iterations; i++) {\n\t intermediate = hmac.finalize(intermediate);\n\t hmac.reset();\n\n\t // Shortcut\n\t var intermediateWords = intermediate.words;\n\n\t // XOR intermediate with block\n\t for (var j = 0; j < blockWordsLength; j++) {\n\t blockWords[j] ^= intermediateWords[j];\n\t }\n\t }\n\n\t derivedKey.concat(block);\n\t blockIndexWords[0]++;\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.PBKDF2(password, salt);\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.PBKDF2 = function (password, salt, cfg) {\n\t return PBKDF2.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.PBKDF2;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm.\n\t *\n\t * This is a legacy version that neglected to convert the key to little-endian.\n\t * This error doesn't affect the cipher's security,\n\t * but it does affect its compatibility with other implementations.\n\t */\n\t var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);\n\t}());\n\n\n\treturn CryptoJS.RabbitLegacy;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm\n\t */\n\t var Rabbit = C_algo.Rabbit = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |\n\t (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);\n\t */\n\t C.Rabbit = StreamCipher._createHelper(Rabbit);\n\t}());\n\n\n\treturn CryptoJS.Rabbit;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t /**\n\t * RC4 stream cipher algorithm.\n\t */\n\t var RC4 = C_algo.RC4 = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t var keySigBytes = key.sigBytes;\n\n\t // Init sbox\n\t var S = this._S = [];\n\t for (var i = 0; i < 256; i++) {\n\t S[i] = i;\n\t }\n\n\t // Key setup\n\t for (var i = 0, j = 0; i < 256; i++) {\n\t var keyByteIndex = i % keySigBytes;\n\t var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;\n\n\t j = (j + S[i] + keyByte) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\t }\n\n\t // Counters\n\t this._i = this._j = 0;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t M[offset] ^= generateKeystreamWord.call(this);\n\t },\n\n\t keySize: 256/32,\n\n\t ivSize: 0\n\t });\n\n\t function generateKeystreamWord() {\n\t // Shortcuts\n\t var S = this._S;\n\t var i = this._i;\n\t var j = this._j;\n\n\t // Generate keystream word\n\t var keystreamWord = 0;\n\t for (var n = 0; n < 4; n++) {\n\t i = (i + 1) % 256;\n\t j = (j + S[i]) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\n\t keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);\n\t }\n\n\t // Update counters\n\t this._i = i;\n\t this._j = j;\n\n\t return keystreamWord;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4 = StreamCipher._createHelper(RC4);\n\n\t /**\n\t * Modified RC4 stream cipher algorithm.\n\t */\n\t var RC4Drop = C_algo.RC4Drop = RC4.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} drop The number of keystream words to drop. Default 192\n\t */\n\t cfg: RC4.cfg.extend({\n\t drop: 192\n\t }),\n\n\t _doReset: function () {\n\t RC4._doReset.call(this);\n\n\t // Drop\n\t for (var i = this.cfg.drop; i > 0; i--) {\n\t generateKeystreamWord.call(this);\n\t }\n\t }\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4Drop = StreamCipher._createHelper(RC4Drop);\n\t}());\n\n\n\treturn CryptoJS.RC4;\n\n}));", + ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t(c) 2012 by Cédric Mesnil. All rights reserved.\n\n\tRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n\t - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\t - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t*/\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var _zl = WordArray.create([\n\t 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n\t 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n\t 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n\t 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);\n\t var _zr = WordArray.create([\n\t 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n\t 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n\t 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n\t 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n\t 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);\n\t var _sl = WordArray.create([\n\t 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n\t 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n\t 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n\t 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n\t 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]);\n\t var _sr = WordArray.create([\n\t 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n\t 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n\t 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n\t 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n\t 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]);\n\n\t var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);\n\t var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);\n\n\t /**\n\t * RIPEMD160 hash algorithm.\n\t */\n\t var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t // Swap\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\t // Shortcut\n\t var H = this._hash.words;\n\t var hl = _hl.words;\n\t var hr = _hr.words;\n\t var zl = _zl.words;\n\t var zr = _zr.words;\n\t var sl = _sl.words;\n\t var sr = _sr.words;\n\n\t // Working variables\n\t var al, bl, cl, dl, el;\n\t var ar, br, cr, dr, er;\n\n\t ar = al = H[0];\n\t br = bl = H[1];\n\t cr = cl = H[2];\n\t dr = dl = H[3];\n\t er = el = H[4];\n\t // Computation\n\t var t;\n\t for (var i = 0; i < 80; i += 1) {\n\t t = (al + M[offset+zl[i]])|0;\n\t if (i<16){\n\t\t t += f1(bl,cl,dl) + hl[0];\n\t } else if (i<32) {\n\t\t t += f2(bl,cl,dl) + hl[1];\n\t } else if (i<48) {\n\t\t t += f3(bl,cl,dl) + hl[2];\n\t } else if (i<64) {\n\t\t t += f4(bl,cl,dl) + hl[3];\n\t } else {// if (i<80) {\n\t\t t += f5(bl,cl,dl) + hl[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sl[i]);\n\t t = (t+el)|0;\n\t al = el;\n\t el = dl;\n\t dl = rotl(cl, 10);\n\t cl = bl;\n\t bl = t;\n\n\t t = (ar + M[offset+zr[i]])|0;\n\t if (i<16){\n\t\t t += f5(br,cr,dr) + hr[0];\n\t } else if (i<32) {\n\t\t t += f4(br,cr,dr) + hr[1];\n\t } else if (i<48) {\n\t\t t += f3(br,cr,dr) + hr[2];\n\t } else if (i<64) {\n\t\t t += f2(br,cr,dr) + hr[3];\n\t } else {// if (i<80) {\n\t\t t += f1(br,cr,dr) + hr[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sr[i]) ;\n\t t = (t+er)|0;\n\t ar = er;\n\t er = dr;\n\t dr = rotl(cr, 10);\n\t cr = br;\n\t br = t;\n\t }\n\t // Intermediate hash value\n\t t = (H[1] + cl + dr)|0;\n\t H[1] = (H[2] + dl + er)|0;\n\t H[2] = (H[3] + el + ar)|0;\n\t H[3] = (H[4] + al + br)|0;\n\t H[4] = (H[0] + bl + cr)|0;\n\t H[0] = t;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)\n\t );\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 5; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t // Swap\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\n\t function f1(x, y, z) {\n\t return ((x) ^ (y) ^ (z));\n\n\t }\n\n\t function f2(x, y, z) {\n\t return (((x)&(y)) | ((~x)&(z)));\n\t }\n\n\t function f3(x, y, z) {\n\t return (((x) | (~(y))) ^ (z));\n\t }\n\n\t function f4(x, y, z) {\n\t return (((x) & (z)) | ((y)&(~(z))));\n\t }\n\n\t function f5(x, y, z) {\n\t return ((x) ^ ((y) |(~(z))));\n\n\t }\n\n\t function rotl(x,n) {\n\t return (x<>>(32-n));\n\t }\n\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.RIPEMD160('message');\n\t * var hash = CryptoJS.RIPEMD160(wordArray);\n\t */\n\t C.RIPEMD160 = Hasher._createHelper(RIPEMD160);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacRIPEMD160(message, key);\n\t */\n\t C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);\n\t}(Math));\n\n\n\treturn CryptoJS.RIPEMD160;\n\n}));", + ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-1 hash algorithm.\n\t */\n\t var SHA1 = C_algo.SHA1 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476,\n\t 0xc3d2e1f0\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\n\t // Computation\n\t for (var i = 0; i < 80; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n\t W[i] = (n << 1) | (n >>> 31);\n\t }\n\n\t var t = ((a << 5) | (a >>> 27)) + e + W[i];\n\t if (i < 20) {\n\t t += ((b & c) | (~b & d)) + 0x5a827999;\n\t } else if (i < 40) {\n\t t += (b ^ c ^ d) + 0x6ed9eba1;\n\t } else if (i < 60) {\n\t t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;\n\t } else /* if (i < 80) */ {\n\t t += (b ^ c ^ d) - 0x359d3e2a;\n\t }\n\n\t e = d;\n\t d = c;\n\t c = (b << 30) | (b >>> 2);\n\t b = a;\n\t a = t;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA1('message');\n\t * var hash = CryptoJS.SHA1(wordArray);\n\t */\n\t C.SHA1 = Hasher._createHelper(SHA1);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA1(message, key);\n\t */\n\t C.HmacSHA1 = Hasher._createHmacHelper(SHA1);\n\t}());\n\n\n\treturn CryptoJS.SHA1;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha256\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha256\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA256 = C_algo.SHA256;\n\n\t /**\n\t * SHA-224 hash algorithm.\n\t */\n\t var SHA224 = C_algo.SHA224 = SHA256.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n\t 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA256._doFinalize.call(this);\n\n\t hash.sigBytes -= 4;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA224('message');\n\t * var hash = CryptoJS.SHA224(wordArray);\n\t */\n\t C.SHA224 = SHA256._createHelper(SHA224);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA224(message, key);\n\t */\n\t C.HmacSHA224 = SHA256._createHmacHelper(SHA224);\n\t}());\n\n\n\treturn CryptoJS.SHA224;\n\n}));", + ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Initialization and round constants tables\n\t var H = [];\n\t var K = [];\n\n\t // Compute constants\n\t (function () {\n\t function isPrime(n) {\n\t var sqrtN = Math.sqrt(n);\n\t for (var factor = 2; factor <= sqrtN; factor++) {\n\t if (!(n % factor)) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function getFractionalBits(n) {\n\t return ((n - (n | 0)) * 0x100000000) | 0;\n\t }\n\n\t var n = 2;\n\t var nPrime = 0;\n\t while (nPrime < 64) {\n\t if (isPrime(n)) {\n\t if (nPrime < 8) {\n\t H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n\t }\n\t K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n\n\t nPrime++;\n\t }\n\n\t n++;\n\t }\n\t }());\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-256 hash algorithm.\n\t */\n\t var SHA256 = C_algo.SHA256 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init(H.slice(0));\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\t var f = H[5];\n\t var g = H[6];\n\t var h = H[7];\n\n\t // Computation\n\t for (var i = 0; i < 64; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var gamma0x = W[i - 15];\n\t var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^\n\t ((gamma0x << 14) | (gamma0x >>> 18)) ^\n\t (gamma0x >>> 3);\n\n\t var gamma1x = W[i - 2];\n\t var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^\n\t ((gamma1x << 13) | (gamma1x >>> 19)) ^\n\t (gamma1x >>> 10);\n\n\t W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n\t }\n\n\t var ch = (e & f) ^ (~e & g);\n\t var maj = (a & b) ^ (a & c) ^ (b & c);\n\n\t var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));\n\t var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));\n\n\t var t1 = h + sigma1 + ch + K[i] + W[i];\n\t var t2 = sigma0 + maj;\n\n\t h = g;\n\t g = f;\n\t f = e;\n\t e = (d + t1) | 0;\n\t d = c;\n\t c = b;\n\t b = a;\n\t a = (t1 + t2) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t H[5] = (H[5] + f) | 0;\n\t H[6] = (H[6] + g) | 0;\n\t H[7] = (H[7] + h) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA256('message');\n\t * var hash = CryptoJS.SHA256(wordArray);\n\t */\n\t C.SHA256 = Hasher._createHelper(SHA256);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA256(message, key);\n\t */\n\t C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA256;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var C_algo = C.algo;\n\n\t // Constants tables\n\t var RHO_OFFSETS = [];\n\t var PI_INDEXES = [];\n\t var ROUND_CONSTANTS = [];\n\n\t // Compute Constants\n\t (function () {\n\t // Compute rho offset constants\n\t var x = 1, y = 0;\n\t for (var t = 0; t < 24; t++) {\n\t RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;\n\n\t var newX = y % 5;\n\t var newY = (2 * x + 3 * y) % 5;\n\t x = newX;\n\t y = newY;\n\t }\n\n\t // Compute pi index constants\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;\n\t }\n\t }\n\n\t // Compute round constants\n\t var LFSR = 0x01;\n\t for (var i = 0; i < 24; i++) {\n\t var roundConstantMsw = 0;\n\t var roundConstantLsw = 0;\n\n\t for (var j = 0; j < 7; j++) {\n\t if (LFSR & 0x01) {\n\t var bitPosition = (1 << j) - 1;\n\t if (bitPosition < 32) {\n\t roundConstantLsw ^= 1 << bitPosition;\n\t } else /* if (bitPosition >= 32) */ {\n\t roundConstantMsw ^= 1 << (bitPosition - 32);\n\t }\n\t }\n\n\t // Compute next LFSR\n\t if (LFSR & 0x80) {\n\t // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1\n\t LFSR = (LFSR << 1) ^ 0x71;\n\t } else {\n\t LFSR <<= 1;\n\t }\n\t }\n\n\t ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);\n\t }\n\t }());\n\n\t // Reusable objects for temporary values\n\t var T = [];\n\t (function () {\n\t for (var i = 0; i < 25; i++) {\n\t T[i] = X64Word.create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-3 hash algorithm.\n\t */\n\t var SHA3 = C_algo.SHA3 = Hasher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} outputLength\n\t * The desired number of bits in the output hash.\n\t * Only values permitted are: 224, 256, 384, 512.\n\t * Default: 512\n\t */\n\t cfg: Hasher.cfg.extend({\n\t outputLength: 512\n\t }),\n\n\t _doReset: function () {\n\t var state = this._state = []\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = new X64Word.init();\n\t }\n\n\t this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var state = this._state;\n\t var nBlockSizeLanes = this.blockSize / 2;\n\n\t // Absorb\n\t for (var i = 0; i < nBlockSizeLanes; i++) {\n\t // Shortcuts\n\t var M2i = M[offset + 2 * i];\n\t var M2i1 = M[offset + 2 * i + 1];\n\n\t // Swap endian\n\t M2i = (\n\t (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |\n\t (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)\n\t );\n\t M2i1 = (\n\t (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |\n\t (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Absorb message into state\n\t var lane = state[i];\n\t lane.high ^= M2i1;\n\t lane.low ^= M2i;\n\t }\n\n\t // Rounds\n\t for (var round = 0; round < 24; round++) {\n\t // Theta\n\t for (var x = 0; x < 5; x++) {\n\t // Mix column lanes\n\t var tMsw = 0, tLsw = 0;\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t tMsw ^= lane.high;\n\t tLsw ^= lane.low;\n\t }\n\n\t // Temporary values\n\t var Tx = T[x];\n\t Tx.high = tMsw;\n\t Tx.low = tLsw;\n\t }\n\t for (var x = 0; x < 5; x++) {\n\t // Shortcuts\n\t var Tx4 = T[(x + 4) % 5];\n\t var Tx1 = T[(x + 1) % 5];\n\t var Tx1Msw = Tx1.high;\n\t var Tx1Lsw = Tx1.low;\n\n\t // Mix surrounding columns\n\t var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));\n\t var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t lane.high ^= tMsw;\n\t lane.low ^= tLsw;\n\t }\n\t }\n\n\t // Rho Pi\n\t for (var laneIndex = 1; laneIndex < 25; laneIndex++) {\n\t // Shortcuts\n\t var lane = state[laneIndex];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\t var rhoOffset = RHO_OFFSETS[laneIndex];\n\n\t // Rotate lanes\n\t if (rhoOffset < 32) {\n\t var tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));\n\t var tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));\n\t } else /* if (rhoOffset >= 32) */ {\n\t var tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));\n\t var tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));\n\t }\n\n\t // Transpose lanes\n\t var TPiLane = T[PI_INDEXES[laneIndex]];\n\t TPiLane.high = tMsw;\n\t TPiLane.low = tLsw;\n\t }\n\n\t // Rho pi at x = y = 0\n\t var T0 = T[0];\n\t var state0 = state[0];\n\t T0.high = state0.high;\n\t T0.low = state0.low;\n\n\t // Chi\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t // Shortcuts\n\t var laneIndex = x + 5 * y;\n\t var lane = state[laneIndex];\n\t var TLane = T[laneIndex];\n\t var Tx1Lane = T[((x + 1) % 5) + 5 * y];\n\t var Tx2Lane = T[((x + 2) % 5) + 5 * y];\n\n\t // Mix rows\n\t lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);\n\t lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low);\n\t }\n\t }\n\n\t // Iota\n\t var lane = state[0];\n\t var roundConstant = ROUND_CONSTANTS[round];\n\t lane.high ^= roundConstant.high;\n\t lane.low ^= roundConstant.low;;\n\t }\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\t var blockSizeBits = this.blockSize * 32;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);\n\t dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var state = this._state;\n\t var outputLengthBytes = this.cfg.outputLength / 8;\n\t var outputLengthLanes = outputLengthBytes / 8;\n\n\t // Squeeze\n\t var hashWords = [];\n\t for (var i = 0; i < outputLengthLanes; i++) {\n\t // Shortcuts\n\t var lane = state[i];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\n\t // Swap endian\n\t laneMsw = (\n\t (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |\n\t (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)\n\t );\n\t laneLsw = (\n\t (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |\n\t (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Squeeze state to retrieve hash\n\t hashWords.push(laneLsw);\n\t hashWords.push(laneMsw);\n\t }\n\n\t // Return final computed hash\n\t return new WordArray.init(hashWords, outputLengthBytes);\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\n\t var state = clone._state = this._state.slice(0);\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = state[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA3('message');\n\t * var hash = CryptoJS.SHA3(wordArray);\n\t */\n\t C.SHA3 = Hasher._createHelper(SHA3);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA3(message, key);\n\t */\n\t C.HmacSHA3 = Hasher._createHmacHelper(SHA3);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA3;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"), require(\"./sha512\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\", \"./sha512\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\t var SHA512 = C_algo.SHA512;\n\n\t /**\n\t * SHA-384 hash algorithm.\n\t */\n\t var SHA384 = C_algo.SHA384 = SHA512.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),\n\t new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),\n\t new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),\n\t new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA512._doFinalize.call(this);\n\n\t hash.sigBytes -= 16;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA384('message');\n\t * var hash = CryptoJS.SHA384(wordArray);\n\t */\n\t C.SHA384 = SHA512._createHelper(SHA384);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA384(message, key);\n\t */\n\t C.HmacSHA384 = SHA512._createHmacHelper(SHA384);\n\t}());\n\n\n\treturn CryptoJS.SHA384;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\n\t function X64Word_create() {\n\t return X64Word.create.apply(X64Word, arguments);\n\t }\n\n\t // Constants\n\t var K = [\n\t X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),\n\t X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),\n\t X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),\n\t X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),\n\t X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),\n\t X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),\n\t X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),\n\t X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),\n\t X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),\n\t X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),\n\t X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),\n\t X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),\n\t X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),\n\t X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),\n\t X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),\n\t X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),\n\t X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),\n\t X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),\n\t X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),\n\t X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),\n\t X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),\n\t X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),\n\t X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),\n\t X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),\n\t X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),\n\t X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),\n\t X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),\n\t X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),\n\t X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),\n\t X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),\n\t X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),\n\t X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),\n\t X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),\n\t X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),\n\t X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),\n\t X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),\n\t X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),\n\t X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),\n\t X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),\n\t X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)\n\t ];\n\n\t // Reusable objects\n\t var W = [];\n\t (function () {\n\t for (var i = 0; i < 80; i++) {\n\t W[i] = X64Word_create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-512 hash algorithm.\n\t */\n\t var SHA512 = C_algo.SHA512 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),\n\t new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),\n\t new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),\n\t new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var H0 = H[0];\n\t var H1 = H[1];\n\t var H2 = H[2];\n\t var H3 = H[3];\n\t var H4 = H[4];\n\t var H5 = H[5];\n\t var H6 = H[6];\n\t var H7 = H[7];\n\n\t var H0h = H0.high;\n\t var H0l = H0.low;\n\t var H1h = H1.high;\n\t var H1l = H1.low;\n\t var H2h = H2.high;\n\t var H2l = H2.low;\n\t var H3h = H3.high;\n\t var H3l = H3.low;\n\t var H4h = H4.high;\n\t var H4l = H4.low;\n\t var H5h = H5.high;\n\t var H5l = H5.low;\n\t var H6h = H6.high;\n\t var H6l = H6.low;\n\t var H7h = H7.high;\n\t var H7l = H7.low;\n\n\t // Working variables\n\t var ah = H0h;\n\t var al = H0l;\n\t var bh = H1h;\n\t var bl = H1l;\n\t var ch = H2h;\n\t var cl = H2l;\n\t var dh = H3h;\n\t var dl = H3l;\n\t var eh = H4h;\n\t var el = H4l;\n\t var fh = H5h;\n\t var fl = H5l;\n\t var gh = H6h;\n\t var gl = H6l;\n\t var hh = H7h;\n\t var hl = H7l;\n\n\t // Rounds\n\t for (var i = 0; i < 80; i++) {\n\t // Shortcut\n\t var Wi = W[i];\n\n\t // Extend message\n\t if (i < 16) {\n\t var Wih = Wi.high = M[offset + i * 2] | 0;\n\t var Wil = Wi.low = M[offset + i * 2 + 1] | 0;\n\t } else {\n\t // Gamma0\n\t var gamma0x = W[i - 15];\n\t var gamma0xh = gamma0x.high;\n\t var gamma0xl = gamma0x.low;\n\t var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);\n\t var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));\n\n\t // Gamma1\n\t var gamma1x = W[i - 2];\n\t var gamma1xh = gamma1x.high;\n\t var gamma1xl = gamma1x.low;\n\t var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);\n\t var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));\n\n\t // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n\t var Wi7 = W[i - 7];\n\t var Wi7h = Wi7.high;\n\t var Wi7l = Wi7.low;\n\n\t var Wi16 = W[i - 16];\n\t var Wi16h = Wi16.high;\n\t var Wi16l = Wi16.low;\n\n\t var Wil = gamma0l + Wi7l;\n\t var Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);\n\t var Wil = Wil + gamma1l;\n\t var Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);\n\t var Wil = Wil + Wi16l;\n\t var Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);\n\n\t Wi.high = Wih;\n\t Wi.low = Wil;\n\t }\n\n\t var chh = (eh & fh) ^ (~eh & gh);\n\t var chl = (el & fl) ^ (~el & gl);\n\t var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);\n\t var majl = (al & bl) ^ (al & cl) ^ (bl & cl);\n\n\t var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));\n\t var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));\n\t var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));\n\t var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));\n\n\t // t1 = h + sigma1 + ch + K[i] + W[i]\n\t var Ki = K[i];\n\t var Kih = Ki.high;\n\t var Kil = Ki.low;\n\n\t var t1l = hl + sigma1l;\n\t var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);\n\t var t1l = t1l + chl;\n\t var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);\n\t var t1l = t1l + Kil;\n\t var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);\n\t var t1l = t1l + Wil;\n\t var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);\n\n\t // t2 = sigma0 + maj\n\t var t2l = sigma0l + majl;\n\t var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);\n\n\t // Update working variables\n\t hh = gh;\n\t hl = gl;\n\t gh = fh;\n\t gl = fl;\n\t fh = eh;\n\t fl = el;\n\t el = (dl + t1l) | 0;\n\t eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;\n\t dh = ch;\n\t dl = cl;\n\t ch = bh;\n\t cl = bl;\n\t bh = ah;\n\t bl = al;\n\t al = (t1l + t2l) | 0;\n\t ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H0l = H0.low = (H0l + al);\n\t H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));\n\t H1l = H1.low = (H1l + bl);\n\t H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));\n\t H2l = H2.low = (H2l + cl);\n\t H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));\n\t H3l = H3.low = (H3l + dl);\n\t H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));\n\t H4l = H4.low = (H4l + el);\n\t H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));\n\t H5l = H5.low = (H5l + fl);\n\t H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));\n\t H6l = H6.low = (H6l + gl);\n\t H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));\n\t H7l = H7.low = (H7l + hl);\n\t H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Convert hash to 32-bit word array before returning\n\t var hash = this._hash.toX32();\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t },\n\n\t blockSize: 1024/32\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA512('message');\n\t * var hash = CryptoJS.SHA512(wordArray);\n\t */\n\t C.SHA512 = Hasher._createHelper(SHA512);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA512(message, key);\n\t */\n\t C.HmacSHA512 = Hasher._createHmacHelper(SHA512);\n\t}());\n\n\n\treturn CryptoJS.SHA512;\n\n}));", + ";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Permuted Choice 1 constants\n\t var PC1 = [\n\t 57, 49, 41, 33, 25, 17, 9, 1,\n\t 58, 50, 42, 34, 26, 18, 10, 2,\n\t 59, 51, 43, 35, 27, 19, 11, 3,\n\t 60, 52, 44, 36, 63, 55, 47, 39,\n\t 31, 23, 15, 7, 62, 54, 46, 38,\n\t 30, 22, 14, 6, 61, 53, 45, 37,\n\t 29, 21, 13, 5, 28, 20, 12, 4\n\t ];\n\n\t // Permuted Choice 2 constants\n\t var PC2 = [\n\t 14, 17, 11, 24, 1, 5,\n\t 3, 28, 15, 6, 21, 10,\n\t 23, 19, 12, 4, 26, 8,\n\t 16, 7, 27, 20, 13, 2,\n\t 41, 52, 31, 37, 47, 55,\n\t 30, 40, 51, 45, 33, 48,\n\t 44, 49, 39, 56, 34, 53,\n\t 46, 42, 50, 36, 29, 32\n\t ];\n\n\t // Cumulative bit shift constants\n\t var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];\n\n\t // SBOXes and round permutation constants\n\t var SBOX_P = [\n\t {\n\t 0x0: 0x808200,\n\t 0x10000000: 0x8000,\n\t 0x20000000: 0x808002,\n\t 0x30000000: 0x2,\n\t 0x40000000: 0x200,\n\t 0x50000000: 0x808202,\n\t 0x60000000: 0x800202,\n\t 0x70000000: 0x800000,\n\t 0x80000000: 0x202,\n\t 0x90000000: 0x800200,\n\t 0xa0000000: 0x8200,\n\t 0xb0000000: 0x808000,\n\t 0xc0000000: 0x8002,\n\t 0xd0000000: 0x800002,\n\t 0xe0000000: 0x0,\n\t 0xf0000000: 0x8202,\n\t 0x8000000: 0x0,\n\t 0x18000000: 0x808202,\n\t 0x28000000: 0x8202,\n\t 0x38000000: 0x8000,\n\t 0x48000000: 0x808200,\n\t 0x58000000: 0x200,\n\t 0x68000000: 0x808002,\n\t 0x78000000: 0x2,\n\t 0x88000000: 0x800200,\n\t 0x98000000: 0x8200,\n\t 0xa8000000: 0x808000,\n\t 0xb8000000: 0x800202,\n\t 0xc8000000: 0x800002,\n\t 0xd8000000: 0x8002,\n\t 0xe8000000: 0x202,\n\t 0xf8000000: 0x800000,\n\t 0x1: 0x8000,\n\t 0x10000001: 0x2,\n\t 0x20000001: 0x808200,\n\t 0x30000001: 0x800000,\n\t 0x40000001: 0x808002,\n\t 0x50000001: 0x8200,\n\t 0x60000001: 0x200,\n\t 0x70000001: 0x800202,\n\t 0x80000001: 0x808202,\n\t 0x90000001: 0x808000,\n\t 0xa0000001: 0x800002,\n\t 0xb0000001: 0x8202,\n\t 0xc0000001: 0x202,\n\t 0xd0000001: 0x800200,\n\t 0xe0000001: 0x8002,\n\t 0xf0000001: 0x0,\n\t 0x8000001: 0x808202,\n\t 0x18000001: 0x808000,\n\t 0x28000001: 0x800000,\n\t 0x38000001: 0x200,\n\t 0x48000001: 0x8000,\n\t 0x58000001: 0x800002,\n\t 0x68000001: 0x2,\n\t 0x78000001: 0x8202,\n\t 0x88000001: 0x8002,\n\t 0x98000001: 0x800202,\n\t 0xa8000001: 0x202,\n\t 0xb8000001: 0x808200,\n\t 0xc8000001: 0x800200,\n\t 0xd8000001: 0x0,\n\t 0xe8000001: 0x8200,\n\t 0xf8000001: 0x808002\n\t },\n\t {\n\t 0x0: 0x40084010,\n\t 0x1000000: 0x4000,\n\t 0x2000000: 0x80000,\n\t 0x3000000: 0x40080010,\n\t 0x4000000: 0x40000010,\n\t 0x5000000: 0x40084000,\n\t 0x6000000: 0x40004000,\n\t 0x7000000: 0x10,\n\t 0x8000000: 0x84000,\n\t 0x9000000: 0x40004010,\n\t 0xa000000: 0x40000000,\n\t 0xb000000: 0x84010,\n\t 0xc000000: 0x80010,\n\t 0xd000000: 0x0,\n\t 0xe000000: 0x4010,\n\t 0xf000000: 0x40080000,\n\t 0x800000: 0x40004000,\n\t 0x1800000: 0x84010,\n\t 0x2800000: 0x10,\n\t 0x3800000: 0x40004010,\n\t 0x4800000: 0x40084010,\n\t 0x5800000: 0x40000000,\n\t 0x6800000: 0x80000,\n\t 0x7800000: 0x40080010,\n\t 0x8800000: 0x80010,\n\t 0x9800000: 0x0,\n\t 0xa800000: 0x4000,\n\t 0xb800000: 0x40080000,\n\t 0xc800000: 0x40000010,\n\t 0xd800000: 0x84000,\n\t 0xe800000: 0x40084000,\n\t 0xf800000: 0x4010,\n\t 0x10000000: 0x0,\n\t 0x11000000: 0x40080010,\n\t 0x12000000: 0x40004010,\n\t 0x13000000: 0x40084000,\n\t 0x14000000: 0x40080000,\n\t 0x15000000: 0x10,\n\t 0x16000000: 0x84010,\n\t 0x17000000: 0x4000,\n\t 0x18000000: 0x4010,\n\t 0x19000000: 0x80000,\n\t 0x1a000000: 0x80010,\n\t 0x1b000000: 0x40000010,\n\t 0x1c000000: 0x84000,\n\t 0x1d000000: 0x40004000,\n\t 0x1e000000: 0x40000000,\n\t 0x1f000000: 0x40084010,\n\t 0x10800000: 0x84010,\n\t 0x11800000: 0x80000,\n\t 0x12800000: 0x40080000,\n\t 0x13800000: 0x4000,\n\t 0x14800000: 0x40004000,\n\t 0x15800000: 0x40084010,\n\t 0x16800000: 0x10,\n\t 0x17800000: 0x40000000,\n\t 0x18800000: 0x40084000,\n\t 0x19800000: 0x40000010,\n\t 0x1a800000: 0x40004010,\n\t 0x1b800000: 0x80010,\n\t 0x1c800000: 0x0,\n\t 0x1d800000: 0x4010,\n\t 0x1e800000: 0x40080010,\n\t 0x1f800000: 0x84000\n\t },\n\t {\n\t 0x0: 0x104,\n\t 0x100000: 0x0,\n\t 0x200000: 0x4000100,\n\t 0x300000: 0x10104,\n\t 0x400000: 0x10004,\n\t 0x500000: 0x4000004,\n\t 0x600000: 0x4010104,\n\t 0x700000: 0x4010000,\n\t 0x800000: 0x4000000,\n\t 0x900000: 0x4010100,\n\t 0xa00000: 0x10100,\n\t 0xb00000: 0x4010004,\n\t 0xc00000: 0x4000104,\n\t 0xd00000: 0x10000,\n\t 0xe00000: 0x4,\n\t 0xf00000: 0x100,\n\t 0x80000: 0x4010100,\n\t 0x180000: 0x4010004,\n\t 0x280000: 0x0,\n\t 0x380000: 0x4000100,\n\t 0x480000: 0x4000004,\n\t 0x580000: 0x10000,\n\t 0x680000: 0x10004,\n\t 0x780000: 0x104,\n\t 0x880000: 0x4,\n\t 0x980000: 0x100,\n\t 0xa80000: 0x4010000,\n\t 0xb80000: 0x10104,\n\t 0xc80000: 0x10100,\n\t 0xd80000: 0x4000104,\n\t 0xe80000: 0x4010104,\n\t 0xf80000: 0x4000000,\n\t 0x1000000: 0x4010100,\n\t 0x1100000: 0x10004,\n\t 0x1200000: 0x10000,\n\t 0x1300000: 0x4000100,\n\t 0x1400000: 0x100,\n\t 0x1500000: 0x4010104,\n\t 0x1600000: 0x4000004,\n\t 0x1700000: 0x0,\n\t 0x1800000: 0x4000104,\n\t 0x1900000: 0x4000000,\n\t 0x1a00000: 0x4,\n\t 0x1b00000: 0x10100,\n\t 0x1c00000: 0x4010000,\n\t 0x1d00000: 0x104,\n\t 0x1e00000: 0x10104,\n\t 0x1f00000: 0x4010004,\n\t 0x1080000: 0x4000000,\n\t 0x1180000: 0x104,\n\t 0x1280000: 0x4010100,\n\t 0x1380000: 0x0,\n\t 0x1480000: 0x10004,\n\t 0x1580000: 0x4000100,\n\t 0x1680000: 0x100,\n\t 0x1780000: 0x4010004,\n\t 0x1880000: 0x10000,\n\t 0x1980000: 0x4010104,\n\t 0x1a80000: 0x10104,\n\t 0x1b80000: 0x4000004,\n\t 0x1c80000: 0x4000104,\n\t 0x1d80000: 0x4010000,\n\t 0x1e80000: 0x4,\n\t 0x1f80000: 0x10100\n\t },\n\t {\n\t 0x0: 0x80401000,\n\t 0x10000: 0x80001040,\n\t 0x20000: 0x401040,\n\t 0x30000: 0x80400000,\n\t 0x40000: 0x0,\n\t 0x50000: 0x401000,\n\t 0x60000: 0x80000040,\n\t 0x70000: 0x400040,\n\t 0x80000: 0x80000000,\n\t 0x90000: 0x400000,\n\t 0xa0000: 0x40,\n\t 0xb0000: 0x80001000,\n\t 0xc0000: 0x80400040,\n\t 0xd0000: 0x1040,\n\t 0xe0000: 0x1000,\n\t 0xf0000: 0x80401040,\n\t 0x8000: 0x80001040,\n\t 0x18000: 0x40,\n\t 0x28000: 0x80400040,\n\t 0x38000: 0x80001000,\n\t 0x48000: 0x401000,\n\t 0x58000: 0x80401040,\n\t 0x68000: 0x0,\n\t 0x78000: 0x80400000,\n\t 0x88000: 0x1000,\n\t 0x98000: 0x80401000,\n\t 0xa8000: 0x400000,\n\t 0xb8000: 0x1040,\n\t 0xc8000: 0x80000000,\n\t 0xd8000: 0x400040,\n\t 0xe8000: 0x401040,\n\t 0xf8000: 0x80000040,\n\t 0x100000: 0x400040,\n\t 0x110000: 0x401000,\n\t 0x120000: 0x80000040,\n\t 0x130000: 0x0,\n\t 0x140000: 0x1040,\n\t 0x150000: 0x80400040,\n\t 0x160000: 0x80401000,\n\t 0x170000: 0x80001040,\n\t 0x180000: 0x80401040,\n\t 0x190000: 0x80000000,\n\t 0x1a0000: 0x80400000,\n\t 0x1b0000: 0x401040,\n\t 0x1c0000: 0x80001000,\n\t 0x1d0000: 0x400000,\n\t 0x1e0000: 0x40,\n\t 0x1f0000: 0x1000,\n\t 0x108000: 0x80400000,\n\t 0x118000: 0x80401040,\n\t 0x128000: 0x0,\n\t 0x138000: 0x401000,\n\t 0x148000: 0x400040,\n\t 0x158000: 0x80000000,\n\t 0x168000: 0x80001040,\n\t 0x178000: 0x40,\n\t 0x188000: 0x80000040,\n\t 0x198000: 0x1000,\n\t 0x1a8000: 0x80001000,\n\t 0x1b8000: 0x80400040,\n\t 0x1c8000: 0x1040,\n\t 0x1d8000: 0x80401000,\n\t 0x1e8000: 0x400000,\n\t 0x1f8000: 0x401040\n\t },\n\t {\n\t 0x0: 0x80,\n\t 0x1000: 0x1040000,\n\t 0x2000: 0x40000,\n\t 0x3000: 0x20000000,\n\t 0x4000: 0x20040080,\n\t 0x5000: 0x1000080,\n\t 0x6000: 0x21000080,\n\t 0x7000: 0x40080,\n\t 0x8000: 0x1000000,\n\t 0x9000: 0x20040000,\n\t 0xa000: 0x20000080,\n\t 0xb000: 0x21040080,\n\t 0xc000: 0x21040000,\n\t 0xd000: 0x0,\n\t 0xe000: 0x1040080,\n\t 0xf000: 0x21000000,\n\t 0x800: 0x1040080,\n\t 0x1800: 0x21000080,\n\t 0x2800: 0x80,\n\t 0x3800: 0x1040000,\n\t 0x4800: 0x40000,\n\t 0x5800: 0x20040080,\n\t 0x6800: 0x21040000,\n\t 0x7800: 0x20000000,\n\t 0x8800: 0x20040000,\n\t 0x9800: 0x0,\n\t 0xa800: 0x21040080,\n\t 0xb800: 0x1000080,\n\t 0xc800: 0x20000080,\n\t 0xd800: 0x21000000,\n\t 0xe800: 0x1000000,\n\t 0xf800: 0x40080,\n\t 0x10000: 0x40000,\n\t 0x11000: 0x80,\n\t 0x12000: 0x20000000,\n\t 0x13000: 0x21000080,\n\t 0x14000: 0x1000080,\n\t 0x15000: 0x21040000,\n\t 0x16000: 0x20040080,\n\t 0x17000: 0x1000000,\n\t 0x18000: 0x21040080,\n\t 0x19000: 0x21000000,\n\t 0x1a000: 0x1040000,\n\t 0x1b000: 0x20040000,\n\t 0x1c000: 0x40080,\n\t 0x1d000: 0x20000080,\n\t 0x1e000: 0x0,\n\t 0x1f000: 0x1040080,\n\t 0x10800: 0x21000080,\n\t 0x11800: 0x1000000,\n\t 0x12800: 0x1040000,\n\t 0x13800: 0x20040080,\n\t 0x14800: 0x20000000,\n\t 0x15800: 0x1040080,\n\t 0x16800: 0x80,\n\t 0x17800: 0x21040000,\n\t 0x18800: 0x40080,\n\t 0x19800: 0x21040080,\n\t 0x1a800: 0x0,\n\t 0x1b800: 0x21000000,\n\t 0x1c800: 0x1000080,\n\t 0x1d800: 0x40000,\n\t 0x1e800: 0x20040000,\n\t 0x1f800: 0x20000080\n\t },\n\t {\n\t 0x0: 0x10000008,\n\t 0x100: 0x2000,\n\t 0x200: 0x10200000,\n\t 0x300: 0x10202008,\n\t 0x400: 0x10002000,\n\t 0x500: 0x200000,\n\t 0x600: 0x200008,\n\t 0x700: 0x10000000,\n\t 0x800: 0x0,\n\t 0x900: 0x10002008,\n\t 0xa00: 0x202000,\n\t 0xb00: 0x8,\n\t 0xc00: 0x10200008,\n\t 0xd00: 0x202008,\n\t 0xe00: 0x2008,\n\t 0xf00: 0x10202000,\n\t 0x80: 0x10200000,\n\t 0x180: 0x10202008,\n\t 0x280: 0x8,\n\t 0x380: 0x200000,\n\t 0x480: 0x202008,\n\t 0x580: 0x10000008,\n\t 0x680: 0x10002000,\n\t 0x780: 0x2008,\n\t 0x880: 0x200008,\n\t 0x980: 0x2000,\n\t 0xa80: 0x10002008,\n\t 0xb80: 0x10200008,\n\t 0xc80: 0x0,\n\t 0xd80: 0x10202000,\n\t 0xe80: 0x202000,\n\t 0xf80: 0x10000000,\n\t 0x1000: 0x10002000,\n\t 0x1100: 0x10200008,\n\t 0x1200: 0x10202008,\n\t 0x1300: 0x2008,\n\t 0x1400: 0x200000,\n\t 0x1500: 0x10000000,\n\t 0x1600: 0x10000008,\n\t 0x1700: 0x202000,\n\t 0x1800: 0x202008,\n\t 0x1900: 0x0,\n\t 0x1a00: 0x8,\n\t 0x1b00: 0x10200000,\n\t 0x1c00: 0x2000,\n\t 0x1d00: 0x10002008,\n\t 0x1e00: 0x10202000,\n\t 0x1f00: 0x200008,\n\t 0x1080: 0x8,\n\t 0x1180: 0x202000,\n\t 0x1280: 0x200000,\n\t 0x1380: 0x10000008,\n\t 0x1480: 0x10002000,\n\t 0x1580: 0x2008,\n\t 0x1680: 0x10202008,\n\t 0x1780: 0x10200000,\n\t 0x1880: 0x10202000,\n\t 0x1980: 0x10200008,\n\t 0x1a80: 0x2000,\n\t 0x1b80: 0x202008,\n\t 0x1c80: 0x200008,\n\t 0x1d80: 0x0,\n\t 0x1e80: 0x10000000,\n\t 0x1f80: 0x10002008\n\t },\n\t {\n\t 0x0: 0x100000,\n\t 0x10: 0x2000401,\n\t 0x20: 0x400,\n\t 0x30: 0x100401,\n\t 0x40: 0x2100401,\n\t 0x50: 0x0,\n\t 0x60: 0x1,\n\t 0x70: 0x2100001,\n\t 0x80: 0x2000400,\n\t 0x90: 0x100001,\n\t 0xa0: 0x2000001,\n\t 0xb0: 0x2100400,\n\t 0xc0: 0x2100000,\n\t 0xd0: 0x401,\n\t 0xe0: 0x100400,\n\t 0xf0: 0x2000000,\n\t 0x8: 0x2100001,\n\t 0x18: 0x0,\n\t 0x28: 0x2000401,\n\t 0x38: 0x2100400,\n\t 0x48: 0x100000,\n\t 0x58: 0x2000001,\n\t 0x68: 0x2000000,\n\t 0x78: 0x401,\n\t 0x88: 0x100401,\n\t 0x98: 0x2000400,\n\t 0xa8: 0x2100000,\n\t 0xb8: 0x100001,\n\t 0xc8: 0x400,\n\t 0xd8: 0x2100401,\n\t 0xe8: 0x1,\n\t 0xf8: 0x100400,\n\t 0x100: 0x2000000,\n\t 0x110: 0x100000,\n\t 0x120: 0x2000401,\n\t 0x130: 0x2100001,\n\t 0x140: 0x100001,\n\t 0x150: 0x2000400,\n\t 0x160: 0x2100400,\n\t 0x170: 0x100401,\n\t 0x180: 0x401,\n\t 0x190: 0x2100401,\n\t 0x1a0: 0x100400,\n\t 0x1b0: 0x1,\n\t 0x1c0: 0x0,\n\t 0x1d0: 0x2100000,\n\t 0x1e0: 0x2000001,\n\t 0x1f0: 0x400,\n\t 0x108: 0x100400,\n\t 0x118: 0x2000401,\n\t 0x128: 0x2100001,\n\t 0x138: 0x1,\n\t 0x148: 0x2000000,\n\t 0x158: 0x100000,\n\t 0x168: 0x401,\n\t 0x178: 0x2100400,\n\t 0x188: 0x2000001,\n\t 0x198: 0x2100000,\n\t 0x1a8: 0x0,\n\t 0x1b8: 0x2100401,\n\t 0x1c8: 0x100401,\n\t 0x1d8: 0x400,\n\t 0x1e8: 0x2000400,\n\t 0x1f8: 0x100001\n\t },\n\t {\n\t 0x0: 0x8000820,\n\t 0x1: 0x20000,\n\t 0x2: 0x8000000,\n\t 0x3: 0x20,\n\t 0x4: 0x20020,\n\t 0x5: 0x8020820,\n\t 0x6: 0x8020800,\n\t 0x7: 0x800,\n\t 0x8: 0x8020000,\n\t 0x9: 0x8000800,\n\t 0xa: 0x20800,\n\t 0xb: 0x8020020,\n\t 0xc: 0x820,\n\t 0xd: 0x0,\n\t 0xe: 0x8000020,\n\t 0xf: 0x20820,\n\t 0x80000000: 0x800,\n\t 0x80000001: 0x8020820,\n\t 0x80000002: 0x8000820,\n\t 0x80000003: 0x8000000,\n\t 0x80000004: 0x8020000,\n\t 0x80000005: 0x20800,\n\t 0x80000006: 0x20820,\n\t 0x80000007: 0x20,\n\t 0x80000008: 0x8000020,\n\t 0x80000009: 0x820,\n\t 0x8000000a: 0x20020,\n\t 0x8000000b: 0x8020800,\n\t 0x8000000c: 0x0,\n\t 0x8000000d: 0x8020020,\n\t 0x8000000e: 0x8000800,\n\t 0x8000000f: 0x20000,\n\t 0x10: 0x20820,\n\t 0x11: 0x8020800,\n\t 0x12: 0x20,\n\t 0x13: 0x800,\n\t 0x14: 0x8000800,\n\t 0x15: 0x8000020,\n\t 0x16: 0x8020020,\n\t 0x17: 0x20000,\n\t 0x18: 0x0,\n\t 0x19: 0x20020,\n\t 0x1a: 0x8020000,\n\t 0x1b: 0x8000820,\n\t 0x1c: 0x8020820,\n\t 0x1d: 0x20800,\n\t 0x1e: 0x820,\n\t 0x1f: 0x8000000,\n\t 0x80000010: 0x20000,\n\t 0x80000011: 0x800,\n\t 0x80000012: 0x8020020,\n\t 0x80000013: 0x20820,\n\t 0x80000014: 0x20,\n\t 0x80000015: 0x8020000,\n\t 0x80000016: 0x8000000,\n\t 0x80000017: 0x8000820,\n\t 0x80000018: 0x8020820,\n\t 0x80000019: 0x8000020,\n\t 0x8000001a: 0x8000800,\n\t 0x8000001b: 0x0,\n\t 0x8000001c: 0x20800,\n\t 0x8000001d: 0x820,\n\t 0x8000001e: 0x20020,\n\t 0x8000001f: 0x8020800\n\t }\n\t ];\n\n\t // Masks that select the SBOX input\n\t var SBOX_MASK = [\n\t 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,\n\t 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f\n\t ];\n\n\t /**\n\t * DES block cipher algorithm.\n\t */\n\t var DES = C_algo.DES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\n\t // Select 56 bits according to PC1\n\t var keyBits = [];\n\t for (var i = 0; i < 56; i++) {\n\t var keyBitPos = PC1[i] - 1;\n\t keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;\n\t }\n\n\t // Assemble 16 subkeys\n\t var subKeys = this._subKeys = [];\n\t for (var nSubKey = 0; nSubKey < 16; nSubKey++) {\n\t // Create subkey\n\t var subKey = subKeys[nSubKey] = [];\n\n\t // Shortcut\n\t var bitShift = BIT_SHIFTS[nSubKey];\n\n\t // Select 48 bits according to PC2\n\t for (var i = 0; i < 24; i++) {\n\t // Select from the left 28 key bits\n\t subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);\n\n\t // Select from the right 28 key bits\n\t subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);\n\t }\n\n\t // Since each subkey is applied to an expanded 32-bit input,\n\t // the subkey can be broken into 8 values scaled to 32-bits,\n\t // which allows the key to be used without expansion\n\t subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);\n\t for (var i = 1; i < 7; i++) {\n\t subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);\n\t }\n\t subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);\n\t }\n\n\t // Compute inverse subkeys\n\t var invSubKeys = this._invSubKeys = [];\n\t for (var i = 0; i < 16; i++) {\n\t invSubKeys[i] = subKeys[15 - i];\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._subKeys);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._invSubKeys);\n\t },\n\n\t _doCryptBlock: function (M, offset, subKeys) {\n\t // Get input\n\t this._lBlock = M[offset];\n\t this._rBlock = M[offset + 1];\n\n\t // Initial permutation\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeLR.call(this, 1, 0x55555555);\n\n\t // Rounds\n\t for (var round = 0; round < 16; round++) {\n\t // Shortcuts\n\t var subKey = subKeys[round];\n\t var lBlock = this._lBlock;\n\t var rBlock = this._rBlock;\n\n\t // Feistel function\n\t var f = 0;\n\t for (var i = 0; i < 8; i++) {\n\t f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];\n\t }\n\t this._lBlock = rBlock;\n\t this._rBlock = lBlock ^ f;\n\t }\n\n\t // Undo swap from last round\n\t var t = this._lBlock;\n\t this._lBlock = this._rBlock;\n\t this._rBlock = t;\n\n\t // Final permutation\n\t exchangeLR.call(this, 1, 0x55555555);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\n\t // Set output\n\t M[offset] = this._lBlock;\n\t M[offset + 1] = this._rBlock;\n\t },\n\n\t keySize: 64/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t // Swap bits across the left and right words\n\t function exchangeLR(offset, mask) {\n\t var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;\n\t this._rBlock ^= t;\n\t this._lBlock ^= t << offset;\n\t }\n\n\t function exchangeRL(offset, mask) {\n\t var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;\n\t this._lBlock ^= t;\n\t this._rBlock ^= t << offset;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.DES = BlockCipher._createHelper(DES);\n\n\t /**\n\t * Triple-DES block cipher algorithm.\n\t */\n\t var TripleDES = C_algo.TripleDES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\n\t // Create DES instances\n\t this._des1 = DES.createEncryptor(WordArray.create(keyWords.slice(0, 2)));\n\t this._des2 = DES.createEncryptor(WordArray.create(keyWords.slice(2, 4)));\n\t this._des3 = DES.createEncryptor(WordArray.create(keyWords.slice(4, 6)));\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._des1.encryptBlock(M, offset);\n\t this._des2.decryptBlock(M, offset);\n\t this._des3.encryptBlock(M, offset);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._des3.decryptBlock(M, offset);\n\t this._des2.encryptBlock(M, offset);\n\t this._des1.decryptBlock(M, offset);\n\t },\n\n\t keySize: 192/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.TripleDES = BlockCipher._createHelper(TripleDES);\n\t}());\n\n\n\treturn CryptoJS.TripleDES;\n\n}));", + ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var X32WordArray = C_lib.WordArray;\n\n\t /**\n\t * x64 namespace.\n\t */\n\t var C_x64 = C.x64 = {};\n\n\t /**\n\t * A 64-bit word.\n\t */\n\t var X64Word = C_x64.Word = Base.extend({\n\t /**\n\t * Initializes a newly created 64-bit word.\n\t *\n\t * @param {number} high The high 32 bits.\n\t * @param {number} low The low 32 bits.\n\t *\n\t * @example\n\t *\n\t * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);\n\t */\n\t init: function (high, low) {\n\t this.high = high;\n\t this.low = low;\n\t }\n\n\t /**\n\t * Bitwise NOTs this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after negating.\n\t *\n\t * @example\n\t *\n\t * var negated = x64Word.not();\n\t */\n\t // not: function () {\n\t // var high = ~this.high;\n\t // var low = ~this.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ANDs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to AND with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ANDing.\n\t *\n\t * @example\n\t *\n\t * var anded = x64Word.and(anotherX64Word);\n\t */\n\t // and: function (word) {\n\t // var high = this.high & word.high;\n\t // var low = this.low & word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to OR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ORing.\n\t *\n\t * @example\n\t *\n\t * var ored = x64Word.or(anotherX64Word);\n\t */\n\t // or: function (word) {\n\t // var high = this.high | word.high;\n\t // var low = this.low | word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise XORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to XOR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after XORing.\n\t *\n\t * @example\n\t *\n\t * var xored = x64Word.xor(anotherX64Word);\n\t */\n\t // xor: function (word) {\n\t // var high = this.high ^ word.high;\n\t // var low = this.low ^ word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftL(25);\n\t */\n\t // shiftL: function (n) {\n\t // if (n < 32) {\n\t // var high = (this.high << n) | (this.low >>> (32 - n));\n\t // var low = this.low << n;\n\t // } else {\n\t // var high = this.low << (n - 32);\n\t // var low = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftR(7);\n\t */\n\t // shiftR: function (n) {\n\t // if (n < 32) {\n\t // var low = (this.low >>> n) | (this.high << (32 - n));\n\t // var high = this.high >>> n;\n\t // } else {\n\t // var low = this.high >>> (n - 32);\n\t // var high = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotL(25);\n\t */\n\t // rotL: function (n) {\n\t // return this.shiftL(n).or(this.shiftR(64 - n));\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotR(7);\n\t */\n\t // rotR: function (n) {\n\t // return this.shiftR(n).or(this.shiftL(64 - n));\n\t // },\n\n\t /**\n\t * Adds this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to add with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after adding.\n\t *\n\t * @example\n\t *\n\t * var added = x64Word.add(anotherX64Word);\n\t */\n\t // add: function (word) {\n\t // var low = (this.low + word.low) | 0;\n\t // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;\n\t // var high = (this.high + word.high + carry) | 0;\n\n\t // return X64Word.create(high, low);\n\t // }\n\t });\n\n\t /**\n\t * An array of 64-bit words.\n\t *\n\t * @property {Array} words The array of CryptoJS.x64.Word objects.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var X64WordArray = C_x64.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create();\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ]);\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ], 10);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 8;\n\t }\n\t },\n\n\t /**\n\t * Converts this 64-bit word array to a 32-bit word array.\n\t *\n\t * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.\n\t *\n\t * @example\n\t *\n\t * var x32WordArray = x64WordArray.toX32();\n\t */\n\t toX32: function () {\n\t // Shortcuts\n\t var x64Words = this.words;\n\t var x64WordsLength = x64Words.length;\n\n\t // Convert\n\t var x32Words = [];\n\t for (var i = 0; i < x64WordsLength; i++) {\n\t var x64Word = x64Words[i];\n\t x32Words.push(x64Word.high);\n\t x32Words.push(x64Word.low);\n\t }\n\n\t return X32WordArray.create(x32Words, this.sigBytes);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {X64WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = x64WordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\n\t // Clone \"words\" array\n\t var words = clone.words = this.words.slice(0);\n\n\t // Clone each X64Word object\n\t var wordsLength = words.length;\n\t for (var i = 0; i < wordsLength; i++) {\n\t words[i] = words[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\t}());\n\n\n\treturn CryptoJS;\n\n}));", + "/*! https://mths.be/utf8js v2.1.2 by @mathias */\n;(function(root) {\n\n\t// Detect free variables `exports`\n\tvar freeExports = typeof exports == 'object' && exports;\n\n\t// Detect free variable `module`\n\tvar freeModule = typeof module == 'object' && module &&\n\t\tmodule.exports == freeExports && module;\n\n\t// Detect free variable `global`, from Node.js or Browserified code,\n\t// and use it as `root`\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\troot = freeGlobal;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar stringFromCharCode = String.fromCharCode;\n\n\t// Taken from https://mths.be/punycode\n\tfunction ucs2decode(string) {\n\t\tvar output = [];\n\t\tvar counter = 0;\n\t\tvar length = string.length;\n\t\tvar value;\n\t\tvar extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t// Taken from https://mths.be/punycode\n\tfunction ucs2encode(array) {\n\t\tvar length = array.length;\n\t\tvar index = -1;\n\t\tvar value;\n\t\tvar output = '';\n\t\twhile (++index < length) {\n\t\t\tvalue = array[index];\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t}\n\t\treturn output;\n\t}\n\n\tfunction checkScalarValue(codePoint) {\n\t\tif (codePoint >= 0xD800 && codePoint <= 0xDFFF) {\n\t\t\tthrow Error(\n\t\t\t\t'Lone surrogate U+' + codePoint.toString(16).toUpperCase() +\n\t\t\t\t' is not a scalar value'\n\t\t\t);\n\t\t}\n\t}\n\t/*--------------------------------------------------------------------------*/\n\n\tfunction createByte(codePoint, shift) {\n\t\treturn stringFromCharCode(((codePoint >> shift) & 0x3F) | 0x80);\n\t}\n\n\tfunction encodeCodePoint(codePoint) {\n\t\tif ((codePoint & 0xFFFFFF80) == 0) { // 1-byte sequence\n\t\t\treturn stringFromCharCode(codePoint);\n\t\t}\n\t\tvar symbol = '';\n\t\tif ((codePoint & 0xFFFFF800) == 0) { // 2-byte sequence\n\t\t\tsymbol = stringFromCharCode(((codePoint >> 6) & 0x1F) | 0xC0);\n\t\t}\n\t\telse if ((codePoint & 0xFFFF0000) == 0) { // 3-byte sequence\n\t\t\tcheckScalarValue(codePoint);\n\t\t\tsymbol = stringFromCharCode(((codePoint >> 12) & 0x0F) | 0xE0);\n\t\t\tsymbol += createByte(codePoint, 6);\n\t\t}\n\t\telse if ((codePoint & 0xFFE00000) == 0) { // 4-byte sequence\n\t\t\tsymbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xF0);\n\t\t\tsymbol += createByte(codePoint, 12);\n\t\t\tsymbol += createByte(codePoint, 6);\n\t\t}\n\t\tsymbol += stringFromCharCode((codePoint & 0x3F) | 0x80);\n\t\treturn symbol;\n\t}\n\n\tfunction utf8encode(string) {\n\t\tvar codePoints = ucs2decode(string);\n\t\tvar length = codePoints.length;\n\t\tvar index = -1;\n\t\tvar codePoint;\n\t\tvar byteString = '';\n\t\twhile (++index < length) {\n\t\t\tcodePoint = codePoints[index];\n\t\t\tbyteString += encodeCodePoint(codePoint);\n\t\t}\n\t\treturn byteString;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tfunction readContinuationByte() {\n\t\tif (byteIndex >= byteCount) {\n\t\t\tthrow Error('Invalid byte index');\n\t\t}\n\n\t\tvar continuationByte = byteArray[byteIndex] & 0xFF;\n\t\tbyteIndex++;\n\n\t\tif ((continuationByte & 0xC0) == 0x80) {\n\t\t\treturn continuationByte & 0x3F;\n\t\t}\n\n\t\t// If we end up here, it’s not a continuation byte\n\t\tthrow Error('Invalid continuation byte');\n\t}\n\n\tfunction decodeSymbol() {\n\t\tvar byte1;\n\t\tvar byte2;\n\t\tvar byte3;\n\t\tvar byte4;\n\t\tvar codePoint;\n\n\t\tif (byteIndex > byteCount) {\n\t\t\tthrow Error('Invalid byte index');\n\t\t}\n\n\t\tif (byteIndex == byteCount) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Read first byte\n\t\tbyte1 = byteArray[byteIndex] & 0xFF;\n\t\tbyteIndex++;\n\n\t\t// 1-byte sequence (no continuation bytes)\n\t\tif ((byte1 & 0x80) == 0) {\n\t\t\treturn byte1;\n\t\t}\n\n\t\t// 2-byte sequence\n\t\tif ((byte1 & 0xE0) == 0xC0) {\n\t\t\tbyte2 = readContinuationByte();\n\t\t\tcodePoint = ((byte1 & 0x1F) << 6) | byte2;\n\t\t\tif (codePoint >= 0x80) {\n\t\t\t\treturn codePoint;\n\t\t\t} else {\n\t\t\t\tthrow Error('Invalid continuation byte');\n\t\t\t}\n\t\t}\n\n\t\t// 3-byte sequence (may include unpaired surrogates)\n\t\tif ((byte1 & 0xF0) == 0xE0) {\n\t\t\tbyte2 = readContinuationByte();\n\t\t\tbyte3 = readContinuationByte();\n\t\t\tcodePoint = ((byte1 & 0x0F) << 12) | (byte2 << 6) | byte3;\n\t\t\tif (codePoint >= 0x0800) {\n\t\t\t\tcheckScalarValue(codePoint);\n\t\t\t\treturn codePoint;\n\t\t\t} else {\n\t\t\t\tthrow Error('Invalid continuation byte');\n\t\t\t}\n\t\t}\n\n\t\t// 4-byte sequence\n\t\tif ((byte1 & 0xF8) == 0xF0) {\n\t\t\tbyte2 = readContinuationByte();\n\t\t\tbyte3 = readContinuationByte();\n\t\t\tbyte4 = readContinuationByte();\n\t\t\tcodePoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0C) |\n\t\t\t\t(byte3 << 0x06) | byte4;\n\t\t\tif (codePoint >= 0x010000 && codePoint <= 0x10FFFF) {\n\t\t\t\treturn codePoint;\n\t\t\t}\n\t\t}\n\n\t\tthrow Error('Invalid UTF-8 detected');\n\t}\n\n\tvar byteArray;\n\tvar byteCount;\n\tvar byteIndex;\n\tfunction utf8decode(byteString) {\n\t\tbyteArray = ucs2decode(byteString);\n\t\tbyteCount = byteArray.length;\n\t\tbyteIndex = 0;\n\t\tvar codePoints = [];\n\t\tvar tmp;\n\t\twhile ((tmp = decodeSymbol()) !== false) {\n\t\t\tcodePoints.push(tmp);\n\t\t}\n\t\treturn ucs2encode(codePoints);\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar utf8 = {\n\t\t'version': '2.1.2',\n\t\t'encode': utf8encode,\n\t\t'decode': utf8decode\n\t};\n\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine(function() {\n\t\t\treturn utf8;\n\t\t});\n\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\tif (freeModule) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = utf8;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tvar object = {};\n\t\t\tvar hasOwnProperty = object.hasOwnProperty;\n\t\t\tfor (var key in utf8) {\n\t\t\t\thasOwnProperty.call(utf8, key) && (freeExports[key] = utf8[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.utf8 = utf8;\n\t}\n\n}(this));\n", + "module.exports = XMLHttpRequest;\n", + "/*! bignumber.js v4.0.2 https://github.com/MikeMcl/bignumber.js/LICENCE */\r\n\r\n;(function (globalObj) {\r\n 'use strict';\r\n\r\n /*\r\n bignumber.js v4.0.2\r\n A JavaScript library for arbitrary-precision arithmetic.\r\n https://github.com/MikeMcl/bignumber.js\r\n Copyright (c) 2017 Michael Mclaughlin \r\n MIT Expat Licence\r\n */\r\n\r\n\r\n var BigNumber,\r\n isNumeric = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n notBool = ' not a boolean or binary digit',\r\n roundingMode = 'rounding mode',\r\n tooManyDigits = 'number type has more than 15 significant digits',\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_',\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n /*\r\n * The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n * the arguments to toExponential, toFixed, toFormat, and toPrecision, beyond which an\r\n * exception is thrown (if ERRORS is true).\r\n */\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n /*\r\n * Create and return a BigNumber constructor.\r\n */\r\n function constructorFactory(config) {\r\n var div, parseNumeric,\r\n\r\n // id tracks the caller function, so its name can be included in error messages.\r\n id = 0,\r\n P = BigNumber.prototype,\r\n ONE = new BigNumber(1),\r\n\r\n\r\n /********************************* EDITABLE DEFAULTS **********************************/\r\n\r\n\r\n /*\r\n * The default values below must be integers within the inclusive ranges stated.\r\n * The values can also be changed at run-time using BigNumber.config.\r\n */\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n /*\r\n * The rounding mode used when rounding to the above decimal places, and when using\r\n * toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n * UP 0 Away from zero.\r\n * DOWN 1 Towards zero.\r\n * CEIL 2 Towards +Infinity.\r\n * FLOOR 3 Towards -Infinity.\r\n * HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n * HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n * HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n * HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n * HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n */\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether BigNumber Errors are ever thrown.\r\n ERRORS = true, // true or false\r\n\r\n // Change to intValidatorNoErrors if ERRORS is false.\r\n isValidInt = intValidatorWithErrors, // intValidatorWithErrors/intValidatorNoErrors\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n /*\r\n * The modulo mode used when calculating the modulus: a mod n.\r\n * The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n * The remainder (r) is calculated as: r = a - n * q.\r\n *\r\n * UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n * DOWN 1 The remainder has the same sign as the dividend.\r\n * This modulo mode is commonly known as 'truncated division' and is\r\n * equivalent to (a % n) in JavaScript.\r\n * FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n * HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n * EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n * The remainder is always positive.\r\n *\r\n * The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n * modes are commonly used for the modulus operation.\r\n * Although the other rounding modes can also be used, they may not give useful results.\r\n */\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the toPower operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 0, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n decimalSeparator: '.',\r\n groupSeparator: ',',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n fractionGroupSize: 0\r\n };\r\n\r\n\r\n /******************************************************************************************/\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * n {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of n. Integer, 2 to 64 inclusive.\r\n */\r\n function BigNumber( n, b ) {\r\n var c, e, i, num, len, str,\r\n x = this;\r\n\r\n // Enable constructor usage without new.\r\n if ( !( x instanceof BigNumber ) ) {\r\n\r\n // 'BigNumber() constructor call without new: {n}'\r\n if (ERRORS) raise( 26, 'constructor call without new', n );\r\n return new BigNumber( n, b );\r\n }\r\n\r\n // 'new BigNumber() base not an integer: {b}'\r\n // 'new BigNumber() base out of range: {b}'\r\n if ( b == null || !isValidInt( b, 2, 64, id, 'base' ) ) {\r\n\r\n // Duplicate.\r\n if ( n instanceof BigNumber ) {\r\n x.s = n.s;\r\n x.e = n.e;\r\n x.c = ( n = n.c ) ? n.slice() : n;\r\n id = 0;\r\n return;\r\n }\r\n\r\n if ( ( num = typeof n == 'number' ) && n * 0 == 0 ) {\r\n x.s = 1 / n < 0 ? ( n = -n, -1 ) : 1;\r\n\r\n // Fast path for integers.\r\n if ( n === ~~n ) {\r\n for ( e = 0, i = n; i >= 10; i /= 10, e++ );\r\n x.e = e;\r\n x.c = [n];\r\n id = 0;\r\n return;\r\n }\r\n\r\n str = n + '';\r\n } else {\r\n if ( !isNumeric.test( str = n + '' ) ) return parseNumeric( x, str, num );\r\n x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1;\r\n }\r\n } else {\r\n b = b | 0;\r\n str = n + '';\r\n\r\n // Ensure return value is rounded to DECIMAL_PLACES as with other bases.\r\n // Allow exponential notation to be used with base 10 argument.\r\n if ( b == 10 ) {\r\n x = new BigNumber( n instanceof BigNumber ? n : str );\r\n return round( x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE );\r\n }\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n // Any number in exponential form will fail due to the [Ee][+-].\r\n if ( ( num = typeof n == 'number' ) && n * 0 != 0 ||\r\n !( new RegExp( '^-?' + ( c = '[' + ALPHABET.slice( 0, b ) + ']+' ) +\r\n '(?:\\\\.' + c + ')?$',b < 37 ? 'i' : '' ) ).test(str) ) {\r\n return parseNumeric( x, str, num, b );\r\n }\r\n\r\n if (num) {\r\n x.s = 1 / n < 0 ? ( str = str.slice(1), -1 ) : 1;\r\n\r\n if ( ERRORS && str.replace( /^0\\.0*|\\./, '' ).length > 15 ) {\r\n\r\n // 'new BigNumber() number type has more than 15 significant digits: {n}'\r\n raise( id, tooManyDigits, n );\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n num = false;\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1;\r\n }\r\n\r\n str = convertBase( str, 10, b, x.s );\r\n }\r\n\r\n // Decimal point?\r\n if ( ( e = str.indexOf('.') ) > -1 ) str = str.replace( '.', '' );\r\n\r\n // Exponential form?\r\n if ( ( i = str.search( /e/i ) ) > 0 ) {\r\n\r\n // Determine exponent.\r\n if ( e < 0 ) e = i;\r\n e += +str.slice( i + 1 );\r\n str = str.substring( 0, i );\r\n } else if ( e < 0 ) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for ( i = 0; str.charCodeAt(i) === 48; i++ );\r\n\r\n // Determine trailing zeros.\r\n for ( len = str.length; str.charCodeAt(--len) === 48; );\r\n str = str.slice( i, len + 1 );\r\n\r\n if (str) {\r\n len = str.length;\r\n\r\n // Disallow numbers with over 15 significant digits if number type.\r\n // 'new BigNumber() number type has more than 15 significant digits: {n}'\r\n if ( num && ERRORS && len > 15 && ( n > MAX_SAFE_INTEGER || n !== mathfloor(n) ) ) {\r\n raise( id, tooManyDigits, x.s * n );\r\n }\r\n\r\n e = e - i - 1;\r\n\r\n // Overflow?\r\n if ( e > MAX_EXP ) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if ( e < MIN_EXP ) {\r\n\r\n // Zero.\r\n x.c = [ x.e = 0 ];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = ( e + 1 ) % LOG_BASE;\r\n if ( e < 0 ) i += LOG_BASE;\r\n\r\n if ( i < len ) {\r\n if (i) x.c.push( +str.slice( 0, i ) );\r\n\r\n for ( len -= LOG_BASE; i < len; ) {\r\n x.c.push( +str.slice( i, i += LOG_BASE ) );\r\n }\r\n\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for ( ; i--; str += '0' );\r\n x.c.push( +str );\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [ x.e = 0 ];\r\n }\r\n\r\n id = 0;\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.another = constructorFactory;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object or an argument list, with one or many of the following properties or\r\n * parameters respectively:\r\n *\r\n * DECIMAL_PLACES {number} Integer, 0 to MAX inclusive\r\n * ROUNDING_MODE {number} Integer, 0 to 8 inclusive\r\n * EXPONENTIAL_AT {number|number[]} Integer, -MAX to MAX inclusive or\r\n * [integer -MAX to 0 incl., 0 to MAX incl.]\r\n * RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n * [integer -MAX to -1 incl., integer 1 to MAX incl.]\r\n * ERRORS {boolean|number} true, false, 1 or 0\r\n * CRYPTO {boolean|number} true, false, 1 or 0\r\n * MODULO_MODE {number} 0 to 9 inclusive\r\n * POW_PRECISION {number} 0 to MAX inclusive\r\n * FORMAT {object} See BigNumber.prototype.toFormat\r\n * decimalSeparator {string}\r\n * groupSeparator {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * fractionGroupSize {number}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config(20, 4) is equivalent to\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined.\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = BigNumber.set = function () {\r\n var v, p,\r\n i = 0,\r\n r = {},\r\n a = arguments,\r\n o = a[0],\r\n has = o && typeof o == 'object'\r\n ? function () { if ( o.hasOwnProperty(p) ) return ( v = o[p] ) != null; }\r\n : function () { if ( a.length > i ) return ( v = a[i++] ) != null; };\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // 'config() DECIMAL_PLACES not an integer: {v}'\r\n // 'config() DECIMAL_PLACES out of range: {v}'\r\n if ( has( p = 'DECIMAL_PLACES' ) && isValidInt( v, 0, MAX, 2, p ) ) {\r\n DECIMAL_PLACES = v | 0;\r\n }\r\n r[p] = DECIMAL_PLACES;\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // 'config() ROUNDING_MODE not an integer: {v}'\r\n // 'config() ROUNDING_MODE out of range: {v}'\r\n if ( has( p = 'ROUNDING_MODE' ) && isValidInt( v, 0, 8, 2, p ) ) {\r\n ROUNDING_MODE = v | 0;\r\n }\r\n r[p] = ROUNDING_MODE;\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // 'config() EXPONENTIAL_AT not an integer: {v}'\r\n // 'config() EXPONENTIAL_AT out of range: {v}'\r\n if ( has( p = 'EXPONENTIAL_AT' ) ) {\r\n\r\n if ( isArray(v) ) {\r\n if ( isValidInt( v[0], -MAX, 0, 2, p ) && isValidInt( v[1], 0, MAX, 2, p ) ) {\r\n TO_EXP_NEG = v[0] | 0;\r\n TO_EXP_POS = v[1] | 0;\r\n }\r\n } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) {\r\n TO_EXP_NEG = -( TO_EXP_POS = ( v < 0 ? -v : v ) | 0 );\r\n }\r\n }\r\n r[p] = [ TO_EXP_NEG, TO_EXP_POS ];\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // 'config() RANGE not an integer: {v}'\r\n // 'config() RANGE cannot be zero: {v}'\r\n // 'config() RANGE out of range: {v}'\r\n if ( has( p = 'RANGE' ) ) {\r\n\r\n if ( isArray(v) ) {\r\n if ( isValidInt( v[0], -MAX, -1, 2, p ) && isValidInt( v[1], 1, MAX, 2, p ) ) {\r\n MIN_EXP = v[0] | 0;\r\n MAX_EXP = v[1] | 0;\r\n }\r\n } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) {\r\n if ( v | 0 ) MIN_EXP = -( MAX_EXP = ( v < 0 ? -v : v ) | 0 );\r\n else if (ERRORS) raise( 2, p + ' cannot be zero', v );\r\n }\r\n }\r\n r[p] = [ MIN_EXP, MAX_EXP ];\r\n\r\n // ERRORS {boolean|number} true, false, 1 or 0.\r\n // 'config() ERRORS not a boolean or binary digit: {v}'\r\n if ( has( p = 'ERRORS' ) ) {\r\n\r\n if ( v === !!v || v === 1 || v === 0 ) {\r\n id = 0;\r\n isValidInt = ( ERRORS = !!v ) ? intValidatorWithErrors : intValidatorNoErrors;\r\n } else if (ERRORS) {\r\n raise( 2, p + notBool, v );\r\n }\r\n }\r\n r[p] = ERRORS;\r\n\r\n // CRYPTO {boolean|number} true, false, 1 or 0.\r\n // 'config() CRYPTO not a boolean or binary digit: {v}'\r\n // 'config() crypto unavailable: {crypto}'\r\n if ( has( p = 'CRYPTO' ) ) {\r\n\r\n if ( v === true || v === false || v === 1 || v === 0 ) {\r\n if (v) {\r\n v = typeof crypto == 'undefined';\r\n if ( !v && crypto && (crypto.getRandomValues || crypto.randomBytes)) {\r\n CRYPTO = true;\r\n } else if (ERRORS) {\r\n raise( 2, 'crypto unavailable', v ? void 0 : crypto );\r\n } else {\r\n CRYPTO = false;\r\n }\r\n } else {\r\n CRYPTO = false;\r\n }\r\n } else if (ERRORS) {\r\n raise( 2, p + notBool, v );\r\n }\r\n }\r\n r[p] = CRYPTO;\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // 'config() MODULO_MODE not an integer: {v}'\r\n // 'config() MODULO_MODE out of range: {v}'\r\n if ( has( p = 'MODULO_MODE' ) && isValidInt( v, 0, 9, 2, p ) ) {\r\n MODULO_MODE = v | 0;\r\n }\r\n r[p] = MODULO_MODE;\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // 'config() POW_PRECISION not an integer: {v}'\r\n // 'config() POW_PRECISION out of range: {v}'\r\n if ( has( p = 'POW_PRECISION' ) && isValidInt( v, 0, MAX, 2, p ) ) {\r\n POW_PRECISION = v | 0;\r\n }\r\n r[p] = POW_PRECISION;\r\n\r\n // FORMAT {object}\r\n // 'config() FORMAT not an object: {v}'\r\n if ( has( p = 'FORMAT' ) ) {\r\n\r\n if ( typeof v == 'object' ) {\r\n FORMAT = v;\r\n } else if (ERRORS) {\r\n raise( 2, p + ' not an object', v );\r\n }\r\n }\r\n r[p] = FORMAT;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.max = function () { return maxOrMin( arguments, P.lt ); };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.min = function () { return maxOrMin( arguments, P.gt ); };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * 'random() decimal places not an integer: {dp}'\r\n * 'random() decimal places out of range: {dp}'\r\n * 'random() crypto unavailable: {crypto}'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor( Math.random() * pow2_53 ); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n dp = dp == null || !isValidInt( dp, 0, MAX, 14 ) ? DECIMAL_PLACES : dp | 0;\r\n k = mathceil( dp / LOG_BASE );\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if (crypto.getRandomValues) {\r\n\r\n a = crypto.getRandomValues( new Uint32Array( k *= 2 ) );\r\n\r\n for ( ; i < k; ) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if ( v >= 9e15 ) {\r\n b = crypto.getRandomValues( new Uint32Array(2) );\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push( v % 1e14 );\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n a = crypto.randomBytes( k *= 7 );\r\n\r\n for ( ; i < k; ) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ( ( a[i] & 31 ) * 0x1000000000000 ) + ( a[i + 1] * 0x10000000000 ) +\r\n ( a[i + 2] * 0x100000000 ) + ( a[i + 3] * 0x1000000 ) +\r\n ( a[i + 4] << 16 ) + ( a[i + 5] << 8 ) + a[i + 6];\r\n\r\n if ( v >= 9e15 ) {\r\n crypto.randomBytes(7).copy( a, i );\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push( v % 1e14 );\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else {\r\n CRYPTO = false;\r\n if (ERRORS) raise( 14, 'crypto unavailable', crypto );\r\n }\r\n }\r\n\r\n // Use Math.random.\r\n if (!CRYPTO) {\r\n\r\n for ( ; i < k; ) {\r\n v = random53bitInt();\r\n if ( v < 9e15 ) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if ( k && dp ) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor( k / v ) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for ( ; c[i] === 0; c.pop(), i-- );\r\n\r\n // Zero?\r\n if ( i < 0 ) {\r\n c = [ e = 0 ];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for ( e = -1 ; c[0] === 0; c.splice(0, 1), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for ( i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if ( i < LOG_BASE ) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n function convertBase( str, baseOut, baseIn, sign ) {\r\n var d, e, k, r, x, xc, y,\r\n i = str.indexOf( '.' ),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n if ( baseIn < 37 ) str = str.toLowerCase();\r\n\r\n // Non-integer.\r\n if ( i >= 0 ) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace( '.', '' );\r\n y = new BigNumber(baseIn);\r\n x = y.pow( str.length - i );\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n y.c = toBaseOut( toFixedPoint( coeffToString( x.c ), x.e ), 10, baseOut );\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n xc = toBaseOut( str, baseIn, baseOut );\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for ( ; xc[--k] == 0; xc.pop() );\r\n if ( !xc[0] ) return '0';\r\n\r\n if ( i < 0 ) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div( x, y, dp, rm, baseOut );\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n d = e + dp + 1;\r\n\r\n // The rounding digit, i.e. the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? ( i != null || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) )\r\n : i > k || i == k &&( rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == ( x.s < 0 ? 8 : 7 ) );\r\n\r\n if ( d < 1 || !xc[0] ) {\r\n\r\n // 1^-dp or 0.\r\n str = r ? toFixedPoint( '1', -dp ) : '0';\r\n } else {\r\n xc.length = d;\r\n\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for ( --baseOut; ++xc[--d] > baseOut; ) {\r\n xc[d] = 0;\r\n\r\n if ( !d ) {\r\n ++e;\r\n xc = [1].concat(xc);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for ( k = xc.length; !xc[--k]; );\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for ( i = 0, str = ''; i <= k; str += ALPHABET.charAt( xc[i++] ) );\r\n str = toFixedPoint( str, e );\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n }\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply( x, k, base ) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for ( x = x.slice(); i--; ) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ( ( m % SQRT_BASE ) * SQRT_BASE ) + carry;\r\n carry = ( temp / base | 0 ) + ( m / SQRT_BASE | 0 ) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x = [carry].concat(x);\r\n\r\n return x;\r\n }\r\n\r\n function compare( a, b, aL, bL ) {\r\n var i, cmp;\r\n\r\n if ( aL != bL ) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for ( i = cmp = 0; i < aL; i++ ) {\r\n\r\n if ( a[i] != b[i] ) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n return cmp;\r\n }\r\n\r\n function subtract( a, b, aL, base ) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for ( ; aL--; ) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for ( ; !a[0] && a.length > 1; a.splice(0, 1) );\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function ( x, y, dp, rm, base ) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if ( !xc || !xc[0] || !yc || !yc[0] ) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || ( xc ? yc && xc[0] == yc[0] : !yc ) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if ( !base ) {\r\n base = BASE;\r\n e = bitFloor( x.e / LOG_BASE ) - bitFloor( y.e / LOG_BASE );\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for ( i = 0; yc[i] == ( xc[i] || 0 ); i++ );\r\n if ( yc[i] > ( xc[i] || 0 ) ) e--;\r\n\r\n if ( s < 0 ) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor( base / ( yc[0] + 1 ) );\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == ( base / 2 ) - 1.\r\n // if ( n > 1 || n++ == 1 && yc[0] < base / 2 ) {\r\n if ( n > 1 ) {\r\n yc = multiply( yc, n, base );\r\n xc = multiply( xc, n, base );\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice( 0, yL );\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for ( ; remL < yL; rem[remL++] = 0 );\r\n yz = yc.slice();\r\n yz = [0].concat(yz);\r\n yc0 = yc[0];\r\n if ( yc[1] >= base / 2 ) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if ( base == 3 && yc0 == 1 ) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare( yc, rem, yL, remL );\r\n\r\n // If divisor < remainder.\r\n if ( cmp < 0 ) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if ( yL != remL ) rem0 = rem0 * base + ( rem[1] || 0 );\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor( rem0 / yc0 );\r\n\r\n // Algorithm:\r\n // 1. product = divisor * trial digit (n)\r\n // 2. if product > remainder: product -= divisor, n--\r\n // 3. remainder -= product\r\n // 4. if product was < remainder at 2:\r\n // 5. compare new remainder and divisor\r\n // 6. If remainder > divisor: remainder -= divisor, n++\r\n\r\n if ( n > 1 ) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply( yc, n, base );\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder.\r\n // Trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while ( compare( prod, rem, prodL, remL ) == 1 ) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract( prod, yL < prodL ? yz : yc, prodL, base );\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if ( n == 0 ) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if ( prodL < remL ) prod = [0].concat(prod);\r\n\r\n // Subtract product from remainder.\r\n subtract( rem, prod, remL, base );\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if ( cmp == -1 ) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while ( compare( yc, rem, yL, remL ) < 1 ) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract( rem, yL < remL ? yz : yc, remL, base );\r\n remL = rem.length;\r\n }\r\n }\r\n } else if ( cmp === 0 ) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if ( rem[0] ) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [ xc[xi] ];\r\n remL = 1;\r\n }\r\n } while ( ( xi++ < xL || rem[0] != null ) && s-- );\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if ( !qc[0] ) qc.splice(0, 1);\r\n }\r\n\r\n if ( base == BASE ) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for ( i = 1, s = qc[0]; s >= 10; s /= 10, i++ );\r\n round( q, dp + ( q.e = i + e * LOG_BASE - 1 ) + 1, rm, more );\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n is a BigNumber.\r\n * i is the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm is the rounding mode.\r\n * caller is caller id: toExponential 19, toFixed 20, toFormat 21, toPrecision 24.\r\n */\r\n function format( n, i, rm, caller ) {\r\n var c0, e, ne, len, str;\r\n\r\n rm = rm != null && isValidInt( rm, 0, 8, caller, roundingMode )\r\n ? rm | 0 : ROUNDING_MODE;\r\n\r\n if ( !n.c ) return n.toString();\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if ( i == null ) {\r\n str = coeffToString( n.c );\r\n str = caller == 19 || caller == 24 && ne <= TO_EXP_NEG\r\n ? toExponential( str, ne )\r\n : toFixedPoint( str, ne );\r\n } else {\r\n n = round( new BigNumber(n), i, rm );\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString( n.c );\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if ( caller == 19 || caller == 24 && ( i <= e || e <= TO_EXP_NEG ) ) {\r\n\r\n // Append zeros?\r\n for ( ; len < i; str += '0', len++ );\r\n str = toExponential( str, e );\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint( str, e );\r\n\r\n // Append zeros?\r\n if ( e + 1 > len ) {\r\n if ( --i > 0 ) for ( str += '.'; i--; str += '0' );\r\n } else {\r\n i += e - len;\r\n if ( i > 0 ) {\r\n if ( e + 1 == len ) str += '.';\r\n for ( ; i--; str += '0' );\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n function maxOrMin( args, method ) {\r\n var m, n,\r\n i = 0;\r\n\r\n if ( isArray( args[0] ) ) args = args[0];\r\n m = new BigNumber( args[0] );\r\n\r\n for ( ; ++i < args.length; ) {\r\n n = new BigNumber( args[i] );\r\n\r\n // If any number is NaN, return NaN.\r\n if ( !n.s ) {\r\n m = n;\r\n break;\r\n } else if ( method.call( m, n ) ) {\r\n m = n;\r\n }\r\n }\r\n\r\n return m;\r\n }\r\n\r\n\r\n /*\r\n * Return true if n is an integer in range, otherwise throw.\r\n * Use for argument validation when ERRORS is true.\r\n */\r\n function intValidatorWithErrors( n, min, max, caller, name ) {\r\n if ( n < min || n > max || n != truncate(n) ) {\r\n raise( caller, ( name || 'decimal places' ) +\r\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n }\r\n\r\n return true;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise( n, c, e ) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for ( ; !c[--j]; c.pop() );\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for ( j = c[0]; j >= 10; j /= 10, i++ );\r\n\r\n // Overflow?\r\n if ( ( e = i + e * LOG_BASE - 1 ) > MAX_EXP ) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if ( e < MIN_EXP ) {\r\n\r\n // Zero.\r\n n.c = [ n.e = 0 ];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function ( x, str, num, b ) {\r\n var base,\r\n s = num ? str : str.replace( whitespaceOrPlus, '' );\r\n\r\n // No exception on ±Infinity or NaN.\r\n if ( isInfinityOrNaN.test(s) ) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if ( !num ) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace( basePrefix, function ( m, p1, p2 ) {\r\n base = ( p2 = p2.toLowerCase() ) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace( dotAfter, '$1' ).replace( dotBefore, '0.$1' );\r\n }\r\n\r\n if ( str != s ) return new BigNumber( s, base );\r\n }\r\n\r\n // 'new BigNumber() not a number: {n}'\r\n // 'new BigNumber() not a base {b} number: {n}'\r\n if (ERRORS) raise( id, 'not a' + ( b ? ' base ' + b : '' ) + ' number', str );\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n id = 0;\r\n }\r\n })();\r\n\r\n\r\n // Throw a BigNumber Error.\r\n function raise( caller, msg, val ) {\r\n var error = new Error( [\r\n 'new BigNumber', // 0\r\n 'cmp', // 1\r\n 'config', // 2\r\n 'div', // 3\r\n 'divToInt', // 4\r\n 'eq', // 5\r\n 'gt', // 6\r\n 'gte', // 7\r\n 'lt', // 8\r\n 'lte', // 9\r\n 'minus', // 10\r\n 'mod', // 11\r\n 'plus', // 12\r\n 'precision', // 13\r\n 'random', // 14\r\n 'round', // 15\r\n 'shift', // 16\r\n 'times', // 17\r\n 'toDigits', // 18\r\n 'toExponential', // 19\r\n 'toFixed', // 20\r\n 'toFormat', // 21\r\n 'toFraction', // 22\r\n 'pow', // 23\r\n 'toPrecision', // 24\r\n 'toString', // 25\r\n 'BigNumber' // 26\r\n ][caller] + '() ' + msg + ': ' + val );\r\n\r\n error.name = 'BigNumber Error';\r\n id = 0;\r\n throw error;\r\n }\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round( x, sd, rm, r ) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for ( d = 1, k = xc[0]; k >= 10; k /= 10, d++ );\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if ( i < 0 ) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ ni = 0 ];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = n / pows10[ d - j - 1 ] % 10 | 0;\r\n } else {\r\n ni = mathceil( ( i + 1 ) / LOG_BASE );\r\n\r\n if ( ni >= xc.length ) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for ( ; xc.length <= ni; xc.push(0) );\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for ( d = 1; k >= 10; k /= 10, d++ );\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : n / pows10[ d - j - 1 ] % 10 | 0;\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[ d - j - 1 ] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || ( j < 0 ? n : n % pows10[ d - j - 1 ] );\r\n\r\n r = rm < 4\r\n ? ( rd || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) )\r\n : rd > 5 || rd == 5 && ( rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ( ( i > 0 ? j > 0 ? n / pows10[ d - j ] : 0 : xc[ni - 1] ) % 10 ) & 1 ||\r\n rm == ( x.s < 0 ? 8 : 7 ) );\r\n\r\n if ( sd < 1 || !xc[0] ) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[ ( LOG_BASE - sd % LOG_BASE ) % LOG_BASE ];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if ( i == 0 ) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[ LOG_BASE - i ];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor( n / pows10[ d - j ] % pows10[j] ) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for ( ; ; ) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if ( ni == 0 ) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for ( i = 1, j = xc[0]; j >= 10; j /= 10, i++ );\r\n j = xc[0] += k;\r\n for ( k = 1; j >= 10; j /= 10, k++ );\r\n\r\n // if i != k the length has increased.\r\n if ( i != k ) {\r\n x.e++;\r\n if ( xc[0] == BASE ) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if ( xc[ni] != BASE ) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for ( i = xc.length; xc[--i] === 0; xc.pop() );\r\n }\r\n\r\n // Overflow? Infinity.\r\n if ( x.e > MAX_EXP ) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if ( x.e < MIN_EXP ) {\r\n x.c = [ x.e = 0 ];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if ( x.s < 0 ) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole\r\n * number in the direction of Infinity.\r\n */\r\n P.ceil = function () {\r\n return round( new BigNumber(this), this.e + 1, 2 );\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = P.cmp = function ( y, b ) {\r\n id = 1;\r\n return compare( this, new BigNumber( y, b ) );\r\n };\r\n\r\n\r\n /*\r\n * Return the number of decimal places of the value of this BigNumber, or null if the value\r\n * of this BigNumber is ±Infinity or NaN.\r\n */\r\n P.decimalPlaces = P.dp = function () {\r\n var n, v,\r\n c = this.c;\r\n\r\n if ( !c ) return null;\r\n n = ( ( v = c.length - 1 ) - bitFloor( this.e / LOG_BASE ) ) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if ( v = c[v] ) for ( ; v % 10 == 0; v /= 10, n-- );\r\n if ( n < 0 ) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function ( y, b ) {\r\n id = 3;\r\n return div( this, new BigNumber( y, b ), DECIMAL_PLACES, ROUNDING_MODE );\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.divToInt = function ( y, b ) {\r\n id = 4;\r\n return div( this, new BigNumber( y, b ), 0, 1 );\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise returns false.\r\n */\r\n P.equals = P.eq = function ( y, b ) {\r\n id = 5;\r\n return compare( this, new BigNumber( y, b ) ) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole\r\n * number in the direction of -Infinity.\r\n */\r\n P.floor = function () {\r\n return round( new BigNumber(this), this.e + 1, 3 );\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise returns false.\r\n */\r\n P.greaterThan = P.gt = function ( y, b ) {\r\n id = 6;\r\n return compare( this, new BigNumber( y, b ) ) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise returns false.\r\n */\r\n P.greaterThanOrEqualTo = P.gte = function ( y, b ) {\r\n id = 7;\r\n return ( b = compare( this, new BigNumber( y, b ) ) ) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise returns false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = P.isInt = function () {\r\n return !!this.c && bitFloor( this.e / LOG_BASE ) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise returns false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise returns false.\r\n */\r\n P.isNegative = P.isNeg = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise returns false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise returns false.\r\n */\r\n P.lessThan = P.lt = function ( y, b ) {\r\n id = 8;\r\n return compare( this, new BigNumber( y, b ) ) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise returns false.\r\n */\r\n P.lessThanOrEqualTo = P.lte = function ( y, b ) {\r\n id = 9;\r\n return ( b = compare( this, new BigNumber( y, b ) ) ) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = P.sub = function ( y, b ) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n id = 10;\r\n y = new BigNumber( y, b );\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if ( !a || !b ) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if ( a != b ) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if ( !xe || !ye ) {\r\n\r\n // Either Infinity?\r\n if ( !xc || !yc ) return xc ? ( y.s = -b, y ) : new BigNumber( yc ? x : NaN );\r\n\r\n // Either zero?\r\n if ( !xc[0] || !yc[0] ) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? ( y.s = -b, y ) : new BigNumber( xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0 );\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if ( a = xe - ye ) {\r\n\r\n if ( xLTy = a < 0 ) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for ( b = a; b--; t.push(0) );\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = ( xLTy = ( a = xc.length ) < ( b = yc.length ) ) ? a : b;\r\n\r\n for ( a = b = 0; b < j; b++ ) {\r\n\r\n if ( xc[b] != yc[b] ) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;\r\n\r\n b = ( j = yc.length ) - ( i = xc.length );\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if ( b > 0 ) for ( ; b--; xc[i++] = 0 );\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for ( ; j > a; ) {\r\n\r\n if ( xc[--j] < yc[j] ) {\r\n for ( i = j; i && !xc[--i]; xc[i] = b );\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for ( ; xc[0] == 0; xc.splice(0, 1), --ye );\r\n\r\n // Zero?\r\n if ( !xc[0] ) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [ y.e = 0 ];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise( y, xc, ye );\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function ( y, b ) {\r\n var q, s,\r\n x = this;\r\n\r\n id = 11;\r\n y = new BigNumber( y, b );\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if ( !x.c || !y.s || y.c && !y.c[0] ) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if ( !y.c || x.c && !x.c[0] ) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if ( MODULO_MODE == 9 ) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div( x, y, 0, 3 );\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div( x, y, 0, MODULO_MODE );\r\n }\r\n\r\n return x.minus( q.times(y) );\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = P.neg = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = P.add = function ( y, b ) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n id = 12;\r\n y = new BigNumber( y, b );\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if ( !a || !b ) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if ( a != b ) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if ( !xe || !ye ) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if ( !xc || !yc ) return new BigNumber( a / 0 );\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if ( !xc[0] || !yc[0] ) return yc[0] ? y : new BigNumber( xc[0] ? x : a * 0 );\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if ( a = xe - ye ) {\r\n if ( a > 0 ) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for ( ; a--; t.push(0) );\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if ( a - b < 0 ) t = yc, yc = xc, xc = t, b = a;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for ( a = 0; b; ) {\r\n a = ( xc[--b] = xc[b] + yc[b] + a ) / BASE | 0;\r\n xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;\r\n }\r\n\r\n if (a) {\r\n xc = [a].concat(xc);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise( y, xc, ye );\r\n };\r\n\r\n\r\n /*\r\n * Return the number of significant digits of the value of this BigNumber.\r\n *\r\n * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.\r\n */\r\n P.precision = P.sd = function (z) {\r\n var n, v,\r\n x = this,\r\n c = x.c;\r\n\r\n // 'precision() argument not a boolean or binary digit: {z}'\r\n if ( z != null && z !== !!z && z !== 1 && z !== 0 ) {\r\n if (ERRORS) raise( 13, 'argument' + notBool, z );\r\n if ( z != !!z ) z = null;\r\n }\r\n\r\n if ( !c ) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if ( v = c[v] ) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for ( ; v % 10 == 0; v /= 10, n-- );\r\n\r\n // Add the number of digits of the first element.\r\n for ( v = c[0]; v >= 10; v /= 10, n++ );\r\n }\r\n\r\n if ( z && x.e + 1 > n ) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of\r\n * dp decimal places using rounding mode rm, or to 0 and ROUNDING_MODE respectively if\r\n * omitted.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'round() decimal places out of range: {dp}'\r\n * 'round() decimal places not an integer: {dp}'\r\n * 'round() rounding mode not an integer: {rm}'\r\n * 'round() rounding mode out of range: {rm}'\r\n */\r\n P.round = function ( dp, rm ) {\r\n var n = new BigNumber(this);\r\n\r\n if ( dp == null || isValidInt( dp, 0, MAX, 15 ) ) {\r\n round( n, ~~dp + this.e + 1, rm == null ||\r\n !isValidInt( rm, 0, 8, 15, roundingMode ) ? ROUNDING_MODE : rm | 0 );\r\n }\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * If k is out of range and ERRORS is false, the result will be ±0 if k < 0, or ±Infinity\r\n * otherwise.\r\n *\r\n * 'shift() argument not an integer: {k}'\r\n * 'shift() argument out of range: {k}'\r\n */\r\n P.shift = function (k) {\r\n var n = this;\r\n return isValidInt( k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 16, 'argument' )\r\n\r\n // k < 1e+21, or truncate(k) will produce exponential notation.\r\n ? n.times( '1e' + truncate(k) )\r\n : new BigNumber( n.c && n.c[0] && ( k < -MAX_SAFE_INTEGER || k > MAX_SAFE_INTEGER )\r\n ? n.s * ( k < 0 ? 0 : 1 / 0 )\r\n : n );\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt( N) = N\r\n * sqrt(-I) = N\r\n * sqrt( I) = I\r\n * sqrt( 0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if ( s !== 1 || !c || !c[0] ) {\r\n return new BigNumber( !s || s < 0 && ( !c || c[0] ) ? NaN : c ? x : 1 / 0 );\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt( +x );\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if ( s == 0 || s == 1 / 0 ) {\r\n n = coeffToString(c);\r\n if ( ( n.length + e ) % 2 == 0 ) n += '0';\r\n s = Math.sqrt(n);\r\n e = bitFloor( ( e + 1 ) / 2 ) - ( e < 0 || e % 2 );\r\n\r\n if ( s == 1 / 0 ) {\r\n n = '1e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice( 0, n.indexOf('e') + 1 ) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber( s + '' );\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if ( r.c[0] ) {\r\n e = r.e;\r\n s = e + dp;\r\n if ( s < 3 ) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for ( ; ; ) {\r\n t = r;\r\n r = half.times( t.plus( div( x, t, dp, 1 ) ) );\r\n\r\n if ( coeffToString( t.c ).slice( 0, s ) === ( n =\r\n coeffToString( r.c ) ).slice( 0, s ) ) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if ( r.e < e ) --s;\r\n n = n.slice( s - 3, s + 1 );\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if ( n == '9999' || !rep && n == '4999' ) {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if ( !rep ) {\r\n round( t, t.e + DECIMAL_PLACES + 2, 0 );\r\n\r\n if ( t.times(t).eq(x) ) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if ( !+n || !+n.slice(1) && n.charAt(0) == '5' ) {\r\n\r\n // Truncate to the first rounding digit.\r\n round( r, r.e + DECIMAL_PLACES + 2, 1 );\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round( r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m );\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber times the value of\r\n * BigNumber(y, b).\r\n */\r\n P.times = P.mul = function ( y, b ) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = ( id = 17, y = new BigNumber( y, b ) ).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if ( !xc || !yc || !xc[0] || !yc[0] ) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if ( !x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc ) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if ( !xc || !yc ) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor( x.e / LOG_BASE ) + bitFloor( y.e / LOG_BASE );\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if ( xcL < ycL ) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;\r\n\r\n // Initialise the result array with zeros.\r\n for ( i = xcL + ycL, zc = []; i--; zc.push(0) );\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for ( i = ycL; --i >= 0; ) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for ( k = xcL, j = i + k; j > i; ) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ( ( m % sqrtBase ) * sqrtBase ) + zc[j] + c;\r\n c = ( xlo / base | 0 ) + ( m / sqrtBase | 0 ) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.splice(0, 1);\r\n }\r\n\r\n return normalise( y, zc, e );\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of\r\n * sd significant digits using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toDigits() precision out of range: {sd}'\r\n * 'toDigits() precision not an integer: {sd}'\r\n * 'toDigits() rounding mode not an integer: {rm}'\r\n * 'toDigits() rounding mode out of range: {rm}'\r\n */\r\n P.toDigits = function ( sd, rm ) {\r\n var n = new BigNumber(this);\r\n sd = sd == null || !isValidInt( sd, 1, MAX, 18, 'precision' ) ? null : sd | 0;\r\n rm = rm == null || !isValidInt( rm, 0, 8, 18, roundingMode ) ? ROUNDING_MODE : rm | 0;\r\n return sd ? round( n, sd, rm ) : n;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toExponential() decimal places not an integer: {dp}'\r\n * 'toExponential() decimal places out of range: {dp}'\r\n * 'toExponential() rounding mode not an integer: {rm}'\r\n * 'toExponential() rounding mode out of range: {rm}'\r\n */\r\n P.toExponential = function ( dp, rm ) {\r\n return format( this,\r\n dp != null && isValidInt( dp, 0, MAX, 19 ) ? ~~dp + 1 : null, rm, 19 );\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toFixed() decimal places not an integer: {dp}'\r\n * 'toFixed() decimal places out of range: {dp}'\r\n * 'toFixed() rounding mode not an integer: {rm}'\r\n * 'toFixed() rounding mode out of range: {rm}'\r\n */\r\n P.toFixed = function ( dp, rm ) {\r\n return format( this, dp != null && isValidInt( dp, 0, MAX, 20 )\r\n ? ~~dp + this.e + 1 : null, rm, 20 );\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the FORMAT object (see BigNumber.config).\r\n *\r\n * FORMAT = {\r\n * decimalSeparator : '.',\r\n * groupSeparator : ',',\r\n * groupSize : 3,\r\n * secondaryGroupSize : 0,\r\n * fractionGroupSeparator : '\\xA0', // non-breaking space\r\n * fractionGroupSize : 0\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toFormat() decimal places not an integer: {dp}'\r\n * 'toFormat() decimal places out of range: {dp}'\r\n * 'toFormat() rounding mode not an integer: {rm}'\r\n * 'toFormat() rounding mode out of range: {rm}'\r\n */\r\n P.toFormat = function ( dp, rm ) {\r\n var str = format( this, dp != null && isValidInt( dp, 0, MAX, 21 )\r\n ? ~~dp + this.e + 1 : null, rm, 21 );\r\n\r\n if ( this.c ) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +FORMAT.groupSize,\r\n g2 = +FORMAT.secondaryGroupSize,\r\n groupSeparator = FORMAT.groupSeparator,\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = this.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) i = g1, g1 = g2, g2 = i, len -= i;\r\n\r\n if ( g1 > 0 && len > 0 ) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr( 0, i );\r\n\r\n for ( ; i < len; i += g1 ) {\r\n intPart += groupSeparator + intDigits.substr( i, g1 );\r\n }\r\n\r\n if ( g2 > 0 ) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + FORMAT.decimalSeparator + ( ( g2 = +FORMAT.fractionGroupSize )\r\n ? fractionPart.replace( new RegExp( '\\\\d{' + g2 + '}\\\\B', 'g' ),\r\n '$&' + FORMAT.fractionGroupSeparator )\r\n : fractionPart )\r\n : intPart;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return a string array representing the value of this BigNumber as a simple fraction with\r\n * an integer numerator and an integer denominator. The denominator will be a positive\r\n * non-zero value less than or equal to the specified maximum denominator. If a maximum\r\n * denominator is not specified, the denominator will be the lowest value necessary to\r\n * represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1 and < Infinity. The maximum denominator.\r\n *\r\n * 'toFraction() max denominator not an integer: {md}'\r\n * 'toFraction() max denominator out of range: {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var arr, d0, d2, e, exp, n, n0, q, s,\r\n k = ERRORS,\r\n x = this,\r\n xc = x.c,\r\n d = new BigNumber(ONE),\r\n n1 = d0 = new BigNumber(ONE),\r\n d1 = n0 = new BigNumber(ONE);\r\n\r\n if ( md != null ) {\r\n ERRORS = false;\r\n n = new BigNumber(md);\r\n ERRORS = k;\r\n\r\n if ( !( k = n.isInt() ) || n.lt(ONE) ) {\r\n\r\n if (ERRORS) {\r\n raise( 22,\r\n 'max denominator ' + ( k ? 'out of range' : 'not an integer' ), md );\r\n }\r\n\r\n // ERRORS is false:\r\n // If md is a finite non-integer >= 1, round it to an integer and use it.\r\n md = !k && n.c && round( n, n.e + 1, 1 ).gte(ONE) ? n : null;\r\n }\r\n }\r\n\r\n if ( !xc ) return x.toString();\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[ ( exp = e % LOG_BASE ) < 0 ? LOG_BASE + exp : exp ];\r\n md = !md || n.cmp(d) > 0 ? ( e > 0 ? d : n1 ) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for ( ; ; ) {\r\n q = div( n, d, 0, 1 );\r\n d2 = d0.plus( q.times(d1) );\r\n if ( d2.cmp(md) == 1 ) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus( q.times( d2 = n1 ) );\r\n n0 = d2;\r\n d = n.minus( q.times( d2 = d ) );\r\n n = d2;\r\n }\r\n\r\n d2 = div( md.minus(d0), d1, 0, 1 );\r\n n0 = n0.plus( d2.times(n1) );\r\n d0 = d0.plus( d2.times(d1) );\r\n n0.s = n1.s = x.s;\r\n e *= 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n arr = div( n1, d1, e, ROUNDING_MODE ).minus(x).abs().cmp(\r\n div( n0, d0, e, ROUNDING_MODE ).minus(x).abs() ) < 1\r\n ? [ n1.toString(), d1.toString() ]\r\n : [ n0.toString(), d0.toString() ];\r\n\r\n MAX_EXP = exp;\r\n return arr;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +this;\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber raised to the power n.\r\n * If m is present, return the result modulo m.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using\r\n * ROUNDING_MODE.\r\n *\r\n * The modular power operation works efficiently when x, n, and m are positive integers,\r\n * otherwise it is equivalent to calculating x.toPower(n).modulo(m) (with POW_PRECISION 0).\r\n *\r\n * n {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n * [m] {number|string|BigNumber} The modulus.\r\n *\r\n * 'pow() exponent not an integer: {n}'\r\n * 'pow() exponent out of range: {n}'\r\n *\r\n * Performs 54 loop iterations for n of 9007199254740991.\r\n */\r\n P.toPower = P.pow = function ( n, m ) {\r\n var k, y, z,\r\n i = mathfloor( n < 0 ? -n : +n ),\r\n x = this;\r\n\r\n if ( m != null ) {\r\n id = 23;\r\n m = new BigNumber(m);\r\n }\r\n\r\n // Pass ±Infinity to Math.pow if exponent is out of range.\r\n if ( !isValidInt( n, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 23, 'exponent' ) &&\r\n ( !isFinite(n) || i > MAX_SAFE_INTEGER && ( n /= 0 ) ||\r\n parseFloat(n) != n && !( n = NaN ) ) || n == 0 ) {\r\n k = Math.pow( +x, n );\r\n return new BigNumber( m ? k % m : k );\r\n }\r\n\r\n if (m) {\r\n if ( n > 1 && x.gt(ONE) && x.isInt() && m.gt(ONE) && m.isInt() ) {\r\n x = x.mod(m);\r\n } else {\r\n z = m;\r\n\r\n // Nullify m so only a single mod operation is performed at the end.\r\n m = null;\r\n }\r\n } else if (POW_PRECISION) {\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication\r\n // equates to truncating significant digits to POW_PRECISION + [28, 41],\r\n // i.e. there will be a minimum of 28 guard digits retained.\r\n // (Using + 1.5 would give [9, 21] guard digits.)\r\n k = mathceil( POW_PRECISION / LOG_BASE + 2 );\r\n }\r\n\r\n y = new BigNumber(ONE);\r\n\r\n for ( ; ; ) {\r\n if ( i % 2 ) {\r\n y = y.times(x);\r\n if ( !y.c ) break;\r\n if (k) {\r\n if ( y.c.length > k ) y.c.length = k;\r\n } else if (m) {\r\n y = y.mod(m);\r\n }\r\n }\r\n\r\n i = mathfloor( i / 2 );\r\n if ( !i ) break;\r\n x = x.times(x);\r\n if (k) {\r\n if ( x.c && x.c.length > k ) x.c.length = k;\r\n } else if (m) {\r\n x = x.mod(m);\r\n }\r\n }\r\n\r\n if (m) return y;\r\n if ( n < 0 ) y = ONE.div(y);\r\n\r\n return z ? y.mod(z) : k ? round( y, POW_PRECISION, ROUNDING_MODE ) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toPrecision() precision not an integer: {sd}'\r\n * 'toPrecision() precision out of range: {sd}'\r\n * 'toPrecision() rounding mode not an integer: {rm}'\r\n * 'toPrecision() rounding mode out of range: {rm}'\r\n */\r\n P.toPrecision = function ( sd, rm ) {\r\n return format( this, sd != null && isValidInt( sd, 1, MAX, 24, 'precision' )\r\n ? sd | 0 : null, rm, 24 );\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to 64 inclusive.\r\n *\r\n * 'toString() base not an integer: {b}'\r\n * 'toString() base out of range: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if ( e === null ) {\r\n\r\n if (s) {\r\n str = 'Infinity';\r\n if ( s < 0 ) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n str = coeffToString( n.c );\r\n\r\n if ( b == null || !isValidInt( b, 2, 64, 25, 'base' ) ) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential( str, e )\r\n : toFixedPoint( str, e );\r\n } else {\r\n str = convertBase( toFixedPoint( str, e ), b | 0, 10, s );\r\n }\r\n\r\n if ( s < 0 && n.c[0] ) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber truncated to a whole\r\n * number.\r\n */\r\n P.truncated = P.trunc = function () {\r\n return round( new BigNumber(this), this.e + 1, 1 );\r\n };\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n var str,\r\n n = this,\r\n e = n.e;\r\n\r\n if ( e === null ) return n.toString();\r\n\r\n str = coeffToString( n.c );\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential( str, e )\r\n : toFixedPoint( str, e );\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n };\r\n\r\n\r\n P.isBigNumber = true;\r\n\r\n if ( config != null ) BigNumber.config(config);\r\n\r\n return BigNumber;\r\n }\r\n\r\n\r\n // PRIVATE HELPER FUNCTIONS\r\n\r\n\r\n function bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n }\r\n\r\n\r\n // Return a coefficient array as a string of base 10 digits.\r\n function coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for ( ; i < j; ) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for ( ; z--; s = '0' + s );\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for ( j = r.length; r.charCodeAt(--j) === 48; );\r\n return r.slice( 0, j + 1 || 1 );\r\n }\r\n\r\n\r\n // Compare the value of BigNumbers x and y.\r\n function compare( x, y ) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if ( !i || !j ) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if ( a || b ) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if ( i != j ) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if ( !xc || !yc ) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if ( !b ) return k > l ^ a ? 1 : -1;\r\n\r\n j = ( k = xc.length ) < ( l = yc.length ) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for ( i = 0; i < j; i++ ) if ( xc[i] != yc[i] ) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }\r\n\r\n\r\n /*\r\n * Return true if n is a valid number in range, otherwise false.\r\n * Use for argument validation when ERRORS is false.\r\n * Note: parseInt('1e+1') == 1 but parseFloat('1e+1') == 10.\r\n */\r\n function intValidatorNoErrors( n, min, max ) {\r\n return ( n = truncate(n) ) >= min && n <= max;\r\n }\r\n\r\n\r\n function isArray(obj) {\r\n return Object.prototype.toString.call(obj) == '[object Array]';\r\n }\r\n\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. convertBase('255', 10, 16) returns [15, 15].\r\n * Eg. convertBase('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut( str, baseIn, baseOut ) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for ( ; i < len; ) {\r\n for ( arrL = arr.length; arrL--; arr[arrL] *= baseIn );\r\n arr[ j = 0 ] += ALPHABET.indexOf( str.charAt( i++ ) );\r\n\r\n for ( ; j < arr.length; j++ ) {\r\n\r\n if ( arr[j] > baseOut - 1 ) {\r\n if ( arr[j + 1] == null ) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n\r\n function toExponential( str, e ) {\r\n return ( str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str ) +\r\n ( e < 0 ? 'e' : 'e+' ) + e;\r\n }\r\n\r\n\r\n function toFixedPoint( str, e ) {\r\n var len, z;\r\n\r\n // Negative exponent?\r\n if ( e < 0 ) {\r\n\r\n // Prepend zeros.\r\n for ( z = '0.'; ++e; z += '0' );\r\n str = z + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if ( ++e > len ) {\r\n for ( z = '0', e -= len; --e; z += '0' );\r\n str += z;\r\n } else if ( e < len ) {\r\n str = str.slice( 0, e ) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n function truncate(n) {\r\n n = parseFloat(n);\r\n return n < 0 ? mathceil(n) : mathfloor(n);\r\n }\r\n\r\n\r\n // EXPORT\r\n\r\n\r\n BigNumber = constructorFactory();\r\n BigNumber['default'] = BigNumber.BigNumber = BigNumber;\r\n\r\n\r\n // AMD.\r\n if ( typeof define == 'function' && define.amd ) {\r\n define( function () { return BigNumber; } );\r\n\r\n // Node.js and other environments that support module.exports.\r\n } else if ( typeof module != 'undefined' && module.exports ) {\r\n module.exports = BigNumber;\r\n\r\n // Browser.\r\n } else {\r\n if ( !globalObj ) globalObj = typeof self != 'undefined' ? self : Function('return this')();\r\n globalObj.BigNumber = BigNumber;\r\n }\r\n})(this);\r\n", + "var Web3 = require('./lib/web3');\n\n// dont override global variable\nif (typeof window !== 'undefined' && typeof window.Web3 === 'undefined') {\n window.Web3 = Web3;\n}\n\nmodule.exports = Web3;\n" + ] +} \ No newline at end of file diff --git a/bower_components/web3/dist/web3.min.js b/bower_components/web3/dist/web3.min.js new file mode 100644 index 00000000..ce94fe58 --- /dev/null +++ b/bower_components/web3/dist/web3.min.js @@ -0,0 +1,5 @@ +require=function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var f=n[a]={exports:{}};e[a][0].call(f.exports,function(t){var n=e[a][1][t];return o(n?n:t)},f,f.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a2&&"0x"===t.substr(0,2)&&(t=t.substr(2)),t=r.enc.Hex.parse(t)),o(t,{outputLength:256}).toString()}},{"crypto-js":58,"crypto-js/sha3":79}],20:[function(t,e,n){var r=t("bignumber.js"),o=t("./sha3.js"),i=t("utf8"),a={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"},s=function(t,e,n){return new Array(e-t.length+1).join(n?n:"0")+t},c=function(t,e,n){return t+new Array(e-t.length+1).join(n?n:"0")},u=function(t){var e="",n=0,r=t.length;for("0x"===t.substring(0,2)&&(n=2);n7&&t[n].toUpperCase()!==t[n]||parseInt(e[n],16)<=7&&t[n].toLowerCase()!==t[n])return!1;return!0},A=function(t){if("undefined"==typeof t)return"";t=t.toLowerCase().replace("0x","");for(var e=o(t),n="0x",r=0;r7?t[r].toUpperCase():t[r];return n},F=function(t){return B(t)?t:/^[0-9a-f]{40}$/.test(t)?"0x"+t:"0x"+s(v(t).substr(2),40)},I=function(t){return t instanceof r||t&&t.constructor&&"BigNumber"===t.constructor.name},O=function(t){return"string"==typeof t||t&&t.constructor&&"String"===t.constructor.name},N=function(t){return"function"==typeof t},T=function(t){return null!==t&&!(t instanceof Array)&&"object"==typeof t},D=function(t){return"boolean"==typeof t},R=function(t){return t instanceof Array},E=function(t){try{return!!JSON.parse(t)}catch(t){return!1}},P=function(t){return!!/^(0x)?[0-9a-f]{512}$/i.test(t)&&!(!/^(0x)?[0-9a-f]{512}$/.test(t)&&!/^(0x)?[0-9A-F]{512}$/.test(t))},M=function(t){return!!/^(0x)?[0-9a-f]{64}$/i.test(t)&&!(!/^(0x)?[0-9a-f]{64}$/.test(t)&&!/^(0x)?[0-9A-F]{64}$/.test(t))};e.exports={padLeft:s,padRight:c,toHex:v,toDecimal:y,fromDecimal:g,toUtf8:u,toAscii:f,fromUtf8:l,fromAscii:p,transformToFullName:h,extractDisplayName:d,extractTypeName:m,toWei:w,fromWei:_,toBigNumber:x,toTwosComplement:k,toAddress:F,isBigNumber:I,isStrictAddress:B,isAddress:S,isChecksumAddress:C,toChecksumAddress:A,isFunction:N,isString:O,isObject:T,isBoolean:D,isArray:R,isJson:E,isBloom:P,isTopic:M}},{"./sha3.js":19,"bignumber.js":"bignumber.js",utf8:84}],21:[function(t,e,n){e.exports={version:"0.19.0"}},{}],22:[function(t,e,n){function r(t){this._requestManager=new o(t),this.currentProvider=t,this.eth=new a(this),this.db=new s(this),this.shh=new c(this),this.net=new u(this),this.personal=new f(this),this.bzz=new l(this),this.settings=new p,this.version={api:h.version},this.providers={HttpProvider:b,IpcProvider:_},this._extend=y(this),this._extend({properties:x()})}var o=t("./web3/requestmanager"),i=t("./web3/iban"),a=t("./web3/methods/eth"),s=t("./web3/methods/db"),c=t("./web3/methods/shh"),u=t("./web3/methods/net"),f=t("./web3/methods/personal"),l=t("./web3/methods/swarm"),p=t("./web3/settings"),h=t("./version.json"),d=t("./utils/utils"),m=t("./utils/sha3"),y=t("./web3/extend"),g=t("./web3/batch"),v=t("./web3/property"),b=t("./web3/httpprovider"),_=t("./web3/ipcprovider"),w=t("bignumber.js");r.providers={HttpProvider:b,IpcProvider:_},r.prototype.setProvider=function(t){this._requestManager.setProvider(t),this.currentProvider=t},r.prototype.reset=function(t){this._requestManager.reset(t),this.settings=new p},r.prototype.BigNumber=w,r.prototype.toHex=d.toHex,r.prototype.toAscii=d.toAscii,r.prototype.toUtf8=d.toUtf8,r.prototype.fromAscii=d.fromAscii,r.prototype.fromUtf8=d.fromUtf8,r.prototype.toDecimal=d.toDecimal,r.prototype.fromDecimal=d.fromDecimal,r.prototype.toBigNumber=d.toBigNumber,r.prototype.toWei=d.toWei,r.prototype.fromWei=d.fromWei,r.prototype.isAddress=d.isAddress,r.prototype.isChecksumAddress=d.isChecksumAddress,r.prototype.toChecksumAddress=d.toChecksumAddress,r.prototype.isIBAN=d.isIBAN,r.prototype.padLeft=d.padLeft,r.prototype.padRight=d.padRight,r.prototype.sha3=function(t,e){return"0x"+m(t,e)},r.prototype.fromICAP=function(t){var e=new i(t);return e.address()};var x=function(){return[new v({name:"version.node",getter:"web3_clientVersion"}),new v({name:"version.network",getter:"net_version",inputFormatter:d.toDecimal}),new v({name:"version.ethereum",getter:"eth_protocolVersion",inputFormatter:d.toDecimal}),new v({name:"version.whisper",getter:"shh_version",inputFormatter:d.toDecimal})]};r.prototype.isConnected=function(){return this.currentProvider&&this.currentProvider.isConnected()},r.prototype.createBatch=function(){return new g(this)},e.exports=r},{"./utils/sha3":19,"./utils/utils":20,"./version.json":21,"./web3/batch":24,"./web3/extend":28,"./web3/httpprovider":32,"./web3/iban":33,"./web3/ipcprovider":34,"./web3/methods/db":37,"./web3/methods/eth":38,"./web3/methods/net":39,"./web3/methods/personal":40,"./web3/methods/shh":41,"./web3/methods/swarm":42,"./web3/property":45,"./web3/requestmanager":46,"./web3/settings":47,"bignumber.js":"bignumber.js"}],23:[function(t,e,n){var r=t("../utils/sha3"),o=t("./event"),i=t("./formatters"),a=t("../utils/utils"),s=t("./filter"),c=t("./methods/watches"),u=function(t,e,n){this._requestManager=t,this._json=e,this._address=n};u.prototype.encode=function(t){t=t||{};var e={};return["fromBlock","toBlock"].filter(function(e){return void 0!==t[e]}).forEach(function(n){e[n]=i.inputBlockNumberFormatter(t[n])}),e.address=this._address,e},u.prototype.decode=function(t){t.data=t.data||"",t.topics=t.topics||[];var e=t.topics[0].slice(2),n=this._json.filter(function(t){return e===r(a.transformToFullName(t))})[0];if(!n)return console.warn("cannot find event for log"),t;var i=new o(this._requestManager,n,this._address);return i.decode(t)},u.prototype.execute=function(t,e){a.isFunction(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],1===arguments.length&&(t=null));var n=this.encode(t),r=this.decode.bind(this);return new s(this._requestManager,n,c.eth(),r,e)},u.prototype.attachToContract=function(t){var e=this.execute.bind(this);t.allEvents=e},e.exports=u},{"../utils/sha3":19,"../utils/utils":20,"./event":27,"./filter":29,"./formatters":30,"./methods/watches":43}],24:[function(t,e,n){var r=t("./jsonrpc"),o=t("./errors"),i=function(t){this.requestManager=t._requestManager,this.requests=[]};i.prototype.add=function(t){this.requests.push(t)},i.prototype.execute=function(){var t=this.requests;this.requestManager.sendBatch(t,function(e,n){n=n||[],t.map(function(t,e){return n[e]||{}}).forEach(function(e,n){if(t[n].callback){if(!r.isValidResponse(e))return t[n].callback(o.InvalidResponse(e));t[n].callback(null,t[n].format?t[n].format(e.result):e.result)}})})},e.exports=i},{"./errors":26,"./jsonrpc":35}],25:[function(t,e,n){var r=t("../utils/utils"),o=t("../solidity/coder"),i=t("./event"),a=t("./function"),s=t("./allevents"),c=function(t,e){return t.filter(function(t){return"constructor"===t.type&&t.inputs.length===e.length}).map(function(t){return t.inputs.map(function(t){return t.type})}).map(function(t){return o.encodeParams(t,e)})[0]||""},u=function(t){t.abi.filter(function(t){return"function"===t.type}).map(function(e){return new a(t._eth,e,t.address)}).forEach(function(e){e.attachToContract(t)})},f=function(t){var e=t.abi.filter(function(t){return"event"===t.type}),n=new s(t._eth._requestManager,e,t.address);n.attachToContract(t),e.map(function(e){return new i(t._eth._requestManager,e,t.address)}).forEach(function(e){e.attachToContract(t)})},l=function(t,e){var n=0,r=!1,o=t._eth.filter("latest",function(i){if(!i&&!r)if(n++,n>50){if(o.stopWatching(function(){}),r=!0,!e)throw new Error("Contract transaction couldn't be found after 50 blocks");e(new Error("Contract transaction couldn't be found after 50 blocks"))}else t._eth.getTransactionReceipt(t.transactionHash,function(n,i){i&&!r&&t._eth.getCode(i.contractAddress,function(n,a){if(!r&&a)if(o.stopWatching(function(){}),r=!0,a.length>3)t.address=i.contractAddress,u(t),f(t),e&&e(null,t);else{if(!e)throw new Error("The contract code couldn't be stored, please check your gas amount.");e(new Error("The contract code couldn't be stored, please check your gas amount."))}})})})},p=function(t,e){this.eth=t,this.abi=e,this.new=function(){var t,n=new h(this.eth,this.abi),o={},i=Array.prototype.slice.call(arguments);r.isFunction(i[i.length-1])&&(t=i.pop());var a=i[i.length-1];if(r.isObject(a)&&!r.isArray(a)&&(o=i.pop()),o.value>0){var s=e.filter(function(t){return"constructor"===t.type&&t.inputs.length===i.length})[0]||{};if(!s.payable)throw new Error("Cannot send value to non-payable constructor")}var u=c(this.abi,i);if(o.data+=u,t)this.eth.sendTransaction(o,function(e,r){e?t(e):(n.transactionHash=r,t(null,n),l(n,t))});else{var f=this.eth.sendTransaction(o);n.transactionHash=f,l(n)}return n},this.new.getData=this.getData.bind(this)};p.prototype.at=function(t,e){var n=new h(this.eth,this.abi,t);return u(n),f(n),e&&e(null,n),n},p.prototype.getData=function(){var t={},e=Array.prototype.slice.call(arguments),n=e[e.length-1];r.isObject(n)&&!r.isArray(n)&&(t=e.pop());var o=c(this.abi,e);return t.data+=o,t.data};var h=function(t,e,n){this._eth=t,this.transactionHash=null,this.address=n,this.abi=e};e.exports=p},{"../solidity/coder":7,"../utils/utils":20,"./allevents":23,"./event":27,"./function":31}],26:[function(t,e,n){e.exports={InvalidNumberOfSolidityArgs:function(){return new Error("Invalid number of arguments to Solidity function")},InvalidNumberOfRPCParams:function(){return new Error("Invalid number of input parameters to RPC method")},InvalidConnection:function(t){return new Error("CONNECTION ERROR: Couldn't connect to node "+t+".")},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:"Invalid JSON RPC response: "+JSON.stringify(t);return new Error(e)},ConnectionTimeout:function(t){return new Error("CONNECTION TIMEOUT: timeout of "+t+" ms achived")}}},{}],27:[function(t,e,n){var r=t("../utils/utils"),o=t("../solidity/coder"),i=t("./formatters"),a=t("../utils/sha3"),s=t("./filter"),c=t("./methods/watches"),u=function(t,e,n){this._requestManager=t,this._params=e.inputs,this._name=r.transformToFullName(e),this._address=n,this._anonymous=e.anonymous};u.prototype.types=function(t){return this._params.filter(function(e){return e.indexed===t}).map(function(t){return t.type})},u.prototype.displayName=function(){return r.extractDisplayName(this._name)},u.prototype.typeName=function(){return r.extractTypeName(this._name)},u.prototype.signature=function(){return a(this._name)},u.prototype.encode=function(t,e){t=t||{},e=e||{};var n={};["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(t){n[t]=i.inputBlockNumberFormatter(e[t])}),n.topics=[],n.address=this._address,this._anonymous||n.topics.push("0x"+this.signature());var a=this._params.filter(function(t){return t.indexed===!0}).map(function(e){var n=t[e.name];return void 0===n||null===n?null:r.isArray(n)?n.map(function(t){return"0x"+o.encodeParam(e.type,t)}):"0x"+o.encodeParam(e.type,n)});return n.topics=n.topics.concat(a),n},u.prototype.decode=function(t){t.data=t.data||"",t.topics=t.topics||[];var e=this._anonymous?t.topics:t.topics.slice(1),n=e.map(function(t){return t.slice(2)}).join(""),r=o.decodeParams(this.types(!0),n),a=t.data.slice(2),s=o.decodeParams(this.types(!1),a),c=i.outputLogFormatter(t);return c.event=this.displayName(),c.address=t.address,c.args=this._params.reduce(function(t,e){return t[e.name]=e.indexed?r.shift():s.shift(),t},{}),delete c.data,delete c.topics,c},u.prototype.execute=function(t,e,n){r.isFunction(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],2===arguments.length&&(e=null),1===arguments.length&&(e=null,t={}));var o=this.encode(t,e),i=this.decode.bind(this);return new s(this._requestManager,o,c.eth(),i,n)},u.prototype.attachToContract=function(t){var e=this.execute.bind(this),n=this.displayName();t[n]||(t[n]=e),t[n][this.typeName()]=this.execute.bind(this,t)},e.exports=u},{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"./filter":29,"./formatters":30,"./methods/watches":43}],28:[function(t,e,n){var r=t("./formatters"),o=t("./../utils/utils"),i=t("./method"),a=t("./property"),s=function(t){var e=function(e){var n;e.property?(t[e.property]||(t[e.property]={}),n=t[e.property]):n=t,e.methods&&e.methods.forEach(function(e){e.attachToObject(n),e.setRequestManager(t._requestManager)}),e.properties&&e.properties.forEach(function(e){e.attachToObject(n),e.setRequestManager(t._requestManager)})};return e.formatters=r,e.utils=o,e.Method=i,e.Property=a,e};e.exports=s},{"./../utils/utils":20,"./formatters":30,"./method":36,"./property":45}],29:[function(t,e,n){var r=t("./formatters"),o=t("../utils/utils"),i=function(t){return null===t||"undefined"==typeof t?null:(t=String(t),0===t.indexOf("0x")?t:o.fromUtf8(t))},a=function(t){return o.isString(t)?t:(t=t||{},t.topics=t.topics||[],t.topics=t.topics.map(function(t){return o.isArray(t)?t.map(i):i(t)}),{topics:t.topics,from:t.from,to:t.to,address:t.address,fromBlock:r.inputBlockNumberFormatter(t.fromBlock),toBlock:r.inputBlockNumberFormatter(t.toBlock)})},s=function(t,e){o.isString(t.options)||t.get(function(t,n){t&&e(t),o.isArray(n)&&n.forEach(function(t){e(null,t)})})},c=function(t){var e=function(e,n){return e?t.callbacks.forEach(function(t){t(e)}):void(o.isArray(n)&&n.forEach(function(e){e=t.formatter?t.formatter(e):e, +t.callbacks.forEach(function(t){t(null,e)})}))};t.requestManager.startPolling({method:t.implementation.poll.call,params:[t.filterId]},t.filterId,e,t.stopWatching.bind(t))},u=function(t,e,n,r,o,i){var u=this,f={};return n.forEach(function(e){e.setRequestManager(t),e.attachToObject(f)}),this.requestManager=t,this.options=a(e),this.implementation=f,this.filterId=null,this.callbacks=[],this.getLogsCallbacks=[],this.pollFilters=[],this.formatter=r,this.implementation.newFilter(this.options,function(t,e){if(t)u.callbacks.forEach(function(e){e(t)}),"function"==typeof i&&i(t);else if(u.filterId=e,u.getLogsCallbacks.forEach(function(t){u.get(t)}),u.getLogsCallbacks=[],u.callbacks.forEach(function(t){s(u,t)}),u.callbacks.length>0&&c(u),"function"==typeof o)return u.watch(o)}),this};u.prototype.watch=function(t){return this.callbacks.push(t),this.filterId&&(s(this,t),c(this)),this},u.prototype.stopWatching=function(t){return this.requestManager.stopPolling(this.filterId),this.callbacks=[],t?void this.implementation.uninstallFilter(this.filterId,t):this.implementation.uninstallFilter(this.filterId)},u.prototype.get=function(t){var e=this;if(!o.isFunction(t)){if(null===this.filterId)throw new Error("Filter ID Error: filter().get() can't be chained synchronous, please provide a callback for the get() method.");var n=this.implementation.getLogs(this.filterId);return n.map(function(t){return e.formatter?e.formatter(t):t})}return null===this.filterId?this.getLogsCallbacks.push(t):this.implementation.getLogs(this.filterId,function(n,r){n?t(n):t(null,r.map(function(t){return e.formatter?e.formatter(t):t}))}),this},e.exports=u},{"../utils/utils":20,"./formatters":30}],30:[function(t,e,n){var r=t("../utils/utils"),o=t("../utils/config"),i=t("./iban"),a=function(t){return r.toBigNumber(t)},s=function(t){return"latest"===t||"pending"===t||"earliest"===t},c=function(t){return void 0===t?o.defaultBlock:u(t)},u=function(t){if(void 0!==t)return s(t)?t:r.toHex(t)},f=function(t){return t.from=t.from||o.defaultAccount,t.from&&(t.from=v(t.from)),t.to&&(t.to=v(t.to)),["gasPrice","gas","value","nonce"].filter(function(e){return void 0!==t[e]}).forEach(function(e){t[e]=r.fromDecimal(t[e])}),t},l=function(t){return t.from=t.from||o.defaultAccount,t.from=v(t.from),t.to&&(t.to=v(t.to)),["gasPrice","gas","value","nonce"].filter(function(e){return void 0!==t[e]}).forEach(function(e){t[e]=r.fromDecimal(t[e])}),t},p=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),t.nonce=r.toDecimal(t.nonce),t.gas=r.toDecimal(t.gas),t.gasPrice=r.toBigNumber(t.gasPrice),t.value=r.toBigNumber(t.value),t},h=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),t.cumulativeGasUsed=r.toDecimal(t.cumulativeGasUsed),t.gasUsed=r.toDecimal(t.gasUsed),r.isArray(t.logs)&&(t.logs=t.logs.map(function(t){return m(t)})),t},d=function(t){return t.gasLimit=r.toDecimal(t.gasLimit),t.gasUsed=r.toDecimal(t.gasUsed),t.size=r.toDecimal(t.size),t.timestamp=r.toDecimal(t.timestamp),null!==t.number&&(t.number=r.toDecimal(t.number)),t.difficulty=r.toBigNumber(t.difficulty),t.totalDifficulty=r.toBigNumber(t.totalDifficulty),r.isArray(t.transactions)&&t.transactions.forEach(function(t){if(!r.isString(t))return p(t)}),t},m=function(t){return null!==t.blockNumber&&(t.blockNumber=r.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=r.toDecimal(t.transactionIndex)),null!==t.logIndex&&(t.logIndex=r.toDecimal(t.logIndex)),t},y=function(t){return t.ttl=r.fromDecimal(t.ttl),t.workToProve=r.fromDecimal(t.workToProve),t.priority=r.fromDecimal(t.priority),r.isArray(t.topics)||(t.topics=t.topics?[t.topics]:[]),t.topics=t.topics.map(function(t){return 0===t.indexOf("0x")?t:r.fromUtf8(t)}),t},g=function(t){return t.expiry=r.toDecimal(t.expiry),t.sent=r.toDecimal(t.sent),t.ttl=r.toDecimal(t.ttl),t.workProved=r.toDecimal(t.workProved),t.topics||(t.topics=[]),t.topics=t.topics.map(function(t){return r.toAscii(t)}),t},v=function(t){var e=new i(t);if(e.isValid()&&e.isDirect())return"0x"+e.address();if(r.isStrictAddress(t))return t;if(r.isAddress(t))return"0x"+t;throw new Error("invalid address")},b=function(t){return t.startingBlock=r.toDecimal(t.startingBlock),t.currentBlock=r.toDecimal(t.currentBlock),t.highestBlock=r.toDecimal(t.highestBlock),t.knownStates&&(t.knownStates=r.toDecimal(t.knownStates),t.pulledStates=r.toDecimal(t.pulledStates)),t};e.exports={inputDefaultBlockNumberFormatter:c,inputBlockNumberFormatter:u,inputCallFormatter:f,inputTransactionFormatter:l,inputAddressFormatter:v,inputPostFormatter:y,outputBigNumberFormatter:a,outputTransactionFormatter:p,outputTransactionReceiptFormatter:h,outputBlockFormatter:d,outputLogFormatter:m,outputPostFormatter:g,outputSyncingFormatter:b}},{"../utils/config":18,"../utils/utils":20,"./iban":33}],31:[function(t,e,n){var r=t("../solidity/coder"),o=t("../utils/utils"),i=t("./errors"),a=t("./formatters"),s=t("../utils/sha3"),c=function(t,e,n){this._eth=t,this._inputTypes=e.inputs.map(function(t){return t.type}),this._outputTypes=e.outputs.map(function(t){return t.type}),this._constant=e.constant,this._payable=e.payable,this._name=o.transformToFullName(e),this._address=n};c.prototype.extractCallback=function(t){if(o.isFunction(t[t.length-1]))return t.pop()},c.prototype.extractDefaultBlock=function(t){if(t.length>this._inputTypes.length&&!o.isObject(t[t.length-1]))return a.inputDefaultBlockNumberFormatter(t.pop())},c.prototype.validateArgs=function(t){var e=t.filter(function(t){return!(o.isObject(t)===!0&&o.isArray(t)===!1)});if(e.length!==this._inputTypes.length)throw i.InvalidNumberOfSolidityArgs()},c.prototype.toPayload=function(t){var e={};return t.length>this._inputTypes.length&&o.isObject(t[t.length-1])&&(e=t[t.length-1]),this.validateArgs(t),e.to=this._address,e.data="0x"+this.signature()+r.encodeParams(this._inputTypes,t),e},c.prototype.signature=function(){return s(this._name).slice(0,8)},c.prototype.unpackOutput=function(t){if(t){t=t.length>=2?t.slice(2):t;var e=r.decodeParams(this._outputTypes,t);return 1===e.length?e[0]:e}},c.prototype.call=function(){var t=Array.prototype.slice.call(arguments).filter(function(t){return void 0!==t}),e=this.extractCallback(t),n=this.extractDefaultBlock(t),r=this.toPayload(t);if(!e){var o=this._eth.call(r,n);return this.unpackOutput(o)}var i=this;this._eth.call(r,n,function(t,n){if(t)return e(t,null);var r=null;try{r=i.unpackOutput(n)}catch(e){t=e}e(t,r)})},c.prototype.sendTransaction=function(){var t=Array.prototype.slice.call(arguments).filter(function(t){return void 0!==t}),e=this.extractCallback(t),n=this.toPayload(t);if(n.value>0&&!this._payable)throw new Error("Cannot send value to non-payable function");return e?void this._eth.sendTransaction(n,e):this._eth.sendTransaction(n)},c.prototype.estimateGas=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),n=this.toPayload(t);return e?void this._eth.estimateGas(n,e):this._eth.estimateGas(n)},c.prototype.getData=function(){var t=Array.prototype.slice.call(arguments),e=this.toPayload(t);return e.data},c.prototype.displayName=function(){return o.extractDisplayName(this._name)},c.prototype.typeName=function(){return o.extractTypeName(this._name)},c.prototype.request=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),n=this.toPayload(t),r=this.unpackOutput.bind(this);return{method:this._constant?"eth_call":"eth_sendTransaction",callback:e,params:[n],format:r}},c.prototype.execute=function(){var t=!this._constant;return t?this.sendTransaction.apply(this,Array.prototype.slice.call(arguments)):this.call.apply(this,Array.prototype.slice.call(arguments))},c.prototype.attachToContract=function(t){var e=this.execute.bind(this);e.request=this.request.bind(this),e.call=this.call.bind(this),e.sendTransaction=this.sendTransaction.bind(this),e.estimateGas=this.estimateGas.bind(this),e.getData=this.getData.bind(this);var n=this.displayName();t[n]||(t[n]=e),t[n][this.typeName()]=e},e.exports=c},{"../solidity/coder":7,"../utils/sha3":19,"../utils/utils":20,"./errors":26,"./formatters":30}],32:[function(t,e,n){var r=t("./errors");"undefined"!=typeof window&&window.XMLHttpRequest?XMLHttpRequest=window.XMLHttpRequest:XMLHttpRequest=t("xmlhttprequest").XMLHttpRequest;var o=t("xhr2"),i=function(t,e){this.host=t||"http://localhost:8545",this.timeout=e||0};i.prototype.prepareRequest=function(t){var e;return t?(e=new o,e.timeout=this.timeout):e=new XMLHttpRequest,e.open("POST",this.host,t),e.setRequestHeader("Content-Type","application/json"),e},i.prototype.send=function(t){var e=this.prepareRequest(!1);try{e.send(JSON.stringify(t))}catch(t){throw r.InvalidConnection(this.host)}var n=e.responseText;try{n=JSON.parse(n)}catch(t){throw r.InvalidResponse(e.responseText)}return n},i.prototype.sendAsync=function(t,e){var n=this.prepareRequest(!0);n.onreadystatechange=function(){if(4===n.readyState&&1!==n.timeout){var t=n.responseText,o=null;try{t=JSON.parse(t)}catch(t){o=r.InvalidResponse(n.responseText)}e(o,t)}},n.ontimeout=function(){e(r.ConnectionTimeout(this.timeout))};try{n.send(JSON.stringify(t))}catch(t){e(r.InvalidConnection(this.host))}},i.prototype.isConnected=function(){try{return this.send({id:9999999999,jsonrpc:"2.0",method:"net_listening",params:[]}),!0}catch(t){return!1}},e.exports=i},{"./errors":26,xhr2:85,xmlhttprequest:17}],33:[function(t,e,n){var r=t("bignumber.js"),o=function(t,e){for(var n=t;n.length<2*e;)n="0"+n;return n},i=function(t){var e="A".charCodeAt(0),n="Z".charCodeAt(0);return t=t.toUpperCase(),t=t.substr(4)+t.substr(0,4),t.split("").map(function(t){var r=t.charCodeAt(0);return r>=e&&r<=n?r-e+10:t}).join("")},a=function(t){for(var e,n=t;n.length>2;)e=n.slice(0,9),n=parseInt(e,10)%97+n.slice(e.length);return parseInt(n,10)%97},s=function(t){this._iban=t};s.fromAddress=function(t){var e=new r(t,16),n=e.toString(36),i=o(n,15);return s.fromBban(i.toUpperCase())},s.fromBban=function(t){var e="XE",n=a(i(e+"00"+t)),r=("0"+(98-n)).slice(-2);return new s(e+r+t)},s.createIndirect=function(t){return s.fromBban("ETH"+t.institution+t.identifier)},s.isValid=function(t){var e=new s(t);return e.isValid()},s.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===a(i(this._iban))},s.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},s.prototype.isIndirect=function(){return 20===this._iban.length},s.prototype.checksum=function(){return this._iban.substr(2,2)},s.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},s.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},s.prototype.address=function(){if(this.isDirect()){var t=this._iban.substr(4),e=new r(t,36);return o(e.toString(16),20)}return""},s.prototype.toString=function(){return this._iban},e.exports=s},{"bignumber.js":"bignumber.js"}],34:[function(t,e,n){"use strict";var r=t("../utils/utils"),o=t("./errors"),i=function(t,e){var n=this;this.responseCallbacks={},this.path=t,this.connection=e.connect({path:this.path}),this.connection.on("error",function(t){console.error("IPC Connection Error",t),n._timeout()}),this.connection.on("end",function(){n._timeout()}),this.connection.on("data",function(t){n._parseResponse(t.toString()).forEach(function(t){var e=null;r.isArray(t)?t.forEach(function(t){n.responseCallbacks[t.id]&&(e=t.id)}):e=t.id,n.responseCallbacks[e]&&(n.responseCallbacks[e](null,t),delete n.responseCallbacks[e])})})};i.prototype._parseResponse=function(t){var e=this,n=[],r=t.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|");return r.forEach(function(t){e.lastChunk&&(t=e.lastChunk+t);var r=null;try{r=JSON.parse(t)}catch(n){return e.lastChunk=t,clearTimeout(e.lastChunkTimeout),void(e.lastChunkTimeout=setTimeout(function(){throw e._timeout(),o.InvalidResponse(t)},15e3))}clearTimeout(e.lastChunkTimeout),e.lastChunk=null,r&&n.push(r)}),n},i.prototype._addResponseCallback=function(t,e){var n=t.id||t[0].id,r=t.method||t[0].method;this.responseCallbacks[n]=e,this.responseCallbacks[n].method=r},i.prototype._timeout=function(){for(var t in this.responseCallbacks)this.responseCallbacks.hasOwnProperty(t)&&(this.responseCallbacks[t](o.InvalidConnection("on IPC")),delete this.responseCallbacks[t])},i.prototype.isConnected=function(){var t=this;return t.connection.writable||t.connection.connect({path:t.path}),!!this.connection.writable},i.prototype.send=function(t){if(this.connection.writeSync){var e;this.connection.writable||this.connection.connect({path:this.path});var n=this.connection.writeSync(JSON.stringify(t));try{e=JSON.parse(n)}catch(t){throw o.InvalidResponse(n)}return e}throw new Error('You tried to send "'+t.method+'" synchronously. Synchronous requests are not supported by the IPC provider.')},i.prototype.sendAsync=function(t,e){this.connection.writable||this.connection.connect({path:this.path}),this.connection.write(JSON.stringify(t)),this._addResponseCallback(t,e)},e.exports=i},{"../utils/utils":20,"./errors":26}],35:[function(t,e,n){var r={messageId:0};r.toPayload=function(t,e){return t||console.error("jsonrpc method should be specified!"),r.messageId++,{jsonrpc:"2.0",id:r.messageId,method:t,params:e||[]}},r.isValidResponse=function(t){function e(t){return!!t&&!t.error&&"2.0"===t.jsonrpc&&"number"==typeof t.id&&void 0!==t.result}return Array.isArray(t)?t.every(e):e(t)},r.toBatchPayload=function(t){return t.map(function(t){return r.toPayload(t.method,t.params)})},e.exports=r},{}],36:[function(t,e,n){var r=t("../utils/utils"),o=t("./errors"),i=function(t){this.name=t.name,this.call=t.call,this.params=t.params||0,this.inputFormatter=t.inputFormatter,this.outputFormatter=t.outputFormatter,this.requestManager=null};i.prototype.setRequestManager=function(t){this.requestManager=t},i.prototype.getCall=function(t){return r.isFunction(this.call)?this.call(t):this.call},i.prototype.extractCallback=function(t){if(r.isFunction(t[t.length-1]))return t.pop()},i.prototype.validateArgs=function(t){if(t.length!==this.params)throw o.InvalidNumberOfRPCParams()},i.prototype.formatInput=function(t){return this.inputFormatter?this.inputFormatter.map(function(e,n){return e?e(t[n]):t[n]}):t},i.prototype.formatOutput=function(t){return this.outputFormatter&&t?this.outputFormatter(t):t},i.prototype.toPayload=function(t){var e=this.getCall(t),n=this.extractCallback(t),r=this.formatInput(t);return this.validateArgs(r),{method:e,params:r,callback:n}},i.prototype.attachToObject=function(t){var e=this.buildCall();e.call=this.call;var n=this.name.split(".");n.length>1?(t[n[0]]=t[n[0]]||{},t[n[0]][n[1]]=e):t[n[0]]=e},i.prototype.buildCall=function(){var t=this,e=function(){var e=t.toPayload(Array.prototype.slice.call(arguments));return e.callback?t.requestManager.sendAsync(e,function(n,r){e.callback(n,t.formatOutput(r))}):t.formatOutput(t.requestManager.send(e))};return e.request=this.request.bind(this),e},i.prototype.request=function(){var t=this.toPayload(Array.prototype.slice.call(arguments));return t.format=this.formatOutput.bind(this),t},e.exports=i},{"../utils/utils":20,"./errors":26}],37:[function(t,e,n){var r=t("../method"),o=function(t){this._requestManager=t._requestManager;var e=this;i().forEach(function(n){n.attachToObject(e),n.setRequestManager(t._requestManager)})},i=function(){var t=new r({name:"putString",call:"db_putString",params:3}),e=new r({name:"getString",call:"db_getString",params:2}),n=new r({name:"putHex",call:"db_putHex",params:3}),o=new r({name:"getHex",call:"db_getHex",params:2});return[t,e,n,o]};e.exports=o},{"../method":36}],38:[function(t,e,n){"use strict";function r(t){this._requestManager=t._requestManager;var e=this;w().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}),x().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}),this.iban=d,this.sendIBANTransaction=m.bind(null,this)}var o=t("../formatters"),i=t("../../utils/utils"),a=t("../method"),s=t("../property"),c=t("../../utils/config"),u=t("../contract"),f=t("./watches"),l=t("../filter"),p=t("../syncing"),h=t("../namereg"),d=t("../iban"),m=t("../transfer"),y=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},g=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},v=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},b=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},_=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"};Object.defineProperty(r.prototype,"defaultBlock",{get:function(){return c.defaultBlock},set:function(t){return c.defaultBlock=t,t}}),Object.defineProperty(r.prototype,"defaultAccount",{get:function(){return c.defaultAccount},set:function(t){return c.defaultAccount=t,t}});var w=function(){var t=new a({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter],outputFormatter:o.outputBigNumberFormatter}),e=new a({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[null,i.toHex,o.inputDefaultBlockNumberFormatter]}),n=new a({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[o.inputAddressFormatter,o.inputDefaultBlockNumberFormatter]}),r=new a({name:"getBlock",call:y,params:2,inputFormatter:[o.inputBlockNumberFormatter,function(t){return!!t}],outputFormatter:o.outputBlockFormatter}),s=new a({name:"getUncle",call:v,params:2,inputFormatter:[o.inputBlockNumberFormatter,i.toHex],outputFormatter:o.outputBlockFormatter}),c=new a({name:"getCompilers",call:"eth_getCompilers",params:0}),u=new a({name:"getBlockTransactionCount",call:b,params:1,inputFormatter:[o.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),f=new a({name:"getBlockUncleCount",call:_,params:1,inputFormatter:[o.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),l=new a({name:"getTransaction",call:"eth_getTransactionByHash",params:1,outputFormatter:o.outputTransactionFormatter}),p=new a({name:"getTransactionFromBlock",call:g,params:2,inputFormatter:[o.inputBlockNumberFormatter,i.toHex],outputFormatter:o.outputTransactionFormatter}),h=new a({name:"getTransactionReceipt",call:"eth_getTransactionReceipt",params:1,outputFormatter:o.outputTransactionReceiptFormatter}),d=new a({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[null,o.inputDefaultBlockNumberFormatter],outputFormatter:i.toDecimal}),m=new a({name:"sendRawTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[null]}),w=new a({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[o.inputTransactionFormatter]}),x=new a({name:"signTransaction",call:"eth_signTransaction",params:1,inputFormatter:[o.inputTransactionFormatter]}),k=new a({name:"sign",call:"eth_sign",params:2,inputFormatter:[o.inputAddressFormatter,null]}),B=new a({name:"call",call:"eth_call",params:2,inputFormatter:[o.inputCallFormatter,o.inputDefaultBlockNumberFormatter]}),S=new a({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[o.inputCallFormatter],outputFormatter:i.toDecimal}),C=new a({name:"compile.solidity",call:"eth_compileSolidity",params:1}),A=new a({name:"compile.lll",call:"eth_compileLLL",params:1}),F=new a({name:"compile.serpent",call:"eth_compileSerpent",params:1}),I=new a({name:"submitWork",call:"eth_submitWork",params:3}),O=new a({name:"getWork",call:"eth_getWork",params:0});return[t,e,n,r,s,c,u,f,l,p,h,d,B,S,m,x,w,k,C,A,F,I,O]},x=function(){return[new s({name:"coinbase",getter:"eth_coinbase"}),new s({name:"mining",getter:"eth_mining"}),new s({name:"hashrate",getter:"eth_hashrate",outputFormatter:i.toDecimal}),new s({name:"syncing",getter:"eth_syncing",outputFormatter:o.outputSyncingFormatter}),new s({name:"gasPrice",getter:"eth_gasPrice",outputFormatter:o.outputBigNumberFormatter}),new s({name:"accounts",getter:"eth_accounts"}),new s({name:"blockNumber",getter:"eth_blockNumber",outputFormatter:i.toDecimal}),new s({name:"protocolVersion",getter:"eth_protocolVersion"})]};r.prototype.contract=function(t){var e=new u(this,t);return e},r.prototype.filter=function(t,e,n){return new l(this._requestManager,t,f.eth(),o.outputLogFormatter,e,n)},r.prototype.namereg=function(){return this.contract(h.global.abi).at(h.global.address)},r.prototype.icapNamereg=function(){return this.contract(h.icap.abi).at(h.icap.address)},r.prototype.isSyncing=function(t){return new p(this._requestManager,t)},e.exports=r},{"../../utils/config":18,"../../utils/utils":20,"../contract":25,"../filter":29,"../formatters":30,"../iban":33,"../method":36,"../namereg":44,"../property":45,"../syncing":48,"../transfer":49,"./watches":43}],39:[function(t,e,n){var r=t("../../utils/utils"),o=t("../property"),i=function(t){this._requestManager=t._requestManager;var e=this;a().forEach(function(n){n.attachToObject(e),n.setRequestManager(t._requestManager)})},a=function(){return[new o({name:"listening",getter:"net_listening"}),new o({name:"peerCount",getter:"net_peerCount",outputFormatter:r.toDecimal})]};e.exports=i},{"../../utils/utils":20,"../property":45}],40:[function(t,e,n){"use strict";function r(t){this._requestManager=t._requestManager;var e=this;s().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}),c().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})}var o=t("../method"),i=t("../property"),a=t("../formatters"),s=function(){var t=new o({name:"newAccount",call:"personal_newAccount",params:1,inputFormatter:[null]}),e=new o({name:"importRawKey",call:"personal_importRawKey",params:2}),n=new o({name:"sign",call:"personal_sign",params:3,inputFormatter:[null,a.inputAddressFormatter,null]}),r=new o({name:"ecRecover",call:"personal_ecRecover",params:2}),i=new o({name:"unlockAccount",call:"personal_unlockAccount",params:3,inputFormatter:[a.inputAddressFormatter,null,null]}),s=new o({name:"sendTransaction",call:"personal_sendTransaction",params:2,inputFormatter:[a.inputTransactionFormatter,null]}),c=new o({name:"lockAccount",call:"personal_lockAccount",params:1,inputFormatter:[a.inputAddressFormatter]});return[t,e,i,r,n,s,c]},c=function(){return[new i({name:"listAccounts",getter:"personal_listAccounts"})]};e.exports=r},{"../formatters":30,"../method":36,"../property":45}],41:[function(t,e,n){var r=t("../method"),o=t("../formatters"),i=t("../filter"),a=t("./watches"),s=function(t){this._requestManager=t._requestManager;var e=this;c().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})};s.prototype.filter=function(t,e){return new i(this._requestManager,t,a.shh(),o.outputPostFormatter,e)};var c=function(){var t=new r({name:"post",call:"shh_post",params:1,inputFormatter:[o.inputPostFormatter]}),e=new r({name:"newIdentity",call:"shh_newIdentity",params:0}),n=new r({name:"hasIdentity",call:"shh_hasIdentity",params:1}),i=new r({name:"newGroup",call:"shh_newGroup",params:0}),a=new r({name:"addToGroup",call:"shh_addToGroup",params:0});return[t,e,n,i,a]};e.exports=s},{"../filter":29,"../formatters":30,"../method":36,"./watches":43}],42:[function(t,e,n){"use strict";function r(t){this._requestManager=t._requestManager;var e=this;a().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)}),s().forEach(function(t){t.attachToObject(e),t.setRequestManager(e._requestManager)})}var o=t("../method"),i=t("../property"),a=function(){var t=new o({name:"blockNetworkRead",call:"bzz_blockNetworkRead",params:1,inputFormatter:[null]}),e=new o({name:"syncEnabled",call:"bzz_syncEnabled",params:1,inputFormatter:[null]}),n=new o({name:"swapEnabled",call:"bzz_swapEnabled",params:1,inputFormatter:[null]}),r=new o({name:"download",call:"bzz_download",params:2,inputFormatter:[null,null]}),i=new o({name:"upload",call:"bzz_upload",params:2,inputFormatter:[null,null]}),a=new o({name:"retrieve",call:"bzz_retrieve",params:1,inputFormatter:[null]}),s=new o({name:"store",call:"bzz_store",params:2,inputFormatter:[null,null]}),c=new o({name:"get",call:"bzz_get",params:1,inputFormatter:[null]}),u=new o({name:"put",call:"bzz_put",params:2,inputFormatter:[null,null]}),f=new o({name:"modify",call:"bzz_modify",params:4,inputFormatter:[null,null,null,null]});return[t,e,n,r,i,a,s,c,u,f]},s=function(){return[new i({name:"hive",getter:"bzz_hive"}),new i({name:"info",getter:"bzz_info"})]};e.exports=r},{"../method":36,"../property":45}],43:[function(t,e,n){var r=t("../method"),o=function(){var t=function(t){var e=t[0];switch(e){case"latest":return t.shift(),this.params=0,"eth_newBlockFilter";case"pending":return t.shift(),this.params=0,"eth_newPendingTransactionFilter";default:return"eth_newFilter"}},e=new r({name:"newFilter",call:t,params:1}),n=new r({name:"uninstallFilter",call:"eth_uninstallFilter",params:1}),o=new r({name:"getLogs",call:"eth_getFilterLogs",params:1}),i=new r({name:"poll",call:"eth_getFilterChanges",params:1});return[e,n,o,i]},i=function(){var t=new r({name:"newFilter",call:"shh_newFilter",params:1}),e=new r({name:"uninstallFilter",call:"shh_uninstallFilter",params:1}),n=new r({name:"getLogs",call:"shh_getMessages",params:1}),o=new r({name:"poll",call:"shh_getFilterChanges",params:1});return[t,e,n,o]};e.exports={eth:o,shh:i}},{"../method":36}],44:[function(t,e,n){var r=t("../contracts/GlobalRegistrar.json"),o=t("../contracts/ICAPRegistrar.json"),i="0xc6d9d2cd449a754c494264e1809c50e34d64562b",a="0xa1a111bc074c9cfa781f0c38e63bd51c91b8af00";e.exports={global:{abi:r,address:i},icap:{abi:o,address:a}}},{"../contracts/GlobalRegistrar.json":1,"../contracts/ICAPRegistrar.json":2}],45:[function(t,e,n){var r=t("../utils/utils"),o=function(t){this.name=t.name,this.getter=t.getter,this.setter=t.setter,this.outputFormatter=t.outputFormatter,this.inputFormatter=t.inputFormatter,this.requestManager=null};o.prototype.setRequestManager=function(t){this.requestManager=t},o.prototype.formatInput=function(t){return this.inputFormatter?this.inputFormatter(t):t},o.prototype.formatOutput=function(t){return this.outputFormatter&&null!==t&&void 0!==t?this.outputFormatter(t):t},o.prototype.extractCallback=function(t){if(r.isFunction(t[t.length-1]))return t.pop()},o.prototype.attachToObject=function(t){var e={get:this.buildGet(),enumerable:!0},n=this.name.split("."),r=n[0];n.length>1&&(t[n[0]]=t[n[0]]||{},t=t[n[0]],r=n[1]),Object.defineProperty(t,r,e),t[i(r)]=this.buildAsyncGet()};var i=function(t){return"get"+t.charAt(0).toUpperCase()+t.slice(1)};o.prototype.buildGet=function(){var t=this;return function(){return t.formatOutput(t.requestManager.send({method:t.getter}))}},o.prototype.buildAsyncGet=function(){var t=this,e=function(e){t.requestManager.sendAsync({method:t.getter},function(n,r){e(n,t.formatOutput(r))})};return e.request=this.request.bind(this),e},o.prototype.request=function(){var t={method:this.getter,params:[],callback:this.extractCallback(Array.prototype.slice.call(arguments))};return t.format=this.formatOutput.bind(this),t},e.exports=o},{"../utils/utils":20}],46:[function(t,e,n){var r=t("./jsonrpc"),o=t("../utils/utils"),i=t("../utils/config"),a=t("./errors"),s=function(t){this.provider=t,this.polls={},this.timeout=null};s.prototype.send=function(t){if(!this.provider)return console.error(a.InvalidProvider()),null;var e=r.toPayload(t.method,t.params),n=this.provider.send(e);if(!r.isValidResponse(n))throw a.InvalidResponse(n);return n.result},s.prototype.sendAsync=function(t,e){if(!this.provider)return e(a.InvalidProvider());var n=r.toPayload(t.method,t.params);this.provider.sendAsync(n,function(t,n){return t?e(t):r.isValidResponse(n)?void e(null,n.result):e(a.InvalidResponse(n))})},s.prototype.sendBatch=function(t,e){if(!this.provider)return e(a.InvalidProvider());var n=r.toBatchPayload(t);this.provider.sendAsync(n,function(t,n){return t?e(t):o.isArray(n)?void e(t,n):e(a.InvalidResponse(n))})},s.prototype.setProvider=function(t){this.provider=t},s.prototype.startPolling=function(t,e,n,r){this.polls[e]={data:t,id:e,callback:n,uninstall:r},this.timeout||this.poll()},s.prototype.stopPolling=function(t){delete this.polls[t],0===Object.keys(this.polls).length&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.reset=function(t){for(var e in this.polls)t&&e.indexOf("syncPoll_")!==-1||(this.polls[e].uninstall(),delete this.polls[e]);0===Object.keys(this.polls).length&&this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.poll=function(){if(this.timeout=setTimeout(this.poll.bind(this),i.ETH_POLLING_TIMEOUT),0!==Object.keys(this.polls).length){if(!this.provider)return void console.error(a.InvalidProvider());var t=[],e=[];for(var n in this.polls)t.push(this.polls[n].data),e.push(n);if(0!==t.length){var s=r.toBatchPayload(t),c={};s.forEach(function(t,n){c[t.id]=e[n]});var u=this;this.provider.sendAsync(s,function(t,e){if(!t){if(!o.isArray(e))throw a.InvalidResponse(e);e.map(function(t){var e=c[t.id];return!!u.polls[e]&&(t.callback=u.polls[e].callback,t)}).filter(function(t){return!!t}).filter(function(t){var e=r.isValidResponse(t);return e||t.callback(a.InvalidResponse(t)),e}).forEach(function(t){t.callback(null,t.result)})}})}}},e.exports=s},{"../utils/config":18,"../utils/utils":20,"./errors":26,"./jsonrpc":35}],47:[function(t,e,n){var r=function(){this.defaultBlock="latest",this.defaultAccount=void 0};e.exports=r},{}],48:[function(t,e,n){var r=t("./formatters"),o=t("../utils/utils"),i=1,a=function(t){var e=function(e,n){return e?t.callbacks.forEach(function(t){t(e)}):(o.isObject(n)&&n.startingBlock&&(n=r.outputSyncingFormatter(n)),void t.callbacks.forEach(function(e){t.lastSyncState!==n&&(!t.lastSyncState&&o.isObject(n)&&e(null,!0),setTimeout(function(){e(null,n)},0),t.lastSyncState=n)}))};t.requestManager.startPolling({method:"eth_syncing",params:[]},t.pollId,e,t.stopWatching.bind(t))},s=function(t,e){return this.requestManager=t,this.pollId="syncPoll_"+i++,this.callbacks=[],this.addCallback(e),this.lastSyncState=!1,a(this),this};s.prototype.addCallback=function(t){return t&&this.callbacks.push(t),this},s.prototype.stopWatching=function(){this.requestManager.stopPolling(this.pollId),this.callbacks=[]},e.exports=s},{"../utils/utils":20,"./formatters":30}],49:[function(t,e,n){var r=t("./iban"),o=t("../contracts/SmartExchange.json"),i=function(t,e,n,o,i){var c=new r(n);if(!c.isValid())throw new Error("invalid iban address");if(c.isDirect())return a(t,e,c.address(),o,i);if(!i){var u=t.icapNamereg().addr(c.institution());return s(t,e,u,o,c.client())}t.icapNamereg().addr(c.institution(),function(n,r){return s(t,e,r,o,c.client(),i)})},a=function(t,e,n,r,o){return t.sendTransaction({address:n,from:e,value:r},o)},s=function(t,e,n,r,i,a){var s=o;return t.contract(s).at(n).deposit(i,{from:e,value:r},a)};e.exports=i},{"../contracts/SmartExchange.json":3,"./iban":33}],50:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./enc-base64"),t("./md5"),t("./evpkdf"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.lib,r=n.BlockCipher,o=e.algo,i=[],a=[],s=[],c=[],u=[],f=[],l=[],p=[],h=[],d=[];!function(){for(var t=[],e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var n=0,r=0,e=0;e<256;e++){var o=r^r<<1^r<<2^r<<3^r<<4;o=o>>>8^255&o^99,i[n]=o,a[o]=n;var m=t[n],y=t[m],g=t[y],v=257*t[o]^16843008*o;s[n]=v<<24|v>>>8,c[n]=v<<16|v>>>16,u[n]=v<<8|v>>>24,f[n]=v;var v=16843009*g^65537*y^257*m^16843008*n; +l[o]=v<<24|v>>>8,p[o]=v<<16|v>>>16,h[o]=v<<8|v>>>24,d[o]=v,n?(n=m^t[t[t[g^m]]],r^=t[t[r]]):n=r=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],y=o.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=this._nRounds=n+6,o=4*(r+1),a=this._keySchedule=[],s=0;s6&&s%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=c<<8|c>>>24,c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=m[s/n|0]<<24),a[s]=a[s-n]^c}for(var u=this._invKeySchedule=[],f=0;f>>24]]^p[i[c>>>16&255]]^h[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,c,u,f,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,l,p,h,d,a);var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,o,i,a,s){for(var c=this._nRounds,u=t[e]^n[0],f=t[e+1]^n[1],l=t[e+2]^n[2],p=t[e+3]^n[3],h=4,d=1;d>>24]^o[f>>>16&255]^i[l>>>8&255]^a[255&p]^n[h++],y=r[f>>>24]^o[l>>>16&255]^i[p>>>8&255]^a[255&u]^n[h++],g=r[l>>>24]^o[p>>>16&255]^i[u>>>8&255]^a[255&f]^n[h++],v=r[p>>>24]^o[u>>>16&255]^i[f>>>8&255]^a[255&l]^n[h++];u=m,f=y,l=g,p=v}var m=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[l>>>8&255]<<8|s[255&p])^n[h++],y=(s[f>>>24]<<24|s[l>>>16&255]<<16|s[p>>>8&255]<<8|s[255&u])^n[h++],g=(s[l>>>24]<<24|s[p>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[h++],v=(s[p>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&l])^n[h++];t[e]=m,t[e+1]=y,t[e+2]=g,t[e+3]=v},keySize:8});e.AES=r._createHelper(y)}(),t.AES})},{"./cipher-core":51,"./core":52,"./enc-base64":53,"./evpkdf":55,"./md5":60}],51:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){t.lib.Cipher||function(e){var n=t,r=n.lib,o=r.Base,i=r.WordArray,a=r.BufferedBlockAlgorithm,s=n.enc,c=(s.Utf8,s.Base64),u=n.algo,f=u.EvpKDF,l=r.Cipher=a.extend({cfg:o.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?k:_}return function(e){return{encrypt:function(n,r,o){return t(r).encrypt(e,n,r,o)},decrypt:function(n,r,o){return t(r).decrypt(e,n,r,o)}}}}()}),p=(r.StreamCipher=l.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),n.mode={}),h=r.BlockCipherMode=o.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),d=p.CBC=function(){function t(t,n,r){var o=this._iv;if(o){var i=o;this._iv=e}else var i=this._prevBlock;for(var a=0;a>>2];t.sigBytes-=e}},g=(r.BlockCipher=l.extend({cfg:l.cfg.extend({mode:d,padding:y}),reset:function(){l.reset.call(this);var t=this.cfg,e=t.iv,n=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else{var r=n.createDecryptor;this._minBufferSize=1}this._mode=r.call(n,this,e&&e.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else{var e=this._process(!0);t.unpad(e)}return e},blockSize:4}),r.CipherParams=o.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),v=n.format={},b=v.OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;if(n)var r=i.create([1398893684,1701076831]).concat(n).concat(e);else var r=e;return r.toString(c)},parse:function(t){var e=c.parse(t),n=e.words;if(1398893684==n[0]&&1701076831==n[1]){var r=i.create(n.slice(2,4));n.splice(0,4),e.sigBytes-=16}return g.create({ciphertext:e,salt:r})}},_=r.SerializableCipher=o.extend({cfg:o.extend({format:b}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var o=t.createEncryptor(n,r),i=o.finalize(e),a=o.cfg;return g.create({ciphertext:i,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var o=t.createDecryptor(n,r).finalize(e.ciphertext);return o},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),w=n.kdf={},x=w.OpenSSL={execute:function(t,e,n,r){r||(r=i.random(8));var o=f.create({keySize:e+n}).compute(t,r),a=i.create(o.words.slice(e),4*n);return o.sigBytes=4*e,g.create({key:o,iv:a,salt:r})}},k=r.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:x}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var o=r.kdf.execute(n,t.keySize,t.ivSize);r.iv=o.iv;var i=_.encrypt.call(this,t,e,o.key,r);return i.mixIn(o),i},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var o=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);r.iv=o.iv;var i=_.decrypt.call(this,t,e,o.key,r);return i}})}()})},{"./core":52}],52:[function(t,e,n){!function(t,r){"object"==typeof n?e.exports=n=r():"function"==typeof define&&define.amd?define([],r):t.CryptoJS=r()}(this,function(){var t=t||function(t,e){var n=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),r={},o=r.lib={},i=o.Base=function(){return{extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=o.WordArray=i.extend({init:function(t,n){t=this.words=t||[],n!=e?this.sigBytes=n:this.sigBytes=4*t.length},toString:function(t){return(t||c).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,o=t.sigBytes;if(this.clamp(),r%4)for(var i=0;i>>2]>>>24-i%4*8&255;e[r+i>>>2]|=a<<24-(r+i)%4*8}else for(var i=0;i>>2]=n[i>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],o=function(e){var e=e,n=987654321,r=4294967295;return function(){n=36969*(65535&n)+(n>>16)&r,e=18e3*(65535&e)+(e>>16)&r;var o=(n<<16)+e&r;return o/=4294967296,o+=.5,o*(t.random()>.5?1:-1)}},i=0;i>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new a.init(n,e/2)}},u=s.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new a.init(n,e)}},f=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},l=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,s=4*i,c=o/s;c=e?t.ceil(c):t.max((0|c)-this._minBufferSize,0);var u=c*i,f=t.min(4*u,o);if(u){for(var l=0;l>>6-a%4*2;r[i>>>2]|=(s|c)<<24-i%4*8,i++}return o.create(r,i)}var n=t,r=n.lib,o=r.WordArray,i=n.enc;i.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var o=[],i=0;i>>2]>>>24-i%4*8&255,s=e[i+1>>>2]>>>24-(i+1)%4*8&255,c=e[i+2>>>2]>>>24-(i+2)%4*8&255,u=a<<16|s<<8|c,f=0;f<4&&i+.75*f>>6*(3-f)&63));var l=r.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(t){var n=t.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i>>8&16711935}var n=t,r=n.lib,o=r.WordArray,i=n.enc;i.Utf16=i.Utf16BE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o>>2]>>>16-o%4*8&65535;r.push(String.fromCharCode(i))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>1]|=t.charCodeAt(r)<<16-r%2*16;return o.create(n,2*e)}};i.Utf16LE={stringify:function(t){for(var n=t.words,r=t.sigBytes,o=[],i=0;i>>2]>>>16-i%4*8&65535);o.push(String.fromCharCode(a))}return o.join("")},parse:function(t){for(var n=t.length,r=[],i=0;i>>1]|=e(t.charCodeAt(i)<<16-i%2*16);return o.create(r,2*n)}}}(),t.enc.Utf16})},{"./core":52}],55:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./sha1"),t("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.lib,r=n.Base,o=n.WordArray,i=e.algo,a=i.MD5,s=i.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=n.hasher.create(),i=o.create(),a=i.words,s=n.keySize,c=n.iterations;a.lengthr&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),a=this._iKey=e.clone(),s=o.words,c=a.words,u=0;u>>2]|=t[r]<<24-r%4*8;o.call(this,n,e)}else o.apply(this,arguments)};i.prototype=r}}(),t.lib.WordArray})},{"./core":52}],60:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){return function(e){function n(t,e,n,r,o,i,a){var s=t+(e&n|~e&r)+o+a;return(s<>>32-i)+e}function r(t,e,n,r,o,i,a){var s=t+(e&r|n&~r)+o+a;return(s<>>32-i)+e}function o(t,e,n,r,o,i,a){var s=t+(e^n^r)+o+a;return(s<>>32-i)+e}function i(t,e,n,r,o,i,a){var s=t+(n^(e|~r))+o+a;return(s<>>32-i)+e}var a=t,s=a.lib,c=s.WordArray,u=s.Hasher,f=a.algo,l=[];!function(){for(var t=0;t<64;t++)l[t]=4294967296*e.abs(e.sin(t+1))|0}();var p=f.MD5=u.extend({_doReset:function(){this._hash=new c.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var a=0;a<16;a++){var s=e+a,c=t[s];t[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}var u=this._hash.words,f=t[e+0],p=t[e+1],h=t[e+2],d=t[e+3],m=t[e+4],y=t[e+5],g=t[e+6],v=t[e+7],b=t[e+8],_=t[e+9],w=t[e+10],x=t[e+11],k=t[e+12],B=t[e+13],S=t[e+14],C=t[e+15],A=u[0],F=u[1],I=u[2],O=u[3];A=n(A,F,I,O,f,7,l[0]),O=n(O,A,F,I,p,12,l[1]),I=n(I,O,A,F,h,17,l[2]),F=n(F,I,O,A,d,22,l[3]),A=n(A,F,I,O,m,7,l[4]),O=n(O,A,F,I,y,12,l[5]),I=n(I,O,A,F,g,17,l[6]),F=n(F,I,O,A,v,22,l[7]),A=n(A,F,I,O,b,7,l[8]),O=n(O,A,F,I,_,12,l[9]),I=n(I,O,A,F,w,17,l[10]),F=n(F,I,O,A,x,22,l[11]),A=n(A,F,I,O,k,7,l[12]),O=n(O,A,F,I,B,12,l[13]),I=n(I,O,A,F,S,17,l[14]),F=n(F,I,O,A,C,22,l[15]),A=r(A,F,I,O,p,5,l[16]),O=r(O,A,F,I,g,9,l[17]),I=r(I,O,A,F,x,14,l[18]),F=r(F,I,O,A,f,20,l[19]),A=r(A,F,I,O,y,5,l[20]),O=r(O,A,F,I,w,9,l[21]),I=r(I,O,A,F,C,14,l[22]),F=r(F,I,O,A,m,20,l[23]),A=r(A,F,I,O,_,5,l[24]),O=r(O,A,F,I,S,9,l[25]),I=r(I,O,A,F,d,14,l[26]),F=r(F,I,O,A,b,20,l[27]),A=r(A,F,I,O,B,5,l[28]),O=r(O,A,F,I,h,9,l[29]),I=r(I,O,A,F,v,14,l[30]),F=r(F,I,O,A,k,20,l[31]),A=o(A,F,I,O,y,4,l[32]),O=o(O,A,F,I,b,11,l[33]),I=o(I,O,A,F,x,16,l[34]),F=o(F,I,O,A,S,23,l[35]),A=o(A,F,I,O,p,4,l[36]),O=o(O,A,F,I,m,11,l[37]),I=o(I,O,A,F,v,16,l[38]),F=o(F,I,O,A,w,23,l[39]),A=o(A,F,I,O,B,4,l[40]),O=o(O,A,F,I,f,11,l[41]),I=o(I,O,A,F,d,16,l[42]),F=o(F,I,O,A,g,23,l[43]),A=o(A,F,I,O,_,4,l[44]),O=o(O,A,F,I,k,11,l[45]),I=o(I,O,A,F,C,16,l[46]),F=o(F,I,O,A,h,23,l[47]),A=i(A,F,I,O,f,6,l[48]),O=i(O,A,F,I,v,10,l[49]),I=i(I,O,A,F,S,15,l[50]),F=i(F,I,O,A,y,21,l[51]),A=i(A,F,I,O,k,6,l[52]),O=i(O,A,F,I,d,10,l[53]),I=i(I,O,A,F,w,15,l[54]),F=i(F,I,O,A,p,21,l[55]),A=i(A,F,I,O,b,6,l[56]),O=i(O,A,F,I,C,10,l[57]),I=i(I,O,A,F,g,15,l[58]),F=i(F,I,O,A,B,21,l[59]),A=i(A,F,I,O,m,6,l[60]),O=i(O,A,F,I,x,10,l[61]),I=i(I,O,A,F,h,15,l[62]),F=i(F,I,O,A,_,21,l[63]),u[0]=u[0]+A|0,u[1]=u[1]+F|0,u[2]=u[2]+I|0,u[3]=u[3]+O|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var i=e.floor(r/4294967296),a=r;n[(o+64>>>9<<4)+15]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),n[(o+64>>>9<<4)+14]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,c=s.words,u=0;u<4;u++){var f=c[u];c[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return s},clone:function(){var t=u.clone.call(this);return t._hash=this._hash.clone(),t}});a.MD5=u._createHelper(p),a.HmacMD5=u._createHmacHelper(p)}(Math),t.MD5})},{"./core":52}],61:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return t.mode.CFB=function(){function e(t,e,n,r){var o=this._iv;if(o){var i=o.slice(0);this._iv=void 0}else var i=this._prevBlock;r.encryptBlock(i,0);for(var a=0;a>24&255)){var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}function n(t){return 0===(t[0]=e(t[0]))&&(t[1]=e(t[1])),t}var r=t.lib.BlockCipherMode.extend(),o=r.Encryptor=r.extend({processBlock:function(t,e){var r=this._cipher,o=r.blockSize,i=this._iv,a=this._counter;i&&(a=this._counter=i.slice(0),this._iv=void 0),n(a);var s=a.slice(0);r.encryptBlock(s,0);for(var c=0;c>>2]|=o<<24-i%4*8,t.sigBytes+=o},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Ansix923})},{"./cipher-core":51,"./core":52}],67:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return t.pad.Iso10126={pad:function(e,n){var r=4*n,o=r-e.sigBytes%r;e.concat(t.lib.WordArray.random(o-1)).concat(t.lib.WordArray.create([o<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Iso10126})},{"./cipher-core":51,"./core":52}],68:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return t.pad.Iso97971={pad:function(e,n){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,n)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971})},{"./cipher-core":51,"./core":52}],69:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})},{"./cipher-core":51,"./core":52}],70:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return t.pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){for(var e=t.words,n=t.sigBytes-1;!(e[n>>>2]>>>24-n%4*8&255);)n--;t.sigBytes=n+1}},t.pad.ZeroPadding})},{"./cipher-core":51,"./core":52}],71:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./sha1"),t("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.lib,r=n.Base,o=n.WordArray,i=e.algo,a=i.SHA1,s=i.HMAC,c=i.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=s.create(n.hasher,t),i=o.create(),a=o.create([1]),c=i.words,u=a.words,f=n.keySize,l=n.iterations;c.length>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(var n=0;n<8;n++){var r=t[n]+e[n],o=65535&r,i=r>>>16,a=((o*o>>>17)+o*i>>>15)+i*i,u=((4294901760&r)*r|0)+((65535&r)*r|0);c[n]=a^u}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var n=t,r=n.lib,o=r.StreamCipher,i=n.algo,a=[],s=[],c=[],u=i.RabbitLegacy=o.extend({_doReset:function(){var t=this._key.words,n=this.cfg.iv,r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],o=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)e.call(this);for(var i=0;i<8;i++)o[i]^=r[i+4&7];if(n){var a=n.words,s=a[0],c=a[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=u>>>16|4294901760&f,p=f<<16|65535&u;o[0]^=u,o[1]^=l,o[2]^=f,o[3]^=p,o[4]^=u,o[5]^=l,o[6]^=f,o[7]^=p;for(var i=0;i<4;i++)e.call(this)}},_doProcessBlock:function(t,n){var r=this._X;e.call(this),a[0]=r[0]^r[5]>>>16^r[3]<<16,a[1]=r[2]^r[7]>>>16^r[5]<<16,a[2]=r[4]^r[1]>>>16^r[7]<<16,a[3]=r[6]^r[3]>>>16^r[1]<<16;for(var o=0;o<4;o++)a[o]=16711935&(a[o]<<8|a[o]>>>24)|4278255360&(a[o]<<24|a[o]>>>8),t[n+o]^=a[o]},blockSize:4,ivSize:2});n.RabbitLegacy=o._createHelper(u)}(),t.RabbitLegacy})},{"./cipher-core":51,"./core":52,"./enc-base64":53,"./evpkdf":55,"./md5":60}],73:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./enc-base64"),t("./md5"),t("./evpkdf"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return function(){function e(){for(var t=this._X,e=this._C,n=0;n<8;n++)s[n]=e[n];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(var n=0;n<8;n++){var r=t[n]+e[n],o=65535&r,i=r>>>16,a=((o*o>>>17)+o*i>>>15)+i*i,u=((4294901760&r)*r|0)+((65535&r)*r|0);c[n]=a^u}t[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,t[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,t[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,t[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,t[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,t[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,t[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,t[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0}var n=t,r=n.lib,o=r.StreamCipher,i=n.algo,a=[],s=[],c=[],u=i.Rabbit=o.extend({_doReset:function(){for(var t=this._key.words,n=this.cfg.iv,r=0;r<4;r++)t[r]=16711935&(t[r]<<8|t[r]>>>24)|4278255360&(t[r]<<24|t[r]>>>8);var o=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var r=0;r<4;r++)e.call(this);for(var r=0;r<8;r++)i[r]^=o[r+4&7];if(n){var a=n.words,s=a[0],c=a[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),f=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=u>>>16|4294901760&f,p=f<<16|65535&u;i[0]^=u,i[1]^=l,i[2]^=f,i[3]^=p,i[4]^=u,i[5]^=l,i[6]^=f,i[7]^=p;for(var r=0;r<4;r++)e.call(this)}},_doProcessBlock:function(t,n){var r=this._X;e.call(this),a[0]=r[0]^r[5]>>>16^r[3]<<16,a[1]=r[2]^r[7]>>>16^r[5]<<16,a[2]=r[4]^r[1]>>>16^r[7]<<16,a[3]=r[6]^r[3]>>>16^r[1]<<16;for(var o=0;o<4;o++)a[o]=16711935&(a[o]<<8|a[o]>>>24)|4278255360&(a[o]<<24|a[o]>>>8),t[n+o]^=a[o]},blockSize:4,ivSize:2});n.Rabbit=o._createHelper(u)}(),t.Rabbit})},{"./cipher-core":51,"./core":52,"./enc-base64":53,"./evpkdf":55,"./md5":60}],74:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./enc-base64"),t("./md5"),t("./evpkdf"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return function(){function e(){for(var t=this._S,e=this._i,n=this._j,r=0,o=0;o<4;o++){e=(e+1)%256,n=(n+t[e])%256;var i=t[e];t[e]=t[n],t[n]=i,r|=t[(t[e]+t[n])%256]<<24-8*o}return this._i=e,this._j=n,r}var n=t,r=n.lib,o=r.StreamCipher,i=n.algo,a=i.RC4=o.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],o=0;o<256;o++)r[o]=o;for(var o=0,i=0;o<256;o++){var a=o%n,s=e[a>>>2]>>>24-a%4*8&255;i=(i+r[o]+s)%256;var c=r[o];r[o]=r[i],r[i]=c}this._i=this._j=0},_doProcessBlock:function(t,n){t[n]^=e.call(this)},keySize:8,ivSize:0});n.RC4=o._createHelper(a);var s=i.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)e.call(this)}});n.RC4Drop=o._createHelper(s)}(),t.RC4})},{"./cipher-core":51,"./core":52,"./enc-base64":53,"./evpkdf":55,"./md5":60}],75:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS); +}(this,function(t){return function(e){function n(t,e,n){return t^e^n}function r(t,e,n){return t&e|~t&n}function o(t,e,n){return(t|~e)^n}function i(t,e,n){return t&n|e&~n}function a(t,e,n){return t^(e|~n)}function s(t,e){return t<>>32-e}var c=t,u=c.lib,f=u.WordArray,l=u.Hasher,p=c.algo,h=f.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),d=f.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),m=f.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),y=f.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),g=f.create([0,1518500249,1859775393,2400959708,2840853838]),v=f.create([1352829926,1548603684,1836072691,2053994217,0]),b=p.RIPEMD160=l.extend({_doReset:function(){this._hash=f.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var c=0;c<16;c++){var u=e+c,f=t[u];t[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}var l,p,b,_,w,x,k,B,S,C,A=this._hash.words,F=g.words,I=v.words,O=h.words,N=d.words,T=m.words,D=y.words;x=l=A[0],k=p=A[1],B=b=A[2],S=_=A[3],C=w=A[4];for(var R,c=0;c<80;c+=1)R=l+t[e+O[c]]|0,R+=c<16?n(p,b,_)+F[0]:c<32?r(p,b,_)+F[1]:c<48?o(p,b,_)+F[2]:c<64?i(p,b,_)+F[3]:a(p,b,_)+F[4],R|=0,R=s(R,T[c]),R=R+w|0,l=w,w=_,_=s(b,10),b=p,p=R,R=x+t[e+N[c]]|0,R+=c<16?a(k,B,S)+I[0]:c<32?i(k,B,S)+I[1]:c<48?o(k,B,S)+I[2]:c<64?r(k,B,S)+I[3]:n(k,B,S)+I[4],R|=0,R=s(R,D[c]),R=R+C|0,x=C,C=S,S=s(B,10),B=k,k=R;R=A[1]+b+S|0,A[1]=A[2]+_+C|0,A[2]=A[3]+w+x|0,A[3]=A[4]+l+k|0,A[4]=A[0]+p+B|0,A[0]=R},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[(r+64>>>9<<4)+14]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<5;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var t=l.clone.call(this);return t._hash=this._hash.clone(),t}});c.RIPEMD160=l._createHelper(b),c.HmacRIPEMD160=l._createHmacHelper(b)}(Math),t.RIPEMD160})},{"./core":52}],76:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.lib,r=n.WordArray,o=n.Hasher,i=e.algo,a=[],s=i.SHA1=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],s=n[3],c=n[4],u=0;u<80;u++){if(u<16)a[u]=0|t[e+u];else{var f=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=f<<1|f>>>31}var l=(r<<5|r>>>27)+c+a[u];l+=u<20?(o&i|~o&s)+1518500249:u<40?(o^i^s)+1859775393:u<60?(o&i|o&s|i&s)-1894007588:(o^i^s)-899497514,c=s,s=i,i=o<<30|o>>>2,o=r,r=l}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),e[(r+64>>>9<<4)+15]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA1=o._createHelper(s),e.HmacSHA1=o._createHmacHelper(s)}(),t.SHA1})},{"./core":52}],77:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./sha256")):"function"==typeof define&&define.amd?define(["./core","./sha256"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.lib,r=n.WordArray,o=e.algo,i=o.SHA256,a=o.SHA224=i.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=i._doFinalize.call(this);return t.sigBytes-=4,t}});e.SHA224=i._createHelper(a),e.HmacSHA224=i._createHmacHelper(a)}(),t.SHA224})},{"./core":52,"./sha256":78}],78:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){return function(e){var n=t,r=n.lib,o=r.WordArray,i=r.Hasher,a=n.algo,s=[],c=[];!function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,o=0;o<64;)t(r)&&(o<8&&(s[o]=n(e.pow(r,.5))),c[o]=n(e.pow(r,1/3)),o++),r++}();var u=[],f=a.SHA256=i.extend({_doReset:function(){this._hash=new o.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],f=n[5],l=n[6],p=n[7],h=0;h<64;h++){if(h<16)u[h]=0|t[e+h];else{var d=u[h-15],m=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,y=u[h-2],g=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;u[h]=m+u[h-7]+g+u[h-16]}var v=s&f^~s&l,b=r&o^r&i^o&i,_=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),x=p+w+v+c[h]+u[h],k=_+b;p=l,l=f,f=s,s=a+x|0,a=i,i=o,o=r,r=x+k|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+f|0,n[6]=n[6]+l|0,n[7]=n[7]+p|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[(o+64>>>9<<4)+14]=e.floor(r/4294967296),n[(o+64>>>9<<4)+15]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});n.SHA256=i._createHelper(f),n.HmacSHA256=i._createHmacHelper(f)}(Math),t.SHA256})},{"./core":52}],79:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],o):o(r.CryptoJS)}(this,function(t){return function(e){var n=t,r=n.lib,o=r.WordArray,i=r.Hasher,a=n.x64,s=a.Word,c=n.algo,u=[],f=[],l=[];!function(){for(var t=1,e=0,n=0;n<24;n++){u[t+5*e]=(n+1)*(n+2)/2%64;var r=e%5,o=(2*t+3*e)%5;t=r,e=o}for(var t=0;t<5;t++)for(var e=0;e<5;e++)f[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,a=0;a<24;a++){for(var c=0,p=0,h=0;h<7;h++){if(1&i){var d=(1<>>24)|4278255360&(i<<24|i>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8);var s=n[o];s.high^=a,s.low^=i}for(var c=0;c<24;c++){for(var h=0;h<5;h++){for(var d=0,m=0,y=0;y<5;y++){var s=n[h+5*y];d^=s.high,m^=s.low}var g=p[h];g.high=d,g.low=m}for(var h=0;h<5;h++)for(var v=p[(h+4)%5],b=p[(h+1)%5],_=b.high,w=b.low,d=v.high^(_<<1|w>>>31),m=v.low^(w<<1|_>>>31),y=0;y<5;y++){var s=n[h+5*y];s.high^=d,s.low^=m}for(var x=1;x<25;x++){var s=n[x],k=s.high,B=s.low,S=u[x];if(S<32)var d=k<>>32-S,m=B<>>32-S;else var d=B<>>64-S,m=k<>>64-S;var C=p[f[x]];C.high=d,C.low=m}var A=p[0],F=n[0];A.high=F.high,A.low=F.low;for(var h=0;h<5;h++)for(var y=0;y<5;y++){var x=h+5*y,s=n[x],I=p[x],O=p[(h+1)%5+5*y],N=p[(h+2)%5+5*y];s.high=I.high^~O.high&N.high,s.low=I.low^~O.low&N.low}var s=n[0],T=l[c];s.high^=T.high,s.low^=T.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(8*this._nDataBytes,8*t.sigBytes),i=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/i)*i>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,c=s/8,u=[],f=0;f>>24)|4278255360&(p<<24|p>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),u.push(h),u.push(p)}return new o.init(u,s)},clone:function(){for(var t=i.clone.call(this),e=t._state=this._state.slice(0),n=0;n<25;n++)e[n]=e[n].clone();return t}});n.SHA3=i._createHelper(h),n.HmacSHA3=i._createHmacHelper(h)}(Math),t.SHA3})},{"./core":52,"./x64-core":83}],80:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./x64-core"),t("./sha512")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./sha512"],o):o(r.CryptoJS)}(this,function(t){return function(){var e=t,n=e.x64,r=n.Word,o=n.WordArray,i=e.algo,a=i.SHA512,s=i.SHA384=a.extend({_doReset:function(){this._hash=new o.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var t=a._doFinalize.call(this);return t.sigBytes-=16,t}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)}(),t.SHA384})},{"./core":52,"./sha512":81,"./x64-core":83}],81:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],o):o(r.CryptoJS)}(this,function(t){return function(){function e(){return a.create.apply(a,arguments)}var n=t,r=n.lib,o=r.Hasher,i=n.x64,a=i.Word,s=i.WordArray,c=n.algo,u=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],f=[];!function(){for(var t=0;t<80;t++)f[t]=e()}();var l=c.SHA512=o.extend({_doReset:function(){this._hash=new s.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],c=n[5],l=n[6],p=n[7],h=r.high,d=r.low,m=o.high,y=o.low,g=i.high,v=i.low,b=a.high,_=a.low,w=s.high,x=s.low,k=c.high,B=c.low,S=l.high,C=l.low,A=p.high,F=p.low,I=h,O=d,N=m,T=y,D=g,R=v,E=b,P=_,M=w,H=x,j=k,q=B,z=S,L=C,U=A,W=F,J=0;J<80;J++){var G=f[J];if(J<16)var $=G.high=0|t[e+2*J],X=G.low=0|t[e+2*J+1];else{var V=f[J-15],K=V.high,Z=V.low,Y=(K>>>1|Z<<31)^(K>>>8|Z<<24)^K>>>7,Q=(Z>>>1|K<<31)^(Z>>>8|K<<24)^(Z>>>7|K<<25),tt=f[J-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,ot=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),it=f[J-7],at=it.high,st=it.low,ct=f[J-16],ut=ct.high,ft=ct.low,X=Q+st,$=Y+at+(X>>>0>>0?1:0),X=X+ot,$=$+rt+(X>>>0>>0?1:0),X=X+ft,$=$+ut+(X>>>0>>0?1:0);G.high=$,G.low=X}var lt=M&j^~M&z,pt=H&q^~H&L,ht=I&N^I&D^N&D,dt=O&T^O&R^T&R,mt=(I>>>28|O<<4)^(I<<30|O>>>2)^(I<<25|O>>>7),yt=(O>>>28|I<<4)^(O<<30|I>>>2)^(O<<25|I>>>7),gt=(M>>>14|H<<18)^(M>>>18|H<<14)^(M<<23|H>>>9),vt=(H>>>14|M<<18)^(H>>>18|M<<14)^(H<<23|M>>>9),bt=u[J],_t=bt.high,wt=bt.low,xt=W+vt,kt=U+gt+(xt>>>0>>0?1:0),xt=xt+pt,kt=kt+lt+(xt>>>0>>0?1:0),xt=xt+wt,kt=kt+_t+(xt>>>0>>0?1:0),xt=xt+X,kt=kt+$+(xt>>>0>>0?1:0),Bt=yt+dt,St=mt+ht+(Bt>>>0>>0?1:0);U=z,W=L,z=j,L=q,j=M,q=H,H=P+xt|0,M=E+kt+(H>>>0

                                                          >>0?1:0)|0,E=D,P=R,D=N,R=T,N=I,T=O,O=xt+Bt|0,I=kt+St+(O>>>0>>0?1:0)|0}d=r.low=d+O,r.high=h+I+(d>>>0>>0?1:0),y=o.low=y+T,o.high=m+N+(y>>>0>>0?1:0),v=i.low=v+R,i.high=g+D+(v>>>0>>0?1:0),_=a.low=_+P,a.high=b+E+(_>>>0

                                                          >>0?1:0),x=s.low=x+H,s.high=w+M+(x>>>0>>0?1:0),B=c.low=B+q,c.high=k+j+(B>>>0>>0?1:0),C=l.low=C+L,l.high=S+z+(C>>>0>>0?1:0),F=p.low=F+W,p.high=A+U+(F>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[(r+128>>>10<<5)+30]=Math.floor(n/4294967296),e[(r+128>>>10<<5)+31]=n,t.sigBytes=4*e.length,this._process();var o=this._hash.toX32();return o},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});n.SHA512=o._createHelper(l),n.HmacSHA512=o._createHmacHelper(l)}(),t.SHA512})},{"./core":52,"./x64-core":83}],82:[function(t,e,n){!function(r,o,i){"object"==typeof n?e.exports=n=o(t("./core"),t("./enc-base64"),t("./md5"),t("./evpkdf"),t("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],o):o(r.CryptoJS)}(this,function(t){return function(){function e(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<>>5]>>>31-o%32&1}for(var i=this._subKeys=[],a=0;a<16;a++){for(var s=i[a]=[],l=f[a],r=0;r<24;r++)s[r/6|0]|=n[(u[r]-1+l)%28]<<31-r%6,s[4+(r/6|0)]|=n[28+(u[r+24]-1+l)%28]<<31-r%6;s[0]=s[0]<<1|s[0]>>>31;for(var r=1;r<7;r++)s[r]=s[r]>>>4*(r-1)+3;s[7]=s[7]<<5|s[7]>>>27}for(var p=this._invSubKeys=[],r=0;r<16;r++)p[r]=i[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,r,o){this._lBlock=t[r],this._rBlock=t[r+1],e.call(this,4,252645135),e.call(this,16,65535),n.call(this,2,858993459),n.call(this,8,16711935),e.call(this,1,1431655765);for(var i=0;i<16;i++){for(var a=o[i],s=this._lBlock,c=this._rBlock,u=0,f=0;f<8;f++)u|=l[f][((c^a[f])&p[f])>>>0];this._lBlock=c,this._rBlock=s^u}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,e.call(this,1,1431655765),n.call(this,8,16711935),n.call(this,2,858993459),e.call(this,16,65535),e.call(this,4,252645135),t[r]=this._lBlock,t[r+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});r.DES=a._createHelper(h);var d=s.TripleDES=a.extend({_doReset:function(){var t=this._key,e=t.words;this._des1=h.createEncryptor(i.create(e.slice(0,2))),this._des2=h.createEncryptor(i.create(e.slice(2,4))),this._des3=h.createEncryptor(i.create(e.slice(4,6)))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});r.TripleDES=a._createHelper(d)}(),t.TripleDES})},{"./cipher-core":51,"./core":52,"./enc-base64":53,"./evpkdf":55,"./md5":60}],83:[function(t,e,n){!function(r,o){"object"==typeof n?e.exports=n=o(t("./core")):"function"==typeof define&&define.amd?define(["./core"],o):o(r.CryptoJS)}(this,function(t){return function(e){var n=t,r=n.lib,o=r.Base,i=r.WordArray,a=n.x64={};a.Word=o.extend({init:function(t,e){this.high=t,this.low=e}}),a.WordArray=o.extend({init:function(t,n){t=this.words=t||[],n!=e?this.sigBytes=n:this.sigBytes=8*t.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;r=55296&&e<=56319&&o65535&&(e-=65536,o+=v(e>>>10&1023|55296),e=56320|1023&e),o+=v(e);return o}function i(t){if(t>=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function a(t,e){return v(t>>e&63|128)}function s(t){if(0==(4294967168&t))return v(t);var e="";return 0==(4294965248&t)?e=v(t>>6&31|192):0==(4294901760&t)?(i(t),e=v(t>>12&15|224),e+=a(t,6)):0==(4292870144&t)&&(e=v(t>>18&7|240),e+=a(t,12),e+=a(t,6)),e+=v(63&t|128)}function c(t){for(var e,n=r(t),o=n.length,i=-1,a="";++i=y)throw Error("Invalid byte index");var t=255&m[g];if(g++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function f(){var t,e,n,r,o;if(g>y)throw Error("Invalid byte index");if(g==y)return!1;if(t=255&m[g],g++,0==(128&t))return t;if(192==(224&t)){if(e=u(),o=(31&t)<<6|e,o>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){if(e=u(),n=u(),o=(15&t)<<12|e<<6|n,o>=2048)return i(o),o;throw Error("Invalid continuation byte")}if(240==(248&t)&&(e=u(),n=u(),r=u(),o=(7&t)<<18|e<<12|n<<6|r,o>=65536&&o<=1114111))return o;throw Error("Invalid UTF-8 detected")}function l(t){m=r(t),y=m.length,g=0;for(var e,n=[];(e=f())!==!1;)n.push(e);return o(n)}var p="object"==typeof n&&n,h="object"==typeof e&&e&&e.exports==p&&e,d="object"==typeof global&&global;d.global!==d&&d.window!==d||(t=d);var m,y,g,v=String.fromCharCode,b={version:"2.1.2",encode:c,decode:l};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return b});else if(p&&!p.nodeType)if(h)h.exports=b;else{var _={},w=_.hasOwnProperty;for(var x in b)w.call(b,x)&&(p[x]=b[x])}else t.utf8=b}(this)},{}],85:[function(t,e,n){e.exports=XMLHttpRequest},{}],"bignumber.js":[function(t,e,n){!function(t){"use strict";function n(t){function e(t,n){var r,o,i,a,s,c,u=this;if(!(u instanceof e))return U&&O(26,"constructor call without new",t),new e(t,n);if(null!=n&&W(n,2,64,R,"base")){if(n|=0,c=t+"",10==n)return u=new e(t instanceof e?t:c),N(u,M+u.e+1,H);if((a="number"==typeof t)&&0*t!=0||!new RegExp("^-?"+(r="["+b.slice(0,n)+"]+")+"(?:\\."+r+")?$",n<37?"i":"").test(c))return D(u,c,a,n);a?(u.s=1/t<0?(c=c.slice(1),-1):1,U&&c.replace(/^0\.0*|\./,"").length>15&&O(R,v,t),a=!1):u.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=p(c,10,n,u.s)}else{if(t instanceof e)return u.s=t.s,u.e=t.e,u.c=(t=t.c)?t.slice():t,void(R=0);if((a="number"==typeof t)&&0*t==0){if(u.s=1/t<0?(t=-t,-1):1,t===~~t){for(o=0,i=t;i>=10;i/=10,o++);return u.e=o,u.c=[t],void(R=0)}c=t+""}else{if(!h.test(c=t+""))return D(u,c,a);u.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(i=c.search(/e/i))>0?(o<0&&(o=i),o+=+c.slice(i+1),c=c.substring(0,i)):o<0&&(o=c.length),i=0;48===c.charCodeAt(i);i++);for(s=c.length;48===c.charCodeAt(--s););if(c=c.slice(i,s+1))if(s=c.length,a&&U&&s>15&&(t>x||t!==m(t))&&O(R,v,u.s*t),o=o-i-1,o>L)u.c=u.e=null;else if(o=0&&(u=$,$=0,t=t.replace(".",""),d=new e(r),p=d.pow(t.length-m),$=u,d.c=c(f(o(p.c),p.e),10,n),d.e=d.c.length),h=c(t,r,n),s=u=h.length;0==h[--u];h.pop());if(!h[0])return"0";if(m<0?--s:(p.c=h,p.e=s,p.s=i,p=T(p,d,y,g,n),h=p.c,l=p.r,s=p.e),a=s+y+1,m=h[a],u=n/2,l=l||a<0||null!=h[a+1],l=g<4?(null!=m||l)&&(0==g||g==(p.s<0?3:2)):m>u||m==u&&(4==g||l||6==g&&1&h[a-1]||g==(p.s<0?8:7)),a<1||!h[0])t=l?f("1",-y):"0";else{if(h.length=a,l)for(--n;++h[--a]>n;)h[a]=0,a||(++s,h=[1].concat(h));for(u=h.length;!h[--u];);for(m=0,t="";m<=u;t+=b.charAt(h[m++]));t=f(t,s)}return t}function C(t,n,r,i){var a,s,c,l,p;if(r=null!=r&&W(r,0,8,i,g)?0|r:H,!t.c)return t.toString();if(a=t.c[0],c=t.e,null==n)p=o(t.c),p=19==i||24==i&&c<=j?u(p,c):f(p,c);else if(t=N(new e(t),n,r),s=t.e,p=o(t.c),l=p.length,19==i||24==i&&(n<=s||s<=j)){for(;ll){if(--n>0)for(p+=".";n--;p+="0");}else if(n+=s-l,n>0)for(s+1==l&&(p+=".");n--;p+="0");return t.s<0&&a?"-"+p:p}function A(t,n){var r,o,i=0;for(s(t[0])&&(t=t[0]),r=new e(t[0]);++in||t!=l(t))&&O(r,(o||"decimal places")+(tn?" out of range":" not an integer"),t),!0}function I(t,e,n){for(var r=1,o=e.length;!e[--o];e.pop());for(o=e[0];o>=10;o/=10,r++);return(n=r+n*w-1)>L?t.c=t.e=null:n=10;s/=10,o++);if(i=e-o,i<0)i+=w,a=e,c=l[u=0],f=c/p[o-a-1]%10|0;else if(u=d((i+1)/w),u>=l.length){if(!r)break t;for(;l.length<=u;l.push(0));c=f=0,o=1,i%=w,a=i-w+1}else{for(c=s=l[u],o=1;s>=10;s/=10,o++);i%=w,a=i-w+o,f=a<0?0:c/p[o-a-1]%10|0}if(r=r||e<0||null!=l[u+1]||(a<0?c:c%p[o-a-1]),r=n<4?(f||r)&&(0==n||n==(t.s<0?3:2)):f>5||5==f&&(4==n||r||6==n&&(i>0?a>0?c/p[o-a]:0:l[u-1])%10&1||n==(t.s<0?8:7)),e<1||!l[0])return l.length=0,r?(e-=t.e+1,l[0]=p[(w-e%w)%w],t.e=-e||0):l[0]=t.e=0,t;if(0==i?(l.length=u,s=1,u--):(l.length=u+1,s=p[w-i],l[u]=a>0?m(c/p[o-a]%p[a])*s:0),r)for(;;){if(0==u){for(i=1,a=l[0];a>=10;a/=10,i++);for(a=l[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(t.e++,l[0]==_&&(l[0]=1));break}if(l[u]+=s,l[u]!=_)break;l[u--]=0,s=1}for(i=l.length;0===l[--i];l.pop());}t.e>L?t.c=t.e=null:t.en)return null!=(t=o[n++])};return c(e="DECIMAL_PLACES")&&W(t,0,S,2,e)&&(M=0|t), +r[e]=M,c(e="ROUNDING_MODE")&&W(t,0,8,2,e)&&(H=0|t),r[e]=H,c(e="EXPONENTIAL_AT")&&(s(t)?W(t[0],-S,0,2,e)&&W(t[1],0,S,2,e)&&(j=0|t[0],q=0|t[1]):W(t,-S,S,2,e)&&(j=-(q=0|(t<0?-t:t)))),r[e]=[j,q],c(e="RANGE")&&(s(t)?W(t[0],-S,-1,2,e)&&W(t[1],1,S,2,e)&&(z=0|t[0],L=0|t[1]):W(t,-S,S,2,e)&&(0|t?z=-(L=0|(t<0?-t:t)):U&&O(2,e+" cannot be zero",t))),r[e]=[z,L],c(e="ERRORS")&&(t===!!t||1===t||0===t?(R=0,W=(U=!!t)?F:a):U&&O(2,e+y,t)),r[e]=U,c(e="CRYPTO")&&(t===!0||t===!1||1===t||0===t?t?(t="undefined"==typeof crypto,!t&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?J=!0:U?O(2,"crypto unavailable",t?void 0:crypto):J=!1):J=!1:U&&O(2,e+y,t)),r[e]=J,c(e="MODULO_MODE")&&W(t,0,9,2,e)&&(G=0|t),r[e]=G,c(e="POW_PRECISION")&&W(t,0,S,2,e)&&($=0|t),r[e]=$,c(e="FORMAT")&&("object"==typeof t?X=t:U&&O(2,e+" not an object",t)),r[e]=X,r},e.max=function(){return A(arguments,E.lt)},e.min=function(){return A(arguments,E.gt)},e.random=function(){var t=9007199254740992,n=Math.random()*t&2097151?function(){return m(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var r,o,i,a,s,c=0,u=[],f=new e(P);if(t=null!=t&&W(t,0,S,14)?0|t:M,a=d(t/w),J)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(a*=2));c>>11),s>=9e15?(o=crypto.getRandomValues(new Uint32Array(2)),r[c]=o[0],r[c+1]=o[1]):(u.push(s%1e14),c+=2);c=a/2}else if(crypto.randomBytes){for(r=crypto.randomBytes(a*=7);c=9e15?crypto.randomBytes(7).copy(r,c):(u.push(s%1e14),c+=7);c=a/7}else J=!1,U&&O(14,"crypto unavailable",crypto);if(!J)for(;c=10;s/=10,c++);cr?1:-1;else for(o=i=0;oe[o]?1:-1;break}return i}function o(t,e,n,r){for(var o=0;n--;)t[n]-=o,o=t[n]1;t.splice(0,1));}return function(i,a,s,c,u){var f,l,p,h,d,y,g,v,b,x,k,B,S,C,A,F,I,O=i.s==a.s?1:-1,T=i.c,D=a.c;if(!(T&&T[0]&&D&&D[0]))return new e(i.s&&a.s&&(T?!D||T[0]!=D[0]:D)?T&&0==T[0]||!D?0*O:O/0:NaN);for(v=new e(O),b=v.c=[],l=i.e-a.e,O=s+l+1,u||(u=_,l=r(i.e/w)-r(a.e/w),O=O/w|0),p=0;D[p]==(T[p]||0);p++);if(D[p]>(T[p]||0)&&l--,O<0)b.push(1),h=!0;else{for(C=T.length,F=D.length,p=0,O+=2,d=m(u/(D[0]+1)),d>1&&(D=t(D,d,u),T=t(T,d,u),F=D.length,C=T.length),S=F,x=T.slice(0,F),k=x.length;k=u/2&&A++;do{if(d=0,f=n(D,x,F,k),f<0){if(B=x[0],F!=k&&(B=B*u+(x[1]||0)),d=m(B/A),d>1)for(d>=u&&(d=u-1),y=t(D,d,u),g=y.length,k=x.length;1==n(y,x,g,k);)d--,o(y,F=10;O/=10,p++);N(v,s+(v.e=p+l*w-1)+1,c,h)}else v.e=l,v.r=+h;return v}}(),D=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,o=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,s,c,u){var f,l=c?s:s.replace(i,"");if(o.test(l))a.s=isNaN(l)?null:l<0?-1:1;else{if(!c&&(l=l.replace(t,function(t,e,n){return f="x"==(n=n.toLowerCase())?16:"b"==n?2:8,u&&u!=f?t:e}),u&&(f=u,l=l.replace(n,"$1").replace(r,"0.$1")),s!=l))return new e(l,f);U&&O(R,"not a"+(u?" base "+u:"")+" number",s),a.s=null}a.c=a.e=null,R=0}}(),E.absoluteValue=E.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},E.ceil=function(){return N(new e(this),this.e+1,2)},E.comparedTo=E.cmp=function(t,n){return R=1,i(this,new e(t,n))},E.decimalPlaces=E.dp=function(){var t,e,n=this.c;if(!n)return null;if(t=((e=n.length-1)-r(this.e/w))*w,e=n[e])for(;e%10==0;e/=10,t--);return t<0&&(t=0),t},E.dividedBy=E.div=function(t,n){return R=3,T(this,new e(t,n),M,H)},E.dividedToIntegerBy=E.divToInt=function(t,n){return R=4,T(this,new e(t,n),0,1)},E.equals=E.eq=function(t,n){return R=5,0===i(this,new e(t,n))},E.floor=function(){return N(new e(this),this.e+1,3)},E.greaterThan=E.gt=function(t,n){return R=6,i(this,new e(t,n))>0},E.greaterThanOrEqualTo=E.gte=function(t,n){return R=7,1===(n=i(this,new e(t,n)))||0===n},E.isFinite=function(){return!!this.c},E.isInteger=E.isInt=function(){return!!this.c&&r(this.e/w)>this.c.length-2},E.isNaN=function(){return!this.s},E.isNegative=E.isNeg=function(){return this.s<0},E.isZero=function(){return!!this.c&&0==this.c[0]},E.lessThan=E.lt=function(t,n){return R=8,i(this,new e(t,n))<0},E.lessThanOrEqualTo=E.lte=function(t,n){return R=9,(n=i(this,new e(t,n)))===-1||0===n},E.minus=E.sub=function(t,n){var o,i,a,s,c=this,u=c.s;if(R=10,t=new e(t,n),n=t.s,!u||!n)return new e(NaN);if(u!=n)return t.s=-n,c.plus(t);var f=c.e/w,l=t.e/w,p=c.c,h=t.c;if(!f||!l){if(!p||!h)return p?(t.s=-n,t):new e(h?c:NaN);if(!p[0]||!h[0])return h[0]?(t.s=-n,t):new e(p[0]?c:3==H?-0:0)}if(f=r(f),l=r(l),p=p.slice(),u=f-l){for((s=u<0)?(u=-u,a=p):(l=f,a=h),a.reverse(),n=u;n--;a.push(0));a.reverse()}else for(i=(s=(u=p.length)<(n=h.length))?u:n,u=n=0;n0)for(;n--;p[o++]=0);for(n=_-1;i>u;){if(p[--i]0?(c=s,o=f):(a=-a,o=u),o.reverse();a--;o.push(0));o.reverse()}for(a=u.length,n=f.length,a-n<0&&(o=f,f=u,u=o,n=a),a=0;n;)a=(u[--n]=u[n]+f[n]+a)/_|0,u[n]=_===u[n]?0:u[n]%_;return a&&(u=[a].concat(u),++c),I(t,u,c)},E.precision=E.sd=function(t){var e,n,r=this,o=r.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&(U&&O(13,"argument"+y,t),t!=!!t&&(t=null)),!o)return null;if(n=o.length-1,e=n*w+1,n=o[n]){for(;n%10==0;n/=10,e--);for(n=o[0];n>=10;n/=10,e++);}return t&&r.e+1>e&&(e=r.e+1),e},E.round=function(t,n){var r=new e(this);return(null==t||W(t,0,S,15))&&N(r,~~t+this.e+1,null!=n&&W(n,0,8,15,g)?0|n:H),r},E.shift=function(t){var n=this;return W(t,-x,x,16,"argument")?n.times("1e"+l(t)):new e(n.c&&n.c[0]&&(t<-x||t>x)?n.s*(t<0?0:1/0):n)},E.squareRoot=E.sqrt=function(){var t,n,i,a,s,c=this,u=c.c,f=c.s,l=c.e,p=M+4,h=new e("0.5");if(1!==f||!u||!u[0])return new e(!f||f<0&&(!u||u[0])?NaN:u?c:1/0);if(f=Math.sqrt(+c),0==f||f==1/0?(n=o(u),(n.length+l)%2==0&&(n+="0"),f=Math.sqrt(n),l=r((l+1)/2)-(l<0||l%2),f==1/0?n="1e"+l:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),i=new e(n)):i=new e(f+""),i.c[0])for(l=i.e,f=l+p,f<3&&(f=0);;)if(s=i,i=h.times(s.plus(T(c,s,p,1))),o(s.c).slice(0,f)===(n=o(i.c)).slice(0,f)){if(i.e=0;){for(o=0,d=k[a]%v,m=k[a]/v|0,c=f,s=a+c;s>a;)l=x[--c]%v,p=x[c]/v|0,u=m*l+p*d,l=d*l+u%v*v+y[s]+o,o=(l/g|0)+(u/v|0)+m*p,y[s--]=l%g;y[s]=o}return o?++i:y.splice(0,1),I(t,y,i)},E.toDigits=function(t,n){var r=new e(this);return t=null!=t&&W(t,1,S,18,"precision")?0|t:null,n=null!=n&&W(n,0,8,18,g)?0|n:H,t?N(r,t,n):r},E.toExponential=function(t,e){return C(this,null!=t&&W(t,0,S,19)?~~t+1:null,e,19)},E.toFixed=function(t,e){return C(this,null!=t&&W(t,0,S,20)?~~t+this.e+1:null,e,20)},E.toFormat=function(t,e){var n=C(this,null!=t&&W(t,0,S,21)?~~t+this.e+1:null,e,21);if(this.c){var r,o=n.split("."),i=+X.groupSize,a=+X.secondaryGroupSize,s=X.groupSeparator,c=o[0],u=o[1],f=this.s<0,l=f?c.slice(1):c,p=l.length;if(a&&(r=i,i=a,a=r,p-=r),i>0&&p>0){for(r=p%i||i,c=l.substr(0,r);r0&&(c+=s+l.slice(r)),f&&(c="-"+c)}n=u?c+X.decimalSeparator+((a=+X.fractionGroupSize)?u.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+X.fractionGroupSeparator):u):c}return n},E.toFraction=function(t){var n,r,i,a,s,c,u,f,l,p=U,h=this,d=h.c,m=new e(P),y=r=new e(P),g=u=new e(P);if(null!=t&&(U=!1,c=new e(t),U=p,(p=c.isInt())&&!c.lt(P)||(U&&O(22,"max denominator "+(p?"out of range":"not an integer"),t),t=!p&&c.c&&N(c,c.e+1,1).gte(P)?c:null)),!d)return h.toString();for(l=o(d),a=m.e=l.length-h.e-1,m.c[0]=k[(s=a%w)<0?w+s:s],t=!t||c.cmp(m)>0?a>0?m:y:c,s=L,L=1/0,c=new e(l),u.c[0]=0;f=T(c,m,0,1),i=r.plus(f.times(g)),1!=i.cmp(t);)r=g,g=i,y=u.plus(f.times(i=y)),u=i,m=c.minus(f.times(i=m)),c=i;return i=T(t.minus(r),g,0,1),u=u.plus(i.times(y)),r=r.plus(i.times(g)),u.s=y.s=h.s,a*=2,n=T(y,g,a,H).minus(h).abs().cmp(T(u,r,a,H).minus(h).abs())<1?[y.toString(),g.toString()]:[u.toString(),r.toString()],L=s,n},E.toNumber=function(){return+this},E.toPower=E.pow=function(t,n){var r,o,i,a=m(t<0?-t:+t),s=this;if(null!=n&&(R=23,n=new e(n)),!W(t,-x,x,23,"exponent")&&(!isFinite(t)||a>x&&(t/=0)||parseFloat(t)!=t&&!(t=NaN))||0==t)return r=Math.pow(+s,t),new e(n?r%n:r);for(n?t>1&&s.gt(P)&&s.isInt()&&n.gt(P)&&n.isInt()?s=s.mod(n):(i=n,n=null):$&&(r=d($/w+2)),o=new e(P);;){if(a%2){if(o=o.times(s),!o.c)break;r?o.c.length>r&&(o.c.length=r):n&&(o=o.mod(n))}if(a=m(a/2),!a)break;s=s.times(s),r?s.c&&s.c.length>r&&(s.c.length=r):n&&(s=s.mod(n))}return n?o:(t<0&&(o=P.div(o)),i?o.mod(i):r?N(o,$,H):o)},E.toPrecision=function(t,e){return C(this,null!=t&&W(t,1,S,24,"precision")?0|t:null,e,24)},E.toString=function(t){var e,n=this,r=n.s,i=n.e;return null===i?r?(e="Infinity",r<0&&(e="-"+e)):e="NaN":(e=o(n.c),e=null!=t&&W(t,2,64,25,"base")?p(f(e,i),0|t,10,r):i<=j||i>=q?u(e,i):f(e,i),r<0&&n.c[0]&&(e="-"+e)),e},E.truncated=E.trunc=function(){return N(new e(this),this.e+1,1)},E.valueOf=E.toJSON=function(){var t,e=this,n=e.e;return null===n?e.toString():(t=o(e.c),t=n<=j||n>=q?u(t,n):f(t,n),e.s<0?"-"+t:t)},E.isBigNumber=!0,null!=t&&e.config(t),e}function r(t){var e=0|t;return t>0||t===e?e:e-1}function o(t){for(var e,n,r=1,o=t.length,i=t[0]+"";ru^n?1:-1;for(s=(c=o.length)<(u=i.length)?c:u,a=0;ai[a]^n?1:-1;return c==u?0:c>u^n?1:-1}function a(t,e,n){return(t=l(t))>=e&&t<=n}function s(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,n){for(var r,o,i=[0],a=0,s=t.length;an-1&&(null==i[r+1]&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()}function u(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function f(t,e){var n,r;if(e<0){for(r="0.";++e;r+="0");t=r+t}else if(n=t.length,++e>n){for(r="0",e-=n;--e;r+="0");t+=r}else e 1, 9 + ``` + - **Complex**: When you access a complex type you work on a reference to its value. + + + `object` + + `array` + + `function` + + ```javascript + var foo = [1, 2]; + var bar = foo; + + bar[0] = 9; + + console.log(foo[0], bar[0]); // => 9, 9 + ``` + +**[⬆ back to top](#table-of-contents)** + +## Objects + + - Use the literal syntax for object creation. + + ```javascript + // bad + var item = new Object(); + + // good + var item = {}; + ``` + + - Don't use [reserved words](http://es5.github.io/#x7.6.1) as keys. It won't work in IE8. [More info](https://github.com/airbnb/javascript/issues/61). + + ```javascript + // bad + var superman = { + default: { clark: 'kent' }, + private: true + }; + + // good + var superman = { + defaults: { clark: 'kent' }, + hidden: true + }; + ``` + + - Use readable synonyms in place of reserved words. + + ```javascript + // bad + var superman = { + class: 'alien' + }; + + // bad + var superman = { + klass: 'alien' + }; + + // good + var superman = { + type: 'alien' + }; + ``` + +**[⬆ back to top](#table-of-contents)** + +## Arrays + + - Use the literal syntax for array creation. + + ```javascript + // bad + var items = new Array(); + + // good + var items = []; + ``` + + - Use Array#push instead of direct assignment to add items to an array. + + ```javascript + var someStack = []; + + + // bad + someStack[someStack.length] = 'abracadabra'; + + // good + someStack.push('abracadabra'); + ``` + + - When you need to copy an array use Array#slice. [jsPerf](http://jsperf.com/converting-arguments-to-an-array/7) + + ```javascript + var len = items.length; + var itemsCopy = []; + var i; + + // bad + for (i = 0; i < len; i++) { + itemsCopy[i] = items[i]; + } + + // good + itemsCopy = items.slice(); + ``` + + - To convert an array-like object to an array, use Array#slice. + + ```javascript + function trigger() { + var args = Array.prototype.slice.call(arguments); + ... + } + ``` + +**[⬆ back to top](#table-of-contents)** + + +## Strings + + - Use single quotes `''` for strings. + + ```javascript + // bad + var name = "Bob Parr"; + + // good + var name = 'Bob Parr'; + + // bad + var fullName = "Bob " + this.lastName; + + // good + var fullName = 'Bob ' + this.lastName; + ``` + + - Strings longer than 80 characters should be written across multiple lines using string concatenation. + - Note: If overused, long strings with concatenation could impact performance. [jsPerf](http://jsperf.com/ya-string-concat) & [Discussion](https://github.com/airbnb/javascript/issues/40). + + ```javascript + // bad + var errorMessage = 'This is a super long error that was thrown because of Batman. When you stop to think about how Batman had anything to do with this, you would get nowhere fast.'; + + // bad + var errorMessage = 'This is a super long error that was thrown because \ + of Batman. When you stop to think about how Batman had anything to do \ + with this, you would get nowhere \ + fast.'; + + // good + var errorMessage = 'This is a super long error that was thrown because ' + + 'of Batman. When you stop to think about how Batman had anything to do ' + + 'with this, you would get nowhere fast.'; + ``` + + - When programmatically building up a string, use Array#join instead of string concatenation. Mostly for IE: [jsPerf](http://jsperf.com/string-vs-array-concat/2). + + ```javascript + var items; + var messages; + var length; + var i; + + messages = [{ + state: 'success', + message: 'This one worked.' + }, { + state: 'success', + message: 'This one worked as well.' + }, { + state: 'error', + message: 'This one did not work.' + }]; + + length = messages.length; + + // bad + function inbox(messages) { + items = '

                                                            '; + + for (i = 0; i < length; i++) { + items += '
                                                          • ' + messages[i].message + '
                                                          • '; + } + + return items + '
                                                          '; + } + + // good + function inbox(messages) { + items = []; + + for (i = 0; i < length; i++) { + // use direct assignment in this case because we're micro-optimizing. + items[i] = '
                                                        • ' + messages[i].message + '
                                                        • '; + } + + return '
                                                            ' + items.join('') + '
                                                          '; + } + ``` + +**[⬆ back to top](#table-of-contents)** + + +## Functions + + - Function expressions: + + ```javascript + // anonymous function expression + var anonymous = function() { + return true; + }; + + // named function expression + var named = function named() { + return true; + }; + + // immediately-invoked function expression (IIFE) + (function() { + console.log('Welcome to the Internet. Please follow me.'); + })(); + ``` + + - Never declare a function in a non-function block (if, while, etc). Assign the function to a variable instead. Browsers will allow you to do it, but they all interpret it differently, which is bad news bears. + - **Note:** ECMA-262 defines a `block` as a list of statements. A function declaration is not a statement. [Read ECMA-262's note on this issue](http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf#page=97). + + ```javascript + // bad + if (currentUser) { + function test() { + console.log('Nope.'); + } + } + + // good + var test; + if (currentUser) { + test = function test() { + console.log('Yup.'); + }; + } + ``` + + - Never name a parameter `arguments`. This will take precedence over the `arguments` object that is given to every function scope. + + ```javascript + // bad + function nope(name, options, arguments) { + // ...stuff... + } + + // good + function yup(name, options, args) { + // ...stuff... + } + ``` + +**[⬆ back to top](#table-of-contents)** + + + +## Properties + + - Use dot notation when accessing properties. + + ```javascript + var luke = { + jedi: true, + age: 28 + }; + + // bad + var isJedi = luke['jedi']; + + // good + var isJedi = luke.jedi; + ``` + + - Use subscript notation `[]` when accessing properties with a variable. + + ```javascript + var luke = { + jedi: true, + age: 28 + }; + + function getProp(prop) { + return luke[prop]; + } + + var isJedi = getProp('jedi'); + ``` + +**[⬆ back to top](#table-of-contents)** + + +## Variables + + - Always use `var` to declare variables. Not doing so will result in global variables. We want to avoid polluting the global namespace. Captain Planet warned us of that. + + ```javascript + // bad + superPower = new SuperPower(); + + // good + var superPower = new SuperPower(); + ``` + + - Use one `var` declaration per variable. + It's easier to add new variable declarations this way, and you never have + to worry about swapping out a `;` for a `,` or introducing punctuation-only + diffs. + + ```javascript + // bad + var items = getItems(), + goSportsTeam = true, + dragonball = 'z'; + + // bad + // (compare to above, and try to spot the mistake) + var items = getItems(), + goSportsTeam = true; + dragonball = 'z'; + + // good + var items = getItems(); + var goSportsTeam = true; + var dragonball = 'z'; + ``` + + - Declare unassigned variables last. This is helpful when later on you might need to assign a variable depending on one of the previous assigned variables. + + ```javascript + // bad + var i, len, dragonball, + items = getItems(), + goSportsTeam = true; + + // bad + var i; + var items = getItems(); + var dragonball; + var goSportsTeam = true; + var len; + + // good + var items = getItems(); + var goSportsTeam = true; + var dragonball; + var length; + var i; + ``` + + - Assign variables at the top of their scope. This helps avoid issues with variable declaration and assignment hoisting related issues. + + ```javascript + // bad + function() { + test(); + console.log('doing stuff..'); + + //..other stuff.. + + var name = getName(); + + if (name === 'test') { + return false; + } + + return name; + } + + // good + function() { + var name = getName(); + + test(); + console.log('doing stuff..'); + + //..other stuff.. + + if (name === 'test') { + return false; + } + + return name; + } + + // bad - unnecessary function call + function() { + var name = getName(); + + if (!arguments.length) { + return false; + } + + this.setFirstName(name); + + return true; + } + + // good + function() { + var name; + + if (!arguments.length) { + return false; + } + + name = getName(); + this.setFirstName(name); + + return true; + } + ``` + +**[⬆ back to top](#table-of-contents)** + + +## Hoisting + + - Variable declarations get hoisted to the top of their scope, but their assignment does not. + + ```javascript + // we know this wouldn't work (assuming there + // is no notDefined global variable) + function example() { + console.log(notDefined); // => throws a ReferenceError + } + + // creating a variable declaration after you + // reference the variable will work due to + // variable hoisting. Note: the assignment + // value of `true` is not hoisted. + function example() { + console.log(declaredButNotAssigned); // => undefined + var declaredButNotAssigned = true; + } + + // The interpreter is hoisting the variable + // declaration to the top of the scope, + // which means our example could be rewritten as: + function example() { + var declaredButNotAssigned; + console.log(declaredButNotAssigned); // => undefined + declaredButNotAssigned = true; + } + ``` + + - Anonymous function expressions hoist their variable name, but not the function assignment. + + ```javascript + function example() { + console.log(anonymous); // => undefined + + anonymous(); // => TypeError anonymous is not a function + + var anonymous = function() { + console.log('anonymous function expression'); + }; + } + ``` + + - Named function expressions hoist the variable name, not the function name or the function body. + + ```javascript + function example() { + console.log(named); // => undefined + + named(); // => TypeError named is not a function + + superPower(); // => ReferenceError superPower is not defined + + var named = function superPower() { + console.log('Flying'); + }; + } + + // the same is true when the function name + // is the same as the variable name. + function example() { + console.log(named); // => undefined + + named(); // => TypeError named is not a function + + var named = function named() { + console.log('named'); + } + } + ``` + + - Function declarations hoist their name and the function body. + + ```javascript + function example() { + superPower(); // => Flying + + function superPower() { + console.log('Flying'); + } + } + ``` + + - For more information refer to [JavaScript Scoping & Hoisting](http://www.adequatelygood.com/2010/2/JavaScript-Scoping-and-Hoisting) by [Ben Cherry](http://www.adequatelygood.com/). + +**[⬆ back to top](#table-of-contents)** + + + +## Comparison Operators & Equality + + - Use `===` and `!==` over `==` and `!=`. + - Conditional statements such as the `if` statement evaluate their expression using coercion with the `ToBoolean` abstract method and always follow these simple rules: + + + **Objects** evaluate to **true** + + **Undefined** evaluates to **false** + + **Null** evaluates to **false** + + **Booleans** evaluate to **the value of the boolean** + + **Numbers** evaluate to **false** if **+0, -0, or NaN**, otherwise **true** + + **Strings** evaluate to **false** if an empty string `''`, otherwise **true** + + ```javascript + if ([0]) { + // true + // An array is an object, objects evaluate to true + } + ``` + + - Use shortcuts. + + ```javascript + // bad + if (name !== '') { + // ...stuff... + } + + // good + if (name) { + // ...stuff... + } + + // bad + if (collection.length > 0) { + // ...stuff... + } + + // good + if (collection.length) { + // ...stuff... + } + ``` + + - For more information see [Truth Equality and JavaScript](http://javascriptweblog.wordpress.com/2011/02/07/truth-equality-and-javascript/#more-2108) by Angus Croll. + +**[⬆ back to top](#table-of-contents)** + + +## Blocks + + - Use braces with all multi-line blocks. + + ```javascript + // bad + if (test) + return false; + + // good + if (test) return false; + + // good + if (test) { + return false; + } + + // bad + function() { return false; } + + // good + function() { + return false; + } + ``` + + - If you're using multi-line blocks with `if` and `else`, put `else` on the same line as your + `if` block's closing brace. + + ```javascript + // bad + if (test) { + thing1(); + thing2(); + } + else { + thing3(); + } + + // good + if (test) { + thing1(); + thing2(); + } else { + thing3(); + } + ``` + + +**[⬆ back to top](#table-of-contents)** + + +## Comments + + - Use `/** ... */` for multi-line comments. Include a description, specify types and values for all parameters and return values. + + ```javascript + // bad + // make() returns a new element + // based on the passed in tag name + // + // @param {String} tag + // @return {Element} element + function make(tag) { + + // ...stuff... + + return element; + } + + // good + /** + * make() returns a new element + * based on the passed in tag name + * + * @param {String} tag + * @return {Element} element + */ + function make(tag) { + + // ...stuff... + + return element; + } + ``` + + - Use `//` for single line comments. Place single line comments on a newline above the subject of the comment. Put an empty line before the comment. + + ```javascript + // bad + var active = true; // is current tab + + // good + // is current tab + var active = true; + + // bad + function getType() { + console.log('fetching type...'); + // set the default type to 'no type' + var type = this._type || 'no type'; + + return type; + } + + // good + function getType() { + console.log('fetching type...'); + + // set the default type to 'no type' + var type = this._type || 'no type'; + + return type; + } + ``` + + - Prefixing your comments with `FIXME` or `TODO` helps other developers quickly understand if you're pointing out a problem that needs to be revisited, or if you're suggesting a solution to the problem that needs to be implemented. These are different than regular comments because they are actionable. The actions are `FIXME -- need to figure this out` or `TODO -- need to implement`. + + - Use `// FIXME:` to annotate problems. + + ```javascript + function Calculator() { + + // FIXME: shouldn't use a global here + total = 0; + + return this; + } + ``` + + - Use `// TODO:` to annotate solutions to problems. + + ```javascript + function Calculator() { + + // TODO: total should be configurable by an options param + this.total = 0; + + return this; + } + ``` + +**[⬆ back to top](#table-of-contents)** + + +## Whitespace + + - Use soft tabs set to 4 spaces. + + ```javascript + // good + function() { + ∙∙∙∙var name; + } + + // bad + function() { + ∙var name; + } + + // bad + function() { + ∙∙var name; + } + ``` + + - Place 1 space before the leading brace. + + ```javascript + // bad + function test(){ + console.log('test'); + } + + // good + function test() { + console.log('test'); + } + + // bad + dog.set('attr',{ + age: '1 year', + breed: 'Bernese Mountain Dog' + }); + + // good + dog.set('attr', { + age: '1 year', + breed: 'Bernese Mountain Dog' + }); + ``` + + - Place 1 space before the opening parenthesis in control statements (`if`, `while` etc.). Place no space before the argument list in function calls and declarations. + + ```javascript + // bad + if(isJedi) { + fight (); + } + + // good + if (isJedi) { + fight(); + } + + // bad + function fight () { + console.log ('Swooosh!'); + } + + // good + function fight() { + console.log('Swooosh!'); + } + ``` + + - Set off operators with spaces. + + ```javascript + // bad + var x=y+5; + + // good + var x = y + 5; + ``` + + - End files with a single newline character. + + ```javascript + // bad + (function(global) { + // ...stuff... + })(this); + ``` + + ```javascript + // bad + (function(global) { + // ...stuff... + })(this);↵ + ↵ + ``` + + ```javascript + // good + (function(global) { + // ...stuff... + })(this);↵ + ``` + + - Use indentation when making long method chains. Use a leading dot, which + emphasizes that the line is a method call, not a new statement. + + ```javascript + // bad + $('#items').find('.selected').highlight().end().find('.open').updateCount(); + + // bad + $('#items'). + find('.selected'). + highlight(). + end(). + find('.open'). + updateCount(); + + // good + $('#items') + .find('.selected') + .highlight() + .end() + .find('.open') + .updateCount(); + + // bad + var leds = stage.selectAll('.led').data(data).enter().append('svg:svg').classed('led', true) + .attr('width', (radius + margin) * 2).append('svg:g') + .attr('transform', 'translate(' + (radius + margin) + ',' + (radius + margin) + ')') + .call(tron.led); + + // good + var leds = stage.selectAll('.led') + .data(data) + .enter().append('svg:svg') + .classed('led', true) + .attr('width', (radius + margin) * 2) + .append('svg:g') + .attr('transform', 'translate(' + (radius + margin) + ',' + (radius + margin) + ')') + .call(tron.led); + ``` + + - Leave a blank line after blocks and before the next statement + + ```javascript + // bad + if (foo) { + return bar; + } + return baz; + + // good + if (foo) { + return bar; + } + + return baz; + + // bad + var obj = { + foo: function() { + }, + bar: function() { + } + }; + return obj; + + // good + var obj = { + foo: function() { + }, + + bar: function() { + } + }; + + return obj; + ``` + + +**[⬆ back to top](#table-of-contents)** + +## Commas + + - Leading commas: **Nope.** + + ```javascript + // bad + var story = [ + once + , upon + , aTime + ]; + + // good + var story = [ + once, + upon, + aTime + ]; + + // bad + var hero = { + firstName: 'Bob' + , lastName: 'Parr' + , heroName: 'Mr. Incredible' + , superPower: 'strength' + }; + + // good + var hero = { + firstName: 'Bob', + lastName: 'Parr', + heroName: 'Mr. Incredible', + superPower: 'strength' + }; + ``` + + - Additional trailing comma: **Nope.** This can cause problems with IE6/7 and IE9 if it's in quirksmode. Also, in some implementations of ES3 would add length to an array if it had an additional trailing comma. This was clarified in ES5 ([source](http://es5.github.io/#D)): + + > Edition 5 clarifies the fact that a trailing comma at the end of an ArrayInitialiser does not add to the length of the array. This is not a semantic change from Edition 3 but some implementations may have previously misinterpreted this. + + ```javascript + // bad + var hero = { + firstName: 'Kevin', + lastName: 'Flynn', + }; + + var heroes = [ + 'Batman', + 'Superman', + ]; + + // good + var hero = { + firstName: 'Kevin', + lastName: 'Flynn' + }; + + var heroes = [ + 'Batman', + 'Superman' + ]; + ``` + +**[⬆ back to top](#table-of-contents)** + + +## Semicolons + + - **Yup.** + + ```javascript + // bad + (function() { + var name = 'Skywalker' + return name + })() + + // good + (function() { + var name = 'Skywalker'; + return name; + })(); + + // good (guards against the function becoming an argument when two files with IIFEs are concatenated) + ;(function() { + var name = 'Skywalker'; + return name; + })(); + ``` + + [Read more](http://stackoverflow.com/a/7365214/1712802). + +**[⬆ back to top](#table-of-contents)** + + +## Type Casting & Coercion + + - Perform type coercion at the beginning of the statement. + - Strings: + + ```javascript + // => this.reviewScore = 9; + + // bad + var totalScore = this.reviewScore + ''; + + // good + var totalScore = '' + this.reviewScore; + + // bad + var totalScore = '' + this.reviewScore + ' total score'; + + // good + var totalScore = this.reviewScore + ' total score'; + ``` + + - Use `parseInt` for Numbers and always with a radix for type casting. + + ```javascript + var inputValue = '4'; + + // bad + var val = new Number(inputValue); + + // bad + var val = +inputValue; + + // bad + var val = inputValue >> 0; + + // bad + var val = parseInt(inputValue); + + // good + var val = Number(inputValue); + + // good + var val = parseInt(inputValue, 10); + ``` + + - If for whatever reason you are doing something wild and `parseInt` is your bottleneck and need to use Bitshift for [performance reasons](http://jsperf.com/coercion-vs-casting/3), leave a comment explaining why and what you're doing. + + ```javascript + // good + /** + * parseInt was the reason my code was slow. + * Bitshifting the String to coerce it to a + * Number made it a lot faster. + */ + var val = inputValue >> 0; + ``` + + - **Note:** Be careful when using bitshift operations. Numbers are represented as [64-bit values](http://es5.github.io/#x4.3.19), but Bitshift operations always return a 32-bit integer ([source](http://es5.github.io/#x11.7)). Bitshift can lead to unexpected behavior for integer values larger than 32 bits. [Discussion](https://github.com/airbnb/javascript/issues/109). Largest signed 32-bit Int is 2,147,483,647: + + ```javascript + 2147483647 >> 0 //=> 2147483647 + 2147483648 >> 0 //=> -2147483648 + 2147483649 >> 0 //=> -2147483647 + ``` + + - Booleans: + + ```javascript + var age = 0; + + // bad + var hasAge = new Boolean(age); + + // good + var hasAge = Boolean(age); + + // good + var hasAge = !!age; + ``` + +**[⬆ back to top](#table-of-contents)** + + +## Naming Conventions + + - Avoid single letter names. Be descriptive with your naming. + + ```javascript + // bad + function q() { + // ...stuff... + } + + // good + function query() { + // ..stuff.. + } + ``` + + - Use camelCase when naming objects, functions, and instances. + + ```javascript + // bad + var OBJEcttsssss = {}; + var this_is_my_object = {}; + var o = {}; + function c() {} + + // good + var thisIsMyObject = {}; + function thisIsMyFunction() {} + ``` + + - Use PascalCase when naming constructors or classes. + + ```javascript + // bad + function user(options) { + this.name = options.name; + } + + var bad = new user({ + name: 'nope' + }); + + // good + function User(options) { + this.name = options.name; + } + + var good = new User({ + name: 'yup' + }); + ``` + + - Use a leading underscore `_` when naming private properties. + + ```javascript + // bad + this.__firstName__ = 'Panda'; + this.firstName_ = 'Panda'; + + // good + this._firstName = 'Panda'; + ``` + + - When saving a reference to `this` use `_this`. + + ```javascript + // bad + function() { + var self = this; + return function() { + console.log(self); + }; + } + + // bad + function() { + var that = this; + return function() { + console.log(that); + }; + } + + // good + function() { + var _this = this; + return function() { + console.log(_this); + }; + } + ``` + + - Name your functions. This is helpful for stack traces. + + ```javascript + // bad + var log = function(msg) { + console.log(msg); + }; + + // good + var log = function log(msg) { + console.log(msg); + }; + ``` + + - **Note:** IE8 and below exhibit some quirks with named function expressions. See [http://kangax.github.io/nfe/](http://kangax.github.io/nfe/) for more info. + + - If your file exports a single class, your filename should be exactly the name of the class. + ```javascript + // file contents + class CheckBox { + // ... + } + module.exports = CheckBox; + + // in some other file + // bad + var CheckBox = require('./checkBox'); + + // bad + var CheckBox = require('./check_box'); + + // good + var CheckBox = require('./CheckBox'); + ``` + +**[⬆ back to top](#table-of-contents)** + + +## Accessors + + - Accessor functions for properties are not required. + - If you do make accessor functions use getVal() and setVal('hello'). + + ```javascript + // bad + dragon.age(); + + // good + dragon.getAge(); + + // bad + dragon.age(25); + + // good + dragon.setAge(25); + ``` + + - If the property is a boolean, use isVal() or hasVal(). + + ```javascript + // bad + if (!dragon.age()) { + return false; + } + + // good + if (!dragon.hasAge()) { + return false; + } + ``` + + - It's okay to create get() and set() functions, but be consistent. + + ```javascript + function Jedi(options) { + options || (options = {}); + var lightsaber = options.lightsaber || 'blue'; + this.set('lightsaber', lightsaber); + } + + Jedi.prototype.set = function(key, val) { + this[key] = val; + }; + + Jedi.prototype.get = function(key) { + return this[key]; + }; + ``` + +**[⬆ back to top](#table-of-contents)** + + +## Constructors + + - Assign methods to the prototype object, instead of overwriting the prototype with a new object. Overwriting the prototype makes inheritance impossible: by resetting the prototype you'll overwrite the base! + + ```javascript + function Jedi() { + console.log('new jedi'); + } + + // bad + Jedi.prototype = { + fight: function fight() { + console.log('fighting'); + }, + + block: function block() { + console.log('blocking'); + } + }; + + // good + Jedi.prototype.fight = function fight() { + console.log('fighting'); + }; + + Jedi.prototype.block = function block() { + console.log('blocking'); + }; + ``` + + - Methods can return `this` to help with method chaining. + + ```javascript + // bad + Jedi.prototype.jump = function() { + this.jumping = true; + return true; + }; + + Jedi.prototype.setHeight = function(height) { + this.height = height; + }; + + var luke = new Jedi(); + luke.jump(); // => true + luke.setHeight(20); // => undefined + + // good + Jedi.prototype.jump = function() { + this.jumping = true; + return this; + }; + + Jedi.prototype.setHeight = function(height) { + this.height = height; + return this; + }; + + var luke = new Jedi(); + + luke.jump() + .setHeight(20); + ``` + + + - It's okay to write a custom toString() method, just make sure it works successfully and causes no side effects. + + ```javascript + function Jedi(options) { + options || (options = {}); + this.name = options.name || 'no name'; + } + + Jedi.prototype.getName = function getName() { + return this.name; + }; + + Jedi.prototype.toString = function toString() { + return 'Jedi - ' + this.getName(); + }; + ``` + +**[⬆ back to top](#table-of-contents)** + + +## Events + + - When attaching data payloads to events (whether DOM events or something more proprietary like Backbone events), pass a hash instead of a raw value. This allows a subsequent contributor to add more data to the event payload without finding and updating every handler for the event. For example, instead of: + + ```js + // bad + $(this).trigger('listingUpdated', listing.id); + + ... + + $(this).on('listingUpdated', function(e, listingId) { + // do something with listingId + }); + ``` + + prefer: + + ```js + // good + $(this).trigger('listingUpdated', { listingId : listing.id }); + + ... + + $(this).on('listingUpdated', function(e, data) { + // do something with data.listingId + }); + ``` + + **[⬆ back to top](#table-of-contents)** + + +## Modules + + - The module should start with a `!`. This ensures that if a malformed module forgets to include a final semicolon there aren't errors in production when the scripts get concatenated. [Explanation](https://github.com/airbnb/javascript/issues/44#issuecomment-13063933) + - The file should be named with camelCase, live in a folder with the same name, and match the name of the single export. + - Add a method called `noConflict()` that sets the exported module to the previous version and returns this one. + - Always declare `'use strict';` at the top of the module. + + ```javascript + // fancyInput/fancyInput.js + + !function(global) { + 'use strict'; + + var previousFancyInput = global.FancyInput; + + function FancyInput(options) { + this.options = options || {}; + } + + FancyInput.noConflict = function noConflict() { + global.FancyInput = previousFancyInput; + return FancyInput; + }; + + global.FancyInput = FancyInput; + }(this); + ``` + +**[⬆ back to top](#table-of-contents)** + + +## jQuery + + - Prefix jQuery object variables with a `$`. + + ```javascript + // bad + var sidebar = $('.sidebar'); + + // good + var $sidebar = $('.sidebar'); + ``` + + - Cache jQuery lookups. + + ```javascript + // bad + function setSidebar() { + $('.sidebar').hide(); + + // ...stuff... + + $('.sidebar').css({ + 'background-color': 'pink' + }); + } + + // good + function setSidebar() { + var $sidebar = $('.sidebar'); + $sidebar.hide(); + + // ...stuff... + + $sidebar.css({ + 'background-color': 'pink' + }); + } + ``` + + - For DOM queries use Cascading `$('.sidebar ul')` or parent > child `$('.sidebar > ul')`. [jsPerf](http://jsperf.com/jquery-find-vs-context-sel/16) + - Use `find` with scoped jQuery object queries. + + ```javascript + // bad + $('ul', '.sidebar').hide(); + + // bad + $('.sidebar').find('ul').hide(); + + // good + $('.sidebar ul').hide(); + + // good + $('.sidebar > ul').hide(); + + // good + $sidebar.find('ul').hide(); + ``` + +**[⬆ back to top](#table-of-contents)** + + +## ECMAScript 5 Compatibility + + - Refer to [Kangax](https://twitter.com/kangax/)'s ES5 [compatibility table](http://kangax.github.com/es5-compat-table/). + +**[⬆ back to top](#table-of-contents)** + + +## Testing + + - **Yup.** + + ```javascript + function() { + return true; + } + ``` + +**[⬆ back to top](#table-of-contents)** + + +## Performance + + - [On Layout & Web Performance](http://kellegous.com/j/2013/01/26/layout-performance/) + - [String vs Array Concat](http://jsperf.com/string-vs-array-concat/2) + - [Try/Catch Cost In a Loop](http://jsperf.com/try-catch-in-loop-cost) + - [Bang Function](http://jsperf.com/bang-function) + - [jQuery Find vs Context, Selector](http://jsperf.com/jquery-find-vs-context-sel/13) + - [innerHTML vs textContent for script text](http://jsperf.com/innerhtml-vs-textcontent-for-script-text) + - [Long String Concatenation](http://jsperf.com/ya-string-concat) + - Loading... + +**[⬆ back to top](#table-of-contents)** + + +## Resources + + +**Read This** + + - [Annotated ECMAScript 5.1](http://es5.github.com/) + +**Tools** + + - Code Style Linters + + [JSHint](http://www.jshint.com/) - [Airbnb Style .jshintrc](https://github.com/airbnb/javascript/blob/master/linters/jshintrc) + + [JSCS](https://github.com/jscs-dev/node-jscs) - [Airbnb Style Preset](https://github.com/jscs-dev/node-jscs/blob/master/presets/airbnb.json) + +**Other Style Guides** + + - [Google JavaScript Style Guide](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml) + - [jQuery Core Style Guidelines](http://docs.jquery.com/JQuery_Core_Style_Guidelines) + - [Principles of Writing Consistent, Idiomatic JavaScript](https://github.com/rwldrn/idiomatic.js/) + - [JavaScript Standard Style](https://github.com/feross/standard) + +**Other Styles** + + - [Naming this in nested functions](https://gist.github.com/4135065) - Christian Johansen + - [Conditional Callbacks](https://github.com/airbnb/javascript/issues/52) - Ross Allen + - [Popular JavaScript Coding Conventions on Github](http://sideeffect.kr/popularconvention/#javascript) - JeongHoon Byun + - [Multiple var statements in JavaScript, not superfluous](http://benalman.com/news/2012/05/multiple-var-statements-javascript/) - Ben Alman + +**Further Reading** + + - [Understanding JavaScript Closures](http://javascriptweblog.wordpress.com/2010/10/25/understanding-javascript-closures/) - Angus Croll + - [Basic JavaScript for the impatient programmer](http://www.2ality.com/2013/06/basic-javascript.html) - Dr. Axel Rauschmayer + - [You Might Not Need jQuery](http://youmightnotneedjquery.com/) - Zack Bloom & Adam Schwartz + - [ES6 Features](https://github.com/lukehoban/es6features) - Luke Hoban + - [Frontend Guidelines](https://github.com/bendc/frontend-guidelines) - Benjamin De Cock + +**Books** + + - [JavaScript: The Good Parts](http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742) - Douglas Crockford + - [JavaScript Patterns](http://www.amazon.com/JavaScript-Patterns-Stoyan-Stefanov/dp/0596806752) - Stoyan Stefanov + - [Pro JavaScript Design Patterns](http://www.amazon.com/JavaScript-Design-Patterns-Recipes-Problem-Solution/dp/159059908X) - Ross Harmes and Dustin Diaz + - [High Performance Web Sites: Essential Knowledge for Front-End Engineers](http://www.amazon.com/High-Performance-Web-Sites-Essential/dp/0596529309) - Steve Souders + - [Maintainable JavaScript](http://www.amazon.com/Maintainable-JavaScript-Nicholas-C-Zakas/dp/1449327680) - Nicholas C. Zakas + - [JavaScript Web Applications](http://www.amazon.com/JavaScript-Web-Applications-Alex-MacCaw/dp/144930351X) - Alex MacCaw + - [Pro JavaScript Techniques](http://www.amazon.com/Pro-JavaScript-Techniques-John-Resig/dp/1590597273) - John Resig + - [Smashing Node.js: JavaScript Everywhere](http://www.amazon.com/Smashing-Node-js-JavaScript-Everywhere-Magazine/dp/1119962595) - Guillermo Rauch + - [Secrets of the JavaScript Ninja](http://www.amazon.com/Secrets-JavaScript-Ninja-John-Resig/dp/193398869X) - John Resig and Bear Bibeault + - [Human JavaScript](http://humanjavascript.com/) - Henrik Joreteg + - [Superhero.js](http://superherojs.com/) - Kim Joar Bekkelund, Mads Mobæk, & Olav Bjorkoy + - [JSBooks](http://jsbooks.revolunet.com/) - Julien Bouquillon + - [Third Party JavaScript](http://manning.com/vinegar/) - Ben Vinegar and Anton Kovalyov + - [Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript](http://amzn.com/0321812182) - David Herman + - [Eloquent JavaScript](http://eloquentjavascript.net) - Marijn Haverbeke + - [You Don't Know JS](https://github.com/getify/You-Dont-Know-JS) - Kyle Simpson + +**Blogs** + + - [DailyJS](http://dailyjs.com/) + - [JavaScript Weekly](http://javascriptweekly.com/) + - [JavaScript, JavaScript...](http://javascriptweblog.wordpress.com/) + - [Bocoup Weblog](http://weblog.bocoup.com/) + - [Adequately Good](http://www.adequatelygood.com/) + - [NCZOnline](http://www.nczonline.net/) + - [Perfection Kills](http://perfectionkills.com/) + - [Ben Alman](http://benalman.com/) + - [Dmitry Baranovskiy](http://dmitry.baranovskiy.com/) + - [Dustin Diaz](http://dustindiaz.com/) + - [nettuts](http://net.tutsplus.com/?s=javascript) + +**Podcasts** + + - [JavaScript Jabber](http://devchat.tv/js-jabber/) + + +**[⬆ back to top](#table-of-contents)** + +## In the Wild + + This is a list of organizations that are using this style guide. Send us a pull request or open an issue and we'll add you to the list. + + - **Aan Zee**: [AanZee/javascript](https://github.com/AanZee/javascript) + - **Adult Swim**: [adult-swim/javascript](https://github.com/adult-swim/javascript) + - **Airbnb**: [airbnb/javascript](https://github.com/airbnb/javascript) + - **Apartmint**: [apartmint/javascript](https://github.com/apartmint/javascript) + - **Avalara**: [avalara/javascript](https://github.com/avalara/javascript) + - **Billabong**: [billabong/javascript](https://github.com/billabong/javascript) + - **Compass Learning**: [compasslearning/javascript-style-guide](https://github.com/compasslearning/javascript-style-guide) + - **DailyMotion**: [dailymotion/javascript](https://github.com/dailymotion/javascript) + - **Digitpaint** [digitpaint/javascript](https://github.com/digitpaint/javascript) + - **Evernote**: [evernote/javascript-style-guide](https://github.com/evernote/javascript-style-guide) + - **ExactTarget**: [ExactTarget/javascript](https://github.com/ExactTarget/javascript) + - **Flexberry**: [Flexberry/javascript-style-guide](https://github.com/Flexberry/javascript-style-guide) + - **Gawker Media**: [gawkermedia/javascript](https://github.com/gawkermedia/javascript) + - **General Electric**: [GeneralElectric/javascript](https://github.com/GeneralElectric/javascript) + - **GoodData**: [gooddata/gdc-js-style](https://github.com/gooddata/gdc-js-style) + - **Grooveshark**: [grooveshark/javascript](https://github.com/grooveshark/javascript) + - **How About We**: [howaboutwe/javascript](https://github.com/howaboutwe/javascript) + - **InfoJobs**: [InfoJobs/JavaScript-Style-Guide](https://github.com/InfoJobs/JavaScript-Style-Guide) + - **Intent Media**: [intentmedia/javascript](https://github.com/intentmedia/javascript) + - **Jam3**: [Jam3/Javascript-Code-Conventions](https://github.com/Jam3/Javascript-Code-Conventions) + - **JSSolutions**: [JSSolutions/javascript](https://github.com/JSSolutions/javascript) + - **Kinetica Solutions**: [kinetica/javascript](https://github.com/kinetica/javascript) + - **Mighty Spring**: [mightyspring/javascript](https://github.com/mightyspring/javascript) + - **MinnPost**: [MinnPost/javascript](https://github.com/MinnPost/javascript) + - **ModCloth**: [modcloth/javascript](https://github.com/modcloth/javascript) + - **Money Advice Service**: [moneyadviceservice/javascript](https://github.com/moneyadviceservice/javascript) + - **Muber**: [muber/javascript](https://github.com/muber/javascript) + - **National Geographic**: [natgeo/javascript](https://github.com/natgeo/javascript) + - **National Park Service**: [nationalparkservice/javascript](https://github.com/nationalparkservice/javascript) + - **Nimbl3**: [nimbl3/javascript](https://github.com/nimbl3/javascript) + - **Nordic Venture Family**: [CodeDistillery/javascript](https://github.com/CodeDistillery/javascript) + - **Orion Health**: [orionhealth/javascript](https://github.com/orionhealth/javascript) + - **Peerby**: [Peerby/javascript](https://github.com/Peerby/javascript) + - **Razorfish**: [razorfish/javascript-style-guide](https://github.com/razorfish/javascript-style-guide) + - **reddit**: [reddit/styleguide/javascript](https://github.com/reddit/styleguide/tree/master/javascript) + - **REI**: [reidev/js-style-guide](https://github.com/reidev/js-style-guide) + - **Ripple**: [ripple/javascript-style-guide](https://github.com/ripple/javascript-style-guide) + - **SeekingAlpha**: [seekingalpha/javascript-style-guide](https://github.com/seekingalpha/javascript-style-guide) + - **Shutterfly**: [shutterfly/javascript](https://github.com/shutterfly/javascript) + - **StudentSphere**: [studentsphere/javascript](https://github.com/studentsphere/javascript) + - **Target**: [target/javascript](https://github.com/target/javascript) + - **TheLadders**: [TheLadders/javascript](https://github.com/TheLadders/javascript) + - **T4R Technology**: [T4R-Technology/javascript](https://github.com/T4R-Technology/javascript) + - **VoxFeed**: [VoxFeed/javascript-style-guide](https://github.com/VoxFeed/javascript-style-guide) + - **Weggo**: [Weggo/javascript](https://github.com/Weggo/javascript) + - **Zillow**: [zillow/javascript](https://github.com/zillow/javascript) + - **ZocDoc**: [ZocDoc/javascript](https://github.com/ZocDoc/javascript) + +## Translation + + This style guide is also available in other languages: + + - ![br](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Brazil.png) **Brazilian Portuguese**: [armoucar/javascript-style-guide](https://github.com/armoucar/javascript-style-guide) + - ![bg](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Bulgaria.png) **Bulgarian**: [borislavvv/javascript](https://github.com/borislavvv/javascript) + - ![ca](https://raw.githubusercontent.com/fpmweb/javascript-style-guide/master/img/catala.png) **Catalan**: [fpmweb/javascript-style-guide](https://github.com/fpmweb/javascript-style-guide) + - ![tw](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Taiwan.png) **Chinese(Traditional)**: [jigsawye/javascript](https://github.com/jigsawye/javascript) + - ![cn](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/China.png) **Chinese(Simplified)**: [sivan/javascript-style-guide](https://github.com/sivan/javascript-style-guide) + - ![fr](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/France.png) **French**: [nmussy/javascript-style-guide](https://github.com/nmussy/javascript-style-guide) + - ![de](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Germany.png) **German**: [timofurrer/javascript-style-guide](https://github.com/timofurrer/javascript-style-guide) + - ![it](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Italy.png) **Italian**: [sinkswim/javascript-style-guide](https://github.com/sinkswim/javascript-style-guide) + - ![jp](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Japan.png) **Japanese**: [mitsuruog/javacript-style-guide](https://github.com/mitsuruog/javacript-style-guide) + - ![kr](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/South-Korea.png) **Korean**: [tipjs/javascript-style-guide](https://github.com/tipjs/javascript-style-guide) + - ![pl](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Poland.png) **Polish**: [mjurczyk/javascript](https://github.com/mjurczyk/javascript) + - ![ru](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Russia.png) **Russian**: [uprock/javascript](https://github.com/uprock/javascript) + - ![es](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Spain.png) **Spanish**: [paolocarrasco/javascript-style-guide](https://github.com/paolocarrasco/javascript-style-guide) + - ![th](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Thailand.png) **Thai**: [lvarayut/javascript-style-guide](https://github.com/lvarayut/javascript-style-guide) + +## The JavaScript Style Guide Guide + + - [Reference](https://github.com/airbnb/javascript/wiki/The-JavaScript-Style-Guide-Guide) + +## Chat With Us About JavaScript + + - Find us on [gitter](https://gitter.im/airbnb/javascript). + +## Contributors + + - [View Contributors](https://github.com/airbnb/javascript/graphs/contributors) + + +## License + +(The MIT License) + +Copyright (c) 2014 Airbnb + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**[⬆ back to top](#table-of-contents)** + +# }; diff --git a/bower_components/web3/test/async.js b/bower_components/web3/test/async.js new file mode 100644 index 00000000..f550a3de --- /dev/null +++ b/bower_components/web3/test/async.js @@ -0,0 +1,78 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +// use sendTransaction as dummy +var method = 'sendTransaction'; + +var tests = [{ + input: { + 'from': 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS', + 'to': 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS' + }, + formattedInput: { + 'from': '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + 'to': '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8' + }, + result: '0xb', + formattedResult: '0xb', + call: 'eth_'+ method +}]; + +describe('async', function () { + tests.forEach(function (test, index) { + it('test: ' + index, function (done) { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, [test.formattedInput]); + }); + + // when + web3.eth[method](test.input, function(error, result){ + + // then + assert.isNull(error); + assert.strictEqual(test.formattedResult, result); + + done(); + }); + + }); + + it('error test: ' + index, function (done) { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectError({ + message: test.result, + code: -32603 + }); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, [test.formattedInput]); + }); + + // when + web3.eth[method](test.input, function(error, result){ + + // then + assert.isUndefined(result); + assert.strictEqual(test.formattedResult, error.message); + + done(); + }); + + }); + }); +}); + diff --git a/bower_components/web3/test/batch.js b/bower_components/web3/test/batch.js new file mode 100644 index 00000000..5d2e3c41 --- /dev/null +++ b/bower_components/web3/test/batch.js @@ -0,0 +1,202 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); +var bn = require('bignumber.js'); + +describe('lib/web3/batch', function () { + describe('execute', function () { + it('should execute batch request', function (done) { + + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + + var result = '0x126'; + var result2 = '0x127'; + provider.injectBatchResults([result, result2]); + + var counter = 0; + var callback = function (err, r) { + counter++; + assert.deepEqual(new bn(result), r); + }; + + var callback2 = function (err, r) { + assert.equal(counter, 1); + assert.deepEqual(new bn(result2), r); + done(); + }; + + provider.injectValidation(function (payload) { + var first = payload[0]; + var second = payload[1]; + + assert.equal(first.method, 'eth_getBalance'); + assert.deepEqual(first.params, ['0x0000000000000000000000000000000000000000', 'latest']); + assert.equal(second.method, 'eth_getBalance'); + assert.deepEqual(second.params, ['0x0000000000000000000000000000000000000005', 'latest']); + }); + + var batch = web3.createBatch(); + batch.add(web3.eth.getBalance.request('0x0000000000000000000000000000000000000000', 'latest', callback)); + batch.add(web3.eth.getBalance.request('0x0000000000000000000000000000000000000005', 'latest', callback2)); + batch.execute(); + }); + + it('should execute batch request for async properties', function (done) { + + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + + var result = []; + var result2 = '0xb'; + provider.injectBatchResults([result, result2]); + + var counter = 0; + var callback = function (err, r) { + counter++; + assert.isArray(result, r); + }; + + var callback2 = function (err, r) { + assert.equal(counter, 1); + assert.equal(r, 11); + done(); + }; + + provider.injectValidation(function (payload) { + var first = payload[0]; + var second = payload[1]; + + assert.equal(first.method, 'eth_accounts'); + assert.deepEqual(first.params, []); + assert.equal(second.method, 'net_peerCount'); + assert.deepEqual(second.params, []); + }); + + var batch = web3.createBatch(); + batch.add(web3.eth.getAccounts.request(callback)); + batch.add(web3.net.getPeerCount.request(callback2)); + batch.execute(); + }); + + it('should execute batch request with contract', function (done) { + + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + + var abi = [{ + "name": "balance(address)", + "type": "function", + "inputs": [{ + "name": "who", + "type": "address" + }], + "constant": true, + "outputs": [{ + "name": "value", + "type": "uint256" + }] + }]; + + + var address = '0x1000000000000000000000000000000000000001'; + var result = '0x126'; + var result2 = '0x0000000000000000000000000000000000000000000000000000000000000123'; + + var counter = 0; + var callback = function (err, r) { + counter++; + assert.deepEqual(new bn(result), r); + }; + + var callback2 = function (err, r) { + assert.equal(counter, 1); + assert.deepEqual(new bn(result2), r); + done(); + }; + + provider.injectValidation(function (payload) { + var first = payload[0]; + var second = payload[1]; + + assert.equal(first.method, 'eth_getBalance'); + assert.deepEqual(first.params, ['0x0000000000000000000000000000000000000000', 'latest']); + assert.equal(second.method, 'eth_call'); + assert.deepEqual(second.params, [{ + 'to': '0x1000000000000000000000000000000000000001', + 'data': '0xe3d670d70000000000000000000000001000000000000000000000000000000000000001' + }]); + }); + + var batch = web3.createBatch(); + batch.add(web3.eth.getBalance.request('0x0000000000000000000000000000000000000000', 'latest', callback)); + batch.add(web3.eth.contract(abi).at(address).balance.request(address, callback2)); + provider.injectBatchResults([result, result2]); + batch.execute(); + }); + + it('should execute batch requests and receive errors', function (done) { + + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + + var abi = [{ + "name": "balance(address)", + "type": "function", + "inputs": [{ + "name": "who", + "type": "address" + }], + "constant": true, + "outputs": [{ + "name": "value", + "type": "uint256" + }] + }]; + + + var address = '0x1000000000000000000000000000000000000001'; + var result = 'Something went wrong'; + var result2 = 'Something went wrong 2'; + + + var counter = 0; + var callback = function (err, r) { + counter++; + assert.isNotNull(err); + }; + + var callback2 = function (err, r) { + assert.equal(counter, 1); + assert.isNotNull(err); + done(); + }; + + provider.injectValidation(function (payload) { + var first = payload[0]; + var second = payload[1]; + + assert.equal(first.method, 'eth_getBalance'); + assert.deepEqual(first.params, ['0x0000000000000000000000000000000000000000', 'latest']); + assert.equal(second.method, 'eth_call'); + assert.deepEqual(second.params, [{ + 'to': '0x1000000000000000000000000000000000000001', + 'data': '0xe3d670d70000000000000000000000001000000000000000000000000000000000000001' + }]); + }); + + var batch = web3.createBatch(); + batch.add(web3.eth.getBalance.request('0x0000000000000000000000000000000000000000', 'latest', callback)); + batch.add(web3.eth.contract(abi).at(address).balance.request(address, callback2)); + provider.injectBatchResults([result, result2], true); // injects error + batch.execute(); + }); + }); +}); + diff --git a/bower_components/web3/test/bloom.testAddress.js b/bower_components/web3/test/bloom.testAddress.js new file mode 100644 index 00000000..0d0f5b84 --- /dev/null +++ b/bower_components/web3/test/bloom.testAddress.js @@ -0,0 +1,18 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var bloom = require('../lib/utils/bloom.js') +var assert = chai.assert; + +var addressTests = [ + {bloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', address: '0xb794f5ea0ba39494ce839613fffba74279579268', result: false}, + {bloom: '0x0020008400000010000000000400000200000008000000000010000000002000000080000020000000080004000000010000000000000040000000000000000000000001000200008000000D000000000010000400000400000100000000000001400008220000000000004000040802004000200000000000000010000041000000020100008000000000000000000000000010000000080000000000800900000000000000000000000000100000800000000000000C28000000000000010000000002000040002000000080000000000000000000000020120020000020200000000040000000000000040000000400000000000000000000020000000000', address: '0x54D2C22A7E422DFC71D09D1557D4EBA6C9997D12', result: true}, + {bloom: '0x0020008400000010000000000400000200000008000000000010000000002000000080000020000000080004000000010000000000000040000000000000000000000001000200008000000D000000000010000400000400000100000000000001400008220000000000004000040802004000200000000000000010000041000000020100008000000000000000000000000010000000080000000000800900000000000000000000000000100000800000000000000C28000000000000010000000002000040002000000080000000000000000000000020120020000020200000000040000000000000040000000400000000000000000000020000000000', address: '0x54d2c22a7e422dfc71d09d1557d4eba6c9997d13', result: false} +]; + +describe('lib/utils/bloom', function() { + describe('testAddress', function() { + addressTests.forEach(function(test) { + assert.equal(bloom.testAddress(test.bloom, test.address), test.result); + }); + }); +}); \ No newline at end of file diff --git a/bower_components/web3/test/bloom.testTopic.js b/bower_components/web3/test/bloom.testTopic.js new file mode 100644 index 00000000..88453be9 --- /dev/null +++ b/bower_components/web3/test/bloom.testTopic.js @@ -0,0 +1,20 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var bloom = require('../lib/utils/bloom.js') +var assert = chai.assert; + +var topicTests = [ + {bloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', topics: ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"], result: false}, + {bloom: '0x0020008400000010000000000400000200000008000000000010000000002000000080000020000000080004000000010000000000000040000000000000000000000001000200008000000d000000000010000400000400000100000000000001400008220000000000004000040802004000200000000000000010000041000000020100008000000000000000000000000010000000080000000000800900000000000000000000000000100000800000000000000c28000000000000010000000002000040002000000080000000000000000000000020120020000020200000000040000000000000040000000400000000000000000000020000000000', topics: ['0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF', '0x000000000000000000000000b3bb037d2f2341a1c2775d51909a3d944597987d', '0x00000000000000000000000041f106fe815079086c73e24c5da97a4afec1c8c3'], result: true}, + {bloom: '0x0020008400000010000000000400000200000008000000000010000000002000000080000020000000080004000000010000000000000040000000000000000000000001000200008000000d000000000010000400000400000100000000000001400008220000000000004000040802004000200000000000000010000041000000020100008000000000000000000000000010000000080000000000800900000000000000000000000000100000800000000000000c28000000000000010000000002000040002000000080000000000000000000000020120020000020200000000040000000000000040000000400000000000000000000020000000000', topics: ['0x00000000000000000000000041f106fe815079086c73e24c5da97a4afec1c8c4'], result: false} +]; + +describe('lib/utils/bloom', function() { + describe('hasTopic', function() { + topicTests.forEach(function(test) { + test.topics.forEach(function(topic) { + assert.equal(bloom.testTopic(test.bloom, topic), test.result); + }); + }); + }); +}); \ No newline at end of file diff --git a/bower_components/web3/test/coder.decodeParam.js b/bower_components/web3/test/coder.decodeParam.js new file mode 100644 index 00000000..916abac2 --- /dev/null +++ b/bower_components/web3/test/coder.decodeParam.js @@ -0,0 +1,377 @@ +var chai = require('chai'); +var assert = chai.assert; +var coder = require('../lib/solidity/coder'); +var BigNumber = require('bignumber.js'); +var bn = BigNumber; + + +describe('lib/solidity/coder', function () { + describe('decodeParam', function () { + var test = function (t) { + it('should turn ' + t.value + ' to ' + t.expected, function () { + assert.deepEqual(coder.decodeParam(t.type, t.value), t.expected); + }); + }; + + + test({ type: 'address', expected: '0x407d73d8a49eeb85d32cf465507dd71d507100c1', + value: '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1'}); + test({ type: 'address[2]', expected: ['0x407d73d8a49eeb85d32cf465507dd71d507100c1', '0x407d73d8a49eeb85d32cf465507dd71d507100c3'], + value: '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' }); + test({ type: 'address[]', expected: ['0x407d73d8a49eeb85d32cf465507dd71d507100c1', '0x407d73d8a49eeb85d32cf465507dd71d507100c3'], + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' }); + test({ type: 'address[][2]', expected: [['0x407d73d8a49eeb85d32cf465507dd71d507100c1', '0x407d73d8a49eeb85d32cf465507dd71d507100c2'], + ['0x407d73d8a49eeb85d32cf465507dd71d507100c3', '0x407d73d8a49eeb85d32cf465507dd71d507100c4']], + value: '0000000000000000000000000000000000000000000000000000000000000040' + + '00000000000000000000000000000000000000000000000000000000000000a0' + + '0000000000000000000000000000000000000000000000000000000000000002' + /* 40 */ + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + /* 60 */ + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c2' + + '0000000000000000000000000000000000000000000000000000000000000002' + /* a0 */ + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c4' }); + test({ type: 'address[2][]', expected: [['0x407d73d8a49eeb85d32cf465507dd71d507100c1', '0x407d73d8a49eeb85d32cf465507dd71d507100c2'], + ['0x407d73d8a49eeb85d32cf465507dd71d507100c3', '0x407d73d8a49eeb85d32cf465507dd71d507100c4']], + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000002' + /* 20 */ + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c2' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c4' }); + test({ type: 'address[][]', expected: [['0x407d73d8a49eeb85d32cf465507dd71d507100c1', '0x407d73d8a49eeb85d32cf465507dd71d507100c2'], + ['0x407d73d8a49eeb85d32cf465507dd71d507100c3', '0x407d73d8a49eeb85d32cf465507dd71d507100c4']], + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000002' + /* 20 */ + '0000000000000000000000000000000000000000000000000000000000000080' + + '00000000000000000000000000000000000000000000000000000000000000e0' + + '0000000000000000000000000000000000000000000000000000000000000002' + /* 80 */ + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + /* a0 */ + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c2' + + '0000000000000000000000000000000000000000000000000000000000000002' + /* e0 */ + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c4' }); + test({ type: 'bool', expected: true, value: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'bool', expected: false, value: '0000000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'bool[2]', expected: [true, false], + value: '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'bool[]', expected: [true, true, false], + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000000'}); + + test({ type: 'int', expected: new bn(1), value: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'int', expected: new bn(1), value: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'int', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'int', expected: new bn(-1), value: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'}); + test({ type: 'int256', expected: new bn(1), value: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'int256', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'int256', expected: new bn(-1), value: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'}); + test({ type: 'int8', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'int8[2]', expected: [new bn(16), new bn(2)], + value: '0000000000000000000000000000000000000000000000000000000000000010' + + '0000000000000000000000000000000000000000000000000000000000000002'}); + test({ type: 'int32', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'int64', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'int128', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'int[]', expected: [], value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'int[]', expected: [new bn(3)], value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ type: 'int256[]', expected: [new bn(3)], value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ type: 'int[]', expected: [new bn(1), new bn(2), new bn(3)], + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ type: 'int[3][]', expected: [[new bn(1), new bn(2), new bn(3)], [new bn(4), new bn(5), new bn(6)]], + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000004' + + '0000000000000000000000000000000000000000000000000000000000000005' + + '0000000000000000000000000000000000000000000000000000000000000006'}); + + test({ type: 'uint', expected: new bn(1), value: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'uint', expected: new bn(1), value: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'uint', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'uint', expected: new bn('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'), + value: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'}); + test({ type: 'uint256', expected: new bn(1), value: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'uint256', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'uint8', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'uint32', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'uint64', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'uint128', expected: new bn(16), value: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'uint[]', expected: [], value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'uint[]', expected: [new bn(3)], value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ type: 'uint256[]', expected: [new bn(3)], value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ type: 'uint[]', expected: [new bn(1), new bn(2), new bn(3)], + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ type: 'uint[3][]', expected: [[new bn(1), new bn(2), new bn(3)], [new bn(4), new bn(5), new bn(6)]], + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000004' + + '0000000000000000000000000000000000000000000000000000000000000005' + + '0000000000000000000000000000000000000000000000000000000000000006'}); + test({ type: 'bytes', expected: '0x6761766f66796f726b', + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ type: 'bytes', expected: '0x731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000020' + + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b'}); + test({ type: 'bytes', expected: '0x131a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '231a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '331a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000060' + + '131a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '231a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '331a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b'}); + test({ type: 'bytes', expected: '0x731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000040' + + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b'}); + test({ type: 'bytes[2]', expected: ['0x731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134a', + '0x731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b'], + value: '0000000000000000000000000000000000000000000000000000000000000040' + + '0000000000000000000000000000000000000000000000000000000000000080' + + '0000000000000000000000000000000000000000000000000000000000000020' + + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134a' + + '0000000000000000000000000000000000000000000000000000000000000020' + + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b'}); + test({ type: 'bytes[][2]', expected: [['0x731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134a'], + ['0x731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134c', + '0x731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134d']], + value: '0000000000000000000000000000000000000000000000000000000000000040' + + '0000000000000000000000000000000000000000000000000000000000000080' + + + '0000000000000000000000000000000000000000000000000000000000000001' + // 40 // + '00000000000000000000000000000000000000000000000000000000000000e0' + + + '0000000000000000000000000000000000000000000000000000000000000002' + // 80 // + '0000000000000000000000000000000000000000000000000000000000000120' + + '0000000000000000000000000000000000000000000000000000000000000180' + + + '0000000000000000000000000000000000000000000000000000000000000020' + // e0 // + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134a' + + + '0000000000000000000000000000000000000000000000000000000000000040' + // 120 // + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134c' + + '0000000000000000000000000000000000000000000000000000000000000020' + // 180 // + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134d'}); + + test({ type: 'bytes1', expected: '0xcf', + value: 'cf00000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'bytes1[4]', expected: ['0xcf', '0x68', '0x4d', '0xfb'], + value: 'cf00000000000000000000000000000000000000000000000000000000000000' + + '6800000000000000000000000000000000000000000000000000000000000000' + + '4d00000000000000000000000000000000000000000000000000000000000000' + + 'fb00000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'bytes32', expected: '0x6761766f66796f726b0000000000000000000000000000000000000000000000', + value: '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + + test({ type: 'string', expected: 'gavofyork', value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ type: 'string', expected: 'ää', + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000008' + + 'c383c2a4c383c2a4000000000000000000000000000000000000000000000000'}); + test({ type: 'string', expected: 'ü', + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000002' + + 'c3bc000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'string', expected: 'Ã', + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000002' + + 'c383000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'bytes', expected: '0xc3a40000c3a4', + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000006' + + 'c3a40000c3a40000000000000000000000000000000000000000000000000000'}); + test({ type: 'bytes32', expected: '0xc3a40000c3a40000000000000000000000000000000000000000000000000000', + value: 'c3a40000c3a40000000000000000000000000000000000000000000000000000'}); + test({ type: 'real', expected: new bn(1), value: '0000000000000000000000000000000100000000000000000000000000000000'}); + test({ type: 'real', expected: new bn(2.125), value: '0000000000000000000000000000000220000000000000000000000000000000'}); + test({ type: 'real', expected: new bn(8.5), value: '0000000000000000000000000000000880000000000000000000000000000000'}); + test({ type: 'real', expected: new bn(-1), value: 'ffffffffffffffffffffffffffffffff00000000000000000000000000000000'}); + test({ type: 'ureal', expected: new bn(1), value: '0000000000000000000000000000000100000000000000000000000000000000'}); + test({ type: 'ureal', expected: new bn(2.125), value: '0000000000000000000000000000000220000000000000000000000000000000'}); + test({ type: 'ureal', expected: new bn(8.5), value: '0000000000000000000000000000000880000000000000000000000000000000'}); + test({ type: 'address', expected: '0x407d73d8a49eeb85d32cf465507dd71d507100c1', + value: '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1'}); + test({ type: 'string', expected: 'welcome to ethereum. welcome to ethereum. welcome to ethereum.', + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '000000000000000000000000000000000000000000000000000000000000003e' + + '77656c636f6d6520746f20657468657265756d2e2077656c636f6d6520746f20' + + '657468657265756d2e2077656c636f6d6520746f20657468657265756d2e0000'}); + test({ type: 'bytes', expected: '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1', + value: '0000000000000000000000000000000000000000000000000000000000000020' + + '000000000000000000000000000000000000000000000000000000000000009f' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff100'}); + }); +}); + +describe('lib/solidity/coder', function () { + describe('decodeParams', function () { + var test = function (t) { + it('should turn ' + t.values + ' to ' + t.expected, function () { + assert.deepEqual(coder.decodeParams(t.types, t.values), t.expected); + }); + }; + + + test({ types: ['address'], expected: ['0x407d73d8a49eeb85d32cf465507dd71d507100c1'], + values: '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1'}); + test({ types: ['address', 'address'], expected: ['0x407d73d8a49eeb85d32cf465507dd71d507100c1', '0x407d73d8a49eeb85d32cf465507dd71d507100c3'], + values: '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3'}); + test({ types: ['bool[2]', 'bool[3]'], expected: [[true, false], [false, false, true]], + values: '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ types: ['int[2]', 'int256[3]'], expected: [[new bn(1), new bn(2)], [new bn(3), new bn(4), new bn(5)]], + values: '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000004' + + '0000000000000000000000000000000000000000000000000000000000000005'}); + test({ types: ['int'], expected: [new bn(1)], values: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ types: ['uint[2]', 'uint256[3]'], expected: [[new bn(1), new bn(2)], [new bn(3), new bn(4), new bn(5)]], + values: '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000004' + + '0000000000000000000000000000000000000000000000000000000000000005'}); + test({ types: ['uint'], expected: [new bn(1)], values: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ types: ['bytes1', 'bytes1'], expected: ['0xaa', '0xbb'], + values: 'aa00000000000000000000000000000000000000000000000000000000000000' + + 'bb00000000000000000000000000000000000000000000000000000000000000'}); + test({ types: ['bytes1[2]', 'bytes1'], expected: [['0xaa', '0xbb'], '0xcc'], + values: 'aa00000000000000000000000000000000000000000000000000000000000000' + + 'bb00000000000000000000000000000000000000000000000000000000000000' + + 'cc00000000000000000000000000000000000000000000000000000000000000'}); + test({ types: ['bytes', 'bytes'], expected: ['0x731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + '0x731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134c'], + values: '0000000000000000000000000000000000000000000000000000000000000040' + + '0000000000000000000000000000000000000000000000000000000000000080' + + '0000000000000000000000000000000000000000000000000000000000000020' + + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '0000000000000000000000000000000000000000000000000000000000000020' + + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134c'}); + test({ types: ['int', 'string', 'int'], expected: [new bn(1), 'gavofyork', new bn(5)], + values: '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000060' + + '0000000000000000000000000000000000000000000000000000000000000005' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ types: ['bytes32', 'int'], expected: ['0x6761766f66796f726b0000000000000000000000000000000000000000000000', new bn(5)], + values: '6761766f66796f726b0000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000005'}); + test({ types: ['int', 'bytes32'], expected: [new bn(5), '0x6761766f66796f726b0000000000000000000000000000000000000000000000'], + values: '0000000000000000000000000000000000000000000000000000000000000005' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ types: ['int', 'string', 'int', 'int', 'int', 'int[]'], expected: [new bn(1), 'gavofyork', new bn(2), new bn(3), new bn(4), + [new bn(5), new bn(6), new bn(7)]], + values: '0000000000000000000000000000000000000000000000000000000000000001' + + '00000000000000000000000000000000000000000000000000000000000000c0' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000004' + + '0000000000000000000000000000000000000000000000000000000000000100' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000005' + + '0000000000000000000000000000000000000000000000000000000000000006' + + '0000000000000000000000000000000000000000000000000000000000000007'}); + test({ types: ['int', 'bytes', 'int', 'bytes'], expected: [ + new bn(5), + '0x131a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '231a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + new bn(3), + '0x331a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '431a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + ], + values: '0000000000000000000000000000000000000000000000000000000000000005' + + '0000000000000000000000000000000000000000000000000000000000000080' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '00000000000000000000000000000000000000000000000000000000000000e0' + + '0000000000000000000000000000000000000000000000000000000000000040' + + '131a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '231a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '0000000000000000000000000000000000000000000000000000000000000040' + + '331a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '431a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b'}); + test({ types: ['address[2][1]', 'bool'], expected: [[['0x407d73d8a49eeb85d32cf465507dd71d507100c1', + '0x407d73d8a49eeb85d32cf465507dd71d507100c3']], false], + values: '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' + + '0000000000000000000000000000000000000000000000000000000000000000'}); + test({ types: ['bool[2][1]', 'bool'], expected: [[[true, false]], true], + values: '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ types: ['bytes1[2][1]', 'bool'], expected: [[['0xaa', '0xbb']], true], + values: 'aa00000000000000000000000000000000000000000000000000000000000000' + + 'bb00000000000000000000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ types: ['int[2][1]', 'bool'], expected: [[[new bn(1), new bn(2)]], true], + values: '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ types: ['real[2][1]', 'bool'], expected: [[[new bn(1), new bn(2.125)]], true], + values: '0000000000000000000000000000000100000000000000000000000000000000' + + '0000000000000000000000000000000220000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ types: ['uint[2][1]', 'bool'], expected: [[[new bn(1), new bn(2)]], true], + values: '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ types: ['ureal[2][1]', 'bool'], expected: [[[new bn(1), new bn(2.125)]], true], + values: '0000000000000000000000000000000100000000000000000000000000000000' + + '0000000000000000000000000000000220000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000001'}); + }); +}); diff --git a/bower_components/web3/test/coder.encodeParam.js b/bower_components/web3/test/coder.encodeParam.js new file mode 100644 index 00000000..eeb30819 --- /dev/null +++ b/bower_components/web3/test/coder.encodeParam.js @@ -0,0 +1,352 @@ +var chai = require('chai'); +var assert = chai.assert; +var coder = require('../lib/solidity/coder'); + + +describe('lib/solidity/coder', function () { + describe('encodeParam', function () { + var test = function (t) { + it('should turn ' + t.value + ' to ' + t.expected, function () { + assert.equal(coder.encodeParam(t.type, t.value), t.expected); + }); + }; + + + test({ type: 'address', value: '0x407d73d8a49eeb85d32cf465507dd71d507100c1', + expected: '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1'}); + test({ type: 'address[2]', value: ['0x407d73d8a49eeb85d32cf465507dd71d507100c1', '0x407d73d8a49eeb85d32cf465507dd71d507100c3'], + expected: '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' }); + test({ type: 'address[]', value: ['0x407d73d8a49eeb85d32cf465507dd71d507100c1', '0x407d73d8a49eeb85d32cf465507dd71d507100c3'], + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' }); + test({ type: 'address[][2]', value: [['0x407d73d8a49eeb85d32cf465507dd71d507100c1', '0x407d73d8a49eeb85d32cf465507dd71d507100c2'], + ['0x407d73d8a49eeb85d32cf465507dd71d507100c3', '0x407d73d8a49eeb85d32cf465507dd71d507100c4']], + expected: '0000000000000000000000000000000000000000000000000000000000000040' + + '00000000000000000000000000000000000000000000000000000000000000a0' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c2' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c4' }); + test({ type: 'address[2][]', value: [['0x407d73d8a49eeb85d32cf465507dd71d507100c1', '0x407d73d8a49eeb85d32cf465507dd71d507100c2'], + ['0x407d73d8a49eeb85d32cf465507dd71d507100c3', '0x407d73d8a49eeb85d32cf465507dd71d507100c4']], + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c2' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c4' }); + //test({ type: 'address[][]', value: [['0x407d73d8a49eeb85d32cf465507dd71d507100c5'], + //['0x407d73d8a49eeb85d32cf465507dd71d507100c3']], + //expected: '0000000000000000000000000000000000000000000000000000000000000020' + + //'0000000000000000000000000000000000000000000000000000000000000002' + + //'0000000000000000000000000000000000000000000000000000000000000080' + + //'00000000000000000000000000000000000000000000000000000000000000c0' + + //'0000000000000000000000000000000000000000000000000000000000000001' + + //'000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c5' + + //'0000000000000000000000000000000000000000000000000000000000000001' + + //'000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' }); + //test({ type: 'address[][]', value: [['0x407d73d8a49eeb85d32cf465507dd71d507100cf', '0x407d73d8a49eeb85d32cf465507dd71d507100c2'], + //['0x407d73d8a49eeb85d32cf465507dd71d507100c3', '0x407d73d8a49eeb85d32cf465507dd71d507100c4']], + //expected: '0000000000000000000000000000000000000000000000000000000000000020' + + //'0000000000000000000000000000000000000000000000000000000000000002' + + //'0000000000000000000000000000000000000000000000000000000000000080' + + //'00000000000000000000000000000000000000000000000000000000000000e0' + + //'0000000000000000000000000000000000000000000000000000000000000002' + + //'000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100cf' + + //'000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c2' + + //'0000000000000000000000000000000000000000000000000000000000000002' + + //'000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3' + + //'000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c4' }); + test({ type: 'bool', value: true, expected: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'bool', value: false, expected: '0000000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'bool[1][2]', value: [[false], [false]], + expected: '0000000000000000000000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'bool[2]', value: [true, false], + expected: '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'bool[]', value: [true, true, false], + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000000'}); + + test({ type: 'int', value: 1, expected: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'int', value: 16, expected: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'int', value: -1, expected: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'}); + test({ type: 'int', value: 0.1, expected: '0000000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'int', value: 3.9, expected: '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ type: 'int256', value: 1, expected: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'int256', value: 16, expected: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'int256', value: -1, expected: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'}); + + test({ type: 'uint', value: 1, expected: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'uint', value: 16, expected: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'uint', value: 0.1, expected: '0000000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'uint', value: 3.9, expected: '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ type: 'uint256', value: 1, expected: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ type: 'uint256', value: 16, expected: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ type: 'uint256', value: '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + expected: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'}); + test({ type: 'bytes32', value: '0x6761766f66796f726b', + expected: '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ type: 'bytes32', value: '0x731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + expected: '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b'}); + test({ type: 'bytes32', value: '0x02838654a83c213dae3698391eabbd54a5b6e1fb3452bc7fa4ea0dd5c8ce7e29', + expected: '02838654a83c213dae3698391eabbd54a5b6e1fb3452bc7fa4ea0dd5c8ce7e29'}); + test({ type: 'bytes', value: '0x6761766f66796f726b', + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ type: 'bytes', value: '0x731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000020' + + '731a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b'}); + test({ type: 'bytes', value: '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1', + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '000000000000000000000000000000000000000000000000000000000000009f' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff' + + 'fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff100'}); + test({ type: 'string', value: 'gavofyork', expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ type: 'bytes', value: '0xc3a40000c3a4', + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000006' + + 'c3a40000c3a40000000000000000000000000000000000000000000000000000'}); + test({ type: 'bytes32', value: '0xc3a40000c3a4', + expected: 'c3a40000c3a40000000000000000000000000000000000000000000000000000'}); + test({ type: 'bytes64', value: '0xc3a40000c3a40000000000000000000000000000000000000000000000000000' + + 'c3a40000c3a40000000000000000000000000000000000000000000000000000', + expected: 'c3a40000c3a40000000000000000000000000000000000000000000000000000' + + 'c3a40000c3a40000000000000000000000000000000000000000000000000000'}); + test({ type: 'string', value: 'ää', + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000008' + + 'c383c2a4c383c2a4000000000000000000000000000000000000000000000000'}); + test({ type: 'string', value: 'ü', + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000002' + + 'c3bc000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'string', value: 'Ã', + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000002' + + 'c383000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'int[]', value: [], expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000000'}); + test({ type: 'int[]', value: [3], expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ type: 'int256[]', value: [3], expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ type: 'int[]', value: [1,2,3], expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ type: 'bytes1[4]', value: ['0xcf', '0x68', '0x4d', '0xfb'], + expected: 'cf00000000000000000000000000000000000000000000000000000000000000' + + '6800000000000000000000000000000000000000000000000000000000000000' + + '4d00000000000000000000000000000000000000000000000000000000000000' + + 'fb00000000000000000000000000000000000000000000000000000000000000'}); + + + + test({ type: 'real', value: 1, expected: '0000000000000000000000000000000100000000000000000000000000000000'}); + test({ type: 'real', value: 2.125, expected: '0000000000000000000000000000000220000000000000000000000000000000'}); + test({ type: 'real', value: 8.5, expected: '0000000000000000000000000000000880000000000000000000000000000000'}); + test({ type: 'real', value: -1, expected: 'ffffffffffffffffffffffffffffffff00000000000000000000000000000000'}); + test({ type: 'ureal', value: 1, expected: '0000000000000000000000000000000100000000000000000000000000000000'}); + test({ type: 'ureal', value: 2.125, expected: '0000000000000000000000000000000220000000000000000000000000000000'}); + test({ type: 'ureal', value: 8.5, expected: '0000000000000000000000000000000880000000000000000000000000000000'}); + test({ type: 'bytes', value: '0x131a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '231a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000040' + + '131a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '231a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b'}); + test({ type: 'bytes', value: '0x131a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '231a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '331a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000060' + + '131a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '231a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '331a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b'}); + test({ type: 'string', value: 'welcome to ethereum. welcome to ethereum. welcome to ethereum.', + expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '000000000000000000000000000000000000000000000000000000000000003e' + + '77656c636f6d6520746f20657468657265756d2e2077656c636f6d6520746f20' + + '657468657265756d2e2077656c636f6d6520746f20657468657265756d2e0000'}); + }); +}); + + +describe('lib/solidity/coder', function () { + describe('encodeParams', function () { + var test = function (t) { + it('should turn ' + t.values + ' to ' + t.expected, function () { + assert.equal(coder.encodeParams(t.types, t.values), t.expected); + }); + }; + + + test({ types: ['address', 'address'], values: ['0x407d73d8a49eeb85d32cf465507dd71d507100c1', '0x407d73d8a49eeb85d32cf465507dd71d507100c3'], + expected: '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c1' + + '000000000000000000000000407d73d8a49eeb85d32cf465507dd71d507100c3'}); + test({ types: ['bool[2]', 'bool[3]'], values: [[true, false], [false, false, true]], + expected: '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ types: ['int'], values: [1], expected: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ types: ['int'], values: [16], expected: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ types: ['int'], values: [-1], expected: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'}); + test({ types: ['int256'], values: [1], expected: '0000000000000000000000000000000000000000000000000000000000000001'}); + test({ types: ['int256'], values: [16], expected: '0000000000000000000000000000000000000000000000000000000000000010'}); + test({ types: ['int256'], values: [-1], expected: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'}); + test({ types: ['int[]'], values: [[3]], expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ types: ['int256[]'], values: [[3]], expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ types: ['int256[]'], values: [[1,2,3]], expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ types: ['int[]', 'int[]'], values: [[1,2], [3,4]], + expected: '0000000000000000000000000000000000000000000000000000000000000040' + + '00000000000000000000000000000000000000000000000000000000000000a0' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000004'}); + test({ types: ['int[]', 'int[]', 'int[]'], values: [[1,2], [3,4], [5,6,7]], + expected: '0000000000000000000000000000000000000000000000000000000000000060' + + '00000000000000000000000000000000000000000000000000000000000000c0' + + '0000000000000000000000000000000000000000000000000000000000000120' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000004' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000005' + + '0000000000000000000000000000000000000000000000000000000000000006' + + '0000000000000000000000000000000000000000000000000000000000000007'}); + test({ types: ['bytes32'], values: ['0x6761766f66796f726b'], + expected: '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ types: ['string'], values: ['gavofyork'], expected: '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ types: ['string', 'string'], values: ['gavofyork', 'gavofyork'], + expected: '0000000000000000000000000000000000000000000000000000000000000040' + + '0000000000000000000000000000000000000000000000000000000000000080' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + + + test({ types: ['bytes32', 'int'], values: ['0x6761766f66796f726b', 5], + expected: '6761766f66796f726b0000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000005'}); + test({ types: ['int', 'bytes32'], values: [5, '0x6761766f66796f726b'], + expected: '0000000000000000000000000000000000000000000000000000000000000005' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ types: ['int', 'string'], values: [5, 'gavofyork'], + expected: '0000000000000000000000000000000000000000000000000000000000000005' + + '0000000000000000000000000000000000000000000000000000000000000040' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ types: ['string', 'int'], values: ['gavofyork', 5], + expected: '0000000000000000000000000000000000000000000000000000000000000040' + + '0000000000000000000000000000000000000000000000000000000000000005' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ types: ['string', 'bool', 'int[]'], values: ['gavofyork', true, [1, 2, 3]], + expected: '0000000000000000000000000000000000000000000000000000000000000060' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '00000000000000000000000000000000000000000000000000000000000000a0' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ types: ['string', 'int[]'], values: ['gavofyork', [1, 2, 3]], + expected: '0000000000000000000000000000000000000000000000000000000000000040' + + '0000000000000000000000000000000000000000000000000000000000000080' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003'}); + test({ types: ['int', 'string'], values: [5, 'gavofyork'], + expected: '0000000000000000000000000000000000000000000000000000000000000005' + + '0000000000000000000000000000000000000000000000000000000000000040' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000'}); + test({ types: ['int', 'string', 'int', 'int', 'int', 'int[]'], values: [1, 'gavofyork', 2, 3, 4, [5, 6, 7]], + expected: '0000000000000000000000000000000000000000000000000000000000000001' + + '00000000000000000000000000000000000000000000000000000000000000c0' + + '0000000000000000000000000000000000000000000000000000000000000002' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000004' + + '0000000000000000000000000000000000000000000000000000000000000100' + + '0000000000000000000000000000000000000000000000000000000000000009' + + '6761766f66796f726b0000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '0000000000000000000000000000000000000000000000000000000000000005' + + '0000000000000000000000000000000000000000000000000000000000000006' + + '0000000000000000000000000000000000000000000000000000000000000007'}); + test({ types: ['int', 'bytes', 'int', 'bytes'], values: [ + 5, + '0x131a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '231a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + 3, + '0x331a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '431a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b', + ], + expected: '0000000000000000000000000000000000000000000000000000000000000005' + + '0000000000000000000000000000000000000000000000000000000000000080' + + '0000000000000000000000000000000000000000000000000000000000000003' + + '00000000000000000000000000000000000000000000000000000000000000e0' + + '0000000000000000000000000000000000000000000000000000000000000040' + + '131a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '231a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '0000000000000000000000000000000000000000000000000000000000000040' + + '331a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b' + + '431a3afc00d1b1e3461b955e53fc866dcf303b3eb9f4c16f89e388930f48134b'}); + + test({ types: ['bytes3', 'bytes'], values: ['0xcf0011', '0x4d00000000000000000000000000000000000000000000000000000000000012'], + expected: 'cf00110000000000000000000000000000000000000000000000000000000000' + + '0000000000000000000000000000000000000000000000000000000000000040' + + '0000000000000000000000000000000000000000000000000000000000000020' + + '4d00000000000000000000000000000000000000000000000000000000000012'}); + + }); +}); + + diff --git a/bower_components/web3/test/contract.js b/bower_components/web3/test/contract.js new file mode 100644 index 00000000..a7e72478 --- /dev/null +++ b/bower_components/web3/test/contract.js @@ -0,0 +1,614 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); +var FakeHttpProvider2 = require('./helpers/FakeHttpProvider2'); +var utils = require('../lib/utils/utils'); +var errors = require('../lib/web3/errors'); +var BigNumber = require('bignumber.js'); +var sha3 = require('../lib/utils/sha3'); + + +var desc = [{ + "name": "balance(address)", + "type": "function", + "inputs": [{ + "name": "who", + "type": "address" + }], + "constant": true, + "outputs": [{ + "name": "value", + "type": "uint256" + }] +}, { + "name": "send(address,uint256)", + "type": "function", + "inputs": [{ + "name": "to", + "type": "address" + }, { + "name": "value", + "type": "uint256" + }], + "outputs": [], + "payable": true +}, { + "name": "testArr(int[])", + "type": "function", + "inputs": [{ + "name": "value", + "type": "int[]" + }], + "constant": true, + "outputs": [{ + "name": "d", + "type": "int" + }] +}, { + "name":"Changed", + "type":"event", + "inputs": [ + {"name":"from","type":"address","indexed":true}, + {"name":"amount","type":"uint256","indexed":true}, + {"name":"t1","type":"uint256","indexed":false}, + {"name":"t2","type":"uint256","indexed":false} + ], +}]; + +var address = '0x1234567890123456789012345678901234567891'; + +describe('contract', function () { + describe('event', function () { + it('should create event filter', function (done) { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + var signature = 'Changed(address,uint256,uint256,uint256)'; + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step = 1; + provider.injectResult('0x3'); + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'eth_newFilter'); + assert.deepEqual(payload.params[0], { + topics: [ + '0x' + sha3(signature), + '0x0000000000000000000000001234567890123456789012345678901234567891', + null + ], + address: '0x1234567890123456789012345678901234567891' + }); + } else if (step === 1) { + step = 2; + provider.injectResult([{ + address: address, + topics: [ + '0x' + sha3(signature), + '0x0000000000000000000000001234567890123456789012345678901234567891', + '0x0000000000000000000000000000000000000000000000000000000000000001' + ], + number: 2, + data: '0x0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000008' + }]); + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'eth_getFilterLogs'); + } else if (step === 2 && utils.isArray(payload)) { + step++; + provider.injectBatchResults([[{ + address: address, + topics: [ + '0x' + sha3(signature), + '0x0000000000000000000000001234567890123456789012345678901234567891', + '0x0000000000000000000000000000000000000000000000000000000000000001' + ], + number: 2, + data: '0x0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000008' + }]]); + var r = payload.filter(function (p) { + return p.jsonrpc === '2.0' && p.method === 'eth_getFilterChanges' && p.params[0] === '0x3'; + }); + assert.equal(r.length > 0, true); + } + }); + + var contract = web3.eth.contract(desc).at(address); + + var res = 0; + var event = contract.Changed({from: address}); + event.watch(function(err, result) { + assert.equal(result.args.from, address); + assert.equal(result.args.amount, 1); + assert.equal(result.args.t1, 1); + assert.equal(result.args.t2, 8); + res++; + if (res === 2) { + event.stopWatching(); + done(); + } + }); + }); + + it('should create event filter and watch immediately', function (done) { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + var signature = 'Changed(address,uint256,uint256,uint256)'; + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step = 1; + provider.injectResult('0x3'); + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'eth_newFilter'); + assert.deepEqual(payload.params[0], { + topics: [ + '0x' + sha3(signature), + '0x0000000000000000000000001234567890123456789012345678901234567891', + null + ], + address: '0x1234567890123456789012345678901234567891' + }); + } else if (step === 1) { + step = 2; + provider.injectResult([{ + address: address, + topics: [ + '0x' + sha3(signature), + '0x0000000000000000000000001234567890123456789012345678901234567891', + '0x0000000000000000000000000000000000000000000000000000000000000001' + ], + number: 2, + data: '0x0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000008' + }]); + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'eth_getFilterLogs'); + } else if (step === 2 && utils.isArray(payload)) { + step++; + provider.injectBatchResults([[{ + address: address, + topics: [ + '0x' + sha3(signature), + '0x0000000000000000000000001234567890123456789012345678901234567891', + '0x0000000000000000000000000000000000000000000000000000000000000001' + ], + number: 2, + data: '0x0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000008' + }]]); + var r = payload.filter(function (p) { + return p.jsonrpc === '2.0' && p.method === 'eth_getFilterChanges' && p.params[0] === '0x3'; + }); + assert.equal(r.length > 0, true); + } + }); + + var contract = web3.eth.contract(desc).at(address); + + var res = 0; + var event = contract.Changed({from: address}, function(err, result) { + assert.equal(result.args.from, address); + assert.equal(result.args.amount, 1); + assert.equal(result.args.t1, 1); + assert.equal(result.args.t2, 8); + res++; + if (res === 2) { + event.stopWatching(); + done(); + } + }); + }); + + it('should create all event filter', function (done) { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + var signature = 'Changed(address,uint256,uint256,uint256)'; + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step = 1; + provider.injectResult('0x3'); + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'eth_newFilter'); + assert.deepEqual(payload.params[0], { + topics: [], + address: '0x1234567890123456789012345678901234567891' + }); + } else if (step === 1) { + step = 2; + provider.injectResult([{ + address: address, + topics: [ + '0x' + sha3(signature), + '0x0000000000000000000000001234567890123456789012345678901234567891', + '0x0000000000000000000000000000000000000000000000000000000000000001' + ], + number: 2, + data: '0x0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000008' + }]); + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'eth_getFilterLogs'); + } else if (step === 2 && utils.isArray(payload)) { + step++; + provider.injectBatchResults([[{ + address: address, + topics: [ + '0x' + sha3(signature), + '0x0000000000000000000000001234567890123456789012345678901234567891', + '0x0000000000000000000000000000000000000000000000000000000000000001' + ], + number: 2, + data: '0x0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000008' + }]]); + var r = payload.filter(function (p) { + return p.jsonrpc === '2.0' && p.method === 'eth_getFilterChanges' && p.params[0] === '0x3'; + }); + assert.equal(r.length > 0, true); + } + }); + + var contract = web3.eth.contract(desc).at(address); + + var res = 0; + var event = contract.allEvents(); + event.watch(function(err, result) { + assert.equal(result.args.from, address); + assert.equal(result.args.amount, 1); + assert.equal(result.args.t1, 1); + assert.equal(result.args.t2, 8); + res++; + if (res === 2) { + event.stopWatching(); + done(); + } + }); + }); + + it('should call constant function', function () { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + provider.injectResult('0x0000000000000000000000000000000000000000000000000000000000000032'); + var signature = 'balance(address)' + var address = '0x1234567890123456789012345678901234567891'; + + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_call'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + '0000000000000000000000001234567890123456789012345678901234567891', + to: address + }, 'latest']); + }); + + var contract = web3.eth.contract(desc).at(address); + + var r = contract.balance(address); + assert.deepEqual(new BigNumber(0x32), r); + }); + + it('should call constant function with default block', function () { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + provider.injectResult('0x0000000000000000000000000000000000000000000000000000000000000032'); + var signature = 'balance(address)' + var address = '0x1234567890123456789012345678901234567891'; + + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_call'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + '0000000000000000000000001234567890123456789012345678901234567891', + to: address + }, '0xb']); + }); + + var contract = web3.eth.contract(desc).at(address); + + var r = contract.balance(address, 11); + assert.deepEqual(new BigNumber(0x32), r); + }); + + it('should sendTransaction to contract function', function () { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + var signature = 'send(address,uint256)'; + var address = '0x1234567890123456789012345678901234567891'; + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_sendTransaction'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + + '0000000000000000000000001234567890123456789012345678901234567891' + + '0000000000000000000000000000000000000000000000000000000000000011' , + from: address, + to: address + }]); + }); + + var contract = web3.eth.contract(desc).at(address); + + contract.send(address, 17, {from: address}); + }); + + it('should make a call with optional params', function () { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + provider.injectResult('0x0000000000000000000000000000000000000000000000000000000000000032'); + var signature = 'balance(address)'; + var address = '0x1234567890123456789012345678901234567891'; + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_call'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + '0000000000000000000000001234567890123456789012345678901234567891', + to: address, + from: address, + gas: '0xc350' + }, 'latest']); + }); + + var contract = web3.eth.contract(desc).at(address); + + var r = contract.balance(address, {from: address, gas: 50000}); + assert.deepEqual(new BigNumber(0x32), r); + + }); + + it('should throw if called with optional params without all args', function () { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + provider.injectResult('0x0000000000000000000000000000000000000000000000000000000000000032'); + var signature = 'balance(address)'; + var address = '0x1234567890123456789012345678901234567891'; + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_call'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + '0000000000000000000000001234567890123456789012345678901234567891', + to: address, + from: address, + gas: '0xc350' + }, 'latest']); + }); + + var contract = web3.eth.contract(desc).at(address); + + var test = function() { + var r = contract.balance({from: address, gas: 50000}); + } + assert.throws(test, errors.InvalidNumberOfSolidityArgs().message); + + }); + + it('should explicitly make a call with optional params', function () { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + provider.injectResult('0x0000000000000000000000000000000000000000000000000000000000000032'); + var signature = 'balance(address)'; + var address = '0x1234567890123456789012345678901234567891'; + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_call'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + '0000000000000000000000001234567890123456789012345678901234567891', + to: address, + from: address, + gas: '0xc350' + }, 'latest']); + }); + + var contract = web3.eth.contract(desc).at(address); + + var r = contract.balance.call(address, {from: address, gas: 50000}); + assert.deepEqual(new BigNumber(0x32), r); + + }); + + it('should explicitly make a call with optional params and defaultBlock', function () { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + provider.injectResult('0x0000000000000000000000000000000000000000000000000000000000000032'); + var signature = 'balance(address)'; + var address = '0x1234567890123456789012345678901234567891'; + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_call'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + '0000000000000000000000001234567890123456789012345678901234567891', + to: address, + from: address, + gas: '0xc350' + }, '0xb']); + }); + + var contract = web3.eth.contract(desc).at(address); + + var r = contract.balance.call(address, {from: address, gas: 50000}, 11); + assert.deepEqual(new BigNumber(0x32), r); + + }); + + it('it should throw if sendTransaction with optional params without all args', function () { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + var signature = 'send(address,uint256)'; + var address = '0x1234567890123456789012345678901234567891'; + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_sendTransaction'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + + '0000000000000000000000001234567890123456789012345678901234567891' + + '0000000000000000000000000000000000000000000000000000000000000011' , + to: address, + from: address, + gas: '0xc350', + gasPrice: '0xbb8', + value: '0x2710' + }]); + }); + + var contract = web3.eth.contract(desc).at(address); + + var test = function() { + contract.send(address, {from: address, gas: 50000, gasPrice: 3000, value: 10000}); + } + + assert.throws(test, errors.InvalidNumberOfSolidityArgs().message); + + }); + + it('should sendTransaction with optional params', function () { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + var signature = 'send(address,uint256)'; + var address = '0x1234567890123456789012345678901234567891'; + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_sendTransaction'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + + '0000000000000000000000001234567890123456789012345678901234567891' + + '0000000000000000000000000000000000000000000000000000000000000011' , + to: address, + from: address, + gas: '0xc350', + gasPrice: '0xbb8', + value: '0x2710' + }]); + }); + + var contract = web3.eth.contract(desc).at(address); + + contract.send(address, 17, {from: address, gas: 50000, gasPrice: 3000, value: 10000}); + }); + + it('should explicitly sendTransaction with optional params', function () { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + var signature = 'send(address,uint256)'; + var address = '0x1234567890123456789012345678901234567891'; + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_sendTransaction'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + + '0000000000000000000000001234567890123456789012345678901234567891' + + '0000000000000000000000000000000000000000000000000000000000000011' , + to: address, + from: address, + gas: '0xc350', + gasPrice: '0xbb8', + value: '0x2710' + }]); + }); + + var contract = web3.eth.contract(desc).at(address); + + contract.send.sendTransaction(address, 17, {from: address, gas: 50000, gasPrice: 3000, value: 10000}); + }); + + it('should explicitly sendTransaction with optional params and call callback without error', function (done) { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + var address = '0x1234567890123456789012345678901234567891'; + var signature = 'send(address,uint256)'; + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_sendTransaction'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + + '0000000000000000000000001234567890123456789012345678901234567891' + + '0000000000000000000000000000000000000000000000000000000000000011' , + to: address, + from: address, + gas: '0xc350', + gasPrice: '0xbb8', + value: '0x2710' + }]); + }); + + var contract = web3.eth.contract(desc).at(address); + + contract.send.sendTransaction(address, 17, {from: address, gas: 50000, gasPrice: 3000, value: 10000}, function (err) { + assert.equal(err, null); + done(); + }); + }); + + it('should explicitly estimateGas with optional params', function () { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + var signature = 'send(address,uint256)'; + var address = '0x1234567890123456789012345678901234567891'; + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_estimateGas'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + + '0000000000000000000000001234567890123456789012345678901234567891' + + '0000000000000000000000000000000000000000000000000000000000000011' , + to: address, + from: address, + gas: '0xc350', + gasPrice: '0xbb8', + value: '0x2710' + }]); + }); + + var contract = web3.eth.contract(desc).at(address); + + contract.send.estimateGas(address, 17, {from: address, gas: 50000, gasPrice: 3000, value: 10000}); + }); + + it('should call testArr method and properly parse result', function () { + var provider = new FakeHttpProvider2(); + var web3 = new Web3(provider); + var signature = 'testArr(int[])'; + var address = '0x1234567890123456789012345678901234567891'; + provider.injectResultList([{ + result: '0x0000000000000000000000000000000000000000000000000000000000000005' + }]); + + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_call'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + + '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000003', + to: address + }, + 'latest' + ]); + }); + + var contract = web3.eth.contract(desc).at(address); + var result = contract.testArr([3]); + + assert.deepEqual(new BigNumber(5), result); + }); + + it('should call testArr method, properly parse result and return the result async', function (done) { + var provider = new FakeHttpProvider2(); + var web3 = new Web3(provider); + var signature = 'testArr(int[])'; + var address = '0x1234567890123456789012345678901234567891'; + provider.injectResultList([{ + result: '0x0000000000000000000000000000000000000000000000000000000000000005' + }]); + provider.injectValidation(function (payload) { + assert.equal(payload.method, 'eth_call'); + assert.deepEqual(payload.params, [{ + data: '0x' + sha3(signature).slice(0, 8) + + '0000000000000000000000000000000000000000000000000000000000000020' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000003', + to: address + }, + 'latest' + ]); + }); + + var contract = web3.eth.contract(desc).at(address); + + contract.testArr([3], function (err, result) { + assert.deepEqual(new BigNumber(5), result); + done(); + }); + + }); + }); +}); diff --git a/bower_components/web3/test/errors.js b/bower_components/web3/test/errors.js new file mode 100644 index 00000000..3ed3c850 --- /dev/null +++ b/bower_components/web3/test/errors.js @@ -0,0 +1,17 @@ +var chai = require('chai'); +var assert = chai.assert; +var errors = require('../lib/web3/errors'); + +describe('lib/web3/method', function () { + describe('getCall', function () { + + for(var key in errors) { + it('should return and error', function () { + + assert.instanceOf(errors[key](), Error); + }); + } + + }); +}); + diff --git a/bower_components/web3/test/event.decode.js b/bower_components/web3/test/event.decode.js new file mode 100644 index 00000000..ae37cd4d --- /dev/null +++ b/bower_components/web3/test/event.decode.js @@ -0,0 +1,183 @@ +var chai = require('chai'); +var assert = chai.assert; +var BigNumber = require('bignumber.js'); +var SolidityEvent = require('../lib/web3/event'); +var Web3 = require('../index'); + + +var name = 'event1'; +var address = '0x1234567890123456789012345678901234567890'; + +var tests = [{ + abi: { + name: name, + inputs: [] + }, + data: { + logIndex: '0x1', + transactionIndex: '0x10', + transactionHash: '0x1234567890', + address: address, + blockHash: '0x1234567890', + blockNumber: '0x1' + }, + expected: { + event: name, + args: {}, + logIndex: 1, + transactionIndex: 16, + transactionHash: '0x1234567890', + address: address, + blockHash: '0x1234567890', + blockNumber: 1 + } +}, { + abi: { + name: name, + inputs: [{ + name: 'a', + type: 'int', + indexed: false + }] + }, + data: { + logIndex: '0x1', + transactionIndex: '0x10', + transactionHash: '0x1234567890', + address: address, + blockHash: '0x1234567890', + blockNumber: '0x1', + data: '0x0000000000000000000000000000000000000000000000000000000000000001' + }, + expected: { + event: name, + args: { + a: new BigNumber(1) + }, + logIndex: 1, + transactionIndex: 16, + transactionHash: '0x1234567890', + address: address, + blockHash: '0x1234567890', + blockNumber: 1 + } +}, { + abi: { + name: name, + inputs: [{ + name: 'a', + type: 'int', + indexed: false + }, { + name: 'b', + type: 'int', + indexed: true + }, { + name: 'c', + type: 'int', + indexed: false + }, { + name: 'd', + type: 'int', + indexed: true + }] + }, + data: { + logIndex: '0x1', + transactionIndex: '0x10', + transactionHash: '0x1234567890', + address: address, + blockHash: '0x1234567890', + blockNumber: '0x1', + data: '0x' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000004', + topics: [ + address, + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x0000000000000000000000000000000000000000000000000000000000000010' + ] + }, + expected: { + event: name, + args: { + a: new BigNumber(1), + b: new BigNumber(10), + c: new BigNumber(4), + d: new BigNumber(16) + }, + logIndex: 1, + transactionIndex: 16, + transactionHash: '0x1234567890', + address: address, + blockHash: '0x1234567890', + blockNumber: 1 + } +}, { + abi: { + name: name, + anonymous: true, + inputs: [{ + name: 'a', + type: 'int', + indexed: false + }, { + name: 'b', + type: 'int', + indexed: true + }, { + name: 'c', + type: 'int', + indexed: false + }, { + name: 'd', + type: 'int', + indexed: true + }] + }, + data: { + logIndex: '0x1', + transactionIndex: '0x10', + transactionHash: '0x1234567890', + address: address, + blockHash: '0x1234567890', + blockNumber: '0x1', + data: '0x' + + '0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000004', + topics: [ + '0x000000000000000000000000000000000000000000000000000000000000000a', + '0x0000000000000000000000000000000000000000000000000000000000000010' + ] + }, + expected: { + event: name, + args: { + a: new BigNumber(1), + b: new BigNumber(10), + c: new BigNumber(4), + d: new BigNumber(16) + }, + logIndex: 1, + transactionIndex: 16, + transactionHash: '0x1234567890', + address: address, + blockHash: '0x1234567890', + blockNumber: 1 + } +}]; + +describe('lib/web3/event', function () { + describe('decode', function () { + tests.forEach(function (test, index) { + it('test no: ' + index, function () { + var web3 = new Web3(); + var event = new SolidityEvent(web3, test.abi, address); + + var result = event.decode(test.data); + assert.deepEqual(result, test.expected); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/event.encode.js b/bower_components/web3/test/event.encode.js new file mode 100644 index 00000000..f0bea54b --- /dev/null +++ b/bower_components/web3/test/event.encode.js @@ -0,0 +1,237 @@ +var chai = require('chai'); +var assert = chai.assert; +var SolidityEvent = require('../lib/web3/event'); +var Web3 = require('../index'); + + +var address = '0x1234567890123456789012345678901234567890'; +var signature = '0xffff'; + +var tests = [{ + abi: { + name: 'event1', + inputs: [] + }, + indexed: {}, + options: {}, + expected: { + address: address, + topics: [ + signature + ] + } +}, { + abi: { + name: 'event1', + inputs: [{ + type: 'int', + name: 'a', + indexed: true + }] + }, + indexed: { + a: 16 + }, + options: {}, + expected: { + address: address, + topics: [ + signature, + '0x0000000000000000000000000000000000000000000000000000000000000010' + ] + } +},{ + abi: { + name: 'event1', + inputs: [{ + type: 'int', + name: 'a', + indexed: true + }, { + type: 'int', + name: 'b', + indexed: true + }, { + type: 'int', + name: 'c', + indexed: false + }, { + type: 'int', + name: 'd', + indexed: true + }] + }, + indexed: { + b: 4 + }, + options: {}, + expected: { + address: address, + topics: [ + signature, // signature + null, // a + '0x0000000000000000000000000000000000000000000000000000000000000004', // b + null // d + ] + } +}, { + abi: { + name: 'event1', + inputs: [{ + type: 'int', + name: 'a', + indexed: true + }, { + type: 'int', + name: 'b', + indexed: true + }] + }, + indexed: { + a: [16, 1], + b: 2 + }, + options: {}, + expected: { + address: address, + topics: [ + signature, + ['0x0000000000000000000000000000000000000000000000000000000000000010', '0x0000000000000000000000000000000000000000000000000000000000000001'], + '0x0000000000000000000000000000000000000000000000000000000000000002' + ] + } +}, { + abi: { + name: 'event1', + inputs: [{ + type: 'int', + name: 'a', + indexed: true + }] + }, + indexed: { + a: null + }, + options: {}, + expected: { + address: address, + topics: [ + signature, + null + ] + } +}, { + abi: { + name: 'event1', + inputs: [{ + type: 'int', + name: 'a', + indexed: true + }] + }, + indexed: { + a: 1 + }, + options: { + fromBlock: 'latest', + toBlock: 'pending' + }, + expected: { + address: address, + fromBlock: 'latest', + toBlock: 'pending', + topics: [ + signature, + '0x0000000000000000000000000000000000000000000000000000000000000001' + ] + } +}, +{ + abi: { + name: 'event1', + inputs: [{ + type: 'int', + name: 'a', + indexed: true + }] + }, + indexed: { + a: 1 + }, + options: { + fromBlock: 4, + toBlock: 10 + }, + expected: { + address: address, + fromBlock: '0x4', + toBlock: '0xa', + topics: [ + signature, + '0x0000000000000000000000000000000000000000000000000000000000000001' + ] + } +}, { + abi: { + name: 'event1', + inputs: [{ + type: 'int', + name: 'a', + indexed: true + }], + anonymous: true + }, + indexed: { + a: 1 + }, + options: {}, + expected: { + address: address, + topics: [ + '0x0000000000000000000000000000000000000000000000000000000000000001' + ] + } +}, { + abi: { + name: 'event1', + inputs: [{ + type: 'int', + name: 'a', + indexed: true + }, { + type: 'int', + name: 'b', + indexed: true + }], + anonymous: true + }, + indexed: { + b: 1 + }, + options: {}, + expected: { + address: address, + topics: [ + null, + '0x0000000000000000000000000000000000000000000000000000000000000001' + ] + } +}]; + +describe('lib/web3/event', function () { + describe('encode', function () { + tests.forEach(function (test, index) { + it('test no: ' + index, function () { + var web3 = new Web3(); + var event = new SolidityEvent(web3, test.abi, address); + event.signature = function () { // inject signature + return signature.slice(2); + }; + + var result = event.encode(test.indexed, test.options); + assert.deepEqual(result, test.expected); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/formatters.inputAddressFormatter.js b/bower_components/web3/test/formatters.inputAddressFormatter.js new file mode 100644 index 00000000..42cfc3f6 --- /dev/null +++ b/bower_components/web3/test/formatters.inputAddressFormatter.js @@ -0,0 +1,42 @@ +var chai = require('chai'); +var assert = chai.assert; +var formatters = require('../lib/web3/formatters.js'); +var BigNumber = require('bignumber.js'); + +var tests = [ + { input: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS', result: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8' }, + { input: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', result: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8'}, + { input: '00c5496aee77c1ba1f0854206a26dda82a81d6d8', result: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8'}, + { input: '0x11f4d0a3c12e86b4b5f39b213f7e19d048276dae', result: '0x11f4d0a3c12e86b4b5f39b213f7e19d048276dae' } +]; + +var errorTests = [ + '0x0c5496aee77c1ba1f0854206a26dda82a81d6d8', + '0x0c5496aee77c1ba1f0854206a26dda82a81d6d8', + '00c5496aee77c1ba1f0854206a26dda82a81d6d', + 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZE', + '0x' +] + +describe('formatters', function () { + describe('inputAddressFormatter', function () { + tests.forEach(function(test){ + it('should return the correct value', function () { + assert.deepEqual(formatters.inputAddressFormatter(test.input), test.result); + }); + }); + }); +}); + + +describe('formatters', function () { + describe('inputAddressFormatter', function () { + errorTests.forEach(function(test){ + it('should throw an exception', function () { + assert.throws(function () { + formatters.inputAddressFormatter(test); + }); + }); + }); + }); +}); diff --git a/bower_components/web3/test/formatters.inputDefaultBlockFormatter.js b/bower_components/web3/test/formatters.inputDefaultBlockFormatter.js new file mode 100644 index 00000000..8ae5ea26 --- /dev/null +++ b/bower_components/web3/test/formatters.inputDefaultBlockFormatter.js @@ -0,0 +1,24 @@ +var chai = require('chai'); +var assert = chai.assert; +var formatters = require('../lib/web3/formatters'); + +var tests = [ + { value: 'latest', expected: 'latest' }, + { value: 'pending', expected: 'pending' }, + { value: 'earliest', expected: 'earliest' }, + { value: 1, expected: '0x1' }, + { value: '0x1', expected: '0x1' } +]; + +describe('lib/web3/formatters', function () { + describe('inputDefaultBlockNumberFormatter', function () { + tests.forEach(function (test) { + it('should turn ' + test.value + ' to ' + test.expected, function () { + assert.strictEqual(formatters.inputDefaultBlockNumberFormatter(test.value), test.expected); + }); + }); + }); +}); + + + diff --git a/bower_components/web3/test/formatters.inputPostFormatter.js b/bower_components/web3/test/formatters.inputPostFormatter.js new file mode 100644 index 00000000..ce292ff2 --- /dev/null +++ b/bower_components/web3/test/formatters.inputPostFormatter.js @@ -0,0 +1,30 @@ +var chai = require('chai'); +var assert = chai.assert; +var formatters = require('../lib/web3/formatters.js'); + +describe('formatters', function () { + describe('inputPostFormatter', function () { + it('should return the correct value', function () { + + // input as strings and numbers + assert.deepEqual(formatters.inputPostFormatter({ + from: '0x00000', + to: '0x00000', + payload: '0x7b2274657374223a2274657374227d',//{test: 'test'}, + ttl: 200, + priority: 1000, + topics: ['hello','mytopics'] + }), { + from: '0x00000', + to: '0x00000', + payload: '0x7b2274657374223a2274657374227d', + ttl: '0xc8', + priority: '0x3e8', + topics: ['0x68656c6c6f','0x6d79746f70696373'], + workToProve: '0x0' + }); + + }); + }); +}); + diff --git a/bower_components/web3/test/formatters.inputTransactionFormatter.js b/bower_components/web3/test/formatters.inputTransactionFormatter.js new file mode 100644 index 00000000..5f81ee94 --- /dev/null +++ b/bower_components/web3/test/formatters.inputTransactionFormatter.js @@ -0,0 +1,97 @@ +var chai = require('chai'); +var assert = chai.assert; +var formatters = require('../lib/web3/formatters.js'); +var BigNumber = require('bignumber.js'); + +var tests = [{ + input: { + data: '0x34234bf23bf4234', + value: new BigNumber(100), + from: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + to: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + nonce: 1000, + gas: 1000, + gasPrice: new BigNumber(1000) + }, + result: { + data: '0x34234bf23bf4234', + value: '0x64', + from: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + to: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + nonce: '0x3e8', + gas: '0x3e8', + gasPrice: '0x3e8' + } +},{ + input: { + data: '0x34234bf23bf4234', + value: new BigNumber(100), + from: '00c5496aee77c1ba1f0854206a26dda82a81d6d8', + to: '00c5496aee77c1ba1f0854206a26dda82a81d6d8', + }, + result: { + data: '0x34234bf23bf4234', + value: '0x64', + from: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + to: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + } +},{ + input: { + data: '0x34234bf23bf4234', + value: new BigNumber(100), + from: '00c5496aee77c1ba1f0854206a26dda82a81d6d8', + to: '00c5496aee77c1ba1f0854206a26dda82a81d6d8', + gas: '1000', + gasPrice: new BigNumber(1000) + }, + result: { + data: '0x34234bf23bf4234', + value: '0x64', + from: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + to: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + gas: '0x3e8', + gasPrice: '0x3e8' + }, +}, { + input: { + data: '0x34234bf23bf4234', + value: new BigNumber(100), + from: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS', + to: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS', + gas: '1000', + gasPrice: new BigNumber(1000) + }, + result: { + data: '0x34234bf23bf4234', + value: '0x64', + from: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + to: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + gas: '0x3e8', + gasPrice: '0x3e8' + }, +}, { + input: { + data: '0x34234bf23bf4234', + value: new BigNumber(100), + from: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS', + gas: '1000', + gasPrice: new BigNumber(1000) + }, + result: { + data: '0x34234bf23bf4234', + value: '0x64', + from: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', + gas: '0x3e8', + gasPrice: '0x3e8' + } +}]; + +describe('formatters', function () { + describe('inputTransactionFormatter', function () { + tests.forEach(function(test){ + it('should return the correct value', function () { + assert.deepEqual(formatters.inputTransactionFormatter(test.input), test.result); + }); + }); + }); +}); diff --git a/bower_components/web3/test/formatters.outputBlockFormatter.js b/bower_components/web3/test/formatters.outputBlockFormatter.js new file mode 100644 index 00000000..a94c87b3 --- /dev/null +++ b/bower_components/web3/test/formatters.outputBlockFormatter.js @@ -0,0 +1,81 @@ +var chai = require('chai'); +var assert = chai.assert; +var formatters = require('../lib/web3/formatters.js'); +var BigNumber = require('bignumber.js'); + +describe('formatters', function () { + describe('outputBlockFormatter', function () { + it('should return the correct value', function () { + + assert.deepEqual(formatters.outputBlockFormatter({ + hash: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + parentHash: '0x83ffb245cfced97ccc5c75253d6960376d6c6dea93647397a543a72fdaea5265', + miner: '0xdcc6960376d6c6dea93647383ffb245cfced97cf', + stateRoot: '0x54dda68af07643f68739a6e9612ad157a26ae7e2ce81f77842bb5835fbcde583', + sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', + bloom: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + difficulty: '0x3e8', + totalDifficulty: '0x3e8', + number: '0x3e8', + gasLimit: '0x3e8', + gasUsed: '0x3e8', + timestamp: '0x3e8', + extraData: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + nonce: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + size: '0x3e8' + }), { + hash: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + parentHash: '0x83ffb245cfced97ccc5c75253d6960376d6c6dea93647397a543a72fdaea5265', + miner: '0xdcc6960376d6c6dea93647383ffb245cfced97cf', + stateRoot: '0x54dda68af07643f68739a6e9612ad157a26ae7e2ce81f77842bb5835fbcde583', + sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', + bloom: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + difficulty: new BigNumber(1000), + totalDifficulty: new BigNumber(1000), + number: 1000, + gasLimit: 1000, + gasUsed: 1000, + timestamp: 1000, + extraData: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + nonce: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + size: 1000 + }); + }); + it('should return the correct value, when null values are present', function () { + + assert.deepEqual(formatters.outputBlockFormatter({ + hash: null, + parentHash: '0x83ffb245cfced97ccc5c75253d6960376d6c6dea93647397a543a72fdaea5265', + miner: null, + stateRoot: '0x54dda68af07643f68739a6e9612ad157a26ae7e2ce81f77842bb5835fbcde583', + sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', + bloom: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + difficulty: '0x3e8', + totalDifficulty: '0x3e8', + number: null, + gasLimit: '0x3e8', + gasUsed: '0x3e8', + timestamp: '0x3e8', + extraData: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + nonce: null, + size: '0x3e8' + }), { + hash: null, + parentHash: '0x83ffb245cfced97ccc5c75253d6960376d6c6dea93647397a543a72fdaea5265', + miner: null, + stateRoot: '0x54dda68af07643f68739a6e9612ad157a26ae7e2ce81f77842bb5835fbcde583', + sha3Uncles: '0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', + bloom: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + difficulty: new BigNumber(1000), + totalDifficulty: new BigNumber(1000), + number: null, + gasLimit: 1000, + gasUsed: 1000, + timestamp: 1000, + extraData: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + nonce: null, + size: 1000 + }); + }); + }); +}); diff --git a/bower_components/web3/test/formatters.outputLogFormatter.js b/bower_components/web3/test/formatters.outputLogFormatter.js new file mode 100644 index 00000000..432bfb0d --- /dev/null +++ b/bower_components/web3/test/formatters.outputLogFormatter.js @@ -0,0 +1,47 @@ +var assert = require('assert'); +var formatters = require('../lib/web3/formatters.js'); + +describe('formatters', function () { + describe('outputLogFormatter', function () { + it('should return the correct value', function () { + + assert.deepEqual(formatters.outputLogFormatter({ + transactionIndex: '0x3e8', + logIndex: '0x3e8', + blockNumber: '0x3e8', + transactionHash: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + blockHash: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + data: '0x7b2274657374223a2274657374227', + topics: ['0x68656c6c6f','0x6d79746f70696373'] + }), { + transactionIndex: 1000, + logIndex: 1000, + blockNumber: 1000, + transactionHash: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + blockHash: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + data: '0x7b2274657374223a2274657374227', + topics: ['0x68656c6c6f','0x6d79746f70696373'] + }); + }); + it('should return the correct value, when null values are present', function () { + + assert.deepEqual(formatters.outputLogFormatter({ + transactionIndex: null, + logIndex: null, + blockNumber: null, + transactionHash: null, + blockHash: null, + data: '0x7b2274657374223a2274657374227', + topics: ['0x68656c6c6f','0x6d79746f70696373'] + }), { + transactionIndex: null, + logIndex: null, + blockNumber: null, + transactionHash: null, + blockHash: null, + data: '0x7b2274657374223a2274657374227', + topics: ['0x68656c6c6f','0x6d79746f70696373'] + }); + }); + }); +}); diff --git a/bower_components/web3/test/formatters.outputPostFormatter.js b/bower_components/web3/test/formatters.outputPostFormatter.js new file mode 100644 index 00000000..6dd39b8c --- /dev/null +++ b/bower_components/web3/test/formatters.outputPostFormatter.js @@ -0,0 +1,26 @@ +var assert = require('assert'); +var formatters = require('../lib/web3/formatters.js'); + +describe('formatters', function () { + describe('outputPostFormatter', function () { + it('should return the correct value', function () { + + assert.deepEqual(formatters.outputPostFormatter({ + expiry: '0x3e8', + sent: '0x3e8', + ttl: '0x3e8', + workProved: '0x3e8', + payload: '0x7b2274657374223a2274657374227d', + topics: ['0x68656c6c6f','0x6d79746f70696373'] + }), { + expiry: 1000, + sent: 1000, + ttl: 1000, + workProved: 1000, + payload: '0x7b2274657374223a2274657374227d',//{test: 'test'}, + //payloadRaw: '0x7b2274657374223a2274657374227d', + topics: ['hello','mytopics'] + }); + }); + }); +}); diff --git a/bower_components/web3/test/formatters.outputTransactionFormatter.js b/bower_components/web3/test/formatters.outputTransactionFormatter.js new file mode 100644 index 00000000..db483160 --- /dev/null +++ b/bower_components/web3/test/formatters.outputTransactionFormatter.js @@ -0,0 +1,61 @@ +var assert = require('assert'); +var formatters = require('../lib/web3/formatters.js'); +var BigNumber = require('bignumber.js'); + +describe('formatters', function () { + describe('outputTransactionFormatter', function () { + it('should return the correct value', function () { + + assert.deepEqual(formatters.outputTransactionFormatter({ + input: '0x3454645634534', + from: '0x00000', + to: '0x00000', + value: '0x3e8', + gas: '0x3e8', + gasPrice: '0x3e8', + nonce: '0xb', + transactionIndex: '0x1', + blockNumber: '0x3e8', + blockHash: '0xc9b9cdc2092a9d6589d96662b1fd6949611163fb3910cf8a173cd060f17702f9' + }), { + input: '0x3454645634534', + from: '0x00000', + to: '0x00000', + value: new BigNumber(1000), + gas: 1000, + gasPrice: new BigNumber(1000), + nonce: 11, + blockNumber: 1000, + blockHash: '0xc9b9cdc2092a9d6589d96662b1fd6949611163fb3910cf8a173cd060f17702f9', + transactionIndex: 1 + }); + }); + + it('should return the correct value, when null values are present', function () { + + assert.deepEqual(formatters.outputTransactionFormatter({ + input: '0x3454645634534', + from: '0x00000', + to: null, + value: '0x3e8', + gas: '0x3e8', + gasPrice: '0x3e8', + nonce: '0xb', + transactionIndex: null, + blockNumber: null, + blockHash: null + }), { + input: '0x3454645634534', + from: '0x00000', + to: null, + value: new BigNumber(1000), + gas: 1000, + gasPrice: new BigNumber(1000), + nonce: 11, + blockNumber: null, + blockHash: null, + transactionIndex: null + }); + }); + }); +}); diff --git a/bower_components/web3/test/helpers/FakeHttpProvider.js b/bower_components/web3/test/helpers/FakeHttpProvider.js new file mode 100644 index 00000000..21ec5b01 --- /dev/null +++ b/bower_components/web3/test/helpers/FakeHttpProvider.js @@ -0,0 +1,107 @@ +var chai = require('chai'); +var assert = require('assert'); +var utils = require('../../lib/utils/utils'); + +countId = 1; + +var getResponseStub = function () { + return { + jsonrpc: '2.0', + id: countId++, + result: null + }; +}; + +var getErrorStub = function () { + return { + jsonrpc: '2.0', + countId: countId++, + error: { + code: 1234, + message: 'Stub error' + } + }; +}; + +var FakeHttpProvider = function () { + this.response = getResponseStub(); + this.error = null; + this.validation = null; +}; + +FakeHttpProvider.prototype.send = function (payload) { + assert.equal(utils.isArray(payload) || utils.isObject(payload), true); + // TODO: validate jsonrpc request + if (this.error) { + throw this.error; + } + if (this.validation) { + // imitate plain json object + this.validation(JSON.parse(JSON.stringify(payload))); + } + + return this.getResponse(payload); +}; + +FakeHttpProvider.prototype.sendAsync = function (payload, callback) { + assert.equal(utils.isArray(payload) || utils.isObject(payload), true); + assert.equal(utils.isFunction(callback), true); + if (this.validation) { + // imitate plain json object + this.validation(JSON.parse(JSON.stringify(payload)), callback); + } + + var response = this.getResponse(payload); + var error = this.error; + setTimeout(function(){ + callback(error, response); + },1); +}; + +FakeHttpProvider.prototype.injectResponse = function (response) { + this.response = response; +}; + +FakeHttpProvider.prototype.injectResult = function (result) { + this.response = getResponseStub(); + this.response.result = result; +}; + +FakeHttpProvider.prototype.injectBatchResults = function (results, error) { + this.response = results.map(function (r) { + if(error) { + var response = getErrorStub(); + response.error.message = r; + } else { + var response = getResponseStub(); + response.result = r; + } + return response; + }); +}; + +FakeHttpProvider.prototype.getResponse = function (payload) { + + if(this.response) { + if(utils.isArray(this.response)) { + this.response = this.response.map(function(response, index) { + response.id = payload[index] ? payload[index].id : countId++; + return response; + }); + } else + this.response.id = payload.id; + } + + return this.response; +}; + +FakeHttpProvider.prototype.injectError = function (error) { + this.error = error; +}; + +FakeHttpProvider.prototype.injectValidation = function (callback) { + this.validation = callback; +}; + +module.exports = FakeHttpProvider; + diff --git a/bower_components/web3/test/helpers/FakeHttpProvider2.js b/bower_components/web3/test/helpers/FakeHttpProvider2.js new file mode 100644 index 00000000..e287a074 --- /dev/null +++ b/bower_components/web3/test/helpers/FakeHttpProvider2.js @@ -0,0 +1,37 @@ +var FakeHttpProvider = require('./FakeHttpProvider'); + +var FakeHttpProvider2 = function () { + this.counter = 0; + this.resultList = []; +}; + +FakeHttpProvider2.prototype = new FakeHttpProvider(); +FakeHttpProvider2.prototype.constructor = FakeHttpProvider2; + +FakeHttpProvider2.prototype.injectResultList = function (list) { + this.resultList = list; +}; + +FakeHttpProvider2.prototype.getResponse = function () { + var result = this.resultList[this.counter]; + this.counter++; + + // add fallback result value + if(!result) + result = { + result: undefined + }; + + if (result.type === 'batch') { + this.injectBatchResults(result.result); + } else { + this.injectResult(result.result); + } + + this.counter = 0; + + return this.response; +}; + +module.exports = FakeHttpProvider2; + diff --git a/bower_components/web3/test/helpers/FakeIpcRequest.js b/bower_components/web3/test/helpers/FakeIpcRequest.js new file mode 100644 index 00000000..6a361ee3 --- /dev/null +++ b/bower_components/web3/test/helpers/FakeIpcRequest.js @@ -0,0 +1,40 @@ +var chai = require('chai'); +var assert = chai.assert; + +var FakeIpcRequest = function () { + this._handle = {fd: {}}; + this.callbacks = []; + + return this +}; + +FakeIpcRequest.prototype.connect = function (path) { + assert.notEqual(path, undefined); + + return this; +}; + +FakeIpcRequest.prototype.on = function(name, callback) { + if(name === 'data'){ + this.callbacks.push(callback); + } +}; + +FakeIpcRequest.prototype.writeSync = function (payload) { + assert.equal(typeof payload, 'string'); + return payload; +}; + +FakeIpcRequest.prototype.write = function (payload) { + assert.equal(typeof payload, 'string'); + + this.callbacks.forEach(function(cb){ + setTimeout(function(){ + cb(payload); + }, 100); + }); + +}; + +module.exports = FakeIpcRequest; + diff --git a/bower_components/web3/test/helpers/FakeQtNavigator.js b/bower_components/web3/test/helpers/FakeQtNavigator.js new file mode 100644 index 00000000..fb251d23 --- /dev/null +++ b/bower_components/web3/test/helpers/FakeQtNavigator.js @@ -0,0 +1,11 @@ + +var navigator = { + qt: { + callMethod: function (payload) { + return "{}"; + } + } +}; + +module.exports = navigator; + diff --git a/bower_components/web3/test/helpers/FakeXHR2.js b/bower_components/web3/test/helpers/FakeXHR2.js new file mode 100644 index 00000000..2916351c --- /dev/null +++ b/bower_components/web3/test/helpers/FakeXHR2.js @@ -0,0 +1,37 @@ +var chai = require('chai'); +var assert = chai.assert; +var EventEmitter = require('events').EventEmitter; +var util = require('util'); + +var FakeXHR2 = function () { + this.responseText = "{}"; + this.readyState = 4; + this.onreadystatechange = null; + this.async = true; + this.headers = { + 'Content-Type': 'text/plain' + }; +}; + +FakeXHR2.prototype.open = function (method, host, async) { + assert.equal(method, 'POST'); + assert.notEqual(host, null); + assert.equal(async === true, true); + this.async = async; +}; + +FakeXHR2.prototype.setRequestHeader = function(name, value) { + this.headers[name] = value; +}; + +FakeXHR2.prototype.send = function (payload) { + assert.equal(typeof payload, 'string'); + if (this.async) { + assert.equal(typeof this.onreadystatechange, 'function'); + this.onreadystatechange(); + return; + } + return this.responseText; +}; + +module.exports = FakeXHR2; diff --git a/bower_components/web3/test/helpers/FakeXMLHttpRequest.js b/bower_components/web3/test/helpers/FakeXMLHttpRequest.js new file mode 100644 index 00000000..6dc35b98 --- /dev/null +++ b/bower_components/web3/test/helpers/FakeXMLHttpRequest.js @@ -0,0 +1,38 @@ +var chai = require('chai'); +var assert = chai.assert; + +var FakeXMLHttpRequest = function () { + this.responseText = "{}"; + this.readyState = 4; + this.onreadystatechange = null; + this.async = false; + this.headers = { + 'Content-Type': 'text/plain' + }; +}; + +FakeXMLHttpRequest.prototype.open = function (method, host, async) { + assert.equal(method, 'POST'); + assert.notEqual(host, null); + assert.equal(async === false || async === true, true); + this.async = async; +}; + +FakeXMLHttpRequest.prototype.setRequestHeader = function(name, value) { + this.headers[name] = value; +}; + +FakeXMLHttpRequest.prototype.send = function (payload) { + assert.equal(typeof payload, 'string'); + if (this.async) { + assert.equal(typeof this.onreadystatechange, 'function'); + this.onreadystatechange(); + return; + } + return this.responseText; +}; + +module.exports = { + XMLHttpRequest: FakeXMLHttpRequest +}; + diff --git a/bower_components/web3/test/helpers/test.method.js b/bower_components/web3/test/helpers/test.method.js new file mode 100644 index 00000000..d95f2774 --- /dev/null +++ b/bower_components/web3/test/helpers/test.method.js @@ -0,0 +1,80 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../../index'); + +var FakeHttpProvider = require('./FakeHttpProvider'); +var clone = function (object) { return JSON.parse(JSON.stringify(object)); }; + +var runTests = function (obj, method, tests) { + + var testName = obj ? 'web3.' + obj : 'web'; + + describe(testName, function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('sync test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, test.formattedArgs); + }); + + var args = clone(test.args) + + // when + if (obj) { + var result = web3[obj][method].apply(web3[obj], args); + } else { + var result = web3[method].apply(web3, args); + } + // when + //var result = (obj) + //? web3[obj][method].apply(null, test.args.slice(0)) + //: web3[method].apply(null, test.args.slice(0)); + + // then + assert.deepEqual(test.formattedResult, result); + }); + + it('async test: ' + index, function (done) { + + // given + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, test.formattedArgs); + }); + + var args = clone(test.args); + + // add callback + args.push(function (err, result) { + assert.deepEqual(test.formattedResult, result); + done(); + }); + + // when + if (obj) { + web3[obj][method].apply(web3[obj], args); + } else { + web3[method].apply(web3, args); + } + }); + }); + }); + }); + +}; + +module.exports = { + runTests: runTests +} + diff --git a/bower_components/web3/test/helpers/test.utils.js b/bower_components/web3/test/helpers/test.utils.js new file mode 100644 index 00000000..6e073fd6 --- /dev/null +++ b/bower_components/web3/test/helpers/test.utils.js @@ -0,0 +1,26 @@ +var chai = require('chai'); +var assert = chai.assert; +//var web3 = require('../../index'); + +var FakeHttpProvider = require('./FakeHttpProvider'); + +var methodExists = function (object, method) { + it('should have method ' + method + ' implemented', function() { + //web3.setProvider(null); + assert.equal('function', typeof object[method], 'method ' + method + ' is not implemented'); + }); +}; + +var propertyExists = function (object, property) { + it('should have property ' + property + ' implemented', function() { + // set dummy providor, to prevent error + //web3.setProvider(new FakeHttpProvider()); + assert.notEqual('undefined', typeof object[property], 'property ' + property + ' is not implemented'); + }); +}; + +module.exports = { + methodExists: methodExists, + propertyExists: propertyExists +}; + diff --git a/bower_components/web3/test/httpprovider.js b/bower_components/web3/test/httpprovider.js new file mode 100644 index 00000000..10714db1 --- /dev/null +++ b/bower_components/web3/test/httpprovider.js @@ -0,0 +1,42 @@ +var chai = require('chai'); +var assert = chai.assert; +var SandboxedModule = require('sandboxed-module'); + +SandboxedModule.registerBuiltInSourceTransformer('istanbul'); +var HttpProvider = SandboxedModule.require('../lib/web3/httpprovider', { + requires: { + 'xhr2': require('./helpers/FakeXHR2'), + 'xmlhttprequest': require('./helpers/FakeXMLHttpRequest') + }, + singleOnly: true +}); + +describe('lib/web3/httpprovider', function () { + describe('send', function () { + it('should send basic request', function () { + var provider = new HttpProvider(); + var result = provider.send({}); + + assert.equal(typeof result, 'object'); + }); + }); + + describe('sendAsync', function () { + it('should send basic async request', function (done) { + var provider = new HttpProvider(); + + provider.sendAsync({}, function (err, result) { + assert.equal(typeof result, 'object'); + done(); + }); + }); + }); + + describe('isConnected', function () { + it('should return a boolean', function () { + var provider = new HttpProvider(); + + assert.isBoolean(provider.isConnected()); + }); + }); +}); diff --git a/bower_components/web3/test/iban.createIndirect.js b/bower_components/web3/test/iban.createIndirect.js new file mode 100644 index 00000000..cce4a08f --- /dev/null +++ b/bower_components/web3/test/iban.createIndirect.js @@ -0,0 +1,21 @@ +var chai = require('chai'); +var Iban = require('../lib/web3/iban.js'); +var assert = chai.assert; + +var tests = [ + { institution: 'XREG', identifier: 'GAVOFYORK', expected: 'XE81ETHXREGGAVOFYORK'} +]; + +describe('lib/web3/iban', function () { + describe('createIndirect', function () { + tests.forEach(function (test) { + it('shoud create indirect iban: ' + test.expected, function () { + assert.deepEqual(Iban.createIndirect({ + institution: test.institution, + identifier: test.identifier + }), new Iban(test.expected)); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/iban.fromAddress.js b/bower_components/web3/test/iban.fromAddress.js new file mode 100644 index 00000000..c1cea67e --- /dev/null +++ b/bower_components/web3/test/iban.fromAddress.js @@ -0,0 +1,22 @@ +var chai = require('chai'); +var Iban = require('../lib/web3/iban.js'); +var assert = chai.assert; + +var tests = [ + { address: '00c5496aee77c1ba1f0854206a26dda82a81d6d8', expected: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS'}, + { address: '0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', expected: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS'}, + { address: '0x11c5496aee77c1ba1f0854206a26dda82a81d6d8', expected: 'XE1222Q908LN1QBBU6XUQSO1OHWJIOS46OO'}, + { address: '0x52dc504a422f0e2a9e7632a34a50f1a82f8224c7', expected: 'XE499OG1EH8ZZI0KXC6N83EKGT1BM97P2O7'}, + { address: '0x0000a5327eab78357cbf2ae8f3d49fd9d90c7d22', expected: 'XE0600DQK33XDTYUCRI0KYM5ELAKXDWWF6'} +]; + +describe('lib/web3/iban', function () { + describe('fromAddress', function () { + tests.forEach(function (test) { + it('shoud create indirect iban: ' + test.expected, function () { + assert.deepEqual(Iban.fromAddress(test.address), new Iban(test.expected)); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/iban.isValid.js b/bower_components/web3/test/iban.isValid.js new file mode 100644 index 00000000..31ea0d67 --- /dev/null +++ b/bower_components/web3/test/iban.isValid.js @@ -0,0 +1,35 @@ +var chai = require('chai'); +var Iban = require('../lib/web3/iban.js'); +var assert = chai.assert; + +var tests = [ + { obj: function () {}, is: false}, + { obj: new Function(), is: false}, + { obj: 'function', is: false}, + { obj: {}, is: false}, + { obj: '[]', is: false}, + { obj: '[1, 2]', is: false}, + { obj: '{}', is: false}, + { obj: '{"a": 123, "b" :3,}', is: false}, + { obj: '{"c" : 2}', is: false}, + { obj: 'XE81ETHXREGGAVOFYORK', is: true}, + { obj: 'XE82ETHXREGGAVOFYORK', is: false}, // control number is invalid + { obj: 'XE81ETCXREGGAVOFYORK', is: false}, + { obj: 'XE81ETHXREGGAVOFYORKD', is: false}, + { obj: 'XE81ETHXREGGaVOFYORK', is: false}, + { obj: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS', is: true}, + { obj: 'XE7438O073KYGTWWZN0F2WZ0R8PX5ZPPZS', is: false}, // control number is invalid + { obj: 'XD7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS', is: false}, + { obj: 'XE1222Q908LN1QBBU6XUQSO1OHWJIOS46OO', is: true} +]; + +describe('lib/web3/iban', function () { + describe('isValid', function () { + tests.forEach(function (test) { + it('shoud test if value ' + test.obj + ' is iban: ' + test.is, function () { + assert.equal(Iban.isValid(test.obj), test.is); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/iban.toAddress.js b/bower_components/web3/test/iban.toAddress.js new file mode 100644 index 00000000..09a166ae --- /dev/null +++ b/bower_components/web3/test/iban.toAddress.js @@ -0,0 +1,19 @@ +var chai = require('chai'); +var Iban = require('../lib/web3/iban.js'); +var assert = chai.assert; + +var tests = [ + { direct: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS', address: '00c5496aee77c1ba1f0854206a26dda82a81d6d8'} +]; + +describe('lib/web3/iban', function () { + describe('toAddress', function () { + tests.forEach(function (test) { + it('shoud transform iban to address: ' + test.address, function () { + var iban = new Iban(test.direct); + assert.deepEqual(iban.address(), test.address); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/ipcprovider.js b/bower_components/web3/test/ipcprovider.js new file mode 100644 index 00000000..7d332993 --- /dev/null +++ b/bower_components/web3/test/ipcprovider.js @@ -0,0 +1,59 @@ +var chai = require('chai'); +var assert = chai.assert; +var SandboxedModule = require('sandboxed-module'); +var FakeIpcRequest = require('./helpers/FakeIpcRequest') +var net = new FakeIpcRequest(); + +SandboxedModule.registerBuiltInSourceTransformer('istanbul'); +var IpcProvider = SandboxedModule.require('../lib/web3/ipcprovider', { + requires: { + 'bignumber.js': require('bignumber.js'), + }, + singleOnly: true +}); + +describe('lib/web3/ipcprovider', function () { + describe('send', function () { + it('should send basic request', function () { + var provider = new IpcProvider('', net); + var result = provider.send({id: 1, method: 'eth_test'}); + + assert.isObject(result); + }); + }); + + describe('sendAsync', function () { + it('should send basic async request', function (done) { + var provider = new IpcProvider('', net); + provider.sendAsync({id: 1, method: 'eth_test'}, function (err, result) { + assert.isObject(result); + done(); + }); + }); + }); + + describe('isConnected', function () { + it('should return a boolean', function () { + var provider = new IpcProvider('', net); + + assert.isBoolean(provider.isConnected()); + }); + + it('should return false', function () { + var provider = new IpcProvider('', net); + + provider.connection.writable = false; + + assert.isFalse(provider.isConnected()); + }); + + it('should return true, when a net handle is set', function () { + var provider = new IpcProvider('', net); + + provider.connection.writable = true; + + assert.isTrue(provider.isConnected()); + }); + }); +}); + diff --git a/bower_components/web3/test/jsonrpc.id.js b/bower_components/web3/test/jsonrpc.id.js new file mode 100644 index 00000000..bdd093e4 --- /dev/null +++ b/bower_components/web3/test/jsonrpc.id.js @@ -0,0 +1,21 @@ +var chai = require('chai'); +var assert = chai.assert; +var Jsonrpc = require('../lib/web3/jsonrpc'); + +describe('lib/web3/jsonrpc', function () { + describe('id', function () { + it('should increment the id', function () { + + // given + var method = 'm'; + + // when + var p1 = Jsonrpc.toPayload(method); + var p2 = Jsonrpc.toPayload(method); + + // then + assert.equal(p2.id, p1.id + 1); + }); + }); +}); + diff --git a/bower_components/web3/test/jsonrpc.isValidResponse.js b/bower_components/web3/test/jsonrpc.isValidResponse.js new file mode 100644 index 00000000..e5ab2a6e --- /dev/null +++ b/bower_components/web3/test/jsonrpc.isValidResponse.js @@ -0,0 +1,143 @@ +var assert = require('assert'); +var Jsonrpc = require('../lib/web3/jsonrpc'); + +describe('jsonrpc', function () { + describe('isValidResponse', function () { + it('should validate basic jsonrpc response', function () { + + // given + var response = { + jsonrpc: '2.0', + id: 1, + result: [] + }; + + // when + var valid = Jsonrpc.isValidResponse(response); + + // then + assert.equal(valid, true); + }); + + it('should validate basic undefined response', function () { + + // given + var response = undefined; + + // when + var valid = Jsonrpc.isValidResponse(response); + + // then + assert.equal(valid, false); + }); + + it('should validate jsonrpc response without jsonrpc field', function () { + + // given + var response = { + id: 1, + result: [] + }; + + // when + var valid = Jsonrpc.isValidResponse(response); + + // then + assert.equal(valid, false); + }); + + it('should validate jsonrpc response with wrong jsonrpc version', function () { + + // given + var response = { + jsonrpc: '1.0', + id: 1, + result: [] + }; + + // when + var valid = Jsonrpc.isValidResponse(response); + + // then + assert.equal(valid, false); + }); + + it('should validate jsonrpc response without id number', function () { + + // given + var response = { + jsonrpc: '2.0', + result: [] + }; + + // when + var valid = Jsonrpc.isValidResponse(response); + + // then + assert.equal(valid, false); + }); + + it('should validate jsonrpc response with wrong id field', function () { + + // given + var response = { + jsonrpc: '2.0', + id: 'x', + result: [] + }; + + // when + var valid = Jsonrpc.isValidResponse(response); + + // then + assert.equal(valid, false); + }); + + it('should validate jsonrpc response without result field', function () { + + // given + var response = { + jsonrpc: '2.0', + id: 1 + }; + + // when + var valid = Jsonrpc.isValidResponse(response); + + // then + assert.equal(valid, false); + }); + + it('should validate jsonrpc response with result field === false', function () { + + // given + var response = { + jsonrpc: '2.0', + id: 1, + result: false + }; + + // when + var valid = Jsonrpc.isValidResponse(response); + + // then + assert.equal(valid, true); + }); + + it('should validate jsonrpc response with result field === 0', function () { + + // given + var response = { + jsonrpc: '2.0', + id: 1, + result: 0 + }; + + // when + var valid = Jsonrpc.isValidResponse(response); + + // then + assert.equal(valid, true); + }); + }); +}); diff --git a/bower_components/web3/test/jsonrpc.toBatchPayload.js b/bower_components/web3/test/jsonrpc.toBatchPayload.js new file mode 100644 index 00000000..d82e1592 --- /dev/null +++ b/bower_components/web3/test/jsonrpc.toBatchPayload.js @@ -0,0 +1,47 @@ +var assert = require('assert'); +var Jsonrpc = require('../lib/web3/jsonrpc'); + +describe('jsonrpc', function () { + describe('toBatchPayload', function () { + it('should create basic batch payload', function () { + + // given + var messages = [{ + method: 'helloworld' + }, { + method: 'test2', + params: [1] + }]; + + // when + var payload = Jsonrpc.toBatchPayload(messages); + + // then + assert.equal(payload instanceof Array, true); + assert.equal(payload.length, 2); + assert.equal(payload[0].jsonrpc, '2.0'); + assert.equal(payload[1].jsonrpc, '2.0'); + assert.equal(payload[0].method, 'helloworld'); + assert.equal(payload[1].method, 'test2'); + assert.equal(payload[0].params instanceof Array, true); + assert.equal(payload[1].params.length, 1); + assert.equal(payload[1].params[0], 1); + assert.equal(typeof payload[0].id, 'number'); + assert.equal(typeof payload[1].id, 'number'); + assert.equal(payload[0].id + 1, payload[1].id); + }); + + it('should create batch payload for empty input array', function () { + + // given + var messages = []; + + // when + var payload = Jsonrpc.toBatchPayload(messages); + + // then + assert.equal(payload instanceof Array, true); + assert.equal(payload.length, 0); + }); + }); +}); diff --git a/bower_components/web3/test/jsonrpc.toPayload.js b/bower_components/web3/test/jsonrpc.toPayload.js new file mode 100644 index 00000000..c480576e --- /dev/null +++ b/bower_components/web3/test/jsonrpc.toPayload.js @@ -0,0 +1,41 @@ +var chai = require('chai'); +var assert = chai.assert; +var Jsonrpc = require('../lib/web3/jsonrpc'); + +describe('jsonrpc', function () { + describe('toPayload', function () { + it('should create basic payload', function () { + + // given + var method = 'helloworld'; + + // when + var payload = Jsonrpc.toPayload(method); + + // then + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, method); + assert.equal(payload.params instanceof Array, true); + assert.equal(payload.params.length, 0); + assert.equal(typeof payload.id, 'number'); + }); + + it('should create payload with params', function () { + + // given + var method = 'helloworld1'; + var params = [123, 'test']; + + // when + var payload = Jsonrpc.toPayload(method, params); + + // then + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, method); + assert.equal(payload.params.length, 2); + assert.equal(payload.params[0], params[0]); + assert.equal(payload.params[1], params[1]); + assert.equal(typeof payload.id, 'number'); + }); + }); +}); diff --git a/bower_components/web3/test/method.extractCallback.js b/bower_components/web3/test/method.extractCallback.js new file mode 100644 index 00000000..34e480c3 --- /dev/null +++ b/bower_components/web3/test/method.extractCallback.js @@ -0,0 +1,52 @@ +var chai = require('chai'); +var assert = chai.assert; +var Method = require('../lib/web3/method'); + +describe('lib/web3/method', function () { + describe('extractCallback', function () { + it('should extract callback', function () { + + // given + var method = new Method({}); + var callback = function () { }; + var args = [1, callback] + + // when + var result = method.extractCallback(args); + + // then + assert.equal(args.length, 1); + assert.equal(callback, result); + }); + + it('should extract callback created using newFunction', function () { + + // given + var method = new Method({}); + var callback = new Function (); + var args = [1, callback] + + // when + var result = method.extractCallback(args); + + // then + assert.equal(args.length, 1); + assert.equal(callback, result); + }); + + it('should not extract the callback', function () { + + // given + var method = new Method({}); + var args = [1, 2] + + // when + var result = method.extractCallback(args); + + // then + assert.equal(args.length, 2); + assert.equal(result, null); + }); + }); +}); + diff --git a/bower_components/web3/test/method.formatInput.js b/bower_components/web3/test/method.formatInput.js new file mode 100644 index 00000000..c778f105 --- /dev/null +++ b/bower_components/web3/test/method.formatInput.js @@ -0,0 +1,41 @@ +var chai = require('chai'); +var assert = chai.assert; +var Method = require('../lib/web3/method'); + +describe('lib/web3/method', function () { + describe('formatInput', function () { + it('should format plain input', function () { + + // given + var star = function (arg) { + return arg + '*'; + }; + + var method = new Method({ + inputFormatter: [star, star, star] + }); + var args = ['1','2','3']; + var expectedArgs = ['1*', '2*', '3*']; + + // when + var result = method.formatInput(args); + + // then + assert.deepEqual(result, expectedArgs); + }); + + it('should do nothing if there is no formatter', function () { + + // given + var method = new Method({}); + var args = [1,2,3]; + + // when + var result = method.formatInput(args); + + // then + assert.deepEqual(result, args); + }); + }); +}); + diff --git a/bower_components/web3/test/method.formatOutput.js b/bower_components/web3/test/method.formatOutput.js new file mode 100644 index 00000000..4d88e2da --- /dev/null +++ b/bower_components/web3/test/method.formatOutput.js @@ -0,0 +1,43 @@ +var chai = require('chai'); +var assert = chai.assert; +var Method = require('../lib/web3/method'); + +describe('lib/web3/method', function () { + describe('formatOutput', function () { + it('should format plain output', function () { + + // given + var formatter = function (args) { + return args.map(function (arg) { + return arg + '*'; + }); + }; + + var method = new Method({ + outputFormatter: formatter + }); + var args = ['1','2','3']; + var expectedArgs = ['1*', '2*', '3*']; + + // when + var result = method.formatOutput(args); + + // then + assert.deepEqual(result, expectedArgs); + }); + + it('should do nothing if there is no formatter', function () { + + // given + var method = new Method({}); + var args = [1,2,3]; + + // when + var result = method.formatOutput(args); + + // then + assert.deepEqual(result, args); + }); + }); +}); + diff --git a/bower_components/web3/test/method.getCall.js b/bower_components/web3/test/method.getCall.js new file mode 100644 index 00000000..398de325 --- /dev/null +++ b/bower_components/web3/test/method.getCall.js @@ -0,0 +1,46 @@ +var chai = require('chai'); +var assert = chai.assert; +var Method = require('../lib/web3/method'); + +describe('lib/web3/method', function () { + describe('getCall', function () { + it('should return call name', function () { + + // given + var call = 'hello_call_world'; + var method = new Method({ + call: call + }); + + // when + var result = method.getCall(); + + // then + assert.equal(call, result); + }); + + it('should return call based on args', function () { + + // given + var call = function (args) { + return args ? args.length.toString() : '0'; + }; + + var method = new Method({ + call: call + }); + + // when + var r0 = method.getCall(); + var r1 = method.getCall([1]); + var r2 = method.getCall([1, 2]); + + // then + assert.equal(r0, '0'); + assert.equal(r1, '1'); + assert.equal(r2, '2'); + + }); + }); +}); + diff --git a/bower_components/web3/test/method.validateArgs.js b/bower_components/web3/test/method.validateArgs.js new file mode 100644 index 00000000..d3d72a06 --- /dev/null +++ b/bower_components/web3/test/method.validateArgs.js @@ -0,0 +1,46 @@ +var chai = require('chai'); +var assert = chai.assert; +var Method = require('../lib/web3/method'); +var errors = require('../lib/web3/errors'); + +describe('lib/web3/method', function () { + describe('validateArgs', function () { + it('should pass', function () { + + // given + var method = new Method({ + params: 1 + }); + + var args = [1]; + var args2 = ['heloas']; + + // when + var test = function () { method.validateArgs(args); }; + var test2 = function () { method.validateArgs(args2); }; + + // then + assert.doesNotThrow(test); + assert.doesNotThrow(test2); + }); + + it('should return call based on args', function () { + + // given + var method = new Method({ + params: 2 + }); + + var args = [1]; + var args2 = ['heloas', '12', 3]; + + // when + var test = function () { method.validateArgs(args); }; + var test2 = function () { method.validateArgs(args2); }; + + // then + assert.throws(test, errors.InvalidNumberOfRPCParams().message); + assert.throws(test2, errors.InvalidNumberOfRPCParams().message); + }); + }); +}); diff --git a/bower_components/web3/test/mocha.opts b/bower_components/web3/test/mocha.opts new file mode 100644 index 00000000..5ada47be --- /dev/null +++ b/bower_components/web3/test/mocha.opts @@ -0,0 +1 @@ +--reporter spec diff --git a/bower_components/web3/test/node/app.js b/bower_components/web3/test/node/app.js new file mode 100644 index 00000000..9ec310f4 --- /dev/null +++ b/bower_components/web3/test/node/app.js @@ -0,0 +1,5 @@ +var web3 = require('web3'); + +console.log(web3.version.api); + + diff --git a/bower_components/web3/test/polling.js b/bower_components/web3/test/polling.js new file mode 100644 index 00000000..c3838539 --- /dev/null +++ b/bower_components/web3/test/polling.js @@ -0,0 +1,125 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); +var utils = require('../lib/utils/utils'); + +var tests = [{ + protocol: 'eth', + args: ['latest'], + firstResult: 1, + firstPayload: { + method: "eth_newBlockFilter", + params: [] + }, + secondResult: ['0x1234'], + secondPayload: { + method: "eth_getFilterChanges" + } +}, +{ + protocol: 'eth', + args: ['pending'], + firstResult: 1, + firstPayload: { + method: "eth_newPendingTransactionFilter", + params: [] + }, + secondResult: ['0x1234'], + secondPayload: { + method: "eth_getFilterChanges" + } +}]; + +var testPolling = function (tests) { + + describe('web3.eth.filter.polling', function () { + tests.forEach(function (test, index) { + it('should create && successfully poll filter', function (done) { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + provider.injectResult(test.firstResult); + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step = 1; + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.firstPayload.method); + assert.deepEqual(payload.params, test.firstPayload.params); + } else if (step === 1 && utils.isArray(payload)) { + step++; + var r = payload.filter(function (p) { + return p.jsonrpc === '2.0' && p.method === test.secondPayload.method && p.params[0] === test.firstResult; + }); + assert.equal(r.length > 0, true); + } + + }); + + // when + var filter = web3[test.protocol].filter.apply(web3[test.protocol], test.args); + provider.injectBatchResults([test.secondResult]); + filter.watch(function (err, result) { + if (test.err) { + // todo + } else { + assert.equal(result, test.secondResult[0]); + } + filter.stopWatching(function (err) { + assert.isNotOk(err); + done(); + }); + + }); + }); + it('should create && successfully poll filter when passed as callback', function (done) { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + provider.injectResult(test.firstResult); + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step = 1; + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.firstPayload.method); + assert.deepEqual(payload.params, test.firstPayload.params); + } else if (step === 1 && utils.isArray(payload)) { + step++; + var r = payload.filter(function (p) { + return p.jsonrpc === '2.0' && p.method === test.secondPayload.method && p.params[0] === test.firstResult; + }); + assert.equal(r.length > 0, true); + } + + }); + + // add callback + test.args.push(function (err, result) { + if (test.err) { + // todo + } else { + assert.equal(result, test.secondResult[0]); + } + filter.stopWatching(function (err) { + assert.isNotOk(err); + done(); + }); + + }); + + // when + var filter = web3[test.protocol].filter.apply(web3[test.protocol], test.args); + provider.injectBatchResults([test.secondResult]); + }); + }); + }); +}; + +testPolling(tests); diff --git a/bower_components/web3/test/requestmanager.js b/bower_components/web3/test/requestmanager.js new file mode 100644 index 00000000..02a877ed --- /dev/null +++ b/bower_components/web3/test/requestmanager.js @@ -0,0 +1,42 @@ +var chai = require('chai'); +var assert = chai.assert; +var RequestManager = require('../lib/web3/requestmanager'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +// TODO: handling errors! +// TODO: validation of params! + +describe('lib/web3/requestmanager', function () { + describe('send', function () { + it('should return expected result synchronously', function () { + var provider = new FakeHttpProvider(); + var manager = new RequestManager(provider); + var expected = 'hello_world'; + provider.injectResult(expected); + + var result = manager.send({ + method: 'test', + params: [1,2,3] + }); + + assert.equal(expected, result); + }); + + it('should return expected result asynchronously', function (done) { + var provider = new FakeHttpProvider(); + var manager = new RequestManager(provider); + var expected = 'hello_world'; + provider.injectResult(expected); + + manager.sendAsync({ + method: 'test', + params: [1,2,3] + }, function (error, result) { + assert.equal(error, null); + assert.equal(expected, result); + done(); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/sha3.js b/bower_components/web3/test/sha3.js new file mode 100644 index 00000000..444b70dc --- /dev/null +++ b/bower_components/web3/test/sha3.js @@ -0,0 +1,19 @@ +var chai = require('chai'); +var assert = chai.assert; +var sha3 = require('../lib/utils/sha3'); +var web3 = require('../index'); + +describe('lib/utils/sha3', function () { + var test = function (v, e, o) { + it('should encode ' + v + ' to ' + e, function () { + assert.equal(sha3(v, o), e); + }); + }; + + test('test123', 'f81b517a242b218999ec8eec0ea6e2ddbef2a367a14e93f4a32a39e260f686ad'); + test('test(int)', 'f4d03772bec1e62fbe8c5691e1a9101e520e8f8b5ca612123694632bf3cb51b1'); + test('0x80', '56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421', { encoding: 'hex' }); + test('0x80', '6b03a5eef7706e3fb52a61c19ab1122fad7237726601ac665bd4def888f0e4a0'); + test('0x3c9229289a6125f7fdf1885a77bb12c37a8d3b4962d936f7e3084dece32a3ca1', '82ff40c0a986c6a5cfad4ddf4c3aa6996f1a7837f9c398e17e5de5cbd5a12b28', { encoding: 'hex' }); +}); + diff --git a/bower_components/web3/test/soldity.formatters.formatInputInt.js b/bower_components/web3/test/soldity.formatters.formatInputInt.js new file mode 100644 index 00000000..b7fabc77 --- /dev/null +++ b/bower_components/web3/test/soldity.formatters.formatInputInt.js @@ -0,0 +1,21 @@ +var chai = require('chai'); +var assert = chai.assert; +var formatters = require('../lib/solidity/formatters.js'); +var SolidityParam = require('../lib/solidity/param'); + +var tests = [ + { input: 1, result: new SolidityParam('0000000000000000000000000000000000000000000000000000000000000001') }, + { input: 1.1, result: new SolidityParam('0000000000000000000000000000000000000000000000000000000000000001') }, + { input: -1.1, result: new SolidityParam('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff') }, + { input: -1, result: new SolidityParam('ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff') } +]; + +describe('formatters', function () { + describe('inputAddressFormatter', function () { + tests.forEach(function(test){ + it('should return the correct value', function () { + assert.deepEqual(formatters.formatInputInt(test.input), test.result); + }); + }); + }); +}); diff --git a/bower_components/web3/test/utils.extractDisplayName.js b/bower_components/web3/test/utils.extractDisplayName.js new file mode 100644 index 00000000..d3faef8d --- /dev/null +++ b/bower_components/web3/test/utils.extractDisplayName.js @@ -0,0 +1,42 @@ +var assert = require('assert'); +var utils = require('../lib/utils/utils.js'); + +describe('lib/utils/utils', function () { + describe('extractDisplayName', function () { + it('should extract display name from method with no params', function () { + + // given + var test = 'helloworld()'; + + // when + var displayName = utils.extractDisplayName(test); + + // then + assert.equal(displayName, 'helloworld'); + }); + + it('should extract display name from method with one param' , function () { + + // given + var test = 'helloworld1(int)'; + + // when + var displayName = utils.extractDisplayName(test); + + // then + assert.equal(displayName, 'helloworld1'); + }); + + it('should extract display name from method with two params' , function () { + + // given + var test = 'helloworld2(int,string)'; + + // when + var displayName = utils.extractDisplayName(test); + + // then + assert.equal(displayName, 'helloworld2'); + }); + }); +}); diff --git a/bower_components/web3/test/utils.extractTypeName.js b/bower_components/web3/test/utils.extractTypeName.js new file mode 100644 index 00000000..41099787 --- /dev/null +++ b/bower_components/web3/test/utils.extractTypeName.js @@ -0,0 +1,55 @@ +var assert = require('assert'); +var utils = require('../lib/utils/utils.js'); + +describe('lib/utils/utils', function () { + describe('extractTypeName', function () { + it('should extract type name from method with no params', function () { + + // given + var test = 'helloworld()'; + + // when + var typeName = utils.extractTypeName(test); + + // then + assert.equal(typeName, ''); + }); + + it('should extract type name from method with one param', function () { + + // given + var test = 'helloworld1(int)'; + + // when + var typeName = utils.extractTypeName(test); + + // then + assert.equal(typeName, 'int'); + }); + + it('should extract type name from method with two params', function () { + + // given + var test = 'helloworld2(int,string)'; + + // when + var typeName = utils.extractTypeName(test); + + // then + assert.equal(typeName, 'int,string'); + }); + + it('should extract type name from method with spaces between params', function () { + + // given + var test = 'helloworld3(int, string)'; + + // when + var typeName = utils.extractTypeName(test); + + // then + assert.equal(typeName, 'int,string'); + }); + + }); +}); diff --git a/bower_components/web3/test/utils.fromAscii.js b/bower_components/web3/test/utils.fromAscii.js new file mode 100644 index 00000000..9960a626 --- /dev/null +++ b/bower_components/web3/test/utils.fromAscii.js @@ -0,0 +1,21 @@ +var chai = require('chai'); +var BigNumber = require('bignumber.js'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { value: 'myString', expected: '0x6d79537472696e67'}, + { value: 'myString\x00', expected: '0x6d79537472696e6700'}, + { value: '\u0003\u0000\u0000\u00005èÆÕL]\u0012|Î¾ž\u001a7«›\u00052\u0011(ЗY\n<\u0010\u0000\u0000\u0000\u0000\u0000\u0000e!ßd/ñõì\f:z¦Î¦±ç·÷Í¢Ëß\u00076*…\bŽ—ñžùC1ÉUÀé2\u001aӆBŒ', + expected: '0x0300000035e8c6d54c5d127c9dcebe9e1a37ab9b05321128d097590a3c100000000000006521df642ff1f5ec0c3a7aa6cea6b1e7b7f7cda2cbdf07362a85088e97f19ef94331c955c0e9321ad386428c'} +]; + +describe('lib/utils/utils', function () { + describe('fromAscii', function () { + tests.forEach(function (test) { + it('should turn ' + test.value + ' to ' + test.expected, function () { + assert.strictEqual(utils.fromAscii(test.value), test.expected); + }); + }); + }); +}); diff --git a/bower_components/web3/test/utils.fromDecimal.js b/bower_components/web3/test/utils.fromDecimal.js new file mode 100644 index 00000000..c0e5ed62 --- /dev/null +++ b/bower_components/web3/test/utils.fromDecimal.js @@ -0,0 +1,43 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { value: 1, expected: '0x1' }, + { value: '1', expected: '0x1' }, + { value: '0x1', expected: '0x1'}, + { value: '0x01', expected: '0x1'}, + { value: 15, expected: '0xf'}, + { value: '15', expected: '0xf'}, + { value: '0xf', expected: '0xf'}, + { value: '0x0f', expected: '0xf'}, + { value: -1, expected: '-0x1'}, + { value: '-1', expected: '-0x1'}, + { value: '-0x1', expected: '-0x1'}, + { value: '-0x01', expected: '-0x1'}, + { value: -15, expected: '-0xf'}, + { value: '-15', expected: '-0xf'}, + { value: '-0xf', expected: '-0xf'}, + { value: '-0x0f', expected: '-0xf'}, + { value: '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', expected: '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'}, + { value: '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd', expected: '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd'}, + { value: '-0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', expected: '-0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'}, + { value: '-0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd', expected: '-0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd'}, + { value: 0, expected: '0x0'}, + { value: '0', expected: '0x0'}, + { value: '0x0', expected: '0x0'}, + { value: -0, expected: '0x0'}, + { value: '-0', expected: '0x0'}, + { value: '-0x0', expected: '0x0'} +]; + +describe('lib/utils/utils', function () { + describe('fromDecimal', function () { + tests.forEach(function (test) { + it('should turn ' + test.value + ' to ' + test.expected, function () { + assert.equal(utils.fromDecimal(test.value), test.expected); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/utils.fromUtf8.js b/bower_components/web3/test/utils.fromUtf8.js new file mode 100644 index 00000000..f21a3b83 --- /dev/null +++ b/bower_components/web3/test/utils.fromUtf8.js @@ -0,0 +1,20 @@ +var chai = require('chai'); +var BigNumber = require('bignumber.js'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { value: 'myString', expected: '0x6d79537472696e67'}, + { value: 'myString\x00', expected: '0x6d79537472696e67'}, + { value: 'expected value\u0000\u0000\u0000', expected: '0x65787065637465642076616c7565'} +]; + +describe('lib/utils/utils', function () { + describe('fromUtf8', function () { + tests.forEach(function (test) { + it('should turn ' + test.value + ' to ' + test.expected, function () { + assert.strictEqual(utils.fromUtf8(test.value), test.expected); + }); + }); + }); +}); diff --git a/bower_components/web3/test/utils.fromWei.js b/bower_components/web3/test/utils.fromWei.js new file mode 100644 index 00000000..e8691eb2 --- /dev/null +++ b/bower_components/web3/test/utils.fromWei.js @@ -0,0 +1,22 @@ +var assert = require('assert'); +var utils = require('../lib/utils/utils.js'); + +describe('lib/utils/utils', function () { + describe('fromWei', function () { + it('should return the correct value', function () { + + assert.equal(utils.fromWei(1000000000000000000, 'wei'), '1000000000000000000'); + assert.equal(utils.fromWei(1000000000000000000, 'kwei'), '1000000000000000'); + assert.equal(utils.fromWei(1000000000000000000, 'mwei'), '1000000000000'); + assert.equal(utils.fromWei(1000000000000000000, 'gwei'), '1000000000'); + assert.equal(utils.fromWei(1000000000000000000, 'szabo'), '1000000'); + assert.equal(utils.fromWei(1000000000000000000, 'finney'), '1000'); + assert.equal(utils.fromWei(1000000000000000000, 'ether'), '1'); + assert.equal(utils.fromWei(1000000000000000000, 'kether'), '0.001'); + assert.equal(utils.fromWei(1000000000000000000, 'grand'), '0.001'); + assert.equal(utils.fromWei(1000000000000000000, 'mether'), '0.000001'); + assert.equal(utils.fromWei(1000000000000000000, 'gether'), '0.000000001'); + assert.equal(utils.fromWei(1000000000000000000, 'tether'), '0.000000000001'); + }); + }); +}); diff --git a/bower_components/web3/test/utils.isAddress.js b/bower_components/web3/test/utils.isAddress.js new file mode 100644 index 00000000..a0658e30 --- /dev/null +++ b/bower_components/web3/test/utils.isAddress.js @@ -0,0 +1,23 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { value: function () {}, is: false}, + { value: new Function(), is: false}, + { value: 'function', is: false}, + { value: {}, is: false}, + { value: '0xc6d9d2cd449a754c494264e1809c50e34d64562b', is: true }, + { value: 'c6d9d2cd449a754c494264e1809c50e34d64562b', is: true } +]; + +describe('lib/utils/utils', function () { + describe('isAddress', function () { + tests.forEach(function (test) { + it('shoud test if value ' + test.value + ' is address: ' + test.is, function () { + assert.equal(utils.isAddress(test.value), test.is); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/utils.isBigNumber.js b/bower_components/web3/test/utils.isBigNumber.js new file mode 100644 index 00000000..d78739b8 --- /dev/null +++ b/bower_components/web3/test/utils.isBigNumber.js @@ -0,0 +1,26 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var BigNumber = require('bignumber.js'); +var assert = chai.assert; + +var tests = [ + { value: function () {}, is: false}, + { value: new Function(), is: false}, + { value: 'function', is: false}, + { value: {}, is: false}, + { value: new String('hello'), is: false}, + { value: new BigNumber(0), is: true}, + { value: 132, is: false}, + { value: '0x12', is: false}, + +]; + +describe('lib/utils/utils', function () { + describe('isBigNumber', function () { + tests.forEach(function (test) { + it('shoud test if value ' + test.func + ' is BigNumber: ' + test.is, function () { + assert.equal(utils.isBigNumber(test.value), test.is); + }); + }); + }); +}); diff --git a/bower_components/web3/test/utils.isChecksumAddress.js b/bower_components/web3/test/utils.isChecksumAddress.js new file mode 100644 index 00000000..d4c603c2 --- /dev/null +++ b/bower_components/web3/test/utils.isChecksumAddress.js @@ -0,0 +1,27 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { value: '0x52908400098527886E0F7030069857D2E4169EE7', is: true }, + { value: '0x8617E340B3D01FA5F11F306F4090FD50E238070D', is: true }, + { value: '0xde709f2102306220921060314715629080e2fb77', is: true }, + { value: '0x27b1fdb04752bbc536007a920d24acb045561c26', is: true }, + { value: '0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed', is: true }, + { value: '0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359', is: true }, + { value: '0xdbF03B407c01E7cD3CBea99509d93f8DDDC8C6FB', is: true }, + { value: '0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb', is: true }, + { value: '0XD1220A0CF47C7B9BE7A2E6BA89F429762E7B9ADB', is: false }, + { value: '0xd1220a0cf47c7b9be7a2e6ba89f429762e7b9adb', is: false } +]; + +describe('lib/utils/utils', function () { + describe('isChecksumAddress', function () { + tests.forEach(function (test) { + it('shoud test if address ' + test.value + ' passes checksum: ' + test.is, function () { + assert.equal(utils.isChecksumAddress(test.value), test.is); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/utils.isFunction.js b/bower_components/web3/test/utils.isFunction.js new file mode 100644 index 00000000..05882b2c --- /dev/null +++ b/bower_components/web3/test/utils.isFunction.js @@ -0,0 +1,21 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { func: function () {}, is: true}, + { func: new Function(), is: true}, + { func: 'function', is: false}, + { func: {}, is: false} +]; + +describe('lib/utils/utils', function () { + describe('isFunction', function () { + tests.forEach(function (test) { + it('shoud test if value ' + test.func + ' is function: ' + test.is, function () { + assert.equal(utils.isFunction(test.func), test.is); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/utils.isJson.js b/bower_components/web3/test/utils.isJson.js new file mode 100644 index 00000000..73d86d83 --- /dev/null +++ b/bower_components/web3/test/utils.isJson.js @@ -0,0 +1,26 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { obj: function () {}, is: false}, + { obj: new Function(), is: false}, + { obj: 'function', is: false}, + { obj: {}, is: false}, + { obj: '[]', is: true}, + { obj: '[1, 2]', is: true}, + { obj: '{}', is: true}, + { obj: '{"a": 123, "b" :3,}', is: false}, + { obj: '{"c" : 2}', is: true} +]; + +describe('lib/utils/utils', function () { + describe('isJson', function () { + tests.forEach(function (test) { + it('shoud test if value ' + test.obj + ' is json: ' + test.is, function () { + assert.equal(utils.isJson(test.obj), test.is); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/utils.isStrictAddress.js b/bower_components/web3/test/utils.isStrictAddress.js new file mode 100644 index 00000000..e23e3dee --- /dev/null +++ b/bower_components/web3/test/utils.isStrictAddress.js @@ -0,0 +1,23 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { value: function () {}, is: false}, + { value: new Function(), is: false}, + { value: 'function', is: false}, + { value: {}, is: false}, + { value: '0xc6d9d2cd449a754c494264e1809c50e34d64562b', is: true }, + { value: 'c6d9d2cd449a754c494264e1809c50e34d64562b', is: false } +]; + +describe('lib/utils/utils', function () { + describe('isStrictAddress', function () { + tests.forEach(function (test) { + it('shoud test if value ' + test.value + ' is address: ' + test.is, function () { + assert.equal(utils.isStrictAddress(test.value), test.is); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/utils.isString.js b/bower_components/web3/test/utils.isString.js new file mode 100644 index 00000000..73b95d22 --- /dev/null +++ b/bower_components/web3/test/utils.isString.js @@ -0,0 +1,22 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { value: function () {}, is: false}, + { value: new Function(), is: false}, + { value: 'function', is: true}, + { value: {}, is: false}, + { value: new String('hello'), is: true} +]; + +describe('lib/utils/utils', function () { + describe('isString', function () { + tests.forEach(function (test) { + it('shoud test if value ' + test.func + ' is string: ' + test.is, function () { + assert.equal(utils.isString(test.value), test.is); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/utils.toAscii.js b/bower_components/web3/test/utils.toAscii.js new file mode 100644 index 00000000..c8990e32 --- /dev/null +++ b/bower_components/web3/test/utils.toAscii.js @@ -0,0 +1,21 @@ +var chai = require('chai'); +var BigNumber = require('bignumber.js'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { value: '0x6d79537472696e67', expected: 'myString'}, + { value: '0x6d79537472696e6700', expected: 'myString\u0000'}, + { value: "0x0300000035e8c6d54c5d127c9dcebe9e1a37ab9b05321128d097590a3c100000000000006521df642ff1f5ec0c3a7aa6cea6b1e7b7f7cda2cbdf07362a85088e97f19ef94331c955c0e9321ad386428c", + expected: '\u0003\u0000\u0000\u00005èÆÕL]\u0012|Î¾ž\u001a7«›\u00052\u0011(ЗY\n<\u0010\u0000\u0000\u0000\u0000\u0000\u0000e!ßd/ñõì\f:z¦Î¦±ç·÷Í¢Ëß\u00076*…\bŽ—ñžùC1ÉUÀé2\u001aӆBŒ'} +]; + +describe('lib/utils/utils', function () { + describe('toAscii', function () { + tests.forEach(function (test) { + it('should turn ' + test.value + ' to ' + test.expected, function () { + assert.strictEqual(utils.toAscii(test.value), test.expected); + }); + }); + }); +}); diff --git a/bower_components/web3/test/utils.toBigNumber.js b/bower_components/web3/test/utils.toBigNumber.js new file mode 100644 index 00000000..efe3fa71 --- /dev/null +++ b/bower_components/web3/test/utils.toBigNumber.js @@ -0,0 +1,45 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var BigNumber = require('bignumber.js'); +var assert = chai.assert; + +var tests = [ + { value: 1, expected: '1' }, + { value: '1', expected: '1' }, + { value: '0x1', expected: '1'}, + { value: '0x01', expected: '1'}, + { value: 15, expected: '15'}, + { value: '15', expected: '15'}, + { value: '0xf', expected: '15'}, + { value: '0x0f', expected: '15'}, + { value: new BigNumber('f', 16), expected: '15'}, + { value: -1, expected: '-1'}, + { value: '-1', expected: '-1'}, + { value: '-0x1', expected: '-1'}, + { value: '-0x01', expected: '-1'}, + { value: -15, expected: '-15'}, + { value: '-15', expected: '-15'}, + { value: '-0xf', expected: '-15'}, + { value: '-0x0f', expected: '-15'}, + { value: '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', expected: '115792089237316195423570985008687907853269984665640564039457584007913129639935'}, + { value: '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd', expected: '115792089237316195423570985008687907853269984665640564039457584007913129639933'}, + { value: '-0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', expected: '-115792089237316195423570985008687907853269984665640564039457584007913129639935'}, + { value: '-0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd', expected: '-115792089237316195423570985008687907853269984665640564039457584007913129639933'}, + { value: 0, expected: '0'}, + { value: '0', expected: '0'}, + { value: '0x0', expected: '0'}, + { value: -0, expected: '0'}, + { value: '-0', expected: '0'}, + { value: '-0x0', expected: '0'}, + { value: new BigNumber(0), expected: '0'} +]; + +describe('lib/utils/utils', function () { + describe('toBigNumber', function () { + tests.forEach(function (test) { + it('should turn ' + test.value + ' to ' + test.expected, function () { + assert.equal(utils.toBigNumber(test.value).toString(10), test.expected); + }); + }); + }); +}); diff --git a/bower_components/web3/test/utils.toDecimal.js b/bower_components/web3/test/utils.toDecimal.js new file mode 100644 index 00000000..74352f32 --- /dev/null +++ b/bower_components/web3/test/utils.toDecimal.js @@ -0,0 +1,14 @@ +var assert = require('assert'); +var utils = require('../lib/utils/utils.js'); + +describe('lib/utils/utils', function () { + describe('toDecimal', function () { + it('should return the correct value', function () { + + assert.equal(utils.toDecimal("0x3e8"), '1000'); + // allow compatiblity + assert.equal(utils.toDecimal(100000), '100000'); + assert.equal(utils.toDecimal('100000'), '100000'); + }); + }); +}); diff --git a/bower_components/web3/test/utils.toHex.js b/bower_components/web3/test/utils.toHex.js new file mode 100644 index 00000000..04483306 --- /dev/null +++ b/bower_components/web3/test/utils.toHex.js @@ -0,0 +1,46 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils'); +var BigNumber = require('bignumber.js'); +var assert = chai.assert; + +var tests = [ + { value: 1, expected: '0x1' }, + { value: '1', expected: '0x1' }, + { value: '0x1', expected: '0x1'}, + { value: '15', expected: '0xf'}, + { value: '0xf', expected: '0xf'}, + { value: -1, expected: '-0x1'}, + { value: '-1', expected: '-0x1'}, + { value: '-0x1', expected: '-0x1'}, + { value: '-15', expected: '-0xf'}, + { value: '-0xf', expected: '-0xf'}, + { value: '0x657468657265756d', expected: '0x657468657265756d'}, + { value: '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd', expected: '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd'}, + { value: '-0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', expected: '-0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'}, + { value: '-0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd', expected: '-0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd'}, + { value: 0, expected: '0x0'}, + { value: '0', expected: '0x0'}, + { value: '0x0', expected: '0x0'}, + { value: -0, expected: '0x0'}, + { value: '-0', expected: '0x0'}, + { value: '-0x0', expected: '0x0'}, + { value: [1,2,3,{test: 'data'}], expected: '0x5b312c322c332c7b2274657374223a2264617461227d5d'}, + { value: {test: 'test'}, expected: '0x7b2274657374223a2274657374227d'}, + { value: '{"test": "test"}', expected: '0x7b2274657374223a202274657374227d'}, + { value: 'myString', expected: '0x6d79537472696e67'}, + { value: new BigNumber(15), expected: '0xf'}, + { value: true, expected: '0x1'}, + { value: false, expected: '0x0'}, + { value: '\u0003\u0000\u0000\u00005èÆÕL]\u0012|Î¾ž\u001a7«›\u00052\u0011(ЗY\n<\u0010\u0000\u0000\u0000\u0000\u0000\u0000e!ßd/ñõì\f:z¦Î¦±ç·÷Í¢Ëß\u00076*…\bŽ—ñžùC1ÉUÀé2\u001aӆBŒ', + expected: '0x0300000035e8c6d54c5d127c9dcebe9e1a37ab9b05321128d097590a3c100000000000006521df642ff1f5ec0c3a7aa6cea6b1e7b7f7cda2cbdf07362a85088e97f19ef94331c955c0e9321ad386428c'} +]; + +describe('lib/utils/utils', function () { + describe('toHex', function () { + tests.forEach(function (test) { + it('should turn ' + test.value + ' to ' + test.expected, function () { + assert.strictEqual(utils.toHex(test.value), test.expected); + }); + }); + }); +}); diff --git a/bower_components/web3/test/utils.toUtf8.js b/bower_components/web3/test/utils.toUtf8.js new file mode 100644 index 00000000..1a7b212a --- /dev/null +++ b/bower_components/web3/test/utils.toUtf8.js @@ -0,0 +1,20 @@ +var chai = require('chai'); +var BigNumber = require('bignumber.js'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { value: '0x6d79537472696e67', expected: 'myString'}, + { value: '0x6d79537472696e6700', expected: 'myString'}, + { value: '0x65787065637465642076616c7565000000000000000000000000000000000000', expected: 'expected value'} +]; + +describe('lib/utils/utils', function () { + describe('toUtf8', function () { + tests.forEach(function (test) { + it('should turn ' + test.value + ' to ' + test.expected, function () { + assert.strictEqual(utils.toUtf8(test.value), test.expected); + }); + }); + }); +}); diff --git a/bower_components/web3/test/utils.toWei.js b/bower_components/web3/test/utils.toWei.js new file mode 100644 index 00000000..74eda529 --- /dev/null +++ b/bower_components/web3/test/utils.toWei.js @@ -0,0 +1,37 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils'); +var assert = chai.assert; + +describe('lib/utils/utils', function () { + describe('toWei', function () { + it('should return the correct value', function () { + + assert.equal(utils.toWei(1, 'wei'), '1'); + assert.equal(utils.toWei(1, 'kwei'), '1000'); + assert.equal(utils.toWei(1, 'Kwei'), '1000'); + assert.equal(utils.toWei(1, 'babbage'), '1000'); + assert.equal(utils.toWei(1, 'mwei'), '1000000'); + assert.equal(utils.toWei(1, 'Mwei'), '1000000'); + assert.equal(utils.toWei(1, 'lovelace'), '1000000'); + assert.equal(utils.toWei(1, 'gwei'), '1000000000'); + assert.equal(utils.toWei(1, 'Gwei'), '1000000000'); + assert.equal(utils.toWei(1, 'shannon'), '1000000000'); + assert.equal(utils.toWei(1, 'szabo'), '1000000000000'); + assert.equal(utils.toWei(1, 'finney'), '1000000000000000'); + assert.equal(utils.toWei(1, 'ether'), '1000000000000000000'); + assert.equal(utils.toWei(1, 'kether'), '1000000000000000000000'); + assert.equal(utils.toWei(1, 'grand'), '1000000000000000000000'); + assert.equal(utils.toWei(1, 'mether'), '1000000000000000000000000'); + assert.equal(utils.toWei(1, 'gether'), '1000000000000000000000000000'); + assert.equal(utils.toWei(1, 'tether'), '1000000000000000000000000000000'); + + assert.equal(utils.toWei(1, 'kwei'), utils.toWei(1, 'femtoether')); + assert.equal(utils.toWei(1, 'szabo'), utils.toWei(1, 'microether')); + assert.equal(utils.toWei(1, 'finney'), utils.toWei(1, 'milliether')); + assert.equal(utils.toWei(1, 'milli'), utils.toWei(1, 'milliether')); + assert.equal(utils.toWei(1, 'milli'), utils.toWei(1000, 'micro')); + + assert.throws(function () {utils.toWei(1, 'wei1');}, Error); + }); + }); +}); diff --git a/bower_components/web3/test/web3.db.getHex.js b/bower_components/web3/test/web3.db.getHex.js new file mode 100644 index 00000000..7e17d0c5 --- /dev/null +++ b/bower_components/web3/test/web3.db.getHex.js @@ -0,0 +1,14 @@ +var testMethod = require('./helpers/test.method.js'); + +var method = 'getHex'; + +var tests = [{ + args: ['myDB', 'myKey'], + formattedArgs: ['myDB', 'myKey'], + result: '0xf', + formattedResult: '0xf', + call: 'db_'+ method +}]; + +testMethod.runTests('db', method, tests); + diff --git a/bower_components/web3/test/web3.db.getString.js b/bower_components/web3/test/web3.db.getString.js new file mode 100644 index 00000000..0a8a82e5 --- /dev/null +++ b/bower_components/web3/test/web3.db.getString.js @@ -0,0 +1,15 @@ +var chai = require('chai'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getString'; + +var tests = [{ + args: ['myDB', 'myKey'], + formattedArgs: ['myDB', 'myKey'], + result: 'myValue', + formattedResult: 'myValue', + call: 'db_'+ method +}]; + +testMethod.runTests('db', method, tests); + diff --git a/bower_components/web3/test/web3.db.methods.js b/bower_components/web3/test/web3.db.methods.js new file mode 100644 index 00000000..535d03cc --- /dev/null +++ b/bower_components/web3/test/web3.db.methods.js @@ -0,0 +1,15 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index.js'); +var web3 = new Web3(); +var u = require('./helpers/test.utils.js'); + +describe('web3.db', function() { + describe('methods', function() { + u.methodExists(web3.db, 'putHex'); + u.methodExists(web3.db, 'getHex'); + u.methodExists(web3.db, 'putString'); + u.methodExists(web3.db, 'getString'); + }); +}); + diff --git a/bower_components/web3/test/web3.db.putHex.js b/bower_components/web3/test/web3.db.putHex.js new file mode 100644 index 00000000..306abaec --- /dev/null +++ b/bower_components/web3/test/web3.db.putHex.js @@ -0,0 +1,16 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'putHex'; + +var tests = [{ + args: ['myDB', 'myKey', '0xb'], + formattedArgs: ['myDB', 'myKey', '0xb'], + result: true, + formattedResult: true, + call: 'db_'+ method +}]; + +testMethod.runTests('db', method, tests); + diff --git a/bower_components/web3/test/web3.db.putString.js b/bower_components/web3/test/web3.db.putString.js new file mode 100644 index 00000000..ddd32874 --- /dev/null +++ b/bower_components/web3/test/web3.db.putString.js @@ -0,0 +1,16 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'putString'; + +var tests = [{ + args: ['myDB', 'myKey', 'myValue'], + formattedArgs: ['myDB', 'myKey', 'myValue'], + result: true, + formattedResult: true, + call: 'db_'+ method +}]; + +testMethod.runTests('db', method, tests); + diff --git a/bower_components/web3/test/web3.eth.accounts.js b/bower_components/web3/test/web3.eth.accounts.js new file mode 100644 index 00000000..2a590e2f --- /dev/null +++ b/bower_components/web3/test/web3.eth.accounts.js @@ -0,0 +1,39 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'accounts'; + +var tests = [{ + result: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedResult: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + call: 'eth_'+ method +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.eth.blockNumber.js b/bower_components/web3/test/web3.eth.blockNumber.js new file mode 100644 index 00000000..ec10e7e2 --- /dev/null +++ b/bower_components/web3/test/web3.eth.blockNumber.js @@ -0,0 +1,59 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'blockNumber'; + +var tests = [{ + result: '0xb', + formattedResult: 11, + call: 'eth_'+ method +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.strictEqual(test.formattedResult, result); + }); + + it('async get property test: ' + index, function (done) { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + web3.eth.getBlockNumber(function (err, result) { + assert.strictEqual(test.formattedResult, result); + done(); + }); + + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.eth.call.js b/bower_components/web3/test/web3.eth.call.js new file mode 100644 index 00000000..eea4b019 --- /dev/null +++ b/bower_components/web3/test/web3.eth.call.js @@ -0,0 +1,40 @@ +var testMethod = require('./helpers/test.method.js'); + +var method = 'call'; + +var tests = [{ + args: [{ + to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b', + data: '0x23455654', + gas: 11, + gasPrice: 11 + }], + formattedArgs: [{ + to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b', + data: '0x23455654', + gas: '0xb', + gasPrice: '0xb' + }, 'latest'], + result: '0x31981', + formattedResult: '0x31981', + call: 'eth_'+ method +},{ + args: [{ + to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b', + data: '0x23455654', + gas: 11, + gasPrice: 11 + }, 11], + formattedArgs: [{ + to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b', + data: '0x23455654', + gas: '0xb', + gasPrice: '0xb' + }, '0xb'], + result: '0x31981', + formattedResult: '0x31981', + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.coinbase.js b/bower_components/web3/test/web3.eth.coinbase.js new file mode 100644 index 00000000..8086e58c --- /dev/null +++ b/bower_components/web3/test/web3.eth.coinbase.js @@ -0,0 +1,39 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'coinbase'; + +var tests = [{ + result: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.eth.contract.js b/bower_components/web3/test/web3.eth.contract.js new file mode 100644 index 00000000..c4aeb2b3 --- /dev/null +++ b/bower_components/web3/test/web3.eth.contract.js @@ -0,0 +1,250 @@ +var assert = require('assert'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); +var Web3 = require('../index'); + + +describe('web3.eth.contract', function() { + it('should create simple contract with one method from abi with explicit type name', function () { + + // given + var description = [{ + "name": "test(uint256)", + "type": "function", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "d", + "type": "uint256" + } + ] + }]; + var address = '0x1234567890123456789012345678901234567892'; + + // when + var web3 = new Web3(); + var myCon = web3.eth.contract(description).at(address); + + // then + assert.equal('function', typeof myCon.test); + assert.equal('function', typeof myCon.test['uint256']); + }); + + it('should create simple contract with one method from abi with implicit type name', function () { + + // given + var description = [{ + "name": "test", + "type": "function", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "d", + "type": "uint256" + } + ] + }]; + var address = '0x1234567890123456789012345678901234567892'; + + // when + var web3 = new Web3(); + var myCon = web3.eth.contract(description).at(address); + + // then + assert.equal('function', typeof myCon.test); + assert.equal('function', typeof myCon.test['uint256']); + }); + + it('should create contract with multiple methods', function () { + + // given + var description = [{ + "name": "test", + "type": "function", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "d", + "type": "uint256" + } + ], + }, { + "name": "test2", + "type": "function", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "d", + "type": "uint256" + } + ] + }]; + var address = '0x1234567890123456789012345678901234567892'; + + // when + var web3 = new Web3(); + var myCon = web3.eth.contract(description).at(address); + + // then + assert.equal('function', typeof myCon.test); + assert.equal('function', typeof myCon.test['uint256']); + assert.equal('function', typeof myCon.test2); + assert.equal('function', typeof myCon.test2['uint256']); + }); + + it('should create contract with overloaded methods', function () { + + // given + var description = [{ + "name": "test", + "type": "function", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "d", + "type": "uint256" + } + ], + }, { + "name": "test", + "type": "function", + "inputs": [{ + "name": "a", + "type": "string" + } + ], + "outputs": [ + { + "name": "d", + "type": "uint256" + } + ] + }]; + var address = '0x1234567890123456789012345678901234567892'; + + // when + var web3 = new Web3(); + var myCon = web3.eth.contract(description).at(address); + + // then + assert.equal('function', typeof myCon.test); + assert.equal('function', typeof myCon.test['uint256']); + assert.equal('function', typeof myCon.test['string']); + }); + + it('should create contract with no methods', function () { + + // given + var description = [{ + "name": "test(uint256)", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "d", + "type": "uint256" + } + ] + }]; + var address = '0x1234567890123456789012345678901234567892'; + + // when + var web3 = new Web3(); + var myCon = web3.eth.contract(description).at(address); + + // then + assert.equal('undefined', typeof myCon.test); + + }); + + it('should create contract with one event', function () { + + // given + var description = [{ + "name": "test", + "type": "event", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "d", + "type": "uint256" + } + ] + }]; + var address = '0x1234567890123456789012345678901234567892'; + + // when + var web3 = new Web3(); + var myCon = web3.eth.contract(description).at(address); + + // then + assert.equal('function', typeof myCon.test); + assert.equal('function', typeof myCon.test['uint256']); + + }); + + it('should create contract with nondefault constructor', function (done) { + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + var address = '0x1234567890123456789012345678901234567894'; + var code = '0x31241231231123123123123121cf121212i123123123123123512312412512111111'; + var description = [{ + "name": "test", + "type": "constructor", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ] + }]; + + var steps = 1; + + provider.injectResult(address); + provider.injectValidation(function (payload) { + if (steps === 1) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'eth_sendTransaction'); + assert.equal(payload.params[0].data, code + '0000000000000000000000000000000000000000000000000000000000000002'); + steps++; + + } else if (steps === 2) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'eth_newBlockFilter'); + steps++; + } + }); + + web3.eth.contract(description).new(2, {from: address, data: code}, function(e, myCon){ + done(); + web3.stopWatching(); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.eth.defaultBlock.js b/bower_components/web3/test/web3.eth.defaultBlock.js new file mode 100644 index 00000000..de34b47b --- /dev/null +++ b/bower_components/web3/test/web3.eth.defaultBlock.js @@ -0,0 +1,13 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); + +describe('web3.eth', function () { + describe('defaultBlock', function () { + it('should check if defaultBlock is set to proper value', function () { + assert.equal(web3.eth.defaultBlock, 'latest'); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.eth.estimateGas.js b/bower_components/web3/test/web3.eth.estimateGas.js new file mode 100644 index 00000000..efa6bf31 --- /dev/null +++ b/bower_components/web3/test/web3.eth.estimateGas.js @@ -0,0 +1,25 @@ +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'estimateGas'; + +var tests = [{ + args: [{ + to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b', + data: '0x23455654', + gas: 11, + gasPrice: 11 + }], + formattedArgs: [{ + to: '0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b', + data: '0x23455654', + gas: '0xb', + gasPrice: '0xb' + }], + result: '0x31981', + formattedResult: 203137, + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.filter.js b/bower_components/web3/test/web3.eth.filter.js new file mode 100644 index 00000000..35df659d --- /dev/null +++ b/bower_components/web3/test/web3.eth.filter.js @@ -0,0 +1,119 @@ +var chai = require('chai'); +var Web3 = require('../index'); +var web3 = new Web3(); +var assert = chai.assert; +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); +var errors = require('../lib/web3/errors'); + +var method = 'filter'; + +var tests = [{ + args: [{ + fromBlock: 0, + toBlock: 10, + address: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855' + }], + formattedArgs: [{ + fromBlock: '0x0', + toBlock: '0xa', + address: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: [] + }], + result: '0xf', + formattedResult: '0xf', + call: 'eth_newFilter' +},{ + args: [{ + fromBlock: 'latest', + toBlock: 'latest', + address: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855' + }], + formattedArgs: [{ + fromBlock: 'latest', + toBlock: 'latest', + address: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: [] + }], + result: '0xf', + formattedResult: '0xf', + call: 'eth_newFilter' +},{ + args: ['latest'], + formattedArgs: [], + result: '0xf', + formattedResult: '0xf', + call: 'eth_newBlockFilter' +},{ + args: ['pending'], + formattedArgs: [], + result: '0xf', + formattedResult: '0xf', + call: 'eth_newPendingTransactionFilter' +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.reset(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, test.formattedArgs); + }); + + // call + var filter = web3.eth[method].apply(web3.eth, test.args); + + // test filter.get + if(typeof test.args === 'object') { + + var logs = [{data: '0xb'}, {data: '0x11'}]; + + provider.injectResult(logs); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'eth_getFilterLogs'); + assert.deepEqual(payload.params, [test.formattedResult]); + }); + + // sync should throw an error + try { + assert.throws(filter.get()); + } catch(e){ + assert.instanceOf(e, Error); + } + + // async should get the fake logs + filter.get(function(e, res){ + assert.equal(logs, res); + web3.reset(); + done(); + }); + } + }); + + it('should call filterCreationErrorCallback on error while filter creation', function () { + // given + var provider = new FakeHttpProvider(); + web3.reset(); + web3.setProvider(provider); + provider.injectError(errors.InvalidConnection()); + // call + var args = test.args.slice(); + args.push(undefined); + args.push(function (err) { + assert.include(errors, err); + done(); + }); + web3.eth[method].apply(web3.eth, args); + }) + }); + }); +}); + diff --git a/bower_components/web3/test/web3.eth.gasPrice.js b/bower_components/web3/test/web3.eth.gasPrice.js new file mode 100644 index 00000000..6caf7669 --- /dev/null +++ b/bower_components/web3/test/web3.eth.gasPrice.js @@ -0,0 +1,40 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var BigNumber = require('bignumber.js'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'gasPrice'; + +var tests = [{ + result: '0x15f90', + formattedResult: new BigNumber(90000), + call: 'eth_'+ method +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.eth.getBalance.js b/bower_components/web3/test/web3.eth.getBalance.js new file mode 100644 index 00000000..7fb582a4 --- /dev/null +++ b/bower_components/web3/test/web3.eth.getBalance.js @@ -0,0 +1,71 @@ +var BigNumber = require('bignumber.js'); +var Web3 = require('../index'); +var web3 = new Web3(); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getBalance'; + +var tests = [{ + args: ['0x000000000000000000000000000000000000012d', 2], + formattedArgs: ['0x000000000000000000000000000000000000012d', '0x2'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +},{ + args: ['0x000000000000000000000000000000000000012d', '0x1'], + formattedArgs: ['0x000000000000000000000000000000000000012d', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['0x000000000000000000000000000000000000012d', 0x1], + formattedArgs: ['0x000000000000000000000000000000000000012d', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['0x000000000000000000000000000000000000012d'], + formattedArgs: ['0x000000000000000000000000000000000000012d', web3.eth.defaultBlock], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', 0x1], + formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', 0x1], + formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['0x000000000000000000000000000000000000012d', 0x1], + formattedArgs: ['0x000000000000000000000000000000000000012d', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['0x000000000000000000000000000000000000012d'], + formattedArgs: ['0x000000000000000000000000000000000000012d', 'latest'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['000000000000000000000000000000000000012d'], + formattedArgs: ['0x000000000000000000000000000000000000012d', 'latest'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS'], + formattedArgs: ['0x00c5496aee77c1ba1f0854206a26dda82a81d6d8', 'latest'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.getBlock.js b/bower_components/web3/test/web3.eth.getBlock.js new file mode 100644 index 00000000..20612090 --- /dev/null +++ b/bower_components/web3/test/web3.eth.getBlock.js @@ -0,0 +1,136 @@ +var Web3 = require('../index'); +var web3 = new Web3(); +var BigNumber = require('bignumber.js'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getBlock'; + +var blockResult = { + "number": "0x1b4", + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": "0x027f07", + "totalDifficulty": "0x027f07", + "size": "0x027f07", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "0x9f759", + "gasUsed": "0x9f759", + "timestamp": "0x54e34e8e", + "transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var formattedBlockResult = { + "number": 436, + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": new BigNumber(163591), + "totalDifficulty": new BigNumber(163591), + "size": 163591, + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": 653145, + "gasUsed": 653145, + "timestamp": 1424182926, + "transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var blockResultWithTx = { + "number": "0x1b4", + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": "0x027f07", + "totalDifficulty": "0x027f07", + "size": "0x027f07", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "0x9f759", + "gasUsed": "0x9f759", + "timestamp": "0x54e34e8e", + "transactions": [{ + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0x2", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": "0x15df", + "transactionIndex": "0x1", + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value":"0x7f110", + "gas": "0x7f110", + "gasPrice":"0x09184e72a000", + "input":"0x603880600c6000396000f30060", + }], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var formattedBlockResultWithTx = { + "number": 436, + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": new BigNumber(163591), + "totalDifficulty": new BigNumber(163591), + "size": 163591, + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": 653145, + "gasUsed": 653145, + "timestamp": 1424182926, + "transactions": [{ + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce": 2, + "blockHash": "0x6fd9e2a26ab", + "blockNumber": 5599, + "transactionIndex": 1, + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value": new BigNumber(520464), + "gas": 520464, + "gasPrice": new BigNumber(10000000000000), + "input":"0x603880600c6000396000f30060", + }], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', false], + result: blockResult, + formattedResult: formattedBlockResult, + call: 'eth_'+ method + 'ByHash' +},{ + args: [436], + formattedArgs: ['0x1b4', false], + result: blockResult, + formattedResult: formattedBlockResult, + call: 'eth_'+ method + 'ByNumber' +},{ + args: [436, true], + formattedArgs: ['0x1b4', true], + result: blockResultWithTx, + formattedResult: formattedBlockResultWithTx, + call: 'eth_'+ method + 'ByNumber' +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.getBlockTransactionCount.js b/bower_components/web3/test/web3.eth.getBlockTransactionCount.js new file mode 100644 index 00000000..009b25ec --- /dev/null +++ b/bower_components/web3/test/web3.eth.getBlockTransactionCount.js @@ -0,0 +1,29 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getBlockTransactionCount'; + + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + result: '0xb', + formattedResult: 11, + call: 'eth_getBlockTransactionCountByHash' +},{ + args: [436], + formattedArgs: ['0x1b4'], + result: '0xb', + formattedResult: 11, + call: 'eth_getBlockTransactionCountByNumber' +},{ + args: ['pending'], + formattedArgs: ['pending'], + result: '0xb', + formattedResult: 11, + call: 'eth_getBlockTransactionCountByNumber' +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.getBlockUncleCount.js b/bower_components/web3/test/web3.eth.getBlockUncleCount.js new file mode 100644 index 00000000..f8193b71 --- /dev/null +++ b/bower_components/web3/test/web3.eth.getBlockUncleCount.js @@ -0,0 +1,27 @@ +var chai = require('chai'); +var web3 = require('../index'); +var method = 'getBlockUncleCount'; +var testMethod = require('./helpers/test.method.js'); + + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + result: '0xb', + formattedResult: 11, + call: 'eth_getUncleCountByBlockHash' +},{ + args: [436], + formattedArgs: ['0x1b4'], + result: '0xb', + formattedResult: 11, + call: 'eth_getUncleCountByBlockNumber' +},{ + args: ['pending'], + formattedArgs: ['pending'], + result: '0xb', + formattedResult: 11, + call: 'eth_getUncleCountByBlockNumber' +}]; + +testMethod.runTests('eth', method, tests); diff --git a/bower_components/web3/test/web3.eth.getCode.js b/bower_components/web3/test/web3.eth.getCode.js new file mode 100644 index 00000000..9a76f5a5 --- /dev/null +++ b/bower_components/web3/test/web3.eth.getCode.js @@ -0,0 +1,24 @@ +var chai = require('chai'); +var Web3 = require('../index'); +var web3 = new Web3(); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getCode'; + + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', web3.eth.defaultBlock], + result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +},{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 2], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0x2'], + result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.getCompilers.js b/bower_components/web3/test/web3.eth.getCompilers.js new file mode 100644 index 00000000..ab426b22 --- /dev/null +++ b/bower_components/web3/test/web3.eth.getCompilers.js @@ -0,0 +1,23 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getCompilers'; + + +var tests = [{ + args: [], + formattedArgs: [], + result: ['solidity'], + formattedResult: ['solidity'], + call: 'eth_'+ method +},{ + args: [], + formattedArgs: [], + result: ['solidity'], + formattedResult: ['solidity'], + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.getStorageAt.js b/bower_components/web3/test/web3.eth.getStorageAt.js new file mode 100644 index 00000000..08a46e01 --- /dev/null +++ b/bower_components/web3/test/web3.eth.getStorageAt.js @@ -0,0 +1,36 @@ +var chai = require('chai'); +var Web3 = require('../index'); +var web3 = new Web3(); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getStorageAt'; + + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 2], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0x2', web3.eth.defaultBlock], + result: '0x47d33b2', + formattedResult: '0x47d33b2', + call: 'eth_'+ method +},{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 2, 0], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0x2', '0x0'], + result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +},{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 0xb, 0x0], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0xb', '0x0'], + result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +}, { + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 0xb, 'latest'], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0xb', 'latest'], + result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.getTransaction.js b/bower_components/web3/test/web3.eth.getTransaction.js new file mode 100644 index 00000000..897bb136 --- /dev/null +++ b/bower_components/web3/test/web3.eth.getTransaction.js @@ -0,0 +1,44 @@ +var chai = require('chai'); +var web3 = require('../index'); +var BigNumber = require('bignumber.js'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getTransaction'; + +var txResult = { + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0x5", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": "0x15df", + "transactionIndex": "0x1", + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value":"0x7f110", + "gas": "0x7f110", + "gasPrice":"0x09184e72a000", + "input":"0x603880600c6000396000f30060" +}; +var formattedTxResult = { + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":5, + "blockHash": "0x6fd9e2a26ab", + "blockNumber": 5599, + "transactionIndex": 1, + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value": new BigNumber(520464), + "gas": 520464, + "gasPrice": new BigNumber(10000000000000), + "input":"0x603880600c6000396000f30060" +}; + +var tests = [{ + args: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855'], + formattedArgs: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855'], + result: txResult, + formattedResult: formattedTxResult, + call: 'eth_'+ method + 'ByHash' +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.getTransactionFromBlock.js b/bower_components/web3/test/web3.eth.getTransactionFromBlock.js new file mode 100644 index 00000000..9f59a606 --- /dev/null +++ b/bower_components/web3/test/web3.eth.getTransactionFromBlock.js @@ -0,0 +1,52 @@ +var chai = require('chai'); +var web3 = require('../index'); +var BigNumber = require('bignumber.js'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getTransactionFromBlock'; + +var txResult = { + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0xb", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": "0x15df", + "transactionIndex": "0x1", + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value":"0x7f110", + "gas": "0x7f110", + "gasPrice":"0x09184e72a000", + "input":"0x603880600c6000396000f30060" +}; +var formattedTxResult = { + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":11, + "blockHash": "0x6fd9e2a26ab", + "blockNumber": 5599, + "transactionIndex": 1, + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value": new BigNumber(520464), + "gas": 520464, + "gasPrice": new BigNumber(10000000000000), + "input":"0x603880600c6000396000f30060" +}; + +var tests = [{ + args: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855', 2], + formattedArgs: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855', '0x2'], + result: txResult, + formattedResult: formattedTxResult, + call: 'eth_getTransactionByBlockHashAndIndex' +},{ + args: [436, 11], + formattedArgs: ['0x1b4', '0xb'], + result: txResult, + formattedResult: formattedTxResult, + call: 'eth_getTransactionByBlockNumberAndIndex' +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.getTransactionReceipt.js b/bower_components/web3/test/web3.eth.getTransactionReceipt.js new file mode 100644 index 00000000..f4398d9d --- /dev/null +++ b/bower_components/web3/test/web3.eth.getTransactionReceipt.js @@ -0,0 +1,70 @@ +var chai = require('chai'); +var web3 = require('../index'); +var BigNumber = require('bignumber.js'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getTransactionReceipt'; + +var txResult = { + "blockHash": "0x6fd9e2a26ab", + "blockNumber": "0x15df", + "transactionHash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "transactionIndex": "0x1", + "contractAddress":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "cumulativeGasUsed":"0x7f110", + "gasUsed": "0x7f110", + "logs": [{ + transactionIndex: '0x3e8', + logIndex: '0x3e8', + blockNumber: '0x3e8', + transactionHash: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + blockHash: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + data: '0x7b2274657374223a2274657374227', + topics: ['0x68656c6c6f','0x6d79746f70696373'] + },{ + transactionIndex: null, + logIndex: null, + blockNumber: null, + transactionHash: null, + blockHash: null, + data: '0x7b2274657374223a2274657374227', + topics: ['0x68656c6c6f','0x6d79746f70696373'] + }] +}; +var formattedTxResult = { + "blockHash": "0x6fd9e2a26ab", + "blockNumber": 5599, + "transactionHash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "transactionIndex": 1, + "contractAddress":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "cumulativeGasUsed": 520464, + "gasUsed": 520464, + "logs": [{ + transactionIndex: 1000, + logIndex: 1000, + blockNumber: 1000, + transactionHash: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + blockHash: '0xd6960376d6c6dea93647383ffb245cfced97ccc5c7525397a543a72fdaea5265', + data: '0x7b2274657374223a2274657374227', + topics: ['0x68656c6c6f','0x6d79746f70696373'] + },{ + transactionIndex: null, + logIndex: null, + blockNumber: null, + transactionHash: null, + blockHash: null, + data: '0x7b2274657374223a2274657374227', + topics: ['0x68656c6c6f','0x6d79746f70696373'] + }] +}; + +var tests = [{ + args: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855'], + formattedArgs: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855'], + result: txResult, + formattedResult: formattedTxResult, + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.getUncle.js b/bower_components/web3/test/web3.eth.getUncle.js new file mode 100644 index 00000000..a8ef6b1c --- /dev/null +++ b/bower_components/web3/test/web3.eth.getUncle.js @@ -0,0 +1,136 @@ +var chai = require('chai'); +var Web3 = require('../index'); +var web3 = new Web3(); +var BigNumber = require('bignumber.js'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getUncle'; + +var blockResult = { + "number": "0x1b4", + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": "0x027f07", + "totalDifficulty": "0x027f07", + "size": "0x027f07", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "0x9f759", + "gasUsed": "0x9f759", + "timestamp": "0x54e34e8e", + "transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var formattedBlockResult = { + "number": 436, + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": new BigNumber(163591), + "totalDifficulty": new BigNumber(163591), + "size": 163591, + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": 653145, + "gasUsed": 653145, + "timestamp": 1424182926, + "transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var blockResultWithTx = { + "number": "0x1b4", + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": "0x027f07", + "totalDifficulty": "0x027f07", + "size": "0x027f07", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "0x9f759", + "gasUsed": "0x9f759", + "timestamp": "0x54e34e8e", + "transactions": [{ + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0x2", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": "0x15df", + "transactionIndex": "0x1", + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value":"0x7f110", + "gas": "0x7f110", + "gasPrice":"0x09184e72a000", + "input":"0x603880600c6000396000f30060", + }], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var formattedBlockResultWithTx = { + "number": 436, + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": new BigNumber(163591), + "totalDifficulty": new BigNumber(163591), + "size": 163591, + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": 653145, + "gasUsed": 653145, + "timestamp": 1424182926, + "transactions": [{ + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce": 2, + "blockHash": "0x6fd9e2a26ab", + "blockNumber": 5599, + "transactionIndex": 1, + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value": new BigNumber(520464), + "gas": 520464, + "gasPrice": new BigNumber(10000000000000), + "input":"0x603880600c6000396000f30060", + }], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 2], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0x2'], + result: blockResult, + formattedResult: formattedBlockResult, + call: 'eth_getUncleByBlockHashAndIndex' +},{ + args: [436, 1], + formattedArgs: ['0x1b4', '0x1'], + result: blockResult, + formattedResult: formattedBlockResult, + call: 'eth_getUncleByBlockNumberAndIndex' +},{ + args: [436, 1, true], + formattedArgs: ['0x1b4', '0x1'], + result: blockResultWithTx, + formattedResult: formattedBlockResultWithTx, + call: 'eth_getUncleByBlockNumberAndIndex' +}]; + +testMethod.runTests('eth', method, tests); diff --git a/bower_components/web3/test/web3.eth.getWork.js b/bower_components/web3/test/web3.eth.getWork.js new file mode 100644 index 00000000..181c1894 --- /dev/null +++ b/bower_components/web3/test/web3.eth.getWork.js @@ -0,0 +1,16 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getWork'; + +var tests = [{ + args: [], + formattedArgs: [], + result: true, + formattedResult: true, + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.eth.hashRate.js b/bower_components/web3/test/web3.eth.hashRate.js new file mode 100644 index 00000000..e657eec6 --- /dev/null +++ b/bower_components/web3/test/web3.eth.hashRate.js @@ -0,0 +1,43 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'hashrate'; + +var tests = [{ + result: '0x788a8', + formattedResult: 493736, + call: 'eth_'+ method +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.strictEqual(test.formattedResult, result); + + // clear the validation + provider.injectValidation(function () {}); + web3.reset(); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.eth.isSyncing.js b/bower_components/web3/test/web3.eth.isSyncing.js new file mode 100644 index 00000000..3a427199 --- /dev/null +++ b/bower_components/web3/test/web3.eth.isSyncing.js @@ -0,0 +1,77 @@ +var chai = require('chai'); +var Web3 = require('../index'); +var assert = chai.assert; +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'isSyncing'; + +var tests = [{ + args: [], + formattedArgs: [], + result: [{ + startingBlock: '0xb', + currentBlock: '0xb', + highestBlock: '0xb' + }], + formattedResult: { + startingBlock: 11, + currentBlock: 11, + highestBlock: 11 + }, + call: 'eth_syncing' +}, { + args: [], + formattedArgs: [], + result: [{ + startingBlock: '0xb', + currentBlock: '0xb', + highestBlock: '0xb', + knownStates: '0xb', + pulledStates: '0xb' + }], + formattedResult: { + startingBlock: 11, + currentBlock: 11, + highestBlock: 11, + knownStates: 11, + pulledStates: 11 + }, + call: 'eth_syncing' +}]; + +describe('eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function (done) { + // given + var provider = new FakeHttpProvider(); + var web3 = new Web3(provider); + provider.injectBatchResults(test.result); + provider.injectValidation(function(payload) { + assert.equal(payload[0].jsonrpc, '2.0', 'failed'); + assert.equal(payload[0].method, test.call); + assert.deepEqual(payload[0].params, test.formattedArgs); + }); + + var count = 1; + + // TODO results seem to be overwritten + + + // call + var syncing = web3.eth[method](function(e, res){ + if(count === 1) { + assert.isTrue(res); + count++; + } else { + assert.deepEqual(res, test.formattedResult); + syncing.stopWatching(); + done(); + } + }); + + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.eth.methods.js b/bower_components/web3/test/web3.eth.methods.js new file mode 100644 index 00000000..6a8dd2ae --- /dev/null +++ b/bower_components/web3/test/web3.eth.methods.js @@ -0,0 +1,36 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index.js'); +var web3 = new Web3(); +var u = require('./helpers/test.utils.js'); + +describe('web3.eth', function() { + describe('methods', function() { + u.methodExists(web3.eth, 'getBalance'); + u.methodExists(web3.eth, 'getStorageAt'); + u.methodExists(web3.eth, 'getTransactionCount'); + u.methodExists(web3.eth, 'getCode'); + u.methodExists(web3.eth, 'sendTransaction'); + u.methodExists(web3.eth, 'call'); + u.methodExists(web3.eth, 'getBlock'); + u.methodExists(web3.eth, 'getTransaction'); + u.methodExists(web3.eth, 'getUncle'); + u.methodExists(web3.eth, 'getCompilers'); + u.methodExists(web3.eth.compile, 'lll'); + u.methodExists(web3.eth.compile, 'solidity'); + u.methodExists(web3.eth.compile, 'serpent'); + u.methodExists(web3.eth, 'getBlockTransactionCount'); + u.methodExists(web3.eth, 'getBlockUncleCount'); + u.methodExists(web3.eth, 'filter'); + u.methodExists(web3.eth, 'contract'); + + u.propertyExists(web3.eth, 'coinbase'); + u.propertyExists(web3.eth, 'mining'); + u.propertyExists(web3.eth, 'gasPrice'); + u.propertyExists(web3.eth, 'accounts'); + u.propertyExists(web3.eth, 'defaultBlock'); + u.propertyExists(web3.eth, 'blockNumber'); + u.propertyExists(web3.eth, 'protocolVersion'); + }); +}); + diff --git a/bower_components/web3/test/web3.eth.mining.js b/bower_components/web3/test/web3.eth.mining.js new file mode 100644 index 00000000..9be43908 --- /dev/null +++ b/bower_components/web3/test/web3.eth.mining.js @@ -0,0 +1,39 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'mining'; + +var tests = [{ + result: true, + formattedResult: true, + call: 'eth_'+ method +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.eth.protocolVersion.js b/bower_components/web3/test/web3.eth.protocolVersion.js new file mode 100644 index 00000000..bdb91fcd --- /dev/null +++ b/bower_components/web3/test/web3.eth.protocolVersion.js @@ -0,0 +1,37 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'protocolVersion'; + +var tests = [{ + result: ['1234'], + call: 'eth_'+ method +}]; + +describe('eth.protocolVersion', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.deepEqual(test.result, result); + }); + }); + }); +}); diff --git a/bower_components/web3/test/web3.eth.sendIBANTransaction.js b/bower_components/web3/test/web3.eth.sendIBANTransaction.js new file mode 100644 index 00000000..6fdcfb66 --- /dev/null +++ b/bower_components/web3/test/web3.eth.sendIBANTransaction.js @@ -0,0 +1,49 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider2 = require('./helpers/FakeHttpProvider2'); + +describe('web3.eth.sendIBANTransaction', function () { + it('should send transaction', function () { + + var iban = 'XE81ETHXREGGAVOFYORK'; + var address = '0x1234567890123456789012345678901234500000'; + var exAddress = '0x1234567890123456789012345678901234567890' + + var provider = new FakeHttpProvider2(); + web3.setProvider(provider); + web3.reset(); + + provider.injectResultList([{ + result: exAddress + }, { + result: '' + }]); + + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step++; + assert.equal(payload.method, 'eth_call'); + assert.deepEqual(payload.params, [{ + data: "0x3b3b57de5852454700000000000000000000000000000000000000000000000000000000", + to: web3.eth.icapNamereg().address + }, "latest"]); + + return; + } + assert.equal(payload.method, 'eth_sendTransaction'); + assert.deepEqual(payload.params, [{ + data: '0xb214faa54741564f46594f524b0000000000000000000000000000000000000000000000', + from: address, + to: exAddress, + value: payload.params[0].value // don't check this + }]); + }); + + web3.eth.sendIBANTransaction(address, iban, 10000); + + }); +}); + diff --git a/bower_components/web3/test/web3.eth.submitWork.js b/bower_components/web3/test/web3.eth.submitWork.js new file mode 100644 index 00000000..3751c807 --- /dev/null +++ b/bower_components/web3/test/web3.eth.submitWork.js @@ -0,0 +1,17 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'submitWork'; + +var tests = [ +{ + args: ['0x567890abcdef5555', '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef', '0xcdef1234567890abcdef1234567890abcdef0x1234567890abcf1234567890ab'], + formattedArgs: ['0x567890abcdef5555', '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef', '0xcdef1234567890abcdef1234567890abcdef0x1234567890abcf1234567890ab'], + result: true, + formattedResult: true, + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/bower_components/web3/test/web3.extend.js b/bower_components/web3/test/web3.extend.js new file mode 100644 index 00000000..7b1c2448 --- /dev/null +++ b/bower_components/web3/test/web3.extend.js @@ -0,0 +1,77 @@ +var chai = require('chai'); +var assert = chai.assert; +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); +var Web3 = require('../lib/web3'); +var web3 = new Web3(); + + +var tests = [{ + properties: [new web3._extend.Property({ + name: 'gasPrice', + getter: 'eth_gasPrice', + outputFormatter: web3._extend.formatters.outputBigNumberFormatter + })] +},{ + methods: [new web3._extend.Method({ + name: 'getBalance', + call: 'eth_getBalance', + params: 2, + inputFormatter: [web3._extend.utils.toAddress, web3._extend.formatters.inputDefaultBlockNumberFormatter], + outputFormatter: web3._extend.formatters.outputBigNumberFormatter + })] +},{ + property: 'admin', + properties: [new web3._extend.Property({ + name: 'gasPrice', + getter: 'eth_gasPrice', + outputFormatter: web3._extend.formatters.outputBigNumberFormatter + })], + methods: [new web3._extend.Method({ + name: 'getBalance', + call: 'eth_getBalance', + params: 2, + inputFormatter: [web3._extend.utils.toAddress, web3._extend.formatters.inputDefaultBlockNumberFormatter], + outputFormatter: web3._extend.formatters.outputBigNumberFormatter + })] +}]; + +describe('web3', function () { + describe('_extend', function () { + tests.forEach(function (test, index) { + it('test no: ' + index, function () { + web3._extend(test); + + + if(test.properties) + test.properties.forEach(function(property){ + + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(''); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, property.getter); + }); + + if(test.property) { + assert.isObject(web3[test.property][property.name]); + assert.isFunction(web3[test.property]['get'+ property.name.charAt(0).toUpperCase() + property.name.slice(1)]); + } else { + assert.isObject(web3[property.name]); + assert.isFunction(web3['get'+ property.name.charAt(0).toUpperCase() + property.name.slice(1)]); + } + }); + + if(test.methods) + test.methods.forEach(function(property){ + if(test.property) + assert.isFunction(web3[test.property][property.name]); + else + assert.isFunction(web3[property.name]); + }); + + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.fromICAP.js b/bower_components/web3/test/web3.fromICAP.js new file mode 100644 index 00000000..e815849e --- /dev/null +++ b/bower_components/web3/test/web3.fromICAP.js @@ -0,0 +1,19 @@ +var chai = require('chai'); +var Web3 = require('../index'); +var web3 = new Web3(); +var assert = chai.assert; + +var tests = [ + { direct: 'XE7338O073KYGTWWZN0F2WZ0R8PX5ZPPZS', address: '00c5496aee77c1ba1f0854206a26dda82a81d6d8'} +]; + +describe('web3', function () { + describe('fromICAP', function () { + tests.forEach(function (test) { + it('shoud transform iban to address: ' + test.address, function () { + assert.deepEqual(web3.fromICAP(test.direct), test.address); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.methods.js b/bower_components/web3/test/web3.methods.js new file mode 100644 index 00000000..d47e8c9b --- /dev/null +++ b/bower_components/web3/test/web3.methods.js @@ -0,0 +1,25 @@ +var Web3 = require('../index.js'); +var web3 = new Web3(); +var u = require('./helpers/test.utils.js'); + +describe('web3', function() { + describe('methods', function () { + u.methodExists(web3, 'sha3'); + u.methodExists(web3, 'toAscii'); + u.methodExists(web3, 'fromAscii'); + u.methodExists(web3, 'toDecimal'); + u.methodExists(web3, 'fromDecimal'); + u.methodExists(web3, 'fromWei'); + u.methodExists(web3, 'toWei'); + u.methodExists(web3, 'toBigNumber'); + u.methodExists(web3, 'isAddress'); + u.methodExists(web3, 'setProvider'); + u.methodExists(web3, 'reset'); + + u.propertyExists(web3, 'providers'); + u.propertyExists(web3, 'eth'); + u.propertyExists(web3, 'db'); + u.propertyExists(web3, 'shh'); + }); +}); + diff --git a/bower_components/web3/test/web3.net.listening.js b/bower_components/web3/test/web3.net.listening.js new file mode 100644 index 00000000..3d2fed0a --- /dev/null +++ b/bower_components/web3/test/web3.net.listening.js @@ -0,0 +1,39 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'listening'; + +var tests = [{ + result: true, + formattedResult: true, + call: 'net_'+ method +}]; + +describe('web3.net', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.net[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.net.methods.js b/bower_components/web3/test/web3.net.methods.js new file mode 100644 index 00000000..917ac6fb --- /dev/null +++ b/bower_components/web3/test/web3.net.methods.js @@ -0,0 +1,12 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index.js'); +var web3 = new Web3(); +var u = require('./helpers/test.utils.js'); + +describe('web3.net', function() { + describe('methods', function() { + u.propertyExists(web3.net, 'listening'); + u.propertyExists(web3.net, 'peerCount'); + }); +}); diff --git a/bower_components/web3/test/web3.net.peerCount.js b/bower_components/web3/test/web3.net.peerCount.js new file mode 100644 index 00000000..efaea96f --- /dev/null +++ b/bower_components/web3/test/web3.net.peerCount.js @@ -0,0 +1,39 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'peerCount'; + +var tests = [{ + result: '0xf', + formattedResult: 15, + call: 'net_'+ method +}]; + +describe('web3.net', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.net[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.personal.listAccounts.js b/bower_components/web3/test/web3.personal.listAccounts.js new file mode 100644 index 00000000..02c085da --- /dev/null +++ b/bower_components/web3/test/web3.personal.listAccounts.js @@ -0,0 +1,38 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var web3 = new Web3(); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'listAccounts'; + +var tests = [{ + result: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedResult: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + call: 'personal_'+ method +}]; + +describe('web3.personal', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.personal[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); diff --git a/bower_components/web3/test/web3.personal.methods.js b/bower_components/web3/test/web3.personal.methods.js new file mode 100644 index 00000000..22acdb69 --- /dev/null +++ b/bower_components/web3/test/web3.personal.methods.js @@ -0,0 +1,13 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index.js'); +var web3 = new Web3(); +var u = require('./helpers/test.utils.js'); + +describe('web3.net', function() { + describe('methods', function() { + u.propertyExists(web3.personal, 'listAccounts'); + u.methodExists(web3.personal, 'newAccount'); + u.methodExists(web3.personal, 'unlockAccount'); + }); +}); diff --git a/bower_components/web3/test/web3.personal.newAccount.js b/bower_components/web3/test/web3.personal.newAccount.js new file mode 100644 index 00000000..4e7fdac7 --- /dev/null +++ b/bower_components/web3/test/web3.personal.newAccount.js @@ -0,0 +1,15 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'newAccount'; + +var tests = [{ + args: ['P@ssw0rd!'], + formattedArgs: ['P@ssw0rd!'], + result: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedResult: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + call: 'personal_'+ method +}]; + +testMethod.runTests('personal', method, tests); diff --git a/bower_components/web3/test/web3.personal.unlockAccount.js b/bower_components/web3/test/web3.personal.unlockAccount.js new file mode 100644 index 00000000..25af902b --- /dev/null +++ b/bower_components/web3/test/web3.personal.unlockAccount.js @@ -0,0 +1,21 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'unlockAccount'; + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 'P@ssw0rd!'], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 'P@ssw0rd!', null], + result: true, + formattedResult: true, + call: 'personal_'+ method +},{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 'P@ssw0rd!', 10], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 'P@ssw0rd!', 10], + result: true, + formattedResult: true, + call: 'personal_'+ method +}]; + +testMethod.runTests('personal', method, tests); diff --git a/bower_components/web3/test/web3.sha3.js b/bower_components/web3/test/web3.sha3.js new file mode 100644 index 00000000..f9fc6e7e --- /dev/null +++ b/bower_components/web3/test/web3.sha3.js @@ -0,0 +1,20 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index'); +var sha3 = require('../lib/utils/sha3'); +var web3 = new Web3(); + +var method = 'sha3'; + +describe('web3.sha3', function () { + it('should return sha3 with hex prefix', function() { + test1 = web3.sha3('test123'); + test2 = web3.sha3('test(int)'); + test3 = web3.sha3('0x80', {encoding: 'hex'}); + test4 = web3.sha3('0x3c9229289a6125f7fdf1885a77bb12c37a8d3b4962d936f7e3084dece32a3ca1', {encoding: 'hex'}); + assert.deepEqual(test1, '0x' + sha3('test123')); + assert.deepEqual(test2, '0x' + sha3('test(int)')); + assert.deepEqual(test3, '0x' + sha3('0x80', {encoding: 'hex'})); + assert.deepEqual(test4, '0x' + sha3('0x3c9229289a6125f7fdf1885a77bb12c37a8d3b4962d936f7e3084dece32a3ca1', {encoding: 'hex'})); + }); +}); diff --git a/bower_components/web3/test/web3.shh.filter.js b/bower_components/web3/test/web3.shh.filter.js new file mode 100644 index 00000000..1405fc89 --- /dev/null +++ b/bower_components/web3/test/web3.shh.filter.js @@ -0,0 +1,85 @@ +var chai = require('chai'); +var Web3 = require('../index'); +var web3 = new Web3(); +var assert = chai.assert; +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'filter'; + +var tests = [{ + args: [{ + to: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: ['0x324f5435', '0x564b4566f3453'] + }], + formattedArgs: [{ + to: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: ['0x324f5435', '0x564b4566f3453'] + }], + result: '0xf', + formattedResult: '0xf', + call: 'shh_newFilter' +}, +{ + args: [{ + to: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: ['0x324f5435', ['0x564b4566f3453', '0x345345343453']] + }], + formattedArgs: [{ + to: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: ['0x324f5435', ['0x564b4566f3453', '0x345345343453']] + }], + result: '0xf', + formattedResult: '0xf', + call: 'shh_newFilter' +}, +{ + args: [{ + to: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: ['0x324f5435', null, ['0x564b4566f3453', '0x345345343453']] + }], + formattedArgs: [{ + to: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: ['0x324f5435', null, ['0x564b4566f3453', '0x345345343453']] + }], + result: '0xf', + formattedResult: '0xf', + call: 'shh_newFilter' +}, +{ + args: [{ + to: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: ['myString', 11, '23', null] + }], + formattedArgs: [{ + to: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: ['0x6d79537472696e67', '0x3131', '0x3233', null] + }], + result: '0xf', + formattedResult: '0xf', + call: 'shh_newFilter' +}]; + +describe('shh', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, test.formattedArgs); + }); + + // call + web3.shh[method].apply(web3.shh, test.args); + + }); + }); + }); +}); + diff --git a/bower_components/web3/test/web3.shh.hasIdentity.js b/bower_components/web3/test/web3.shh.hasIdentity.js new file mode 100644 index 00000000..569247a8 --- /dev/null +++ b/bower_components/web3/test/web3.shh.hasIdentity.js @@ -0,0 +1,16 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'hasIdentity'; + +var tests = [{ + args: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855'], + formattedArgs: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855'], + result: true, + formattedResult: true, + call: 'shh_'+ method +}]; + +testMethod.runTests('shh', method, tests); + diff --git a/bower_components/web3/test/web3.shh.methods.js b/bower_components/web3/test/web3.shh.methods.js new file mode 100644 index 00000000..3b662fbb --- /dev/null +++ b/bower_components/web3/test/web3.shh.methods.js @@ -0,0 +1,17 @@ +var chai = require('chai'); +var assert = chai.assert; +var Web3 = require('../index.js'); +var web3 = new Web3(); +var u = require('./helpers/test.utils.js'); + +describe('web3.shh', function() { + describe('methods', function() { + u.methodExists(web3.shh, 'post'); + u.methodExists(web3.shh, 'newIdentity'); + u.methodExists(web3.shh, 'hasIdentity'); + u.methodExists(web3.shh, 'newGroup'); + u.methodExists(web3.shh, 'addToGroup'); + u.methodExists(web3.shh, 'filter'); + }); +}); + diff --git a/bower_components/web3/test/web3.shh.post.js b/bower_components/web3/test/web3.shh.post.js new file mode 100644 index 00000000..dd2a6664 --- /dev/null +++ b/bower_components/web3/test/web3.shh.post.js @@ -0,0 +1,50 @@ +var chai = require('chai'); +var Web3 = require('../index'); +var web3 = new Web3(); +var testMethod = require('./helpers/test.method.js'); + +var method = 'post'; + +var tests = [{ + args: [{ + from: '0x123123123', + topics: ['hello_world'], + payload: web3.toHex('12345'), + ttl: 100, + workToProve: 101 + }], + formattedArgs: [{ + from: '0x123123123', + topics: [web3.fromAscii('hello_world')], + payload: web3.toHex('12345'), + ttl: web3.toHex('100'), + workToProve: web3.toHex('101'), + priority: '0x0' + }], + result: true, + formattedResult: true, + call: 'shh_'+ method +}, { + args: [{ + from: '0x21312', + topics: ['hello_world'], + payload: '0x12345', + ttl: 0x100, + workToProve: 0x101, + priority: 0x15 + }], + formattedArgs: [{ + from: '0x21312', + topics: [web3.fromAscii('hello_world')], + payload: '0x12345', + ttl: '0x100', + workToProve: '0x101', + priority: '0x15' + }], + result: true, + formattedResult: true, + call: 'shh_'+ method +}]; + +testMethod.runTests('shh', method, tests); +